@sankhyalabs/sankhyablocks 8.15.0-dev.2 → 8.15.0-dev.21
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-302bbbd4.js} +25 -15
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-71c4768e.js} +1 -1
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-bdaf9482.js → pesquisa-fetcher-c790ffb7.js} +254 -34
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_2.cjs.entry.js +23 -5
- package/dist/cjs/snk-application.cjs.entry.js +95 -6
- package/dist/cjs/snk-attach.cjs.entry.js +395 -57
- package/dist/cjs/snk-crud.cjs.entry.js +10 -8
- package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
- 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 +8 -9
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +57 -7
- package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -2
- 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.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-grid.cjs.entry.js +42 -18
- package/dist/cjs/{snk-guides-viewer-9342bca1.js → snk-guides-viewer-32c1d35d.js} +9 -10
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -8
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +19 -8
- package/dist/cjs/snk-taskbar.cjs.entry.js +53 -5
- package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-01b85b99.js} +1 -1
- 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 +24 -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.js +101 -5
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
- package/dist/collection/components/snk-grid/snk-grid.js +57 -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 +53 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +26 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +89 -4
- 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/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 +55 -31
- 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/SnkMessageBuilder.js +13 -0
- package/dist/components/dataunit-fetcher.js +96 -38
- 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 +7 -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 +59 -7
- 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 +40 -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 +15 -1
- package/dist/components/snk-taskbar2.js +55 -4
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-4151acc8.js} +25 -15
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-5c7d3771.js} +1 -1
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-cc1650eb.js → pesquisa-fetcher-4000d0b8.js} +255 -36
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_2.entry.js +23 -5
- package/dist/esm/snk-application.entry.js +95 -6
- package/dist/esm/snk-attach.entry.js +396 -58
- package/dist/esm/snk-crud.entry.js +10 -8
- package/dist/esm/snk-data-exporter.entry.js +4 -4
- 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 +8 -9
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +57 -7
- package/dist/esm/snk-filter-item.entry.js +3 -0
- package/dist/esm/snk-filter-modal-item.entry.js +1 -2
- 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.entry.js +2 -2
- package/dist/esm/snk-grid-config.entry.js +1 -1
- package/dist/esm/snk-grid.entry.js +42 -18
- package/dist/esm/{snk-guides-viewer-9ce9588c.js → snk-guides-viewer-8adacfd4.js} +9 -10
- package/dist/esm/snk-guides-viewer.entry.js +7 -8
- package/dist/esm/snk-personalized-filter.entry.js +2 -2
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +17 -6
- package/dist/esm/snk-taskbar.entry.js +54 -6
- package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-d4d0b424.js} +1 -1
- package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
- package/dist/sankhyablocks/p-0574c231.entry.js +1 -0
- package/dist/sankhyablocks/p-0eb1ff03.js +65 -0
- package/dist/sankhyablocks/p-11bbb65e.entry.js +1 -0
- package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-1d75d9f9.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2419f19f.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-374d03f6.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/p-3838d2ff.entry.js +1 -0
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-40915359.entry.js} +1 -1
- package/dist/sankhyablocks/p-45d82274.entry.js +1 -0
- package/dist/sankhyablocks/{p-2028633c.js → p-573a07c5.js} +1 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-aaa1438e.entry.js → p-761ed32f.entry.js} +1 -1
- package/dist/sankhyablocks/p-79b4b271.entry.js +1 -0
- package/dist/sankhyablocks/p-7f3c7b09.entry.js +1 -0
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
- package/dist/sankhyablocks/p-96ef14f9.entry.js +1 -0
- package/dist/sankhyablocks/p-aa95fb2c.js +56 -0
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-db4edd06.entry.js +11 -0
- package/dist/sankhyablocks/p-df2b84c4.entry.js +1 -0
- package/dist/sankhyablocks/p-e0b23084.entry.js +1 -0
- package/dist/sankhyablocks/p-e0fd9555.entry.js +1 -0
- package/dist/sankhyablocks/p-ed2dce4b.entry.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.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 +5 -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 +18 -0
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +6 -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 +2 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +20 -1
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
- package/dist/types/components.d.ts +140 -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 +4 -1
- 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-145c4434.js +0 -1
- package/dist/sankhyablocks/p-17dda7a2.entry.js +0 -1
- package/dist/sankhyablocks/p-19f51c6b.entry.js +0 -11
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-311c6173.entry.js +0 -1
- package/dist/sankhyablocks/p-4396d1a6.js +0 -56
- package/dist/sankhyablocks/p-44e894af.entry.js +0 -1
- 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-78777ae0.entry.js +0 -1
- package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
- package/dist/sankhyablocks/p-9c3229fc.entry.js +0 -1
- package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
- package/dist/sankhyablocks/p-a702a1a2.js +0 -60
- package/dist/sankhyablocks/p-c259545b.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-dd6a8377.js +0 -1
- package/dist/sankhyablocks/p-e138e7d4.entry.js +0 -1
- package/dist/sankhyablocks/p-e1b29d4c.entry.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
@@ -1,13 +1,12 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
3
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
3
|
+
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
4
4
|
import './DataFetcher-aa159c5a.js';
|
5
|
-
import './pesquisa-fetcher-
|
6
|
-
import { P as PresentationMode } from './index-
|
7
|
-
import './ISave-
|
5
|
+
import './pesquisa-fetcher-4000d0b8.js';
|
6
|
+
import { P as PresentationMode } from './index-0ece87a6.js';
|
7
|
+
import './ISave-d8c8bc59.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './dataunit-fetcher-cc1650eb.js';
|
11
10
|
import './PreloadManager-c1c2f2b4.js';
|
12
11
|
import './filter-item-type.enum-d45e026f.js';
|
13
12
|
import './form-config-fetcher-36219cd3.js';
|
@@ -46,6 +45,7 @@ const SnkCrud = class {
|
|
46
45
|
this.presentationMode = PresentationMode.PRIMARY;
|
47
46
|
this.messagesBuilder = undefined;
|
48
47
|
this.useEnterLikeTab = false;
|
48
|
+
this.disablePersonalizedFilter = undefined;
|
49
49
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
50
50
|
}
|
51
51
|
/**
|
@@ -178,7 +178,8 @@ const SnkCrud = class {
|
|
178
178
|
window.removeEventListener("keydown", this._keyDownHandler);
|
179
179
|
}
|
180
180
|
async initKeyboardManager() {
|
181
|
-
|
181
|
+
var _a;
|
182
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
182
183
|
if (keyboardManager) {
|
183
184
|
const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
|
184
185
|
async function saveDataUnitHandlingFocus() {
|
@@ -227,7 +228,8 @@ const SnkCrud = class {
|
|
227
228
|
}
|
228
229
|
}
|
229
230
|
async removeShortcuts() {
|
230
|
-
|
231
|
+
var _a;
|
232
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
231
233
|
if (keyboardManager) {
|
232
234
|
keyboardManager
|
233
235
|
.unbind("F6")
|
@@ -294,7 +296,7 @@ const SnkCrud = class {
|
|
294
296
|
return;
|
295
297
|
}
|
296
298
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
297
|
-
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" }))));
|
299
|
+
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, 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" }))));
|
298
300
|
}
|
299
301
|
get _element() { return getElement(this); }
|
300
302
|
static get watchers() { return {
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { ApplicationContext, ObjectUtils, DataType, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
-
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-
|
4
|
+
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './index-0ece87a6.js';
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants-8457af36.js';
|
6
6
|
import { D as DataFetcher } from './DataFetcher-aa159c5a.js';
|
7
|
-
import { S as SnkDataUnit } from './snk-data-unit-
|
7
|
+
import { S as SnkDataUnit } from './snk-data-unit-5d201fb3.js';
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './SnkMessageBuilder-
|
10
|
+
import './SnkMessageBuilder-0fb796b9.js';
|
11
11
|
|
12
12
|
class ItemBuilder {
|
13
13
|
constructor(getMessage, selectedNumber) {
|
@@ -443,7 +443,7 @@ const SnkDataExporter = class {
|
|
443
443
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
444
444
|
pkObject['pks'] = [];
|
445
445
|
}
|
446
|
-
const dataFields = { nome: name, tipo: type, valor: value };
|
446
|
+
const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
|
447
447
|
fields['fields'].push(dataFields);
|
448
448
|
pkObject['pks'].push(fields);
|
449
449
|
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action, ObjectUtils, JSUtils, DataUnitAction, ApplicationContext, DataType } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
-
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-
|
4
|
+
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-0fb796b9.js';
|
5
5
|
|
6
6
|
const SnkDataUnit = class {
|
7
7
|
constructor(hostRef) {
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-5d201fb3.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
5
|
-
import './SnkMessageBuilder-
|
5
|
+
import './SnkMessageBuilder-0fb796b9.js';
|
@@ -1,22 +1,21 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action } from '@sankhyalabs/core';
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-5c7d3771.js';
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
5
|
import './DataFetcher-aa159c5a.js';
|
6
|
-
import './pesquisa-fetcher-
|
7
|
-
import { P as PresentationMode } from './index-
|
8
|
-
import './ISave-
|
6
|
+
import './pesquisa-fetcher-4000d0b8.js';
|
7
|
+
import { P as PresentationMode } from './index-0ece87a6.js';
|
8
|
+
import './ISave-d8c8bc59.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import './dataunit-fetcher-cc1650eb.js';
|
12
11
|
import './PreloadManager-c1c2f2b4.js';
|
13
12
|
import './filter-item-type.enum-d45e026f.js';
|
14
13
|
import './form-config-fetcher-36219cd3.js';
|
15
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
14
|
+
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
16
15
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
17
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
18
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
19
|
-
import './ConfigStorage-
|
16
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-8adacfd4.js';
|
17
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-0fb796b9.js';
|
18
|
+
import './ConfigStorage-4151acc8.js';
|
20
19
|
import './PrintUtils-3e4ff0f5.js';
|
21
20
|
import './ResourceIDUtils-a114189a.js';
|
22
21
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
@@ -61,16 +61,18 @@ const SnkEntityList = class {
|
|
61
61
|
this.loadListSource();
|
62
62
|
}
|
63
63
|
optionLoader(searchArgument) {
|
64
|
-
var _a, _b, _c, _d;
|
64
|
+
var _a, _b, _c, _d, _e, _f;
|
65
65
|
const { mode, argument } = searchArgument;
|
66
66
|
if (this._application === undefined) {
|
67
67
|
return;
|
68
68
|
}
|
69
69
|
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;
|
70
|
+
const criteria = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.criteria;
|
70
71
|
const options = {
|
71
|
-
entityDescription: (
|
72
|
+
entityDescription: (_f = this.config) === null || _f === void 0 ? void 0 : _f.label,
|
72
73
|
entity: this._entityName,
|
73
|
-
searchOptions: searchOptions
|
74
|
+
searchOptions: searchOptions,
|
75
|
+
criteria,
|
74
76
|
};
|
75
77
|
return this._application.executePreparedSearch(mode, argument, options);
|
76
78
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
7
7
|
import { F as FilterOperand } from './index-ae591a44.js';
|
@@ -204,13 +204,15 @@ function buildPersonalized(item) {
|
|
204
204
|
}
|
205
205
|
|
206
206
|
class SnkFilterModalFactory {
|
207
|
-
constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter }) {
|
207
|
+
constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
208
208
|
this._filterConfig = filterConfig;
|
209
209
|
this._configName = configName;
|
210
210
|
this._onComplete = onComplete;
|
211
211
|
this._getMessage = getMessage;
|
212
|
+
this._disablePersonalizedFilter = disablePersonalizedFilter;
|
212
213
|
this._addPersonalizedFilterFn = onAddPersonalizedFilter;
|
213
214
|
this._editPersonalizedFilterFn = onEditPersonalizedFilter;
|
215
|
+
this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
|
214
216
|
}
|
215
217
|
applyFilters(newFilterConfig) {
|
216
218
|
this._onComplete(newFilterConfig);
|
@@ -221,11 +223,13 @@ class SnkFilterModalFactory {
|
|
221
223
|
filterModal.className = "ez-size-height--full";
|
222
224
|
filterModal.filters = this._filterConfig;
|
223
225
|
filterModal.configName = this._configName;
|
226
|
+
filterModal.disablePersonalizedFilter = this._disablePersonalizedFilter;
|
224
227
|
filterModal.getMessage = this._getMessage.bind(this);
|
225
228
|
filterModal.applyFilters = this.applyFilters.bind(this);
|
226
229
|
filterModal.closeModal = () => this._closeModal();
|
227
230
|
filterModal.addPersonalizedFilter = () => this._addPersonalizedFilterFn();
|
228
231
|
filterModal.editPersonalizedFilter = (id) => this._editPersonalizedFilterFn(id);
|
232
|
+
filterModal.deletePersonalizedFilter = (filter, configName) => this._onDeletePersonalizedFilter(filter, configName);
|
229
233
|
return filterModal;
|
230
234
|
}
|
231
235
|
async showModal() {
|
@@ -253,6 +257,7 @@ const SnkFilterBar = class {
|
|
253
257
|
this._updateSequence = [];
|
254
258
|
this._loadingPending = false;
|
255
259
|
this._configUpdated = false;
|
260
|
+
this._firstLoad = true;
|
256
261
|
this._pendingVariables = false;
|
257
262
|
this._customfiltersToBeUpdated = [];
|
258
263
|
this._calculateSortIndex = (item) => {
|
@@ -273,6 +278,7 @@ const SnkFilterBar = class {
|
|
273
278
|
this.resourceID = undefined;
|
274
279
|
this.filterConfig = undefined;
|
275
280
|
this.messagesBuilder = undefined;
|
281
|
+
this.disablePersonalizedFilter = undefined;
|
276
282
|
this.allowDefault = undefined;
|
277
283
|
this.scrollerLocked = false;
|
278
284
|
this.showPersonalizedFilter = false;
|
@@ -316,7 +322,7 @@ const SnkFilterBar = class {
|
|
316
322
|
* Faz o recarregamento da filterbar buscando o state no servidor.
|
317
323
|
*/
|
318
324
|
async reload() {
|
319
|
-
this.loadConfigFromStorage();
|
325
|
+
this.loadConfigFromStorage(true);
|
320
326
|
}
|
321
327
|
/**
|
322
328
|
* Retorna um item de filtro pelo ID.
|
@@ -356,6 +362,23 @@ const SnkFilterBar = class {
|
|
356
362
|
this.updateFilter(filterItem);
|
357
363
|
return Promise.resolve();
|
358
364
|
}
|
365
|
+
/**
|
366
|
+
* Remove um item de filtro.
|
367
|
+
*
|
368
|
+
* @param filterID - ID do a ser adicionado
|
369
|
+
*
|
370
|
+
* @returns {Promise<SnkFilterItemConfig|undefined>} - Retorna o item de filtro removido, ou undefined caso não encontrado.
|
371
|
+
*/
|
372
|
+
async removeFilterItem(filterID) {
|
373
|
+
const itemIndex = this.filterConfig.findIndex(item => item.id === filterID);
|
374
|
+
if (itemIndex == -1) {
|
375
|
+
console.warn("[SnkFilterBar.removeFilterItem] FilterItem não encontrado");
|
376
|
+
return Promise.resolve(undefined);
|
377
|
+
}
|
378
|
+
const itemToRemove = this.filterConfig[itemIndex];
|
379
|
+
this.filterConfig = this.filterConfig.filter(item => item.id !== filterID);
|
380
|
+
return Promise.resolve(itemToRemove);
|
381
|
+
}
|
359
382
|
componentDidLoad() {
|
360
383
|
if (this._element) {
|
361
384
|
const dataInfo = { dataUnit: this.dataUnit };
|
@@ -388,13 +411,27 @@ const SnkFilterBar = class {
|
|
388
411
|
return;
|
389
412
|
}
|
390
413
|
this._loadingPending = false;
|
391
|
-
this.dataUnit.
|
414
|
+
this.doLoadData(this.dataUnit.getLastLoadRequest() != undefined);
|
392
415
|
}
|
393
416
|
if (this._configUpdated) {
|
394
417
|
this._configUpdated = false;
|
395
418
|
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
396
419
|
}
|
397
420
|
}
|
421
|
+
async doLoadData(forceReload = false) {
|
422
|
+
try {
|
423
|
+
if (this._firstLoad && !forceReload) {
|
424
|
+
let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
|
425
|
+
if (!autoLoad) {
|
426
|
+
return;
|
427
|
+
}
|
428
|
+
}
|
429
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
430
|
+
}
|
431
|
+
finally {
|
432
|
+
this._firstLoad = false;
|
433
|
+
}
|
434
|
+
}
|
398
435
|
/**
|
399
436
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
400
437
|
* através de um pequeno modulo na estrutura da aplicação:
|
@@ -403,6 +440,9 @@ const SnkFilterBar = class {
|
|
403
440
|
*/
|
404
441
|
getMessage(key, params, defaultValue) {
|
405
442
|
var _a;
|
443
|
+
if (this.messagesBuilder == undefined && this._application) {
|
444
|
+
this.messagesBuilder = this._application.messagesBuilder;
|
445
|
+
}
|
406
446
|
return ((_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params)) || defaultValue;
|
407
447
|
}
|
408
448
|
getFilter(_dataUnit) {
|
@@ -429,7 +469,7 @@ const SnkFilterBar = class {
|
|
429
469
|
registryFilterProvider() {
|
430
470
|
this.dataUnit.addFilterProvider(this);
|
431
471
|
if (this.filterConfig) {
|
432
|
-
this.
|
472
|
+
this.doLoadData();
|
433
473
|
}
|
434
474
|
}
|
435
475
|
itemFocused(selectedItem) {
|
@@ -506,7 +546,10 @@ const SnkFilterBar = class {
|
|
506
546
|
loadPermitions() {
|
507
547
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
508
548
|
}
|
509
|
-
loadConfigFromStorage() {
|
549
|
+
async loadConfigFromStorage(clearCache) {
|
550
|
+
if (clearCache) {
|
551
|
+
await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
|
552
|
+
}
|
510
553
|
return new Promise(accept => {
|
511
554
|
ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
|
512
555
|
.then((filters) => {
|
@@ -561,9 +604,11 @@ const SnkFilterBar = class {
|
|
561
604
|
filterConfig: filtersConfigCopy,
|
562
605
|
configName: this.configName,
|
563
606
|
onComplete: callbackOnApplyFilter,
|
607
|
+
disablePersonalizedFilter: this.disablePersonalizedFilter,
|
564
608
|
getMessage: (key, props) => this.getMessage(key, props),
|
565
609
|
onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
|
566
|
-
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id)
|
610
|
+
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
|
611
|
+
onDeletePersonalizedFilter: (filter, configName) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName),
|
567
612
|
};
|
568
613
|
this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
|
569
614
|
await this._filterModalFactory.showModal();
|
@@ -581,6 +626,11 @@ const SnkFilterBar = class {
|
|
581
626
|
this.showPersonalizedFilter = true;
|
582
627
|
this.personalizedFilterId = id;
|
583
628
|
}
|
629
|
+
deletePersonalizedFilter(filter, filterItemType, configName) {
|
630
|
+
if (filterItemType === FilterItemType.PERSONALIZED) {
|
631
|
+
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
|
632
|
+
}
|
633
|
+
}
|
584
634
|
handleHidePersonalizedFilter(reloadFilterBar) {
|
585
635
|
if (reloadFilterBar) {
|
586
636
|
this.loadConfigFromStorage().then(() => {
|
@@ -258,6 +258,9 @@ const SnkFilterItem = class {
|
|
258
258
|
}
|
259
259
|
canClearFilter() {
|
260
260
|
const { value, groupedItems = [] } = this.config;
|
261
|
+
if (value != undefined && this.config.type === FilterItemType.MULTI_LIST) {
|
262
|
+
return value.some((item) => item.check);
|
263
|
+
}
|
261
264
|
return value !== undefined || groupedItems.some(item => item.visible);
|
262
265
|
}
|
263
266
|
getRightIconName() {
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
|
6
6
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
7
7
|
import './form-config-fetcher-36219cd3.js';
|
8
8
|
import './DataFetcher-aa159c5a.js';
|
@@ -52,7 +52,6 @@ const SnkFilterModalItem = class {
|
|
52
52
|
buildSnkFilterPersonalizedProps() {
|
53
53
|
return {
|
54
54
|
tag: "snk-personalized-filter-editor", props: {
|
55
|
-
onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, FilterItemType.PERSONALIZED),
|
56
55
|
onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
|
57
56
|
onAddFilter: () => this.addPersonalizedFilter.emit(),
|
58
57
|
}
|
@@ -20,6 +20,15 @@ const SnkFilterModal = class {
|
|
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 = class {
|
|
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 = class {
|
|
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
|
};
|
228
243
|
SnkFilterModal.style = snkFilterModalCss;
|
@@ -13,7 +13,8 @@ const SnkFilterMultiSelect = class {
|
|
13
13
|
* Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
|
14
14
|
*/
|
15
15
|
ezChangeListener(evt) {
|
16
|
-
|
16
|
+
var _a;
|
17
|
+
this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
|
17
18
|
this.valueChanged.emit(this.value);
|
18
19
|
}
|
19
20
|
/**
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-5c7d3771.js';
|
4
4
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
5
|
-
import './ConfigStorage-
|
5
|
+
import './ConfigStorage-4151acc8.js';
|
6
6
|
import './form-config-fetcher-36219cd3.js';
|
7
7
|
import './DataFetcher-aa159c5a.js';
|
8
8
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
2
2
|
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { CheckMode } from '@sankhyalabs/ezui/dist/collection/components/ez-check/CheckMode';
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
|
6
6
|
import { O as ORDER_VALUES } from './constants-8457af36.js';
|
7
7
|
import './form-config-fetcher-36219cd3.js';
|
8
8
|
import './DataFetcher-aa159c5a.js';
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { ElementIDUtils, ApplicationContext, StringUtils, DataType } from '@sankhyalabs/core';
|
3
3
|
import { SortMode, UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
6
|
-
import { P as PresentationMode } from './index-
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-d4d0b424.js';
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-4151acc8.js';
|
6
|
+
import { P as PresentationMode } from './index-0ece87a6.js';
|
7
7
|
import { T as TaskbarProcessor, o as openFieldSearch, b as buildFieldSearch } from './field-search-efbe307f.js';
|
8
8
|
import { s as store } from './index-bdf75557.js';
|
9
9
|
import { S as SnkMultiSelectionListDataSource } from './SnkMultiSelectionListDataSource-44494b0e.js';
|
@@ -26,14 +26,21 @@ const SnkGrid = class {
|
|
26
26
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
27
27
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
28
28
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
29
|
+
"snkGridTopTaskbar.regular.singleTaskbar": [],
|
29
30
|
"snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
|
30
|
-
"snkGridTopTaskbar.finish_edition.secondary": []
|
31
|
+
"snkGridTopTaskbar.finish_edition.secondary": [],
|
32
|
+
"snkGridTopTaskbar.finish_edition.singleTaskbar": [],
|
31
33
|
});
|
32
34
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
33
35
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
34
36
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
35
37
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
|
36
|
-
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
38
|
+
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
|
39
|
+
"snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
40
|
+
"snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
41
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
|
42
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
|
43
|
+
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
37
44
|
});
|
38
45
|
this._dataUnit = undefined;
|
39
46
|
this._dataState = undefined;
|
@@ -57,6 +64,7 @@ const SnkGrid = class {
|
|
57
64
|
this.taskbarCustomContainerId = undefined;
|
58
65
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
59
66
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
67
|
+
this.disablePersonalizedFilter = undefined;
|
60
68
|
}
|
61
69
|
/**
|
62
70
|
* Exibe a janela de configurações da grade.
|
@@ -314,30 +322,46 @@ const SnkGrid = class {
|
|
314
322
|
return invisibleButtons;
|
315
323
|
}
|
316
324
|
componentWillRender() {
|
317
|
-
var _a;
|
318
325
|
const invisibleButtons = this.getInvisibleButtons();
|
319
|
-
|
320
|
-
let headerTaskbarId;
|
321
|
-
if (hasSelectedRecord) {
|
322
|
-
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
|
323
|
-
}
|
324
|
-
else {
|
325
|
-
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
|
326
|
-
}
|
327
|
-
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
326
|
+
this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
328
327
|
this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
329
328
|
this.dataExporterProviderStore();
|
330
329
|
}
|
330
|
+
getHeaderTaskbarId() {
|
331
|
+
var _a, _b;
|
332
|
+
const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
|
333
|
+
const taskbarIdPrefixLookup = {
|
334
|
+
primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
335
|
+
secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
336
|
+
singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
|
337
|
+
};
|
338
|
+
const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
|
339
|
+
let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
|
340
|
+
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === PresentationMode.SINGLE_TASKBAR) {
|
341
|
+
headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
|
342
|
+
}
|
343
|
+
return headerTaskbarId;
|
344
|
+
}
|
331
345
|
getTopTaskBarId() {
|
332
346
|
var _a;
|
333
|
-
const
|
347
|
+
const suffixLookup = {
|
348
|
+
primary: "",
|
349
|
+
secondary: ".secondary",
|
350
|
+
singleTaskbar: ".singleTaskbar"
|
351
|
+
};
|
352
|
+
const sufix = suffixLookup[this.presentationMode];
|
334
353
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
335
354
|
return `snkGridTopTaskbar.finish_edition${sufix}`;
|
336
355
|
}
|
337
356
|
return `snkGridTopTaskbar.regular${sufix}`;
|
338
357
|
}
|
339
358
|
getPrimaryButton() {
|
340
|
-
|
359
|
+
const primaryButtonLookup = {
|
360
|
+
primary: "INSERT",
|
361
|
+
secondary: "",
|
362
|
+
singleTaskbar: "INSERT"
|
363
|
+
};
|
364
|
+
return primaryButtonLookup[this.presentationMode];
|
341
365
|
}
|
342
366
|
getColumnSearch(actionButton, item) {
|
343
367
|
if (this._columnSearch != undefined) {
|
@@ -388,7 +412,7 @@ const SnkGrid = class {
|
|
388
412
|
return undefined;
|
389
413
|
}
|
390
414
|
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 &&
|
391
|
-
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 }))));
|
415
|
+
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), 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 }))));
|
392
416
|
}
|
393
417
|
get _element() { return getElement(this); }
|
394
418
|
};
|