angular-formly
Advanced tools
Comparing version 8.3.0 to 8.4.0
@@ -1,4 +0,4 @@ | ||
/*! angular-formly v8.3.0 | MIT | built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò) */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("api-check"),require("angular")):"function"==typeof define&&define.amd?define(["api-check","angular"],t):"object"==typeof exports?exports.ngFormly=t(require("api-check"),require("angular")):e.ngFormly=t(e.apiCheck,e.angular)}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),i=n(r);t["default"]=i["default"],e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(19);n.version||(n=window.angular),t["default"]=n,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){return i(e,".")||i(e,"[")&&i(e,"]")}function i(e,t){return!(!e||!e.indexOf)&&e.indexOf(t)!==-1}function a(e,t,o,n,r){return v["default"].isFunction(t)?t(n,o,e,r):e.$eval(t,v["default"].extend({$viewValue:n,$modelValue:o},r))}function l(e,t,o){if(t.id)return t.id;var n=t.type;return!n&&t.template?n="template":!n&&t.templateUrl&&(n="templateUrl"),[e,n,t.key,o].join("_")}function f(e){return v["default"].forEach(arguments,function(t,o){o&&v["default"].forEach(t,function(t,o){v["default"].isDefined(e[o])?s(e[o],t)&&f(e[o],t):e[o]=v["default"].copy(t)})}),e}function s(e,t){return v["default"].isObject(e)&&v["default"].isObject(t)&&Object.getPrototypeOf(e)===Object.getPrototypeOf(t)}function u(e,t){if(e.prop||(e=v["default"].element(e)),e.prop("nodeName")===t.toUpperCase())return e;for(var o=e.children(),n=0;o&&n<o.length;n++){var r=u(o[n],t);if(r)return r}}function p(e){return e&&!v["default"].isArray(e)?e=[e]:e||(e=[]),e}function d(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(){var e=arguments;t.forEach(function(t){return t.apply(null,e)})}}function c(e,t,o){return o&&(e=e[o],t=t[o]),t&&e?(v["default"].forEach(t,function(t){e.indexOf(t)===-1&&e.push(t)}),e):t?t:e}function m(e,t){return!(!v["default"].isString(e)||!v["default"].isString(t))&&(e.length>=t.length&&e.substring(0,t.length)===t)}function y(e,t){return!(!v["default"].isString(e)||!v["default"].isString(t))&&(e.length>=t.length&&e.indexOf(t)!==-1)}Object.defineProperty(t,"__esModule",{value:!0});var h=o(1),v=n(h);t["default"]={containsSelector:r,containsSpecialChar:i,formlyEval:a,getFieldId:l,reverseDeepMerge:f,findByNodeName:u,arrayify:p,extendFunction:d,extendArray:c,startsWith:m,contains:y},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]="https://github.com/formly-js/angular-formly/blob/8.3.0/other/ERRORS_AND_WARNINGS.md#",e.exports=t["default"]},function(t,o){t.exports=e},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{restrict:"A",require:"ngModel",link:function(t,o,n,r){function i(e,t,o){l(t,o),t=a["default"].isObject(t)?t.expression:t,p?f(t,o,e):s(t,o,e)}function l(o,n){var i=o.message;i&&(u.validation.messages[n]=function(){return e.formlyEval(t,i,r.$modelValue,r.$viewValue)})}function f(o,n,i){var a=i?"$asyncValidators":"$validators";r[a][n]=function(n,r){return e.formlyEval(t,o,n,r)}}function s(o,n,i){var a=void 0;r.$parsers.unshift(function(l){var f=e.formlyEval(t,o,r.$modelValue,l);return i?(r.$pending=r.$pending||{},r.$pending[n]=!0,a=f,f.then(function(){a===f&&r.$setValidity(n,!0)})["catch"](function(){a===f&&r.$setValidity(n,!1)})["finally"](function(){var e=r.$pending||{};1===Object.keys(e).length?delete r.$pending:delete r.$pending[n]})):r.$setValidity(n,f),l})}var u=t.options;u.validation.messages=u.validation.messages||{},a["default"].forEach(u.validation.messages,function(o,n){u.validation.messages[n]=function(){return e.formlyEval(t,o,r.$modelValue,r.$viewValue)}});var p=r.hasOwnProperty("$validators")&&!n.hasOwnProperty("useParsers");a["default"].forEach(u.validators,a["default"].bind(null,i,!1)),a["default"].forEach(u.asyncValidators,a["default"].bind(null,i,!0))}}}r.$inject=["formlyUtil"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function i(e,t,o,n,i,f,u,d,c,m){function y(e,o,n,r,i){function a(){var r=t.defer();return o(function(){var o=[],i=e.options,a=u();s["default"].forEach(i.expressionProperties,function(r,l){var f=n(l).assign,s=t.when(d.formlyEval(e,r,a,a)).then(function(e){f(i,e)});o.push(s)}),t.all(o).then(function(){r.resolve()})},0,!1),r.promise}function l(){e.formOptions.watchAllExpressions&&!function(){var t=e.options,o=u();s["default"].forEach(t.expressionProperties,function(r,i){var a=n(i).assign;e.$watch(function(){return d.formlyEval(e,r,o,o)},function(e){a(t,e)},!0)})}()}function u(t){if(e.model&&e.options.key)return s["default"].isDefined(t)&&c(e.options.key,e.model,t),m(e.options.key,e.model)}function p(e){return s["default"].isNumber(e)||!d.containsSelector(e)}function c(t,o,r){if((t||0===t)&&o)if(p(t))o[t]=r;else{var i=n(e.options.key).assign;i&&i(e.model,r)}}function m(e,t){if((e||0===e)&&t)return p(e)?t[e]:n(e)(t)}function y(t){d.reverseDeepMerge(t,{originalModel:t.model,extras:{},data:{},templateOptions:{},validation:{}}),e.to=e.options.templateOptions,e.formOptions=e.formOptions||{}}function h(){if(s["default"].isFunction(f.extras.getFieldId))e.id=f.extras.getFieldId(e.options,e.model,e);else{var t=e.form&&e.form.$name||e.formId;e.id=d.getFieldId(t,e.options,e.index)}e.options.id=e.id,e.name=e.options.name||e.options.id,e.options.name=e.name}function v(){s["default"].isDefined(e.options.defaultValue)&&!s["default"].isDefined(m(e.options.key,e.model))&&c(e.options.key,e.model,e.options.defaultValue)}function b(){e.options.initialValue=e.model&&m(e.options.key,e.model)}function O(e,t){t&&x(e,t.defaultOptions);var o=j(e.optionsTypes).reverse();s["default"].forEach(o,function(t){x(e,f.getType(t,!0,e).defaultOptions)})}function x(t,o){o&&(s["default"].isFunction(o)&&(o=o(t,e)),d.reverseDeepMerge(t,o))}function E(e,t){var o=e.key||t||0;s["default"].extend(e,{key:o,value:e.value||u,runExpressions:a,resetModel:$,updateInitialValue:k})}function $(){c(e.options.key,e.model,e.options.initialValue),e.options.formControl&&(s["default"].isArray(e.options.formControl)?s["default"].forEach(e.options.formControl,function(e){w(e,!0)}):w(e.options.formControl)),e.form&&(e.form.$setUntouched&&e.form.$setUntouched(),e.form.$setPristine())}function w(t,o){o||t.$setViewValue(m(e.options.key,e.model)),t.$render(),t.$setUntouched&&t.$setUntouched(),t.$setPristine(),e.$root.$$phase||e.$digest()}function k(){e.options.initialValue=m(e.options.key,e.model)}function M(e){e.validation.messages=e.validation.messages||{},s["default"].forEach(i.messages,function(t,o){e.validation.messages[o]||(e.validation.messages[o]=function(e,o,n){return d.formlyEval(n,t,o,e)})})}function C(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s["default"].forEach([o.controller,t.controller],function(t){t&&r(t,{$scope:e})})}function F(){e.options.options=e.options.options||{},e.options.options.formState=e.formState,e.to=e.options.templateOptions}if(e.options.fieldGroup)return void F();var T=g(e.options);y(e.options),O(e.options,T),E(e.options,e.index),A(e.options),h(),v(),b(),a(),l(),M(e.options),C(e,e.options,T)}function h(e,n,u,p){function c(){k(e.options),n.addClass("formly-field-group");var t="";e.options.elementAttributes&&(t=Object.keys(e.options.elementAttributes).map(function(t){return t+'="'+e.options.elementAttributes[t]+'"'}).join(" "));var o="model";e.options.form=e.form,e.options.key&&(o="model['"+e.options.key+"']"),x('\n <formly-form model="'+o+'"\n fields="options.fieldGroup"\n options="options.options"\n form="options.form"\n class="'+e.options.className+'"\n '+t+"\n is-field-group>\n </formly-form>\n ").then(E(e.options,e.formOptions)).then($)}function y(){e.options.elementAttributes&&n.attr(e.options.elementAttributes)}function h(){e.options.className&&n.addClass(e.options.className),e.options.type&&n.addClass("formly-field-"+e.options.type)}function $(t){return n.html(v(t)),o(n.contents())(e),t}function w(t){function o(t){var o=/\{\{(.*?)}}/,r=o.exec(t);r&&(t=i(t)(e)),n(t)}function n(t){e.$watch('form["'+t+'"]',function(t){t&&(_>1?(e.options.formControl||(e.options.formControl=[]),e.options.formControl.push(t)):e.options.formControl=t,e.fc=e.options.formControl,y(),u(),p(),c())})}function u(){y=e.$watch(function(){var t=f.extras.errorExistsAndShouldBeVisibleExpression,o=e.options,n=j(e.fc);return!!n.some(function(e){return e.$invalid})&&("boolean"==typeof o.validation.show?o.validation.show:t?n.some(function(o){return d.formlyEval(e,t,o.$modelValue,o.$viewValue)}):n.some(function(e){var t=s["default"].isUndefined(e.$touched)&&e.$dirty;return e.$touched||t}))},function(t){e.options.validation.errorExistsAndShouldBeVisible=t,e.showError=t})}function p(){m("parsers")}function c(){m("formatters");var t=e.fc,o=e.form.$pristine;e.options.formatters&&!function(){var n=t.$modelValue;t.$formatters.forEach(function(e){n=e(n)}),t.$setViewValue(n),t.$render(),t.$setPristine(),o&&e.form.$setPristine()}()}function m(t){function o(r){if(!r)return[];s["default"].isString(r)&&(r=f.getType(r,!0,e.options));var i=[];return r["extends"]&&(i=d.extendArray(i,o(r["extends"]))),i=d.extendArray(i,l(r,t,[])),i=d.extendArray(i,n(a(r)))}function n(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=[];return s["default"].forEach(s["default"].copy(j(e)).reverse(),function(e){t=d.extendArray(t,o(e))}),t}function i(t){function o(o){var n=e.options.value();return d.formlyEval(e,t,n,o)}return o[u]=t,o}var u="originalParser";"formatters"===t&&(u="originalFormatter");var p=o(C);p=d.extendArray(p,n(e.options.optionsTypes)),p=d.extendArray(p,e.options[t]),s["default"].forEach(p,function(e,t){p[t]=i(e)});var c=e.fc;s["default"].isArray(c)||(c=[c]),s["default"].forEach(c,function(e){var o;e["$"+t]=(o=e["$"+t]).concat.apply(o,r(p))})}var y=s["default"].noop;if(!e.options.noFormControl){var h=s["default"].element("<div>"+t+"</div>"),v=h[0].querySelectorAll("[ng-model],[data-ng-model]");v.length&&s["default"].forEach(v,function(e){_++,o(e.getAttribute("name"))})}}function A(){C&&C.link&&C.link.apply(T,F),e.options.link&&e.options.link.apply(T,F)}function M(o){return function(n){var r=t.when(n);return s["default"].forEach(o,function(o){r=r.then(function(n){return t.when(o(n,e.options,e)).then(function(e){return s["default"].isString(e)?e:v(e)})})}),r}}if(e.options.fieldGroup)return void c();!p&&e.options.model&&e.$watch("options.model",function(){return e.options.runExpressions()},!0),y(),h();var C=g(e.options),F=arguments,T=this,_=0,W=b(e.options,e.formOptions);O(e.options).then(M(W.preWrapper)).then(E(e.options,e.formOptions)).then(M(W.postWrapper)).then($).then(w).then(A)["catch"](function(t){m("there-was-a-problem-setting-the-template-for-this-field","There was a problem setting the template for this field ",e.options,t)})}function v(e){var t=s["default"].element("<a></a>");return t.append(e).html()}function g(e){return e.type&&f.getType(e.type)}function b(e,t){function o(e){var t=e||{},o=t.preWrapper,i=void 0===o?[]:o,a=t.postWrapper,l=void 0===a?[]:a;n=n.concat(i),r=r.concat(l)}var n=[],r=[];return o(e.templateManipulators),o(t.templateManipulators),o(f.templateManipulators),{preWrapper:n,postWrapper:r}}function O(e){function t(t,o){return s["default"].isDefined(e[t])?e[t]:o&&s["default"].isDefined(o[t])?o[t]:void 0}var o=f.getType(e.type,!0,e),n=t("template",o),r=t("templateUrl",o);if(s["default"].isUndefined(n)&&!r)throw c.getFieldError("type-type-has-no-template","Type '"+e.type+"' has no template. On element:",e);return x(r||n,s["default"].isUndefined(n),e)}function x(o,r,i){var a=void 0;if(a=s["default"].isFunction(o)?t.when(o(i)):t.when(o),!r)return a;var l=function(){var t={cache:n};return{v:a.then(function(o){return e.get(o,t)}).then(function(e){return e.data})["catch"](function(e){m("problem-loading-template-for-templateurl","Problem loading template for "+o,e)})}}();return"object"==typeof l?l.v:void 0}function E(e,o){var n=w(e,o);return function(o){if(!n.length)return t.when(o);n.forEach(function(t){c.checkWrapper(t,e),M(t,e)});var r=n.map(function(e){return x(e.template||e.templateUrl,!e.template)});return t.all(r).then(function(e){e.forEach(function(e,t){c.checkWrapperTemplate(e,n[t])}),e.reverse();var t=e.shift();return e.forEach(function(e){t=$(t,e)}),$(t,o)})}}function $(e,t){var o=s["default"].element("<a></a>");o.append(e);var n=o.find("formly-transclude");return n.length||(n=d.findByNodeName(o,"formly-transclude")),n.replaceWith(t),o.html()}function w(e,t){var o=e.wrapper;if(null===o)return[];o=o?j(o).map(f.getWrapper):j(f.getWrapperByType(e.type));var n=f.getType(e.type,!0,e);if(n&&n.wrapper){var r=j(n.wrapper).map(f.getWrapper);o=o.concat(r)}if(t.wrapper){var i=j(t.wrapper).map(f.getWrapper);o=o.concat(i)}var a=f.getWrapper();return a&&o.push(a),o}function A(e){u["throw"](u.formlyFieldOptions,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"});var t=e.type&&f.getType(e.type);t&&M(t,e,!0),e.expressionProperties&&e.expressionProperties.hide&&m("dont-use-expressionproperties.hide-use-hideexpression-instead","You have specified `hide` in `expressionProperties`. Use `hideExpression` instead",e)}function k(e){u["throw"](u.fieldGroup,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"})}function M(e,t,o){var n=e.apiCheck,r=e.apiCheckInstance,i=e.apiCheckFunction,a=e.apiCheckOptions;C(n,r,i,a,t),o&&t.type&&s["default"].forEach(f.getTypeHeritage(t.type),function(e){C(e.apiCheck,e.apiCheckInstance,e.apiCheckFunction,e.apiCheckOptions,t)})}function C(e,t,o,n,r){if(e){var i=t||f.extras.apiCheckInstance||u;if(!i.config.disabled&&!p["default"].globalConfig.disabled){var a=o||"warn",l=e(i);s["default"].forEach(l,function(e,t){var o=i.shape(e),l=s["default"].extend({prefix:"formly-field type "+r.type+" for property "+t,url:u.config.output.docsBaseUrl+"formly-field-type-apicheck-failed"},n);i[a](o,r[t],l)})}}}y.$inject=["$scope","$timeout","$parse","$controller","formlyValidationMessages"];var j=d.arrayify;return{restrict:"AE",transclude:!0,require:"?^formlyForm",scope:{options:"=",model:"=",originalModel:"=?",formId:"@",index:"=?",fields:"=?",formState:"=?",formOptions:"=?",form:"=?"},controller:y,link:h}}function a(e){return l(e,"optionsTypes",[])}function l(e,t,o){return e.defaultOptions&&e.defaultOptions[t]||o}i.$inject=["$http","$q","$compile","$templateCache","$interpolate","formlyConfig","formlyApiCheck","formlyUtil","formlyUsability","formlyWarn"],Object.defineProperty(t,"__esModule",{value:!0});var f=o(1),s=n(f),u=o(4),p=n(u);t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function o(e,t){return{restrict:"A",link:function(o,n,r){var i=null,a=n[0],l=t[0];r.$observe("formlyFocus",function(t){"true"===t?e(function(){i=l.activeElement,a.focus()},~~r.focusWait):"false"===t&&l.activeElement===a&&(a.blur(),r.hasOwnProperty("refocus")&&i&&i.focus())})}}}o.$inject=["$timeout","$document"],Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function i(e){return e&&!!e.fieldGroup}function a(e,t,o,n,a,f,u){function p(){s["default"].forEach(a.fields,c)}function d(e,t){var o=e.$validate;t?t.then(o):o()}function c(e,t){var o=e.model||a.model,n=e.runExpressions&&e.runExpressions();if(e.hideExpression){var r=o[e.key];e.hide=C(e.hideExpression,r,e,t,{model:o})}e.extras&&e.extras.validateOnModelChange&&e.formControl&&(s["default"].isArray(e.formControl)?s["default"].forEach(e.formControl,function(e){d(e,n)}):d(e.formControl,n))}function m(){a.fields=a.fields||[],y(a.options);var t=a.options.fieldTransform||o.extras.fieldTransform;s["default"].isArray(t)||(t=[t]),s["default"].forEach(t,function(t){if(t&&(a.fields=t(a.fields,a.model,a.options,a.form),!a.fields))throw e.getFormlyError("fieldTransform must return an array of fields")}),b(),a.options.watchAllExpressions&&s["default"].forEach(a.fields,O),s["default"].forEach(a.fields,$),s["default"].forEach(a.fields,w)}function y(e){o.extras.fieldTransform&&s["default"].isFunction(o.extras.fieldTransform)?t("fieldtransform-as-a-function-deprecated","fieldTransform as a function has been deprecated.","Attempted for formlyConfig.extras: "+o.extras.fieldTransform.name,o.extras):e.fieldTransform&&s["default"].isFunction(e.fieldTransform)&&t("fieldtransform-as-a-function-deprecated","fieldTransform as a function has been deprecated.","Attempted for form",e)}function h(){f["throw"]([f.formOptionsApi.optional],[a.options],{prefix:"formly-form options check"}),a.options=a.options||{},a.options.formState=a.options.formState||{},s["default"].extend(a.options,{updateInitialValue:v,resetModel:g})}function v(){s["default"].forEach(a.fields,function(e){i(e)&&e.options?e.options.updateInitialValue():e.updateInitialValue()})}function g(){s["default"].forEach(a.fields,function(e){i(e)&&e.options?e.options.resetModel():e.resetModel&&e.resetModel()})}function b(){var e=[a.model],t=a.options.manualModelWatcher;a.options.formState&&e.push(a.options.formState),s["default"].forEach(a.fields,function(o){var n=x(o);o.model&&n&&e.indexOf(o.model)===-1&&!t&&(a.$watch(function(){return o.model},p,!0),e.push(o.model))})}function O(e,t){e.hideExpression&&!function(){var o=e.model||a.model;a.$watch(function(){var n=o[e.key];return C(e.hideExpression,n,e,t,{model:o})},function(t){return e.hide=t},!0)}()}function x(t){function o(o){var n=a.fields.indexOf(t),r=C(o,void 0,t,n,{model:a.model});if(!r)throw e.getFieldError("field-model-must-be-initialized","Field model must be initialized. When specifying a model as a string for a field, the result of the expression must have been initialized ahead of time.",t);return r}var n=!0;return s["default"].isString(t.model)&&!function(){var e=t.model;n=!E(e),t.model=o(e),a.$watch(function(){return o(e)},function(e){return t.model=e})}(),n}function E(e){return["model","formState"].some(function(t){return u.startsWith(e,t+".")||u.startsWith(e,t+"[")})}function $(e,t){i(e)||(e.key=e.key||t||0)}function w(t,o){if(s["default"].isDefined(t.watcher)){var n=t.watcher;s["default"].isArray(n)||(n=[n]),s["default"].forEach(n,function(n){if(!s["default"].isDefined(n.listener)&&!n.runFieldExpressions)throw e.getFieldError("all-field-watchers-must-have-a-listener","All field watchers must have a listener",t);var r=A(n,t,o),i=k(n,t,o),l=n.type||"$watch";n.stopWatching=a[l](r,i,n.watchDeep)})}}function A(e,t,o){var i=void 0;return s["default"].isUndefined(e.expression)?t.key&&(i="model['"+t.key.toString().split(".").join("']['")+"']"):i=e.expression,s["default"].isFunction(i)?!function(){var n=i;i=function(){var t=M.apply(void 0,[e,o].concat(l.call(arguments)));return n.apply(void 0,r(t))},i.displayName="Formly Watch Expression for field for "+t.key}():t.model&&(i=n(i).bind(null,a,{model:t.model})),i}function k(e,t,o){var n=e.listener;return(s["default"].isFunction(n)||e.runFieldExpressions)&&!function(){var i=n;n=function(){var n=void 0;if(i){var a=M.apply(void 0,[e,o].concat(l.call(arguments)));n=i.apply(void 0,r(a))}return e.runFieldExpressions&&c(t,o),n},n.displayName="Formly Watch Listener for field for "+t.key}(),n}function M(e,t){for(var o=arguments.length,n=Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];return[a.fields[t]].concat(n,[e.stopWatching])}function C(e,t,o,n){var r=arguments.length<=4||void 0===arguments[4]?{}:arguments[4];return r=s["default"].extend(j(o,n),r),u.formlyEval(a,e,t,t,r)}function j(e,t){return{model:e.model,options:e,index:t,formState:a.options.formState,originalModel:a.model,formOptions:a.options,formId:a.formId}}h(),a.model=a.model||{},m(),a.options.manualModelWatcher?s["default"].isFunction(a.options.manualModelWatcher)&&a.$watch(a.options.manualModelWatcher,p,!0):a.$watch("model",p,!0),a.options.formState&&a.$watch("options.formState",p,!0)}a.$inject=["formlyUsability","formlyWarn","formlyConfig","$parse","$scope","formlyApiCheck","formlyUtil"],Object.defineProperty(t,"__esModule",{value:!0});var l=Array.prototype.slice;t["default"]=a;var f=o(1),s=n(f);e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,o,n,r){function i(t,o){function i(){return o.rootEl||"ng-form"}function l(){return o.fieldRootEl||"div"}function u(){return o.hideDirective||n.extras.defaultHideDirective||"ng-if"}function p(){return o.trackBy?"track by "+o.trackBy:""}function d(){var t=v,n=o.bindName;if(n){if(a["default"].version.minor<3)throw e.getFormlyError("bind-name attribute on formly-form not allowed in < angular 1.3");t=r.startSymbol()+"::'formly_' + "+n+r.endSymbol()}return t}function c(){return o.transcludeClass||""}function m(e){var t=["model","form","fields","options","name","role","class","data-model","data-form","data-fields","data-options","data-name"],o=[];return a["default"].forEach(e,function(e){var n=e.nodeName,r=e.value;"undefined"!==n&&t.indexOf(n)===-1&&o.push(f(n)+'="'+r+'"')}),o.join(" ")}var y=i(),h=l(),v="formly_"+s++,g="";return o.hasOwnProperty("isFieldGroup")&&t.parent().parent().hasClass("formly")&&(g=m(t.parent().parent()[0].attributes)),"\n <"+y+' class="formly"\n name="'+d()+'"\n role="form" '+g+">\n <"+h+' formly-field\n ng-repeat="field in fields '+p()+'"\n '+u()+'="!field.hide"\n class="formly-field"\n options="field"\n model="field.model || model"\n original-model="model"\n fields="fields"\n form="theFormlyForm"\n form-id="'+d()+'"\n form-state="options.formState"\n form-options="options"\n index="$index">\n </'+h+'>\n <div ng-transclude class="'+c()+'"></div>\n </'+y+">\n "}function l(e,r,i){function a(){var a=i.name;if(e.formId=a,e.theFormlyForm=e[a],i.form){var l=o(i.form),f=l.assign,s=l(e.$parent);s?(e.theFormlyForm=s,e[a]&&e.theFormlyForm.$removeControl(e[a]),r.removeData("$formController")):f(e.$parent,e[a])}e.theFormlyForm||n.disableWarnings||t("formly-form-has-no-formcontroller","Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work",r,e)}function l(){var t=n.extras.removeChromeAutoComplete===!0,o=e.options&&e.options.removeChromeAutoComplete===!1,i=e.options&&e.options.removeChromeAutoComplete===!0;if(t&&!o||i){var a=document.createElement("input");a.setAttribute("autocomplete","address-level4"),a.setAttribute("hidden","true"),r[0].appendChild(a)}}a(),l()}function f(e){return e?e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):""}var s=1;return{restrict:"AE",template:i,replace:!0,transclude:!0,scope:{fields:"=",model:"=",form:"=?",options:"=?"},controller:"FormlyFormController",link:l}}r.$inject=["formlyUsability","formlyWarn","$parse","formlyConfig","$interpolate"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1),i=n(r),a=o(11),l=n(a),f=o(3),s=n(f),u=o(13),p=n(u),d=o(12),c=n(d),m=o(14),y=n(m),h=o(17),v=n(h),g=o(18),b=n(g),O=o(5),x=n(O),E=o(6),$=n(E),w=o(7),A=n(w),k=o(9),M=n(k),C=o(8),j=n(C),F=o(16),T=n(F),_=o(15),W=n(_),S="formly";t["default"]=S;var P=i["default"].module(S,[]);P.constant("formlyApiCheck",l["default"]),P.constant("formlyErrorAndWarningsUrlPrefix",s["default"]),P.constant("formlyVersion","8.3.0"),P.provider("formlyUsability",p["default"]),P.provider("formlyConfig",c["default"]),P.factory("formlyValidationMessages",y["default"]),P.factory("formlyUtil",v["default"]),P.factory("formlyWarn",b["default"]),P.directive("formlyCustomValidation",x["default"]),P.directive("formlyField",$["default"]),P.directive("formlyFocus",A["default"]),P.directive("formlyForm",M["default"]),P.controller("FormlyFormController",j["default"]),P.run(T["default"]),P.run(W["default"]),e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function o(o,r,i,a){var l=a&&a.hasOwnProperty(r),f=e.some(function(e){return a&&a.hasOwnProperty(e)});return f||l?l?t(o,r,i,a):void 0:s.utils.getError(r,i,n)}a["default"].isArray(e)||(e=[e]);var n="specified if these are not specified: `"+e.join(", ")+"` (otherwise it's optional)";return o.type=n,s.utils.checkerHelpers.setupChecker(o)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i),l=o(4),f=n(l),s=(0,f["default"])({output:{prefix:"angular-formly:",docsBaseUrl:o(3)}}),u=s.oneOfType([s.string,s.func]),p=s.typeOrArrayOf(s.string).nullable,d=s.func,c=s.shape.onlyIf("apiCheck",s.func.withProperties({warn:s.func,"throw":s.func,shape:s.func})),m=s.shape.onlyIf("apiCheck",s.oneOf(["throw","warn"])),y=s.shape({name:r("types",s.string).optional,template:s.shape.ifNot("templateUrl",s.string).optional,templateUrl:s.shape.ifNot("template",s.string).optional,types:s.typeOrArrayOf(s.string).optional,overwriteOk:s.bool.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional}).strict,h=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),v=s.oneOfType([s.string,s.object]),g=s.shape({preWrapper:s.arrayOf(s.func).nullable.optional,postWrapper:s.arrayOf(s.func).nullable.optional}).strict.nullable,b=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),O=s.typeOrArrayOf(s.shape({expression:u.optional,listener:u.optional,runFieldExpressions:s.bool.optional})),x={$$hashKey:s.any.optional,type:s.shape.ifNot(["template","templateUrl"],s.string).optional,template:s.shape.ifNot(["type","templateUrl"],s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot(["type","template"],s.oneOfType([s.string,s.func])).optional,key:s.oneOfType([s.string,s.number]).optional,model:v.optional,originalModel:v.optional,className:s.string.optional,id:s.string.optional,name:s.string.optional,expressionProperties:h.optional,extras:s.shape({validateOnModelChange:s.bool.optional,skipNgModelAttrsManipulator:s.oneOfType([s.string,s.bool]).optional}).strict.optional,data:s.object.optional,templateOptions:s.object.optional,wrapper:p.optional,modelOptions:s.shape({updateOn:s.string.optional,debounce:s.oneOfType([s.objectOf(s.number),s.number]).optional,allowInvalid:s.bool.optional,getterSetter:s.bool.optional,timezone:s.string.optional}).optional,watcher:O.optional,validators:b.optional,asyncValidators:b.optional,parsers:s.arrayOf(u).optional,formatters:s.arrayOf(u).optional,noFormControl:s.bool.optional,hide:s.bool.optional,hideExpression:u.optional,ngModelElAttrs:s.objectOf(s.string).optional,ngModelAttrs:s.objectOf(s.shape({statement:s.shape.ifNot(["value","attribute","bound","boolean"],s.any).optional,value:s.shape.ifNot("statement",s.any).optional,attribute:s.shape.ifNot("statement",s.any).optional,bound:s.shape.ifNot("statement",s.any).optional,"boolean":s.shape.ifNot("statement",s.any).optional}).strict).optional,elementAttributes:s.objectOf(s.string).optional,optionsTypes:s.typeOrArrayOf(s.string).optional,link:s.func.optional,controller:s.oneOfType([s.string,s.func,s.array]).optional,validation:s.shape({show:s.bool.nullable.optional,messages:s.objectOf(u).optional,errorExistsAndShouldBeVisible:s.bool.optional}).optional,formControl:s.typeOrArrayOf(s.object).optional,value:s.func.optional,runExpressions:s.func.optional,templateManipulators:g.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,initialValue:s.any.optional,defaultValue:s.any.optional},E=s.shape(x).strict,$=s.shape({formState:s.object.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,removeChromeAutoComplete:s.bool.optional,templateManipulators:g.optional,manualModelWatcher:s.oneOfType([s.bool,s.func]).optional,watchAllExpressions:s.bool.optional,wrapper:p.optional,fieldTransform:s.oneOfType([s.func,s.array]).optional,data:s.object.optional}).strict,w=s.shape({$$hashKey:s.any.optional,key:s.oneOfType([s.string,s.number]).optional,fieldGroup:s.arrayOf(s.oneOfType([E,s.object])),className:s.string.optional,options:$.optional,templateOptions:s.object.optional,wrapper:p.optional,watcher:O.optional,hide:s.bool.optional,hideExpression:u.optional,data:s.object.optional,model:v.optional,form:s.object.optional,elementAttributes:s.objectOf(s.string).optional}).strict,A=a["default"].copy(x);A.key=s.string.optional;var k=s.shape({name:s.string,template:s.shape.ifNot("templateUrl",s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot("template",s.oneOfType([s.string,s.func])).optional,controller:s.oneOfType([s.func,s.string,s.array]).optional,link:s.func.optional,defaultOptions:s.oneOfType([s.func,s.shape(A)]).optional,"extends":s.string.optional,wrapper:p.optional,data:s.object.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional,overwriteOk:s.bool.optional}).strict;a["default"].extend(s,{formlyTypeOptions:k,formlyFieldOptions:E,formlyExpression:u,formlyWrapperType:y,fieldGroup:w,formOptionsApi:$}),t["default"]=s,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function i(e,t,o){function n(e){if(!l["default"].isArray(e)){if(l["default"].isObject(e))return i(e),e["extends"]&&a(e),C[e.name]=e,C[e.name];throw _("You must provide an object or array for setType. You provided: "+JSON.stringify(arguments))}var t=function(){var t=[];return l["default"].forEach(e,function(e){t.push(n(e))}),{v:t}}();if("object"==typeof t)return t.v}function i(e){o["throw"](o.formlyTypeOptions,e,{prefix:"formlyConfig.setType",url:"settype-validation-failed"}),e.overwriteOk?e.overwriteOk=void 0:x(e.name,C,e,"types")}function a(e){var t=c(e["extends"],!0,e);u(e,t),p(e,t),d(e,t),s["default"].reverseDeepMerge(e,t),f(e,t)}function f(e,t){e.template&&t.templateUrl?delete e.templateUrl:e.templateUrl&&t.template&&delete e.template}function u(e,t){var o=t.controller;if(l["default"].isDefined(o)){var n=e.controller;l["default"].isDefined(n)?(e.controller=function(e,t){t(o,{$scope:e}),t(n,{$scope:e})},e.controller.$inject=["$scope","$controller"]):e.controller=o}}function p(e,t){var o=t.link;if(l["default"].isDefined(o)){var n=e.link;l["default"].isDefined(n)?e.link=function(){o.apply(void 0,arguments),n.apply(void 0,arguments)}:e.link=o}}function d(e,t){var o=t.defaultOptions;if(l["default"].isDefined(o)){var n=e.defaultOptions||{},r=l["default"].isFunction(n),i=l["default"].isFunction(o);i?e.defaultOptions=function(e,t){var i=o(e,t),a={};s["default"].reverseDeepMerge(a,e,i);var l=n;return r&&(l=l(a,t)),s["default"].reverseDeepMerge(l,i),l}:r&&(e.defaultOptions=function(e,t){var r={};return s["default"].reverseDeepMerge(r,e,o),n(r,t)})}}function c(e,t,o){if(e){ | ||
var n=C[e];if(n||t!==!0)return n;throw _('There is no type by the name of "'+e+'": '+JSON.stringify(o))}}function m(){return C}function y(e){var t=[],o=e;for(l["default"].isString(o)&&(o=c(e)),e=o["extends"];e;)o=c(e),t.push(o),e=o["extends"];return t}function h(e,t){for(var o=!0;o;){var n=e,r=t;if(o=!1,l["default"].isArray(n))return n.map(function(e){return h(e)});if(l["default"].isObject(n))return n.types=v(n),n.name=g(n,r),b(n),j[n.name]=n,n;l["default"].isString(n)&&(e={template:n,name:r},t=void 0,o=!0)}}function v(e){return l["default"].isString(e.types)?[e.types]:l["default"].isDefined(e.types)?e.types:[]}function g(e,t){return e.name||t||e.types.join(" ")||F}function b(t){e.checkWrapper(t),t.template&&e.checkWrapperTemplate(t.template,t),t.overwriteOk?delete t.overwriteOk:x(t.name,j,t,"templateWrappers"),O(t)}function O(e){var t=!l["default"].isArray(e.types)||!e.types.every(l["default"].isString);if(t)throw _("Attempted to create a template wrapper with types that is not a string or an array of strings")}function x(e,t,o,n){t.hasOwnProperty(e)&&k("overwriting-types-or-wrappers",["Attempting to overwrite "+e+" on "+n+" which is currently",JSON.stringify(t[e])+" with "+JSON.stringify(o),'To supress this warning, specify the property "overwriteOk: true"'].join(" "))}function E(e){return j[e||F]}function $(e){var t=[];for(var o in j)j.hasOwnProperty(o)&&j[o].types&&j[o].types.indexOf(e)!==-1&&t.push(j[o]);return t}function w(e){var t=j[e];return delete j[e],t}function A(e){var t=$(e);if(t)return l["default"].isArray(t)?(t.forEach(function(e){return w(e.name)}),t):w(t.name)}function k(){if(!T.disableWarnings&&console.warn){var e=Array.prototype.slice.call(arguments),o=e.shift();e.unshift("Formly Warning:"),e.push(""+t+o),console.warn.apply(console,r(e))}}var M=this,C={},j={},F="default",T=this,_=e.getFormlyError;l["default"].extend(this,{setType:n,getType:c,getTypes:m,getTypeHeritage:y,setWrapper:h,getWrapper:E,getWrapperByType:$,removeWrapperByName:w,removeWrappersForType:A,disableWarnings:!1,extras:{disableNgModelAttrsManipulator:!1,fieldTransform:[],ngModelAttrsManipulatorPreferUnbound:!1,removeChromeAutoComplete:!1,defaultHideDirective:"ng-if",getFieldId:null},templateManipulators:{preWrapper:[],postWrapper:[]},$get:function(){return M}})}i.$inject=["formlyUsabilityProvider","formlyErrorAndWarningsUrlPrefix","formlyApiCheck"],Object.defineProperty(t,"__esModule",{value:!0});var a=o(1),l=n(a),f=o(2),s=n(f);t["default"]=i,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function o(e,t,o){return arguments.length<3&&(o=t,t=e,e=null),new Error(r(e,t)+(" Field definition: "+a["default"].toJson(o)))}function n(e,t){return t||(t=e,e=null),new Error(r(e,t))}function r(e,o){var n="";return null!==e&&(n=""+t+e),"Formly Error: "+o+". "+n}function i(t){e["throw"](e.formlyWrapperType,t,{prefix:"formlyConfig.setWrapper",urlSuffix:"setwrapper-validation-failed"})}function l(e,t){var o="<formly-transclude></formly-transclude>";if(e.indexOf(o)===-1)throw n('Template wrapper templates must use "'+o+'" somewhere in them. This one does not have "<formly-transclude></formly-transclude>" in it: '+e+"\nAdditional information: "+JSON.stringify(t))}var f=this;a["default"].extend(this,{getFormlyError:n,getFieldError:o,checkWrapper:i,checkWrapperTemplate:l,getErrorMessage:r,$get:function(){return f}})}r.$inject=["formlyApiCheck","formlyErrorAndWarningsUrlPrefix"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function o(){function e(e,t,r,i,a){n.messages[e]=o(t,r,i,a)}function t(e,t){n.messages[e]=function(){return t}}function o(e,t,o,n){return function(r,i,a){return"undefined"!=typeof a.options.templateOptions[e]?t+" "+a.options.templateOptions[e]+" "+o:n}}var n={addTemplateOptionValueMessage:e,addStringMessage:t,messages:{}};return n}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){e&&e.documentMode<9&&!function(){var t=e.get(0),o=["formly-field","formly-form"];a["default"].forEach(o,function(e){t.createElement(e)})}()}r.$inject=["$document"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function o(e,o,r){function i(){(a["default"].isDefined(o.validators)||a["default"].isDefined(o.validation.messages))&&u(g,"formly-custom-validation","")}function l(){d(o.key)&&p(g,"ng-model","model."+o.key)}function c(){a["default"].isDefined(o.modelOptions)&&(u(g,"ng-model-options","options.modelOptions"),o.modelOptions.getterSetter&&p(g,"ng-model","options.value"))}function m(){if(o.templateOptions||o.expressionProperties){var e=o.templateOptions||{},n=o.expressionProperties||{},r=f();a["default"].extend(r,o.ngModelAttrs),a["default"].forEach(r,function(r,i){var l=void 0,f=void 0,p="options.templateOptions['"+i+"']",d=e[i],c=s(n,i),m=a["default"].isDefined(d),y=a["default"].isDefined(c);if(r.value)f=r.value,l=i;else if(r.statement&&m)if(f=r.statement,a["default"].isString(e[i]))l="$eval("+p+")";else{if(!a["default"].isFunction(e[i]))throw new Error("options.templateOptions."+i+" must be a string or function: "+JSON.stringify(o));l=p+"(model[options.key], options, this, $event)"}else r.bound&&y?(f=r.bound,l=p):(r.attribute||r["boolean"])&&y?(f=r.attribute||r["boolean"],l=""+t.startSymbol()+p+t.endSymbol()):r.attribute&&m?(f=r.attribute,l=d):r["boolean"]?m&&!y&&d&&(f=r["boolean"],l=!0):r.bound&&m&&(f=r.bound,l=p);a["default"].isDefined(f)&&a["default"].isDefined(l)&&u(g,f,l)})}}function y(){a["default"].forEach(o.ngModelElAttrs,function(e,t){p(g,t,e)})}var h=document.createElement("div"),v=o.extras&&o.extras.skipNgModelAttrsManipulator;if(v===!0)return e;h.innerHTML=e;var g=n(h,v);return g&&g.length?(u(g,"id",r.id),u(g,"name",r.name||r.id),i(),l(),c(),m(),y(),h.innerHTML):e}function n(e,t){var o=a["default"].isString(t)?":not("+t+")":"",n=":not([formly-skip-ng-model-attrs-manipulator])",i="[ng-model]"+o+n+", [data-ng-model]"+o+n;try{return e.querySelectorAll(i)}catch(l){return r(e,t)}}function r(e,t){var o=e.querySelectorAll("[ng-model], [data-ng-model]"),n=[];n.item=function(e){return this[e]};for(var r=0;r<o.length;r++){var l=o[r];l.hasAttribute("formly-skip-ng-model-attrs-manipulator")||a["default"].isString(t)&&i(l,t)||n.push(l)}return n}function i(e,t){var o=document.createElement("div");return o.innerHTML=e.outerHTML,o.querySelector(t)}function f(){var t={focus:{attribute:"formly-focus"}},o=[],n=["required","disabled"],r=["pattern","minlength"],i=["change","keydown","keyup","keypress","click","focus","blur"],l=["placeholder","min","max","step","tabindex","type"];return e.extras.ngModelAttrsManipulatorPreferUnbound?r.push("maxlength"):o.push("maxlength"),a["default"].forEach(o,function(e){t[e]={bound:"ng-"+e}}),a["default"].forEach(n,function(e){t[e]={"boolean":e,bound:"ng-"+e}}),a["default"].forEach(r,function(e){t[e]={attribute:e,bound:"ng-"+e}}),a["default"].forEach(i,function(e){var o="on"+e.substr(0,1).toUpperCase()+e.substr(1);t[o]={statement:"ng-"+e}}),a["default"].forEach(l,function(e){t[e]={attribute:e}}),t}function s(e,t){return e["templateOptions."+t]||e["templateOptions['"+t+"']"]||e['templateOptions["'+t+'"]']}function u(e,t,o){a["default"].forEach(e,function(e){e.getAttribute(t)||e.setAttribute(t,o)})}function p(e,t,o){a["default"].forEach(e,function(e){e.setAttribute(t,o)})}function d(e){return(0,l.contains)(e,".")||(0,l.contains)(e,"[")&&(0,l.contains)(e,"]")}e.extras.disableNgModelAttrsManipulator||e.templateManipulators.preWrapper.push(o)}r.$inject=["formlyConfig","$interpolate"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i),l=o(2);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(){return a["default"]}Object.defineProperty(t,"__esModule",{value:!0});var i=o(2),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function n(e,t,n){return function(){if(!e.disableWarnings){var r=Array.prototype.slice.call(arguments),i=r.shift();r.unshift("Formly Warning:"),r.push(""+t+i),n.warn.apply(n,o(r))}}}n.$inject=["formlyConfig","formlyErrorAndWarningsUrlPrefix","$log"],Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,o){e.exports=t}])}); | ||
/*! angular-formly v8.4.0 | MIT | built with ♥ by Astrism <astrisms@gmail.com>, Kent C. Dodds <kent@doddsfamily.us> (ó ì_í)=óò=(ì_í ò) */ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("api-check"),require("angular")):"function"==typeof define&&define.amd?define(["api-check","angular"],t):"object"==typeof exports?exports.ngFormly=t(require("api-check"),require("angular")):e.ngFormly=t(e.apiCheck,e.angular)}(this,function(e,t){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),i=n(r);t["default"]=i["default"],e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(19);n.version||(n=window.angular),t["default"]=n,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){return i(e,".")||i(e,"[")&&i(e,"]")}function i(e,t){return!(!e||!e.indexOf)&&e.indexOf(t)!==-1}function a(e,t,o,n,r){return v["default"].isFunction(t)?t(n,o,e,r):e.$eval(t,v["default"].extend({$viewValue:n,$modelValue:o},r))}function l(e,t,o){if(t.id)return t.id;var n=t.type;return!n&&t.template?n="template":!n&&t.templateUrl&&(n="templateUrl"),[e,n,t.key,o].join("_")}function f(e){return v["default"].forEach(arguments,function(t,o){o&&v["default"].forEach(t,function(t,o){v["default"].isDefined(e[o])?s(e[o],t)&&f(e[o],t):e[o]=v["default"].copy(t)})}),e}function s(e,t){return v["default"].isObject(e)&&v["default"].isObject(t)&&Object.getPrototypeOf(e)===Object.getPrototypeOf(t)}function u(e,t){if(e.prop||(e=v["default"].element(e)),e.prop("nodeName")===t.toUpperCase())return e;for(var o=e.children(),n=0;o&&n<o.length;n++){var r=u(o[n],t);if(r)return r}}function p(e){return e&&!v["default"].isArray(e)?e=[e]:e||(e=[]),e}function d(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];return function(){var e=arguments;t.forEach(function(t){return t.apply(null,e)})}}function c(e,t,o){return o&&(e=e[o],t=t[o]),t&&e?(v["default"].forEach(t,function(t){e.indexOf(t)===-1&&e.push(t)}),e):t?t:e}function m(e,t){return!(!v["default"].isString(e)||!v["default"].isString(t))&&(e.length>=t.length&&e.substring(0,t.length)===t)}function y(e,t){return!(!v["default"].isString(e)||!v["default"].isString(t))&&(e.length>=t.length&&e.indexOf(t)!==-1)}Object.defineProperty(t,"__esModule",{value:!0});var h=o(1),v=n(h);t["default"]={containsSelector:r,containsSpecialChar:i,formlyEval:a,getFieldId:l,reverseDeepMerge:f,findByNodeName:u,arrayify:p,extendFunction:d,extendArray:c,startsWith:m,contains:y},e.exports=t["default"]},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]="https://github.com/formly-js/angular-formly/blob/8.4.0/other/ERRORS_AND_WARNINGS.md#",e.exports=t["default"]},function(t,o){t.exports=e},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{restrict:"A",require:"ngModel",link:function(t,o,n,r){function i(e,t,o){l(t,o),t=a["default"].isObject(t)?t.expression:t,p?f(t,o,e):s(t,o,e)}function l(o,n){var i=o.message;i&&(u.validation.messages[n]=function(){return e.formlyEval(t,i,r.$modelValue,r.$viewValue)})}function f(o,n,i){var a=i?"$asyncValidators":"$validators";r[a][n]=function(n,r){return e.formlyEval(t,o,n,r)}}function s(o,n,i){var a=void 0;r.$parsers.unshift(function(l){var f=e.formlyEval(t,o,r.$modelValue,l);return i?(r.$pending=r.$pending||{},r.$pending[n]=!0,a=f,f.then(function(){a===f&&r.$setValidity(n,!0)})["catch"](function(){a===f&&r.$setValidity(n,!1)})["finally"](function(){var e=r.$pending||{};1===Object.keys(e).length?delete r.$pending:delete r.$pending[n]})):r.$setValidity(n,f),l})}var u=t.options;u.validation.messages=u.validation.messages||{},a["default"].forEach(u.validation.messages,function(o,n){u.validation.messages[n]=function(){return e.formlyEval(t,o,r.$modelValue,r.$viewValue)}});var p=r.hasOwnProperty("$validators")&&!n.hasOwnProperty("useParsers");a["default"].forEach(u.validators,a["default"].bind(null,i,!1)),a["default"].forEach(u.asyncValidators,a["default"].bind(null,i,!0))}}}r.$inject=["formlyUtil"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function i(e,t,o,n,i,f,u,d,c,m){function y(e,o,n,r,i){function a(){var r=t.defer();return o(function(){var o=[],i=e.options,a=u();s["default"].forEach(i.expressionProperties,function(r,l){var f=n(l).assign,s=t.when(d.formlyEval(e,r,a,a)).then(function(e){f(i,e)});o.push(s)}),t.all(o).then(function(){r.resolve()})},0,!1),r.promise}function l(){e.formOptions.watchAllExpressions&&!function(){var t=e.options,o=u();s["default"].forEach(t.expressionProperties,function(r,i){var a=n(i).assign;e.$watch(function(){return d.formlyEval(e,r,o,o)},function(e){a(t,e)},!0)})}()}function u(t){if(e.model&&e.options.key)return s["default"].isDefined(t)&&y(e.options.key,e.model,t),h(e.options.key,e.model)}function p(e){return s["default"].isNumber(e)||!d.containsSelector(e)}function c(e){return/\[\d{1,}\]/.test(e)}function m(e,t,o){if(s["default"].isString(t)&&(t=t.replace(/\[(\w+)\]/g,".$1").split(".")),t.length>1){var n=t.shift();e[n]=e[n]||isNaN(t[0])?{}:[],m(e[n],t,o)}else e[t[0]]=o}function y(t,o,r){if((t||0===t)&&o)if(p(t))o[t]=r;else if(f.extras.parseKeyArrays&&c(t))m(e.model,t,r);else{var i=n(e.options.key).assign;i&&i(e.model,r)}}function h(e,t){if((e||0===e)&&t)return p(e)?t[e]:n(e)(t)}function v(t){d.reverseDeepMerge(t,{originalModel:t.model,extras:{},data:{},templateOptions:{},validation:{}}),e.to=e.options.templateOptions,e.formOptions=e.formOptions||{}}function b(){if(s["default"].isFunction(f.extras.getFieldId))e.id=f.extras.getFieldId(e.options,e.model,e);else{var t=e.form&&e.form.$name||e.formId;e.id=d.getFieldId(t,e.options,e.index)}e.options.id=e.id,e.name=e.options.name||e.options.id,e.options.name=e.name}function O(){s["default"].isDefined(e.options.defaultValue)&&!s["default"].isDefined(h(e.options.key,e.model))&&y(e.options.key,e.model,e.options.defaultValue)}function x(){e.options.initialValue=e.model&&h(e.options.key,e.model)}function E(e,t){t&&$(e,t.defaultOptions);var o=j(e.optionsTypes).reverse();s["default"].forEach(o,function(t){$(e,f.getType(t,!0,e).defaultOptions)})}function $(t,o){o&&(s["default"].isFunction(o)&&(o=o(t,e)),d.reverseDeepMerge(t,o))}function w(e,t){var o=e.key||t||0;s["default"].extend(e,{key:o,value:e.value||u,runExpressions:a,resetModel:k,updateInitialValue:C})}function k(){y(e.options.key,e.model,e.options.initialValue),e.options.formControl&&(s["default"].isArray(e.options.formControl)?s["default"].forEach(e.options.formControl,function(e){M(e,!0)}):M(e.options.formControl)),e.form&&(e.form.$setUntouched&&e.form.$setUntouched(),e.form.$setPristine())}function M(t,o){o||t.$setViewValue(h(e.options.key,e.model)),t.$render(),t.$setUntouched&&t.$setUntouched(),t.$setPristine(),e.$root.$$phase||e.$digest()}function C(){e.options.initialValue=h(e.options.key,e.model)}function F(e){e.validation.messages=e.validation.messages||{},s["default"].forEach(i.messages,function(t,o){e.validation.messages[o]||(e.validation.messages[o]=function(e,o,n){return d.formlyEval(n,t,o,e)})})}function T(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],o=arguments.length<=2||void 0===arguments[2]?{}:arguments[2];s["default"].forEach([o.controller,t.controller],function(t){t&&r(t,{$scope:e})})}function _(){e.options.options=e.options.options||{},e.options.options.formState=e.formState,e.to=e.options.templateOptions}if(e.options.fieldGroup)return void _();var W=g(e.options);v(e.options),E(e.options,W),w(e.options,e.index),A(e.options),b(),O(),x(),a(),l(),F(e.options),T(e,e.options,W)}function h(e,n,u,p){function c(){k(e.options),n.addClass("formly-field-group");var t="";e.options.elementAttributes&&(t=Object.keys(e.options.elementAttributes).map(function(t){return t+'="'+e.options.elementAttributes[t]+'"'}).join(" "));var o="model";e.options.form=e.form,e.options.key&&(o="model['"+e.options.key+"']"),x('\n <formly-form model="'+o+'"\n fields="options.fieldGroup"\n options="options.options"\n form="options.form"\n class="'+e.options.className+'"\n '+t+"\n is-field-group>\n </formly-form>\n ").then(E(e.options,e.formOptions)).then($)}function y(){e.options.elementAttributes&&n.attr(e.options.elementAttributes)}function h(){e.options.className&&n.addClass(e.options.className),e.options.type&&n.addClass("formly-field-"+e.options.type)}function $(t){return n.html(v(t)),o(n.contents())(e),t}function w(t){function o(t){var o=/\{\{(.*?)}}/,r=o.exec(t);r&&(t=i(t)(e)),n(t)}function n(t){e.$watch('form["'+t+'"]',function(t){t&&(_>1?(e.options.formControl||(e.options.formControl=[]),e.options.formControl.push(t)):e.options.formControl=t,e.fc=e.options.formControl,y(),u(),p(),c())})}function u(){y=e.$watch(function(){var t=f.extras.errorExistsAndShouldBeVisibleExpression,o=e.options,n=j(e.fc);return!!n.some(function(e){return e.$invalid})&&("boolean"==typeof o.validation.show?o.validation.show:t?n.some(function(o){return d.formlyEval(e,t,o.$modelValue,o.$viewValue)}):n.some(function(e){var t=s["default"].isUndefined(e.$touched)&&e.$dirty;return e.$touched||t}))},function(t){e.options.validation.errorExistsAndShouldBeVisible=t,e.showError=t})}function p(){m("parsers")}function c(){m("formatters");var t=e.fc,o=e.form.$pristine;e.options.formatters&&!function(){var n=t.$modelValue;t.$formatters.forEach(function(e){n=e(n)}),t.$setViewValue(n),t.$render(),t.$setPristine(),o&&e.form.$setPristine()}()}function m(t){function o(r){if(!r)return[];s["default"].isString(r)&&(r=f.getType(r,!0,e.options));var i=[];return r["extends"]&&(i=d.extendArray(i,o(r["extends"]))),i=d.extendArray(i,l(r,t,[])),i=d.extendArray(i,n(a(r)))}function n(){var e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],t=[];return s["default"].forEach(s["default"].copy(j(e)).reverse(),function(e){t=d.extendArray(t,o(e))}),t}function i(t){function o(o){var n=e.options.value();return d.formlyEval(e,t,n,o)}return o[u]=t,o}var u="originalParser";"formatters"===t&&(u="originalFormatter");var p=o(C);p=d.extendArray(p,n(e.options.optionsTypes)),p=d.extendArray(p,e.options[t]),s["default"].forEach(p,function(e,t){p[t]=i(e)});var c=e.fc;s["default"].isArray(c)||(c=[c]),s["default"].forEach(c,function(e){var o;e["$"+t]=(o=e["$"+t]).concat.apply(o,r(p))})}var y=s["default"].noop;if(!e.options.noFormControl){var h=s["default"].element("<div>"+t+"</div>"),v=h[0].querySelectorAll("[ng-model],[data-ng-model]");v.length&&s["default"].forEach(v,function(e){_++,o(e.getAttribute("name"))})}}function A(){C&&C.link&&C.link.apply(T,F),e.options.link&&e.options.link.apply(T,F)}function M(o){return function(n){var r=t.when(n);return s["default"].forEach(o,function(o){r=r.then(function(n){return t.when(o(n,e.options,e)).then(function(e){return s["default"].isString(e)?e:v(e)})})}),r}}if(e.options.fieldGroup)return void c();!p&&e.options.model&&e.$watch("options.model",function(){return e.options.runExpressions()},!0),y(),h();var C=g(e.options),F=arguments,T=this,_=0,W=b(e.options,e.formOptions);O(e.options).then(M(W.preWrapper)).then(E(e.options,e.formOptions)).then(M(W.postWrapper)).then($).then(w).then(A)["catch"](function(t){m("there-was-a-problem-setting-the-template-for-this-field","There was a problem setting the template for this field ",e.options,t)})}function v(e){var t=s["default"].element("<a></a>");return t.append(e).html()}function g(e){return e.type&&f.getType(e.type)}function b(e,t){function o(e){var t=e||{},o=t.preWrapper,i=void 0===o?[]:o,a=t.postWrapper,l=void 0===a?[]:a;n=n.concat(i),r=r.concat(l)}var n=[],r=[];return o(e.templateManipulators),o(t.templateManipulators),o(f.templateManipulators),{preWrapper:n,postWrapper:r}}function O(e){function t(t,o){return s["default"].isDefined(e[t])?e[t]:o&&s["default"].isDefined(o[t])?o[t]:void 0}var o=f.getType(e.type,!0,e),n=t("template",o),r=t("templateUrl",o);if(s["default"].isUndefined(n)&&!r)throw c.getFieldError("type-type-has-no-template","Type '"+e.type+"' has no template. On element:",e);return x(r||n,s["default"].isUndefined(n),e)}function x(o,r,i){var a=void 0;if(a=s["default"].isFunction(o)?t.when(o(i)):t.when(o),!r)return a;var l=function(){var t={cache:n};return{v:a.then(function(o){return e.get(o,t)}).then(function(e){return e.data})["catch"](function(e){m("problem-loading-template-for-templateurl","Problem loading template for "+o,e)})}}();return"object"==typeof l?l.v:void 0}function E(e,o){var n=w(e,o);return function(o){if(!n.length)return t.when(o);n.forEach(function(t){c.checkWrapper(t,e),M(t,e)});var r=n.map(function(e){return x(e.template||e.templateUrl,!e.template)});return t.all(r).then(function(e){e.forEach(function(e,t){c.checkWrapperTemplate(e,n[t])}),e.reverse();var t=e.shift();return e.forEach(function(e){t=$(t,e)}),$(t,o)})}}function $(e,t){var o=s["default"].element("<a></a>");o.append(e);var n=o.find("formly-transclude");return n.length||(n=d.findByNodeName(o,"formly-transclude")),n.replaceWith(t),o.html()}function w(e,t){var o=e.wrapper;if(null===o)return[];o=o?j(o).map(f.getWrapper):j(f.getWrapperByType(e.type));var n=f.getType(e.type,!0,e);if(n&&n.wrapper){var r=j(n.wrapper).map(f.getWrapper);o=o.concat(r)}if(t.wrapper){var i=j(t.wrapper).map(f.getWrapper);o=o.concat(i)}var a=f.getWrapper();return a&&o.push(a),o}function A(e){u["throw"](u.formlyFieldOptions,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"});var t=e.type&&f.getType(e.type);t&&M(t,e,!0),e.expressionProperties&&e.expressionProperties.hide&&m("dont-use-expressionproperties.hide-use-hideexpression-instead","You have specified `hide` in `expressionProperties`. Use `hideExpression` instead",e)}function k(e){u["throw"](u.fieldGroup,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"})}function M(e,t,o){var n=e.apiCheck,r=e.apiCheckInstance,i=e.apiCheckFunction,a=e.apiCheckOptions;C(n,r,i,a,t),o&&t.type&&s["default"].forEach(f.getTypeHeritage(t.type),function(e){C(e.apiCheck,e.apiCheckInstance,e.apiCheckFunction,e.apiCheckOptions,t)})}function C(e,t,o,n,r){if(e){var i=t||f.extras.apiCheckInstance||u;if(!i.config.disabled&&!p["default"].globalConfig.disabled){var a=o||"warn",l=e(i);s["default"].forEach(l,function(e,t){var o=i.shape(e),l=s["default"].extend({prefix:"formly-field type "+r.type+" for property "+t,url:u.config.output.docsBaseUrl+"formly-field-type-apicheck-failed"},n);i[a](o,r[t],l)})}}}y.$inject=["$scope","$timeout","$parse","$controller","formlyValidationMessages"];var j=d.arrayify;return{restrict:"AE",transclude:!0,require:"?^formlyForm",scope:{options:"=",model:"=",originalModel:"=?",formId:"@",index:"=?",fields:"=?",formState:"=?",formOptions:"=?",form:"=?"},controller:y,link:h}}function a(e){return l(e,"optionsTypes",[])}function l(e,t,o){return e.defaultOptions&&e.defaultOptions[t]||o}i.$inject=["$http","$q","$compile","$templateCache","$interpolate","formlyConfig","formlyApiCheck","formlyUtil","formlyUsability","formlyWarn"],Object.defineProperty(t,"__esModule",{value:!0});var f=o(1),s=n(f),u=o(4),p=n(u);t["default"]=i,e.exports=t["default"]},function(e,t){"use strict";function o(e,t){return{restrict:"A",link:function(o,n,r){var i=null,a=n[0],l=t[0];r.$observe("formlyFocus",function(t){"true"===t?e(function(){i=l.activeElement,a.focus()},~~r.focusWait):"false"===t&&l.activeElement===a&&(a.blur(),r.hasOwnProperty("refocus")&&i&&i.focus())})}}}o.$inject=["$timeout","$document"],Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function i(e){return e&&!!e.fieldGroup}function a(e,t,o,n,a,f,u){function p(){s["default"].forEach(a.fields,c)}function d(e,t){var o=e.$validate;t?t.then(o):o()}function c(e,t){var o=e.model||a.model,n=e.runExpressions&&e.runExpressions();if(e.hideExpression){var r=o[e.key];e.hide=C(e.hideExpression,r,e,t,{model:o})}e.extras&&e.extras.validateOnModelChange&&e.formControl&&(s["default"].isArray(e.formControl)?s["default"].forEach(e.formControl,function(e){d(e,n)}):d(e.formControl,n))}function m(){a.fields=a.fields||[],y(a.options);var t=a.options.fieldTransform||o.extras.fieldTransform;s["default"].isArray(t)||(t=[t]),s["default"].forEach(t,function(t){if(t&&(a.fields=t(a.fields,a.model,a.options,a.form),!a.fields))throw e.getFormlyError("fieldTransform must return an array of fields")}),b(),a.options.watchAllExpressions&&s["default"].forEach(a.fields,O),s["default"].forEach(a.fields,$),s["default"].forEach(a.fields,w)}function y(e){o.extras.fieldTransform&&s["default"].isFunction(o.extras.fieldTransform)?t("fieldtransform-as-a-function-deprecated","fieldTransform as a function has been deprecated.","Attempted for formlyConfig.extras: "+o.extras.fieldTransform.name,o.extras):e.fieldTransform&&s["default"].isFunction(e.fieldTransform)&&t("fieldtransform-as-a-function-deprecated","fieldTransform as a function has been deprecated.","Attempted for form",e)}function h(){f["throw"]([f.formOptionsApi.optional],[a.options],{prefix:"formly-form options check"}),a.options=a.options||{},a.options.formState=a.options.formState||{},s["default"].extend(a.options,{updateInitialValue:v,resetModel:g})}function v(){s["default"].forEach(a.fields,function(e){i(e)&&e.options?e.options.updateInitialValue():e.updateInitialValue()})}function g(){s["default"].forEach(a.fields,function(e){i(e)&&e.options?e.options.resetModel():e.resetModel&&e.resetModel()})}function b(){var e=[a.model],t=a.options.manualModelWatcher;a.options.formState&&e.push(a.options.formState),s["default"].forEach(a.fields,function(o){var n=x(o);o.model&&n&&e.indexOf(o.model)===-1&&!t&&(a.$watch(function(){return o.model},p,!0),e.push(o.model))})}function O(e,t){e.hideExpression&&!function(){var o=e.model||a.model;a.$watch(function(){var n=o[e.key];return C(e.hideExpression,n,e,t,{model:o})},function(t){return e.hide=t},!0)}()}function x(t){function o(o){var n=a.fields.indexOf(t),r=C(o,void 0,t,n,{model:a.model});if(!r)throw e.getFieldError("field-model-must-be-initialized","Field model must be initialized. When specifying a model as a string for a field, the result of the expression must have been initialized ahead of time.",t);return r}var n=!0;return s["default"].isString(t.model)&&!function(){var e=t.model;n=!E(e),t.model=o(e),a.$watch(function(){return o(e)},function(e){return t.model=e})}(),n}function E(e){return["model","formState"].some(function(t){return u.startsWith(e,t+".")||u.startsWith(e,t+"[")})}function $(e,t){i(e)||(e.key=e.key||t||0)}function w(t,o){if(s["default"].isDefined(t.watcher)){var n=t.watcher;s["default"].isArray(n)||(n=[n]),s["default"].forEach(n,function(n){if(!s["default"].isDefined(n.listener)&&!n.runFieldExpressions)throw e.getFieldError("all-field-watchers-must-have-a-listener","All field watchers must have a listener",t);var r=A(n,t,o),i=k(n,t,o),l=n.type||"$watch";n.stopWatching=a[l](r,i,n.watchDeep)})}}function A(e,t,o){var i=void 0;return s["default"].isUndefined(e.expression)?t.key&&(i="model['"+t.key.toString().split(".").join("']['")+"']"):i=e.expression,s["default"].isFunction(i)?!function(){var n=i;i=function(){var t=M.apply(void 0,[e,o].concat(l.call(arguments)));return n.apply(void 0,r(t))},i.displayName="Formly Watch Expression for field for "+t.key}():t.model&&(i=n(i).bind(null,a,{model:t.model})),i}function k(e,t,o){var n=e.listener;return(s["default"].isFunction(n)||e.runFieldExpressions)&&!function(){var i=n;n=function(){var n=void 0;if(i){var a=M.apply(void 0,[e,o].concat(l.call(arguments)));n=i.apply(void 0,r(a))}return e.runFieldExpressions&&c(t,o),n},n.displayName="Formly Watch Listener for field for "+t.key}(),n}function M(e,t){for(var o=arguments.length,n=Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];return[a.fields[t]].concat(n,[e.stopWatching])}function C(e,t,o,n){var r=arguments.length<=4||void 0===arguments[4]?{}:arguments[4];return r=s["default"].extend(j(o,n),r),u.formlyEval(a,e,t,t,r)}function j(e,t){return{model:e.model,options:e,index:t,formState:a.options.formState,originalModel:a.model,formOptions:a.options,formId:a.formId}}h(),a.model=a.model||{},m(),a.options.manualModelWatcher?s["default"].isFunction(a.options.manualModelWatcher)&&a.$watch(a.options.manualModelWatcher,p,!0):a.$watch("model",p,!0),a.options.formState&&a.$watch("options.formState",p,!0)}a.$inject=["formlyUsability","formlyWarn","formlyConfig","$parse","$scope","formlyApiCheck","formlyUtil"],Object.defineProperty(t,"__esModule",{value:!0});var l=Array.prototype.slice;t["default"]=a;var f=o(1),s=n(f);e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t,o,n,r){function i(t,o){function i(){return o.rootEl||"ng-form"}function l(){return o.fieldRootEl||"div"}function u(){return o.hideDirective||n.extras.defaultHideDirective||"ng-if"}function p(){return o.trackBy?"track by "+o.trackBy:""}function d(){var t=v,n=o.bindName;if(n){if(a["default"].version.minor<3)throw e.getFormlyError("bind-name attribute on formly-form not allowed in < angular 1.3");t=r.startSymbol()+"::'formly_' + "+n+r.endSymbol()}return t}function c(){return o.transcludeClass||""}function m(e){var t=["model","form","fields","options","name","role","class","data-model","data-form","data-fields","data-options","data-name"],o=[];return a["default"].forEach(e,function(e){var n=e.nodeName,r=e.value;"undefined"!==n&&t.indexOf(n)===-1&&o.push(f(n)+'="'+r+'"')}),o.join(" ")}var y=i(),h=l(),v="formly_"+s++,g="";return o.hasOwnProperty("isFieldGroup")&&t.parent().parent().hasClass("formly")&&(g=m(t.parent().parent()[0].attributes)),"\n <"+y+' class="formly"\n name="'+d()+'"\n role="form" '+g+">\n <"+h+' formly-field\n ng-repeat="field in fields '+p()+'"\n '+u()+'="!field.hide"\n class="formly-field"\n options="field"\n model="field.model || model"\n original-model="model"\n fields="fields"\n form="theFormlyForm"\n form-id="'+d()+'"\n form-state="options.formState"\n form-options="options"\n index="$index">\n </'+h+'>\n <div ng-transclude class="'+c()+'"></div>\n </'+y+">\n "}function l(e,r,i){function a(){var a=i.name;if(e.formId=a,e.theFormlyForm=e[a],i.form){var l=o(i.form),f=l.assign,s=l(e.$parent);s?(e.theFormlyForm=s,e[a]&&e.theFormlyForm.$removeControl(e[a]),r.removeData("$formController")):f(e.$parent,e[a])}e.theFormlyForm||n.disableWarnings||t("formly-form-has-no-formcontroller","Your formly-form does not have a `form` property. Many functions of the form (like validation) may not work",r,e)}function l(){var t=n.extras.removeChromeAutoComplete===!0,o=e.options&&e.options.removeChromeAutoComplete===!1,i=e.options&&e.options.removeChromeAutoComplete===!0;if(t&&!o||i){var a=document.createElement("input");a.setAttribute("autocomplete","address-level4"),a.setAttribute("hidden","true"),r[0].appendChild(a)}}a(),l()}function f(e){return e?e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()}):""}var s=1;return{restrict:"AE",template:i,replace:!0,transclude:!0,scope:{fields:"=",model:"=",form:"=?",options:"=?"},controller:"FormlyFormController",link:l}}r.$inject=["formlyUsability","formlyWarn","$parse","formlyConfig","$interpolate"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=o(1),i=n(r),a=o(11),l=n(a),f=o(3),s=n(f),u=o(13),p=n(u),d=o(12),c=n(d),m=o(14),y=n(m),h=o(17),v=n(h),g=o(18),b=n(g),O=o(5),x=n(O),E=o(6),$=n(E),w=o(7),A=n(w),k=o(9),M=n(k),C=o(8),j=n(C),F=o(16),T=n(F),_=o(15),W=n(_),S="formly";t["default"]=S;var P=i["default"].module(S,[]);P.constant("formlyApiCheck",l["default"]),P.constant("formlyErrorAndWarningsUrlPrefix",s["default"]),P.constant("formlyVersion","8.4.0"),P.provider("formlyUsability",p["default"]),P.provider("formlyConfig",c["default"]),P.factory("formlyValidationMessages",y["default"]),P.factory("formlyUtil",v["default"]),P.factory("formlyWarn",b["default"]),P.directive("formlyCustomValidation",x["default"]),P.directive("formlyField",$["default"]),P.directive("formlyFocus",A["default"]),P.directive("formlyForm",M["default"]),P.controller("FormlyFormController",j["default"]),P.run(T["default"]),P.run(W["default"]),e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function o(o,r,i,a){var l=a&&a.hasOwnProperty(r),f=e.some(function(e){return a&&a.hasOwnProperty(e)});return f||l?l?t(o,r,i,a):void 0:s.utils.getError(r,i,n)}a["default"].isArray(e)||(e=[e]);var n="specified if these are not specified: `"+e.join(", ")+"` (otherwise it's optional)";return o.type=n,s.utils.checkerHelpers.setupChecker(o)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i),l=o(4),f=n(l),s=(0,f["default"])({output:{prefix:"angular-formly:",docsBaseUrl:o(3)}}),u=s.oneOfType([s.string,s.func]),p=s.typeOrArrayOf(s.string).nullable,d=s.func,c=s.shape.onlyIf("apiCheck",s.func.withProperties({warn:s.func,"throw":s.func,shape:s.func})),m=s.shape.onlyIf("apiCheck",s.oneOf(["throw","warn"])),y=s.shape({name:r("types",s.string).optional,template:s.shape.ifNot("templateUrl",s.string).optional,templateUrl:s.shape.ifNot("template",s.string).optional,types:s.typeOrArrayOf(s.string).optional,overwriteOk:s.bool.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional}).strict,h=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),v=s.oneOfType([s.string,s.object]),g=s.shape({preWrapper:s.arrayOf(s.func).nullable.optional,postWrapper:s.arrayOf(s.func).nullable.optional}).strict.nullable,b=s.objectOf(s.oneOfType([u,s.shape({expression:u,message:u.optional}).strict])),O=s.typeOrArrayOf(s.shape({expression:u.optional,listener:u.optional,runFieldExpressions:s.bool.optional})),x={$$hashKey:s.any.optional,type:s.shape.ifNot(["template","templateUrl"],s.string).optional,template:s.shape.ifNot(["type","templateUrl"],s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot(["type","template"],s.oneOfType([s.string,s.func])).optional,key:s.oneOfType([s.string,s.number]).optional,model:v.optional,originalModel:v.optional,className:s.string.optional,id:s.string.optional,name:s.string.optional,expressionProperties:h.optional,extras:s.shape({validateOnModelChange:s.bool.optional,skipNgModelAttrsManipulator:s.oneOfType([s.string,s.bool]).optional}).strict.optional,data:s.object.optional,templateOptions:s.object.optional,wrapper:p.optional,modelOptions:s.shape({updateOn:s.string.optional,debounce:s.oneOfType([s.objectOf(s.number),s.number]).optional,allowInvalid:s.bool.optional,getterSetter:s.bool.optional,timezone:s.string.optional}).optional,watcher:O.optional,validators:b.optional,asyncValidators:b.optional,parsers:s.arrayOf(u).optional,formatters:s.arrayOf(u).optional,noFormControl:s.bool.optional,hide:s.bool.optional,hideExpression:u.optional,ngModelElAttrs:s.objectOf(s.string).optional,ngModelAttrs:s.objectOf(s.shape({statement:s.shape.ifNot(["value","attribute","bound","boolean"],s.any).optional,value:s.shape.ifNot("statement",s.any).optional,attribute:s.shape.ifNot("statement",s.any).optional,bound:s.shape.ifNot("statement",s.any).optional,"boolean":s.shape.ifNot("statement",s.any).optional}).strict).optional,elementAttributes:s.objectOf(s.string).optional,optionsTypes:s.typeOrArrayOf(s.string).optional,link:s.func.optional,controller:s.oneOfType([s.string,s.func,s.array]).optional,validation:s.shape({show:s.bool.nullable.optional,messages:s.objectOf(u).optional,errorExistsAndShouldBeVisible:s.bool.optional}).optional,formControl:s.typeOrArrayOf(s.object).optional,value:s.func.optional,runExpressions:s.func.optional,templateManipulators:g.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,initialValue:s.any.optional,defaultValue:s.any.optional},E=s.shape(x).strict,$=s.shape({formState:s.object.optional,resetModel:s.func.optional,updateInitialValue:s.func.optional,removeChromeAutoComplete:s.bool.optional,parseKeyArrays:s.bool.optional,templateManipulators:g.optional,manualModelWatcher:s.oneOfType([s.bool,s.func]).optional,watchAllExpressions:s.bool.optional,wrapper:p.optional,fieldTransform:s.oneOfType([s.func,s.array]).optional,data:s.object.optional}).strict,w=s.shape({$$hashKey:s.any.optional,key:s.oneOfType([s.string,s.number]).optional,fieldGroup:s.arrayOf(s.oneOfType([E,s.object])),className:s.string.optional,options:$.optional,templateOptions:s.object.optional,wrapper:p.optional,watcher:O.optional,hide:s.bool.optional,hideExpression:u.optional,data:s.object.optional,model:v.optional,form:s.object.optional,elementAttributes:s.objectOf(s.string).optional}).strict,A=a["default"].copy(x);A.key=s.string.optional;var k=s.shape({name:s.string,template:s.shape.ifNot("templateUrl",s.oneOfType([s.string,s.func])).optional,templateUrl:s.shape.ifNot("template",s.oneOfType([s.string,s.func])).optional,controller:s.oneOfType([s.func,s.string,s.array]).optional,link:s.func.optional,defaultOptions:s.oneOfType([s.func,s.shape(A)]).optional,"extends":s.string.optional,wrapper:p.optional,data:s.object.optional,apiCheck:d.optional,apiCheckInstance:c.optional,apiCheckFunction:m.optional,apiCheckOptions:s.object.optional,overwriteOk:s.bool.optional}).strict;a["default"].extend(s,{formlyTypeOptions:k,formlyFieldOptions:E,formlyExpression:u,formlyWrapperType:y,fieldGroup:w,formOptionsApi:$}),t["default"]=s,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function i(e,t,o){function n(e){if(!l["default"].isArray(e)){if(l["default"].isObject(e))return i(e),e["extends"]&&a(e),C[e.name]=e,C[e.name];throw _("You must provide an object or array for setType. You provided: "+JSON.stringify(arguments))}var t=function(){var t=[];return l["default"].forEach(e,function(e){t.push(n(e))}),{v:t}}();if("object"==typeof t)return t.v}function i(e){o["throw"](o.formlyTypeOptions,e,{prefix:"formlyConfig.setType",url:"settype-validation-failed"}),e.overwriteOk?e.overwriteOk=void 0:x(e.name,C,e,"types")}function a(e){var t=c(e["extends"],!0,e);u(e,t),p(e,t),d(e,t),s["default"].reverseDeepMerge(e,t),f(e,t)}function f(e,t){e.template&&t.templateUrl?delete e.templateUrl:e.templateUrl&&t.template&&delete e.template}function u(e,t){var o=t.controller;if(l["default"].isDefined(o)){var n=e.controller;l["default"].isDefined(n)?(e.controller=function(e,t){t(o,{$scope:e}),t(n,{$scope:e})},e.controller.$inject=["$scope","$controller"]):e.controller=o}}function p(e,t){var o=t.link;if(l["default"].isDefined(o)){var n=e.link;l["default"].isDefined(n)?e.link=function(){o.apply(void 0,arguments),n.apply(void 0,arguments)}:e.link=o}}function d(e,t){var o=t.defaultOptions;if(l["default"].isDefined(o)){var n=e.defaultOptions||{},r=l["default"].isFunction(n),i=l["default"].isFunction(o); | ||
i?e.defaultOptions=function(e,t){var i=o(e,t),a={};s["default"].reverseDeepMerge(a,e,i);var l=n;return r&&(l=l(a,t)),s["default"].reverseDeepMerge(l,i),l}:r&&(e.defaultOptions=function(e,t){var r={};return s["default"].reverseDeepMerge(r,e,o),n(r,t)})}}function c(e,t,o){if(e){var n=C[e];if(n||t!==!0)return n;throw _('There is no type by the name of "'+e+'": '+JSON.stringify(o))}}function m(){return C}function y(e){var t=[],o=e;for(l["default"].isString(o)&&(o=c(e)),e=o["extends"];e;)o=c(e),t.push(o),e=o["extends"];return t}function h(e,t){for(var o=!0;o;){var n=e,r=t;if(o=!1,l["default"].isArray(n))return n.map(function(e){return h(e)});if(l["default"].isObject(n))return n.types=v(n),n.name=g(n,r),b(n),j[n.name]=n,n;l["default"].isString(n)&&(e={template:n,name:r},t=void 0,o=!0)}}function v(e){return l["default"].isString(e.types)?[e.types]:l["default"].isDefined(e.types)?e.types:[]}function g(e,t){return e.name||t||e.types.join(" ")||F}function b(t){e.checkWrapper(t),t.template&&e.checkWrapperTemplate(t.template,t),t.overwriteOk?delete t.overwriteOk:x(t.name,j,t,"templateWrappers"),O(t)}function O(e){var t=!l["default"].isArray(e.types)||!e.types.every(l["default"].isString);if(t)throw _("Attempted to create a template wrapper with types that is not a string or an array of strings")}function x(e,t,o,n){t.hasOwnProperty(e)&&k("overwriting-types-or-wrappers",["Attempting to overwrite "+e+" on "+n+" which is currently",JSON.stringify(t[e])+" with "+JSON.stringify(o),'To supress this warning, specify the property "overwriteOk: true"'].join(" "))}function E(e){return j[e||F]}function $(e){var t=[];for(var o in j)j.hasOwnProperty(o)&&j[o].types&&j[o].types.indexOf(e)!==-1&&t.push(j[o]);return t}function w(e){var t=j[e];return delete j[e],t}function A(e){var t=$(e);if(t)return l["default"].isArray(t)?(t.forEach(function(e){return w(e.name)}),t):w(t.name)}function k(){if(!T.disableWarnings&&console.warn){var e=Array.prototype.slice.call(arguments),o=e.shift();e.unshift("Formly Warning:"),e.push(""+t+o),console.warn.apply(console,r(e))}}var M=this,C={},j={},F="default",T=this,_=e.getFormlyError;l["default"].extend(this,{setType:n,getType:c,getTypes:m,getTypeHeritage:y,setWrapper:h,getWrapper:E,getWrapperByType:$,removeWrapperByName:w,removeWrappersForType:A,disableWarnings:!1,extras:{disableNgModelAttrsManipulator:!1,fieldTransform:[],ngModelAttrsManipulatorPreferUnbound:!1,removeChromeAutoComplete:!1,parseKeyArrays:!1,defaultHideDirective:"ng-if",getFieldId:null},templateManipulators:{preWrapper:[],postWrapper:[]},$get:function(){return M}})}i.$inject=["formlyUsabilityProvider","formlyErrorAndWarningsUrlPrefix","formlyApiCheck"],Object.defineProperty(t,"__esModule",{value:!0});var a=o(1),l=n(a),f=o(2),s=n(f);t["default"]=i,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function o(e,t,o){return arguments.length<3&&(o=t,t=e,e=null),new Error(r(e,t)+(" Field definition: "+a["default"].toJson(o)))}function n(e,t){return t||(t=e,e=null),new Error(r(e,t))}function r(e,o){var n="";return null!==e&&(n=""+t+e),"Formly Error: "+o+". "+n}function i(t){e["throw"](e.formlyWrapperType,t,{prefix:"formlyConfig.setWrapper",urlSuffix:"setwrapper-validation-failed"})}function l(e,t){var o="<formly-transclude></formly-transclude>";if(e.indexOf(o)===-1)throw n('Template wrapper templates must use "'+o+'" somewhere in them. This one does not have "<formly-transclude></formly-transclude>" in it: '+e+"\nAdditional information: "+JSON.stringify(t))}var f=this;a["default"].extend(this,{getFormlyError:n,getFieldError:o,checkWrapper:i,checkWrapperTemplate:l,getErrorMessage:r,$get:function(){return f}})}r.$inject=["formlyApiCheck","formlyErrorAndWarningsUrlPrefix"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function o(){function e(e,t,r,i,a){n.messages[e]=o(t,r,i,a)}function t(e,t){n.messages[e]=function(){return t}}function o(e,t,o,n){return function(r,i,a){return"undefined"!=typeof a.options.templateOptions[e]?t+" "+a.options.templateOptions[e]+" "+o:n}}var n={addTemplateOptionValueMessage:e,addStringMessage:t,messages:{}};return n}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){e&&e.documentMode<9&&!function(){var t=e.get(0),o=["formly-field","formly-form"];a["default"].forEach(o,function(e){t.createElement(e)})}()}r.$inject=["$document"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function o(e,o,r){function i(){(a["default"].isDefined(o.validators)||a["default"].isDefined(o.validation.messages))&&u(g,"formly-custom-validation","")}function l(){d(o.key)&&p(g,"ng-model","model."+o.key)}function c(){a["default"].isDefined(o.modelOptions)&&(u(g,"ng-model-options","options.modelOptions"),o.modelOptions.getterSetter&&p(g,"ng-model","options.value"))}function m(){if(o.templateOptions||o.expressionProperties){var e=o.templateOptions||{},n=o.expressionProperties||{},r=f();a["default"].extend(r,o.ngModelAttrs),a["default"].forEach(r,function(r,i){var l=void 0,f=void 0,p="options.templateOptions['"+i+"']",d=e[i],c=s(n,i),m=a["default"].isDefined(d),y=a["default"].isDefined(c);if(r.value)f=r.value,l=i;else if(r.statement&&m)if(f=r.statement,a["default"].isString(e[i]))l="$eval("+p+")";else{if(!a["default"].isFunction(e[i]))throw new Error("options.templateOptions."+i+" must be a string or function: "+JSON.stringify(o));l=p+"(model[options.key], options, this, $event)"}else r.bound&&y?(f=r.bound,l=p):(r.attribute||r["boolean"])&&y?(f=r.attribute||r["boolean"],l=""+t.startSymbol()+p+t.endSymbol()):r.attribute&&m?(f=r.attribute,l=d):r["boolean"]?m&&!y&&d&&(f=r["boolean"],l=!0):r.bound&&m&&(f=r.bound,l=p);a["default"].isDefined(f)&&a["default"].isDefined(l)&&u(g,f,l)})}}function y(){a["default"].forEach(o.ngModelElAttrs,function(e,t){p(g,t,e)})}var h=document.createElement("div"),v=o.extras&&o.extras.skipNgModelAttrsManipulator;if(v===!0)return e;h.innerHTML=e;var g=n(h,v);return g&&g.length?(u(g,"id",r.id),u(g,"name",r.name||r.id),i(),l(),c(),m(),y(),h.innerHTML):e}function n(e,t){var o=a["default"].isString(t)?":not("+t+")":"",n=":not([formly-skip-ng-model-attrs-manipulator])",i="[ng-model]"+o+n+", [data-ng-model]"+o+n;try{return e.querySelectorAll(i)}catch(l){return r(e,t)}}function r(e,t){var o=e.querySelectorAll("[ng-model], [data-ng-model]"),n=[];n.item=function(e){return this[e]};for(var r=0;r<o.length;r++){var l=o[r];l.hasAttribute("formly-skip-ng-model-attrs-manipulator")||a["default"].isString(t)&&i(l,t)||n.push(l)}return n}function i(e,t){var o=document.createElement("div");return o.innerHTML=e.outerHTML,o.querySelector(t)}function f(){var t={focus:{attribute:"formly-focus"}},o=[],n=["required","disabled"],r=["pattern","minlength"],i=["change","keydown","keyup","keypress","click","focus","blur"],l=["placeholder","min","max","step","tabindex","type"];return e.extras.ngModelAttrsManipulatorPreferUnbound?r.push("maxlength"):o.push("maxlength"),a["default"].forEach(o,function(e){t[e]={bound:"ng-"+e}}),a["default"].forEach(n,function(e){t[e]={"boolean":e,bound:"ng-"+e}}),a["default"].forEach(r,function(e){t[e]={attribute:e,bound:"ng-"+e}}),a["default"].forEach(i,function(e){var o="on"+e.substr(0,1).toUpperCase()+e.substr(1);t[o]={statement:"ng-"+e}}),a["default"].forEach(l,function(e){t[e]={attribute:e}}),t}function s(e,t){return e["templateOptions."+t]||e["templateOptions['"+t+"']"]||e['templateOptions["'+t+'"]']}function u(e,t,o){a["default"].forEach(e,function(e){e.getAttribute(t)||e.setAttribute(t,o)})}function p(e,t,o){a["default"].forEach(e,function(e){e.setAttribute(t,o)})}function d(e){return(0,l.contains)(e,".")||(0,l.contains)(e,"[")&&(0,l.contains)(e,"]")}e.extras.disableNgModelAttrsManipulator||e.templateManipulators.preWrapper.push(o)}r.$inject=["formlyConfig","$interpolate"],Object.defineProperty(t,"__esModule",{value:!0});var i=o(1),a=n(i),l=o(2);t["default"]=r,e.exports=t["default"]},function(e,t,o){"use strict";function n(e){return e&&e.__esModule?e:{"default":e}}function r(){return a["default"]}Object.defineProperty(t,"__esModule",{value:!0});var i=o(2),a=n(i);t["default"]=r,e.exports=t["default"]},function(e,t){"use strict";function o(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function n(e,t,n){return function(){if(!e.disableWarnings){var r=Array.prototype.slice.call(arguments),i=r.shift();r.unshift("Formly Warning:"),r.push(""+t+i),n.warn.apply(n,o(r))}}}n.$inject=["formlyConfig","formlyErrorAndWarningsUrlPrefix","$log"],Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,o){e.exports=t}])}); | ||
//# sourceMappingURL=formly.min.js.map |
@@ -8,3 +8,3 @@ /* global Package:false */ | ||
summary: 'angular-formly (official): forms for AngularJS', | ||
version: '8.3.0', | ||
version: '8.4.0', | ||
git: 'https://github.com/formly-js/angular-formly.git', | ||
@@ -11,0 +11,0 @@ }) |
{ | ||
"name": "angular-formly", | ||
"version": "8.3.0", | ||
"version": "8.4.0", | ||
"author": "Astrism <astrisms@gmail.com>", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
@@ -38,3 +38,3 @@ import angular from 'angular-fix' | ||
function FormlyFieldController($scope, $timeout, $parse, $controller, formlyValidationMessages) { | ||
/* eslint max-statements:[2, 34] */ | ||
/* eslint max-statements:[2, 37] */ | ||
if ($scope.options.fieldGroup) { | ||
@@ -113,2 +113,20 @@ setupFieldGroup() | ||
function keyContainsArrays(key) { | ||
return /\[\d{1,}\]/.test(key) | ||
} | ||
function deepAssign(obj, prop, value) { | ||
if (angular.isString(prop)) { | ||
prop = prop.replace(/\[(\w+)\]/g, '.$1').split('.') | ||
} | ||
if (prop.length > 1) { | ||
const e = prop.shift() | ||
obj[e] = obj[e] || (isNaN(prop[0])) ? {} : [] | ||
deepAssign(obj[e], prop, value) | ||
} else { | ||
obj[prop[0]] = value | ||
} | ||
} | ||
function parseSet(key, model, newVal) { | ||
@@ -123,2 +141,4 @@ // If either of these are null/undefined then just return undefined | ||
model[key] = newVal | ||
} else if (formlyConfig.extras.parseKeyArrays && keyContainsArrays(key)) { | ||
deepAssign($scope.model, key, newVal) | ||
} else { | ||
@@ -125,0 +145,0 @@ const setter = $parse($scope.options.key).assign |
@@ -169,2 +169,3 @@ import angular from 'angular-fix' | ||
removeChromeAutoComplete: apiCheck.bool.optional, | ||
parseKeyArrays: apiCheck.bool.optional, | ||
templateManipulators: templateManipulators.optional, | ||
@@ -171,0 +172,0 @@ manualModelWatcher: apiCheck.oneOfType([apiCheck.bool, apiCheck.func]).optional, |
@@ -31,2 +31,3 @@ import angular from 'angular-fix' | ||
removeChromeAutoComplete: false, | ||
parseKeyArrays: false, | ||
defaultHideDirective: 'ng-if', | ||
@@ -33,0 +34,0 @@ getFieldId: null, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
754479
9139