4 lines
40 KiB
JavaScript
4 lines
40 KiB
JavaScript
|
/*! angular-formly v8.0.4 | 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(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(9),i=o(r);t["default"]=i["default"],e.exports=t["default"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(18);o.version||(o=window.angular),t["default"]=o,e.exports=t["default"]},function(e,t,n){"use strict";function o(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?-1!==e.indexOf(t):!1}function a(e,t,n,o,r){return v["default"].isFunction(t)?t(o,n,e,r):e.$eval(t,v["default"].extend({$viewValue:o,$modelValue:n},r))}function l(e,t,n){if(t.id)return t.id;var o=t.type;return!o&&t.template?o="template":!o&&t.templateUrl&&(o="templateUrl"),[e,o,t.key,n].join("_")}function f(e){return v["default"].forEach(arguments,function(t,n){n&&v["default"].forEach(t,function(t,n){v["default"].isDefined(e[n])?s(e[n],t)&&f(e[n],t):e[n]=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 n=e.children(),o=0;n&&o<n.length;o++){var r=u(n[o],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),n=0;e>n;n++)t[n]=arguments[n];return function(){var e=arguments;t.forEach(function(t){return t.apply(null,e)})}}function c(e,t,n){return n&&(e=e[n],t=t[n]),t&&e?(v["default"].forEach(t,function(t){-1===e.indexOf(t)&&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:!1}function y(e,t){return v["default"].isString(e)&&v["default"].isString(t)?e.length>=t.length&&-1!==e.indexOf(t):!1}Object.defineProperty(t,"__esModule",{value:!0});var h=n(1),v=o(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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]="https://github.com/formly-js/angular-formly/blob/8.0.4/other/ERRORS_AND_WARNINGS.md#",e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){return{restrict:"A",require:"ngModel",link:function(t,n,o,r){function i(e,t,n){l(t,n),t=a["default"].isObject(t)?t.expression:t,p?f(t,n,e):s(t,n,e)}function l(n,o){var i=n.message;i&&(u.validation.messages[o]=function(){return e.formlyEval(t,i,r.$modelValue,r.$viewValue)})}function f(n,o,i){var a=i?"$asyncValidators":"$validators";r[a][o]=function(o,r){return e.formlyEval(t,n,o,r)}}function s(n,o,i){var a=void 0;r.$parsers.unshift(function(l){var f=e.formlyEval(t,n,r.$modelValue,l);return i?(r.$pending=r.$pending||{},r.$pending[o]=!0,a=f,f.then(function(){a===f&&r.$setValidity(o,!0)})["catch"](function(){a===f&&r.$setValidity(o,!1)})["finally"](function(){var e=r.$pending||{};1===Object.keys(e).length?delete r.$pending:delete r.$pending[o]})):r.$setValidity(o,f),l})}var u=t.options;u.validation.messages=u.validation.messages||{},a["default"].forEach(u.validation.messages,function(n,o){u.validation.messages[o]=function(){return e.formlyEval(t,n,r.$modelValue,r.$viewValue)}});var p=r.hasOwnProperty("$validators")&&!o.hasOwnProper
|
||
|
o;l["default"].isString(o)&&(e={template:o,name:r},t=void 0,n=!0)}}function h(e){return l["default"].isString(e.types)?[e.types]:l["default"].isDefined(e.types)?e.types:[]}function v(e,t){return e.name||t||e.types.join(" ")||j}function g(t){e.checkWrapper(t),t.template&&e.checkWrapperTemplate(t.template,t),t.overwriteOk?delete t.overwriteOk:O(t.name,C,t,"templateWrappers"),b(t)}function b(e){var t=!l["default"].isArray(e.types)||!e.types.every(l["default"].isString);if(t)throw F("Attempted to create a template wrapper with types that is not a string or an array of strings")}function O(e,t,n,o){t.hasOwnProperty(e)&&A("overwriting-types-or-wrappers",["Attempting to overwrite "+e+" on "+o+" which is currently",JSON.stringify(t[e])+" with "+JSON.stringify(n),'To supress this warning, specify the property "overwriteOk: true"'].join(" "))}function x(e){return C[e||j]}function E(e){var t=[];for(var n in C)C.hasOwnProperty(n)&&C[n].types&&-1!==C[n].types.indexOf(e)&&t.push(C[n]);return t}function w(e){var t=C[e];return delete C[e],t}function $(e){var t=E(e);return t?l["default"].isArray(t)?(t.forEach(function(e){return w(e.name)}),t):w(t.name):void 0}function A(){if(!T.disableWarnings&&console.warn){var e=Array.prototype.slice.call(arguments),n=e.shift();e.unshift("Formly Warning:"),e.push(""+t+n),console.warn.apply(console,r(e))}}var k=this,M={},C={},j="default",T=this,F=e.getFormlyError;l["default"].extend(this,{setType:o,getType:c,getTypeHeritage:m,setWrapper:y,getWrapper:x,getWrapperByType:E,removeWrapperByName:w,removeWrappersForType:$,disableWarnings:!1,extras:{disableNgModelAttrsManipulator:!1,fieldTransform:[],ngModelAttrsManipulatorPreferUnbound:!1,removeChromeAutoComplete:!1,defaultHideDirective:"ng-if",getFieldId:null},templateManipulators:{preWrapper:[],postWrapper:[]},$get:function(){return k}})}Object.defineProperty(t,"__esModule",{value:!0});var a=n(1),l=o(a),f=n(2),s=o(f);t["default"]=i,i.$inject=["formlyUsabilityProvider","formlyErrorAndWarningsUrlPrefix","formlyApiCheck"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(e,t,n){return arguments.length<3&&(n=t,t=e,e=null),new Error(r(e,t)+(" Field definition: "+a["default"].toJson(n)))}function o(e,t){return t||(t=e,e=null),new Error(r(e,t))}function r(e,n){var o="";return null!==e&&(o=""+t+e),"Formly Error: "+n+". "+o}function i(t){e["throw"](e.formlyWrapperType,t,{prefix:"formlyConfig.setWrapper",urlSuffix:"setwrapper-validation-failed"})}function l(e,t){var n="<formly-transclude></formly-transclude>";if(-1===e.indexOf(n))throw o('Template wrapper templates must use "'+n+'" 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:o,getFieldError:n,checkWrapper:i,checkWrapperTemplate:l,getErrorMessage:r,$get:function(){return f}})}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["formlyApiCheck","formlyErrorAndWarningsUrlPrefix"],e.exports=t["default"]},function(e,t){"use strict";function n(){function e(e,t,r,i,a){o.messages[e]=n(t,r,i,a)}function t(e,t){o.messages[e]=function(){return t}}function n(e,t,n,o){return function(r,i,a){return"undefined"!=typeof a.options.templateOptions[e]?t+" "+a.options.templateOptions[e]+" "+n:o}}var o={addTemplateOptionValueMessage:e,addStringMessage:t,messages:{}};return o}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e){e&&e.documentMode<9&&!function(){var t=e.get(0),n=["formly-field","formly-form"];a["default"].forEach(n,function(e){t.createElement(e)})}()}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=o(i);t["default"]=r,r.$inject=["$document"],e.exports=t["default"]},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){function n(e,n,r){function i(){(a["default"].isDefine
|
||
|
//# sourceMappingURL=formly.min.js.map
|