ps-toolkit-ui 0.0.59 → 0.0.63

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.
@@ -1889,7 +1889,7 @@
1889
1889
  c.selected = false;
1890
1890
  if (onlyChild) {
1891
1891
  c.children.forEach(function (ch) {
1892
- _this.unCheck(ch);
1892
+ _this.unCheck(onlyChild, ch);
1893
1893
  });
1894
1894
  }
1895
1895
  };
@@ -5743,11 +5743,19 @@
5743
5743
  FormTreeComponent.prototype.check = function (ids, chs) {
5744
5744
  var e_2, _a;
5745
5745
  if (chs === void 0) { chs = this.inp.rows; }
5746
+ var isChecked = false;
5747
+ var cIsChecked = false;
5746
5748
  try {
5747
5749
  for (var chs_1 = __values(chs), chs_1_1 = chs_1.next(); !chs_1_1.done; chs_1_1 = chs_1.next()) {
5748
5750
  var r = chs_1_1.value;
5749
5751
  r.selected = ids.includes(r.value);
5750
- this.check(ids, r.children);
5752
+ if (r.selected) {
5753
+ isChecked = true;
5754
+ }
5755
+ cIsChecked = this.check(ids, r.children);
5756
+ if (this.inp.onlyChild && cIsChecked) {
5757
+ r.selected = true;
5758
+ }
5751
5759
  }
5752
5760
  }
5753
5761
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
@@ -5757,6 +5765,7 @@
5757
5765
  }
5758
5766
  finally { if (e_2) throw e_2.error; }
5759
5767
  }
5768
+ return isChecked || cIsChecked;
5760
5769
  };
5761
5770
  FormTreeComponent.prototype.checkChildren = function (chs, ids) {
5762
5771
  var e_3, _a;
@@ -7238,7 +7247,7 @@
7238
7247
  p.RelatedId = this_1.permissions.RelatedId;
7239
7248
  p.Area = this_1.permissions.Area;
7240
7249
  p.Controller = this_1.permissions.Controller;
7241
- p.Action = this_1.permissions.Action + option.Action;
7250
+ p.Action = (this_1.permissions.Action ? this_1.permissions.Action : '') + option.Action;
7242
7251
  opt.url = '/File' + p.getUrl() + '/{}';
7243
7252
  opt.urlNewTab = true;
7244
7253
  }