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
|
@@ -481,12 +481,13 @@ var PermissionAccessTypeEnum;
|
|
|
481
481
|
var PermissionInputActionEnum;
|
|
482
482
|
(function (PermissionInputActionEnum) {
|
|
483
483
|
PermissionInputActionEnum[PermissionInputActionEnum["None"] = 0] = "None";
|
|
484
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
485
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
486
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
487
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
488
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
489
|
-
PermissionInputActionEnum[PermissionInputActionEnum["
|
|
484
|
+
PermissionInputActionEnum[PermissionInputActionEnum["OnClick"] = 1] = "OnClick";
|
|
485
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Link"] = 2] = "Link";
|
|
486
|
+
PermissionInputActionEnum[PermissionInputActionEnum["LinkNewTab"] = 3] = "LinkNewTab";
|
|
487
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Report"] = 4] = "Report";
|
|
488
|
+
PermissionInputActionEnum[PermissionInputActionEnum["File"] = 5] = "File";
|
|
489
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Modal"] = 6] = "Modal";
|
|
490
|
+
PermissionInputActionEnum[PermissionInputActionEnum["Confirm"] = 7] = "Confirm";
|
|
490
491
|
})(PermissionInputActionEnum || (PermissionInputActionEnum = {}));
|
|
491
492
|
var PermissionInputTypeEnum;
|
|
492
493
|
(function (PermissionInputTypeEnum) {
|
|
@@ -1931,13 +1932,12 @@ class TableRowComponent {
|
|
|
1931
1932
|
if (this.table.permissions.hasAccess(PermissionAccessTypeEnum.Insert)) {
|
|
1932
1933
|
this.addChildren = new InputClass(this.table.environment, this.table.l, this.table.name + 'AddSubsetTitle', 'fad fa-plus fa-rotate-90', InputType.Icon, 'green m-h-5 h-25 d-ib va-m f-u');
|
|
1933
1934
|
this.addChildren.onClick = () => {
|
|
1934
|
-
this.table.form.url = this.table.url + 'Insert/' + this.row.Data.Id;
|
|
1935
1935
|
this.table.form.onSuccessBase = () => {
|
|
1936
1936
|
this.table.modal.hide();
|
|
1937
1937
|
this.showChildren.type = InputType.Icon;
|
|
1938
1938
|
this.loadChildren(this.row.Data.Id);
|
|
1939
1939
|
};
|
|
1940
|
-
this.table.showInsertModal();
|
|
1940
|
+
this.table.showInsertModal(this.row.Data.Id);
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
1943
|
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) ? InputType.Icon : InputType.Hidden, 'h-25 m-h-5 d-ib va-m f-u');
|
|
@@ -2151,12 +2151,10 @@ class TableRowComponent {
|
|
|
2151
2151
|
});
|
|
2152
2152
|
};
|
|
2153
2153
|
}
|
|
2154
|
-
else {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
};
|
|
2159
|
-
}
|
|
2154
|
+
else if (option.InputAction === PermissionInputActionEnum.OnClick) {
|
|
2155
|
+
opt.onClick = (btn) => {
|
|
2156
|
+
this.table.optionsActions.find(x => x.name === option.Action).OnClick(btn);
|
|
2157
|
+
};
|
|
2160
2158
|
}
|
|
2161
2159
|
opts.push(opt);
|
|
2162
2160
|
}
|
|
@@ -2380,9 +2378,6 @@ class TableComponent {
|
|
|
2380
2378
|
this.setSortable();
|
|
2381
2379
|
};
|
|
2382
2380
|
}
|
|
2383
|
-
if (this.table.hasChildren && this.table.form) {
|
|
2384
|
-
this.table.form.inputs.push(new InputClass(this.table.environment, this.table.l, 'ParentId', null, InputType.Hidden, null, null, false));
|
|
2385
|
-
}
|
|
2386
2381
|
this.table.set(this.changeRows);
|
|
2387
2382
|
if (this.table.searchForm) {
|
|
2388
2383
|
this.table.searchForm.displayLabel = false;
|
|
@@ -6237,9 +6232,9 @@ class TableClass {
|
|
|
6237
6232
|
getUrl() {
|
|
6238
6233
|
return this.url + 'List';
|
|
6239
6234
|
}
|
|
6240
|
-
showInsertModal() {
|
|
6235
|
+
showInsertModal(cId = null) {
|
|
6241
6236
|
const insertAccess = this.permissions.getAccess(PermissionAccessTypeEnum.Insert);
|
|
6242
|
-
this.form.url = this.form.baseUrl = this.url + 'Insert';
|
|
6237
|
+
this.form.url = this.form.baseUrl = this.url + 'Insert' + (cId ? '/' + cId : '');
|
|
6243
6238
|
this.form.name = insertAccess.Name;
|
|
6244
6239
|
this.form.method = Method.Post;
|
|
6245
6240
|
this.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = false);
|