@sankhyalabs/sankhyablocks 8.1.0-dev.10 → 8.1.0-dev.12
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-e32e1391.js → ConfigStorage-42601579.js} +163 -51
- package/dist/cjs/{DataFetcher-d2c6ae38.js → DataFetcher-370cc8f2.js} +38 -29
- package/dist/cjs/ISave-d68ce3cd.js +8 -0
- package/dist/cjs/ResourceIDUtils-5ff86aa7.js +12 -0
- package/dist/cjs/{SnkFormConfigManager-5e61b0a9.js → SnkFormConfigManager-e5a28b2e.js} +19 -21
- package/dist/cjs/{auth-fetcher-da975ac5.js → auth-fetcher-c42326e9.js} +2 -2
- package/dist/cjs/{dataunit-fetcher-58ad78a7.js → dataunit-fetcher-eab8050e.js} +1 -1
- package/dist/cjs/{form-config-fetcher-761994b9.js → form-config-fetcher-6704319c.js} +66 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-bb0bb679.js → pesquisa-fetcher-84d392c7.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 +49 -44
- 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 +24 -10
- package/dist/cjs/snk-data-exporter.cjs.entry.js +2 -2
- package/dist/cjs/{snk-data-unit-e89e07bd.js → snk-data-unit-80a00ae4.js} +4 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +13 -12
- package/dist/cjs/snk-entity-list.cjs.entry.js +0 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +13 -16
- 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.cjs.entry.js +11 -8
- package/dist/cjs/snk-grid-config.cjs.entry.js +5 -6
- package/dist/cjs/snk-grid.cjs.entry.js +13 -17
- package/dist/cjs/{snk-guides-viewer-eb0a79a4.js → snk-guides-viewer-fd785f55.js} +16 -7
- 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 +7 -3
- 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 +18 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +20 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +25 -28
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +21 -4
- 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 +27 -11
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +17 -19
- package/dist/collection/components/snk-form/snk-form.js +24 -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 +27 -12
- 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-taskbar/snk-taskbar.js +19 -1
- package/dist/collection/lib/configs/ConfigStorage.js +33 -44
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +38 -29
- 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/components/ConfigStorage.js +161 -48
- package/dist/components/DataFetcher.js +38 -29
- package/dist/components/ResourceIDUtils.js +10 -0
- package/dist/components/SnkFormConfigManager.js +17 -19
- package/dist/components/auth-fetcher.js +1 -1
- package/dist/components/form-config-fetcher.js +64 -2
- package/dist/components/snk-actions-button2.js +23 -9
- package/dist/components/snk-application2.js +134 -128
- package/dist/components/snk-attach2.js +1 -8
- package/dist/components/snk-configurator2.js +3 -1
- package/dist/components/snk-crud.js +22 -6
- package/dist/components/snk-data-unit2.js +5 -3
- package/dist/components/snk-detail-view2.js +18 -8
- package/dist/components/snk-entity-list.js +0 -4
- package/dist/components/snk-filter-bar2.js +11 -11
- 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.js +8 -2
- package/dist/components/snk-grid-config2.js +4 -2
- package/dist/components/snk-grid2.js +11 -12
- package/dist/components/snk-personalized-filter2.js +11 -11
- package/dist/components/snk-simple-crud2.js +5 -1
- package/dist/components/snk-taskbar2.js +3 -1
- package/dist/esm/{ConfigStorage-b6aefe42.js → ConfigStorage-2915a841.js} +162 -49
- package/dist/esm/{DataFetcher-aaaff866.js → DataFetcher-0b121ffb.js} +38 -29
- package/dist/esm/ISave-4412b20c.js +8 -0
- package/dist/esm/ResourceIDUtils-a114189a.js +10 -0
- package/dist/esm/{SnkFormConfigManager-80901f2d.js → SnkFormConfigManager-8005340f.js} +19 -21
- package/dist/esm/{auth-fetcher-7860d777.js → auth-fetcher-643f240e.js} +1 -1
- package/dist/esm/{dataunit-fetcher-9dfcdb1d.js → dataunit-fetcher-6423d6eb.js} +1 -1
- package/dist/esm/{form-config-fetcher-4a34b86a.js → form-config-fetcher-77cdb26c.js} +65 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-01d058e6.js → pesquisa-fetcher-c5a3c564.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 -44
- 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 +24 -10
- package/dist/esm/snk-data-exporter.entry.js +2 -2
- package/dist/esm/{snk-data-unit-8c4d944d.js → snk-data-unit-3ab57d1a.js} +4 -3
- package/dist/esm/snk-data-unit.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +13 -12
- package/dist/esm/snk-entity-list.entry.js +0 -4
- package/dist/esm/snk-filter-bar.entry.js +13 -16
- 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.entry.js +11 -8
- package/dist/esm/snk-grid-config.entry.js +5 -6
- package/dist/esm/snk-grid.entry.js +13 -17
- package/dist/esm/{snk-guides-viewer-ee42eb53.js → snk-guides-viewer-43b550a2.js} +16 -7
- 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 +7 -3
- package/dist/esm/snk-taskbar.entry.js +2 -1
- package/dist/sankhyablocks/p-1108ed0e.entry.js +1 -0
- package/dist/sankhyablocks/p-18ead46b.entry.js +1 -0
- package/dist/sankhyablocks/p-1986cfa4.js +26 -0
- package/dist/sankhyablocks/p-1c7b4bad.entry.js +1 -0
- package/dist/sankhyablocks/p-48a40939.js +1 -0
- package/dist/sankhyablocks/p-508822c3.entry.js +1 -0
- package/dist/sankhyablocks/{p-85affa29.js → p-53a7ab6c.js} +1 -1
- package/dist/sankhyablocks/{p-77ecc583.entry.js → p-58b84e45.entry.js} +1 -1
- package/dist/sankhyablocks/p-688dcb4c.js +1 -0
- package/dist/sankhyablocks/{p-05bcad8a.entry.js → p-774afde8.entry.js} +1 -1
- package/dist/sankhyablocks/p-84b9208d.entry.js +1 -0
- package/dist/sankhyablocks/p-85dfb90b.entry.js +1 -0
- package/dist/sankhyablocks/p-86dda34d.js +1 -0
- package/dist/sankhyablocks/p-9a270401.entry.js +1 -0
- package/dist/sankhyablocks/{p-bee6b5d7.js → p-9bfc7124.js} +1 -1
- package/dist/sankhyablocks/p-9d81ad53.entry.js +1 -0
- package/dist/sankhyablocks/p-9e7d65a4.js +1 -0
- package/dist/sankhyablocks/p-a107474c.js +56 -0
- package/dist/sankhyablocks/p-a28470ae.entry.js +1 -0
- package/dist/sankhyablocks/p-b9376677.entry.js +1 -0
- package/dist/sankhyablocks/p-c7c035eb.js +1 -0
- package/dist/sankhyablocks/p-caaef934.js +1 -0
- package/dist/sankhyablocks/p-cf65dbb2.entry.js +1 -0
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +1 -0
- package/dist/sankhyablocks/p-da2422ef.entry.js +11 -0
- package/dist/sankhyablocks/p-e086cc2a.entry.js +1 -0
- package/dist/sankhyablocks/p-ed705cbb.entry.js +1 -0
- package/dist/sankhyablocks/p-f1f5232d.entry.js +1 -0
- package/dist/sankhyablocks/{p-60791bb6.js → p-f88bdc84.js} +1 -1
- package/dist/sankhyablocks/p-fa523d6b.entry.js +1 -0
- package/dist/sankhyablocks/p-fcdd5761.entry.js +1 -0
- package/dist/sankhyablocks/p-fdf6b377.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 +1 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +4 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +5 -2
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +4 -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 +5 -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 +4 -0
- 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-taskbar/snk-taskbar.d.ts +4 -0
- package/dist/types/components.d.ts +99 -21
- package/dist/types/lib/configs/ConfigStorage.d.ts +11 -13
- 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/package.json +1 -1
- package/dist/cjs/filter-bar-config-fetcher-80b033ce.js +0 -155
- package/dist/cjs/resource-fetcher-95d24dff.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-317cb6bf.js +0 -153
- package/dist/esm/resource-fetcher-b36ac145.js +0 -66
- package/dist/sankhyablocks/p-0b64f036.entry.js +0 -1
- package/dist/sankhyablocks/p-0e97ec46.entry.js +0 -1
- package/dist/sankhyablocks/p-1b81c379.entry.js +0 -1
- package/dist/sankhyablocks/p-2dd0f891.js +0 -17
- package/dist/sankhyablocks/p-330f584a.entry.js +0 -1
- package/dist/sankhyablocks/p-35ecafcb.entry.js +0 -1
- package/dist/sankhyablocks/p-42843f0e.js +0 -1
- package/dist/sankhyablocks/p-459d4267.entry.js +0 -1
- package/dist/sankhyablocks/p-557affc8.entry.js +0 -1
- package/dist/sankhyablocks/p-564efc43.js +0 -1
- package/dist/sankhyablocks/p-6295424d.entry.js +0 -1
- package/dist/sankhyablocks/p-64c2cec3.js +0 -1
- package/dist/sankhyablocks/p-803b79d6.js +0 -1
- package/dist/sankhyablocks/p-80729c9b.entry.js +0 -11
- package/dist/sankhyablocks/p-95fa8af6.entry.js +0 -1
- package/dist/sankhyablocks/p-96c1ae78.entry.js +0 -1
- package/dist/sankhyablocks/p-b556fadc.entry.js +0 -1
- package/dist/sankhyablocks/p-befbc9ee.entry.js +0 -1
- package/dist/sankhyablocks/p-bf3bd954.entry.js +0 -1
- package/dist/sankhyablocks/p-c32b9d7c.entry.js +0 -1
- package/dist/sankhyablocks/p-c6380ea2.entry.js +0 -1
- package/dist/sankhyablocks/p-dd1fa35d.js +0 -56
- package/dist/sankhyablocks/p-de69b4b0.entry.js +0 -1
- package/dist/sankhyablocks/p-e42f1f2a.js +0 -1
- package/dist/sankhyablocks/p-f24c4bc7.entry.js +0 -1
- package/dist/sankhyablocks/p-f737f7e1.js +0 -10
- package/dist/sankhyablocks/p-fd69eab9.entry.js +0 -1
@@ -6,17 +6,15 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
8
8
|
const taskbarElements = require('./taskbar-elements-b98dd6e9.js');
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
9
|
+
const ConfigStorage = require('./ConfigStorage-42601579.js');
|
10
10
|
const index$1 = require('./index-0e663819.js');
|
11
11
|
const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
|
12
12
|
const index$2 = require('./index-102ba62d.js');
|
13
13
|
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-804ff4c7.js');
|
14
14
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
15
|
-
require('./form-config-fetcher-
|
16
|
-
require('./DataFetcher-
|
15
|
+
require('./form-config-fetcher-6704319c.js');
|
16
|
+
require('./DataFetcher-370cc8f2.js');
|
17
17
|
require('./_commonjsHelpers-537d719a.js');
|
18
|
-
require('./resource-fetcher-95d24dff.js');
|
19
|
-
require('./filter-bar-config-fetcher-80b033ce.js');
|
20
18
|
require('./filter-item-type.enum-aa823a00.js');
|
21
19
|
|
22
20
|
const snkGridCss = ".snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%}.snk-grid__header.sc-snk-grid{display:flex;flex-wrap:nowrap;width:100%}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:300px}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
@@ -44,6 +42,7 @@ const SnkGrid = class {
|
|
44
42
|
this._popUpGridConfig = false;
|
45
43
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
46
44
|
this.configName = undefined;
|
45
|
+
this.resourceID = undefined;
|
47
46
|
this.selectionToastConfig = undefined;
|
48
47
|
this.actionsList = undefined;
|
49
48
|
this.isDetail = undefined;
|
@@ -102,20 +101,17 @@ const SnkGrid = class {
|
|
102
101
|
this._gridConfig = config;
|
103
102
|
}
|
104
103
|
loadConfig() {
|
105
|
-
ConfigStorage.ConfigStorage.
|
106
|
-
.then((
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
.catch((error) => {
|
112
|
-
console.warn(error);
|
113
|
-
});
|
104
|
+
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
105
|
+
.then((config) => {
|
106
|
+
this.setGridConfig(config);
|
107
|
+
})
|
108
|
+
.catch((error) => {
|
109
|
+
console.warn(error);
|
114
110
|
});
|
115
111
|
}
|
116
112
|
gridConfigChangeHandler(evt) {
|
117
113
|
const config = evt.detail;
|
118
|
-
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName);
|
114
|
+
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resourceID);
|
119
115
|
evt.stopPropagation();
|
120
116
|
}
|
121
117
|
modalConfigChangeHandler(evt) {
|
@@ -323,8 +319,8 @@ const SnkGrid = class {
|
|
323
319
|
if (!this._dataUnit) {
|
324
320
|
return undefined;
|
325
321
|
}
|
326
|
-
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, index.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 &&
|
327
|
-
index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.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() })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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 }, index.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 })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), application: this._application, selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig() }))));
|
322
|
+
return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, index.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 &&
|
323
|
+
index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" }), index.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 })), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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 }, index.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 })), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.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 }))));
|
328
324
|
}
|
329
325
|
get _element() { return index.getElement(this); }
|
330
326
|
};
|
@@ -2,14 +2,19 @@
|
|
2
2
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-e5a28b2e.js');
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
|
8
8
|
const taskbarElements = require('./taskbar-elements-b98dd6e9.js');
|
9
9
|
const constants = require('./constants-d187e03e.js');
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./pesquisa-fetcher-
|
10
|
+
require('./DataFetcher-370cc8f2.js');
|
11
|
+
require('./pesquisa-fetcher-84d392c7.js');
|
12
12
|
const index$1 = require('./index-0e663819.js');
|
13
|
+
require('./ISave-d68ce3cd.js');
|
14
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
|
+
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
+
require('./filter-item-type.enum-aa823a00.js');
|
17
|
+
require('./form-config-fetcher-6704319c.js');
|
13
18
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
14
19
|
|
15
20
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-medium);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-medium)}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
@@ -34,6 +39,7 @@ const SnkGuidesViewer = class {
|
|
34
39
|
this.messagesBuilder = undefined;
|
35
40
|
this.canEdit = true;
|
36
41
|
this.presentationMode = undefined;
|
42
|
+
this.resourceID = undefined;
|
37
43
|
this._breadcrumbItems = [];
|
38
44
|
this._guides = undefined;
|
39
45
|
this._formEditorConfigManager = undefined;
|
@@ -235,7 +241,7 @@ const SnkGuidesViewer = class {
|
|
235
241
|
else {
|
236
242
|
detailBranch = this.selectedGuide;
|
237
243
|
}
|
238
|
-
content = this.wrapDetail(levels, index.h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail) }));
|
244
|
+
content = this.wrapDetail(levels, index.h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID }));
|
239
245
|
}
|
240
246
|
else {
|
241
247
|
const cardId = this.selectedGuide.id;
|
@@ -284,7 +290,10 @@ const SnkGuidesViewer = class {
|
|
284
290
|
return this.selectedGuide === undefined || '__main' === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
|
285
291
|
}
|
286
292
|
componentWillLoad() {
|
287
|
-
|
293
|
+
if (this.resourceID == undefined) {
|
294
|
+
throw new Error("Erro interno: resourceID não informado");
|
295
|
+
}
|
296
|
+
this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID, config => this.masterFormConfig = config);
|
288
297
|
this._configManager.loadConfig();
|
289
298
|
}
|
290
299
|
componentDidRender() {
|
@@ -303,7 +312,7 @@ const SnkGuidesViewer = class {
|
|
303
312
|
}
|
304
313
|
buildTaskBar() {
|
305
314
|
var _a;
|
306
|
-
return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit }));
|
315
|
+
return index.h("div", { class: `ez-col ez-flex-item--align-center ez-col--sd-6 ez-col--tb-6 ${this.presentationMode != index$1.PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, index.h("snk-taskbar", { key: "guideViewerTaskbar", "data-element-id": "guideViewer", configName: this.configName, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, actionsList: this.actionsList, messagesBuilder: this.messagesBuilder, presentationMode: this.presentationMode, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-taskbar-owner": "master", dataUnit: this.dataUnit, resourceID: this.resourceID }));
|
307
316
|
}
|
308
317
|
render() {
|
309
318
|
var _a, _b;
|
@@ -322,7 +331,7 @@ const SnkGuidesViewer = class {
|
|
322
331
|
index.h("div", { class: "ez-margin-top--extra-small" }, index.h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != index$1.PresentationMode.SECONDARY && this.buildTaskBar()), index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
323
332
|
index.h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
324
333
|
:
|
325
|
-
index.h("div", null), index.h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail) })));
|
334
|
+
index.h("div", null), index.h("div", { class: "snk-guides-viewer__detail-container" }, SnkGuidesViewer.buildFixedForms(this.masterFormConfig, this._masterFormMetadata, (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id, this.dataUnit, this.recordsValidator), this.getContent())), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
326
335
|
}
|
327
336
|
static get watchers() { return {
|
328
337
|
"dataUnit": ["observeDataUnit"],
|
@@ -2,17 +2,15 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-fd785f55.js');
|
6
6
|
require('./index-f9e81701.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
|
-
require('./SnkFormConfigManager-
|
9
|
-
require('./ConfigStorage-
|
10
|
-
require('./form-config-fetcher-
|
11
|
-
require('./DataFetcher-
|
8
|
+
require('./SnkFormConfigManager-e5a28b2e.js');
|
9
|
+
require('./ConfigStorage-42601579.js');
|
10
|
+
require('./form-config-fetcher-6704319c.js');
|
11
|
+
require('./DataFetcher-370cc8f2.js');
|
12
12
|
require('./_commonjsHelpers-537d719a.js');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./resource-fetcher-95d24dff.js');
|
15
|
-
require('./filter-bar-config-fetcher-80b033ce.js');
|
16
14
|
require('./filter-item-type.enum-aa823a00.js');
|
17
15
|
require('@sankhyalabs/ezui/dist/collection/utils/form');
|
18
16
|
require('./taskbar-processor-bce3f499.js');
|
@@ -20,7 +18,9 @@ require('./taskbar-elements-b98dd6e9.js');
|
|
20
18
|
require('./index-0e663819.js');
|
21
19
|
require('./index-102ba62d.js');
|
22
20
|
require('./constants-d187e03e.js');
|
23
|
-
require('./pesquisa-fetcher-
|
21
|
+
require('./pesquisa-fetcher-84d392c7.js');
|
22
|
+
require('./ISave-d68ce3cd.js');
|
23
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
24
24
|
require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
25
25
|
|
26
26
|
|
@@ -5,17 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-1aeb625d.js');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
8
|
+
const ConfigStorage = require('./ConfigStorage-42601579.js');
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
10
10
|
const index$1 = require('./index-c5771aba.js');
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
12
12
|
require('./filter-item-type.enum-aa823a00.js');
|
13
|
-
require('./form-config-fetcher-
|
14
|
-
require('./DataFetcher-
|
13
|
+
require('./form-config-fetcher-6704319c.js');
|
14
|
+
require('./DataFetcher-370cc8f2.js');
|
15
15
|
require('./_commonjsHelpers-537d719a.js');
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
|
-
require('./resource-fetcher-95d24dff.js');
|
18
|
-
require('./filter-bar-config-fetcher-80b033ce.js');
|
19
17
|
|
20
18
|
const snkPersonalizedFilterCss = ".sc-snk-personalized-filter-h{display:flex;height:100%;padding:var(--space--large, 24px);--snk-personalized-filter--width:100%;--snk-personalized-filter--height:100%;--snk-personalized-filter--background-color-line:var(--color--disable-secondary);--snk-personalized-filter--margin-line:var(--border--radius-medium, 12px)}.snk-personalized-filter.sc-snk-personalized-filter{height:var(--snk-personalized-filter--width);width:var(--snk-personalized-filter--height)}.snk-personalized-filter__header-actions.sc-snk-personalized-filter{display:flex;gap:var(--space--medium)}.snk-personalized-filter__group.sc-snk-personalized-filter{flex:1}.snk-personalized-filter__expression-input--line.sc-snk-personalized-filter{width:100%;height:2px;background-color:var(--snk-personalized-filter--background-color-line);margin-top:var(--snk-personalized-filter--margin-line);margin-bottom:var(--snk-personalized-filter--margin-line)}.ez-box__main.sc-snk-personalized-filter{height:90%}.snk-personalized-filter__button-mode.sc-snk-personalized-filter{height:35px}";
|
21
19
|
|
@@ -45,6 +43,7 @@ const SnkPersonalizedFilter = class {
|
|
45
43
|
this.entityUri = undefined;
|
46
44
|
this.filterId = undefined;
|
47
45
|
this.configName = undefined;
|
46
|
+
this.resourceID = undefined;
|
48
47
|
}
|
49
48
|
/*
|
50
49
|
* Cria um novo filtro se não houver nenhum filtro existente
|
@@ -81,17 +80,15 @@ const SnkPersonalizedFilter = class {
|
|
81
80
|
this._filterAssistent = core.ObjectUtils.copy(newPersonalizedFilter);
|
82
81
|
}
|
83
82
|
loadFilter(newValue, oldValue) {
|
84
|
-
if (newValue == null || oldValue == newValue) {
|
83
|
+
if (newValue == null || oldValue == newValue || this.resourceID == undefined) {
|
85
84
|
return;
|
86
85
|
}
|
87
|
-
ConfigStorage.ConfigStorage.
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
94
|
-
});
|
86
|
+
ConfigStorage.ConfigStorage.loadPersonalizedFilter(newValue, this.resourceID, this.configName)
|
87
|
+
.then((resp) => {
|
88
|
+
const personalizedFilter = this.addLabelToItems(resp);
|
89
|
+
this._filterAssistent = personalizedFilter;
|
90
|
+
this._originalFilterAssistent = core.ObjectUtils.copy(personalizedFilter);
|
91
|
+
this._filterAssistentMode = this._filterAssistent.hasOwnProperty("assistent") && this._filterAssistent.assistent != undefined;
|
95
92
|
});
|
96
93
|
}
|
97
94
|
componentWillLoad() {
|
@@ -116,7 +113,7 @@ const SnkPersonalizedFilter = class {
|
|
116
113
|
return this._application.messagesBuilder.getMessage(key, params);
|
117
114
|
}
|
118
115
|
saveFilter() {
|
119
|
-
ConfigStorage.ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.configName).then((personalizedFilter) => {
|
116
|
+
ConfigStorage.ConfigStorage.savePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName).then((personalizedFilter) => {
|
120
117
|
this._elButtonSave.enabled = false;
|
121
118
|
const messageToken = !!this._filterAssistent.id ? 'confirmEdit' : 'confirmSave';
|
122
119
|
utils.ApplicationUtils.info(this.getMessage(`snkPersonalizedFilter.${messageToken}.title`), { iconName: "check" });
|
@@ -127,7 +124,7 @@ const SnkPersonalizedFilter = class {
|
|
127
124
|
});
|
128
125
|
}
|
129
126
|
removeFilter() {
|
130
|
-
ConfigStorage.ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.configName);
|
127
|
+
ConfigStorage.ConfigStorage.removePersonalizedFilter(this._filterAssistent, this.resourceID, this.configName);
|
131
128
|
}
|
132
129
|
hasChangesToSave() {
|
133
130
|
return JSON.stringify(this._filterAssistent) === JSON.stringify(this._originalFilterAssistent);
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
|
-
const DataFetcher = require('./DataFetcher-
|
6
|
+
const DataFetcher = require('./DataFetcher-370cc8f2.js');
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
8
|
const core = require('@sankhyalabs/core');
|
9
9
|
const ModalButtonStatus = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container/modal-button-status');
|
@@ -6,14 +6,18 @@ const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const constants = require('./constants-d187e03e.js');
|
8
8
|
const taskbarElements = require('./taskbar-elements-b98dd6e9.js');
|
9
|
-
require('./DataFetcher-
|
10
|
-
require('./pesquisa-fetcher-
|
9
|
+
require('./DataFetcher-370cc8f2.js');
|
10
|
+
require('./pesquisa-fetcher-84d392c7.js');
|
11
11
|
const index$1 = require('./index-0e663819.js');
|
12
|
+
require('./ISave-d68ce3cd.js');
|
13
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
|
+
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
+
require('./filter-item-type.enum-aa823a00.js');
|
16
|
+
require('./form-config-fetcher-6704319c.js');
|
12
17
|
const taskbarProcessor = require('./taskbar-processor-bce3f499.js');
|
13
18
|
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-804ff4c7.js');
|
14
19
|
require('./index-102ba62d.js');
|
15
20
|
require('./_commonjsHelpers-537d719a.js');
|
16
|
-
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
21
|
|
18
22
|
class InMemoryLoader {
|
19
23
|
constructor(metadata, records) {
|
@@ -33,6 +33,7 @@ const SnkTaskbar = class {
|
|
33
33
|
};
|
34
34
|
this._permissions = undefined;
|
35
35
|
this.configName = undefined;
|
36
|
+
this.resourceID = undefined;
|
36
37
|
this.buttons = undefined;
|
37
38
|
this.customButtons = undefined;
|
38
39
|
this.actionsList = undefined;
|
@@ -174,7 +175,7 @@ const SnkTaskbar = class {
|
|
174
175
|
componentWillLoad() {
|
175
176
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
176
177
|
if (this._application) {
|
177
|
-
this._application.getAllAccess().then(access => this._permissions = access);
|
178
|
+
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
178
179
|
}
|
179
180
|
else {
|
180
181
|
this._permissions = {};
|
@@ -8,13 +8,14 @@ const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
|
|
8
8
|
const NUFIN_COLUMN = 'NUFIN';
|
9
9
|
const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
|
10
10
|
export default class Actions {
|
11
|
-
constructor(actionsExecuteInterface, dataUnit) {
|
11
|
+
constructor(actionsExecuteInterface, dataUnit, appResourceId) {
|
12
12
|
var _a;
|
13
13
|
this._lastValuesCache = {};
|
14
14
|
this._actionsExecuteInterface = actionsExecuteInterface;
|
15
15
|
this._dataUnit = dataUnit;
|
16
16
|
this._selectedRows = ((_a = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getSelectionInfo()) === null || _a === void 0 ? void 0 : _a.isAllRecords()) ? [] : dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getSelectionInfo().records;
|
17
17
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
18
|
+
this._appResourceId = appResourceId;
|
18
19
|
}
|
19
20
|
apply(action, hasParamsToSave) {
|
20
21
|
this._application.closePopUp();
|
@@ -277,9 +278,7 @@ export default class Actions {
|
|
277
278
|
}
|
278
279
|
}
|
279
280
|
async buildResourceId(actionId) {
|
280
|
-
|
281
|
-
appResId = await this._application.getResourceID();
|
282
|
-
return appResId + '.actionconfig.' + actionId;
|
281
|
+
return this._appResourceId + '.actionconfig.' + actionId;
|
283
282
|
}
|
284
283
|
prepareAndExecute(execSource, executeAction) {
|
285
284
|
this.addRows(execSource);
|
@@ -4,13 +4,14 @@ import { DataFetcher } from '../../lib/http/data-fetcher/DataFetcher';
|
|
4
4
|
import ExecutorFactory from './actions/factory/executor.factory';
|
5
5
|
import Actions from './actions';
|
6
6
|
import ClientEventConfirm from './clientEvent';
|
7
|
+
import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
|
7
8
|
export class SnkActionsButton {
|
8
9
|
constructor() {
|
9
10
|
this.CLIENT_EVENT_CONFIRM_NAME = "br.com.sankhya.actionbutton.clientconfirm";
|
10
11
|
this.handleClick = (evt) => {
|
11
12
|
const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
|
12
13
|
const executor = new ExecutorFactory(selectedAction.type).executor;
|
13
|
-
const action = new Actions(executor, this._dataUnit);
|
14
|
+
const action = new Actions(executor, this._dataUnit, this._resourceID);
|
14
15
|
action.execute(Object.assign({}, selectedAction));
|
15
16
|
this._showDropdown = false;
|
16
17
|
};
|
@@ -68,12 +69,15 @@ export class SnkActionsButton {
|
|
68
69
|
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
69
70
|
}
|
70
71
|
async componentWillLoad() {
|
71
|
-
var _a;
|
72
72
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
73
|
-
this._resourceID = await this._application.getResourceID();
|
74
73
|
this._isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
|
75
|
-
|
74
|
+
const snkDataUnit = this._element.parentElement;
|
75
|
+
this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
|
76
|
+
this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
|
76
77
|
this._entityName = this._dataUnit.name.split('/')[2];
|
78
|
+
if (this._resourceID == undefined) {
|
79
|
+
this._resourceID = await ResourceIDUtils.getResourceID();
|
80
|
+
}
|
77
81
|
this.setEvents();
|
78
82
|
this.getActions().then(() => {
|
79
83
|
this.loadItems();
|