eventman/static/js/eda.easyFormViewer.min.js

6 lines
86 KiB
JavaScript
Raw Normal View History

2017-04-02 18:16:38 +02:00
!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";o(1),o(6),o(19)},function(e,t,o){"use strict";o(2),o(3),o(5)},function(e,t,o){
2017-04-02 16:28:59 +02:00
//! api-check version 7.5.5 built with ♥ by Kent C. Dodds <kent@doddsfamily.us> (http://kent.doddsfamily.us) (ó ì_í)=óò=(ì_í ò)
2017-04-02 18:16:38 +02:00
!function(t,o){e.exports=o()}(this,function(){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(1),i=n(r);t.default=i.default,e.exports=t.default},function(e,t,o){"use strict";function n(){function t(n,i,a){if(t.config.disabled||e.exports.globalConfig.disabled)return{apiTypes:{},argTypes:{},passed:!0,message:"",failed:!1};o(arguments),Array.isArray(n)?i=Array.prototype.slice.call(i):(n=[n],i=[i]);var l=s(n,i);l.length||(l=r(n,i));var p=u(n,i);return p.args=i,l.length?(p.message=t.getErrorMessage(n,i,l,a),p.failed=!0,p.passed=!1):(p.message="",p.failed=!1,p.passed=!0),p}function o(e){var o=e[0],n=e[1],i=Array.isArray(n)||n&&"object"==typeof n&&"number"==typeof n.length;if(Array.isArray(o)&&!i)throw new Error(a(o,[n],["If an array is provided for the api, an array must be provided for the args as well."],{prefix:"apiCheck"}));var l=r(k.checkApiCheckApi,e);if(l.length){var s=t.getErrorMessage(k.checkApiCheckApi,e,l,{prefix:"apiCheck"});t.handleErrorMessage(s,!0)}}function n(e){return function(o,n,r){var i=t(o,n,r);return t.handleErrorMessage(i.message,e),i}}function i(e,t){if(t&&e)throw new Error(e);e&&console.warn(e)}function a(e,o){function n(){var e=s.onlyPrefix;return e||(e=((p.prefix||"")+" "+(s.prefix||"")).trim()),e}function r(){var e=s.onlySuffix;return e||(e=((s.suffix||"")+" "+(p.suffix||"")).trim()),e}function i(){var e=s.url;return e||(e=p.docsBaseUrl&&s.urlSuffix&&(""+p.docsBaseUrl+s.urlSuffix).trim()),e}var a=arguments.length<=2||void 0===arguments[2]?[]:arguments[2],s=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],p=t.config.output||{},u=n(),c=r(),f=i(),d="apiCheck failed! "+a.join(", "),m="\n\n"+l(e,o);return(u+" "+d+" "+c+" "+(f||"")+m).trim()}function l(e,t){function o(e){m(e,function(t,n){p.indexOf(t)===-1&&(p.push(t),"object"==typeof t?o(e):"function"==typeof t&&(e[n]=t.displayName||t.name||"anonymous function"))})}function n(e){return e&&e.length?(e&&1===e.length&&(e=e[0]),f(e,null,2)):"nothing"}function r(){var e="\n",o=!0;t&&1===t.length&&(o="object"==typeof t[0]&&null!==t[0]&&!!Object.keys(t[0]).length);var n="type"+(o?"s":""),r=e+e;return"You passed:"+e+c+r+("With the "+n+":"+e+l+r)+("The API calls for:"+e+a)}var i=u(e,t),a=i.apiTypes,l=i.argTypes,s=Array.prototype.slice.call(t||[]),p=[];o(s);var c=n(s);return l=n(l),a=n(a),r()}function u(o,n){o=v(o),n=v(n);var r=o.map(function(o,r){var i=e.exports.globalConfig.hasOwnProperty("verbose");return g(o,{terse:i?!e.exports.globalConfig.verbose:!t.config.verbose,obj:n[r],addHelpers:!0})}),i=n.map(function(e){return p(e,[])});return{argTypes:i,apiTypes:r}}var c=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],y=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];w&&arguments.length&&w.throw(k.getApiCheckInstanceCheckers,arguments,{prefix:"creating an apiCheck instance"});var h={throw:n(!0),warn:n(!1),getErrorMessage:a,handleErrorMessage:i,config:{output:c.output||{prefix:"",suffix:"",docsBaseUrl:""},verbose:c.verbose||!1,disabled:c.disabled||!1},utils:d};m(h,function(e,o){return t[o]=e});var b=t.disabled||e.exports.globalConfig.disabled;return m(O.getCheckers(b),function(e,o){return t[o]=e}),m(y,function(e,o){return t[o]=e}),t}function r(e,t){for(var o=[],n=!1,r=0,i=0,l=void 0,s=void 0,p=void 0,u=void 0,c=void 0,f=void 0,d=void 0;(s=e[r++])&&i<t.length;)l=t[i++],c="Argument "+i+(s.isOptional?" (optional)":""),p=s(l,"value",c),f=y(p),u=r>=e.length,d=r>1&&e[r-1].isOptional,f&&u||f&&!u&&!s.isOptional&&!d?(n=!0,o.push(a(p,s,l))):f&&s.isOptional?i--:o.push(h(c)+" passed");return n?o:[]}function i(e,t,o){var n=O.shape({type:O.string,optional:O.bool}),r=O.func.withProperties({__apiCheckData:n}),a=O.shape({__apiCheckData:n}),l=O.oneOfType([r,a])(e,t,o);return y(l)?l:"function"==typeof e||e.hasOwnProperty(e.__apiCheckData.type)?void 0:x(t,o,i.type)}
return e.fc.$touched||a}return!1},function(t){e.options.validation.errorExistsAndShouldBeVisible=t,e.showError=t})}var p=i.noop,u=i.noop;if(!e.options.noFormControl){var c=i.element("<div>"+t+"</div>"),f=c[0].querySelector("[ng-model],[data-ng-model]");f&&f.getAttribute("name")&&o(f.getAttribute("name"))}}function h(){b&&b.link&&b.link.apply(k,x),e.options.link&&e.options.link.apply(k,x)}function g(o){return function(n){var r=t.when(n);return i.forEach(o,function(o){r=r.then(function(n){return t.when(o(n,e.options,e)).then(function(e){return i.isString(e)?e:d(e)})})}),r}}if(e.options.fieldGroup)return void a();l(),p();var b=m(e.options),x=arguments,k=this;y(e.options).then(g(r.templateManipulators.preWrapper)).then(v(e.options)).then(g(r.templateManipulators.postWrapper)).then(c).then(f).then(h).catch(function(t){u("there-was-a-problem-setting-the-template-for-this-field","There was a problem setting the template for this field ",e.options,t)})}function d(e){var t=i.element("<a></a>");return t.append(e).html()}function m(e){return e.type&&r.getType(e.type)}function y(e){function t(t,o){return i.isDefined(e[t])?e[t]:o&&i.isDefined(o[t])?o[t]:void 0}var o=r.getType(e.type,!0,e),n=t("template",o),a=t("templateUrl",o);if(i.isUndefined(n)&&!a)throw p.getFieldError("type-type-has-no-template","Type '"+e.type+"' has not template. On element:",e);return h(a||n,i.isUndefined(n),e)}function h(o,r,a){var l=void 0;if(l=i.isFunction(o)?t.when(o(a)):t.when(o),!r)return l;var s=function(){var t={cache:n};return{v:l.then(function(o){return e.get(o,t)}).then(function(e){return e.data}).catch(function(e){u("problem-loading-template-for-templateurl","Problem loading template for "+o,e)})}}();return"object"==typeof s?s.v:void 0}function v(e){var o=b(e);return function(n){if(!o.length)return t.when(n);o.forEach(function(t){p.checkWrapper(t,e),t.validateOptions&&t.validateOptions(e),k(t,e)});var r=o.map(function(e){return h(e.template||e.templateUrl,!e.template)});return t.all(r).then(function(e){e.forEach(function(e,t){p.checkWrapperTemplate(e,o[t])}),e.reverse();var t=e.shift();return e.forEach(function(e){t=g(t,e)}),g(t,n)})}}function g(e,t){var o=i.element("<a></a>");o.append(e);var n=o.find("formly-transclude");return n.length||(n=s.findByNodeName(o,"formly-transclude")),n.replaceWith(t),o.html()}function b(e){var t=e.wrapper;if(null===t)return[];t=t?w(t).map(r.getWrapper):w(r.getWrapperByType(e.type));var o=r.getType(e.type,!0,e);if(o&&o.wrapper){var n=w(o.wrapper).map(r.getWrapper);t=t.concat(n)}var i=r.getWrapper();return i&&t.push(i),t}function x(e){l.throw(l.formlyFieldOptions,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"});var t=e.type&&r.getType(e.type);t&&(t.validateOptions&&t.validateOptions(e),k(t,e))}function O(e){l.throw(l.fieldGroup,e,{prefix:"formly-field directive",url:"formly-field-directive-validation-failed"})}function k(e,t){var o=e.apiCheck,n=e.apiCheckInstance,r=e.apiCheckFunction,i=e.apiCheckOptions;if(o){var a=n||l,s=r||"warn",p=a.shape(o);a[s](p,t,i||{prefix:"formly-field "+name,url:l.config.output.docsBaseUrl+"formly-field-type-apicheck-failed"})}}var w=s.arrayify;return c.$inject=["$scope","$timeout","$parse","$controller"],{restrict:"AE",transclude:!0,scope:{options:"=",model:"=",formId:"@",index:"=?",fields:"=?",formState:"=?",form:"=?"},controller:c,link:f}}var r=function(e){return e&&e.__esModule?e.default:e},i=r(o(15));e.exports=n,n.$inject=["$http","$q","$compile","$templateCache","formlyConfig","formlyValidationMessages","formlyApiCheck","formlyUtil","formlyUsability","formlyWarn"]},function(e,t,o){"use strict";function n(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())})}}}e.exports=n,n.$inject=["$timeout","$document"]},function(e,t,o){"use strict";function n(e,t,o,n){var r=1;return{restrict:"E",template:function(t,o){function i(){return o.rootEl||"ng-form"}
if(o.to.required)return r}}}},{id:"Date",name:"Date",subtitle:"Date",group:"input",formlyType:"datepicker",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],datepickerOptions:{format:"dd-MMMM-yyyy"},formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this Date field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}},{id:"Texarea",name:"Textarea",subtitle:"Textarea",group:"Textarea",formlyType:"textarea",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this Textarea field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}},{id:"RichTextEditor",name:"RichTextEditor",subtitle:"RichTextEditor",group:"Textarea",formlyType:"richEditor",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this RichTextEditor field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}},{id:"Radio",name:"Radio",subtitle:"Radio",options:[],group:"Radio",formlyType:"radio",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this Password field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}},{id:"Checkbox",name:"Checkbox",subtitle:"Checkbox",group:"Checkbox",formlyType:"checkbox",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this Checkbox field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}},{id:"BasicSelect",name:"Basic select",subtitle:"Basic select",options:[],group:"Select",formlyType:"basicSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this Basic select field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}},{id:"GroupedSelect",name:"Grouped Select",subtitle:"Grouped Select",options:[],group:"Select",formlyType:"groupedSelect",formlySubtype:"",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{messages:{required:function(e,t,o){var n="this Grouped Select field is required",r="undefined"!=typeof o.to.label&&""!==o.to.label?o.to.label+" is required":n;return r}}}}],selectedControl:"none",temporyConfig:{selectedControl:"none",formlyLabel:"label",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[],formlyExpressionProperties:{},formlyValidators:{},formlyValidation:{}}};return angular.copy(t,e),!0},n=function(){var e={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[{line:1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]}]};return e},r=function(){var e={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]};return angular.copy(e)},i=function(e){var t={};return angular.copy(t,e),!0},a=function(e,t){var o={noError:!1,title:"",Message:""};return o.noError=!1,o.title=e,o.Message=t,o},l=function(e,t){var o={noError:!1,title:"",Message:""};return o.noError=!0,o.title=e,o.Message=t,o},s=function(e){var t=[];angular.copy(t,e)},p=function(e){re
2016-06-18 20:01:17 +02:00
//# sourceMappingURL=eda.easyFormViewer.min.js.map