eventman/static/js/eda.stepway.min.js

5 lines
181 KiB
JavaScript
Raw Normal View History

2016-06-19 15:06:50 +02:00
!function(a){function b(a,b,e){return 4===arguments.length?c.apply(this,arguments):void d(a,{declarative:!0,deps:b,declare:e})}function c(a,b,c,e){d(a,{declarative:!1,deps:b,executingRequire:c,execute:e})}function d(a,b){b.name=a,a in n||(n[a]=b),b.normalizedDeps=b.deps}function e(a,b){if(b[a.groupIndex]=b[a.groupIndex]||[],-1==o.call(b[a.groupIndex],a)){b[a.groupIndex].push(a);for(var c=0,d=a.normalizedDeps.length;d>c;c++){var f=a.normalizedDeps[c],g=n[f];if(g&&!g.evaluated){var h=a.groupIndex+(g.declarative!=a.declarative);if(void 0===g.groupIndex||g.groupIndex<h){if(void 0!==g.groupIndex&&(b[g.groupIndex].splice(o.call(b[g.groupIndex],g),1),0==b[g.groupIndex].length))throw new TypeError("Mixed dependency cycle detected");g.groupIndex=h}e(g,b)}}}}function f(a){var b=n[a];b.groupIndex=0;var c=[];e(b,c);for(var d=!!b.declarative==c.length%2,f=c.length-1;f>=0;f--){for(var g=c[f],i=0;i<g.length;i++){var k=g[i];d?h(k):j(k)}d=!d}}function g(a){return s[a]||(s[a]={name:a,dependencies:[],exports:{},importers:[]})}function h(b){if(!b.module){var c=b.module=g(b.name),d=b.module.exports,e=b.declare.call(a,function(a,b){if(c.locked=!0,"object"==typeof a)for(var e in a)d[e]=a[e];else d[a]=b;for(var f=0,g=c.importers.length;g>f;f++){var h=c.importers[f];if(!h.locked)for(var i=0;i<h.dependencies.length;++i)h.dependencies[i]===c&&h.setters[i](d)}return c.locked=!1,b},b.name);c.setters=e.setters,c.execute=e.execute;for(var f=0,i=b.normalizedDeps.length;i>f;f++){var j,k=b.normalizedDeps[f],l=n[k],o=s[k];o?j=o.exports:l&&!l.declarative?j=l.esModule:l?(h(l),o=l.module,j=o.exports):j=m(k),o&&o.importers?(o.importers.push(c),c.dependencies.push(o)):c.dependencies.push(null),c.setters[f]&&c.setters[f](j)}}}function i(a){var b,c=n[a];if(c)c.declarative?l(a,[]):c.evaluated||j(c),b=c.module.exports;else if(b=m(a),!b)throw new Error("Unable to load dependency "+a+".");return(!c||c.declarative)&&b&&b.__useDefault?b["default"]:b}function j(b){if(!b.module){var c={},d=b.module={exports:c,id:b.name};if(!b.executingRequire)for(var e=0,f=b.normalizedDeps.length;f>e;e++){var g=b.normalizedDeps[e],h=n[g];h&&j(h)}b.evaluated=!0;var l=b.execute.call(a,function(a){for(var c=0,d=b.deps.length;d>c;c++)if(b.deps[c]==a)return i(b.normalizedDeps[c]);throw new TypeError("Module "+a+" not declared as a dependency.")},c,d);l&&(d.exports=l),c=d.exports,c&&c.__esModule?b.esModule=c:b.esModule=k(c)}}function k(b){if(b===a)return b;var c={};if("object"==typeof b||"function"==typeof b)if(p){var d;for(var e in b)(d=Object.getOwnPropertyDescriptor(b,e))&&r(c,e,d)}else{var f=b&&b.hasOwnProperty;for(var e in b)(!f||b.hasOwnProperty(e))&&(c[e]=b[e])}return c["default"]=b,r(c,"__useDefault",{value:!0}),c}function l(b,c){var d=n[b];if(d&&!d.evaluated&&d.declarative){c.push(b);for(var e=0,f=d.normalizedDeps.length;f>e;e++){var g=d.normalizedDeps[e];-1==o.call(c,g)&&(n[g]?l(g,c):m(g))}d.evaluated||(d.evaluated=!0,d.module.execute.call(a))}}function m(a){if(u[a])return u[a];if("@node/"==a.substr(0,6))return t(a.substr(6));var b=n[a];if(!b)throw"Module "+a+" not present.";return f(a),l(a,[]),n[a]=void 0,b.declarative&&r(b.module.exports,"__esModule",{value:!0}),u[a]=b.declarative?b.module.exports:b.esModule}var n={},o=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},p=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(q){p=!1}var r;!function(){try{Object.defineProperty({},"a",{})&&(r=Object.defineProperty)}catch(a){r=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(d){}}}}();var s={},t="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&require.resolve&&"undefined"!=typeof process&&require,u={"@empty":{}};return function(a,d,e){return function(f){f(function(f){for(var g={_nodeRequire:t,register:b,registerDynamic:c,get:m,set:function(a,b){u[a]=b},newModule:function(a){return a}},h=0;h<d.length;h++)(function(a,b){b&&b.__esModule?u[a]=b:u[a]=k(b)})(d[h],arguments[h]);e(g);var i=m(a[0]);if(a.length>1)for(var h=1;h<a.length;h++)m(a[h]);return i.__useDefault?i["default"]:i})}}}("undefined"!=typ
d.define=e,c.exports}),a.register("11",[],function(a){"use strict";var b,c,d,e,f,g,h,i;return{setters:[],execute:function(){b={showDebug:!1,configurationModelNumberofLines:1},c=function(){return angular.copy(b)},d={editTab:{active:!0},previewTab:{active:!1,tabVisible:!0,modelsVisible:!0}},e=function(a,b){var c=angular.copy(d);return angular.extend(c.previewTab,{tabVisible:a,modelsVisible:b}),c},f={numColumn:-1,exist:!0,control:{type:"none",key:"none",subtype:"none"}},g=function(){return angular.copy(f)},h={line:-1,activeColumn:1,columns:[{numColumn:1,exist:!0,control:{type:"none",key:"none"}}]},i=function(){return angular.copy(h)},a("initDebugModel",c),a("initTabModel",e),a("initColumnTemplate",g),a("initLineTemplate",i)}}}),a.registerDynamic("12",[],!0,function(a,b,c){var d=this,e=d.define;return d.define=void 0,c.exports='<div class="modal-header">\n <h3 class="modal-title greyText">\n {{\'SELECT_A_CTRL\' | translate}}\n </h3>\n</div>\n<div class="modal-body">\n <hr/>\n <div class="row">\n <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">\n <h5 class="greyText">\n <i class="fa fa-filter"></i>\n &nbsp; \n {{\'SELECT_CTRL_IN_LIST\' | translate}} :\n </h5>\n </div>\n <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">\n <ol \n class="nya-bs-select col-xs-12 col-sm-12 col-md-12 col-lg-12" \n ng-model="editControlModCtrl.modelNyaSelect" \n data-live-search="false">\n <li nya-bs-option="option in editControlModCtrl.nyaSelectFiltered.controls group by option.group">\n <span class="dropdown-header greyText">{{$group}}</span> <!-- group header cannot be searched -->\n <a ng-click="editControlModCtrl.selectThisControl(option.id)">\n <span>\n {{ option.name }}\n </span> \n <span class="glyphicon glyphicon-ok check-mark"></span>\n </a>\n </li>\n </ol>\n </div>\n </div>\n <hr/>\n <div ng-switch on="editControlModCtrl.nyaSelect.selectedControl">\n <!--no control selected-->\n <div ng-switch-when="none">\n <div class="row">\n <div class="col-sm-12">\n <h5 class="text-center texteRouge"> \n <i class="fa fa-arrow-up"></i>\n &nbsp; {{\'SELECT_A_CTRL\' | translate}}\n </h5>\n </div> \n </div>\n </div>\n <!--empty (or blank) control -->\n <div ng-switch-when="empty">\n <div class="panel panel-default">\n <div class="panel-body">\n <div class="row">\n <div class="col-md-12">\n <h5 class="greyText">\n <i class="fa fa-eye"></i>\n &nbsp; \n {{\'PREVIEW_TAB\' | translate}} :\n </h5>\n </div>\n </div> \n <hr/>\n <div class="row">\n <div class="col-sm-12">\n <h5 class="text-center greyText">\n {{\'COL_WILL_BE_BLANK\' | translate}}\n </h5>\n </div> \n </div>\n </div>\n </div>\n </div> \n <!--header-->\n <div ng-switch-when="Header">\n <div class="panel panel-default">\n <div class="panel-body">\n <div class="row">\n <div class="col-md-12">\n <h5 class="greyText"><i class="fa fa-eye"></i>\n &nbsp; \n {{\'PREVIEW_TAB\' | translate}} :\n </h5>\n </div>\n </div> \n <hr/>\n <div class="row">\n <div class="col-md-12">\n <div class="form-group"> \n <div class="">\n <h2 class="text-center">\n {{editControlModCtrl.nyaSelect.temporyConfig.formlyDesciption}}\n </h2>\n <hr/>\n </div>\n </div>\n </div> \n </div> \n </div>\n </div>\n <div class="panel panel-default">\n <div class="panel-body">\n
d.define=e,c.exports}),a.register("13",["11","12","14","15","16"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;return{setters:[function(a){b=a.initDebugModel,c=a.initTabModel,d=a.initColumnTemplate,e=a.initLineTemplate},function(a){f=a["default"]},function(a){g=a.EDIT_MODAL_CONTROLLER_NAME,h=a.EDIT_MODAL_CONTROLLERAS_NAME},function(a){i=a["default"]},function(a){j=a["default"]}],execute:function(){"use strict";k="edaStepWayEasyFormGenController",l="vm",m=function(){function a(b,c,d,e,f,g,h,i,k){j(this,a),this.easyFormGenVersion=b,this.$filter=c,this.toaster=d,this.$timeout=e,this.$modal=f,this.$log=g,this.$formlyProxy=h,this.$modalProxy=i,this.easyFormSteWayConfig=k,this.init()}return i(a,[{key:"init",value:function(){this.dataModel={},this.wfFormFields=[],this.wfFormFieldsOnlyNeededProperties=[],this.easyFormGeneratorVERSION=this.easyFormGenVersion,this.debug=b(),this.tab=c(this.easyFormSteWayConfig.isPreviewPanelVisible(),this.easyFormSteWayConfig.arePreviewModelsVisible()),this.configuration={},this.numberOfColumns=1,this.MaxNumberOfColumns=3,this.MinNumberOfColumns=1,this.columnTemplate=d(),this.lineTemplate=e(),this.nyaSelect={},this.animationsEnabled=this.easyFormSteWayConfig.getModalAnimationValue(),this.editControlModalSize="lg",this.formlyList={},this.previewLoadedForm={fieldsModel:[]},this.configurationLoaded={},this.returnSaveEvent=!1,this.$formlyProxy.initConfigurationEditFromScratch(this.configuration),this.$modalProxy.initNyaSelect(this.nyaSelect)}},{key:"onSubmit",value:function(){var a=this.$filter("json")(this.dataModel,4);this.toaster.pop({type:"info",timeout:2e3,title:"it should save data model if it were not in editor",body:"data : "+a,showCloseButton:!0})}},{key:"countConfigurationModelLines",value:function(){return this.debug.configurationModelNumberofLines=this.configuration.lines.length,this.configuration.lines.length}},{key:"setActiveLineNumber",value:function(a){a<=this.countConfigurationModelLines()&&(this.configuration.activeLine=a)}},{key:"upThisLine",value:function(a){if(a>-1&&this.configuration.lines[a-1]){var b=this.configuration.lines[a];this.configuration.lines.splice(a,1),this.configuration.lines.splice(a-1,0,b),this.configuration.activeLine=1}this.$formlyProxy.applyConfigurationToformlyModel(this.configuration,this.wfFormFields,this.dataModel),this.wfFormFieldsOnlyNeededProperties=angular.copy(this.wfFormFields)}},{key:"downThisLine",value:function(a){if(a>-1&&this.configuration.lines[a+1]){var b=this.configuration.lines[a];this.configuration.lines.splice(a,1),this.configuration.lines.splice(a+1,0,b),this.configuration.activeLine=1}this.$formlyProxy.applyConfigurationToformlyModel(this.configuration,this.wfFormFields,this.dataModel),this.wfFormFieldsOnlyNeededProperties=angular.copy(this.wfFormFields)}},{key:"addNewline",value:function(){this.configuration.lines.push(e()),this.$formlyProxy.applyConfigurationToformlyModel(this.configuration,this.wfFormFields,this.dataModel),this.wfFormFieldsOnlyNeededProperties=angular.copy(this.wfFormFields)}},{key:"removeThisLine",value:function(a){a>-1&&(this.configuration.lines.length>1?(this.configuration.activeLine===a+1&&(this.configuration.activeLine=1),this.configuration.lines.splice(a,1)):this.$timeout(function(){this.toaster.pop({type:"warning",title:"Last line",body:"Can't delete the last line",showCloseButton:!0})},100),this.$formlyProxy.applyConfigurationToformlyModel(this.configuration,this.wfFormFields,this.dataModel),this.wfFormFieldsOnlyNeededProperties=angular.copy(this.wfFormFields))}},{key:"increaseNumberOfColumns",value:function(){var a=this.configuration.activeLine-1;if(this.configuration.lines[a].columns.length<this.MaxNumberOfColumns){var b=this.configuration.lines[a].columns.push(angular.copy(d()));this.configuration.lines[a].columns[b-1].numColumn=b}this.$formlyProxy.applyConfigurationToformlyModel(this.configuration,this.wfFormFields,this.dataModel),this.wfFormFieldsOnlyNeededProperties=angular.copy(this.wfFormFields)}},{key:"decreaseNumberOfColumns",value:function(){this.configuration.lines[this.configuration.activeLine-1].col
d.lines[a].columns[b].control.formlyExpressionProperties=angular.copy(g.formlyExpressionProperties),d.lines[a].columns[b].control.formlyValidators=angular.copy(g.formlyValidators),d.lines[a].columns[b].control.formlyValidation=angular.copy(g.formlyValidation),"datepicker"===d.lines[a].columns[b].control.type&&(d.lines[a].columns[b].control.templateOptions.datepickerPopup=g.datepickerPopup);var h=d.lines[a].columns[b].control.type+"-"+Date.now();f(h,d)===!0?d.lines[a].columns[b].control.key=h:(h=d.lines[a].columns[b].control.type+"-"+Date.now(),f(h,d)===!0?d.lines[a].columns[b].control.key=h:h=d.lines[a].columns[b].control.type+"-"+Date.now()),d.lines[a].columns[b].control.edited=!0}},{key:"applyConfigToSelectedControl",value:function(a){for(var b=a.controls.length-1;b>=0;b--)a.controls[b].id===a.selectedControl&&(a.controls[b].formlyLabel=a.temporyConfig.formlyLabel,a.controls[b].formlyRequired=a.temporyConfig.formlyRequired,a.controls[b].formlyDesciption=a.temporyConfig.formlyDesciption,a.controls[b].formlyPlaceholder=a.temporyConfig.formlyPlaceholder,a.controls[b].formlyOptions=a.temporyConfig.formlyOptions,"Date"===a.controls[b].id&&(a.controls[b].datepickerPopup=a.temporyConfig.datepickerPopup))}},{key:"resetTemporyConfig",value:function(){return g()}},{key:"refreshControlFormlyExpressionProperties",value:function(a){var b=this;angular.isObject(a)&&angular.forEach(a.lines,function(a,c){angular.forEach(a.columns,function(a,c){var d=b.getControlsDefinition();angular.forEach(d.controls,function(b,c){a.control.type===b.formlyType&&a.control.subtype===b.formlySubtype&&(a.control.formlyExpressionProperties=b.formlyExpressionProperties)})})})}},{key:"refreshControlFormlyValidators",value:function(a){var b=this;angular.isObject(a)&&angular.forEach(a.lines,function(a,c){angular.forEach(a.columns,function(a,c){var d=b.getControlsDefinition();angular.forEach(d.controls,function(b,c){a.control.type===b.formlyType&&a.control.subtype===b.formlySubtype&&(a.control.formlyValidators=b.formlyValidators)})})})}},{key:"refreshControlFormlyValidation",value:function(a){var b=this;angular.isObject(a)&&angular.forEach(a.lines,function(a,c){angular.forEach(a.columns,function(a,c){var d=b.getControlsDefinition();angular.forEach(d.controls,function(b,c){a.control.type===b.formlyType&&a.control.subtype===b.formlySubtype&&(a.control.formlyValidation=b.formlyValidation)})})})}},{key:"filterDisabledControl",value:function(a){var b=this.easyFormSteWayConfig.getListEnabledControl(),c=[];return angular.forEach(b,function(b){angular.forEach(a.controls,function(a){a.id===b.name&&b.enabled===!0&&(c=c.concat(a))})}),c}},{key:"getFilteredNyaSelectObject",value:function(){var a={};return d(a),angular.copy(this.filterDisabledControl(angular.copy(a)))}}]),a}(),i.$inject=["easyFormSteWayConfig"],a("default",i),a("CONTROLLER_MODAL_PROXY_SERVICE",h)}}}),a.register("1d",["1c"],function(a){"use strict";var b,c,d;return{setters:[function(a){b=a["default"],c=a.CONTROLLER_MODAL_PROXY_SERVICE}],execute:function(){d="modalProxyModule",a("default",angular.module(d,[]).service(c,b))}}}),a.register("1e",[],function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;return{setters:[],execute:function(){b={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"}}]}]},c={activeLine:1,listConfigStep:["init","first","second","third"],stepIndicators:[!0,!1,!1,!1],configStepCounter:0,submitButtonText:"submit",cancelButtonText:"cancel",lines:[]},d=function(a){return"undefined"!=typeof a.templateOptions?!0:!1},e=function(a){return"undefined"!=typeof a.templateOptions&&"undefined"!=typeof a.templateOptions.label?a.templateOptions.label:""},f=function(a){return"undefined"!=typeof a.templateOptions&&"undefined"!=typeof a.templateOptions.datepickerPopup?a.templateOptions.datepickerPopup:""},g=function(a){return"undefined"!=typeof a.formlyExpressionProperties?angular.copy(a.for
//# sourceMappingURL=eda.stepway.min.js.map