ps-toolkit-ui 0.0.91 → 0.0.95
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 +11 -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/enum.class.js +6 -1
- package/esm2015/lib/classes/permission.class.js +3 -2
- package/esm2015/lib/classes/table.class.js +3 -3
- package/esm2015/lib/components/base.component.js +2 -2
- package/esm2015/lib/components/form/label/form.label.component.js +2 -1
- package/fesm2015/ps-toolkit-ui.js +11 -4
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +4 -0
- package/lib/classes/permission.class.d.ts +3 -2
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -812,6 +812,10 @@
|
|
|
812
812
|
PermissionTypeEnum[PermissionTypeEnum["OptionModal"] = 7] = "OptionModal";
|
|
813
813
|
PermissionTypeEnum[PermissionTypeEnum["OptionConfirm"] = 8] = "OptionConfirm";
|
|
814
814
|
})(exports.PermissionTypeEnum || (exports.PermissionTypeEnum = {}));
|
|
815
|
+
(function (PermissionOptionTypeEnum) {
|
|
816
|
+
PermissionOptionTypeEnum[PermissionOptionTypeEnum["Icon"] = 0] = "Icon";
|
|
817
|
+
PermissionOptionTypeEnum[PermissionOptionTypeEnum["Button"] = 1] = "Button";
|
|
818
|
+
})(exports.PermissionOptionTypeEnum || (exports.PermissionOptionTypeEnum = {}));
|
|
815
819
|
(function (VehicleType) {
|
|
816
820
|
VehicleType[VehicleType["Car"] = 1] = "Car";
|
|
817
821
|
VehicleType[VehicleType["Motorcycle"] = 2] = "Motorcycle";
|
|
@@ -3855,7 +3859,9 @@
|
|
|
3855
3859
|
function FormLabelComponent() {
|
|
3856
3860
|
}
|
|
3857
3861
|
FormLabelComponent.prototype.ngOnInit = function () {
|
|
3862
|
+
var _this = this;
|
|
3858
3863
|
this.inp.setValue = function (v) {
|
|
3864
|
+
_this.inp.value = v;
|
|
3859
3865
|
};
|
|
3860
3866
|
this.inp.isValid = function () {
|
|
3861
3867
|
return true;
|
|
@@ -5077,10 +5083,11 @@
|
|
|
5077
5083
|
};
|
|
5078
5084
|
|
|
5079
5085
|
var PermissionClass = /** @class */ (function () {
|
|
5080
|
-
function PermissionClass(Name, Icon, Type, Area, Controller, Action, Condition, Accesses) {
|
|
5086
|
+
function PermissionClass(Name, Icon, Type, OptionType, Area, Controller, Action, Condition, Accesses) {
|
|
5081
5087
|
if (Name === void 0) { Name = ''; }
|
|
5082
5088
|
if (Icon === void 0) { Icon = ''; }
|
|
5083
5089
|
if (Type === void 0) { Type = null; }
|
|
5090
|
+
if (OptionType === void 0) { OptionType = null; }
|
|
5084
5091
|
if (Area === void 0) { Area = ''; }
|
|
5085
5092
|
if (Controller === void 0) { Controller = ''; }
|
|
5086
5093
|
if (Action === void 0) { Action = ''; }
|
|
@@ -5089,6 +5096,7 @@
|
|
|
5089
5096
|
this.Name = Name;
|
|
5090
5097
|
this.Icon = Icon;
|
|
5091
5098
|
this.Type = Type;
|
|
5099
|
+
this.OptionType = OptionType;
|
|
5092
5100
|
this.Area = Area;
|
|
5093
5101
|
this.Controller = Controller;
|
|
5094
5102
|
this.Action = Action;
|
|
@@ -6948,7 +6956,7 @@
|
|
|
6948
6956
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
6949
6957
|
};
|
|
6950
6958
|
BaseComponent.prototype.getPermissionClass = function (p) {
|
|
6951
|
-
return new PermissionClass(p.Name, p.Icon, p.Type, this.app.area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
|
|
6959
|
+
return new PermissionClass(p.Name, p.Icon, p.Type, p.OptionType, this.app.area, p.Controller, p.Action, p.Condition, this.getPermissionAccessesClass(p.Id));
|
|
6952
6960
|
};
|
|
6953
6961
|
BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
|
|
6954
6962
|
var _this = this;
|
|
@@ -7183,7 +7191,7 @@
|
|
|
7183
7191
|
if (this_1.options.filter(function (x) { return x.name === option.Name; }).length > 0) {
|
|
7184
7192
|
return "continue";
|
|
7185
7193
|
}
|
|
7186
|
-
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');
|
|
7194
|
+
var opt = new InputClass(this_1.environment, this_1.l, option.Name, option.Icon, option.OptionType === exports.PermissionOptionTypeEnum.Icon ? exports.InputType.Icon : exports.InputType.Button, 'blue h-25 m-h-5 d-ib va-m f-u');
|
|
7187
7195
|
opt.condition = option.Condition;
|
|
7188
7196
|
if (option.Type === exports.PermissionTypeEnum.OptionLink || option.Type === exports.PermissionTypeEnum.OptionLinkNewTab) {
|
|
7189
7197
|
var p = new PermissionClass();
|