ps-toolkit-ui 0.0.34 → 0.0.38
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 +8 -3
- 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/classes/table.class.js +2 -1
- package/esm2015/lib/components/base.component.js +2 -2
- package/esm2015/lib/components/table/row/table.row.component.js +4 -1
- package/fesm2015/ps-toolkit-ui.js +7 -3
- 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,6 +2525,9 @@
|
|
|
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]; }));
|
|
2528
2531
|
return (this.addChildren !== null && (this.table.level === null || this.table.level > this.level) ? [this.addChildren] : [])
|
|
2529
2532
|
.concat(this.table.options.filter(function (x) { return x.condition == null ||
|
|
2530
2533
|
(x.condition.startsWith('!') ? !_this.row[x.condition.substring(1)] : _this.row[x.condition]); }).map(function (o) {
|
|
@@ -5053,13 +5056,14 @@
|
|
|
5053
5056
|
};
|
|
5054
5057
|
|
|
5055
5058
|
var PermissionClass = /** @class */ (function () {
|
|
5056
|
-
function PermissionClass(Name, Icon, Type, Area, Controller, Action, Accesses) {
|
|
5059
|
+
function PermissionClass(Name, Icon, Type, Area, Controller, Action, Condition, Accesses) {
|
|
5057
5060
|
if (Name === void 0) { Name = ''; }
|
|
5058
5061
|
if (Icon === void 0) { Icon = ''; }
|
|
5059
5062
|
if (Type === void 0) { Type = null; }
|
|
5060
5063
|
if (Area === void 0) { Area = ''; }
|
|
5061
5064
|
if (Controller === void 0) { Controller = ''; }
|
|
5062
5065
|
if (Action === void 0) { Action = ''; }
|
|
5066
|
+
if (Condition === void 0) { Condition = null; }
|
|
5063
5067
|
if (Accesses === void 0) { Accesses = []; }
|
|
5064
5068
|
this.Name = Name;
|
|
5065
5069
|
this.Icon = Icon;
|
|
@@ -5067,9 +5071,9 @@
|
|
|
5067
5071
|
this.Area = Area;
|
|
5068
5072
|
this.Controller = Controller;
|
|
5069
5073
|
this.Action = Action;
|
|
5074
|
+
this.Condition = Condition;
|
|
5070
5075
|
this.Accesses = Accesses;
|
|
5071
5076
|
this.RelatedId = null;
|
|
5072
|
-
this.Condition = null;
|
|
5073
5077
|
}
|
|
5074
5078
|
PermissionClass.prototype.getAccess = function (a) {
|
|
5075
5079
|
var c = this.Accesses.filter(function (x) { return x.Action === a && x.Type === exports.PermissionTypeEnum.Access; });
|
|
@@ -6899,7 +6903,7 @@
|
|
|
6899
6903
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
6900
6904
|
};
|
|
6901
6905
|
BaseComponent.prototype.getPermissionClass = function (p) {
|
|
6902
|
-
return new PermissionClass(p.Name, p.Icon, p.Type, p.Area, p.Controller, p.Action, this.getPermissionAccessesClass(p.Id));
|
|
6906
|
+
return new PermissionClass(p.Name, p.Icon, p.Type, p.Area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
|
|
6903
6907
|
};
|
|
6904
6908
|
BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
|
|
6905
6909
|
var _this = this;
|
|
@@ -7135,6 +7139,7 @@
|
|
|
7135
7139
|
return "continue";
|
|
7136
7140
|
}
|
|
7137
7141
|
var opt = new InputClass(this_1.environment, this_1.l, option.Name, option.Icon, exports.InputType.Icon, 'blue h-25 m-h-5 d-ib va-m f-u');
|
|
7142
|
+
console.log(option.Condition, 'option.Condition option.Condition');
|
|
7138
7143
|
opt.condition = option.Condition;
|
|
7139
7144
|
if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {
|
|
7140
7145
|
var p = new PermissionClass();
|