eventman/static/js/eda.dragdropway.min.js

6 lines
150 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
c}return c.resultFlag=!1,c.details="Can't retreive option from option index",c}return c.resultFlag=!0,c.details="",c}return c.resultFlag=!1,c.details="Option index not valid",c}},{key:"downthisOption",value:function(a,b){var c={resultFlag:!1,details:""};if(b>-1){if(b<a.rows.length-1){if(a.rows[b+1]){var d=a.rows[b];return a.rows.splice(b,1),a.rows.splice(b+1,0,d),c.resultFlag=!0,c.details="",c}return c.resultFlag=!1,c.details="Can't retreive option from option index",c}return c.resultFlag=!0,c.details="",c}return c.resultFlag=!1,c.details="Option index not valid",c}}]),a}(),f.$inject=[],a("default",f),a("LEFT_PANEL_SELECT_OPTION_MANAGE_SERVICE",e)}}}),a.register("f",["9","a"],function(a){var b,c,d,e,f;return{setters:[function(a){b=a["default"]},function(a){c=a["default"]}],execute:function(){"use strict";d="controllerModalProxy",e={rows:[]},f=function(){function a(b){c(this,a),this.EasyFormGenFormlyBindingModels=b,this.init()}return b(a,[{key:"init",value:function(){this.proxyModel={},this.resetProxyModel(),this.editPanelModel={toggle:!1,lineIndex:-1,columnIndex:-1,control:{}},this.basicSelectRowCollection=angular.copy(e),this.newOptionBasicSelect=angular.copy({saisie:""}),this.groupedSelectRowCollection=angular.copy(e),this.newOptionGroupedSelect=angular.copy({saisie:""}),this.GroupedSelectGroups=angular.copy({list:[]}),this.newGroupGroupedSelect=angular.copy({saisie:""}),this.groupSelectGroupClick=angular.copy({showList:!1}),this.radioRowCollection=angular.copy(e),this.newOptionRadio=angular.copy({saisie:""})}},{key:"initNyaSelect",value:function(a){return this.resetNyaSelect(a)}},{key:"initProxyModel",value:function(a){return this.resetProxyModel(a)}},{key:"resetNyaSelect",value:function(a){var b=this.EasyFormGenFormlyBindingModels.getEasyFormListControls();return angular.copy(b,a),!0}},{key:"resetProxyModel",value:function(){var a=this.EasyFormGenFormlyBindingModels.getEasyFormListControls();return this.proxyModel=angular.copy(a),!0}},{key:"returnControlFromAddCtrlModalModel",value:function(a){for(var b={selectedControl:"none",formlyType:"none",formlySubtype:"none",formlyLabel:"",formlyRequired:!1,formlyDesciption:"",formlyPlaceholder:"",formlyOptions:[]},c=a.controls.length-1;c>=0;c--)a.selectedControl===a.controls[c].id&&(b.selectedControl=a.selectedControl,b.formlyType=a.controls[c].formlyType,b.formlySubtype=a.controls[c].formlySubtype,b.formlyLabel=a.controls[c].formlyLabel,b.formlyRequired=a.controls[c].formlyRequired,b.formlyDesciption=a.controls[c].formlyDesciption,b.formlyPlaceholder=a.controls[c].formlyPlaceholder,b.formlyOptions=a.controls[c].formlyOptions,"datepicker"===a.controls[c].formlyType&&(b.datepickerPopup=a.controls[c].datepickerPopup));return b}},{key:"validKeyUniqueness",value:function(a,b){for(var c=!0,d=b.lines.length-1;d>=0;d--)for(var e=b.lines[d].columns.length-1;e>=0;e--)b.lines[d].columns[e].control.key===a&&(c=!1);return c}},{key:"getSelectedProxyModel",value:function(a){var b="none",c=angular.copy(this.EasyFormGenFormlyBindingModels.getEasyFormListControls().controls);return c.forEach(function(c){return c.formlyType===a.type&&c.formlySubtype===a.subtype?b=c.id:void 0}),b}},{key:"bindConfigurationModelFromProxyModel",value:function(a,b,c){var d=angular.copy(this.proxyModel.temporyConfig);c.lines[a].columns[b].control.selectedControl=d.selectedControl,c.lines[a].columns[b].control.type=d.formlyType,c.lines[a].columns[b].control.subtype=d.formlySubtype,c.lines[a].columns[b].control.templateOptions={label:"",required:!1,description:"",placeholder:"",options:[]},c.lines[a].columns[b].control.templateOptions.label=d.formlyLabel,c.lines[a].columns[b].control.templateOptions.required=d.formlyRequired,c.lines[a].columns[b].control.templateOptions.description=d.formlyDesciption,c.lines[a].columns[b].control.templateOptions.placeholder=d.formlyPlaceholder,c.lines[a].columns[b].control.templateOptions.options=d.formlyOptions,"datepicker"===c.lines[a].columns[b].control.type&&(c.lines[a].columns[b].control.templateOptions.datepickerPopup=d.datepickerPopup);var e=c.lines[a].columns[b].control.type+
d.define=e,c.exports}),a.register("21",["20"],function(a){"use strict";function b(){var a={restrict:"E",template:c};return a}var c,d;return{setters:[function(a){c=a["default"]}],execute:function(){d="leftPanelGroupedSelectControl",b.$inject=[],a("default",b),a("LEFT_PANEL_GROUPED_SELECT_CONTROL_DIRECTIVE",d)}}}),a.registerDynamic("22",[],!0,function(a,b,c){var d=this,e=d.define;return d.define=void 0,c.exports='<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-pencil-square-o"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class="marginTopFivepixels"></div>\n <label class="control-label greyText editPropertiesLabel">\n Date format :\n </label>\n <div class="">\n <ol\n class="nya-bs-select col-sm-12 col-xs-12 col-md-12 col-lg12"\n ng-model="leftPanelCtrl.proxyModel.temporyConfig.datepickerPopup"\n id="dateformatSelect">\n <li\n class="nya-bs-option"\n nya-bs-option="dateformat in leftPanelCtrl.demodt.formats"\n value="dateformat">\n <a>\n {{dateformat}}\n </a>\n </li>\n </ol>\n </div>\n <div class="marginTopFivepixels"></div>\n <div class="row">\n <div class="form-group">\n <div class="col-md-12">\n <label\n for="inputTextLabelUpdate"\n class=" control-label greyText editPropertiesLabel">\n Label text :\n </label>\n <div class="">\n <input\n type="text"\n class="form-control"\n ng-model="leftPanelCtrl.proxyModel.temporyConfig.formlyLabel"\n id="inputTextLabelUpdate"\n placeholder="Add / edit control label here">\n </div>\n </div>\n </div>\n </div>\n <div class="marginTopFivepixels"></div>\n <div class="row">\n <div class="form-group">\n <div class="">\n <label\n for="RequiredUpdate"\n class="col-md-4 control-label greyText editPropertiesLabel">\n Required :\n </label>\n <div class="col-md-8">\n <div class="checkboxCssCorrection">&nbsp;</div>\n <input\n type="checkbox"\n ng-model="leftPanelCtrl.proxyModel.temporyConfig.formlyRequired"\n id="RequiredUpdate">\n </div>\n </div>\n </div>\n </div>\n <div class="marginTopFivepixels"></div>\n <div class="row">\n <div class="form-group">\n <div class="col-md-12">\n <label\n for="DescriptionUpdate"\n class="control-label greyText editPropertiesLabel">\n Description :\n </label>\n <div class="">\n <input\n type="text"\n class="form-control"\n ng-model="leftPanelCtrl.proxyModel.temporyConfig.formlyDesciption"\n id="DescriptionUpdate"\n placeholder="Add / edit description here">\n </div>\n </div>\n </div>\n </div>\n </div>\n <left-panel-valid-edit-footer />\n</div>\n',d.define=e,c.exports}),a.register("23",["22"],function(a){"use strict";function b(){var a={restrict:"E",template:c};return a}var c,d;return{setters:[function(a){c=a["default"]}],execute:function(){d="leftPanelDateControl",b.$inject=[],a("default",b),a("LEFT_PANEL_DATE_CONTROL_DIRECTIVE",d)}}}),a.registerDynamic("24",[],!0,function(a,b,c){var d=this,e=d.define;return d.define=void 0,c.exports='<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-pencil-square-o"></i>\n &nbsp;\n Edit properties :\n </h5>\n </div>\n </div>\n <div class="marginTopFivepixels"></div>\n <div class="row">\n <div class="form-group">\n <div class="col-md-12">\n <label\n for="inputTextLabelUpdate"\n class=" control-label greyText
this.init()}return b(a,[{key:"init",value:function(){this._listItemClass=[].concat(this.easyFormDragWayConfig.getListItemCssClass())}},{key:"getListClass",value:function(){return this._listItemClass}},{key:"getCssClassWhenNumberItemsInRowIs",value:function(a){return this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(a)}},{key:"applyCssClassWholeLine",value:function(a,b,c,d,e){if("undefined"!=typeof d&&"undefined"!=typeof c&&"undefined"!=typeof b&&"undefined"!=typeof a&&"undefined"!=typeof e){if(b===e)for(var f=a[b][c].length-1;f>=0;f--)a[b][c][f].cssClass=this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(d);return!0}return!1}},{key:"updateCssClassWholeColumn",value:function(a,b){if("undefined"!=typeof b&&"undefined"!=typeof a){for(var c=a[b].length-1;c>=0;c--)for(var d=a[b][c].length-1;d>=0;d--)a[b][c][d].cssClass=this.easyFormDragWayConfig.getItemCssDependingNumberItemsInRow(a[b][c].length);return!0}return!1}}]),a}(),e.$inject=["easyFormDragWayConfig"],a("default",e),a("DRAG_DROP_ITEM_DECOR_SERVICE",d)}}}),a.registerDynamic("39",[],!0,function(a,b,c){var d=this,e=d.define;return d.define=void 0,c.exports='<div\n ng-class="{confirmLineDelete : deleteLine.readyToDelete}"\n ng-dblclick="removeMe($event);"\n ng-click="cancelDelete($event);">\n <button\n ng-show="deleteLine.readyToDelete === true"\n type="button"\n class="btn btn-danger pull-right buttonCloseLine" >\n <span\n class="glyphicon glyphicon-trash"\n aria-hidden="true">\n </span>\n </button>\n</div>\n<div id="lineDirectiveTranscludeHere"></div>\n',d.define=e,c.exports}),a.register("3a",["39"],function(a){"use strict";function b(a){function b(b,c,d,e,f){var g=b.verboseMode,h=b.currentIndex,i=b.parentIndex;b.deleteLine={},b.deleteLine.readyToDelete=!1,b.deleteLine.dblClickCount=0,b.isCollapsed=!1;var j=void 0;if(""!==g){var k=angular.lowercase(g);("true"===k||"1"===k)&&console.dir({whoAmI:"I am verbose from ddDecorLine directive link",verbodeMode:k,ParentParentIndex:b.$parent.$parent.$index,ParentIndex:i,currentIndex:h})}b.removeMe=function(c){c.preventDefault(),c.stopPropagation(),"1"===b.parentIndex&&(1===b.deleteLine.dblClickCount&&(b.deleteLine.dblClickCount=0,b.deleteLine.readyToDelete=!1,b.removeLine(),a.cancel(j)),0===b.deleteLine.dblClickCount&&(b.deleteLine.dblClickCount=b.deleteLine.dblClickCount+1,b.deleteLine.readyToDelete=!0))},b.cancelDelete=function(){j=a(function(){b.deleteLine.dblClickCount=0,b.deleteLine.readyToDelete=!1},500)},b.$on("$destroy",function(){return a.cancel(j)}),f(b.$parent,function(a){var b=angular.element(c.children()[0]);b.append(a)})}var d={restrict:"A",scope:{verboseMode:"@ddLineVerboseMode",currentIndex:"@ddLineCurrentIndex",parentIndex:"@ddLineParentIndex",removeLine:"&ddRemoveLine"},template:c,transclude:!0,link:b};return d}var c,d;return{setters:[function(a){c=a["default"]}],execute:function(){d="ddDecorLine",b.$inject=["$timeout"],a("default",b),a("DRAG_DROP_DECOR_LINE",d)}}}),a.register("3b",[],function(a){"use strict";function b(){function a(a,b){b.on("click",function(a){return a.preventDefault()})}var b={restrict:"A",link:a};return b}var c;return{setters:[],execute:function(){c="ddNoEditableControl",b.$inject=[],a("default",b),a("DRAG_DROP_NO_EDITABLE_CONTROL",c)}}}),a.register("3c",["30","32","33","35","37","38","2f","3a","3b"],function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;return{setters:[function(a){b=a["default"],c=a.DRAG_DROP_ITEM_COUNTER_SERVICE},function(a){d=a["default"],e=a.DD_DECOR_CONTAINER_DIRECTIVE},function(a){f=a["default"],g=a.DD_DECOR_CONTAINER_CONTROLLER_NAME},function(a){h=a["default"],i=a.DD_DECOR_DROPZONE_DIRECTIVE},function(a){j=a["default"],k=a.DRAG_DROP_DECOR_ITEM},function(a){l=a["default"],m=a.DRAG_DROP_ITEM_DECOR_SERVICE},function(a){n=a["default"],o=a.DD_CONTENT_COUNTER_DIRECTIVE},function(a){p=a["default"],q=a.DRAG_DROP_DECOR_LINE},function(a){r=a["default"],s=a.DRAG_DROP_NO_EDITABLE_CONTROL}],execute:function(){t="edaDragDropWay.dragdrop.module",a("default",angular.module(t,[]).directive(o,n).controller(g,f).directiv
d.define=e,c.exports}),a.registerDynamic("4a",[],!0,function(a,b,c){var d=this,e=d.define;d.define=void 0;var f=Object;return c.exports={create:f.create,getProto:f.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:f.getOwnPropertyDescriptor,setDesc:f.defineProperty,setDescs:f.defineProperties,getKeys:f.keys,getNames:f.getOwnPropertyNames,getSymbols:f.getOwnPropertySymbols,each:[].forEach},d.define=e,c.exports}),a.registerDynamic("4b",["4a"],!0,function(a,b,c){var d=this,e=d.define;d.define=void 0;var f=a("4a");return c.exports=function(a,b,c){return f.setDesc(a,b,c)},d.define=e,c.exports}),a.registerDynamic("4c",["4b"],!0,function(a,b,c){var d=this,e=d.define;return d.define=void 0,c.exports={"default":a("4b"),__esModule:!0},d.define=e,c.exports}),a.registerDynamic("9",["4c"],!0,function(a,b,c){"use strict";var d=this,e=d.define;d.define=void 0;var f=a("4c")["default"];return b["default"]=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),f(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),b.__esModule=!0,d.define=e,c.exports}),a.registerDynamic("a",[],!0,function(a,b,c){"use strict";var d=this,e=d.define;return d.define=void 0,b["default"]=function(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")},b.__esModule=!0,d.define=e,c.exports}),a.register("4d",[],function(a){"use strict";var b,c,d,e,f,g,h,i,j,k;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)},j={preview:{formlyModelViewExpanded:!0,formlyFieldsViewExpanded:!0,customizeFormButtonsExpanded:!0,saveThisFormExpanded:!0}},k=function(){return angular.copy(j)},a("initDebugModel",c),a("initTabModel",e),a("initColumnTemplate",g),a("initLineTemplate",i),a("initIhmModel",k)}}}),a.register("4e",["9","a","4d"],function(a){var b,c,d,e,f,g,h;return{setters:[function(a){b=a["default"]},function(a){c=a["default"]},function(a){d=a.initTabModel,e=a.initIhmModel}],execute:function(){"use strict";f="edaDragDropWayEasyFormGenCtrl",g="vm",h=function(){function a(b,d,e,f,g,h,i,j,k,l,m,n,o,p){c(this,a),this.$scope=b,this.easyFormGenVersion=d,this.$filter=e,this.$anchorScroll=f,this.toaster=g,this.$timeout=h,this.$modal=i,this.$log=j,this.formFieldManage=k,this.controllerModalProxy=l,this.dragDropItemDecorationService=m,this.ddModelConfModelProxyService=n,this.ddItemRightClickedManager=o,this.easyFormDragWayConfig=p,this.init()}return b(a,[{key:"init",value:function(){this.easyFormGeneratorVERSION=this.easyFormGenVersion,this.tab=d(this.easyFormDragWayConfig.isPreviewPanelVisible(),this.easyFormDragWayConfig.arePreviewModelsVisible()),this.returnSaveEvent=!1,this.dataModel={},this.wfFormFields=[],this.wfFormFieldsOnlyNeededProperties=[],this.ihm=e(),this.easyFormDragDropProperties=this.easyFormDragWayConfig.getDragDropConfigModel(),this.dragDropModel=[].concat(this.easyFormDragWayConfig.getDragDropPresentationModel()),this.numberOfColumns=1,this.MaxNumberOfColumns=3,this.MinNumberOfColumns=1,this.configuration={},this.animationsEnabled=this.easyFormDragWayConfig.getModalAnimationValue(),this.editPanelModel={toggle:!1},this.debugProxyModel=this.controllerModalProxy.ProxyModel,this.model=[],this.formFieldManage.initConfigurationEditFromScratch(this.configuration,!1),this.controllerModalProxy.initProxyModel()}},{key:"collapseAllGroupControl",value:function(a){var b=this;angular.forEach(this.easyFormDragDropProperties.containerConfig.decoration,function(c){c.WhenIndex!==a&&b.easyFormDragWayConfig.setDragDropConfigContainerDecorationCollapse(b.e
2016-06-18 20:01:17 +02:00
//# sourceMappingURL=eda.dragdropway.min.js.map