@wavemaker/app-runtime-wm-build 11.4.1-rc.5354 → 11.4.2-next.25744
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-loader.js +142 -219
- app-runtime-wm-build/wmapp/scripts/wm-loader.min.js +4 -4
- app-runtime-wm-build/wmapp/styles/css/wm-style.css +1 -1
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.js +143 -220
- app-runtime-wm-build/wmmobile/scripts/wm-mobileloader.min.js +4 -4
- app-runtime-wm-build/wmmobile/styles/css/wm-style.css +1 -1
|
@@ -23185,17 +23185,17 @@
|
|
|
23185
23185
|
var defaultTreeIconClass = "plus-minus";
|
|
23186
23186
|
var TreeComponent = function(_super) {
|
|
23187
23187
|
__extends(TreeComponent, _super);
|
|
23188
|
-
function TreeComponent(inj, bindnodeid) {
|
|
23188
|
+
function TreeComponent(inj, binddatavalue, bindnodelabel, bindnodeicon, bindnodechildren, bindnodeid) {
|
|
23189
23189
|
var _this = _super.call(this, inj, WIDGET_INFO) || this;
|
|
23190
|
+
_this.binddatavalue = binddatavalue;
|
|
23191
|
+
_this.bindnodelabel = bindnodelabel;
|
|
23192
|
+
_this.bindnodeicon = bindnodeicon;
|
|
23193
|
+
_this.bindnodechildren = bindnodechildren;
|
|
23190
23194
|
_this.bindnodeid = bindnodeid;
|
|
23191
23195
|
_this.setting = {
|
|
23192
23196
|
data: {
|
|
23193
23197
|
simpleData: {
|
|
23194
23198
|
enable: false
|
|
23195
|
-
},
|
|
23196
|
-
key: {
|
|
23197
|
-
children: "children",
|
|
23198
|
-
name: "label"
|
|
23199
23199
|
}
|
|
23200
23200
|
},
|
|
23201
23201
|
view: {
|
|
@@ -23209,53 +23209,53 @@
|
|
|
23209
23209
|
callback: {}
|
|
23210
23210
|
};
|
|
23211
23211
|
base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
|
|
23212
|
+
_this.setting.view["nodeClasses"] = _this.setNodeClasses;
|
|
23213
|
+
_this.setting.callback["onClick"] = _this.onClick.bind(_this);
|
|
23214
|
+
_this.setting.callback["onExpand"] = _this.onExpand.bind(_this);
|
|
23215
|
+
_this.setting.callback["onCollapse"] = _this.onCollapse.bind(_this);
|
|
23212
23216
|
return _this;
|
|
23213
23217
|
}
|
|
23214
23218
|
TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
|
|
23215
23219
|
switch (key) {
|
|
23216
23220
|
case "dataset":
|
|
23217
23221
|
this.nodes = this.getNodes(nv);
|
|
23218
|
-
if (this.level > 0) {
|
|
23219
|
-
this.expandTree(this.level, this.nodes, 0);
|
|
23220
|
-
}
|
|
23221
23222
|
this.renderTree();
|
|
23222
23223
|
break;
|
|
23223
23224
|
|
|
23224
23225
|
case "levels":
|
|
23225
|
-
|
|
23226
|
-
this.level = nv;
|
|
23227
|
-
}
|
|
23226
|
+
this.level = nv;
|
|
23228
23227
|
this.renderTree();
|
|
23229
23228
|
break;
|
|
23230
23229
|
|
|
23231
|
-
case "
|
|
23232
|
-
this.
|
|
23230
|
+
case "nodeicon":
|
|
23231
|
+
this.nodeicon = nv;
|
|
23233
23232
|
this.renderTree();
|
|
23234
23233
|
break;
|
|
23235
23234
|
|
|
23236
23235
|
case "nodelabel":
|
|
23237
|
-
this.
|
|
23236
|
+
this.nodelabel = nv;
|
|
23238
23237
|
this.renderTree();
|
|
23239
23238
|
break;
|
|
23240
23239
|
|
|
23241
23240
|
case "nodechildren":
|
|
23242
|
-
this.
|
|
23241
|
+
this.nodechildren = nv;
|
|
23243
23242
|
this.renderTree();
|
|
23244
23243
|
break;
|
|
23245
23244
|
|
|
23246
|
-
case "
|
|
23247
|
-
this.
|
|
23245
|
+
case "orderby":
|
|
23246
|
+
this.orderby = nv;
|
|
23248
23247
|
this.renderTree();
|
|
23249
23248
|
break;
|
|
23250
23249
|
|
|
23251
|
-
case "
|
|
23250
|
+
case "treeicons":
|
|
23251
|
+
this.treeicons = nv;
|
|
23252
23252
|
this.renderTree();
|
|
23253
23253
|
break;
|
|
23254
23254
|
|
|
23255
23255
|
case "class":
|
|
23256
23256
|
this.treeClass = nv;
|
|
23257
|
+
this.setTreeTemplate(this.treeClass);
|
|
23257
23258
|
this.renderTree();
|
|
23258
|
-
break;
|
|
23259
23259
|
|
|
23260
23260
|
default:
|
|
23261
23261
|
_super.prototype.onPropertyChange.call(this, key, nv, ov);
|
|
@@ -23265,9 +23265,9 @@
|
|
|
23265
23265
|
TreeComponent.prototype.expandTree = function(level, node, childLevel) {
|
|
23266
23266
|
var _this = this;
|
|
23267
23267
|
node.map((function(childNode) {
|
|
23268
|
-
var children =
|
|
23269
|
-
if (children &&
|
|
23270
|
-
childNode
|
|
23268
|
+
var children = childNode.children;
|
|
23269
|
+
if (children && childLevel < level) {
|
|
23270
|
+
childNode.open = true;
|
|
23271
23271
|
_this.expandTree(level, children, childLevel + 1);
|
|
23272
23272
|
} else {
|
|
23273
23273
|
childLevel = 0;
|
|
@@ -23276,12 +23276,13 @@
|
|
|
23276
23276
|
}));
|
|
23277
23277
|
};
|
|
23278
23278
|
TreeComponent.prototype.setTreeTemplate = function(value) {
|
|
23279
|
-
|
|
23279
|
+
var classList = value.split(" ");
|
|
23280
|
+
if (classList.includes("Classic")) {
|
|
23280
23281
|
this.setting.check["enable"] = false;
|
|
23281
|
-
} else if (
|
|
23282
|
+
} else if (classList.includes("Checkbox")) {
|
|
23282
23283
|
this.setting.check["enable"] = true;
|
|
23283
23284
|
this.setting.check["chkStyle"] = "checkbox";
|
|
23284
|
-
} else if (
|
|
23285
|
+
} else if (classList.includes("Radio")) {
|
|
23285
23286
|
this.setting.check["enable"] = true;
|
|
23286
23287
|
this.setting.check["chkStyle"] = "radio";
|
|
23287
23288
|
this.setting.check["radioType"] = "all";
|
|
@@ -23308,48 +23309,11 @@
|
|
|
23308
23309
|
}
|
|
23309
23310
|
return nodes;
|
|
23310
23311
|
};
|
|
23311
|
-
TreeComponent.prototype.
|
|
23312
|
+
TreeComponent.prototype.setNodeClasses = function(treeId, treeNode) {
|
|
23312
23313
|
return treeNode.icon ? {
|
|
23313
23314
|
add: [ "" + treeNode.icon ]
|
|
23314
23315
|
} : "";
|
|
23315
23316
|
};
|
|
23316
|
-
TreeComponent.prototype.setNodeData = function(nodes, depth, level, parentNode, type) {
|
|
23317
|
-
var _this = this;
|
|
23318
|
-
if (depth === 0) {
|
|
23319
|
-
nodes.map((function(node) {
|
|
23320
|
-
var children = _this.getChildren(node);
|
|
23321
|
-
if (children) {
|
|
23322
|
-
_this.setNodeData(children, depth, level, parentNode, type);
|
|
23323
|
-
}
|
|
23324
|
-
if (node.icon && _this.nodelabel == "icon") {
|
|
23325
|
-
node[type] = node.icon;
|
|
23326
|
-
} else if (node.name && _this.nodelabel == "name") {
|
|
23327
|
-
node[type] = node.name;
|
|
23328
|
-
} else {
|
|
23329
|
-
return;
|
|
23330
|
-
}
|
|
23331
|
-
}));
|
|
23332
|
-
} else {
|
|
23333
|
-
nodes.map((function(node) {
|
|
23334
|
-
var children = _this.getChildren(node);
|
|
23335
|
-
if (children && level > 1) {
|
|
23336
|
-
if (depth === level) {
|
|
23337
|
-
parentNode = node;
|
|
23338
|
-
}
|
|
23339
|
-
_this.setNodeData(children, depth, level - 1, parentNode, type);
|
|
23340
|
-
}
|
|
23341
|
-
if (level === 1 && (type === "name" ? _this.nodelabel.includes("label") || _this.nodelabel.includes("name") : _this.nodeicon.includes("label") || _this.nodeicon.includes("name"))) {
|
|
23342
|
-
parentNode[type] = node.name || node.label;
|
|
23343
|
-
return;
|
|
23344
|
-
} else if (level === 1 && node.icon !== undefined && (type === "name" ? _this.nodelabel.includes("icon") : _this.nodeicon.includes("icon"))) {
|
|
23345
|
-
parentNode[type] = node.icon;
|
|
23346
|
-
return;
|
|
23347
|
-
} else {
|
|
23348
|
-
return;
|
|
23349
|
-
}
|
|
23350
|
-
}));
|
|
23351
|
-
}
|
|
23352
|
-
};
|
|
23353
23317
|
TreeComponent.prototype.changeTreeIcons = function(nv) {
|
|
23354
23318
|
var eleClose = $('ul[name="' + this.name + '"] li span.button.switch');
|
|
23355
23319
|
$(eleClose).map((function(idx, ele) {
|
|
@@ -23363,15 +23327,15 @@
|
|
|
23363
23327
|
};
|
|
23364
23328
|
TreeComponent.prototype.getPath = function(treeNode, path) {
|
|
23365
23329
|
if (treeNode.getParentNode() === null) {
|
|
23366
|
-
path = "/" + treeNode
|
|
23330
|
+
path = "/" + treeNode.name + path;
|
|
23367
23331
|
} else {
|
|
23368
|
-
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode
|
|
23332
|
+
path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
|
|
23369
23333
|
}
|
|
23370
23334
|
return path;
|
|
23371
23335
|
};
|
|
23372
23336
|
TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
|
|
23373
23337
|
if (this.nodeclick === "expand") {
|
|
23374
|
-
var nodes = this.
|
|
23338
|
+
var nodes = this.zTree.getSelectedNodes();
|
|
23375
23339
|
if (nodes.length > 0) {
|
|
23376
23340
|
this.expandNode(nodes[0], !nodes[0].open, true);
|
|
23377
23341
|
}
|
|
@@ -23383,18 +23347,18 @@
|
|
|
23383
23347
|
var path = this.getPath(treeNode, "");
|
|
23384
23348
|
var eventParams = {
|
|
23385
23349
|
$event: event,
|
|
23386
|
-
$item: treeNode,
|
|
23350
|
+
$item: core.getClonedObject(treeNode.data),
|
|
23387
23351
|
$path: path
|
|
23388
23352
|
};
|
|
23389
23353
|
this.invokeEventCallback("expand", eventParams);
|
|
23390
|
-
var children =
|
|
23354
|
+
var children = treeNode.children;
|
|
23391
23355
|
children === null || children === void 0 ? void 0 : children.map((function(el) {
|
|
23392
23356
|
if (el.isParent) {
|
|
23393
23357
|
var ele_1 = $("#" + el.tId + "_switch");
|
|
23394
|
-
$(ele_1).addClass(self.
|
|
23358
|
+
$(ele_1).addClass(self.treeicons || defaultTreeIconClass);
|
|
23395
23359
|
$(ele_1).on("click", (function(e) {
|
|
23396
23360
|
setTimeout((function() {
|
|
23397
|
-
$(ele_1).addClass(self.
|
|
23361
|
+
$(ele_1).addClass(self.treeicons || defaultTreeIconClass);
|
|
23398
23362
|
}), 0);
|
|
23399
23363
|
}));
|
|
23400
23364
|
}
|
|
@@ -23404,150 +23368,69 @@
|
|
|
23404
23368
|
var path = this.getPath(treeNode, "");
|
|
23405
23369
|
var eventParams = {
|
|
23406
23370
|
$event: event,
|
|
23407
|
-
$item: treeNode,
|
|
23371
|
+
$item: core.getClonedObject(treeNode.data),
|
|
23408
23372
|
$path: path
|
|
23409
23373
|
};
|
|
23410
23374
|
this.invokeEventCallback("collapse", eventParams);
|
|
23411
23375
|
};
|
|
23412
|
-
TreeComponent.prototype.
|
|
23413
|
-
return node[this.childrenKey];
|
|
23414
|
-
};
|
|
23415
|
-
Object.defineProperty(TreeComponent.prototype, "childrenKey", {
|
|
23416
|
-
get: function() {
|
|
23417
|
-
if (!this.nodechildren) {
|
|
23418
|
-
return "children";
|
|
23419
|
-
}
|
|
23420
|
-
var depth = this.countDepth(this.nodechildren);
|
|
23421
|
-
return depth ? this.nodechildren.split(".").pop() : this.nodechildren;
|
|
23422
|
-
},
|
|
23423
|
-
enumerable: false,
|
|
23424
|
-
configurable: true
|
|
23425
|
-
});
|
|
23426
|
-
Object.defineProperty(TreeComponent.prototype, "labelKey", {
|
|
23427
|
-
get: function() {
|
|
23428
|
-
if (!this.nodelabel) {
|
|
23429
|
-
return "label";
|
|
23430
|
-
}
|
|
23431
|
-
var depth = this.countDepth(this.nodelabel);
|
|
23432
|
-
return depth ? this.nodelabel.split(".").pop() : this.nodelabel;
|
|
23433
|
-
},
|
|
23434
|
-
enumerable: false,
|
|
23435
|
-
configurable: true
|
|
23436
|
-
});
|
|
23437
|
-
Object.defineProperty(TreeComponent.prototype, "iconKey", {
|
|
23438
|
-
get: function() {
|
|
23439
|
-
if (!this.nodeicon) {
|
|
23440
|
-
return "icon";
|
|
23441
|
-
}
|
|
23442
|
-
var depth = this.countDepth(this.nodeicon);
|
|
23443
|
-
return depth ? this.nodeicon.split(".").pop() : this.nodeicon;
|
|
23444
|
-
},
|
|
23445
|
-
enumerable: false,
|
|
23446
|
-
configurable: true
|
|
23447
|
-
});
|
|
23448
|
-
Object.defineProperty(TreeComponent.prototype, "treeObj", {
|
|
23449
|
-
get: function() {
|
|
23450
|
-
return $.fn.zTree.getZTreeObj("" + this.name);
|
|
23451
|
-
},
|
|
23452
|
-
enumerable: false,
|
|
23453
|
-
configurable: true
|
|
23454
|
-
});
|
|
23455
|
-
TreeComponent.prototype.modifyObjects = function(array) {
|
|
23376
|
+
TreeComponent.prototype.constructZTreeData = function(data, zTreeData) {
|
|
23456
23377
|
var _this = this;
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
var
|
|
23460
|
-
|
|
23461
|
-
_this.
|
|
23378
|
+
data.forEach((function(node) {
|
|
23379
|
+
var zNode = {};
|
|
23380
|
+
var name = base.getEvaluatedData(node, {
|
|
23381
|
+
field: _this.nodelabel,
|
|
23382
|
+
bindExpression: _this.bindnodelabel
|
|
23383
|
+
}, _this.viewParent) || node.label;
|
|
23384
|
+
var icon = base.getEvaluatedData(node, {
|
|
23385
|
+
field: _this.nodeicon,
|
|
23386
|
+
bindExpression: _this.bindnodeicon
|
|
23387
|
+
}, _this.viewParent) || node.icon;
|
|
23388
|
+
var nodeId = base.getEvaluatedData(node, {
|
|
23389
|
+
field: _this.nodeid,
|
|
23390
|
+
bindExpression: _this.bindnodeid
|
|
23391
|
+
}, _this.viewParent);
|
|
23392
|
+
var children = base.getEvaluatedData(node, {
|
|
23393
|
+
field: _this.nodechildren,
|
|
23394
|
+
bindExpression: _this.bindnodechildren
|
|
23395
|
+
}, _this.viewParent) || node.children;
|
|
23396
|
+
zNode["name"] = name;
|
|
23397
|
+
zNode["icon"] = icon;
|
|
23398
|
+
zNode["nodeId"] = nodeId;
|
|
23399
|
+
zNode["data"] = core.getClonedObject(node);
|
|
23400
|
+
if (_.isArray(children) && children.length) {
|
|
23401
|
+
zNode["children"] = [];
|
|
23402
|
+
_this.constructZTreeData(children, zNode["children"]);
|
|
23462
23403
|
}
|
|
23404
|
+
zTreeData.push(zNode);
|
|
23463
23405
|
}));
|
|
23464
23406
|
};
|
|
23465
|
-
TreeComponent.prototype.setNodeChildren = function(nodes, depth, level, parentNode) {
|
|
23466
|
-
var _this = this;
|
|
23467
|
-
if (depth <= 0) {
|
|
23468
|
-
return nodes;
|
|
23469
|
-
}
|
|
23470
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
23471
|
-
var node = nodes[i];
|
|
23472
|
-
if (depth === level) {
|
|
23473
|
-
parentNode = nodes[i];
|
|
23474
|
-
}
|
|
23475
|
-
var children = this.getChildren(node);
|
|
23476
|
-
if (children === null || children === void 0 ? void 0 : children.length) {
|
|
23477
|
-
if (level === 1) {
|
|
23478
|
-
parentNode[this.childrenKey] = children.map((function(child) {
|
|
23479
|
-
var _a;
|
|
23480
|
-
return _a = {}, _a[_this.labelKey] = child[_this.labelKey], _a[_this.childrenKey] = _this.getChildren(child),
|
|
23481
|
-
_a.icon = child[_this.iconKey], _a;
|
|
23482
|
-
}));
|
|
23483
|
-
return;
|
|
23484
|
-
} else {
|
|
23485
|
-
this.setNodeChildren(children, depth, level - 1, parentNode);
|
|
23486
|
-
}
|
|
23487
|
-
}
|
|
23488
|
-
}
|
|
23489
|
-
return nodes;
|
|
23490
|
-
};
|
|
23491
|
-
TreeComponent.prototype.countDepth = function(str) {
|
|
23492
|
-
var e_1, _a;
|
|
23493
|
-
var regex = /\[.*?\]/g;
|
|
23494
|
-
var matches = str.match(regex);
|
|
23495
|
-
var count = 1;
|
|
23496
|
-
if (matches === null) return count;
|
|
23497
|
-
try {
|
|
23498
|
-
for (var matches_1 = __values(matches), matches_1_1 = matches_1.next(); !matches_1_1.done; matches_1_1 = matches_1.next()) {
|
|
23499
|
-
var match = matches_1_1.value;
|
|
23500
|
-
count++;
|
|
23501
|
-
}
|
|
23502
|
-
} catch (e_1_1) {
|
|
23503
|
-
e_1 = {
|
|
23504
|
-
error: e_1_1
|
|
23505
|
-
};
|
|
23506
|
-
} finally {
|
|
23507
|
-
try {
|
|
23508
|
-
if (matches_1_1 && !matches_1_1.done && (_a = matches_1.return)) _a.call(matches_1);
|
|
23509
|
-
} finally {
|
|
23510
|
-
if (e_1) throw e_1.error;
|
|
23511
|
-
}
|
|
23512
|
-
}
|
|
23513
|
-
return count;
|
|
23514
|
-
};
|
|
23515
23407
|
TreeComponent.prototype.renderTree = function() {
|
|
23516
|
-
|
|
23408
|
+
var _a;
|
|
23409
|
+
this.zTreeNodes = [];
|
|
23410
|
+
if ((_a = this.nodes) === null || _a === void 0 ? void 0 : _a.length) {
|
|
23517
23411
|
this.nativeElement.setAttribute("id", this.name);
|
|
23518
|
-
|
|
23519
|
-
|
|
23520
|
-
|
|
23521
|
-
this.setTreeTemplate(this.treeClass);
|
|
23522
|
-
if (this.nodelabel) {
|
|
23523
|
-
var depth = 0;
|
|
23524
|
-
if (this.nodelabel.includes("children")) {
|
|
23525
|
-
depth = this.countDepth(this.nodelabel);
|
|
23526
|
-
}
|
|
23527
|
-
this.setNodeData(this.nodes, depth, depth, null, "name");
|
|
23528
|
-
}
|
|
23529
|
-
if (this.nodeicon) {
|
|
23530
|
-
var depth = 0;
|
|
23531
|
-
if (this.nodeicon.includes("children")) {
|
|
23532
|
-
depth = this.countDepth(this.nodeicon);
|
|
23533
|
-
}
|
|
23534
|
-
this.setNodeData(this.nodes, depth, depth, null, "icon");
|
|
23535
|
-
}
|
|
23536
|
-
if (this.nodechildren) {
|
|
23537
|
-
var depth = this.countDepth(this.nodechildren);
|
|
23538
|
-
if (depth > 1) {
|
|
23539
|
-
this.nodes = this.setNodeChildren(this.nodes, depth, depth, null);
|
|
23540
|
-
}
|
|
23412
|
+
this.constructZTreeData(this.nodes, this.zTreeNodes);
|
|
23413
|
+
if (this.level > 0) {
|
|
23414
|
+
this.expandTree(this.level, this.zTreeNodes, 0);
|
|
23541
23415
|
}
|
|
23542
23416
|
}
|
|
23543
|
-
this.
|
|
23544
|
-
this.
|
|
23545
|
-
this.setting.callback["onExpand"] = this.onExpand.bind(this);
|
|
23546
|
-
this.setting.callback["onCollapse"] = this.onCollapse.bind(this);
|
|
23547
|
-
var zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.nodes);
|
|
23548
|
-
$.fn.zTreeKeyboardNavigation(zTree, $('ul[name="' + this.name + '"]'), null, this.treeicon || defaultTreeIconClass);
|
|
23417
|
+
this.zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.zTreeNodes);
|
|
23418
|
+
$.fn.zTreeKeyboardNavigation(this.zTree, $('ul[name="' + this.name + '"]'), null, this.treeicons || defaultTreeIconClass);
|
|
23549
23419
|
this.postRenderTree();
|
|
23550
23420
|
};
|
|
23421
|
+
TreeComponent.prototype.setChecked = function(zNode, node) {
|
|
23422
|
+
var _this = this;
|
|
23423
|
+
node.checked = zNode.checked;
|
|
23424
|
+
var children = base.getEvaluatedData(node, {
|
|
23425
|
+
field: this.nodechildren,
|
|
23426
|
+
bindExpression: this.bindnodechildren
|
|
23427
|
+
}, this.viewParent) || node.children;
|
|
23428
|
+
if (children === null || children === void 0 ? void 0 : children.length) {
|
|
23429
|
+
children.forEach((function(node, index) {
|
|
23430
|
+
_this.setChecked(zNode.children[index], node);
|
|
23431
|
+
}));
|
|
23432
|
+
}
|
|
23433
|
+
};
|
|
23551
23434
|
TreeComponent.prototype.selectNode = function(event, node) {
|
|
23552
23435
|
var deSelectElm = $(".app-tree[name=" + this.name + "] li[treenode].selected");
|
|
23553
23436
|
deSelectElm.removeClass("selected");
|
|
@@ -23556,27 +23439,35 @@
|
|
|
23556
23439
|
}
|
|
23557
23440
|
var selectElm = $("#" + node.tId + ":has(.curSelectedNode)");
|
|
23558
23441
|
selectElm.addClass("selected");
|
|
23442
|
+
var classList = (this.treeClass || "").split(" ");
|
|
23443
|
+
if (classList.includes("Checkbox") || classList.includes("Radio")) {
|
|
23444
|
+
this.setChecked(node, node.data);
|
|
23445
|
+
}
|
|
23559
23446
|
var path = this.getPath(node, "");
|
|
23560
|
-
this.selecteditem = core.getClonedObject(node) || {};
|
|
23447
|
+
this.selecteditem = core.getClonedObject(node.data) || {};
|
|
23561
23448
|
this.selecteditem.path = path;
|
|
23562
23449
|
var eventParams = {
|
|
23563
23450
|
$event: event,
|
|
23564
|
-
$item: node,
|
|
23451
|
+
$item: core.getClonedObject(node.data),
|
|
23565
23452
|
$path: path
|
|
23566
23453
|
};
|
|
23454
|
+
var nodeAction = node.data[this.nodeaction || "action"];
|
|
23455
|
+
if (nodeAction) {
|
|
23456
|
+
core.$parseEvent(nodeAction)(this);
|
|
23457
|
+
}
|
|
23567
23458
|
this.invokeEventCallback("select", eventParams);
|
|
23568
23459
|
};
|
|
23569
23460
|
TreeComponent.prototype.expandNode = function(node, expand, eventFlag) {
|
|
23570
|
-
this.
|
|
23461
|
+
this.zTree.expandNode(node, expand, false, false, eventFlag);
|
|
23571
23462
|
var el = $("#" + node.tId + "_switch");
|
|
23572
|
-
$(el).addClass(this.
|
|
23463
|
+
$(el).addClass(this.treeicons || defaultTreeIconClass);
|
|
23573
23464
|
};
|
|
23574
23465
|
TreeComponent.prototype.postRenderTree = function() {
|
|
23575
23466
|
var _this = this;
|
|
23576
23467
|
setTimeout((function() {
|
|
23577
|
-
_this.changeTreeIcons(_this.
|
|
23468
|
+
_this.changeTreeIcons(_this.treeicons || defaultTreeIconClass);
|
|
23578
23469
|
if (_this.datavalue && !_this.selecteditem) {
|
|
23579
|
-
var nodes = _this.
|
|
23470
|
+
var nodes = _this.zTree.getNodes();
|
|
23580
23471
|
var node = void 0;
|
|
23581
23472
|
if (nodes.length) {
|
|
23582
23473
|
if (_this.datavalue === "FirstNode") {
|
|
@@ -23587,7 +23478,7 @@
|
|
|
23587
23478
|
}
|
|
23588
23479
|
}
|
|
23589
23480
|
if (node) {
|
|
23590
|
-
_this.
|
|
23481
|
+
_this.zTree.selectNode(node, false);
|
|
23591
23482
|
_this.selectNode(undefined, node);
|
|
23592
23483
|
_this.expandNode(node, true, false);
|
|
23593
23484
|
}
|
|
@@ -23595,16 +23486,13 @@
|
|
|
23595
23486
|
}), 200);
|
|
23596
23487
|
};
|
|
23597
23488
|
TreeComponent.prototype.selectById = function(value) {
|
|
23598
|
-
var
|
|
23599
|
-
var simpleNodes = this.
|
|
23600
|
-
var node = simpleNodes.find((function(node) {
|
|
23601
|
-
return value ===
|
|
23602
|
-
field: _this.nodeid,
|
|
23603
|
-
bindExpression: _this.bindnodeid
|
|
23604
|
-
}, _this.viewParent);
|
|
23489
|
+
var _a;
|
|
23490
|
+
var simpleNodes = (_a = this.zTree) === null || _a === void 0 ? void 0 : _a.transformToArray(this.zTree.getNodes());
|
|
23491
|
+
var node = simpleNodes === null || simpleNodes === void 0 ? void 0 : simpleNodes.find((function(node) {
|
|
23492
|
+
return value === node.nodeId;
|
|
23605
23493
|
}));
|
|
23606
23494
|
if (node) {
|
|
23607
|
-
this.
|
|
23495
|
+
this.zTree.selectNode(node, false);
|
|
23608
23496
|
this.selectNode(undefined, node);
|
|
23609
23497
|
}
|
|
23610
23498
|
};
|
|
@@ -23627,6 +23515,30 @@
|
|
|
23627
23515
|
TreeComponent.ctorParameters = function() {
|
|
23628
23516
|
return [ {
|
|
23629
23517
|
type: core$1.Injector
|
|
23518
|
+
}, {
|
|
23519
|
+
type: undefined,
|
|
23520
|
+
decorators: [ {
|
|
23521
|
+
type: core$1.Attribute,
|
|
23522
|
+
args: [ "datavalue.bind" ]
|
|
23523
|
+
} ]
|
|
23524
|
+
}, {
|
|
23525
|
+
type: undefined,
|
|
23526
|
+
decorators: [ {
|
|
23527
|
+
type: core$1.Attribute,
|
|
23528
|
+
args: [ "nodelabel.bind" ]
|
|
23529
|
+
} ]
|
|
23530
|
+
}, {
|
|
23531
|
+
type: undefined,
|
|
23532
|
+
decorators: [ {
|
|
23533
|
+
type: core$1.Attribute,
|
|
23534
|
+
args: [ "nodeicon.bind" ]
|
|
23535
|
+
} ]
|
|
23536
|
+
}, {
|
|
23537
|
+
type: undefined,
|
|
23538
|
+
decorators: [ {
|
|
23539
|
+
type: core$1.Attribute,
|
|
23540
|
+
args: [ "nodechildren.bind" ]
|
|
23541
|
+
} ]
|
|
23630
23542
|
}, {
|
|
23631
23543
|
type: undefined,
|
|
23632
23544
|
decorators: [ {
|
|
@@ -32463,7 +32375,11 @@
|
|
|
32463
32375
|
var value = _.get(dataObj, xKey);
|
|
32464
32376
|
if (isLineTypeChart(this.type) && !core.isNumberType(this.xAxisDataType)) {
|
|
32465
32377
|
this.xDataKeyArr.push(value);
|
|
32466
|
-
|
|
32378
|
+
if (value instanceof Date) {
|
|
32379
|
+
return value;
|
|
32380
|
+
} else {
|
|
32381
|
+
return index;
|
|
32382
|
+
}
|
|
32467
32383
|
}
|
|
32468
32384
|
return value;
|
|
32469
32385
|
};
|
|
@@ -51271,9 +51187,11 @@
|
|
|
51271
51187
|
}));
|
|
51272
51188
|
} else {
|
|
51273
51189
|
var element = self.$element.find('[wmformfield][key="' + fieldName + '"]');
|
|
51274
|
-
|
|
51275
|
-
|
|
51276
|
-
|
|
51190
|
+
if (element.length) {
|
|
51191
|
+
element[0].setAttribute("__errormsg", element[0].getAttribute("__validationId"));
|
|
51192
|
+
(_a = element[0].querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", ngForm.invalid);
|
|
51193
|
+
(_b = element[0].querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", element[0].getAttribute("__validationId"));
|
|
51194
|
+
}
|
|
51277
51195
|
ngForm.markAsTouched();
|
|
51278
51196
|
}
|
|
51279
51197
|
};
|
|
@@ -58725,6 +58643,7 @@
|
|
|
58725
58643
|
_this.heading = heading;
|
|
58726
58644
|
_this.title = title;
|
|
58727
58645
|
_this._isFirstLoad = true;
|
|
58646
|
+
_this._isOnLoadTriggered = false;
|
|
58728
58647
|
_this.$lazyLoad = core.noop;
|
|
58729
58648
|
_this.isActive = false;
|
|
58730
58649
|
_this.disabled = false;
|
|
@@ -58775,6 +58694,10 @@
|
|
|
58775
58694
|
return c.redraw();
|
|
58776
58695
|
}));
|
|
58777
58696
|
}
|
|
58697
|
+
if (!_this._isOnLoadTriggered && !_this.content) {
|
|
58698
|
+
_this.invokeEventCallback("load");
|
|
58699
|
+
_this._isOnLoadTriggered = true;
|
|
58700
|
+
}
|
|
58778
58701
|
}), 100);
|
|
58779
58702
|
};
|
|
58780
58703
|
TabPaneComponent.prototype.notifyParent = function(evt) {
|