@wavemaker/app-runtime-wm-build 11.4.0-rc.5351 → 11.4.1-next.140983

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.
@@ -4387,7 +4387,7 @@
4387
4387
  }();
4388
4388
  var MINIMUM_MOBILE_WIDTH = 480;
4389
4389
  var MINIMUM_TAB_WIDTH = 768;
4390
- var MINIMUM_LARGE_SCREEN_WIDTH = 1280;
4390
+ var MINIMUM_LARGE_SCREEN_WIDTH = 1200;
4391
4391
  var IViewportService = function() {
4392
4392
  function IViewportService() {}
4393
4393
  return IViewportService;
@@ -4472,11 +4472,13 @@
4472
4472
  } else {
4473
4473
  MINIMUM_MOBILE_WIDTH = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-xs")) || 480;
4474
4474
  MINIMUM_TAB_WIDTH = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-sm")) || 768;
4475
- if (minValue >= MINIMUM_MOBILE_WIDTH && maxValue >= MINIMUM_TAB_WIDTH) {
4475
+ MINIMUM_LARGE_SCREEN_WIDTH = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--screen-lg")) || 1200;
4476
+ if (this.screenWidth >= MINIMUM_LARGE_SCREEN_WIDTH) {
4477
+ this.isTabletType = isAndroid() || isIos() || isAndroidTablet();
4478
+ this.isMobileType = false;
4479
+ } else if (this.screenWidth >= MINIMUM_TAB_WIDTH) {
4476
4480
  this.type = 1;
4477
- if (isAndroid() || isIos() || isAndroidTablet()) {
4478
- this.isTabletType = true;
4479
- }
4481
+ this.isTabletType = true;
4480
4482
  } else {
4481
4483
  this.type = 0;
4482
4484
  this.isMobileType = true;
@@ -17102,6 +17104,10 @@
17102
17104
  value: 0
17103
17105
  }, base.PROP_NUMBER) ], [ "uncheckedvalue", Object.assign({
17104
17106
  value: false
17107
+ }, base.PROP_STRING) ], [ "togglewithicon", base.PROP_BOOLEAN ], [ "checkedicon", Object.assign({
17108
+ value: "wi wi-done"
17109
+ }, base.PROP_STRING) ], [ "uncheckedicon", Object.assign({
17110
+ value: "wi wi-close"
17105
17111
  }, base.PROP_STRING) ] ]);
17106
17112
  var registerProps$c = function() {
17107
17113
  base.register("wm-checkbox", checkboxProps);
@@ -17188,6 +17194,16 @@
17188
17194
  type: "change"
17189
17195
  }, this.ngModel.valid);
17190
17196
  };
17197
+ CheckboxComponent.prototype.getColor = function() {
17198
+ var labelElement = $("div[widget-id='" + this.widgetId + "'] label");
17199
+ var bgcolor = $(labelElement).css("background-color");
17200
+ return bgcolor;
17201
+ };
17202
+ CheckboxComponent.prototype.onMouseOver = function() {
17203
+ var labelElement = $("div.app-toggle[widget-id='" + this.widgetId + "'] label");
17204
+ var bgcolor = $(labelElement).css("background-color");
17205
+ document.documentElement.style.setProperty("--boxAfterBackColor", bgcolor);
17206
+ };
17191
17207
  CheckboxComponent.prototype.onKeyDown = function($event) {
17192
17208
  $event.preventDefault();
17193
17209
  this.checkboxEl.nativeElement.click();
@@ -17203,7 +17219,7 @@
17203
17219
  type: core.Component,
17204
17220
  args: [ {
17205
17221
  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 <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',
17222
+ 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" ng-if="!isNativeMobileApplicationType">\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
17223
  providers: [ base.provideAs(CheckboxComponent, forms.NG_VALUE_ACCESSOR, true), base.provideAs(CheckboxComponent, forms.NG_VALIDATORS, true), base.provideAsWidgetRef(CheckboxComponent) ]
17208
17224
  } ]
17209
17225
  } ];
