@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.
@@ -13959,7 +13959,7 @@
13959
13959
  if (userChange === void 0) { userChange = true; }
13960
13960
  if (item[this.hasChildField] === false || this.selectionMode === 'single') {
13961
13961
  item.select = !item.select;
13962
- if (item.parentNode && this.selectionMode !== 'single') {
13962
+ if (item.parentNode && this.selectionMode !== 'single' && this.checkParents == true) {
13963
13963
  this.changeParentSelect(item.parentNode);
13964
13964
  }
13965
13965
  if (item.select === true) {
@@ -13980,10 +13980,10 @@
13980
13980
  }
13981
13981
  else {
13982
13982
  item.select = !item.select;
13983
- if (item.parentNode && this.selectionMode === 'multiple') {
13983
+ if (item.parentNode && this.selectionMode === 'multiple' && this.checkParents == true) {
13984
13984
  this.changeParentSelect(item.parentNode);
13985
13985
  }
13986
- if (this.selectionMode === 'multiple') {
13986
+ if (this.selectionMode === 'multiple' && this.checkChilds == true) {
13987
13987
  this.changeChildSelect(item, item.select);
13988
13988
  }
13989
13989
  if (item.select == true) {
@@ -14046,6 +14046,34 @@
14046
14046
  node.itemData.indeterminate = item.select === null ? true : false;
14047
14047
  node.itemData.hasChild = item[this.hasChildField];
14048
14048
  node.parent = item.parentNode === undefined ? null : this.makeNode(item.parentNode, false);
14049
+ if (node.parent != null) {
14050
+ node.parent.selectParent = function () {
14051
+ if (item.parentNode['select'] != true) {
14052
+ _this.internalSelectItem(item.parentNode, true);
14053
+ }
14054
+ };
14055
+ node.parent.unSelectParent = function () {
14056
+ if (item.parentNode['select'] == true) {
14057
+ _this.internalSelectItem(item.parentNode, true);
14058
+ }
14059
+ };
14060
+ }
14061
+ if (node.children != null && node.children.length > 0) {
14062
+ node.children.selectChilds = function () {
14063
+ item.childeren.forEach(function (element) {
14064
+ if (element['select'] != true) {
14065
+ _this.internalSelectItem(element, true);
14066
+ }
14067
+ });
14068
+ };
14069
+ node.children.unSelectChilds = function () {
14070
+ item.childeren.forEach(function (element) {
14071
+ if (element['select'] == true) {
14072
+ _this.internalSelectItem(element, true);
14073
+ }
14074
+ });
14075
+ };
14076
+ }
14049
14077
  return node;
14050
14078
  };
14051
14079
  AXTreeViewComponent.prototype.changeChildSelect = function (item, s) {
@@ -14194,7 +14222,7 @@
14194
14222
  _this.hideLoading(null);
14195
14223
  _this.list = _data.data.result;
14196
14224
  _this.list.forEach(function (el) {
14197
- el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
14225
+ el.disabledCheckBox = _this.selectableField != '' ? (el[_this.selectableField] ? el[_this.selectableField] : false) : false;
14198
14226
  el.select = false;
14199
14227
  if (_this.selectionLevel == 'nodes' && el[_this.hasChildField] == true) {
14200
14228
  el.disabledCheckBox = true;
@@ -14244,7 +14272,8 @@
14244
14272
  if (_this.list.length !== 0) {
14245
14273
  if (_this.itemRow[_this.childField] && _this.itemRow[_this.childField].length > 0) {
14246
14274
  result_1.forEach(function (el) {
14247
- el.disabledCheckBox = _this.selectableField != '' ? el[_this.selectableField] : false;
14275
+ el.disabledCheckBox = _this.selectableField != '' ? (el[_this.selectableField] ? el[_this.selectableField] : false) : false;
14276
+ // el.disabledCheckBox = this.selectableField != '' ? el[this.selectableField] : false;
14248
14277
  _this.itemRow[_this.childField][_this.itemRow[_this.childField].length] = el;
14249
14278
  });
14250
14279
  }
@@ -14252,6 +14281,8 @@
14252
14281
  _this.itemRow[_this.childField] = result_1;
14253
14282
  }
14254
14283
  var _loop_1 = function (i) {
14284
+ result_1[i].disabledCheckBox =
14285
+ _this.selectableField != '' ? (result_1[i][_this.selectableField] ? result_1[i][_this.selectableField] : false) : false;
14255
14286
  if (_this.selectionLevel == 'nodes' && result_1[i][_this.hasChildField] == true) {
14256
14287
  result_1[i].disabledCheckBox = true;
14257
14288
  }