@wavemaker/app-runtime-wm-build 11.4.0-rc.5347 → 11.4.1-next.140982
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.
- app-runtime-wm-build/package.json +1 -1
- app-runtime-wm-build/wmapp/scripts/wm-libs.js +37 -29
- app-runtime-wm-build/wmapp/scripts/wm-libs.min.js +2 -2
- app-runtime-wm-build/wmapp/scripts/wm-loader.js +205 -239
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +6 -6
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-libs.js +37 -29
- app-runtime-wm-build/wmmobile/scripts/wm-libs.min.js +2 -2
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +204 -238
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +6 -6
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -17102,6 +17102,10 @@
|
|
|
17102
17102
|
value: 0
|
|
17103
17103
|
}, base.PROP_NUMBER) ], [ "uncheckedvalue", Object.assign({
|
|
17104
17104
|
value: false
|
|
17105
|
+
}, base.PROP_STRING) ], [ "togglewithicon", base.PROP_BOOLEAN ], [ "checkedicon", Object.assign({
|
|
17106
|
+
value: "wi wi-done"
|
|
17107
|
+
}, base.PROP_STRING) ], [ "uncheckedicon", Object.assign({
|
|
17108
|
+
value: "wi wi-close"
|
|
17105
17109
|
}, base.PROP_STRING) ] ]);
|
|
17106
17110
|
var registerProps$c = function() {
|
|
17107
17111
|
base.register("wm-checkbox", checkboxProps);
|
|
@@ -17188,6 +17192,16 @@
|
|
|
17188
17192
|
type: "change"
|
|
17189
17193
|
}, this.ngModel.valid);
|
|
17190
17194
|
};
|
|
17195
|
+
CheckboxComponent.prototype.getColor = function() {
|
|
17196
|
+
var labelElement = $("div[widget-id='" + this.widgetId + "'] label");
|
|
17197
|
+
var bgcolor = $(labelElement).css("background-color");
|
|
17198
|
+
return bgcolor;
|
|
17199
|
+
};
|
|
17200
|
+
CheckboxComponent.prototype.onMouseOver = function() {
|
|
17201
|
+
var labelElement = $("div.app-toggle[widget-id='" + this.widgetId + "'] label");
|
|
17202
|
+
var bgcolor = $(labelElement).css("background-color");
|
|
17203
|
+
document.documentElement.style.setProperty("--boxAfterBackColor", bgcolor);
|
|
17204
|
+
};
|
|
17191
17205
|
CheckboxComponent.prototype.onKeyDown = function($event) {
|
|
17192
17206
|
$event.preventDefault();
|
|
17193
17207
|
this.checkboxEl.nativeElement.click();
|
|
@@ -17203,7 +17217,7 @@
|
|
|
17203
17217
|
type: core.Component,
|
|
17204
17218
|
args: [ {
|
|
17205
17219
|
selector: "[wmCheckbox]",
|
|
17206
|
-
template: '<label [ngClass]="{\'unchecked\': !proxyModel, \'disabled\': (disabled || readonly), \'required\': (required && _caption)}">\n <input type="checkbox"\n role="checkbox"\n #checkbox\n [attr.name]="name"\n [attr.aria-label]="hint"\n [attr.aria-checked]="!!proxyModel"\n focus-target\n [(ngModel)]="proxyModel"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled || readonly"\n [attr.accesskey]="shortcutkey"\n [tabindex]="tabindex"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)">\n
|
|
17220
|
+
template: '<label [ngClass]="{\'unchecked\': !proxyModel, \'disabled\': (disabled || readonly), \'required\': (required && _caption)}" (mouseenter)="onMouseOver()">\n <input type="checkbox"\n role="checkbox"\n #checkbox\n [attr.name]="name"\n [attr.aria-label]="hint"\n [attr.aria-checked]="!!proxyModel"\n focus-target\n [(ngModel)]="proxyModel"\n [readonly]="readonly"\n [required]="required"\n [disabled]="disabled || readonly"\n [attr.accesskey]="shortcutkey"\n [tabindex]="tabindex"\n (blur)="invokeOnTouched($event)"\n (ngModelChange)="handleChange($event)">\n <span class="toggle_slider">\n <i class="app-icon {{checkedicon}} toggle-checked" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin, color:getColor(), fontSize:iconwidth}" *ngIf="proxyModel && togglewithicon"></i>\n <i class="app-icon {{uncheckedicon}} toggle-unchecked" aria-hidden="true" [ngStyle]="{width:iconwidth, height:iconheight, margin:iconmargin, fontSize:iconwidth}" *ngIf="!proxyModel && togglewithicon"></i>\n </span>\n <span class="caption" [innerHtml]="_caption"></span>\n <img alt="Checkbox Image" aria-hidden="true" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" class="switch"/>\n</label>\n<input type="hidden" class="ng-hide model-holder" aria-hidden="true" tabindex="-1" [disabled]="disabled" [value]="proxyModel">\n',
|
|
17207
17221
|
providers: [ base.provideAs(CheckboxComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(CheckboxComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(CheckboxComponent) ]
|
|
17208
17222
|
} ]
|
|
17209
17223
|
} ];
|
|
@@ -23185,16 +23199,17 @@
|
|
|
23185
23199
|
var defaultTreeIconClass = "plus-minus";
|
|
23186
23200
|
var TreeComponent = function(_super) {
|
|
23187
23201
|
__extends(TreeComponent, _super);
|
|
23188
|
-
function TreeComponent(inj) {
|
|
23202
|
+
function TreeComponent(inj, binddatavalue, bindnodelabel, bindnodeicon, bindnodechildren, bindnodeid) {
|
|
23189
23203
|
var _this = _super.call(this, inj, WIDGET_INFO) || this;
|
|
23204
|
+
_this.binddatavalue = binddatavalue;
|
|
23205
|
+
_this.bindnodelabel = bindnodelabel;
|
|
23206
|
+
_this.bindnodeicon = bindnodeicon;
|
|
23207
|
+
_this.bindnodechildren = bindnodechildren;
|
|
23208
|
+
_this.bindnodeid = bindnodeid;
|
|
23190
23209
|
_this.setting = {
|
|
23191
23210
|
data: {
|
|
23192
23211
|
simpleData: {
|
|
23193
23212
|
enable: false
|
|
23194
|
-
},
|
|
23195
|
-
key: {
|
|
23196
|
-
children: "children",
|
|
23197
|
-
name: "label"
|
|
23198
23213
|
}
|
|
23199
23214
|
},
|
|
23200
23215
|
view: {
|
|
@@ -23208,53 +23223,53 @@
|
|
|
23208
23223
|
callback: {}
|
|
23209
23224
|
};
|
|
23210
23225
|
base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
|
|
23226
|
+
_this.setting.view["nodeClasses"] = _this.setNodeClasses;
|
|
23227
|
+
_this.setting.callback["onClick"] = _this.onClick.bind(_this);
|
|
23228
|
+
_this.setting.callback["onExpand"] = _this.onExpand.bind(_this);
|
|
23229
|
+
_this.setting.callback["onCollapse"] = _this.onCollapse.bind(_this);
|
|
23211
23230
|
return _this;
|
|
23212
23231
|
}
|
|
23213
23232
|
TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
23214
23233
|
switch (key) {
|
|
23215
23234
|
case "dataset":
|
|
23216
23235
|
this.nodes = this.getNodes(nv);
|
|
23217
|
-
if (this.level > 0) {
|
|
23218
|
-
this.expandTree(this.level, this.nodes, 0);
|
|
23219
|
-
}
|
|
23220
23236
|
this.renderTree();
|
|
23221
23237
|
break;
|
|
23222
23238
|
|
|
23223
23239
|
case "levels":
|
|
23224
|
-
|
|
23225
|
-
this.level = nv;
|
|
23226
|
-
}
|
|
23240
|
+
this.level = nv;
|
|
23227
23241
|
this.renderTree();
|
|
23228
23242
|
break;
|
|
23229
23243
|
|
|
23230
|
-
case "
|
|
23231
|
-
this.
|
|
23244
|
+
case "nodeicon":
|
|
23245
|
+
this.nodeicon = nv;
|
|
23232
23246
|
this.renderTree();
|
|
23233
23247
|
break;
|
|
23234
23248
|
|
|
23235
23249
|
case "nodelabel":
|
|
23236
|
-
this.
|
|
23250
|
+
this.nodelabel = nv;
|
|
23237
23251
|
this.renderTree();
|
|
23238
23252
|
break;
|
|
23239
23253
|
|
|
23240
23254
|
case "nodechildren":
|
|
23241
|
-
this.
|
|
23255
|
+
this.nodechildren = nv;
|
|
23242
23256
|
this.renderTree();
|
|
23243
23257
|
break;
|
|
23244
23258
|
|
|
23245
|
-
case "
|
|
23246
|
-
this.
|
|
23259
|
+
case "orderby":
|
|
23260
|
+
this.orderby = nv;
|
|
23247
23261
|
this.renderTree();
|
|
23248
23262
|
break;
|
|
23249
23263
|
|
|
23250
|
-
case "
|
|
23264
|
+
case "treeicons":
|
|
23265
|
+
this.treeicons = nv;
|
|
23251
23266
|
this.renderTree();
|
|
23252
23267
|
break;
|
|
23253
23268
|
|
|
23254
23269
|
case "class":
|
|
23255
23270
|
this.treeClass = nv;
|
|
23271
|
+
this.setTreeTemplate(this.treeClass);
|
|
23256
23272
|
this.renderTree();
|
|
23257
|
-
break;
|
|
23258
23273
|
|
|
23259
23274
|
default:
|
|
23260
23275
|
_super.prototype.onPropertyChange.call(this, key, nv, ov);
|
|
@@ -23264,9 +23279,9 @@
|
|
|
23264
23279
|
TreeComponent.prototype.expandTree = function(level, node, childLevel) {
|
|
23265
23280
|
var _this = this;
|
|
23266
23281
|
node.map((function(childNode) {
|
|
23267
|
-
var children =
|
|
23268
|
-
if (children &&
|
|
23269
|
-
childNode
|
|
23282
|
+
var children = childNode.children;
|
|
23283
|
+
if (children && childLevel < level) {
|
|
23284
|
+
childNode.open = true;
|
|
23270
23285
|
_this.expandTree(level, children, childLevel + 1);
|
|
23271
23286
|
} else {
|
|
23272
23287
|
childLevel = 0;
|
|
@@ -23275,12 +23290,13 @@
|
|
|
23275
23290
|
}));
|
|
23276
23291
|
};
|
|
23277
23292
|
TreeComponent.prototype.setTreeTemplate = function(value) {
|
|
23278
|
-
|
|
23293
|
+
var classList = value.split(" ");
|
|
23294
|
+
if (classList.includes("Classic")) {
|
|
23279
23295
|
this.setting.check["enable"] = false;
|
|
23280
|
-
} else if (
|
|
23296
|
+
} else if (classList.includes("Checkbox")) {
|
|
23281
23297
|
this.setting.check["enable"] = true;
|
|
23282
23298
|
this.setting.check["chkStyle"] = "checkbox";
|
|
23283
|
-
} else if (
|
|
23299
|
+
} else if (classList.includes("Radio")) {
|
|
23284
23300
|
this.setting.check["enable"] = true;
|
|
23285
23301
|
this.setting.check["chkStyle"] = "radio";
|
|
23286
23302
|
this.setting.check["radioType"] = "all";
|
|
@@ -23307,48 +23323,11 @@
|
|
|
23307
23323
|
}
|
|
23308
23324
|
return nodes;
|
|
23309
23325
|
};
|
|
23310
|
-
TreeComponent.prototype.
|
|
23326
|
+
TreeComponent.prototype.setNodeClasses = function(treeId, treeNode) {
|
|
23311
23327
|
return treeNode.icon ? {
|
|
23312
23328
|
add: [ "" + treeNode.icon ]
|
|
23313
23329
|
} : "";
|
|
23314
23330
|
};
|
|
23315
|
-
TreeComponent.prototype.setNodeData = function(nodes, depth, level, parentNode, type) {
|
|
23316
|
-
var _this = this;
|
|
23317
|
-
if (depth === 0) {
|
|
23318
|
-
nodes.map((function(node) {
|
|
23319
|
-
var children = _this.getChildren(node);
|
|
23320
|
-
if (children) {
|
|
23321
|
-
_this.setNodeData(children, depth, level, parentNode, type);
|
|
23322
|
-
}
|
|
23323
|
-
if (node.icon && _this.nodelabel == "icon") {
|
|
23324
|
-
node[type] = node.icon;
|
|
23325
|
-
} else if (node.name && _this.nodelabel == "name") {
|
|
23326
|
-
node[type] = node.name;
|
|
23327
|
-
} else {
|
|
23328
|
-
return;
|
|
23329
|
-
}
|
|
23330
|
-
}));
|
|
23331
|
-
} else {
|
|
23332
|
-
nodes.map((function(node) {
|
|
23333
|
-
var children = _this.getChildren(node);
|
|
23334
|
-
if (children && level > 1) {
|
|
23335
|
-
if (depth === level) {
|
|
23336
|
-
parentNode = node;
|
|
23337
|
-
}
|
|
23338
|
-
_this.setNodeData(children, depth, level - 1, parentNode, type);
|
|
23339
|
-
}
|
|
23340
|
-
if (level === 1 && (type === "name" ? _this.nodelabel.includes("label") || _this.nodelabel.includes("name") : _this.nodeicon.includes("label") || _this.nodeicon.includes("name"))) {
|
|
23341
|
-
parentNode[type] = node.name || node.label;
|
|
23342
|
-
return;
|
|
23343
|
-
} else if (level === 1 && node.icon !== undefined && (type === "name" ? _this.nodelabel.includes("icon") : _this.nodeicon.includes("icon"))) {
|
|
23344
|
-
parentNode[type] = node.icon;
|
|
23345
|
-
return;
|
|
23346
|
-
} else {
|
|
23347
|
-
return;
|
|
23348
|
-
}
|
|
23349
|
-
}));
|
|
23350
|
-
}
|
|
23351
|
-
};
|
|
23352
23331
|
TreeComponent.prototype.changeTreeIcons = function(nv) {
|
|
23353
23332
|
var eleClose = $('ul[name="' + this.name + '"] li span.button.switch');
|
|
23354
23333
|
$(eleClose).map((function(idx, ele) {
|
|
@@ -23362,45 +23341,38 @@
|
|
|
23362
23341
|
};
|
|
23363
23342
|
TreeComponent.prototype.getPath = function(treeNode, path) {
|
|
23364
23343
|
if (treeNode.getParentNode() === null) {
|
|
23365
|
-
path = "/" + treeNode
|
|
23344
|
+
path = "/" + treeNode.name + path;
|
|
23366
23345
|
} else {
|
|
23367
|
-
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode
|
|
23346
|
+
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
|
|
23368
23347
|
}
|
|
23369
23348
|
return path;
|
|
23370
23349
|
};
|
|
23371
23350
|
TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
|
|
23372
23351
|
if (this.nodeclick === "expand") {
|
|
23373
|
-
var nodes = this.
|
|
23352
|
+
var nodes = this.zTree.getSelectedNodes();
|
|
23374
23353
|
if (nodes.length > 0) {
|
|
23375
23354
|
this.expandNode(nodes[0], !nodes[0].open, true);
|
|
23376
23355
|
}
|
|
23377
23356
|
}
|
|
23378
|
-
|
|
23379
|
-
var eventParams = {
|
|
23380
|
-
$event: event,
|
|
23381
|
-
$item: treeNode,
|
|
23382
|
-
$path: path
|
|
23383
|
-
};
|
|
23384
|
-
this.setSelectedItem(treeNode);
|
|
23385
|
-
this.invokeEventCallback("select", eventParams);
|
|
23357
|
+
this.selectNode(event, treeNode);
|
|
23386
23358
|
};
|
|
23387
23359
|
TreeComponent.prototype.onExpand = function(event, treeId, treeNode) {
|
|
23388
23360
|
var self = this;
|
|
23389
23361
|
var path = this.getPath(treeNode, "");
|
|
23390
23362
|
var eventParams = {
|
|
23391
23363
|
$event: event,
|
|
23392
|
-
$item: treeNode,
|
|
23364
|
+
$item: core.getClonedObject(treeNode.data),
|
|
23393
23365
|
$path: path
|
|
23394
23366
|
};
|
|
23395
23367
|
this.invokeEventCallback("expand", eventParams);
|
|
23396
|
-
var children =
|
|
23368
|
+
var children = treeNode.children;
|
|
23397
23369
|
children === null || children === void 0 ? void 0 : children.map((function(el) {
|
|
23398
23370
|
if (el.isParent) {
|
|
23399
23371
|
var ele_1 = $("#" + el.tId + "_switch");
|
|
23400
|
-
$(ele_1).addClass(self.
|
|
23372
|
+
$(ele_1).addClass(self.treeicons || defaultTreeIconClass);
|
|
23401
23373
|
$(ele_1).on("click", (function(e) {
|
|
23402
23374
|
setTimeout((function() {
|
|
23403
|
-
$(ele_1).addClass(self.
|
|
23375
|
+
$(ele_1).addClass(self.treeicons || defaultTreeIconClass);
|
|
23404
23376
|
}), 0);
|
|
23405
23377
|
}));
|
|
23406
23378
|
}
|
|
@@ -23410,185 +23382,138 @@
|
|
|
23410
23382
|
var path = this.getPath(treeNode, "");
|
|
23411
23383
|
var eventParams = {
|
|
23412
23384
|
$event: event,
|
|
23413
|
-
$item: treeNode,
|
|
23385
|
+
$item: core.getClonedObject(treeNode.data),
|
|
23414
23386
|
$path: path
|
|
23415
23387
|
};
|
|
23416
23388
|
this.invokeEventCallback("collapse", eventParams);
|
|
23417
23389
|
};
|
|
23418
|
-
TreeComponent.prototype.
|
|
23419
|
-
return node[this.childrenKey];
|
|
23420
|
-
};
|
|
23421
|
-
Object.defineProperty(TreeComponent.prototype, "childrenKey", {
|
|
23422
|
-
get: function() {
|
|
23423
|
-
if (!this.nodechildren) {
|
|
23424
|
-
return "children";
|
|
23425
|
-
}
|
|
23426
|
-
var depth = this.countDepth(this.nodechildren);
|
|
23427
|
-
return depth ? this.nodechildren.split(".").pop() : this.nodechildren;
|
|
23428
|
-
},
|
|
23429
|
-
enumerable: false,
|
|
23430
|
-
configurable: true
|
|
23431
|
-
});
|
|
23432
|
-
Object.defineProperty(TreeComponent.prototype, "labelKey", {
|
|
23433
|
-
get: function() {
|
|
23434
|
-
if (!this.nodelabel) {
|
|
23435
|
-
return "label";
|
|
23436
|
-
}
|
|
23437
|
-
var depth = this.countDepth(this.nodelabel);
|
|
23438
|
-
return depth ? this.nodelabel.split(".").pop() : this.nodelabel;
|
|
23439
|
-
},
|
|
23440
|
-
enumerable: false,
|
|
23441
|
-
configurable: true
|
|
23442
|
-
});
|
|
23443
|
-
Object.defineProperty(TreeComponent.prototype, "iconKey", {
|
|
23444
|
-
get: function() {
|
|
23445
|
-
if (!this.nodeicon) {
|
|
23446
|
-
return "icon";
|
|
23447
|
-
}
|
|
23448
|
-
var depth = this.countDepth(this.nodeicon);
|
|
23449
|
-
return depth ? this.nodeicon.split(".").pop() : this.nodeicon;
|
|
23450
|
-
},
|
|
23451
|
-
enumerable: false,
|
|
23452
|
-
configurable: true
|
|
23453
|
-
});
|
|
23454
|
-
Object.defineProperty(TreeComponent.prototype, "treeObj", {
|
|
23455
|
-
get: function() {
|
|
23456
|
-
return $.fn.zTree.getZTreeObj("" + this.name);
|
|
23457
|
-
},
|
|
23458
|
-
enumerable: false,
|
|
23459
|
-
configurable: true
|
|
23460
|
-
});
|
|
23461
|
-
TreeComponent.prototype.modifyObjects = function(array) {
|
|
23390
|
+
TreeComponent.prototype.constructZTreeData = function(data, zTreeData) {
|
|
23462
23391
|
var _this = this;
|
|
23463
|
-
|
|
23464
|
-
|
|
23465
|
-
var
|
|
23466
|
-
|
|
23467
|
-
_this.
|
|
23392
|
+
data.forEach((function(node) {
|
|
23393
|
+
var zNode = {};
|
|
23394
|
+
var name = base.getEvaluatedData(node, {
|
|
23395
|
+
field: _this.nodelabel,
|
|
23396
|
+
bindExpression: _this.bindnodelabel
|
|
23397
|
+
}, _this.viewParent) || node.label;
|
|
23398
|
+
var icon = base.getEvaluatedData(node, {
|
|
23399
|
+
field: _this.nodeicon,
|
|
23400
|
+
bindExpression: _this.bindnodeicon
|
|
23401
|
+
}, _this.viewParent) || node.icon;
|
|
23402
|
+
var nodeId = base.getEvaluatedData(node, {
|
|
23403
|
+
field: _this.nodeid,
|
|
23404
|
+
bindExpression: _this.bindnodeid
|
|
23405
|
+
}, _this.viewParent);
|
|
23406
|
+
var children = base.getEvaluatedData(node, {
|
|
23407
|
+
field: _this.nodechildren,
|
|
23408
|
+
bindExpression: _this.bindnodechildren
|
|
23409
|
+
}, _this.viewParent) || node.children;
|
|
23410
|
+
zNode["name"] = name;
|
|
23411
|
+
zNode["icon"] = icon;
|
|
23412
|
+
zNode["nodeId"] = nodeId;
|
|
23413
|
+
zNode["data"] = core.getClonedObject(node);
|
|
23414
|
+
if (_.isArray(children) && children.length) {
|
|
23415
|
+
zNode["children"] = [];
|
|
23416
|
+
_this.constructZTreeData(children, zNode["children"]);
|
|
23468
23417
|
}
|
|
23418
|
+
zTreeData.push(zNode);
|
|
23469
23419
|
}));
|
|
23470
23420
|
};
|
|
23471
|
-
TreeComponent.prototype.setNodeChildren = function(nodes, depth, level, parentNode) {
|
|
23472
|
-
var _this = this;
|
|
23473
|
-
if (depth <= 0) {
|
|
23474
|
-
return nodes;
|
|
23475
|
-
}
|
|
23476
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
23477
|
-
var node = nodes[i];
|
|
23478
|
-
if (depth === level) {
|
|
23479
|
-
parentNode = nodes[i];
|
|
23480
|
-
}
|
|
23481
|
-
var children = this.getChildren(node);
|
|
23482
|
-
if (children === null || children === void 0 ? void 0 : children.length) {
|
|
23483
|
-
if (level === 1) {
|
|
23484
|
-
parentNode[this.childrenKey] = children.map((function(child) {
|
|
23485
|
-
var _a;
|
|
23486
|
-
return _a = {}, _a[_this.labelKey] = child[_this.labelKey], _a[_this.childrenKey] = _this.getChildren(child),
|
|
23487
|
-
_a.icon = child[_this.iconKey], _a;
|
|
23488
|
-
}));
|
|
23489
|
-
return;
|
|
23490
|
-
} else {
|
|
23491
|
-
this.setNodeChildren(children, depth, level - 1, parentNode);
|
|
23492
|
-
}
|
|
23493
|
-
}
|
|
23494
|
-
}
|
|
23495
|
-
return nodes;
|
|
23496
|
-
};
|
|
23497
|
-
TreeComponent.prototype.countDepth = function(str) {
|
|
23498
|
-
var e_1, _a;
|
|
23499
|
-
var regex = /\[.*?\]/g;
|
|
23500
|
-
var matches = str.match(regex);
|
|
23501
|
-
var count = 1;
|
|
23502
|
-
if (matches === null) return count;
|
|
23503
|
-
try {
|
|
23504
|
-
for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
|
|
23505
|
-
var match = matches_1_1.value;
|
|
23506
|
-
count++;
|
|
23507
|
-
}
|
|
23508
|
-
} catch (e_1_1) {
|
|
23509
|
-
e_1 = {
|
|
23510
|
-
error: e_1_1
|
|
23511
|
-
};
|
|
23512
|
-
} finally {
|
|
23513
|
-
try {
|
|
23514
|
-
if (matches_1_1 && !matches_1_1.done && (_a = matches_1.return)) _a.call(matches_1);
|
|
23515
|
-
} finally {
|
|
23516
|
-
if (e_1) throw e_1.error;
|
|
23517
|
-
}
|
|
23518
|
-
}
|
|
23519
|
-
return count;
|
|
23520
|
-
};
|
|
23521
23421
|
TreeComponent.prototype.renderTree = function() {
|
|
23522
|
-
|
|
23422
|
+
var _a;
|
|
23423
|
+
this.zTreeNodes = [];
|
|
23424
|
+
if ((_a = this.nodes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
23523
23425
|
this.nativeElement.setAttribute("id", this.name);
|
|
23524
|
-
|
|
23525
|
-
|
|
23526
|
-
|
|
23527
|
-
this.setTreeTemplate(this.treeClass);
|
|
23528
|
-
if (this.nodelabel) {
|
|
23529
|
-
var depth = 0;
|
|
23530
|
-
if (this.nodelabel.includes("children")) {
|
|
23531
|
-
depth = this.countDepth(this.nodelabel);
|
|
23532
|
-
}
|
|
23533
|
-
this.setNodeData(this.nodes, depth, depth, null, "name");
|
|
23534
|
-
}
|
|
23535
|
-
if (this.nodeicon) {
|
|
23536
|
-
var depth = 0;
|
|
23537
|
-
if (this.nodeicon.includes("children")) {
|
|
23538
|
-
depth = this.countDepth(this.nodeicon);
|
|
23539
|
-
}
|
|
23540
|
-
this.setNodeData(this.nodes, depth, depth, null, "icon");
|
|
23541
|
-
}
|
|
23542
|
-
if (this.nodechildren) {
|
|
23543
|
-
var depth = this.countDepth(this.nodechildren);
|
|
23544
|
-
if (depth > 1) {
|
|
23545
|
-
this.nodes = this.setNodeChildren(this.nodes, depth, depth, null);
|
|
23546
|
-
}
|
|
23426
|
+
this.constructZTreeData(this.nodes, this.zTreeNodes);
|
|
23427
|
+
if (this.level > 0) {
|
|
23428
|
+
this.expandTree(this.level, this.zTreeNodes, 0);
|
|
23547
23429
|
}
|
|
23548
23430
|
}
|
|
23549
|
-
this.
|
|
23550
|
-
this.
|
|
23551
|
-
this.
|
|
23552
|
-
this.setting.callback["onCollapse"] = this.onCollapse.bind(this);
|
|
23553
|
-
var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
|
|
23554
|
-
$.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
|
|
23431
|
+
this.zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.zTreeNodes);
|
|
23432
|
+
$.fn.zTreeKeyboardNavigation(this.zTree, $('ul[name="' + this.name + '"]'), null, this.treeicons || defaultTreeIconClass);
|
|
23433
|
+
this.postRenderTree();
|
|
23555
23434
|
};
|
|
23556
|
-
TreeComponent.prototype.
|
|
23557
|
-
|
|
23558
|
-
|
|
23559
|
-
var
|
|
23435
|
+
TreeComponent.prototype.setChecked = function(zNode, node) {
|
|
23436
|
+
var _this = this;
|
|
23437
|
+
node.checked = zNode.checked;
|
|
23438
|
+
var children = base.getEvaluatedData(node, {
|
|
23439
|
+
field: this.nodechildren,
|
|
23440
|
+
bindExpression: this.bindnodechildren
|
|
23441
|
+
}, this.viewParent) || node.children;
|
|
23442
|
+
if (children === null || children === void 0 ? void 0 : children.length) {
|
|
23443
|
+
children.forEach((function(node, index) {
|
|
23444
|
+
_this.setChecked(zNode.children[index], node);
|
|
23445
|
+
}));
|
|
23446
|
+
}
|
|
23447
|
+
};
|
|
23448
|
+
TreeComponent.prototype.selectNode = function(event, node) {
|
|
23449
|
+
var deSelectElm = $(".app-tree[name=" + this.name + "] li[treenode].selected");
|
|
23560
23450
|
deSelectElm.removeClass("selected");
|
|
23561
|
-
|
|
23451
|
+
if (!node) {
|
|
23452
|
+
return;
|
|
23453
|
+
}
|
|
23454
|
+
var selectElm = $("#" + node.tId + ":has(.curSelectedNode)");
|
|
23562
23455
|
selectElm.addClass("selected");
|
|
23456
|
+
var classList = (this.treeClass || "").split(" ");
|
|
23457
|
+
if (classList.includes("Checkbox") || classList.includes("Radio")) {
|
|
23458
|
+
this.setChecked(node, node.data);
|
|
23459
|
+
}
|
|
23460
|
+
var path = this.getPath(node, "");
|
|
23461
|
+
this.selecteditem = core.getClonedObject(node.data) || {};
|
|
23462
|
+
this.selecteditem.path = path;
|
|
23463
|
+
var eventParams = {
|
|
23464
|
+
$event: event,
|
|
23465
|
+
$item: core.getClonedObject(node.data),
|
|
23466
|
+
$path: path
|
|
23467
|
+
};
|
|
23468
|
+
var nodeAction = node.data[this.nodeaction || "action"];
|
|
23469
|
+
if (nodeAction) {
|
|
23470
|
+
core.$parseEvent(nodeAction)(this);
|
|
23471
|
+
}
|
|
23472
|
+
this.invokeEventCallback("select", eventParams);
|
|
23563
23473
|
};
|
|
23564
23474
|
TreeComponent.prototype.expandNode = function(node, expand, eventFlag) {
|
|
23565
|
-
this.
|
|
23475
|
+
this.zTree.expandNode(node, expand, false, false, eventFlag);
|
|
23566
23476
|
var el = $("#" + node.tId + "_switch");
|
|
23567
|
-
$(el).addClass(this.
|
|
23477
|
+
$(el).addClass(this.treeicons || defaultTreeIconClass);
|
|
23568
23478
|
};
|
|
23569
|
-
TreeComponent.prototype.
|
|
23479
|
+
TreeComponent.prototype.postRenderTree = function() {
|
|
23570
23480
|
var _this = this;
|
|
23571
23481
|
setTimeout((function() {
|
|
23572
|
-
_this.changeTreeIcons(_this.
|
|
23573
|
-
if (_this.datavalue) {
|
|
23574
|
-
var nodes = _this.
|
|
23575
|
-
var
|
|
23576
|
-
if (
|
|
23577
|
-
if (
|
|
23578
|
-
|
|
23482
|
+
_this.changeTreeIcons(_this.treeicons || defaultTreeIconClass);
|
|
23483
|
+
if (_this.datavalue && !_this.selecteditem) {
|
|
23484
|
+
var nodes = _this.zTree.getNodes();
|
|
23485
|
+
var node = void 0;
|
|
23486
|
+
if (nodes.length) {
|
|
23487
|
+
if (_this.datavalue === "FirstNode") {
|
|
23488
|
+
node = nodes[0];
|
|
23579
23489
|
}
|
|
23580
|
-
|
|
23581
|
-
|
|
23582
|
-
if (nodes.length) {
|
|
23583
|
-
selectNode = nodes[nodes.length - 1];
|
|
23490
|
+
if (_this.datavalue === "LastNode") {
|
|
23491
|
+
node = nodes[nodes.length - 1];
|
|
23584
23492
|
}
|
|
23585
23493
|
}
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23494
|
+
if (node) {
|
|
23495
|
+
_this.zTree.selectNode(node, false);
|
|
23496
|
+
_this.selectNode(undefined, node);
|
|
23497
|
+
_this.expandNode(node, true, false);
|
|
23498
|
+
}
|
|
23589
23499
|
}
|
|
23590
23500
|
}), 200);
|
|
23591
23501
|
};
|
|
23502
|
+
TreeComponent.prototype.selectById = function(value) {
|
|
23503
|
+
var _a;
|
|
23504
|
+
var simpleNodes = (_a = this.zTree) === null || _a === void 0 ? void 0 : _a.transformToArray(this.zTree.getNodes());
|
|
23505
|
+
var node = simpleNodes === null || simpleNodes === void 0 ? void 0 : simpleNodes.find((function(node) {
|
|
23506
|
+
return value === node.nodeId;
|
|
23507
|
+
}));
|
|
23508
|
+
if (node) {
|
|
23509
|
+
this.zTree.selectNode(node, false);
|
|
23510
|
+
this.selectNode(undefined, node);
|
|
23511
|
+
}
|
|
23512
|
+
};
|
|
23513
|
+
TreeComponent.prototype.deselectById = function(value) {
|
|
23514
|
+
this.selecteditem = {};
|
|
23515
|
+
this.selectById();
|
|
23516
|
+
};
|
|
23592
23517
|
return TreeComponent;
|
|
23593
23518
|
}(base.StylableComponent);
|
|
23594
23519
|
TreeComponent.initializeProps = registerProps();
|
|
@@ -23604,6 +23529,36 @@
|
|
|
23604
23529
|
TreeComponent.ctorParameters = function() {
|
|
23605
23530
|
return [ {
|
|
23606
23531
|
type: core$1.Injector
|
|
23532
|
+
}, {
|
|
23533
|
+
type: undefined,
|
|
23534
|
+
decorators: [ {
|
|
23535
|
+
type: core$1.Attribute,
|
|
23536
|
+
args: [ "datavalue.bind" ]
|
|
23537
|
+
} ]
|
|
23538
|
+
}, {
|
|
23539
|
+
type: undefined,
|
|
23540
|
+
decorators: [ {
|
|
23541
|
+
type: core$1.Attribute,
|
|
23542
|
+
args: [ "nodelabel.bind" ]
|
|
23543
|
+
} ]
|
|
23544
|
+
}, {
|
|
23545
|
+
type: undefined,
|
|
23546
|
+
decorators: [ {
|
|
23547
|
+
type: core$1.Attribute,
|
|
23548
|
+
args: [ "nodeicon.bind" ]
|
|
23549
|
+
} ]
|
|
23550
|
+
}, {
|
|
23551
|
+
type: undefined,
|
|
23552
|
+
decorators: [ {
|
|
23553
|
+
type: core$1.Attribute,
|
|
23554
|
+
args: [ "nodechildren.bind" ]
|
|
23555
|
+
} ]
|
|
23556
|
+
}, {
|
|
23557
|
+
type: undefined,
|
|
23558
|
+
decorators: [ {
|
|
23559
|
+
type: core$1.Attribute,
|
|
23560
|
+
args: [ "nodeid.bind" ]
|
|
23561
|
+
} ]
|
|
23607
23562
|
} ];
|
|
23608
23563
|
};
|
|
23609
23564
|
var components = [ TreeComponent ];
|
|
@@ -32434,7 +32389,11 @@
|
|
|
32434
32389
|
var value = _.get(dataObj, xKey);
|
|
32435
32390
|
if (isLineTypeChart(this.type) && !core.isNumberType(this.xAxisDataType)) {
|
|
32436
32391
|
this.xDataKeyArr.push(value);
|
|
32437
|
-
|
|
32392
|
+
if (value instanceof Date) {
|
|
32393
|
+
return value;
|
|
32394
|
+
} else {
|
|
32395
|
+
return index;
|
|
32396
|
+
}
|
|
32438
32397
|
}
|
|
32439
32398
|
return value;
|
|
32440
32399
|
};
|
|
@@ -42468,9 +42427,6 @@
|
|
|
42468
42427
|
var childNode = item.querySelector("span");
|
|
42469
42428
|
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isacitvepage) === "true") {
|
|
42470
42429
|
item.setAttribute("aria-current", "true");
|
|
42471
|
-
setTimeout((function() {
|
|
42472
|
-
return item.focus();
|
|
42473
|
-
}));
|
|
42474
42430
|
}
|
|
42475
42431
|
if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isdisabled) === "true") {
|
|
42476
42432
|
item.setAttribute("aria-disabled", "true");
|
|
@@ -51245,9 +51201,14 @@
|
|
|
51245
51201
|
}));
|
|
51246
51202
|
} else {
|
|
51247
51203
|
var element = self.$element.find('[wmformfield][key="' + fieldName + '"]');
|
|
51248
|
-
|
|
51249
|
-
|
|
51250
|
-
|
|
51204
|
+
if (!element.length) {
|
|
51205
|
+
element = self.$element.find('[wmformfield][name="' + fieldName + '"]');
|
|
51206
|
+
}
|
|
51207
|
+
if (element.length) {
|
|
51208
|
+
element[0].setAttribute("__errormsg", element[0].getAttribute("__validationId"));
|
|
51209
|
+
(_a = element[0].querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", ngForm.invalid);
|
|
51210
|
+
(_b = element[0].querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", element[0].getAttribute("__validationId"));
|
|
51211
|
+
}
|
|
51251
51212
|
ngForm.markAsTouched();
|
|
51252
51213
|
}
|
|
51253
51214
|
};
|
|
@@ -58699,6 +58660,7 @@
|
|
|
58699
58660
|
_this.heading = heading;
|
|
58700
58661
|
_this.title = title;
|
|
58701
58662
|
_this._isFirstLoad = true;
|
|
58663
|
+
_this._isOnLoadTriggered = false;
|
|
58702
58664
|
_this.$lazyLoad = core.noop;
|
|
58703
58665
|
_this.isActive = false;
|
|
58704
58666
|
_this.disabled = false;
|
|
@@ -58749,6 +58711,10 @@
|
|
|
58749
58711
|
return c.redraw();
|
|
58750
58712
|
}));
|
|
58751
58713
|
}
|
|
58714
|
+
if (!_this._isOnLoadTriggered && !_this.content) {
|
|
58715
|
+
_this.invokeEventCallback("load");
|
|
58716
|
+
_this._isOnLoadTriggered = true;
|
|
58717
|
+
}
|
|
58752
58718
|
}), 100);
|
|
58753
58719
|
};
|
|
58754
58720
|
TabPaneComponent.prototype.notifyParent = function(evt) {
|