@sankhyalabs/sankhyablocks 8.1.0 → 8.2.0-dev.2
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/dist/cjs/{ConfigStorage-73e7afff.js → ConfigStorage-12397f18.js} +163 -51
- package/dist/cjs/{DataFetcher-004811c6.js → DataFetcher-f2da1f79.js} +68 -30
- package/dist/cjs/ISave-d68ce3cd.js +8 -0
- package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
- package/dist/cjs/{SnkFormConfigManager-d1f1a222.js → SnkFormConfigManager-13f79e37.js} +19 -21
- package/dist/cjs/auth-fetcher-319a4cb2.js +34 -0
- package/dist/cjs/{dataunit-fetcher-029eafbd.js → dataunit-fetcher-e72068c1.js} +1 -1
- package/dist/cjs/{form-config-fetcher-181767c9.js → form-config-fetcher-5d62ab62.js} +66 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-9a97994a.js → pesquisa-fetcher-8c363096.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button.cjs.entry.js +18 -11
- package/dist/cjs/snk-application.cjs.entry.js +51 -73
- package/dist/cjs/snk-attach.cjs.entry.js +7 -13
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -1
- package/dist/cjs/snk-crud.cjs.entry.js +28 -9
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-d5109a08.js → snk-data-unit-80a00ae4.js} +8 -6
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +18 -25
- package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +14 -17
- package/dist/cjs/snk-filter-detail.cjs.entry.js +1 -15
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -19
- package/dist/cjs/snk-form-config.cjs.entry.js +6 -17
- package/dist/cjs/snk-form-view.cjs.entry.js +6 -1
- package/dist/cjs/snk-form.cjs.entry.js +12 -8
- package/dist/cjs/snk-grid-config.cjs.entry.js +5 -6
- package/dist/cjs/snk-grid.cjs.entry.js +20 -20
- package/dist/cjs/{snk-guides-viewer-aa3e3bfa.js → snk-guides-viewer-a7cd6fda.js} +18 -9
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -8
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +13 -16
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +43 -92
- package/dist/cjs/snk-taskbar.cjs.entry.js +2 -1
- package/dist/collection/components/snk-actions-button/actions/index.js +3 -4
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +8 -4
- package/dist/collection/components/snk-application/snk-application.js +60 -65
- package/dist/collection/components/snk-configurator/snk-configurator.js +19 -1
- package/dist/collection/components/snk-crud/snk-crud.js +63 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +65 -15
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +27 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +66 -30
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +42 -7
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +0 -23
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +2 -12
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +21 -16
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +28 -12
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
- package/dist/collection/components/snk-form/snk-form.js +46 -2
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +5 -15
- package/dist/collection/components/snk-grid/snk-grid.js +110 -16
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +19 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +28 -12
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +43 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +19 -1
- package/dist/collection/lib/configs/ConfigStorage.js +33 -44
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +23 -71
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +39 -30
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +0 -24
- package/dist/collection/lib/index.js +10 -0
- package/dist/collection/lib/resourceid/ResourceIDUtils.js +7 -0
- package/dist/collection/lib/utils/urlutils.js +29 -0
- package/dist/components/ConfigStorage.js +161 -48
- package/dist/components/DataFetcher.js +68 -30
- package/dist/components/ResourceIDUtils.js +10 -0
- package/dist/components/SnkFormConfigManager.js +17 -19
- package/dist/components/auth-fetcher.js +32 -0
- package/dist/components/form-config-fetcher.js +64 -2
- package/dist/components/snk-actions-button2.js +23 -9
- package/dist/components/snk-application2.js +132 -154
- package/dist/components/snk-attach2.js +1 -8
- package/dist/components/snk-configurator2.js +3 -1
- package/dist/components/snk-crud.js +29 -7
- package/dist/components/snk-data-unit2.js +10 -6
- package/dist/components/snk-detail-view2.js +28 -23
- package/dist/components/snk-entity-list.js +0 -4
- package/dist/components/snk-filter-bar2.js +12 -12
- package/dist/components/snk-filter-detail2.js +2 -12
- package/dist/components/snk-filter-modal-item2.js +5 -16
- package/dist/components/snk-form-config2.js +5 -15
- package/dist/components/snk-form-view2.js +6 -1
- package/dist/components/snk-form.js +9 -2
- package/dist/components/snk-grid-config2.js +4 -2
- package/dist/components/snk-grid2.js +23 -16
- package/dist/components/snk-personalized-filter2.js +11 -11
- package/dist/components/snk-simple-crud2.js +33 -81
- package/dist/components/snk-taskbar2.js +3 -1
- package/dist/esm/{ConfigStorage-19a7260b.js → ConfigStorage-932ab366.js} +162 -49
- package/dist/esm/{DataFetcher-e0fc5549.js → DataFetcher-7e18aa30.js} +68 -30
- package/dist/esm/ISave-4412b20c.js +8 -0
- package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
- package/dist/esm/{SnkFormConfigManager-1a42eb02.js → SnkFormConfigManager-bb9afc3f.js} +19 -21
- package/dist/esm/auth-fetcher-6d9664b7.js +32 -0
- package/dist/esm/{dataunit-fetcher-6a695723.js → dataunit-fetcher-91a4eb82.js} +1 -1
- package/dist/esm/{form-config-fetcher-9e167008.js → form-config-fetcher-aaaa79a6.js} +65 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-9118eb7a.js → pesquisa-fetcher-56b30fb4.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button.entry.js +18 -11
- package/dist/esm/snk-application.entry.js +49 -71
- package/dist/esm/snk-attach.entry.js +3 -9
- package/dist/esm/snk-configurator.entry.js +2 -1
- package/dist/esm/snk-crud.entry.js +28 -9
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-3a0bbfcb.js → snk-data-unit-3ab57d1a.js} +8 -6
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +18 -25
- package/dist/esm/snk-entity-list.entry.js +0 -4
- package/dist/esm/snk-filter-bar.entry.js +14 -17
- package/dist/esm/snk-filter-detail.entry.js +2 -16
- package/dist/esm/snk-filter-modal-item.entry.js +6 -20
- package/dist/esm/snk-form-config.entry.js +7 -18
- package/dist/esm/snk-form-view.entry.js +6 -1
- package/dist/esm/snk-form.entry.js +12 -8
- package/dist/esm/snk-grid-config.entry.js +5 -6
- package/dist/esm/snk-grid.entry.js +20 -20
- package/dist/esm/{snk-guides-viewer-aa386f6e.js → snk-guides-viewer-cc709b5f.js} +18 -9
- package/dist/esm/snk-guides-viewer.entry.js +8 -8
- package/dist/esm/snk-personalized-filter.entry.js +13 -16
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +34 -83
- package/dist/esm/snk-taskbar.entry.js +2 -1
- package/dist/sankhyablocks/p-01739b21.entry.js +1 -0
- package/dist/sankhyablocks/{p-e7e54737.entry.js → p-03bb1aea.entry.js} +1 -1
- package/dist/sankhyablocks/p-05dbc70e.entry.js +1 -0
- package/dist/sankhyablocks/{p-0a4c753d.js → p-14eac6fe.js} +1 -1
- package/dist/sankhyablocks/{p-2ac9c585.js → p-2d333d22.js} +1 -1
- package/dist/sankhyablocks/p-41e897f1.js +56 -0
- package/dist/sankhyablocks/p-48a40939.js +1 -0
- package/dist/sankhyablocks/p-611aa624.entry.js +1 -0
- package/dist/sankhyablocks/p-66bb8c20.entry.js +1 -0
- package/dist/sankhyablocks/p-688dcb4c.js +1 -0
- package/dist/sankhyablocks/p-6f154396.entry.js +1 -0
- package/dist/sankhyablocks/p-787071a8.js +1 -0
- package/dist/sankhyablocks/p-8818d8f6.entry.js +1 -0
- package/dist/sankhyablocks/p-93f6ca04.entry.js +1 -0
- package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
- package/dist/sankhyablocks/p-9e7d65a4.js +1 -0
- package/dist/sankhyablocks/p-a52a6c9d.js +26 -0
- package/dist/sankhyablocks/p-b6003974.entry.js +1 -0
- package/dist/sankhyablocks/p-c555075c.entry.js +1 -0
- package/dist/sankhyablocks/p-cfb33a4a.entry.js +1 -0
- package/dist/sankhyablocks/{p-7c7764bf.entry.js → p-d13c00b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
- package/dist/sankhyablocks/p-d53a9169.entry.js +1 -0
- package/dist/sankhyablocks/p-d7638f45.entry.js +11 -0
- package/dist/sankhyablocks/p-e086cc2a.entry.js +1 -0
- package/dist/sankhyablocks/p-e64f3e17.entry.js +1 -0
- package/dist/sankhyablocks/p-ed41b38c.js +1 -0
- package/dist/sankhyablocks/p-ed705cbb.entry.js +1 -0
- package/dist/sankhyablocks/p-efc10705.entry.js +1 -0
- package/dist/sankhyablocks/p-f74fe358.js +1 -0
- package/dist/sankhyablocks/{p-df8621b4.js → p-f8e6b97e.js} +1 -1
- package/dist/sankhyablocks/p-f91e0c5d.entry.js +1 -0
- package/dist/sankhyablocks/p-fa523d6b.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +2 -1
- package/dist/types/components/snk-application/snk-application.d.ts +8 -13
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +4 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +10 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +13 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +5 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -2
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +8 -0
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +0 -4
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +0 -3
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +5 -4
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -0
- package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +5 -4
- package/dist/types/components/snk-form/snk-form.d.ts +9 -1
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +0 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +18 -1
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +5 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +8 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +4 -0
- package/dist/types/components.d.ts +189 -21
- package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -8
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +0 -1
- package/dist/types/lib/index.d.ts +11 -0
- package/dist/types/lib/resourceid/ResourceIDUtils.d.ts +3 -0
- package/dist/types/lib/utils/urlutils.d.ts +14 -0
- package/package.json +2 -2
- package/dist/cjs/filter-bar-config-fetcher-2b8ed9d0.js +0 -155
- package/dist/cjs/resource-fetcher-c0332609.js +0 -68
- package/dist/components/filter-bar-config-fetcher.js +0 -153
- package/dist/components/resource-fetcher.js +0 -66
- package/dist/esm/filter-bar-config-fetcher-06e02851.js +0 -153
- package/dist/esm/resource-fetcher-768d5556.js +0 -66
- package/dist/sankhyablocks/p-0a94fdbd.entry.js +0 -1
- package/dist/sankhyablocks/p-0ed0fc02.entry.js +0 -1
- package/dist/sankhyablocks/p-1e0189ff.entry.js +0 -1
- package/dist/sankhyablocks/p-216f081a.entry.js +0 -1
- package/dist/sankhyablocks/p-50d72261.entry.js +0 -1
- package/dist/sankhyablocks/p-6759adae.entry.js +0 -1
- package/dist/sankhyablocks/p-7b8b8ae9.js +0 -10
- package/dist/sankhyablocks/p-815a42c0.entry.js +0 -1
- package/dist/sankhyablocks/p-8a41172a.entry.js +0 -1
- package/dist/sankhyablocks/p-8f8184ff.js +0 -56
- package/dist/sankhyablocks/p-8fdc3108.js +0 -1
- package/dist/sankhyablocks/p-976e56e9.js +0 -1
- package/dist/sankhyablocks/p-98f9d076.js +0 -17
- package/dist/sankhyablocks/p-9edad923.js +0 -1
- package/dist/sankhyablocks/p-abdcac04.entry.js +0 -1
- package/dist/sankhyablocks/p-b0847056.entry.js +0 -1
- package/dist/sankhyablocks/p-bc735728.entry.js +0 -1
- package/dist/sankhyablocks/p-be684b38.entry.js +0 -1
- package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
- package/dist/sankhyablocks/p-c0f656af.entry.js +0 -1
- package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
- package/dist/sankhyablocks/p-ccbfb1cf.entry.js +0 -1
- package/dist/sankhyablocks/p-d1b89765.js +0 -1
- package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
- package/dist/sankhyablocks/p-e28129aa.entry.js +0 -1
- package/dist/sankhyablocks/p-f31bfdee.entry.js +0 -1
- package/dist/sankhyablocks/p-f92fda53.entry.js +0 -11
@@ -4,7 +4,7 @@ import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMeta
|
|
4
4
|
import { d as defineCustomElement$1, T as TaskbarElement } from './snk-taskbar2.js';
|
5
5
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
6
6
|
import { P as PresentationMode } from './index2.js';
|
7
|
-
import {
|
7
|
+
import { T as TaskbarProcessor, S as SnkMultiSelectionListDataSource } from './SnkMultiSelectionListDataSource.js';
|
8
8
|
import { s as store } from './index3.js';
|
9
9
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
10
10
|
import { d as defineCustomElement$h } from './snk-actions-button2.js';
|
@@ -32,7 +32,6 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
32
32
|
this.__registerHost();
|
33
33
|
this.actionClick = createEvent(this, "actionClick", 7);
|
34
34
|
this.gridDoubleClick = createEvent(this, "gridDoubleClick", 7);
|
35
|
-
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
36
35
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
37
36
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
38
37
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
@@ -49,7 +48,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
49
48
|
this._dataState = undefined;
|
50
49
|
this._gridConfig = undefined;
|
51
50
|
this._popUpGridConfig = false;
|
51
|
+
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
52
52
|
this.configName = undefined;
|
53
|
+
this.resourceID = undefined;
|
53
54
|
this.selectionToastConfig = undefined;
|
54
55
|
this.actionsList = undefined;
|
55
56
|
this.isDetail = undefined;
|
@@ -58,6 +59,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
58
59
|
this.multipleSelection = undefined;
|
59
60
|
this.presentationMode = PresentationMode.PRIMARY;
|
60
61
|
this.messagesBuilder = undefined;
|
62
|
+
this.useEnterLikeTab = false;
|
63
|
+
this.recordsValidator = undefined;
|
64
|
+
this.canEdit = true;
|
61
65
|
}
|
62
66
|
/**
|
63
67
|
* Exibe a janela de configurações da grade.
|
@@ -105,20 +109,17 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
105
109
|
this._gridConfig = config;
|
106
110
|
}
|
107
111
|
loadConfig() {
|
108
|
-
ConfigStorage.
|
109
|
-
.then((
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
.catch((error) => {
|
115
|
-
console.warn(error);
|
116
|
-
});
|
112
|
+
ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
113
|
+
.then((config) => {
|
114
|
+
this.setGridConfig(config);
|
115
|
+
})
|
116
|
+
.catch((error) => {
|
117
|
+
console.warn(error);
|
117
118
|
});
|
118
119
|
}
|
119
120
|
gridConfigChangeHandler(evt) {
|
120
121
|
const config = evt.detail;
|
121
|
-
ConfigStorage.saveGridConfig(config, this.configName);
|
122
|
+
ConfigStorage.saveGridConfig(config, this.configName, this.resourceID);
|
122
123
|
evt.stopPropagation();
|
123
124
|
}
|
124
125
|
modalConfigChangeHandler(evt) {
|
@@ -231,10 +232,11 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
231
232
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
232
233
|
}
|
233
234
|
finshLoading() {
|
235
|
+
var _a, _b;
|
234
236
|
this._dataUnitLoadLockerResolver = this._dataUnit.addLoadingLocker();
|
235
237
|
this.addElementID();
|
236
|
-
this.
|
237
|
-
this.
|
238
|
+
(_a = this.columnFilterDataSource) === null || _a === void 0 ? void 0 : _a.setApplication(this._application);
|
239
|
+
(_b = this.columnFilterDataSource) === null || _b === void 0 ? void 0 : _b.setDataUnit(this._dataUnit);
|
238
240
|
}
|
239
241
|
componentWillLoad() {
|
240
242
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
@@ -325,13 +327,15 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
325
327
|
if (!this._dataUnit) {
|
326
328
|
return undefined;
|
327
329
|
}
|
328
|
-
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
329
|
-
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton() })), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.
|
330
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID }), ((_b = (_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.filterConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
331
|
+
h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID })), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: () => this.gridDoubleClick.emit(), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, onComponentReady: () => this.onEzGridReady(), columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.actionsList, resourceID: this.resourceID })), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
330
332
|
}
|
331
333
|
get _element() { return this; }
|
332
334
|
static get style() { return snkGridCss; }
|
333
335
|
}, [6, "snk-grid", {
|
336
|
+
"columnFilterDataSource": [1040],
|
334
337
|
"configName": [1, "config-name"],
|
338
|
+
"resourceID": [1, "resource-i-d"],
|
335
339
|
"selectionToastConfig": [16],
|
336
340
|
"actionsList": [16],
|
337
341
|
"isDetail": [4, "is-detail"],
|
@@ -340,6 +344,9 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
340
344
|
"multipleSelection": [4, "multiple-selection"],
|
341
345
|
"presentationMode": [1, "presentation-mode"],
|
342
346
|
"messagesBuilder": [1040],
|
347
|
+
"useEnterLikeTab": [4, "use-enter-like-tab"],
|
348
|
+
"recordsValidator": [16],
|
349
|
+
"canEdit": [4, "can-edit"],
|
343
350
|
"_dataUnit": [32],
|
344
351
|
"_dataState": [32],
|
345
352
|
"_gridConfig": [32],
|
@@ -41,6 +41,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
41
41
|
this.entityUri = undefined;
|
42
42
|
this.filterId = undefined;
|
43
43
|
this.configName = undefined;
|
44
|
+
this.resourceID = undefined;
|
44
45
|
}
|
45
46
|
/*
|
46
47
|
* Cria um novo filtro se não houver nenhum filtro existente
|
@@ -77,17 +78,15 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
77
78
|
this._filterAssistent = ObjectUtils.copy(newPersonalizedFilter);
|
78
79
|
}
|
79
80
|
loadFilter(newValue, oldValue) {
|
80
|
-
if (newValue == null || oldValue == newValue) {
|
81
|
+
if (newValue == null || oldValue == newValue || this.resourceID == undefined) {
|
81
82
|
return;
|
82
83
|
}
|
83
|
-
ConfigStorage.
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
90
|
-
});
|
84
|
+
ConfigStorage.loadPersonalizedFilter(newValue, this.resourceID, this.configName)
|
85
|
+
.then((resp) => {
|
86
|
+
const personalizedFilter = this.addLabelToItems(resp);
|
87
|
+
this._filterAssistent = personalizedFilter;
|
88
|
+
this._originalFilterAssistent = ObjectUtils.copy(personalizedFilter);
|
89
|
+
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
91
90
|
});
|
92
91
|
}
|
93
92
|
componentWillLoad() {
|
@@ -112,7 +111,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
112
111
|
return this._application.messagesBuilder.getMessage(key, params);
|
113
112
|
}
|
114
113
|
saveFilter() {
|
115
|
-
ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.configName).then((personalizedFilter) => {
|
114
|
+
ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName).then((personalizedFilter) => {
|
116
115
|
this._elButtonSave.enabled = false;
|
117
116
|
const messageToken = !!this._filterAssistent.id ? 'confirmEdit' : 'confirmSave';
|
118
117
|
ApplicationUtils.info(this.getMessage(`snkPersonalizedFilter.${messageToken}.title`), { iconName: "check" });
|
@@ -123,7 +122,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
123
122
|
});
|
124
123
|
}
|
125
124
|
removeFilter() {
|
126
|
-
ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.configName);
|
125
|
+
ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName);
|
127
126
|
}
|
128
127
|
hasChangesToSave() {
|
129
128
|
return JSON.stringify(this._filterAssistent) === JSON.stringify(this._originalFilterAssistent);
|
@@ -301,6 +300,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
301
300
|
"entityUri": [1025, "entity-uri"],
|
302
301
|
"filterId": [1025, "filter-id"],
|
303
302
|
"configName": [1025, "config-name"],
|
303
|
+
"resourceID": [1, "resource-i-d"],
|
304
304
|
"_filterAssistentMode": [32],
|
305
305
|
"_filterAssistent": [32],
|
306
306
|
"createPersonalizedFilter": [64]
|
@@ -1,43 +1,60 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
-
import { DataUnit,
|
2
|
+
import { DataUnit, defaultDataLoader, StringUtils, ChangeOperation, ObjectUtils, ApplicationContext, DataType, UserInterface } from '@sankhyalabs/core';
|
3
3
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
|
4
4
|
import { T as TaskbarElement, d as defineCustomElement$1 } from './snk-taskbar2.js';
|
5
5
|
import './DataFetcher.js';
|
6
6
|
import './pesquisa-fetcher.js';
|
7
7
|
import { P as PresentationMode } from './index2.js';
|
8
|
-
import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor } from './SnkMultiSelectionListDataSource.js';
|
9
|
-
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
8
|
import { d as defineCustomElement$5 } from './snk-actions-button2.js';
|
9
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
+
import './filter-item-type.enum.js';
|
12
|
+
import './form-config-fetcher.js';
|
13
|
+
import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor } from './SnkMultiSelectionListDataSource.js';
|
11
14
|
import { d as defineCustomElement$4 } from './snk-data-exporter2.js';
|
12
15
|
import { d as defineCustomElement$3 } from './snk-data-unit2.js';
|
13
16
|
import { d as defineCustomElement$2 } from './snk-exporter-email-sender2.js';
|
14
17
|
|
15
18
|
class InMemoryLoader {
|
16
19
|
constructor(metadata, records) {
|
17
|
-
this.records = records
|
20
|
+
this.records = records;
|
18
21
|
this.metadata = metadata;
|
19
22
|
this._dataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
20
23
|
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
21
|
-
this._dataUnit.dataLoader = (dataUnit, request) =>
|
24
|
+
this._dataUnit.dataLoader = (dataUnit, request) => defaultDataLoader(dataUnit, request, this.getRecordsToLoad());
|
22
25
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
23
26
|
this._dataUnit.removeLoader = (_dataUnit, recordIds) => this.removeLoader(_dataUnit, recordIds);
|
24
27
|
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
25
28
|
}
|
29
|
+
getRecordsToLoad() {
|
30
|
+
if (this._initialRecords) {
|
31
|
+
try {
|
32
|
+
return this._initialRecords;
|
33
|
+
}
|
34
|
+
finally {
|
35
|
+
this._initialRecords = undefined;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
return this.dataUnit.records;
|
39
|
+
}
|
26
40
|
get dataUnit() {
|
27
41
|
return this._dataUnit;
|
28
42
|
}
|
29
43
|
get records() {
|
30
|
-
return this.
|
44
|
+
return this.dataUnit.records;
|
31
45
|
}
|
32
46
|
set records(records) {
|
33
|
-
|
47
|
+
const newRecords = records === null || records === void 0 ? void 0 : records.map(record => {
|
34
48
|
if (!record["__record__id__"]) {
|
35
49
|
record["__record__id__"] = this.generateUniqueId();
|
36
50
|
}
|
37
51
|
return record;
|
38
52
|
});
|
39
53
|
if (this._dataUnit) {
|
40
|
-
this._dataUnit.records =
|
54
|
+
this._dataUnit.records = newRecords;
|
55
|
+
}
|
56
|
+
else {
|
57
|
+
this._initialRecords = newRecords;
|
41
58
|
}
|
42
59
|
}
|
43
60
|
get metadata() {
|
@@ -55,76 +72,16 @@ class InMemoryLoader {
|
|
55
72
|
metadaLoader() {
|
56
73
|
return Promise.resolve(this._metadata);
|
57
74
|
}
|
58
|
-
dataLoader(dataUnit, request) {
|
59
|
-
const filters = this.getColumnFilters(dataUnit);
|
60
|
-
let records = this.applyFilters(filters);
|
61
|
-
if (request.sort) {
|
62
|
-
request.sort.forEach(sort => {
|
63
|
-
records = records.sort((recordA, recordB) => {
|
64
|
-
const fieldA = recordA[sort.field];
|
65
|
-
const fieldB = recordB[sort.field];
|
66
|
-
const sortFn = this.getSortFn(sort.dataType);
|
67
|
-
return sortFn(fieldA, fieldB) * (sort.mode == SortMode.ASC ? 1 : -1);
|
68
|
-
});
|
69
|
-
});
|
70
|
-
}
|
71
|
-
return Promise.resolve({ records: records });
|
72
|
-
}
|
73
|
-
applyFilters(filters) {
|
74
|
-
let records = [...this._records];
|
75
|
-
filters.forEach(filter => {
|
76
|
-
records = records.filter(record => { var _a; return filter.values.includes((_a = record[filter.column]) === null || _a === void 0 ? void 0 : _a.toString()); });
|
77
|
-
});
|
78
|
-
return records;
|
79
|
-
}
|
80
|
-
getColumnFilters(dataUnit) {
|
81
|
-
var _a, _b;
|
82
|
-
const allFilters = (_a = dataUnit.getFilters()) !== null && _a !== void 0 ? _a : [];
|
83
|
-
const columnFilters = (_b = allFilters.filter(filter => { var _a; return (_a = filter.name) === null || _a === void 0 ? void 0 : _a.includes(DISTINCT_FILTER_NAME_PREFIX); })) !== null && _b !== void 0 ? _b : [];
|
84
|
-
return columnFilters.map(filter => {
|
85
|
-
var _a, _b;
|
86
|
-
return {
|
87
|
-
column: (_b = (_a = filter.name) === null || _a === void 0 ? void 0 : _a.replace(DISTINCT_FILTER_NAME_PREFIX, "")) !== null && _b !== void 0 ? _b : "",
|
88
|
-
values: filter.params.map(param => param.value),
|
89
|
-
};
|
90
|
-
});
|
91
|
-
}
|
92
|
-
getSortFn(type) {
|
93
|
-
switch (type) {
|
94
|
-
case DataType.NUMBER:
|
95
|
-
return this.sortNumber;
|
96
|
-
case DataType.DATE:
|
97
|
-
return this.sortDate;
|
98
|
-
case DataType.OBJECT:
|
99
|
-
return this.sortObject;
|
100
|
-
default:
|
101
|
-
return StringUtils.compare;
|
102
|
-
}
|
103
|
-
}
|
104
|
-
sortObject(a, b) {
|
105
|
-
return StringUtils.compare(a === null || a === void 0 ? void 0 : a["label"], b === null || b === void 0 ? void 0 : b["label"]);
|
106
|
-
}
|
107
|
-
sortNumber(a, b) {
|
108
|
-
return a - b;
|
109
|
-
}
|
110
|
-
sortDate(a, b) {
|
111
|
-
let timeA = a.getTime(), timeB = b.getTime();
|
112
|
-
return timeA === timeB ? 0 : (timeA < timeB ? -1 : 1);
|
113
|
-
}
|
114
75
|
saveLoader(_dataUnit, changes) {
|
115
76
|
return new Promise((resolve) => {
|
116
77
|
let dataUnitRecords = [];
|
117
78
|
changes.forEach(change => {
|
118
79
|
let { record, updatingFields, operation } = change;
|
119
|
-
|
80
|
+
const changedRecord = Object.assign(Object.assign({}, record), updatingFields);
|
120
81
|
if (operation === ChangeOperation.INSERT ||
|
121
82
|
operation === ChangeOperation.COPY) {
|
122
|
-
|
123
|
-
|
124
|
-
isAdd = true;
|
125
|
-
}
|
126
|
-
const changedRecord = Object.assign(Object.assign({}, record), updatingFields);
|
127
|
-
if (isAdd) {
|
83
|
+
changedRecord["__old__id__"] = record["__record__id__"];
|
84
|
+
changedRecord["__record__id__"] = this.generateUniqueId();
|
128
85
|
this.records.push(changedRecord);
|
129
86
|
}
|
130
87
|
else {
|
@@ -138,7 +95,6 @@ class InMemoryLoader {
|
|
138
95
|
}
|
139
96
|
removeLoader(_dataUnit, recordIds) {
|
140
97
|
return new Promise((resolve) => {
|
141
|
-
this._records = this._records.filter(record => !recordIds.includes(record["__record__id__"]));
|
142
98
|
resolve(recordIds);
|
143
99
|
});
|
144
100
|
}
|
@@ -154,14 +110,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
154
110
|
this.dataStateChange = createEvent(this, "dataStateChange", 3);
|
155
111
|
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
156
112
|
this.actionClick = createEvent(this, "actionClick", 7);
|
113
|
+
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
157
114
|
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER"];
|
158
115
|
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER"];
|
159
116
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
160
|
-
// /**
|
161
|
-
// * Quando verdadeiro, o ENTER fará a navegação como se fosse a tecla TAB na grade.
|
162
|
-
// */
|
163
|
-
// @Prop()
|
164
|
-
// useEnterLikeTab: boolean = false;
|
165
117
|
this._taskbarProcessor = new TaskbarProcessor({
|
166
118
|
"snkSimpleCrudTaskbar.form_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(TaskbarElement.GRID_MODE),
|
167
119
|
"snkSimpleCrudTaskbar.grid_regular": this.resolveInMemoryBtns(this.REGULAR_DEFAULT_BTNS).concat(TaskbarElement.FORM_MODE),
|
@@ -180,6 +132,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
180
132
|
this.useCancelConfirm = true;
|
181
133
|
this.taskbarManager = undefined;
|
182
134
|
this.messagesBuilder = undefined;
|
135
|
+
this.useEnterLikeTab = false;
|
183
136
|
}
|
184
137
|
resolveInMemoryBtns(taskbarButtons) {
|
185
138
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -324,11 +277,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
324
277
|
}
|
325
278
|
render() {
|
326
279
|
var _a;
|
327
|
-
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail),
|
328
|
-
// ignoreSaveMessage={this._currentViewMode === VIEW_MODE.GRID}
|
329
|
-
onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium ez-margin-bottom--large", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
280
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-flex ez-box ez-box--shadow" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium ez-margin-bottom--large", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }), h("ez-view-stack", { class: "ez-flex ez-flex--column", ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), columnfilterDataSource: this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
330
281
|
? undefined
|
331
|
-
: this._multiSelectionListDataSource }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig }))))));
|
282
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.formConfig }))))));
|
332
283
|
}
|
333
284
|
get _element() { return this; }
|
334
285
|
static get watchers() { return {
|
@@ -346,6 +297,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
346
297
|
"useCancelConfirm": [4, "use-cancel-confirm"],
|
347
298
|
"taskbarManager": [16],
|
348
299
|
"messagesBuilder": [1040],
|
300
|
+
"useEnterLikeTab": [4, "use-enter-like-tab"],
|
349
301
|
"_currentViewMode": [32],
|
350
302
|
"_config": [32],
|
351
303
|
"goToView": [64],
|
@@ -145,6 +145,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
145
145
|
};
|
146
146
|
this._permissions = undefined;
|
147
147
|
this.configName = undefined;
|
148
|
+
this.resourceID = undefined;
|
148
149
|
this.buttons = undefined;
|
149
150
|
this.customButtons = undefined;
|
150
151
|
this.actionsList = undefined;
|
@@ -286,7 +287,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
286
287
|
componentWillLoad() {
|
287
288
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
288
289
|
if (this._application) {
|
289
|
-
this._application.getAllAccess().then(access => this._permissions = access);
|
290
|
+
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
290
291
|
}
|
291
292
|
else {
|
292
293
|
this._permissions = {};
|
@@ -330,6 +331,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
330
331
|
static get style() { return snkTaskbarCss; }
|
331
332
|
}, [6, "snk-taskbar", {
|
332
333
|
"configName": [1, "config-name"],
|
334
|
+
"resourceID": [1, "resource-i-d"],
|
333
335
|
"buttons": [1],
|
334
336
|
"customButtons": [16],
|
335
337
|
"actionsList": [16],
|