@wavemaker/app-runtime-wm-build 11.4.0-next.24680 → 11.4.0-next.24684
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -23335,23 +23335,23 @@
|
|
|
23335
23335
|
};
|
|
23336
23336
|
TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
|
|
23337
23337
|
var treeObj = $.fn.zTree.getZTreeObj("" + this.name);
|
|
23338
|
-
|
|
23339
|
-
|
|
23340
|
-
|
|
23341
|
-
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
|
|
23345
|
-
$path: path
|
|
23346
|
-
};
|
|
23347
|
-
this.invokeEventCallback("select", eventParams);
|
|
23348
|
-
if (treeNode.open) {} else {
|
|
23349
|
-
this.invokeEventCallback("collapse", eventParams);
|
|
23350
|
-
}
|
|
23351
|
-
}
|
|
23338
|
+
var path = this.getPath(treeNode, "");
|
|
23339
|
+
var eventParams = {
|
|
23340
|
+
$event: event,
|
|
23341
|
+
$item: treeNode,
|
|
23342
|
+
$path: path
|
|
23343
|
+
};
|
|
23344
|
+
this.invokeEventCallback("select", eventParams);
|
|
23352
23345
|
};
|
|
23353
23346
|
TreeComponent.prototype.onExpand = function(event, treeId, treeNode) {
|
|
23354
23347
|
var self = this;
|
|
23348
|
+
var path = this.getPath(treeNode, "");
|
|
23349
|
+
var eventParams = {
|
|
23350
|
+
$event: event,
|
|
23351
|
+
$item: treeNode,
|
|
23352
|
+
$path: path
|
|
23353
|
+
};
|
|
23354
|
+
this.invokeEventCallback("expand", eventParams);
|
|
23355
23355
|
treeNode.children ? treeNode.children.map((function(el) {
|
|
23356
23356
|
if (el.isParent) {
|
|
23357
23357
|
var ele_1 = $("#" + el.tId + "_switch");
|
|
@@ -23364,6 +23364,15 @@
|
|
|
23364
23364
|
}
|
|
23365
23365
|
})) : "";
|
|
23366
23366
|
};
|
|
23367
|
+
TreeComponent.prototype.onCollapse = function(event, treeId, treeNode) {
|
|
23368
|
+
var path = this.getPath(treeNode, "");
|
|
23369
|
+
var eventParams = {
|
|
23370
|
+
$event: event,
|
|
23371
|
+
$item: treeNode,
|
|
23372
|
+
$path: path
|
|
23373
|
+
};
|
|
23374
|
+
this.invokeEventCallback("collapse", eventParams);
|
|
23375
|
+
};
|
|
23367
23376
|
TreeComponent.prototype.modifyObjects = function(array) {
|
|
23368
23377
|
var _this = this;
|
|
23369
23378
|
array.forEach((function(obj) {
|
|
@@ -23427,6 +23436,7 @@
|
|
|
23427
23436
|
return count;
|
|
23428
23437
|
};
|
|
23429
23438
|
TreeComponent.prototype.renderTree = function() {
|
|
23439
|
+
console.log(this.nodes, "this.nodes");
|
|
23430
23440
|
if (this.nodes) {
|
|
23431
23441
|
this.nativeElement.setAttribute("id", this.name);
|
|
23432
23442
|
this.nodes = this.modifyObjects(this.nodes);
|
|
@@ -23455,6 +23465,7 @@
|
|
|
23455
23465
|
this.setting.view["nodeClasses"] = this.setNodeclasses;
|
|
23456
23466
|
this.setting.callback["onClick"] = this.onClick.bind(this);
|
|
23457
23467
|
this.setting.callback["onExpand"] = this.onExpand.bind(this);
|
|
23468
|
+
this.setting.callback["onCollapse"] = this.onCollapse.bind(this);
|
|
23458
23469
|
var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
|
|
23459
23470
|
$.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
|
|
23460
23471
|
};
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
125
125
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
126
126
|
PERFORMANCE OF THIS SOFTWARE.
|
|
127
|
-
***************************************************************************** */var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function a(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function s(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var l=function(){i.register("wm-tree",new Map([["class",i.PROP_STRING],["dataset",Object.assign({value:"node1, node2, node3"},i.PROP_ANY)],["datavalue",i.PROP_STRING],["levels",Object.assign({value:0},i.PROP_NUMBER)],["name",i.PROP_STRING],["nodeaction",i.PROP_STRING],["nodechildren",i.PROP_STRING],["nodeclick",Object.assign({value:"none"},i.PROP_STRING)],["nodeicon",i.PROP_STRING],["nodeid",i.PROP_STRING],["nodelabel",i.PROP_STRING],["orderby",i.PROP_STRING],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["treeicons",i.PROP_STRING]]))},c={widgetType:"wm-tree",hostClass:"app-tree"},p="plus-minus",d=function(e){function t(t){var n=e.call(this,t,c)||this;return n.setting={data:{simpleData:{enable:!0}},view:{dblClickExpand:!1,fontCss:{"font-awesome":!0},switchIcon:{}},check:{},callback:{}},i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.CONTAINER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":this.nodes=this.getNodes(n),this.level>0&&this.expandTree(this.level,this.nodes,0),this.renderTree();break;case"levels":n>0&&(this.level=n);break;case"treeicons":this.treeicon=n;break;case"nodelabel":this.nodelabel=n;break;case"icon":this.nodeicon=n;case"orderby":this.renderTree();break;case"class":this.treeClass=n;break;default:e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.expandTree=function(e,t,n){var i=this;t.map((function(t){"children"in t&&!("open"in t)&&n<e?(t.open=!0,i.expandTree(e,t.children,n+1)):n=0}))},t.prototype.setTreeTemplate=function(e){"Classic"===e?this.setting.check.enable=!1:"Checkbox"===e?(this.setting.check.enable=!0,this.setting.check.chkStyle="checkbox"):"Radio"===e&&(this.setting.check.enable=!0,this.setting.check.chkStyle="radio",this.setting.check.radioType="all")},t.prototype.getNodesFromString=function(e){return e.split(",").map((function(e){return{name:e&&e.trim()}}))},t.prototype.getNodes=function(e){var t;return _.isArray(e)?t=i.getOrderedDataset(e,this.orderby):_.isObject(e)?t=[e]:_.isString(e)&&!_.isEmpty(e)&&(e=e.trim())&&(t=this.getNodesFromString(e)),t},t.prototype.setNodeclasses=function(e,t){return t.icon?{add:[""+t.icon]}:""},t.prototype.setNodeData=function(e,t,n,i,o){var a=this;0===t?e.map((function(e){if(e.children&&a.setNodeData(e.children,t,n,i,o),e.icon&&"icon"==a.nodelabel)e[o]=e.icon;else{if(!e.name||"name"!=a.nodelabel)return;e[o]=e.name}})):e.map((function(e){return e.children&&n>1&&(t===n&&(i=e),a.setNodeData(e.children,t,n-1,i,o)),1===n&&("name"===o?a.nodelabel.includes("label")||a.nodelabel.includes("name"):a.nodeicon.includes("label")||a.nodeicon.includes("name"))?void(i[o]=e.name||e.label):1===n&&void 0!==e.icon&&("name"===o?a.nodelabel.includes("icon"):a.nodeicon.includes("icon"))?void(i[o]=e.icon):void 0}))},t.prototype.changeTreeIcons=function(e){var t=$('ul[name="'+this.name+'"] li span.button.switch');$(t).map((function(t,n){$(n).addClass(e),$(n).on("click",(function(t){setTimeout((function(){$(n).addClass(e)}),0)}))}))},t.prototype.getPath=function(e,t){return t=null===e.getParentNode()?"/"+e.name+t:this.getPath(e.getParentNode(),t)+"/"+e.name},t.prototype.onClick=function(e,t,n,i){
|
|
127
|
+
***************************************************************************** */var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function a(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,a=n.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)r.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return r}function s(e,t,n){if(n||2===arguments.length)for(var i,o=0,a=t.length;o<a;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var l=function(){i.register("wm-tree",new Map([["class",i.PROP_STRING],["dataset",Object.assign({value:"node1, node2, node3"},i.PROP_ANY)],["datavalue",i.PROP_STRING],["levels",Object.assign({value:0},i.PROP_NUMBER)],["name",i.PROP_STRING],["nodeaction",i.PROP_STRING],["nodechildren",i.PROP_STRING],["nodeclick",Object.assign({value:"none"},i.PROP_STRING)],["nodeicon",i.PROP_STRING],["nodeid",i.PROP_STRING],["nodelabel",i.PROP_STRING],["orderby",i.PROP_STRING],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["treeicons",i.PROP_STRING]]))},c={widgetType:"wm-tree",hostClass:"app-tree"},p="plus-minus",d=function(e){function t(t){var n=e.call(this,t,c)||this;return n.setting={data:{simpleData:{enable:!0}},view:{dblClickExpand:!1,fontCss:{"font-awesome":!0},switchIcon:{}},check:{},callback:{}},i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.CONTAINER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":this.nodes=this.getNodes(n),this.level>0&&this.expandTree(this.level,this.nodes,0),this.renderTree();break;case"levels":n>0&&(this.level=n);break;case"treeicons":this.treeicon=n;break;case"nodelabel":this.nodelabel=n;break;case"icon":this.nodeicon=n;case"orderby":this.renderTree();break;case"class":this.treeClass=n;break;default:e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.expandTree=function(e,t,n){var i=this;t.map((function(t){"children"in t&&!("open"in t)&&n<e?(t.open=!0,i.expandTree(e,t.children,n+1)):n=0}))},t.prototype.setTreeTemplate=function(e){"Classic"===e?this.setting.check.enable=!1:"Checkbox"===e?(this.setting.check.enable=!0,this.setting.check.chkStyle="checkbox"):"Radio"===e&&(this.setting.check.enable=!0,this.setting.check.chkStyle="radio",this.setting.check.radioType="all")},t.prototype.getNodesFromString=function(e){return e.split(",").map((function(e){return{name:e&&e.trim()}}))},t.prototype.getNodes=function(e){var t;return _.isArray(e)?t=i.getOrderedDataset(e,this.orderby):_.isObject(e)?t=[e]:_.isString(e)&&!_.isEmpty(e)&&(e=e.trim())&&(t=this.getNodesFromString(e)),t},t.prototype.setNodeclasses=function(e,t){return t.icon?{add:[""+t.icon]}:""},t.prototype.setNodeData=function(e,t,n,i,o){var a=this;0===t?e.map((function(e){if(e.children&&a.setNodeData(e.children,t,n,i,o),e.icon&&"icon"==a.nodelabel)e[o]=e.icon;else{if(!e.name||"name"!=a.nodelabel)return;e[o]=e.name}})):e.map((function(e){return e.children&&n>1&&(t===n&&(i=e),a.setNodeData(e.children,t,n-1,i,o)),1===n&&("name"===o?a.nodelabel.includes("label")||a.nodelabel.includes("name"):a.nodeicon.includes("label")||a.nodeicon.includes("name"))?void(i[o]=e.name||e.label):1===n&&void 0!==e.icon&&("name"===o?a.nodelabel.includes("icon"):a.nodeicon.includes("icon"))?void(i[o]=e.icon):void 0}))},t.prototype.changeTreeIcons=function(e){var t=$('ul[name="'+this.name+'"] li span.button.switch');$(t).map((function(t,n){$(n).addClass(e),$(n).on("click",(function(t){setTimeout((function(){$(n).addClass(e)}),0)}))}))},t.prototype.getPath=function(e,t){return t=null===e.getParentNode()?"/"+e.name+t:this.getPath(e.getParentNode(),t)+"/"+e.name},t.prototype.onClick=function(e,t,n,i){$.fn.zTree.getZTreeObj(""+this.name);var o={$event:e,$item:n,$path:this.getPath(n,"")};this.invokeEventCallback("select",o)},t.prototype.onExpand=function(e,t,n){var i=this,o={$event:e,$item:n,$path:this.getPath(n,"")};this.invokeEventCallback("expand",o),n.children&&n.children.map((function(e){if(e.isParent){var t=$("#"+e.tId+"_switch");$(t).addClass(i.treeicon||p),$(t).on("click",(function(e){setTimeout((function(){$(t).addClass(i.treeicon||p)}),0)}))}}))},t.prototype.onCollapse=function(e,t,n){var i={$event:e,$item:n,$path:this.getPath(n,"")};this.invokeEventCallback("collapse",i)},t.prototype.modifyObjects=function(e){var t=this;return e.forEach((function(e){void 0!==e.label&&(e.name=e.label,delete e.label),void 0!==e.children&&t.modifyObjects(e.children)})),e},t.prototype.setNodeChildren=function(e,t,n,i){if(t<=0)return e;for(var o=0;o<e.length;o++){var a=e[o];if(t===n&&(i=e[o]),a.children&&a.children.length>0){if(1===n)return void(i.children=a.children.map((function(e){return{name:e.name,children:null==e?void 0:e.children}})));this.setNodeChildren(a.children,t,n-1,i)}}return e},t.prototype.countDepth=function(e){var t,n,i=e.match(/\[.*?\]/g),o=1;if(null===i)return o;try{for(var r=a(i),s=r.next();!s.done;s=r.next()){s.value;o++}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return o},t.prototype.renderTree=function(){if(console.log(this.nodes,"this.nodes"),this.nodes){if(this.nativeElement.setAttribute("id",this.name),this.nodes=this.modifyObjects(this.nodes),this.setTreeTemplate(this.treeClass),this.nodelabel){var e=0;this.nodelabel.includes("children")&&(e=this.countDepth(this.nodelabel)),this.setNodeData(this.nodes,e,e,null,"name")}if(this.nodeicon){e=0;this.nodeicon.includes("children")&&(e=this.countDepth(this.nodeicon)),this.setNodeData(this.nodes,e,e,null,"icon")}if(this.nodechildren)(e=this.countDepth(this.nodechildren))>1&&(this.nodes=this.setNodeChildren(this.nodes,e,e,null))}this.setting.view.nodeClasses=this.setNodeclasses,this.setting.callback.onClick=this.onClick.bind(this),this.setting.callback.onExpand=this.onExpand.bind(this),this.setting.callback.onCollapse=this.onCollapse.bind(this);var t=$.fn.zTree.init($('ul[name="'+this.name+'"]'),this.setting,this.nodes);$.fn.zTreeKeyboardNavigation(t,$('ul[name="'+this.name+'"]'),null,this.treeicon||p)},t.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){e.changeTreeIcons(e.treeicon||p)}),200)},t}(i.StylableComponent);d.initializeProps=l(),d.decorators=[{type:t.Component,args:[{selector:"ul[wmTree]",template:'<ul #wmTree class="ztree" id="ztree"></ul> ',providers:[i.provideAsWidgetRef(d)],encapsulation:t.ViewEncapsulation.None}]}],d.ctorParameters=function(){return[{type:t.Injector}]};var u=[d],h=function(){};h.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.WmComponentsModule],declarations:s([],r(u)),exports:s([],r(u)),entryComponents:[]}]}],e.TreeComponent=d,e.TreeModule=h,e["\u0275a"]=l,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("ngx-bootstrap/datepicker"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define("@wm/components/input/calendar",["exports","@angular/core","@angular/common","@angular/forms","ngx-bootstrap/datepicker","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.calendar={}),e.ng.core,e.ng.common,e.ng.forms,e["ngx-bootstrap"].datepicker,e.wm.core,e.wm.components.base)}(this,(function(e,t,n,i,o,a,r){"use strict";
|
|
128
128
|
/*! *****************************************************************************
|
|
129
129
|
Copyright (c) Microsoft Corporation.
|
|
130
130
|
|
|
@@ -23335,23 +23335,23 @@
|
|
|
23335
23335
|
};
|
|
23336
23336
|
TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
|
|
23337
23337
|
var treeObj = $.fn.zTree.getZTreeObj("" + this.name);
|
|
23338
|
-
|
|
23339
|
-
|
|
23340
|
-
|
|
23341
|
-
|
|
23342
|
-
|
|
23343
|
-
|
|
23344
|
-
|
|
23345
|
-
$path: path
|
|
23346
|
-
};
|
|
23347
|
-
this.invokeEventCallback("select", eventParams);
|
|
23348
|
-
if (treeNode.open) {} else {
|
|
23349
|
-
this.invokeEventCallback("collapse", eventParams);
|
|
23350
|
-
}
|
|
23351
|
-
}
|
|
23338
|
+
var path = this.getPath(treeNode, "");
|
|
23339
|
+
var eventParams = {
|
|
23340
|
+
$event: event,
|
|
23341
|
+
$item: treeNode,
|
|
23342
|
+
$path: path
|
|
23343
|
+
};
|
|
23344
|
+
this.invokeEventCallback("select", eventParams);
|
|
23352
23345
|
};
|
|
23353
23346
|
TreeComponent.prototype.onExpand = function(event, treeId, treeNode) {
|
|
23354
23347
|
var self = this;
|
|
23348
|
+
var path = this.getPath(treeNode, "");
|
|
23349
|
+
var eventParams = {
|
|
23350
|
+
$event: event,
|
|
23351
|
+
$item: treeNode,
|
|
23352
|
+
$path: path
|
|
23353
|
+
};
|
|
23354
|
+
this.invokeEventCallback("expand", eventParams);
|
|
23355
23355
|
treeNode.children ? treeNode.children.map((function(el) {
|
|
23356
23356
|
if (el.isParent) {
|
|
23357
23357
|
var ele_1 = $("#" + el.tId + "_switch");
|
|
@@ -23364,6 +23364,15 @@
|
|
|
23364
23364
|
}
|
|
23365
23365
|
})) : "";
|
|
23366
23366
|
};
|
|
23367
|
+
TreeComponent.prototype.onCollapse = function(event, treeId, treeNode) {
|
|
23368
|
+
var path = this.getPath(treeNode, "");
|
|
23369
|
+
var eventParams = {
|
|
23370
|
+
$event: event,
|
|
23371
|
+
$item: treeNode,
|
|
23372
|
+
$path: path
|
|
23373
|
+
};
|
|
23374
|
+
this.invokeEventCallback("collapse", eventParams);
|
|
23375
|
+
};
|
|
23367
23376
|
TreeComponent.prototype.modifyObjects = function(array) {
|
|
23368
23377
|
var _this = this;
|
|
23369
23378
|
array.forEach((function(obj) {
|
|
@@ -23427,6 +23436,7 @@
|
|
|
23427
23436
|
return count;
|
|
23428
23437
|
};
|
|
23429
23438
|
TreeComponent.prototype.renderTree = function() {
|
|
23439
|
+
console.log(this.nodes, "this.nodes");
|
|
23430
23440
|
if (this.nodes) {
|
|
23431
23441
|
this.nativeElement.setAttribute("id", this.name);
|
|
23432
23442
|
this.nodes = this.modifyObjects(this.nodes);
|
|
@@ -23455,6 +23465,7 @@
|
|
|
23455
23465
|
this.setting.view["nodeClasses"] = this.setNodeclasses;
|
|
23456
23466
|
this.setting.callback["onClick"] = this.onClick.bind(this);
|
|
23457
23467
|
this.setting.callback["onExpand"] = this.onExpand.bind(this);
|
|
23468
|
+
this.setting.callback["onCollapse"] = this.onCollapse.bind(this);
|
|
23458
23469
|
var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
|
|
23459
23470
|
$.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
|
|
23460
23471
|
};
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
125
125
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
126
126
|
PERFORMANCE OF THIS SOFTWARE.
|
|
127
|
-
***************************************************************************** */var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function s(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var l=function(){i.register("wm-tree",new Map([["class",i.PROP_STRING],["dataset",Object.assign({value:"node1, node2, node3"},i.PROP_ANY)],["datavalue",i.PROP_STRING],["levels",Object.assign({value:0},i.PROP_NUMBER)],["name",i.PROP_STRING],["nodeaction",i.PROP_STRING],["nodechildren",i.PROP_STRING],["nodeclick",Object.assign({value:"none"},i.PROP_STRING)],["nodeicon",i.PROP_STRING],["nodeid",i.PROP_STRING],["nodelabel",i.PROP_STRING],["orderby",i.PROP_STRING],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["treeicons",i.PROP_STRING]]))},c={widgetType:"wm-tree",hostClass:"app-tree"},p="plus-minus",u=function(e){function t(t){var n=e.call(this,t,c)||this;return n.setting={data:{simpleData:{enable:!0}},view:{dblClickExpand:!1,fontCss:{"font-awesome":!0},switchIcon:{}},check:{},callback:{}},i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.CONTAINER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":this.nodes=this.getNodes(n),this.level>0&&this.expandTree(this.level,this.nodes,0),this.renderTree();break;case"levels":n>0&&(this.level=n);break;case"treeicons":this.treeicon=n;break;case"nodelabel":this.nodelabel=n;break;case"icon":this.nodeicon=n;case"orderby":this.renderTree();break;case"class":this.treeClass=n;break;default:e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.expandTree=function(e,t,n){var i=this;t.map((function(t){"children"in t&&!("open"in t)&&n<e?(t.open=!0,i.expandTree(e,t.children,n+1)):n=0}))},t.prototype.setTreeTemplate=function(e){"Classic"===e?this.setting.check.enable=!1:"Checkbox"===e?(this.setting.check.enable=!0,this.setting.check.chkStyle="checkbox"):"Radio"===e&&(this.setting.check.enable=!0,this.setting.check.chkStyle="radio",this.setting.check.radioType="all")},t.prototype.getNodesFromString=function(e){return e.split(",").map((function(e){return{name:e&&e.trim()}}))},t.prototype.getNodes=function(e){var t;return _.isArray(e)?t=i.getOrderedDataset(e,this.orderby):_.isObject(e)?t=[e]:_.isString(e)&&!_.isEmpty(e)&&(e=e.trim())&&(t=this.getNodesFromString(e)),t},t.prototype.setNodeclasses=function(e,t){return t.icon?{add:[""+t.icon]}:""},t.prototype.setNodeData=function(e,t,n,i,o){var r=this;0===t?e.map((function(e){if(e.children&&r.setNodeData(e.children,t,n,i,o),e.icon&&"icon"==r.nodelabel)e[o]=e.icon;else{if(!e.name||"name"!=r.nodelabel)return;e[o]=e.name}})):e.map((function(e){return e.children&&n>1&&(t===n&&(i=e),r.setNodeData(e.children,t,n-1,i,o)),1===n&&("name"===o?r.nodelabel.includes("label")||r.nodelabel.includes("name"):r.nodeicon.includes("label")||r.nodeicon.includes("name"))?void(i[o]=e.name||e.label):1===n&&void 0!==e.icon&&("name"===o?r.nodelabel.includes("icon"):r.nodeicon.includes("icon"))?void(i[o]=e.icon):void 0}))},t.prototype.changeTreeIcons=function(e){var t=$('ul[name="'+this.name+'"] li span.button.switch');$(t).map((function(t,n){$(n).addClass(e),$(n).on("click",(function(t){setTimeout((function(){$(n).addClass(e)}),0)}))}))},t.prototype.getPath=function(e,t){return t=null===e.getParentNode()?"/"+e.name+t:this.getPath(e.getParentNode(),t)+"/"+e.name},t.prototype.onClick=function(e,t,n,i){
|
|
127
|
+
***************************************************************************** */var o=function(e,t){return(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,o,r=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function s(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;var l=function(){i.register("wm-tree",new Map([["class",i.PROP_STRING],["dataset",Object.assign({value:"node1, node2, node3"},i.PROP_ANY)],["datavalue",i.PROP_STRING],["levels",Object.assign({value:0},i.PROP_NUMBER)],["name",i.PROP_STRING],["nodeaction",i.PROP_STRING],["nodechildren",i.PROP_STRING],["nodeclick",Object.assign({value:"none"},i.PROP_STRING)],["nodeicon",i.PROP_STRING],["nodeid",i.PROP_STRING],["nodelabel",i.PROP_STRING],["orderby",i.PROP_STRING],["show",Object.assign({value:!0},i.PROP_BOOLEAN)],["tabindex",Object.assign({value:0},i.PROP_NUMBER)],["treeicons",i.PROP_STRING]]))},c={widgetType:"wm-tree",hostClass:"app-tree"},p="plus-minus",u=function(e){function t(t){var n=e.call(this,t,c)||this;return n.setting={data:{simpleData:{enable:!0}},view:{dblClickExpand:!1,fontCss:{"font-awesome":!0},switchIcon:{}},check:{},callback:{}},i.styler(n.nativeElement,n,i.APPLY_STYLES_TYPE.CONTAINER),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.onPropertyChange=function(t,n,i){switch(t){case"dataset":this.nodes=this.getNodes(n),this.level>0&&this.expandTree(this.level,this.nodes,0),this.renderTree();break;case"levels":n>0&&(this.level=n);break;case"treeicons":this.treeicon=n;break;case"nodelabel":this.nodelabel=n;break;case"icon":this.nodeicon=n;case"orderby":this.renderTree();break;case"class":this.treeClass=n;break;default:e.prototype.onPropertyChange.call(this,t,n,i)}},t.prototype.expandTree=function(e,t,n){var i=this;t.map((function(t){"children"in t&&!("open"in t)&&n<e?(t.open=!0,i.expandTree(e,t.children,n+1)):n=0}))},t.prototype.setTreeTemplate=function(e){"Classic"===e?this.setting.check.enable=!1:"Checkbox"===e?(this.setting.check.enable=!0,this.setting.check.chkStyle="checkbox"):"Radio"===e&&(this.setting.check.enable=!0,this.setting.check.chkStyle="radio",this.setting.check.radioType="all")},t.prototype.getNodesFromString=function(e){return e.split(",").map((function(e){return{name:e&&e.trim()}}))},t.prototype.getNodes=function(e){var t;return _.isArray(e)?t=i.getOrderedDataset(e,this.orderby):_.isObject(e)?t=[e]:_.isString(e)&&!_.isEmpty(e)&&(e=e.trim())&&(t=this.getNodesFromString(e)),t},t.prototype.setNodeclasses=function(e,t){return t.icon?{add:[""+t.icon]}:""},t.prototype.setNodeData=function(e,t,n,i,o){var r=this;0===t?e.map((function(e){if(e.children&&r.setNodeData(e.children,t,n,i,o),e.icon&&"icon"==r.nodelabel)e[o]=e.icon;else{if(!e.name||"name"!=r.nodelabel)return;e[o]=e.name}})):e.map((function(e){return e.children&&n>1&&(t===n&&(i=e),r.setNodeData(e.children,t,n-1,i,o)),1===n&&("name"===o?r.nodelabel.includes("label")||r.nodelabel.includes("name"):r.nodeicon.includes("label")||r.nodeicon.includes("name"))?void(i[o]=e.name||e.label):1===n&&void 0!==e.icon&&("name"===o?r.nodelabel.includes("icon"):r.nodeicon.includes("icon"))?void(i[o]=e.icon):void 0}))},t.prototype.changeTreeIcons=function(e){var t=$('ul[name="'+this.name+'"] li span.button.switch');$(t).map((function(t,n){$(n).addClass(e),$(n).on("click",(function(t){setTimeout((function(){$(n).addClass(e)}),0)}))}))},t.prototype.getPath=function(e,t){return t=null===e.getParentNode()?"/"+e.name+t:this.getPath(e.getParentNode(),t)+"/"+e.name},t.prototype.onClick=function(e,t,n,i){$.fn.zTree.getZTreeObj(""+this.name);var o={$event:e,$item:n,$path:this.getPath(n,"")};this.invokeEventCallback("select",o)},t.prototype.onExpand=function(e,t,n){var i=this,o={$event:e,$item:n,$path:this.getPath(n,"")};this.invokeEventCallback("expand",o),n.children&&n.children.map((function(e){if(e.isParent){var t=$("#"+e.tId+"_switch");$(t).addClass(i.treeicon||p),$(t).on("click",(function(e){setTimeout((function(){$(t).addClass(i.treeicon||p)}),0)}))}}))},t.prototype.onCollapse=function(e,t,n){var i={$event:e,$item:n,$path:this.getPath(n,"")};this.invokeEventCallback("collapse",i)},t.prototype.modifyObjects=function(e){var t=this;return e.forEach((function(e){void 0!==e.label&&(e.name=e.label,delete e.label),void 0!==e.children&&t.modifyObjects(e.children)})),e},t.prototype.setNodeChildren=function(e,t,n,i){if(t<=0)return e;for(var o=0;o<e.length;o++){var r=e[o];if(t===n&&(i=e[o]),r.children&&r.children.length>0){if(1===n)return void(i.children=r.children.map((function(e){return{name:e.name,children:null==e?void 0:e.children}})));this.setNodeChildren(r.children,t,n-1,i)}}return e},t.prototype.countDepth=function(e){var t,n,i=e.match(/\[.*?\]/g),o=1;if(null===i)return o;try{for(var a=r(i),s=a.next();!s.done;s=a.next()){s.value;o++}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},t.prototype.renderTree=function(){if(console.log(this.nodes,"this.nodes"),this.nodes){if(this.nativeElement.setAttribute("id",this.name),this.nodes=this.modifyObjects(this.nodes),this.setTreeTemplate(this.treeClass),this.nodelabel){var e=0;this.nodelabel.includes("children")&&(e=this.countDepth(this.nodelabel)),this.setNodeData(this.nodes,e,e,null,"name")}if(this.nodeicon){e=0;this.nodeicon.includes("children")&&(e=this.countDepth(this.nodeicon)),this.setNodeData(this.nodes,e,e,null,"icon")}if(this.nodechildren)(e=this.countDepth(this.nodechildren))>1&&(this.nodes=this.setNodeChildren(this.nodes,e,e,null))}this.setting.view.nodeClasses=this.setNodeclasses,this.setting.callback.onClick=this.onClick.bind(this),this.setting.callback.onExpand=this.onExpand.bind(this),this.setting.callback.onCollapse=this.onCollapse.bind(this);var t=$.fn.zTree.init($('ul[name="'+this.name+'"]'),this.setting,this.nodes);$.fn.zTreeKeyboardNavigation(t,$('ul[name="'+this.name+'"]'),null,this.treeicon||p)},t.prototype.ngAfterViewInit=function(){var e=this;setTimeout((function(){e.changeTreeIcons(e.treeicon||p)}),200)},t}(i.StylableComponent);u.initializeProps=l(),u.decorators=[{type:t.Component,args:[{selector:"ul[wmTree]",template:'<ul #wmTree class="ztree" id="ztree"></ul> ',providers:[i.provideAsWidgetRef(u)],encapsulation:t.ViewEncapsulation.None}]}],u.ctorParameters=function(){return[{type:t.Injector}]};var d=[u],h=function(){};h.decorators=[{type:t.NgModule,args:[{imports:[n.CommonModule,i.WmComponentsModule],declarations:s([],a(d)),exports:s([],a(d)),entryComponents:[]}]}],e.TreeComponent=u,e.TreeModule=h,e["\u0275a"]=l,Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("ngx-bootstrap/datepicker"),require("@wm/core"),require("@wm/components/base")):"function"==typeof define&&define.amd?define("@wm/components/input/calendar",["exports","@angular/core","@angular/common","@angular/forms","ngx-bootstrap/datepicker","@wm/core","@wm/components/base"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).wm=e.wm||{},e.wm.components=e.wm.components||{},e.wm.components.input=e.wm.components.input||{},e.wm.components.input.calendar={}),e.ng.core,e.ng.common,e.ng.forms,e["ngx-bootstrap"].datepicker,e.wm.core,e.wm.components.base)}(this,(function(e,t,n,i,o,r,a){"use strict";
|
|
128
128
|
/*! *****************************************************************************
|
|
129
129
|
Copyright (c) Microsoft Corporation.
|
|
130
130
|
|