ps-toolkit-ui 0.0.35 → 0.0.39
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 +4 -6
- 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/permission.class.js +3 -3
- package/esm2015/lib/components/base.component.js +2 -2
- package/esm2015/lib/components/table/row/table.row.component.js +1 -4
- package/fesm2015/ps-toolkit-ui.js +3 -6
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/permission.class.d.ts +2 -2
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -2525,9 +2525,6 @@
|
|
|
2525
2525
|
};
|
|
2526
2526
|
TableRowComponent.prototype.getOptions = function () {
|
|
2527
2527
|
var _this = this;
|
|
2528
|
-
console.log(this.table.options);
|
|
2529
|
-
console.log(this.table.options.map(function (x) { return x.condition; }));
|
|
2530
|
-
console.log(this.table.options.map(function (x) { return _this.row[x.condition]; }));
|
|
2531
2528
|
return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
|
|
2532
2529
|
.concat(this.table.options.filter(function (x) { return x.condition == null ||
|
|
2533
2530
|
(x.condition.startsWith('!') ? !_this.row[x.condition.substring(1)] : _this.row[x.condition]); }).map(function (o) {
|
|
@@ -5056,13 +5053,14 @@
|
|
|
5056
5053
|
};
|
|
5057
5054
|
|
|
5058
5055
|
var PermissionClass = /** @class */ (function () {
|
|
5059
|
-
function PermissionClass(Name, Icon, Type, Area, Controller, Action, Accesses) {
|
|
5056
|
+
function PermissionClass(Name, Icon, Type, Area, Controller, Action, Condition, Accesses) {
|
|
5060
5057
|
if (Name === void 0) { Name = ''; }
|
|
5061
5058
|
if (Icon === void 0) { Icon = ''; }
|
|
5062
5059
|
if (Type === void 0) { Type = null; }
|
|
5063
5060
|
if (Area === void 0) { Area = ''; }
|
|
5064
5061
|
if (Controller === void 0) { Controller = ''; }
|
|
5065
5062
|
if (Action === void 0) { Action = ''; }
|
|
5063
|
+
if (Condition === void 0) { Condition = null; }
|
|
5066
5064
|
if (Accesses === void 0) { Accesses = []; }
|
|
5067
5065
|
this.Name = Name;
|
|
5068
5066
|
this.Icon = Icon;
|
|
@@ -5070,9 +5068,9 @@
|
|
|
5070
5068
|
this.Area = Area;
|
|
5071
5069
|
this.Controller = Controller;
|
|
5072
5070
|
this.Action = Action;
|
|
5071
|
+
this.Condition = Condition;
|
|
5073
5072
|
this.Accesses = Accesses;
|
|
5074
5073
|
this.RelatedId = null;
|
|
5075
|
-
this.Condition = null;
|
|
5076
5074
|
}
|
|
5077
5075
|
PermissionClass.prototype.getAccess = function (a) {
|
|
5078
5076
|
var c = this.Accesses.filter(function (x) { return x.Action === a && x.Type === exports.PermissionTypeEnum.Access; });
|
|
@@ -6902,7 +6900,7 @@
|
|
|
6902
6900
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
6903
6901
|
};
|
|
6904
6902
|
BaseComponent.prototype.getPermissionClass = function (p) {
|
|
6905
|
-
return new PermissionClass(p.Name, p.Icon, p.Type,
|
|
6903
|
+
return new PermissionClass(p.Name, p.Icon, p.Type, this.app.area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
|
|
6906
6904
|
};
|
|
6907
6905
|
BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
|
|
6908
6906
|
var _this = this;
|