ps-toolkit-ui 0.0.169 → 0.0.174
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 +15 -19
- 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 +8 -7
- package/esm2015/lib/classes/table.class.js +3 -3
- package/esm2015/lib/components/table/row/table.row.component.js +6 -9
- package/esm2015/lib/components/table/table.component.js +1 -4
- package/fesm2015/ps-toolkit-ui.js +14 -19
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/enum.class.d.ts +7 -6
- package/lib/classes/table.class.d.ts +1 -1
- package/package.json +1 -1
- package/ps-toolkit-ui.metadata.json +1 -1
|
@@ -817,12 +817,13 @@
|
|
|
817
817
|
})(exports.PermissionAccessTypeEnum || (exports.PermissionAccessTypeEnum = {}));
|
|
818
818
|
(function (PermissionInputActionEnum) {
|
|
819
819
|
PermissionInputActionEnum[PermissionInputActionEnum["None"] = 0] = "None";
|
|
820
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
821
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
822
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
823
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
824
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
825
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
820
|
+
PermissionInputActionEnum[PermissionInputActionEnum["OnClick"] = 1] = "OnClick";
|
|
821
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Link"] = 2] = "Link";
|
|
822
|
+
PermissionInputActionEnum[PermissionInputActionEnum["LinkNewTab"] = 3] = "LinkNewTab";
|
|
823
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Report"] = 4] = "Report";
|
|
824
|
+
PermissionInputActionEnum[PermissionInputActionEnum["File"] = 5] = "File";
|
|
825
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Modal"] = 6] = "Modal";
|
|
826
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Confirm"] = 7] = "Confirm";
|
|
826
827
|
})(exports.PermissionInputActionEnum || (exports.PermissionInputActionEnum = {}));
|
|
827
828
|
(function (PermissionInputTypeEnum) {
|
|
828
829
|
PermissionInputTypeEnum[PermissionInputTypeEnum["Icon"] = 0] = "Icon";
|
|
@@ -2504,13 +2505,12 @@
|
|
|
2504
2505
|
if (this.table.permissions.hasAccess(exports.PermissionAccessTypeEnum.Insert)) {
|
|
2505
2506
|
this.addChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'AddSubsetTitle', 'fad fa-plus fa-rotate-90', exports.InputType.Icon, 'green m-h-5 h-25 d-ib va-m f-u');
|
|
2506
2507
|
this.addChildren.onClick = function () {
|
|
2507
|
-
_this.table.form.url = _this.table.url + 'Insert/' + _this.row.Data.Id;
|
|
2508
2508
|
_this.table.form.onSuccessBase = function () {
|
|
2509
2509
|
_this.table.modal.hide();
|
|
2510
2510
|
_this.showChildren.type = exports.InputType.Icon;
|
|
2511
2511
|
_this.loadChildren(_this.row.Data.Id);
|
|
2512
2512
|
};
|
|
2513
|
-
_this.table.showInsertModal();
|
|
2513
|
+
_this.table.showInsertModal(_this.row.Data.Id);
|
|
2514
2514
|
};
|
|
2515
2515
|
}
|
|
2516
2516
|
this.showChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'SubsetTitle', 'fad fa-angle-left f-s-22', this.row.Data.CountChild > 0 || (!this.table.childrenAutoLoad && this.children.length > 0) ? exports.InputType.Icon : exports.InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
|
|
@@ -2739,12 +2739,10 @@
|
|
|
2739
2739
|
});
|
|
2740
2740
|
};
|
|
2741
2741
|
}
|
|
2742
|
-
else {
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
};
|
|
2747
|
-
}
|
|
2742
|
+
else if (option.InputAction === exports.PermissionInputActionEnum.OnClick) {
|
|
2743
|
+
opt.onClick = function (btn) {
|
|
2744
|
+
_this.table.optionsActions.find(function (x) { return x.name === option.Action; }).OnClick(btn);
|
|
2745
|
+
};
|
|
2748
2746
|
}
|
|
2749
2747
|
opts.push(opt);
|
|
2750
2748
|
};
|
|
@@ -3016,9 +3014,6 @@
|
|
|
3016
3014
|
_this.setSortable();
|
|
3017
3015
|
};
|
|
3018
3016
|
}
|
|
3019
|
-
if (this.table.hasChildren && this.table.form) {
|
|
3020
|
-
this.table.form.inputs.push(new InputClass(this.table.environment, this.table.l, 'ParentId', null, exports.InputType.Hidden, null, null, false));
|
|
3021
|
-
}
|
|
3022
3017
|
this.table.set(this.changeRows);
|
|
3023
3018
|
if (this.table.searchForm) {
|
|
3024
3019
|
this.table.searchForm.displayLabel = false;
|
|
@@ -7207,9 +7202,10 @@
|
|
|
7207
7202
|
TableClass.prototype.getUrl = function () {
|
|
7208
7203
|
return this.url + 'List';
|
|
7209
7204
|
};
|
|
7210
|
-
TableClass.prototype.showInsertModal = function () {
|
|
7205
|
+
TableClass.prototype.showInsertModal = function (cId) {
|
|
7206
|
+
if (cId === void 0) { cId = null; }
|
|
7211
7207
|
var insertAccess = this.permissions.getAccess(exports.PermissionAccessTypeEnum.Insert);
|
|
7212
|
-
this.form.url = this.form.baseUrl = this.url + 'Insert';
|
|
7208
|
+
this.form.url = this.form.baseUrl = this.url + 'Insert' + (cId ? '/' + cId : '');
|
|
7213
7209
|
this.form.name = insertAccess.Name;
|
|
7214
7210
|
this.form.method = exports.Method.Post;
|
|
7215
7211
|
this.form.inputs.filter(function (x) { return x.inEditDisabled; }).forEach(function (x) { return x.disabled = false; });
|