ps-toolkit-ui 0.0.58 → 0.0.62
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.
- package/bundles/ps-toolkit-ui.umd.js +31 -22
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/form.class.js +2 -2
- package/esm2015/lib/classes/permission.class.js +8 -1
- package/esm2015/lib/components/form/tree/form.tree.component.js +13 -7
- package/fesm2015/ps-toolkit-ui.js +20 -7
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/form.class.d.ts +3 -3
- package/lib/components/form/tree/form.tree.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
};
|
|
@@ -5106,6 +5106,13 @@
|
|
|
5106
5106
|
return c.length > 0 ? c[0] : null;
|
|
5107
5107
|
};
|
|
5108
5108
|
PermissionClass.prototype.getUrl = function () {
|
|
5109
|
+
console.log(this.Area, 'Area');
|
|
5110
|
+
console.log(this.Controller, 'Controller');
|
|
5111
|
+
console.log(this.RelatedId, 'RelatedId');
|
|
5112
|
+
console.log(this.Action, 'Action');
|
|
5113
|
+
console.log((this.Area ? '/' + this.Area : '') + '/' + this.Controller + '/' +
|
|
5114
|
+
(this.RelatedId ? this.RelatedId + "/" : '') +
|
|
5115
|
+
(this.Action ? this.Action : ''));
|
|
5109
5116
|
return (this.Area ? '/' + this.Area : '') + '/' + this.Controller + '/' +
|
|
5110
5117
|
(this.RelatedId ? this.RelatedId + "/" : '') +
|
|
5111
5118
|
(this.Action ? this.Action : '');
|
|
@@ -5740,51 +5747,53 @@
|
|
|
5740
5747
|
});
|
|
5741
5748
|
return l;
|
|
5742
5749
|
};
|
|
5743
|
-
FormTreeComponent.prototype.check = function (ids) {
|
|
5750
|
+
FormTreeComponent.prototype.check = function (ids, chs) {
|
|
5744
5751
|
var e_2, _a;
|
|
5745
|
-
|
|
5746
|
-
var
|
|
5747
|
-
|
|
5748
|
-
if (ids.includes(r.value)) {
|
|
5749
|
-
r.toggle(this_1.inp.onlyChild);
|
|
5750
|
-
}
|
|
5751
|
-
setTimeout(function () { _this.checkChildren(r.children, ids); });
|
|
5752
|
-
};
|
|
5753
|
-
var this_1 = this;
|
|
5752
|
+
if (chs === void 0) { chs = this.inp.rows; }
|
|
5753
|
+
var isChecked = false;
|
|
5754
|
+
var cIsChecked = false;
|
|
5754
5755
|
try {
|
|
5755
|
-
for (var
|
|
5756
|
-
var r =
|
|
5757
|
-
|
|
5756
|
+
for (var chs_1 = __values(chs), chs_1_1 = chs_1.next(); !chs_1_1.done; chs_1_1 = chs_1.next()) {
|
|
5757
|
+
var r = chs_1_1.value;
|
|
5758
|
+
r.selected = ids.includes(r.value);
|
|
5759
|
+
if (r.selected) {
|
|
5760
|
+
isChecked = true;
|
|
5761
|
+
}
|
|
5762
|
+
cIsChecked = this.check(ids, r.children);
|
|
5763
|
+
if (this.inp.onlyChild && cIsChecked) {
|
|
5764
|
+
r.selected = true;
|
|
5765
|
+
}
|
|
5758
5766
|
}
|
|
5759
5767
|
}
|
|
5760
5768
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
5761
5769
|
finally {
|
|
5762
5770
|
try {
|
|
5763
|
-
if (
|
|
5771
|
+
if (chs_1_1 && !chs_1_1.done && (_a = chs_1.return)) _a.call(chs_1);
|
|
5764
5772
|
}
|
|
5765
5773
|
finally { if (e_2) throw e_2.error; }
|
|
5766
5774
|
}
|
|
5775
|
+
return isChecked || cIsChecked;
|
|
5767
5776
|
};
|
|
5768
5777
|
FormTreeComponent.prototype.checkChildren = function (chs, ids) {
|
|
5769
5778
|
var e_3, _a;
|
|
5770
5779
|
var _this = this;
|
|
5771
|
-
var
|
|
5780
|
+
var _loop_1 = function (r) {
|
|
5772
5781
|
if (ids.includes(r.value)) {
|
|
5773
|
-
r.toggle(
|
|
5782
|
+
r.toggle(this_1.inp.onlyChild);
|
|
5774
5783
|
}
|
|
5775
5784
|
setTimeout(function () { _this.checkChildren(r.children, ids); });
|
|
5776
5785
|
};
|
|
5777
|
-
var
|
|
5786
|
+
var this_1 = this;
|
|
5778
5787
|
try {
|
|
5779
|
-
for (var
|
|
5780
|
-
var r =
|
|
5781
|
-
|
|
5788
|
+
for (var chs_2 = __values(chs), chs_2_1 = chs_2.next(); !chs_2_1.done; chs_2_1 = chs_2.next()) {
|
|
5789
|
+
var r = chs_2_1.value;
|
|
5790
|
+
_loop_1(r);
|
|
5782
5791
|
}
|
|
5783
5792
|
}
|
|
5784
5793
|
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
5785
5794
|
finally {
|
|
5786
5795
|
try {
|
|
5787
|
-
if (
|
|
5796
|
+
if (chs_2_1 && !chs_2_1.done && (_a = chs_2.return)) _a.call(chs_2);
|
|
5788
5797
|
}
|
|
5789
5798
|
finally { if (e_3) throw e_3.error; }
|
|
5790
5799
|
}
|