ps-toolkit-ui 0.0.18 → 0.0.22
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 +19 -13
- 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 +9 -8
- package/esm2015/lib/classes/form.class.js +3 -2
- package/esm2015/lib/components/sidebar/sidebar.component.js +9 -6
- package/esm2015/lib/components/table/row/table.row.component.js +2 -1
- package/fesm2015/ps-toolkit-ui.js +18 -13
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +8 -7
- package/lib/components/sidebar/sidebar.component.d.ts +1 -0
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -801,13 +801,14 @@
|
|
|
801
801
|
})(exports.ResultStatusEnum || (exports.ResultStatusEnum = {}));
|
|
802
802
|
(function (PermissionTypeEnum) {
|
|
803
803
|
PermissionTypeEnum[PermissionTypeEnum["Form"] = -1] = "Form";
|
|
804
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
805
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
806
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
807
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
808
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
809
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
810
|
-
PermissionTypeEnum[PermissionTypeEnum["
|
|
804
|
+
PermissionTypeEnum[PermissionTypeEnum["Item"] = 0] = "Item";
|
|
805
|
+
PermissionTypeEnum[PermissionTypeEnum["Access"] = 1] = "Access";
|
|
806
|
+
PermissionTypeEnum[PermissionTypeEnum["OptionLink"] = 2] = "OptionLink";
|
|
807
|
+
PermissionTypeEnum[PermissionTypeEnum["OptionLinkNewTab"] = 3] = "OptionLinkNewTab";
|
|
808
|
+
PermissionTypeEnum[PermissionTypeEnum["OptionReport"] = 4] = "OptionReport";
|
|
809
|
+
PermissionTypeEnum[PermissionTypeEnum["OptionFile"] = 5] = "OptionFile";
|
|
810
|
+
PermissionTypeEnum[PermissionTypeEnum["OptionModal"] = 6] = "OptionModal";
|
|
811
|
+
PermissionTypeEnum[PermissionTypeEnum["OptionConfirm"] = 7] = "OptionConfirm";
|
|
811
812
|
})(exports.PermissionTypeEnum || (exports.PermissionTypeEnum = {}));
|
|
812
813
|
(function (VehicleType) {
|
|
813
814
|
VehicleType[VehicleType["Car"] = 1] = "Car";
|
|
@@ -1629,14 +1630,15 @@
|
|
|
1629
1630
|
FormClass.prototype.setData = function (d) {
|
|
1630
1631
|
this.inputs.forEach(function (inp) {
|
|
1631
1632
|
var iv = _.get(d, inp.name);
|
|
1632
|
-
var ivs = _.get(d, inp.name.replace('Id', ''));
|
|
1633
1633
|
if (inp.type === exports.InputType.CarSearch) {
|
|
1634
|
+
var ivs = _.get(d, inp.name.replace('Id', ''));
|
|
1634
1635
|
inp.setValue({ Search: ivs, Value: iv }, true);
|
|
1635
1636
|
}
|
|
1636
1637
|
else {
|
|
1637
1638
|
inp.setValue(iv, true);
|
|
1638
1639
|
}
|
|
1639
1640
|
if (inp.type === exports.InputType.SelectAutoCompletePlaque || inp.type === exports.InputType.SelectAutoComplete) {
|
|
1641
|
+
var ivs = _.get(d, inp.name.replace('Id', ''));
|
|
1640
1642
|
inp.setSearch(ivs);
|
|
1641
1643
|
}
|
|
1642
1644
|
});
|
|
@@ -2126,13 +2128,16 @@
|
|
|
2126
2128
|
this.currentSidebar = this.getSidebarActive(this.sidebar, active);
|
|
2127
2129
|
};
|
|
2128
2130
|
SidebarComponent.prototype.ngOnInit = function () {
|
|
2131
|
+
this.sidebar = this.getSidebar();
|
|
2132
|
+
console.log(this.sidebar);
|
|
2133
|
+
this.setActive();
|
|
2134
|
+
};
|
|
2135
|
+
SidebarComponent.prototype.getSidebar = function (parentId) {
|
|
2129
2136
|
var _this = this;
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}) : []);
|
|
2137
|
+
if (parentId === void 0) { parentId = null; }
|
|
2138
|
+
return this.permissions.filter(function (x) { return x.Type === exports.PermissionTypeEnum.Item && x.ParentId === parentId; }).map(function (s) {
|
|
2139
|
+
return new SidebarClass(_this.l, s.Name, s.Controller, s.Action, s.Icon, _this.getSidebar(s.Id));
|
|
2134
2140
|
});
|
|
2135
|
-
this.setActive();
|
|
2136
2141
|
};
|
|
2137
2142
|
SidebarComponent.prototype.getSidebarActive = function (item, active) {
|
|
2138
2143
|
var e_1, _a;
|
|
@@ -2433,6 +2438,7 @@
|
|
|
2433
2438
|
if (!_this.table.form.onTop) {
|
|
2434
2439
|
_this.table.modal.hide();
|
|
2435
2440
|
}
|
|
2441
|
+
_this.table.form.clear();
|
|
2436
2442
|
_this.table.load();
|
|
2437
2443
|
};
|
|
2438
2444
|
}
|