@sankhyalabs/sankhyablocks 8.15.0-dev.4 → 8.15.0-dev.41
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-8009ecb2.js → ConfigStorage-34be11ce.js} +94 -21
- 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-7d850fbc.js → SnkFormConfigManager-531a191c.js} +21 -13
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-141aa18d.js} +15 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -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-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-de65b9fc.js → pesquisa-fetcher-94f6b316.js} +472 -46
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +538 -8
- package/dist/cjs/snk-application.cjs.entry.js +44 -10
- package/dist/cjs/snk-attach.cjs.entry.js +398 -61
- package/dist/cjs/snk-crud.cjs.entry.js +17 -12
- package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -5
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-6026a9f7.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -12
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +49 -10
- package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
- package/dist/cjs/snk-form.cjs.entry.js +11 -4
- package/dist/cjs/snk-grid.cjs.entry.js +37 -22
- package/dist/cjs/{snk-guides-viewer-7f9b6d94.js → snk-guides-viewer-76b4c346.js} +17 -12
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -10
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +230 -27
- package/dist/cjs/snk-taskbar.cjs.entry.js +100 -14
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-3ecd1278.js} +9 -9
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +85 -2
- 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 +95 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +28 -4
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +6 -2
- 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/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -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 +19 -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 +142 -5
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +20 -12
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
- package/dist/collection/components/snk-grid/snk-grid.js +100 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +397 -18
- 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 +9 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +139 -13
- package/dist/collection/lib/configs/ConfigStorage.js +86 -16
- 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/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +11 -12
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +92 -19
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkFormConfigManager.js +19 -11
- package/dist/components/SnkMessageBuilder.js +15 -1
- package/dist/components/dataunit-fetcher.js +91 -45
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +41 -2
- package/dist/components/snk-attach2.js +454 -68
- package/dist/components/snk-crud.js +15 -3
- package/dist/components/snk-data-exporter2.js +6 -2
- package/dist/components/snk-detail-view2.js +41 -8
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +52 -8
- package/dist/components/snk-filter-item2.js +3 -0
- package/dist/components/snk-filter-modal.js +4 -2
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-form-config2.js +46 -26
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +38 -17
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +287 -29
- package/dist/components/snk-taskbar2.js +114 -24
- package/dist/components/taskbar-actions-button2.js +18 -2
- package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-101a2b4c.js} +94 -21
- 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-9be0e7d4.js → SnkFormConfigManager-02ecf57f.js} +21 -13
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-9747ddd2.js} +15 -1
- package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -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-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-e218c6d2.js → pesquisa-fetcher-f05a12ca.js} +462 -38
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +537 -9
- package/dist/esm/snk-application.entry.js +43 -9
- package/dist/esm/snk-attach.entry.js +398 -61
- package/dist/esm/snk-crud.entry.js +17 -12
- package/dist/esm/snk-data-exporter.entry.js +9 -5
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-4c343635.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +10 -12
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +49 -10
- package/dist/esm/snk-filter-item.entry.js +3 -0
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-modal.entry.js +2 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +48 -28
- package/dist/esm/snk-form.entry.js +11 -4
- package/dist/esm/snk-grid.entry.js +38 -23
- package/dist/esm/{snk-guides-viewer-9d5e073f.js → snk-guides-viewer-90ca9105.js} +17 -12
- package/dist/esm/snk-guides-viewer.entry.js +8 -10
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +230 -27
- package/dist/esm/snk-taskbar.entry.js +101 -15
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
- package/dist/sankhyablocks/p-1f3174cb.entry.js +1 -0
- package/dist/sankhyablocks/p-1fa5a18c.entry.js +11 -0
- package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/{p-ff6064e7.js → p-2936303b.js} +1 -1
- package/dist/sankhyablocks/p-2cfe0c2c.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-384fd6ae.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-5c0b53ce.js +56 -0
- package/dist/sankhyablocks/p-663ff67b.entry.js +1 -0
- package/dist/sankhyablocks/{p-f514913b.entry.js → p-6b28cc74.entry.js} +1 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-3520c088.entry.js → p-7ddd95b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
- package/dist/sankhyablocks/p-8111f63f.entry.js +1 -0
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
- package/dist/sankhyablocks/{p-32f0935f.js → p-9a5d1b39.js} +1 -1
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-a83487a0.entry.js +1 -0
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b41a622a.entry.js +1 -0
- package/dist/sankhyablocks/p-ba4871b5.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-d01ceda6.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d304659d.entry.js +1 -0
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-e7c1bce4.entry.js +1 -0
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
- package/dist/sankhyablocks/p-fad4c2fe.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +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 +15 -0
- 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 +21 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
- 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 +5 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +24 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
- package/dist/types/components/snk-form/snk-form.d.ts +6 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +2 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +19 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +75 -4
- 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 +28 -1
- package/dist/types/components.d.ts +273 -12
- package/dist/types/lib/configs/ConfigStorage.d.ts +25 -1
- 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/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +15 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0d084a0f.entry.js +0 -1
- package/dist/sankhyablocks/p-11081798.entry.js +0 -1
- package/dist/sankhyablocks/p-143425c0.entry.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-4b0938f6.entry.js +0 -1
- package/dist/sankhyablocks/p-585294ee.js +0 -56
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-776ee8e3.js +0 -1
- package/dist/sankhyablocks/p-7f9d6b5d.entry.js +0 -11
- package/dist/sankhyablocks/p-809f367d.entry.js +0 -1
- package/dist/sankhyablocks/p-8437508f.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a87229cd.entry.js +0 -1
- package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
- package/dist/sankhyablocks/p-ba627e85.js +0 -60
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-d1007720.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-e3132789.entry.js +0 -1
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
- package/dist/sankhyablocks/p-fd8814b9.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/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +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,5 +1,5 @@
|
|
1
1
|
import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
|
2
|
-
import { StringUtils, ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { StringUtils, ApplicationContext, OVERFLOWED_CLASS_NAME, OverflowWatcher, OverflowDirection, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { A as AuthorizationConfig } from './AuthorizationConfig.js';
|
4
4
|
import { P as PresentationMode } from './index2.js';
|
5
5
|
import { s as store } from './index3.js';
|
@@ -93,35 +93,35 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
93
93
|
case TaskbarElement.CONFIGURATOR:
|
94
94
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
95
95
|
case TaskbarElement.MORE_OPTIONS:
|
96
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
96
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
97
97
|
case TaskbarElement.DIVIDER:
|
98
|
-
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-
|
98
|
+
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
99
99
|
case TaskbarElement.DATA_EXPORTER:
|
100
100
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
101
|
-
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
101
|
+
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
102
102
|
case TaskbarElement.ATTACH:
|
103
103
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
104
104
|
case TaskbarElement.ACTIONS_BUTTON:
|
105
|
-
return h("snk-actions-button", { "data-element-id": dataElementId });
|
105
|
+
return h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
106
106
|
}
|
107
107
|
};
|
108
108
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
109
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
109
|
+
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
110
110
|
}
|
111
111
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
112
|
-
return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
112
|
+
return h("ez-button", { key: dataElementId, title: title, mode: "icon", size: "small", class: className, "data-taskbar-label": title, "data-taskbar-element": name, "data-taskbar-icon": iconName, "data-element-id": dataElementId, iconName: iconName, enabled: isEnabled(name), onClick: () => action(name) });
|
113
113
|
}
|
114
114
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
115
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
115
|
+
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-taskbar-label": text, "data-taskbar-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
116
116
|
h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
117
117
|
}
|
118
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
118
|
+
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
119
119
|
return actions && actions.length > 0
|
120
|
-
? h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
120
|
+
? h("taskbar-actions-button", { class: className, key: dataElementId, title: title, "data-taskbar-element": element, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
121
121
|
: undefined;
|
122
122
|
}
|
123
123
|
|
124
|
-
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
124
|
+
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex;flex-wrap:wrap}.no-wrap.sc-snk-taskbar-h{flex-wrap:nowrap}.full-width.sc-snk-taskbar-h{width:100%}.align-right.sc-snk-taskbar-h{justify-content:flex-end}.overflowed.sc-snk-taskbar{display:none}";
|
125
125
|
|
126
126
|
const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
127
127
|
constructor() {
|
@@ -129,6 +129,9 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
129
129
|
this.__registerHost();
|
130
130
|
this.actionClick = createEvent(this, "actionClick", 7);
|
131
131
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
132
|
+
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
133
|
+
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
134
|
+
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
132
135
|
this._titleKeyByElement = {
|
133
136
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
134
137
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -146,11 +149,15 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
146
149
|
[TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
147
150
|
};
|
148
151
|
this._permissions = undefined;
|
152
|
+
this._overFlowedElements = [];
|
149
153
|
this._customElements = undefined;
|
150
154
|
this._customElementsId = undefined;
|
151
155
|
this._slotContainer = undefined;
|
156
|
+
this._hiddenActionsList = [];
|
157
|
+
this.alignRigth = false;
|
152
158
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
153
159
|
this.customContainerId = undefined;
|
160
|
+
this.overflowStrategy = 'hiddenItems';
|
154
161
|
this.configName = undefined;
|
155
162
|
this.resourceID = undefined;
|
156
163
|
this.buttons = undefined;
|
@@ -164,6 +171,13 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
164
171
|
}
|
165
172
|
observeButtons() {
|
166
173
|
this._definitions = undefined;
|
174
|
+
requestAnimationFrame(() => {
|
175
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
176
|
+
});
|
177
|
+
}
|
178
|
+
observeDisabledButtons() {
|
179
|
+
var _a;
|
180
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
|
167
181
|
}
|
168
182
|
// Internal methods
|
169
183
|
elementsFromString(strButtons) {
|
@@ -259,12 +273,19 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
259
273
|
}
|
260
274
|
const taskbarElement = TaskbarElement[def.toString()];
|
261
275
|
if (taskbarElement) {
|
262
|
-
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.
|
276
|
+
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), this.configName, this.presentationMode);
|
263
277
|
}
|
264
278
|
else {
|
265
279
|
return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
266
280
|
}
|
267
281
|
}
|
282
|
+
buildDynamicActionsList() {
|
283
|
+
var _a;
|
284
|
+
if (this._hiddenActionsList.length) {
|
285
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), { type: 'divider', label: "", value: "" }, ...this._hiddenActionsList];
|
286
|
+
}
|
287
|
+
return this.actionsList;
|
288
|
+
}
|
268
289
|
getIdElemBtnNative(taskbarElem) {
|
269
290
|
return StringUtils.toCamelCase(taskbarElem);
|
270
291
|
}
|
@@ -305,11 +326,13 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
305
326
|
});
|
306
327
|
}
|
307
328
|
addCustomElementContainer(elem) {
|
329
|
+
var _a;
|
308
330
|
const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
|
309
331
|
if (!this._customElementsId.includes(elementId)) {
|
310
332
|
this._customElementsId.push(elementId);
|
333
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
311
334
|
}
|
312
|
-
return h("span", { key: elementId, id: elementId });
|
335
|
+
return h("span", { class: "ez-padding-left--medium", key: elementId, id: elementId });
|
313
336
|
}
|
314
337
|
getCustomElements() {
|
315
338
|
var _a, _b;
|
@@ -344,15 +367,76 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
344
367
|
}
|
345
368
|
this.validatePresentationMode();
|
346
369
|
}
|
370
|
+
handleOverFlow(overFlowingElements) {
|
371
|
+
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
372
|
+
this.resetOverFlowedElements();
|
373
|
+
this.doOverFlowElements(elementsToHandle);
|
374
|
+
}
|
375
|
+
resetOverFlowedElements() {
|
376
|
+
this._overFlowedElements.forEach(element => {
|
377
|
+
element.classList.remove(OVERFLOWED_CLASS_NAME);
|
378
|
+
});
|
379
|
+
this._hiddenActionsList = [];
|
380
|
+
this._overFlowedElements = [];
|
381
|
+
}
|
382
|
+
doOverFlowElements(overFlowedElements) {
|
383
|
+
overFlowedElements.forEach(element => {
|
384
|
+
element.classList.add(OVERFLOWED_CLASS_NAME);
|
385
|
+
this._overFlowedElements.push(element);
|
386
|
+
this.addItemToActionList(element);
|
387
|
+
});
|
388
|
+
}
|
389
|
+
addItemToActionList(element) {
|
390
|
+
const taskbarElement = this.getTaskbarElementName(element);
|
391
|
+
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
392
|
+
const optionItem = {
|
393
|
+
value: taskbarElement,
|
394
|
+
label: this.getTaskbarElementLabel(element),
|
395
|
+
iconName: this.getTaskbarElementIcon(element)
|
396
|
+
};
|
397
|
+
this._hiddenActionsList.push(optionItem);
|
398
|
+
}
|
399
|
+
}
|
400
|
+
getTaskbarElementName(element) {
|
401
|
+
var _a;
|
402
|
+
return (_a = element.getAttribute('data-taskbar-element')) !== null && _a !== void 0 ? _a : "";
|
403
|
+
}
|
404
|
+
getTaskbarElementIcon(element) {
|
405
|
+
var _a;
|
406
|
+
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
407
|
+
}
|
408
|
+
getTaskbarElementLabel(element) {
|
409
|
+
var _a;
|
410
|
+
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
411
|
+
}
|
412
|
+
hasToIgnoreOverFlow(element) {
|
413
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
|
414
|
+
}
|
415
|
+
handleOverFlowStrategy() {
|
416
|
+
if (this.overflowStrategy === 'hiddenItems') {
|
417
|
+
this._overFlowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
418
|
+
}
|
419
|
+
}
|
420
|
+
buildOverFlowWatcherParams() {
|
421
|
+
return {
|
422
|
+
element: this._element,
|
423
|
+
callback: this.handleOverFlow.bind(this),
|
424
|
+
overFlowDirection: OverflowDirection.HORIZONTAL,
|
425
|
+
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
426
|
+
};
|
427
|
+
}
|
347
428
|
componentDidLoad() {
|
348
429
|
const dataInfo = { dataUnit: this.dataUnit };
|
349
430
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
431
|
+
this.handleOverFlowStrategy();
|
350
432
|
}
|
351
433
|
componentDidRender() {
|
352
434
|
this.appendCustomElementsInTaskbar();
|
353
435
|
}
|
354
436
|
disconnectedCallback() {
|
437
|
+
var _a;
|
355
438
|
this.unlinkAllCustomElements();
|
439
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
356
440
|
}
|
357
441
|
unlinkAllCustomElements() {
|
358
442
|
var _a;
|
@@ -370,14 +454,9 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
370
454
|
return undefined;
|
371
455
|
}
|
372
456
|
let index = 0;
|
373
|
-
return (h(Host,
|
374
|
-
var _a;
|
375
|
-
|
376
|
-
index = 0;
|
377
|
-
}
|
378
|
-
else {
|
379
|
-
index++;
|
380
|
-
}
|
457
|
+
return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
458
|
+
var _a, _b;
|
459
|
+
index++;
|
381
460
|
if (TaskbarElement[elem]) {
|
382
461
|
return this.getElement(index, TaskbarElement[elem]);
|
383
462
|
}
|
@@ -387,17 +466,26 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
387
466
|
if (this._customElements.has(elem)) {
|
388
467
|
return this.addCustomElementContainer(elem);
|
389
468
|
}
|
469
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
390
470
|
return h("slot", { name: elem });
|
391
|
-
})), h("div", { class:
|
471
|
+
})), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))));
|
472
|
+
}
|
473
|
+
getHostClasses() {
|
474
|
+
if (this.overflowStrategy !== 'hiddenItems')
|
475
|
+
return 'no-wrap';
|
476
|
+
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
392
477
|
}
|
393
478
|
get _element() { return this; }
|
394
479
|
static get watchers() { return {
|
395
|
-
"buttons": ["observeButtons"]
|
480
|
+
"buttons": ["observeButtons"],
|
481
|
+
"disabledButtons": ["observeDisabledButtons"]
|
396
482
|
}; }
|
397
483
|
static get style() { return snkTaskbarCss; }
|
398
484
|
}, [6, "snk-taskbar", {
|
485
|
+
"alignRigth": [4, "align-rigth"],
|
399
486
|
"customSlotId": [1, "custom-slot-id"],
|
400
487
|
"customContainerId": [1, "custom-container-id"],
|
488
|
+
"overflowStrategy": [1, "overflow-strategy"],
|
401
489
|
"configName": [1, "config-name"],
|
402
490
|
"resourceID": [1, "resource-i-d"],
|
403
491
|
"buttons": [1],
|
@@ -409,9 +497,11 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
409
497
|
"presentationMode": [1537, "presentation-mode"],
|
410
498
|
"messagesBuilder": [1040],
|
411
499
|
"_permissions": [32],
|
500
|
+
"_overFlowedElements": [32],
|
412
501
|
"_customElements": [32],
|
413
502
|
"_customElementsId": [32],
|
414
|
-
"_slotContainer": [32]
|
503
|
+
"_slotContainer": [32],
|
504
|
+
"_hiddenActionsList": [32]
|
415
505
|
}]);
|
416
506
|
function defineCustomElement() {
|
417
507
|
if (typeof customElements === "undefined") {
|
@@ -67,12 +67,28 @@ const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
67
67
|
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
68
68
|
}
|
69
69
|
onSelectAction(iAction) {
|
70
|
-
const
|
70
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
71
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
71
72
|
this.taskbarActionSelected.emit(selectedAction);
|
72
73
|
if (!selectedAction.disableCloseOnSelect) {
|
73
74
|
this._showDropdown = false;
|
74
75
|
}
|
75
76
|
}
|
77
|
+
getSelectedAction(id, actions) {
|
78
|
+
let selectedItem = null;
|
79
|
+
for (const item of actions) {
|
80
|
+
if (item.id === id) {
|
81
|
+
selectedItem = item;
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
85
|
+
continue;
|
86
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
87
|
+
if (selectedItem)
|
88
|
+
break;
|
89
|
+
}
|
90
|
+
return selectedItem;
|
91
|
+
}
|
76
92
|
dropdownItemBuilder(item, _level) {
|
77
93
|
const itemAction = this.actions.find(action => action.value === item.id);
|
78
94
|
if (!itemAction || !itemAction.itemBuilder) {
|
@@ -110,7 +126,7 @@ const TaskbarActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTML
|
|
110
126
|
this.taskbarActionsButtonDisconnected.emit();
|
111
127
|
}
|
112
128
|
render() {
|
113
|
-
return (h(Host, null, h("div", { class:
|
129
|
+
return (h(Host, null, h("div", { class: `${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
|
114
130
|
}
|
115
131
|
get _element() { return this; }
|
116
132
|
static get style() { return taskbarActionsButtonCss; }
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-
|
1
|
+
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-f121f880.js';
|
2
2
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
3
3
|
import { ObjectUtils } from '@sankhyalabs/core';
|
4
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
4
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-a650ae58.js';
|
5
5
|
|
6
6
|
class GridConfigFetcher extends ResourceFetcher {
|
7
7
|
constructor() {
|
@@ -232,7 +232,7 @@ class PersonalizedFilterFetcher {
|
|
232
232
|
assistent
|
233
233
|
}
|
234
234
|
}`);
|
235
|
-
this.templateByQuery.set("savePersonalizedFilter", dist.gql `
|
235
|
+
this.templateByQuery.set("savePersonalizedFilter", dist.gql `
|
236
236
|
mutation($name: String!, $filterAssistent: InputFilterAssistent!) {
|
237
237
|
$queryAlias$: savePersonalizedFilter(name: $name, filterAssistent: $filterAssistent) {
|
238
238
|
id
|
@@ -254,11 +254,11 @@ class PersonalizedFilterFetcher {
|
|
254
254
|
}
|
255
255
|
}`);
|
256
256
|
}
|
257
|
-
async loadPersonalizedFilter(resourceID, filterID, configName) {
|
257
|
+
async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName) {
|
258
258
|
return new Promise((resolve, reject) => {
|
259
259
|
DataFetcher.get()
|
260
260
|
.callGraphQL({
|
261
|
-
values: { name: this.resolveURI(resourceID, configName) + "/" + filterID },
|
261
|
+
values: { name: this.resolveURI(resourceID, configName) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName) },
|
262
262
|
query: this.templateByQuery.get("fetchFilterAssistent"),
|
263
263
|
})
|
264
264
|
.then((resp) => {
|
@@ -270,6 +270,9 @@ class PersonalizedFilterFetcher {
|
|
270
270
|
});
|
271
271
|
});
|
272
272
|
}
|
273
|
+
resolveLegacyConfigName(legacyConfigName) {
|
274
|
+
return legacyConfigName ? `?legacyResourceID=${legacyConfigName}` : '';
|
275
|
+
}
|
273
276
|
async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
274
277
|
if (!personalizedFilter || Object.keys(personalizedFilter).length == 0) {
|
275
278
|
return Promise.reject(new Error("personalizedFilter não pode ser vazio"));
|
@@ -351,17 +354,37 @@ class PersonalizedFilterFetcher {
|
|
351
354
|
}
|
352
355
|
}
|
353
356
|
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
357
|
+
var CONFIG_SOURCE;
|
358
|
+
(function (CONFIG_SOURCE) {
|
359
|
+
CONFIG_SOURCE["form"] = "form";
|
360
|
+
CONFIG_SOURCE["grid"] = "grid";
|
361
|
+
CONFIG_SOURCE["filterBar"] = "filterBar";
|
362
|
+
})(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
|
359
363
|
class ConfigStorage {
|
360
|
-
static
|
364
|
+
static addFilterBarLegacyConfig(configName, legacyConfigName) {
|
365
|
+
this.validateConfigName(configName, legacyConfigName);
|
366
|
+
this.filterBarLegacyConfig.set(configName, legacyConfigName);
|
367
|
+
}
|
368
|
+
static addFormLegacyConfig(configName, legacyConfigName) {
|
369
|
+
this.validateConfigName(configName, legacyConfigName);
|
370
|
+
this.formLegacyConfig.set(configName, legacyConfigName);
|
371
|
+
}
|
372
|
+
static addGridLegacyConfig(configName, legacyConfigName) {
|
373
|
+
this.validateConfigName(configName, legacyConfigName);
|
374
|
+
this.gridLegacyConfig.set(configName, legacyConfigName);
|
375
|
+
}
|
376
|
+
static preload(resourceID, configName, legacyConfigs) {
|
377
|
+
if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.gridLegacyConfig)) {
|
378
|
+
ConfigStorage.addGridLegacyConfig(configName, legacyConfigs.gridLegacyConfig);
|
379
|
+
}
|
380
|
+
if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.formLegacyConfig)) {
|
381
|
+
ConfigStorage.addFormLegacyConfig(configName, legacyConfigs.formLegacyConfig);
|
382
|
+
}
|
361
383
|
ConfigStorage.loadFormConfig(configName, resourceID);
|
362
384
|
ConfigStorage.loadGridConfig(configName, resourceID);
|
363
385
|
}
|
364
386
|
static async loadFilterBarConfig(name, resourceID, urlParams) {
|
387
|
+
urlParams = this.handleLegacyConfig(name, CONFIG_SOURCE.filterBar, urlParams);
|
365
388
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
|
366
389
|
if (!ConfigStorage.configById.has(cacheID)) {
|
367
390
|
ConfigStorage.configById.set(cacheID, ConfigStorage.filterBarConfigFetcher.getConfig(resourceID, name, urlParams));
|
@@ -369,6 +392,7 @@ class ConfigStorage {
|
|
369
392
|
return ConfigStorage.configById.get(cacheID);
|
370
393
|
}
|
371
394
|
static async loadFormConfig(name, resourceID) {
|
395
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
|
372
396
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
|
373
397
|
if (!ConfigStorage.configById.has(cacheID)) {
|
374
398
|
ConfigStorage.configById.set(cacheID, ConfigStorage.formConfigFetcher.loadFormConfig(name, resourceID));
|
@@ -376,6 +400,7 @@ class ConfigStorage {
|
|
376
400
|
return ConfigStorage.configById.get(cacheID);
|
377
401
|
}
|
378
402
|
static async loadGridConfig(name, resourceID) {
|
403
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
379
404
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
|
380
405
|
if (!ConfigStorage.configById.has(cacheID)) {
|
381
406
|
ConfigStorage.configById.set(cacheID, ConfigStorage.gridConfigFetcher.getConfig(name, resourceID));
|
@@ -383,13 +408,12 @@ class ConfigStorage {
|
|
383
408
|
return ConfigStorage.configById.get(cacheID);
|
384
409
|
}
|
385
410
|
static async saveFilterBarConfig(config, name, resourceID) {
|
386
|
-
|
387
|
-
this.configById.delete(cacheID);
|
411
|
+
await this.deleteFilterBarConfigCache(name, resourceID);
|
388
412
|
return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
|
389
413
|
}
|
390
414
|
static async saveFormConfig(config, name, resourceID) {
|
391
|
-
|
392
|
-
this.
|
415
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
|
416
|
+
await this.deleteFormConfigCache(name, resourceID);
|
393
417
|
return this.formConfigFetcher.saveConfig(config, name, resourceID);
|
394
418
|
}
|
395
419
|
static async saveCardState(config, name, resourceID) {
|
@@ -399,18 +423,17 @@ class ConfigStorage {
|
|
399
423
|
if (config == undefined) {
|
400
424
|
return;
|
401
425
|
}
|
402
|
-
|
403
|
-
this.configById.delete(cacheID);
|
426
|
+
await this.deleteGridConfigCache(name, resourceID);
|
404
427
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
405
428
|
}
|
406
429
|
static async loadPersonalizedFilter(filterId, resourceID, configName) {
|
407
|
-
|
430
|
+
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
431
|
+
return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
|
408
432
|
}
|
409
433
|
static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
410
|
-
//Ao criar ou alterar um filtro personalizado,
|
434
|
+
//Ao criar ou alterar um filtro personalizado,
|
411
435
|
//precisamos remover o cache do status da filterbar.
|
412
|
-
|
413
|
-
this.configById.delete(cacheID);
|
436
|
+
await this.deleteFilterBarConfigCache(configName, resourceID);
|
414
437
|
return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
|
415
438
|
}
|
416
439
|
static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
@@ -419,6 +442,51 @@ class ConfigStorage {
|
|
419
442
|
static async validatePersonalizedFilter(dataUnitName, expression) {
|
420
443
|
return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
|
421
444
|
}
|
445
|
+
static async deleteGridConfigCache(name, resourceID) {
|
446
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
|
447
|
+
}
|
448
|
+
static async deleteFormConfigCache(name, resourceID) {
|
449
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
|
450
|
+
}
|
451
|
+
static async deleteFilterBarConfigCache(name, resourceID) {
|
452
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
|
453
|
+
}
|
454
|
+
static validateConfigName(configName, legacyConfigName) {
|
455
|
+
if (!configName)
|
456
|
+
throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
|
457
|
+
if (!legacyConfigName)
|
458
|
+
throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
|
459
|
+
}
|
460
|
+
static handleLegacyConfig(configName, configSource, urlParams) {
|
461
|
+
let legacyConfigName;
|
462
|
+
switch (configSource) {
|
463
|
+
case CONFIG_SOURCE.filterBar:
|
464
|
+
legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
465
|
+
break;
|
466
|
+
case CONFIG_SOURCE.grid:
|
467
|
+
legacyConfigName = this.gridLegacyConfig.get(configName);
|
468
|
+
break;
|
469
|
+
case CONFIG_SOURCE.form:
|
470
|
+
legacyConfigName = this.formLegacyConfig.get(configName);
|
471
|
+
}
|
472
|
+
const params = urlParams ? Object.assign({}, urlParams) : {};
|
473
|
+
if (legacyConfigName) {
|
474
|
+
params['legacyResourceID'] = legacyConfigName;
|
475
|
+
}
|
476
|
+
return params;
|
477
|
+
}
|
478
|
+
static handleLegacyConfigAsString(name, source) {
|
479
|
+
const params = this.handleLegacyConfig(name, source);
|
480
|
+
const legacyResourceID = params['legacyResourceID'];
|
481
|
+
if (legacyResourceID) {
|
482
|
+
name = name + `?legacyResourceID=${legacyResourceID}`;
|
483
|
+
}
|
484
|
+
return name;
|
485
|
+
}
|
486
|
+
static async deleteConfigCache(name, resourceID, source) {
|
487
|
+
const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
|
488
|
+
this.configById.delete(cacheID);
|
489
|
+
}
|
422
490
|
static buildCacheID(name, source, resourceID) {
|
423
491
|
if (name == undefined) {
|
424
492
|
return `req_${source}_${resourceID}`;
|
@@ -426,6 +494,11 @@ class ConfigStorage {
|
|
426
494
|
return `req_${source}_${name}_${resourceID}`;
|
427
495
|
}
|
428
496
|
}
|
497
|
+
ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
|
498
|
+
ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
|
499
|
+
ConfigStorage.filterBarLegacyConfig = new Map();
|
500
|
+
ConfigStorage.formLegacyConfig = new Map();
|
501
|
+
ConfigStorage.gridLegacyConfig = new Map();
|
429
502
|
ConfigStorage.configById = new Map();
|
430
503
|
ConfigStorage.filterBarConfigFetcher = new FilterBarConfigFetcher();
|
431
504
|
ConfigStorage.formConfigFetcher = new FormConfigFetcher();
|
@@ -6786,7 +6786,6 @@ class DataFetcher {
|
|
6786
6786
|
if (http.readyState == 4 && http.status == 200) {
|
6787
6787
|
try {
|
6788
6788
|
const jsonResp = JSON.parse(http.responseText);
|
6789
|
-
await this.processServiceBrokerClientEvents({ clientEvents: jsonResp === null || jsonResp === void 0 ? void 0 : jsonResp.clientEvents, serviceName, payloadJson, accept, reject });
|
6790
6789
|
/**
|
6791
6790
|
* Este trecho difere do projeto HTML5 devido à decisão de adotar uma abordagem síncrona para esta chamada. Isso é justificado pelo fato de que, no cenário em questão, a abordagem assíncrona teria impactos negativos.
|
6792
6791
|
*
|
@@ -6797,8 +6796,10 @@ class DataFetcher {
|
|
6797
6796
|
if (this.isServiceBrokerError(jsonResp)) {
|
6798
6797
|
reject(this.processServiceBrokerErrorInfo(jsonResp));
|
6799
6798
|
}
|
6800
|
-
else if (jsonResp.status == DataFetcher.SERVICE_BROKER_STATUS.SERVICE_CANCELED
|
6801
|
-
|
6799
|
+
else if (jsonResp.status == DataFetcher.SERVICE_BROKER_STATUS.SERVICE_CANCELED) {
|
6800
|
+
if (jsonResp.statusMessage) {
|
6801
|
+
console.debug(`[DataFetcher] ${jsonResp.statusMessage}`);
|
6802
|
+
}
|
6802
6803
|
}
|
6803
6804
|
else {
|
6804
6805
|
accept(jsonResp.responseBody);
|
@@ -6806,6 +6807,7 @@ class DataFetcher {
|
|
6806
6807
|
(_a = this.application) === null || _a === void 0 ? void 0 : _a.info(jsonResp.statusMessage);
|
6807
6808
|
}
|
6808
6809
|
}
|
6810
|
+
this.processServiceBrokerClientEvents({ clientEvents: jsonResp === null || jsonResp === void 0 ? void 0 : jsonResp.clientEvents, serviceName, payloadJson, accept, reject });
|
6809
6811
|
}
|
6810
6812
|
catch (err) {
|
6811
6813
|
console.warn(`Erro ao executar serviço: ${err}`);
|
@@ -3,6 +3,7 @@ var SaveErrorsEnum;
|
|
3
3
|
SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
|
4
4
|
SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
|
5
5
|
SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
|
6
|
+
SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
|
6
7
|
})(SaveErrorsEnum || (SaveErrorsEnum = {}));
|
7
8
|
|
8
9
|
export { SaveErrorsEnum as S };
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
1
|
+
import { C as ConfigStorage } from './ConfigStorage-101a2b4c.js';
|
2
2
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
3
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
3
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-f121f880.js';
|
4
4
|
|
5
5
|
class SnkFormConfigManager {
|
6
6
|
constructor(configName, resourceID, onConfigChange) {
|
@@ -8,6 +8,11 @@ class SnkFormConfigManager {
|
|
8
8
|
this._configName = configName;
|
9
9
|
this._onConfigChange = onConfigChange;
|
10
10
|
}
|
11
|
+
addFormLegacyConfig(legacyConfigName) {
|
12
|
+
if (this._configName) {
|
13
|
+
ConfigStorage.addFormLegacyConfig(this._configName, legacyConfigName);
|
14
|
+
}
|
15
|
+
}
|
11
16
|
async loadConfig() {
|
12
17
|
return new Promise(resolve => {
|
13
18
|
ConfigStorage.loadFormConfig(this._configName, this._resourceID)
|
@@ -93,16 +98,19 @@ class SnkFormConfigManager {
|
|
93
98
|
const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
|
94
99
|
return normalizedText.includes(normalizedFilter);
|
95
100
|
}
|
96
|
-
getInsertionConfig(dataUnit) {
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
if (
|
101
|
-
|
101
|
+
getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
|
102
|
+
let fields = this.getFieldsList(dataUnit);
|
103
|
+
if (ignoreReadOnlyFormFields) {
|
104
|
+
fields = fields.filter(field => {
|
105
|
+
if (dataUnit) {
|
106
|
+
const def = dataUnit.getField(field.name);
|
107
|
+
if (def && def.readOnly) {
|
108
|
+
return false;
|
109
|
+
}
|
102
110
|
}
|
103
|
-
|
104
|
-
|
105
|
-
}
|
111
|
+
return !field.readOnly;
|
112
|
+
});
|
113
|
+
}
|
106
114
|
return Object.assign(Object.assign({}, this._config), { fields });
|
107
115
|
}
|
108
116
|
setConfig(config) {
|
@@ -122,8 +130,8 @@ class SnkFormConfigManager {
|
|
122
130
|
this._onConfigChange(Object.assign({}, this._config));
|
123
131
|
}
|
124
132
|
}
|
125
|
-
getConfig(insertionMode, dataUnit) {
|
126
|
-
return insertionMode ? this.getInsertionConfig(dataUnit) : Object.assign({}, this._config);
|
133
|
+
getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
|
134
|
+
return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
|
127
135
|
}
|
128
136
|
getFormConfigFetcher() {
|
129
137
|
if (this._formConfigFetcher == undefined) {
|
@@ -286,7 +286,8 @@ const snkDataExporterMessages = {
|
|
286
286
|
},
|
287
287
|
message: {
|
288
288
|
emailSuccess: "E-mail enviado com sucesso",
|
289
|
-
exportError: "
|
289
|
+
exportError: "Falha ao exportar dados",
|
290
|
+
unknownFailure: "O motivo da falha não pode ser identificado.",
|
290
291
|
exportPermission: "O usuário não possui permissão para exportar o arquivo.",
|
291
292
|
},
|
292
293
|
title: {
|
@@ -351,11 +352,24 @@ const snkAttachMessages = {
|
|
351
352
|
anyLinkOrFileFilled: {
|
352
353
|
title: "Atenção",
|
353
354
|
message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
|
355
|
+
},
|
356
|
+
descriptionCannotBeChanged: {
|
357
|
+
title: "Atenção",
|
358
|
+
message: "O campo 'Descrição' não pode ser alterado."
|
354
359
|
}
|
355
360
|
},
|
356
361
|
taskbar: {
|
357
362
|
titleDownload: "Fazer download",
|
358
363
|
titleLink: "Abrir link",
|
364
|
+
},
|
365
|
+
attachMetadata: {
|
366
|
+
lblCode: "Código",
|
367
|
+
lblDescription: "Descrição",
|
368
|
+
lblFileOrLink: "Arquivo / Link",
|
369
|
+
lblUser: "Usuário",
|
370
|
+
lblDate: "Data de alteração",
|
371
|
+
lblFile: "Arquivo",
|
372
|
+
lblSubTitle: "Clique para selecionar um arquivo",
|
359
373
|
}
|
360
374
|
};
|
361
375
|
|