@@ -22301,17 +22317,11 @@
22301
22317
  });
22302
22318
  };
22303
22319
  SearchComponent.prototype.onFocusOut = function() {
22304
- var _this = this;
22305
22320
  this._unsubscribeDv = false;
22306
22321
  this._loadingItems = false;
22307
22322
  this.page = 1;
22308
22323
  if (!this._domUpdated && this._isOpen) {
22309
22324
  this.listenQuery = false;
22310
- setTimeout((function() {
22311
- if (_this.typeahead._typeahead.isShown) {
22312
- _this.typeahead.hide();
22313
- }
22314
- }), 200);
22315
22325
  }
22316
22326
  this._isOpen = false;
22317
22327
  if (this._domUpdated && this.typeahead && this.typeahead._container) {
@@ -23185,16 +23195,17 @@
23185
23195
  var defaultTreeIconClass = "plus-minus";
23186
23196
  var TreeComponent = function(_super) {
23187
23197
  __extends(TreeComponent, _super);
23188
- function TreeComponent(inj) {
23198
+ function TreeComponent(inj, binddatavalue, bindnodelabel, bindnodeicon, bindnodechildren, bindnodeid) {
23189
23199
  var _this = _super.call(this, inj, WIDGET_INFO) || this;
23200
+ _this.binddatavalue = binddatavalue;
23201
+ _this.bindnodelabel = bindnodelabel;
23202
+ _this.bindnodeicon = bindnodeicon;
23203
+ _this.bindnodechildren = bindnodechildren;
23204
+ _this.bindnodeid = bindnodeid;
23190
23205
  _this.setting = {
23191
23206
  data: {
23192
23207
  simpleData: {
23193
23208
  enable: false
23194
- },
23195
- key: {
23196
- children: "children",
23197
- name: "label"
23198
23209
  }
23199
23210
  },
23200
23211
  view: {
@@ -23208,53 +23219,53 @@
23208
23219
  callback: {}
23209
23220
  };
23210
23221
  base.styler(_this.nativeElement, _this, base.APPLY_STYLES_TYPE.CONTAINER);
23222
+ _this.setting.view["nodeClasses"] = _this.setNodeClasses;
23223
+ _this.setting.callback["onClick"] = _this.onClick.bind(_this);
23224
+ _this.setting.callback["onExpand"] = _this.onExpand.bind(_this);
23225
+ _this.setting.callback["onCollapse"] = _this.onCollapse.bind(_this);
23211
23226
  return _this;
23212
23227
  }
23213
23228
  TreeComponent.prototype.onPropertyChange = function(key, nv, ov) {
23214
23229
  switch (key) {
23215
23230
  case "dataset":
23216
23231
  this.nodes = this.getNodes(nv);
23217
- if (this.level > 0) {
23218
- this.expandTree(this.level, this.nodes, 0);
23219
- }
23220
23232
  this.renderTree();
23221
23233
  break;
23222
23234
 
23223
23235
  case "levels":
23224
- if (nv > 0) {
23225
- this.level = nv;
23226
- }
23236
+ this.level = nv;
23227
23237
  this.renderTree();
23228
23238
  break;
23229
23239
 
23230
- case "treeicons":
23231
- this.treeicon = nv;
23240
+ case "nodeicon":
23241
+ this.nodeicon = nv;
23232
23242
  this.renderTree();
23233
23243
  break;
23234
23244
 
23235
23245
  case "nodelabel":
23236
- this.setting.data.key.name = this.labelKey;
23246
+ this.nodelabel = nv;
23237
23247
  this.renderTree();
23238
23248
  break;
23239
23249
 
23240
23250
  case "nodechildren":
23241
- this.setting.data.key.children = this.childrenKey;
23251
+ this.nodechildren = nv;
23242
23252
  this.renderTree();
23243
23253
  break;
23244
23254
 
23245
- case "nodeicon":
23246
- this.nodeicon = this.iconKey;
23255
+ case "orderby":
23256
+ this.orderby = nv;
23247
23257
  this.renderTree();
23248
23258
  break;
23249
23259
 
23250
- case "orderby":
23260
+ case "treeicons":
23261
+ this.treeicons = nv;
23251
23262
  this.renderTree();
23252
23263
  break;
23253
23264
 
23254
23265
  case "class":
23255
23266
  this.treeClass = nv;
23267
+ this.setTreeTemplate(this.treeClass);
23256
23268
  this.renderTree();
23257
- break;
23258
23269
 
23259
23270
  default:
23260
23271
  _super.prototype.onPropertyChange.call(this, key, nv, ov);
@@ -23264,9 +23275,9 @@
23264
23275
  TreeComponent.prototype.expandTree = function(level, node, childLevel) {
23265
23276
  var _this = this;
23266
23277
  node.map((function(childNode) {
23267
- var children = _this.getChildren(childNode);
23268
- if (children && !("open" in childNode) && childLevel < level) {
23269
- childNode["open"] = true;
23278
+ var children = childNode.children;
23279
+ if (children && childLevel < level) {
23280
+ childNode.open = true;
23270
23281
  _this.expandTree(level, children, childLevel + 1);
23271
23282
  } else {
23272
23283
  childLevel = 0;
@@ -23275,12 +23286,13 @@
23275
23286
  }));
23276
23287
  };
23277
23288
  TreeComponent.prototype.setTreeTemplate = function(value) {
23278
- if (value === "Classic") {
23289
+ var classList = value.split(" ");
23290
+ if (classList.includes("Classic")) {
23279
23291
  this.setting.check["enable"] = false;
23280
- } else if (value === "Checkbox") {
23292
+ } else if (classList.includes("Checkbox")) {
23281
23293
  this.setting.check["enable"] = true;
23282
23294
  this.setting.check["chkStyle"] = "checkbox";
23283
- } else if (value === "Radio") {
23295
+ } else if (classList.includes("Radio")) {
23284
23296
  this.setting.check["enable"] = true;
23285
23297
  this.setting.check["chkStyle"] = "radio";
23286
23298
  this.setting.check["radioType"] = "all";
@@ -23307,48 +23319,11 @@
23307
23319
  }
23308
23320
  return nodes;
23309
23321
  };
23310
- TreeComponent.prototype.setNodeclasses = function(treeId, treeNode) {
23322
+ TreeComponent.prototype.setNodeClasses = function(treeId, treeNode) {
23311
23323
  return treeNode.icon ? {
23312
23324
  add: [ "" + treeNode.icon ]
23313
23325
  } : "";
23314
23326
  };
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
23327
  TreeComponent.prototype.changeTreeIcons = function(nv) {
23353
23328
  var eleClose = $('ul[name="' + this.name + '"] li span.button.switch');
23354
23329
  $(eleClose).map((function(idx, ele) {
@@ -23362,45 +23337,38 @@
23362
23337
  };
23363
23338
  TreeComponent.prototype.getPath = function(treeNode, path) {
23364
23339
  if (treeNode.getParentNode() === null) {
23365
- path = "/" + treeNode[this.labelKey] + path;
23340
+ path = "/" + treeNode.name + path;
23366
23341
  } else {
23367
- path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode[this.labelKey];
23342
+ path = this.getPath(treeNode.getParentNode(), path) + "/" + treeNode.name;
23368
23343
  }
23369
23344
  return path;
23370
23345
  };
23371
23346
  TreeComponent.prototype.onClick = function(event, treeId, treeNode, clickFlag) {
23372
23347
  if (this.nodeclick === "expand") {
23373
- var nodes = this.treeObj.getSelectedNodes();
23348
+ var nodes = this.zTree.getSelectedNodes();
23374
23349
  if (nodes.length > 0) {
23375
23350
  this.expandNode(nodes[0], !nodes[0].open, true);
23376
23351
  }
23377
23352
  }
23378
- var path = this.getPath(treeNode, "");
23379
- var eventParams = {
23380
- $event: event,
23381
- $item: treeNode,
23382
- $path: path
23383
- };
23384
- this.setSelectedItem(treeNode);
23385
- this.invokeEventCallback("select", eventParams);
23353
+ this.selectNode(event, treeNode);
23386
23354
  };
23387
23355
  TreeComponent.prototype.onExpand = function(event, treeId, treeNode) {
23388
23356
  var self = this;
23389
23357
  var path = this.getPath(treeNode, "");
23390
23358
  var eventParams = {
23391
23359
  $event: event,
23392
- $item: treeNode,
23360
+ $item: core.getClonedObject(treeNode.data),
23393
23361
  $path: path
23394
23362
  };
23395
23363
  this.invokeEventCallback("expand", eventParams);
23396
- var children = this.getChildren(treeNode);
23364
+ var children = treeNode.children;
23397
23365
  children === null || children === void 0 ? void 0 : children.map((function(el) {
23398
23366
  if (el.isParent) {
23399
23367
  var ele_1 = $("#" + el.tId + "_switch");
23400
- $(ele_1).addClass(self.treeicon || defaultTreeIconClass);
23368
+ $(ele_1).addClass(self.treeicons || defaultTreeIconClass);
23401
23369
  $(ele_1).on("click", (function(e) {
23402
23370
  setTimeout((function() {
23403
- $(ele_1).addClass(self.treeicon || defaultTreeIconClass);
23371
+ $(ele_1).addClass(self.treeicons || defaultTreeIconClass);
23404
23372
  }), 0);
23405
23373
  }));
23406
23374
  }
@@ -23410,185 +23378,138 @@
23410
23378
  var path = this.getPath(treeNode, "");
23411
23379
  var eventParams = {
23412
23380
  $event: event,
23413
- $item: treeNode,
23381
+ $item: core.getClonedObject(treeNode.data),
23414
23382
  $path: path
23415
23383
  };
23416
23384
  this.invokeEventCallback("collapse", eventParams);
23417
23385
  };
23418
- TreeComponent.prototype.getChildren = function(node) {
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) {
23386
+ TreeComponent.prototype.constructZTreeData = function(data, zTreeData) {
23462
23387
  var _this = this;
23463
- array.forEach((function(obj) {
23464
- obj.icon = obj[_this.nodeicon];
23465
- var children = _this.getChildren(obj);
23466
- if (children === null || children === void 0 ? void 0 : children.length) {
23467
- _this.modifyObjects(children);
23388
+ data.forEach((function(node) {
23389
+ var zNode = {};
23390
+ var name = base.getEvaluatedData(node, {
23391
+ field: _this.nodelabel,
23392
+ bindExpression: _this.bindnodelabel
23393
+ }, _this.viewParent) || node.label;
23394
+ var icon = base.getEvaluatedData(node, {
23395
+ field: _this.nodeicon,
23396
+ bindExpression: _this.bindnodeicon
23397
+ }, _this.viewParent) || node.icon;
23398
+ var nodeId = base.getEvaluatedData(node, {
23399
+ field: _this.nodeid,
23400
+ bindExpression: _this.bindnodeid
23401
+ }, _this.viewParent);
23402
+ var children = base.getEvaluatedData(node, {
23403
+ field: _this.nodechildren,
23404
+ bindExpression: _this.bindnodechildren
23405
+ }, _this.viewParent) || node.children;
23406
+ zNode["name"] = name;
23407
+ zNode["icon"] = icon;
23408
+ zNode["nodeId"] = nodeId;
23409
+ zNode["data"] = core.getClonedObject(node);
23410
+ if (_.isArray(children) && children.length) {
23411
+ zNode["children"] = [];
23412
+ _this.constructZTreeData(children, zNode["children"]);
23468
23413
  }
23414
+ zTreeData.push(zNode);
23469
23415
  }));
23470
23416
  };
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
23417
  TreeComponent.prototype.renderTree = function() {
23522
- if (this.nodes) {
23418
+ var _a;
23419
+ this.zTreeNodes = [];
23420
+ if ((_a = this.nodes) === null || _a === void 0 ? void 0 : _a.length) {
23523
23421
  this.nativeElement.setAttribute("id", this.name);
23524
- if (this.nodeicon && this.nodeicon !== "icon") {
23525
- this.modifyObjects(this.nodes);
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
- }
23422
+ this.constructZTreeData(this.nodes, this.zTreeNodes);
23423
+ if (this.level > 0) {
23424
+ this.expandTree(this.level, this.zTreeNodes, 0);
23547
23425
  }
23548
23426
  }
23549
- this.setting.view["nodeClasses"] = this.setNodeclasses;
23550
- this.setting.callback["onClick"] = this.onClick.bind(this);
23551
- this.setting.callback["onExpand"] = this.onExpand.bind(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);
23427
+ this.zTree = $.fn.zTree.init($('ul[name="' + this.name + '"]'), this.setting, this.zTreeNodes);
23428
+ $.fn.zTreeKeyboardNavigation(this.zTree, $('ul[name="' + this.name + '"]'), null, this.treeicons || defaultTreeIconClass);
23429
+ this.postRenderTree();
23555
23430
  };
23556
- TreeComponent.prototype.setSelectedItem = function(treeNode) {
23557
- this.selecteditem = core.getClonedObject(treeNode) || {};
23558
- this.selecteditem.path = this.getPath(treeNode, "");
23559
- var deSelectElm = $("li[treenode].selected");
23431
+ TreeComponent.prototype.setChecked = function(zNode, node) {
23432
+ var _this = this;
23433
+ node.checked = zNode.checked;
23434
+ var children = base.getEvaluatedData(node, {
23435
+ field: this.nodechildren,
23436
+ bindExpression: this.bindnodechildren
23437
+ }, this.viewParent) || node.children;
23438
+ if (children === null || children === void 0 ? void 0 : children.length) {
23439
+ children.forEach((function(node, index) {
23440
+ _this.setChecked(zNode.children[index], node);
23441
+ }));
23442
+ }
23443
+ };
23444
+ TreeComponent.prototype.selectNode = function(event, node) {
23445
+ var deSelectElm = $(".app-tree[name=" + this.name + "] li[treenode].selected");
23560
23446
  deSelectElm.removeClass("selected");
23561
- var selectElm = $("#" + treeNode.tId + ":has(.curSelectedNode)");
23447
+ if (!node) {
23448
+ return;
23449
+ }
23450
+ var selectElm = $("#" + node.tId + ":has(.curSelectedNode)");
23562
23451
  selectElm.addClass("selected");
23452
+ var classList = (this.treeClass || "").split(" ");
23453
+ if (classList.includes("Checkbox") || classList.includes("Radio")) {
23454
+ this.setChecked(node, node.data);
23455
+ }
23456
+ var path = this.getPath(node, "");
23457
+ this.selecteditem = core.getClonedObject(node.data) || {};
23458
+ this.selecteditem.path = path;
23459
+ var eventParams = {
23460
+ $event: event,
23461
+ $item: core.getClonedObject(node.data),
23462
+ $path: path
23463
+ };
23464
+ var nodeAction = node.data[this.nodeaction || "action"];
23465
+ if (nodeAction) {
23466
+ core.$parseEvent(nodeAction)(this);
23467
+ }
23468
+ this.invokeEventCallback("select", eventParams);
23563
23469
  };
23564
23470
  TreeComponent.prototype.expandNode = function(node, expand, eventFlag) {
23565
- this.treeObj.expandNode(node, expand, false, false, eventFlag);
23471
+ this.zTree.expandNode(node, expand, false, false, eventFlag);
23566
23472
  var el = $("#" + node.tId + "_switch");
23567
- $(el).addClass(this.treeicon || defaultTreeIconClass);
23473
+ $(el).addClass(this.treeicons || defaultTreeIconClass);
23568
23474
  };
23569
- TreeComponent.prototype.ngAfterViewInit = function() {
23475
+ TreeComponent.prototype.postRenderTree = function() {
23570
23476
  var _this = this;
23571
23477
  setTimeout((function() {
23572
- _this.changeTreeIcons(_this.treeicon || defaultTreeIconClass);
23573
- if (_this.datavalue) {
23574
- var nodes = _this.treeObj.getNodes();
23575
- var selectNode = void 0;
23576
- if (_this.datavalue === "FirstNode") {
23577
- if (nodes.length) {
23578
- selectNode = nodes[0];
23478
+ _this.changeTreeIcons(_this.treeicons || defaultTreeIconClass);
23479
+ if (_this.datavalue && !_this.selecteditem) {
23480
+ var nodes = _this.zTree.getNodes();
23481
+ var node = void 0;
23482
+ if (nodes.length) {
23483
+ if (_this.datavalue === "FirstNode") {
23484
+ node = nodes[0];
23579
23485
  }
23580
- }
23581
- if (_this.datavalue === "LastNode") {
23582
- if (nodes.length) {
23583
- selectNode = nodes[nodes.length - 1];
23486
+ if (_this.datavalue === "LastNode") {
23487
+ node = nodes[nodes.length - 1];
23584
23488
  }
23585
23489
  }
23586
- _this.treeObj.selectNode(selectNode, false);
23587
- _this.setSelectedItem(selectNode);
23588
- _this.expandNode(selectNode, true, false);
23490
+ if (node) {
23491
+ _this.zTree.selectNode(node, false);
23492
+ _this.selectNode(undefined, node);
23493
+ _this.expandNode(node, true, false);
23494
+ }
23589
23495
  }
23590
23496
  }), 200);
23591
23497
  };
23498
+ TreeComponent.prototype.selectById = function(value) {
23499
+ var _a;
23500
+ var simpleNodes = (_a = this.zTree) === null || _a === void 0 ? void 0 : _a.transformToArray(this.zTree.getNodes());
23501
+ var node = simpleNodes === null || simpleNodes === void 0 ? void 0 : simpleNodes.find((function(node) {
23502
+ return value === node.nodeId;
23503
+ }));
23504
+ if (node) {
23505
+ this.zTree.selectNode(node, false);
23506
+ this.selectNode(undefined, node);
23507
+ }
23508
+ };
23509
+ TreeComponent.prototype.deselectById = function(value) {
23510
+ this.selecteditem = {};
23511
+ this.selectById();
23512
+ };
23592
23513
  return TreeComponent;
23593
23514
  }(base.StylableComponent);
23594
23515
  TreeComponent.initializeProps = registerProps();
@@ -23604,6 +23525,36 @@
23604
23525
  TreeComponent.ctorParameters = function() {
23605
23526
  return [ {
23606
23527
  type: core$1.Injector
23528
+ }, {
23529
+ type: undefined,
23530
+ decorators: [ {
23531
+ type: core$1.Attribute,
23532
+ args: [ "datavalue.bind" ]
23533
+ } ]
23534
+ }, {
23535
+ type: undefined,
23536
+ decorators: [ {
23537
+ type: core$1.Attribute,
23538
+ args: [ "nodelabel.bind" ]
23539
+ } ]
23540
+ }, {
23541
+ type: undefined,
23542
+ decorators: [ {
23543
+ type: core$1.Attribute,
23544
+ args: [ "nodeicon.bind" ]
23545
+ } ]
23546
+ }, {
23547
+ type: undefined,
23548
+ decorators: [ {
23549
+ type: core$1.Attribute,
23550
+ args: [ "nodechildren.bind" ]
23551
+ } ]
23552
+ }, {
23553
+ type: undefined,
23554
+ decorators: [ {
23555
+ type: core$1.Attribute,
23556
+ args: [ "nodeid.bind" ]
23557
+ } ]
23607
23558
  } ];
23608
23559
  };
23609
23560
  var components = [ TreeComponent ];
@@ -28261,8 +28212,11 @@
28261
28212
  return core$1.getFormattedDate(this.datePipe, this.bsDataValue, this.outputformat, this.timeZone, null, this.isCurrentDate, this) || "";
28262
28213
  },
28263
28214
  set: function(newVal) {
28215
+ var _this = this;
28264
28216
  if (newVal === CURRENT_DATE$1) {
28265
- this.bsDataValue = this.timeZone ? core$1.getMomentLocaleObject(this.timeZone) : new Date;
28217
+ setTimeout((function() {
28218
+ _this.bsDataValue = _this.timeZone ? core$1.getMomentLocaleObject(_this.timeZone) : new Date;
28219
+ }), 50);
28266
28220
  this.isCurrentDate = true;
28267
28221
  } else {
28268
28222
  this.bsDataValue = newVal ? core$1.getDateObj(newVal, {
@@ -32434,7 +32388,11 @@
32434
32388
  var value = _.get(dataObj, xKey);
32435
32389
  if (isLineTypeChart(this.type) && !core.isNumberType(this.xAxisDataType)) {
32436
32390
  this.xDataKeyArr.push(value);
32437
- return value;
32391
+ if (value instanceof Date) {
32392
+ return value;
32393
+ } else {
32394
+ return index;
32395
+ }
32438
32396
  }
32439
32397
  return value;
32440
32398
  };
@@ -42468,9 +42426,6 @@
42468
42426
  var childNode = item.querySelector("span");
42469
42427
  if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isacitvepage) === "true") {
42470
42428
  item.setAttribute("aria-current", "true");
42471
- setTimeout((function() {
42472
- return item.focus();
42473
- }));
42474
42429
  }
42475
42430
  if ((childNode === null || childNode === void 0 ? void 0 : childNode.dataset.isdisabled) === "true") {
42476
42431
  item.setAttribute("aria-disabled", "true");
@@ -51245,9 +51200,14 @@
51245
51200
  }));
51246
51201
  } else {
51247
51202
  var element = self.$element.find('[wmformfield][key="' + fieldName + '"]');
51248
- element[0].setAttribute("__errormsg", element[0].getAttribute("__validationId"));
51249
- (_a = element[0].querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", ngForm.invalid);
51250
- (_b = element[0].querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", element[0].getAttribute("__validationId"));
51203
+ if (!element.length) {
51204
+ element = self.$element.find('[wmformfield][name="' + fieldName + '"]');
51205
+ }
51206
+ if (element.length) {
51207
+ element[0].setAttribute("__errormsg", element[0].getAttribute("__validationId"));
51208
+ (_a = element[0].querySelector("input")) === null || _a === void 0 ? void 0 : _a.setAttribute("aria-invalid", ngForm.invalid);
51209
+ (_b = element[0].querySelector("input")) === null || _b === void 0 ? void 0 : _b.setAttribute("aria-describedby", element[0].getAttribute("__validationId"));
51210
+ }
51251
51211
  ngForm.markAsTouched();
51252
51212
  }
51253
51213
  };
@@ -58667,7 +58627,9 @@
58667
58627
  value: true
58668
58628
  }, base.PROP_BOOLEAN) ], [ "statehandler", Object.assign({
58669
58629
  value: "none"
58670
- }, base.PROP_STRING) ], [ "transition", base.PROP_STRING ], [ "type", base.PROP_STRING ] ]);
58630
+ }, base.PROP_STRING) ], [ "transition", base.PROP_STRING ], [ "type", base.PROP_STRING ], [ "tabwithicon", base.PROP_BOOLEAN ], [ "iconposition", Object.assign({
58631
+ value: "left"
58632
+ }, base.PROP_STRING) ] ]);
58671
58633
  if (core.isMobileApp()) {
58672
58634
  props.set("transition", Object.assign({
58673
58635
  value: "slide"
@@ -58678,7 +58640,9 @@
58678
58640
  var registerProps = function() {
58679
58641
  base.register("wm-tabpane", new Map([ [ "active", base.PROP_BOOLEAN ], [ "badgevalue", base.PROP_STRING ], [ "badgetype", Object.assign({
58680
58642
  value: "default"
58681
- }, base.PROP_STRING) ], [ "class", base.PROP_STRING ], [ "content", base.PROP_STRING ], [ "disabled", base.PROP_BOOLEAN ], [ "dynamicPaneIndex", base.PROP_NUMBER ], [ "heading", base.PROP_STRING ], [ "isdefaulttab", base.PROP_STRING ], [ "isdynamic", base.PROP_BOOLEAN ], [ "name", base.PROP_STRING ], [ "paneicon", base.PROP_STRING ], [ "show", Object.assign({
58643
+ }, base.PROP_STRING) ], [ "class", base.PROP_STRING ], [ "content", base.PROP_STRING ], [ "disabled", base.PROP_BOOLEAN ], [ "dynamicPaneIndex", base.PROP_NUMBER ], [ "heading", base.PROP_STRING ], [ "isdefaulttab", base.PROP_STRING ], [ "isdynamic", base.PROP_BOOLEAN ], [ "name", base.PROP_STRING ], [ "paneicon", Object.assign({
58644
+ value: "wi wi-home"
58645
+ }, base.PROP_STRING) ], [ "show", Object.assign({
58682
58646
  value: true
58683
58647
  }, base.PROP_BOOLEAN) ], [ "smoothscroll", Object.assign({
58684
58648
  value: false
@@ -58699,6 +58663,7 @@
58699
58663
  _this.heading = heading;
58700
58664
  _this.title = title;
58701
58665
  _this._isFirstLoad = true;
58666
+ _this._isOnLoadTriggered = false;
58702
58667
  _this.$lazyLoad = core.noop;
58703
58668
  _this.isActive = false;
58704
58669
  _this.disabled = false;
@@ -58749,6 +58714,10 @@
58749
58714
  return c.redraw();
58750
58715
  }));
58751
58716
  }
58717
+ if (!_this._isOnLoadTriggered && !_this.content) {
58718
+ _this.invokeEventCallback("load");
58719
+ _this._isOnLoadTriggered = true;
58720
+ }
58752
58721
  }), 100);
58753
58722
  };
58754
58723
  TabPaneComponent.prototype.notifyParent = function(evt) {
@@ -59087,6 +59056,18 @@
59087
59056
  core.addClass(this.nativeElement, "inverted");
59088
59057
  }
59089
59058
  };
59059
+ TabsComponent.prototype.setIconPosition = function() {
59060
+ var _tabdiv = this.nativeElement.children[0], _tabheader = $(_tabdiv).find("li a.tab-heading");
59061
+ if (this.iconposition === "right") {
59062
+ _tabheader.addClass("icon_right");
59063
+ } else if (this.iconposition === "top") {
59064
+ _tabheader.addClass("icon_top");
59065
+ _tabheader.removeClass("icon_right");
59066
+ } else {
59067
+ _tabheader.removeClass("icon_top");
59068
+ _tabheader.removeClass("icon_right");
59069
+ }
59070
+ };
59090
59071
  TabsComponent.prototype.onDataChange = function(newVal) {
59091
59072
  var _this = this;
59092
59073
  this.fieldDefs = base.createArrayFrom(newVal);
@@ -59123,6 +59104,8 @@
59123
59104
  return _this.selectDefaultPaneByIndex(_this.defaultpaneindex || 0);
59124
59105
  }), 20);
59125
59106
  }
59107
+ } else if (key === "iconposition") {
59108
+ this.setIconPosition();
59126
59109
  } else {
59127
59110
  _super.prototype.onPropertyChange.call(this, key, nv, ov);
59128
59111
  }