@acorex/components 3.0.37 → 3.0.41

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.
@@ -13753,7 +13753,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13753
13753
  if (userChange === void 0) { userChange = true; }
13754
13754
  if (item[this.hasChildField] === false || this.selectionMode === 'single') {
13755
13755
  item.select = !item.select;
13756
- if (item.parentNode && this.selectionMode !== 'single') {
13756
+ if (item.parentNode && this.selectionMode !== 'single' && this.checkParents == true) {
13757
13757
  this.changeParentSelect(item.parentNode);
13758
13758
  }
13759
13759
  if (item.select === true) {
@@ -13774,10 +13774,10 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13774
13774
  }
13775
13775
  else {
13776
13776
  item.select = !item.select;
13777
- if (item.parentNode && this.selectionMode === 'multiple') {
13777
+ if (item.parentNode && this.selectionMode === 'multiple' && this.checkParents == true) {
13778
13778
  this.changeParentSelect(item.parentNode);
13779
13779
  }
13780
- if (this.selectionMode === 'multiple') {
13780
+ if (this.selectionMode === 'multiple' && this.checkChilds == true) {
13781
13781
  this.changeChildSelect(item, item.select);
13782
13782
  }
13783
13783
  if (item.select == true) {
@@ -13840,6 +13840,34 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13840
13840
  node.itemData.indeterminate = item.select === null ? true : false;
13841
13841
  node.itemData.hasChild = item[this.hasChildField];
13842
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
+ }
13843
13871
  return node;
13844
13872
  };
13845
13873
  AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
@@ -13988,7 +14016,7 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
13988
14016
  _this.hideLoading(null);
13989
14017
  _this.list = _data.data.result;
13990
14018
  _this.list.forEach(function (el) {
13991
- el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
14019
+ el.disabledCheckBox = _this.selectableField != '' ? (el[_this.selectableField] ? el[_this.selectableField] : false) : false;
13992
14020
  el.select = false;
13993
14021
  if (_this.selectionLevel == 'nodes' && el[_this.hasChildField] == true) {
13994
14022
  el.disabledCheckBox = true;
@@ -14038,7 +14066,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
14038
14066
  if (_this.list.length !== 0) {
14039
14067
  if (_this.itemRow[_this.childField] && _this.itemRow[_this.childField].length > 0) {
14040
14068
  result_1.forEach(function (el) {
14041
- el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
14069
+ el.disabledCheckBox = _this.selectableField != '' ? (el[_this.selectableField] ? el[_this.selectableField] : false) : false;
14070
+ // el.disabledCheckBox = this.selectableField != '' ? el[this.selectableField] : false;
14042
14071
  _this.itemRow[_this.childField][_this.itemRow[_this.childField].length] = el;
14043
14072
  });
14044
14073
  }
@@ -14046,6 +14075,8 @@ var AXTreeViewComponent = /** @class */ (function (_super) {
14046
14075
  _this.itemRow[_this.childField] = result_1;
14047
14076
  }
14048
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;
14049
14080
  if (_this.selectionLevel == 'nodes' && result_1[i][_this.hasChildField] == true) {
14050
14081
  result_1[i].disabledCheckBox = true;
14051
14082
  }