@acorex/components 3.0.36 → 3.0.40

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.
@@ -3616,7 +3616,7 @@ var AXCheckBoxComponent = /** @class */ (function (_super) {
3616
3616
  AXCheckBoxComponent = __decorate([
3617
3617
  Component({
3618
3618
  selector: 'ax-check-box',
3619
- template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n<label for=\"{{uid}}\" class=\"ax-checkbox-container\" (click)=\"handleClick($event)\">\r\n <input #input type=\"checkbox\" class=\"ax-checkbox\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"\r\n id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\" [(ngModel)]=\"value\" [disabled]=\"disabled || readonly\" />\r\n <span>{{ label ? label : '&nbsp;' }}</span>\r\n</label>",
3619
+ template: "<!-- <label class=\"ax checkbox {{size}}\" for=\"{{uid}}\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n {{ label }}\r\n <input #input type=\"checkbox\" id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\"\r\n [disabled]=\"disabled || readonly\" />\r\n <span class=\"checkmark\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"></span>\r\n\r\n</label> -->\r\n\r\n<label for=\"{{uid}}\" class=\"ax-checkbox-container\" [ngClass]=\"{ 'disabled': disabled, 'readonly': readonly }\"\r\n (click)=\"handleClick($event)\">\r\n <input #input type=\"checkbox\" class=\"ax-checkbox\" [ngClass]=\"{'indeterminate': indeterminate && value == null}\"\r\n id=\"{{uid}}\" [readonly]=\"readonly\" [checked]=\"value\" [(ngModel)]=\"value\" [disabled]=\"disabled || readonly\" />\r\n <span>{{ label ? label : '&nbsp;' }}</span>\r\n</label>",
3620
3620
  encapsulation: ViewEncapsulation.None,
3621
3621
  changeDetection: ChangeDetectionStrategy.OnPush
3622
3622
  }),
@@ -13724,6 +13724,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13724
13724
  _this.onItemClosing = new EventEmitter();
13725
13725
  _this.onItemDrag = new EventEmitter();
13726
13726
  _this.onItemMoved = new EventEmitter();
13727
+ _this.selectableField = '';
13727
13728
  _this.onContextMenuItemClick = new EventEmitter();
13728
13729
  _this.showSelectBox = false;
13729
13730
  _this.loading = false;
@@ -13839,6 +13840,34 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13839
13840
  node.itemData.indeterminate = item.select === null ? true : false;
13840
13841
  node.itemData.hasChild = item[this.hasChildField];
13841
13842
  node.parent = item.parentNode === undefined ? null : this.makeNode(item.parentNode, false);
13843
+ if (node.parent != null) {
13844
+ node.parent.selectParent = function () {
13845
+ if (item.parentNode['select'] != true) {
13846
+ _this.internalSelectItem(item.parentNode, true);
13847
+ }
13848
+ };
13849
+ node.parent.unSelectParent = function () {
13850
+ if (item.parentNode['select'] == true) {
13851
+ _this.internalSelectItem(item.parentNode, true);
13852
+ }
13853
+ };
13854
+ }
13855
+ if (node.children != null && node.children.length > 0) {
13856
+ node.children.selectChilds = function () {
13857
+ item.childeren.forEach(function (element) {
13858
+ if (element['select'] != true) {
13859
+ _this.internalSelectItem(element, true);
13860
+ }
13861
+ });
13862
+ };
13863
+ node.children.unSelectChilds = function () {
13864
+ item.childeren.forEach(function (element) {
13865
+ if (element['select'] == true) {
13866
+ _this.internalSelectItem(element, true);
13867
+ }
13868
+ });
13869
+ };
13870
+ }
13842
13871
  return node;
13843
13872
  };
13844
13873
  AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
@@ -13987,7 +14016,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13987
14016
  _this.hideLoading(null);
13988
14017
  _this.list = _data.data.result;
13989
14018
  _this.list.forEach(function (el) {
13990
- el.disabledCheckBox = false;
14019
+ el.disabledCheckBox = _this.selectableField != '' ? (el[_this.selectableField] ? el[_this.selectableField] : false) : false;
13991
14020
  el.select = false;
13992
14021
  if (_this.selectionLevel == 'nodes' && el[_this.hasChildField] == true) {
13993
14022
  el.disabledCheckBox = true;
@@ -14037,7 +14066,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
14037
14066
  if (_this.list.length !== 0) {
14038
14067
  if (_this.itemRow[_this.childField] && _this.itemRow[_this.childField].length > 0) {
14039
14068
  result_1.forEach(function (el) {
14040
- el.disabledCheckBox = false;
14069
+ el.disabledCheckBox = _this.selectableField != '' ? (el[_this.selectableField] ? el[_this.selectableField] : false) : false;
14070
+ // el.disabledCheckBox = this.selectableField != '' ? el[this.selectableField] : false;
14041
14071
  _this.itemRow[_this.childField][_this.itemRow[_this.childField].length] = el;
14042
14072
  });
14043
14073
  }
@@ -14045,6 +14075,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
14045
14075
  _this.itemRow[_this.childField] = result_1;
14046
14076
  }
14047
14077
  var _loop_1 = function (i) {
14078
+ result_1[i].disabledCheckBox =
14079
+ _this.selectableField != '' ? (result_1[i][_this.selectableField] ? result_1[i][_this.selectableField] : false) : false;
14048
14080
  if (_this.selectionLevel == 'nodes' && result_1[i][_this.hasChildField] == true) {
14049
14081
  result_1[i].disabledCheckBox = true;
14050
14082
  }
@@ -14408,6 +14440,10 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
14408
14440
  Output(),
14409
14441
  __metadata("design:type", EventEmitter)
14410
14442
  ], AXTreeViewComponent.prototype, "onItemMoved", void 0);
14443
+ __decorate([
14444
+ Input(),
14445
+ __metadata("design:type", String)
14446
+ ], AXTreeViewComponent.prototype, "selectableField", void 0);
14411
14447
  __decorate([
14412
14448
  Output(),
14413
14449
  __metadata("design:type", EventEmitter)