@sankhyalabs/sankhyablocks 8.15.0-dev.3 → 8.15.0-dev.30
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-0d507a8f.js → ConfigStorage-d4c99a5e.js} +27 -17
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-3621bfc4.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-de65b9fc.js → pesquisa-fetcher-c416a6b7.js} +249 -34
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_2.cjs.entry.js +23 -8
- package/dist/cjs/snk-application.cjs.entry.js +98 -9
- package/dist/cjs/snk-attach.cjs.entry.js +396 -58
- package/dist/cjs/snk-crud.cjs.entry.js +14 -11
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -11
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +68 -11
- package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -4
- package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +2 -2
- package/dist/cjs/snk-form.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +45 -20
- package/dist/cjs/{snk-guides-viewer-7e87ffce.js → snk-guides-viewer-bd69fce4.js} +11 -12
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -10
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +22 -11
- package/dist/cjs/snk-taskbar.cjs.entry.js +91 -7
- package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-1e4fb2e0.js} +9 -9
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +111 -5
- package/dist/collection/components/snk-attach/snk-attach.js +194 -38
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +42 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +4 -4
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +175 -6
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
- package/dist/collection/components/snk-grid/snk-grid.js +75 -16
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +55 -3
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +18 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -8
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +129 -7
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/configs/ConfigStorage.js +24 -14
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +48 -29
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +10 -4
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/components/ConfigStorage.js +25 -15
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkMessageBuilder.js +13 -0
- package/dist/components/dataunit-fetcher.js +90 -37
- package/dist/components/index2.js +1 -0
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +94 -3
- package/dist/components/snk-attach2.js +400 -56
- package/dist/components/snk-crud.js +9 -3
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-detail-view2.js +4 -4
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +71 -9
- package/dist/components/snk-filter-item2.js +3 -0
- package/dist/components/snk-filter-modal-item2.js +0 -1
- package/dist/components/snk-filter-modal.js +21 -3
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-grid2.js +42 -15
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +17 -3
- package/dist/components/snk-taskbar2.js +103 -15
- package/dist/components/taskbar-actions-button2.js +18 -2
- package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-39ed8aeb.js} +27 -17
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-692e20c7.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-e218c6d2.js → pesquisa-fetcher-ab16a2e8.js} +249 -35
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_2.entry.js +23 -8
- package/dist/esm/snk-application.entry.js +98 -9
- package/dist/esm/snk-attach.entry.js +397 -59
- package/dist/esm/snk-crud.entry.js +14 -11
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +10 -11
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +68 -11
- package/dist/esm/snk-filter-item.entry.js +3 -0
- package/dist/esm/snk-filter-modal-item.entry.js +3 -4
- package/dist/esm/snk-filter-modal.entry.js +16 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +2 -2
- package/dist/esm/snk-form.entry.js +4 -4
- package/dist/esm/snk-grid-config.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +45 -20
- package/dist/esm/{snk-guides-viewer-2134aba2.js → snk-guides-viewer-fde82cc1.js} +11 -12
- package/dist/esm/snk-guides-viewer.entry.js +9 -10
- package/dist/esm/snk-personalized-filter.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +21 -10
- package/dist/esm/snk-taskbar.entry.js +92 -8
- package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-846c027c.js} +9 -9
- package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
- package/dist/sankhyablocks/{p-cb7419e0.entry.js → p-0b0b36ac.entry.js} +1 -1
- package/dist/sankhyablocks/p-11ad137d.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/p-3e2e2424.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-57212bb5.js +1 -0
- package/dist/sankhyablocks/p-5f5b58b6.entry.js +1 -0
- package/dist/sankhyablocks/p-67aedbe0.js +56 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-2028633c.js → p-725d04ba.js} +1 -1
- package/dist/sankhyablocks/p-827e4b01.entry.js +1 -0
- package/dist/sankhyablocks/p-84bb8f47.entry.js +1 -0
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
- package/dist/sankhyablocks/p-8c13d8d6.entry.js +1 -0
- package/dist/sankhyablocks/p-8c49760e.js +1 -0
- package/dist/sankhyablocks/p-91b7f78a.entry.js +1 -0
- package/dist/sankhyablocks/p-9d608b62.entry.js +1 -0
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-b7004423.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
- package/dist/sankhyablocks/p-c6247955.js +65 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d4802f81.entry.js +1 -0
- package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-e3bd000e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
- package/dist/sankhyablocks/p-fb842329.entry.js +1 -0
- package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-fcdcb0e2.entry.js} +1 -1
- package/dist/sankhyablocks/p-fd0a8d68.entry.js +11 -0
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-fdc4cb9b.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +12 -2
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +10 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +10 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -1
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
- package/dist/types/components.d.ts +177 -13
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/package.json +15 -6
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/sankhyablocks/p-0cd2e986.entry.js +0 -1
- package/dist/sankhyablocks/p-145c4434.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-4396d1a6.js +0 -56
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-58218eb7.entry.js +0 -1
- package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
- package/dist/sankhyablocks/p-7915c452.entry.js +0 -1
- package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
- package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
- package/dist/sankhyablocks/p-a49b1019.entry.js +0 -1
- package/dist/sankhyablocks/p-a7923832.entry.js +0 -1
- package/dist/sankhyablocks/p-b52c2175.js +0 -1
- package/dist/sankhyablocks/p-ba627e85.js +0 -60
- package/dist/sankhyablocks/p-bf9b7149.entry.js +0 -11
- package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
- package/dist/sankhyablocks/p-ca8e7da0.entry.js +0 -1
- package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -59,6 +59,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
59
59
|
this._canEdit = undefined;
|
60
60
|
this._resourceID = undefined;
|
61
61
|
this.configName = undefined;
|
62
|
+
this.filterBarTitle = undefined;
|
62
63
|
this.selectionToastConfig = undefined;
|
63
64
|
this.showActionButtons = false;
|
64
65
|
this.actionsList = undefined;
|
@@ -69,6 +70,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
69
70
|
this.presentationMode = PresentationMode.PRIMARY;
|
70
71
|
this.messagesBuilder = undefined;
|
71
72
|
this.useEnterLikeTab = false;
|
73
|
+
this.disablePersonalizedFilter = undefined;
|
72
74
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
73
75
|
}
|
74
76
|
/**
|
@@ -201,7 +203,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
201
203
|
window.removeEventListener("keydown", this._keyDownHandler);
|
202
204
|
}
|
203
205
|
async initKeyboardManager() {
|
204
|
-
|
206
|
+
var _a;
|
207
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
205
208
|
if (keyboardManager) {
|
206
209
|
const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
|
207
210
|
async function saveDataUnitHandlingFocus() {
|
@@ -250,7 +253,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
250
253
|
}
|
251
254
|
}
|
252
255
|
async removeShortcuts() {
|
253
|
-
|
256
|
+
var _a;
|
257
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
254
258
|
if (keyboardManager) {
|
255
259
|
keyboardManager
|
256
260
|
.unbind("F6")
|
@@ -317,7 +321,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
317
321
|
return;
|
318
322
|
}
|
319
323
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
320
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
324
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
321
325
|
}
|
322
326
|
get _element() { return this; }
|
323
327
|
static get watchers() { return {
|
@@ -326,6 +330,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
326
330
|
static get style() { return snkCrudCss; }
|
327
331
|
}, [6, "snk-crud", {
|
328
332
|
"configName": [1025, "config-name"],
|
333
|
+
"filterBarTitle": [1, "filter-bar-title"],
|
329
334
|
"selectionToastConfig": [16],
|
330
335
|
"showActionButtons": [4, "show-action-buttons"],
|
331
336
|
"actionsList": [16],
|
@@ -336,6 +341,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
336
341
|
"presentationMode": [1, "presentation-mode"],
|
337
342
|
"messagesBuilder": [1040],
|
338
343
|
"useEnterLikeTab": [4, "use-enter-like-tab"],
|
344
|
+
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
339
345
|
"_dataUnit": [32],
|
340
346
|
"_dataState": [32],
|
341
347
|
"attachmentRegisterKey": [32],
|
@@ -442,7 +442,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
442
442
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
443
443
|
pkObject['pks'] = [];
|
444
444
|
}
|
445
|
-
const dataFields = { nome: name, tipo: type, valor: value };
|
445
|
+
const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
|
446
446
|
fields['fields'].push(dataFields);
|
447
447
|
pkObject['pks'].push(fields);
|
448
448
|
});
|
@@ -43,7 +43,7 @@ import { d as defineCustomElement$l } from './snk-field-config2.js';
|
|
43
43
|
import { d as defineCustomElement$d } from './snk-form-config2.js';
|
44
44
|
import { d as defineCustomElement$4 } from './snk-tab-config2.js';
|
45
45
|
|
46
|
-
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}";
|
46
|
+
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__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.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}";
|
47
47
|
|
48
48
|
const FORM_NAME_PREFIX = "__FORM:";
|
49
49
|
const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
@@ -176,7 +176,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
176
176
|
});
|
177
177
|
this._guides = this._guides.map(guide => {
|
178
178
|
if (guide.id === guideItem.id) {
|
179
|
-
return Object.assign(Object.assign({}, guide), guideItem);
|
179
|
+
return Object.assign(Object.assign(Object.assign({}, guide), guideItem), (guideItem.children !== undefined ? {} : { children: undefined }));
|
180
180
|
}
|
181
181
|
return guide;
|
182
182
|
});
|
@@ -425,7 +425,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
425
425
|
}
|
426
426
|
buildTaskBar() {
|
427
427
|
var _a;
|
428
|
-
return h("div", { class: `
|
428
|
+
return h("div", { class: `snk-guides-viewer__header-taskbar ${this.presentationMode != PresentationMode.SECONDARY ? 'ez-align--right' : 'ez-padding-bottom--medium'}` }, 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.getActionsList(), 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, customSlotId: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS", alignRigth: true }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" })));
|
429
429
|
}
|
430
430
|
async dataUnitActionHandler(action) {
|
431
431
|
var _a;
|
@@ -484,7 +484,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
484
484
|
}
|
485
485
|
this.loadTaskbarProcessor();
|
486
486
|
const showGuides = this._guides && (this._guides.length > 1);
|
487
|
-
return (h("section", { class: "snk-guides-viewer" }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "
|
487
|
+
return (h("section", { class: "snk-guides-viewer" }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
488
488
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
489
489
|
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) })
|
490
490
|
:
|
@@ -62,16 +62,18 @@ const SnkEntityList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
62
62
|
this.loadListSource();
|
63
63
|
}
|
64
64
|
optionLoader(searchArgument) {
|
65
|
-
var _a, _b, _c, _d;
|
65
|
+
var _a, _b, _c, _d, _e, _f;
|
66
66
|
const { mode, argument } = searchArgument;
|
67
67
|
if (this._application === undefined) {
|
68
68
|
return;
|
69
69
|
}
|
70
70
|
const searchOptions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.searchContext) === null || _c === void 0 ? void 0 : _c.searchOptions;
|
71
|
+
const criteria = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.criteria;
|
71
72
|
const options = {
|
72
|
-
entityDescription: (
|
73
|
+
entityDescription: (_f = this.config) === null || _f === void 0 ? void 0 : _f.label,
|
73
74
|
entity: this._entityName,
|
74
|
-
searchOptions: searchOptions
|
75
|
+
searchOptions: searchOptions,
|
76
|
+
criteria,
|
75
77
|
};
|
76
78
|
return this._application.executePreparedSearch(mode, argument, options);
|
77
79
|
}
|
@@ -209,13 +209,15 @@ function buildPersonalized(item) {
|
|
209
209
|
}
|
210
210
|
|
211
211
|
class SnkFilterModalFactory {
|
212
|
-
constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter }) {
|
212
|
+
constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
213
213
|
this._filterConfig = filterConfig;
|
214
214
|
this._configName = configName;
|
215
215
|
this._onComplete = onComplete;
|
216
216
|
this._getMessage = getMessage;
|
217
|
+
this._disablePersonalizedFilter = disablePersonalizedFilter;
|
217
218
|
this._addPersonalizedFilterFn = onAddPersonalizedFilter;
|
218
219
|
this._editPersonalizedFilterFn = onEditPersonalizedFilter;
|
220
|
+
this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
|
219
221
|
}
|
220
222
|
applyFilters(newFilterConfig) {
|
221
223
|
this._onComplete(newFilterConfig);
|
@@ -226,11 +228,13 @@ class SnkFilterModalFactory {
|
|
226
228
|
filterModal.className = "ez-size-height--full";
|
227
229
|
filterModal.filters = this._filterConfig;
|
228
230
|
filterModal.configName = this._configName;
|
231
|
+
filterModal.disablePersonalizedFilter = this._disablePersonalizedFilter;
|
229
232
|
filterModal.getMessage = this._getMessage.bind(this);
|
230
233
|
filterModal.applyFilters = this.applyFilters.bind(this);
|
231
234
|
filterModal.closeModal = () => this._closeModal();
|
232
235
|
filterModal.addPersonalizedFilter = () => this._addPersonalizedFilterFn();
|
233
236
|
filterModal.editPersonalizedFilter = (id) => this._editPersonalizedFilterFn(id);
|
237
|
+
filterModal.deletePersonalizedFilter = (filter, configName) => this._onDeletePersonalizedFilter(filter, configName);
|
234
238
|
return filterModal;
|
235
239
|
}
|
236
240
|
async showModal() {
|
@@ -249,7 +253,7 @@ class SnkFilterModalFactory {
|
|
249
253
|
}
|
250
254
|
}
|
251
255
|
|
252
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
256
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{display:none}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
253
257
|
|
254
258
|
const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
255
259
|
constructor() {
|
@@ -259,6 +263,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
259
263
|
this._updateSequence = [];
|
260
264
|
this._loadingPending = false;
|
261
265
|
this._configUpdated = false;
|
266
|
+
this._firstLoad = true;
|
262
267
|
this._pendingVariables = false;
|
263
268
|
this._customfiltersToBeUpdated = [];
|
264
269
|
this._calculateSortIndex = (item) => {
|
@@ -275,10 +280,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
275
280
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
276
281
|
};
|
277
282
|
this.dataUnit = undefined;
|
283
|
+
this.title = undefined;
|
278
284
|
this.configName = undefined;
|
279
285
|
this.resourceID = undefined;
|
286
|
+
this.mode = "regular";
|
280
287
|
this.filterConfig = undefined;
|
281
288
|
this.messagesBuilder = undefined;
|
289
|
+
this.disablePersonalizedFilter = undefined;
|
282
290
|
this.allowDefault = undefined;
|
283
291
|
this.scrollerLocked = false;
|
284
292
|
this.showPersonalizedFilter = false;
|
@@ -322,7 +330,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
322
330
|
* Faz o recarregamento da filterbar buscando o state no servidor.
|
323
331
|
*/
|
324
332
|
async reload() {
|
325
|
-
this.loadConfigFromStorage();
|
333
|
+
this.loadConfigFromStorage(true);
|
326
334
|
}
|
327
335
|
/**
|
328
336
|
* Retorna um item de filtro pelo ID.
|
@@ -362,6 +370,23 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
362
370
|
this.updateFilter(filterItem);
|
363
371
|
return Promise.resolve();
|
364
372
|
}
|
373
|
+
/**
|
374
|
+
* Remove um item de filtro.
|
375
|
+
*
|
376
|
+
* @param filterID - ID do a ser adicionado
|
377
|
+
*
|
378
|
+
* @returns {Promise<SnkFilterItemConfig|undefined>} - Retorna o item de filtro removido, ou undefined caso não encontrado.
|
379
|
+
*/
|
380
|
+
async removeFilterItem(filterID) {
|
381
|
+
const itemIndex = this.filterConfig.findIndex(item => item.id === filterID);
|
382
|
+
if (itemIndex == -1) {
|
383
|
+
console.warn("[SnkFilterBar.removeFilterItem] FilterItem não encontrado");
|
384
|
+
return Promise.resolve(undefined);
|
385
|
+
}
|
386
|
+
const itemToRemove = this.filterConfig[itemIndex];
|
387
|
+
this.filterConfig = this.filterConfig.filter(item => item.id !== filterID);
|
388
|
+
return Promise.resolve(itemToRemove);
|
389
|
+
}
|
365
390
|
componentDidLoad() {
|
366
391
|
if (this._element) {
|
367
392
|
const dataInfo = { dataUnit: this.dataUnit };
|
@@ -394,13 +419,27 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
394
419
|
return;
|
395
420
|
}
|
396
421
|
this._loadingPending = false;
|
397
|
-
this.dataUnit.
|
422
|
+
this.doLoadData(this.dataUnit.getLastLoadRequest() != undefined);
|
398
423
|
}
|
399
424
|
if (this._configUpdated) {
|
400
425
|
this._configUpdated = false;
|
401
426
|
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
402
427
|
}
|
403
428
|
}
|
429
|
+
async doLoadData(forceReload = false) {
|
430
|
+
try {
|
431
|
+
if (this._firstLoad && !forceReload) {
|
432
|
+
let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
|
433
|
+
if (!autoLoad) {
|
434
|
+
return;
|
435
|
+
}
|
436
|
+
}
|
437
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
438
|
+
}
|
439
|
+
finally {
|
440
|
+
this._firstLoad = false;
|
441
|
+
}
|
442
|
+
}
|
404
443
|
/**
|
405
444
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
406
445
|
* através de um pequeno modulo na estrutura da aplicação:
|
@@ -409,6 +448,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
409
448
|
*/
|
410
449
|
getMessage(key, params, defaultValue) {
|
411
450
|
var _a;
|
451
|
+
if (this.messagesBuilder == undefined && this._application) {
|
452
|
+
this.messagesBuilder = this._application.messagesBuilder;
|
453
|
+
}
|
412
454
|
return ((_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params)) || defaultValue;
|
413
455
|
}
|
414
456
|
getFilter(_dataUnit) {
|
@@ -435,7 +477,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
435
477
|
registryFilterProvider() {
|
436
478
|
this.dataUnit.addFilterProvider(this);
|
437
479
|
if (this.filterConfig) {
|
438
|
-
this.
|
480
|
+
this.doLoadData();
|
439
481
|
}
|
440
482
|
}
|
441
483
|
itemFocused(selectedItem) {
|
@@ -512,7 +554,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
512
554
|
loadPermitions() {
|
513
555
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
514
556
|
}
|
515
|
-
loadConfigFromStorage() {
|
557
|
+
async loadConfigFromStorage(clearCache) {
|
558
|
+
if (clearCache) {
|
559
|
+
await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
|
560
|
+
}
|
516
561
|
return new Promise(accept => {
|
517
562
|
ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
|
518
563
|
.then((filters) => {
|
@@ -555,6 +600,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
555
600
|
filterChangeListener(evt) {
|
556
601
|
this.updateFilter(evt.detail);
|
557
602
|
}
|
603
|
+
/**
|
604
|
+
* Abre o modal de filtros
|
605
|
+
*/
|
558
606
|
async showFilterModal() {
|
559
607
|
const callbackOnApplyFilter = (filters) => {
|
560
608
|
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
@@ -567,9 +615,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
567
615
|
filterConfig: filtersConfigCopy,
|
568
616
|
configName: this.configName,
|
569
617
|
onComplete: callbackOnApplyFilter,
|
618
|
+
disablePersonalizedFilter: this.disablePersonalizedFilter,
|
570
619
|
getMessage: (key, props) => this.getMessage(key, props),
|
571
620
|
onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
|
572
|
-
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id)
|
621
|
+
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
|
622
|
+
onDeletePersonalizedFilter: (filter, configName) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName),
|
573
623
|
};
|
574
624
|
this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
|
575
625
|
await this._filterModalFactory.showModal();
|
@@ -587,6 +637,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
587
637
|
this.showPersonalizedFilter = true;
|
588
638
|
this.personalizedFilterId = id;
|
589
639
|
}
|
640
|
+
deletePersonalizedFilter(filter, filterItemType, configName) {
|
641
|
+
if (filterItemType === FilterItemType.PERSONALIZED) {
|
642
|
+
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
|
643
|
+
}
|
644
|
+
}
|
590
645
|
handleHidePersonalizedFilter(reloadFilterBar) {
|
591
646
|
if (reloadFilterBar) {
|
592
647
|
this.loadConfigFromStorage().then(() => {
|
@@ -619,7 +674,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
619
674
|
if (this.showPersonalizedFilter) {
|
620
675
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
621
676
|
}
|
622
|
-
|
677
|
+
if (this.mode === "button")
|
678
|
+
return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
|
679
|
+
return (h(Host, { "data-mode": this.mode }, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
623
680
|
}
|
624
681
|
get _element() { return this; }
|
625
682
|
static get watchers() { return {
|
@@ -628,10 +685,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
628
685
|
static get style() { return snkFilterBarCss; }
|
629
686
|
}, [2, "snk-filter-bar", {
|
630
687
|
"dataUnit": [1040],
|
688
|
+
"title": [1],
|
631
689
|
"configName": [1, "config-name"],
|
632
690
|
"resourceID": [1, "resource-i-d"],
|
691
|
+
"mode": [1],
|
633
692
|
"filterConfig": [1040],
|
634
693
|
"messagesBuilder": [1040],
|
694
|
+
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
635
695
|
"allowDefault": [32],
|
636
696
|
"scrollerLocked": [32],
|
637
697
|
"showPersonalizedFilter": [32],
|
@@ -639,7 +699,9 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
639
699
|
"reload": [64],
|
640
700
|
"getFilterItem": [64],
|
641
701
|
"updateFilterItem": [64],
|
642
|
-
"addFilterItem": [64]
|
702
|
+
"addFilterItem": [64],
|
703
|
+
"removeFilterItem": [64],
|
704
|
+
"showFilterModal": [64]
|
643
705
|
}, [[0, "filterChange", "filterChangeListener"]]]);
|
644
706
|
function defineCustomElement() {
|
645
707
|
if (typeof customElements === "undefined") {
|
@@ -260,6 +260,9 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
260
260
|
}
|
261
261
|
canClearFilter() {
|
262
262
|
const { value, groupedItems = [] } = this.config;
|
263
|
+
if (value != undefined && this.config.type === FilterItemType.MULTI_LIST) {
|
264
|
+
return value.some((item) => item.check);
|
265
|
+
}
|
263
266
|
return value !== undefined || groupedItems.some(item => item.visible);
|
264
267
|
}
|
265
268
|
getRightIconName() {
|
@@ -56,7 +56,6 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
56
56
|
buildSnkFilterPersonalizedProps() {
|
57
57
|
return {
|
58
58
|
tag: "snk-personalized-filter-editor", props: {
|
59
|
-
onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, FilterItemType.PERSONALIZED),
|
60
59
|
onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
|
61
60
|
onAddFilter: () => this.addPersonalizedFilter.emit(),
|
62
61
|
}
|
@@ -20,6 +20,15 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
20
20
|
this.closeModal = undefined;
|
21
21
|
this.addPersonalizedFilter = undefined;
|
22
22
|
this.editPersonalizedFilter = undefined;
|
23
|
+
this.deletePersonalizedFilter = undefined;
|
24
|
+
this.filtersToDelete = [];
|
25
|
+
this.disablePersonalizedFilter = undefined;
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Emitido quando um filtro personalizado é deletado.
|
29
|
+
*/
|
30
|
+
deletePersonalizedFilterListener(event) {
|
31
|
+
this.filtersToDelete.push(event.detail);
|
23
32
|
}
|
24
33
|
getCustomMessage(key, params) {
|
25
34
|
var _a;
|
@@ -87,6 +96,12 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
87
96
|
if (this.isValidCustomFilter(filterPersonalized)) {
|
88
97
|
this.applyFilters(this.filters);
|
89
98
|
}
|
99
|
+
if (this.filtersToDelete.length > 0) {
|
100
|
+
this.filtersToDelete.forEach(filter => {
|
101
|
+
this.deletePersonalizedFilter(filter, this.configName);
|
102
|
+
});
|
103
|
+
this.filtersToDelete = [];
|
104
|
+
}
|
90
105
|
}
|
91
106
|
isValidCustomFilter(filterPersonalized) {
|
92
107
|
const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
|
@@ -222,7 +237,7 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
222
237
|
const customFilters = this.filters.filter(filter => filter.filterType === FilterType.CUSTOM_FILTER);
|
223
238
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
224
239
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
225
|
-
return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
240
|
+
return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
226
241
|
}
|
227
242
|
static get style() { return snkFilterModalCss; }
|
228
243
|
}, [0, "snk-filter-modal", {
|
@@ -232,8 +247,11 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
232
247
|
"applyFilters": [16],
|
233
248
|
"closeModal": [16],
|
234
249
|
"addPersonalizedFilter": [16],
|
235
|
-
"editPersonalizedFilter": [16]
|
236
|
-
|
250
|
+
"editPersonalizedFilter": [16],
|
251
|
+
"deletePersonalizedFilter": [16],
|
252
|
+
"filtersToDelete": [16],
|
253
|
+
"disablePersonalizedFilter": [4, "disable-personalized-filter"]
|
254
|
+
}, [[0, "deleteFilter", "deletePersonalizedFilterListener"]]]);
|
237
255
|
function defineCustomElement$1() {
|
238
256
|
if (typeof customElements === "undefined") {
|
239
257
|
return;
|
@@ -14,7 +14,8 @@ const SnkFilterMultiSelect$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
14
14
|
* Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
|
15
15
|
*/
|
16
16
|
ezChangeListener(evt) {
|
17
|
-
|
17
|
+
var _a;
|
18
|
+
this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
|
18
19
|
this.valueChanged.emit(this.value);
|
19
20
|
}
|
20
21
|
/**
|
@@ -36,14 +36,21 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
36
36
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
37
37
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
38
38
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
39
|
+
"snkGridTopTaskbar.regular.singleTaskbar": [],
|
39
40
|
"snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
|
40
|
-
"snkGridTopTaskbar.finish_edition.secondary": []
|
41
|
+
"snkGridTopTaskbar.finish_edition.secondary": [],
|
42
|
+
"snkGridTopTaskbar.finish_edition.singleTaskbar": [],
|
41
43
|
});
|
42
44
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
43
45
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
44
46
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
45
47
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
|
46
|
-
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
48
|
+
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
|
49
|
+
"snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
50
|
+
"snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
51
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
|
52
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
|
53
|
+
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
47
54
|
});
|
48
55
|
this._dataUnit = undefined;
|
49
56
|
this._dataState = undefined;
|
@@ -52,6 +59,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
52
59
|
this._showSnkFilterBar = true;
|
53
60
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
54
61
|
this.configName = undefined;
|
62
|
+
this.filterBarTitle = undefined;
|
55
63
|
this.resourceID = undefined;
|
56
64
|
this.selectionToastConfig = undefined;
|
57
65
|
this.actionsList = undefined;
|
@@ -67,6 +75,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
67
75
|
this.taskbarCustomContainerId = undefined;
|
68
76
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
69
77
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
78
|
+
this.disablePersonalizedFilter = undefined;
|
70
79
|
}
|
71
80
|
/**
|
72
81
|
* Exibe a janela de configurações da grade.
|
@@ -324,30 +333,46 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
324
333
|
return invisibleButtons;
|
325
334
|
}
|
326
335
|
componentWillRender() {
|
327
|
-
var _a;
|
328
336
|
const invisibleButtons = this.getInvisibleButtons();
|
329
|
-
|
330
|
-
let headerTaskbarId;
|
331
|
-
if (hasSelectedRecord) {
|
332
|
-
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
|
333
|
-
}
|
334
|
-
else {
|
335
|
-
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
|
336
|
-
}
|
337
|
-
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
337
|
+
this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
338
338
|
this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
339
339
|
this.dataExporterProviderStore();
|
340
340
|
}
|
341
|
+
getHeaderTaskbarId() {
|
342
|
+
var _a, _b;
|
343
|
+
const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
|
344
|
+
const taskbarIdPrefixLookup = {
|
345
|
+
primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
346
|
+
secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
347
|
+
singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
|
348
|
+
};
|
349
|
+
const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
|
350
|
+
let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
|
351
|
+
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === PresentationMode.SINGLE_TASKBAR) {
|
352
|
+
headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
|
353
|
+
}
|
354
|
+
return headerTaskbarId;
|
355
|
+
}
|
341
356
|
getTopTaskBarId() {
|
342
357
|
var _a;
|
343
|
-
const
|
358
|
+
const suffixLookup = {
|
359
|
+
primary: "",
|
360
|
+
secondary: ".secondary",
|
361
|
+
singleTaskbar: ".singleTaskbar"
|
362
|
+
};
|
363
|
+
const sufix = suffixLookup[this.presentationMode];
|
344
364
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
345
365
|
return `snkGridTopTaskbar.finish_edition${sufix}`;
|
346
366
|
}
|
347
367
|
return `snkGridTopTaskbar.regular${sufix}`;
|
348
368
|
}
|
349
369
|
getPrimaryButton() {
|
350
|
-
|
370
|
+
const primaryButtonLookup = {
|
371
|
+
primary: "INSERT",
|
372
|
+
secondary: "",
|
373
|
+
singleTaskbar: "INSERT"
|
374
|
+
};
|
375
|
+
return primaryButtonLookup[this.presentationMode];
|
351
376
|
}
|
352
377
|
getColumnSearch(actionButton, item) {
|
353
378
|
if (this._columnSearch != undefined) {
|
@@ -398,13 +423,14 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
398
423
|
return undefined;
|
399
424
|
}
|
400
425
|
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" }, this._showSnkFilterBar &&
|
401
|
-
h(Fragment, null, 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, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail) }), 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, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), 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: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, 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.getActionsList(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), 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 }))));
|
426
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter }), 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, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), 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: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), 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 }))));
|
402
427
|
}
|
403
428
|
get _element() { return this; }
|
404
429
|
static get style() { return snkGridCss; }
|
405
430
|
}, [6, "snk-grid", {
|
406
431
|
"columnFilterDataSource": [1040],
|
407
432
|
"configName": [1, "config-name"],
|
433
|
+
"filterBarTitle": [1, "filter-bar-title"],
|
408
434
|
"resourceID": [1, "resource-i-d"],
|
409
435
|
"selectionToastConfig": [16],
|
410
436
|
"actionsList": [16],
|
@@ -420,6 +446,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
420
446
|
"taskbarCustomContainerId": [1, "taskbar-custom-container-id"],
|
421
447
|
"gridHeaderCustomSlotId": [1, "grid-header-custom-slot-id"],
|
422
448
|
"topTaskbarCustomSlotId": [1, "top-taskbar-custom-slot-id"],
|
449
|
+
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
423
450
|
"_dataUnit": [32],
|
424
451
|
"_dataState": [32],
|
425
452
|
"_gridConfig": [32],
|
@@ -202,7 +202,7 @@ const SnkPersonalizedFilter = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
202
202
|
return personalizedFilter;
|
203
203
|
}
|
204
204
|
addFilterGroupCondition(personalizedFilter) {
|
205
|
-
if (!personalizedFilter.assistent.operand) {
|
205
|
+
if (personalizedFilter.assistent && !personalizedFilter.assistent.operand) {
|
206
206
|
personalizedFilter.assistent.operand = FilterGroupCondition.AND;
|
207
207
|
}
|
208
208
|
}
|