@sankhyalabs/sankhyablocks 8.15.0-dev.3 → 8.15.0-dev.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-0d507a8f.js → ConfigStorage-d4c99a5e.js} +27 -17
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-0ffd098d.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
- 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-0e663819.js → index-0922807b.js} +1 -0
- 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} +539 -9
- package/dist/cjs/snk-application.cjs.entry.js +98 -10
- package/dist/cjs/snk-attach.cjs.entry.js +398 -61
- package/dist/cjs/snk-crud.cjs.entry.js +15 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +11 -13
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +68 -11
- package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -4
- package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +8 -2
- package/dist/cjs/snk-form.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +53 -37
- package/dist/cjs/{snk-guides-viewer-7e87ffce.js → snk-guides-viewer-c7293cfa.js} +11 -13
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -11
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +166 -24
- package/dist/cjs/snk-taskbar.cjs.entry.js +91 -7
- package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-1e4fb2e0.js} +9 -9
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +111 -5
- package/dist/collection/components/snk-attach/snk-attach.js +194 -38
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +42 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-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 +5 -5
- 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/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 +84 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +175 -6
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
- package/dist/collection/components/snk-form/snk-form.js +1 -1
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
- package/dist/collection/components/snk-grid/snk-grid.js +79 -31
- 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-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.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +279 -15
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +18 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -8
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +129 -7
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/configs/ConfigStorage.js +24 -14
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +48 -29
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +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/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +25 -15
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkMessageBuilder.js +13 -0
- package/dist/components/dataunit-fetcher.js +91 -45
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- 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 +454 -68
- package/dist/components/snk-crud.js +9 -3
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-detail-view2.js +33 -8
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +71 -9
- package/dist/components/snk-filter-item2.js +3 -0
- package/dist/components/snk-filter-modal-item2.js +0 -1
- package/dist/components/snk-filter-modal.js +21 -3
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-form-config2.js +7 -1
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +51 -31
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +219 -25
- package/dist/components/snk-taskbar2.js +103 -15
- package/dist/components/taskbar-actions-button2.js +18 -2
- package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-39ed8aeb.js} +27 -17
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-dd450734.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
- 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-1564817d.js → index-0ece87a6.js} +1 -0
- 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} +538 -10
- package/dist/esm/snk-application.entry.js +98 -10
- package/dist/esm/snk-attach.entry.js +398 -61
- package/dist/esm/snk-crud.entry.js +15 -13
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +11 -13
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +68 -11
- package/dist/esm/snk-filter-item.entry.js +3 -0
- package/dist/esm/snk-filter-modal-item.entry.js +3 -4
- package/dist/esm/snk-filter-modal.entry.js +16 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +9 -3
- package/dist/esm/snk-form.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +54 -38
- package/dist/esm/{snk-guides-viewer-2134aba2.js → snk-guides-viewer-47443f7c.js} +11 -13
- package/dist/esm/snk-guides-viewer.entry.js +9 -11
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +166 -24
- package/dist/esm/snk-taskbar.entry.js +92 -8
- package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-846c027c.js} +9 -9
- package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/p-30735d1e.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/p-3c5b7cfc.entry.js +1 -0
- package/dist/sankhyablocks/p-3e2e2424.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-67aedbe0.js +56 -0
- package/dist/sankhyablocks/p-6ae58da0.js +1 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-746fc99e.entry.js} +1 -1
- package/dist/sankhyablocks/p-827e4b01.entry.js +1 -0
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
- package/dist/sankhyablocks/p-8c13d8d6.entry.js +1 -0
- package/dist/sankhyablocks/p-8c49760e.js +1 -0
- package/dist/sankhyablocks/p-99b1926b.entry.js +1 -0
- package/dist/sankhyablocks/p-9d608b62.entry.js +1 -0
- package/dist/sankhyablocks/{p-2028633c.js → p-9ea14b61.js} +1 -1
- package/dist/sankhyablocks/p-9fb97691.entry.js +1 -0
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b281e9e9.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-ec18c04e.entry.js +11 -0
- package/dist/sankhyablocks/p-eefe9954.entry.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
- package/dist/sankhyablocks/p-fca66dda.entry.js +1 -0
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-fdc4cb9b.entry.js} +1 -1
- package/dist/sankhyablocks/p-fe741404.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +12 -2
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -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 +19 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
- package/dist/types/components/snk-form/snk-form.d.ts +1 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +10 -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/snk-simple-crud.d.ts +56 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -1
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
- package/dist/types/components.d.ts +203 -23
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/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-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0cd2e986.entry.js +0 -1
- package/dist/sankhyablocks/p-145c4434.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-4396d1a6.js +0 -56
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-58218eb7.entry.js +0 -1
- package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
- package/dist/sankhyablocks/p-7915c452.entry.js +0 -1
- package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
- package/dist/sankhyablocks/p-a49b1019.entry.js +0 -1
- package/dist/sankhyablocks/p-a7923832.entry.js +0 -1
- package/dist/sankhyablocks/p-aaa1438e.entry.js +0 -1
- package/dist/sankhyablocks/p-b52c2175.js +0 -1
- package/dist/sankhyablocks/p-ba627e85.js +0 -60
- package/dist/sankhyablocks/p-bf9b7149.entry.js +0 -11
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-ca8e7da0.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.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}/SnkFormConfigManager.d.ts +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,22 +1,31 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
-
import {
|
2
|
+
import { StringUtils, ApplicationContext, ObjectUtils, DataType, UserInterface, JSUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
|
4
4
|
import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
|
5
5
|
import './DataFetcher.js';
|
6
6
|
import { I as InMemoryLoader } from './dataunit-fetcher.js';
|
7
|
+
import { S as SnkMultiSelectionListDataSource, T as TaskbarProcessor, b as buildFieldSearch, o as openFieldSearch, C as CrudUtils } from './field-search.js';
|
7
8
|
import { P as PresentationMode } from './index2.js';
|
8
|
-
import { d as defineCustomElement$
|
9
|
+
import { d as defineCustomElement$d } from './snk-actions-button2.js';
|
9
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
12
|
import './filter-item-type.enum.js';
|
12
13
|
import './form-config-fetcher.js';
|
13
|
-
import {
|
14
|
-
import {
|
15
|
-
import { d as defineCustomElement$
|
16
|
-
import { d as defineCustomElement$
|
14
|
+
import { C as ConfigStorage } from './ConfigStorage.js';
|
15
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
|
16
|
+
import { d as defineCustomElement$c } from './snk-config-options2.js';
|
17
|
+
import { d as defineCustomElement$b } from './snk-configurator2.js';
|
18
|
+
import { d as defineCustomElement$a } from './snk-data-exporter2.js';
|
19
|
+
import { d as defineCustomElement$9 } from './snk-data-unit2.js';
|
20
|
+
import { d as defineCustomElement$8 } from './snk-exporter-email-sender2.js';
|
21
|
+
import { d as defineCustomElement$7 } from './snk-field-config2.js';
|
22
|
+
import { d as defineCustomElement$6 } from './snk-form-config2.js';
|
23
|
+
import { d as defineCustomElement$5 } from './snk-grid-config2.js';
|
24
|
+
import { d as defineCustomElement$4 } from './snk-select-box2.js';
|
25
|
+
import { d as defineCustomElement$3 } from './snk-tab-config2.js';
|
17
26
|
import { d as defineCustomElement$1 } from './taskbar-actions-button2.js';
|
18
27
|
|
19
|
-
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
28
|
+
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
|
20
29
|
|
21
30
|
const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
22
31
|
constructor() {
|
@@ -26,20 +35,25 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
26
35
|
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
27
36
|
this.actionClick = createEvent(this, "actionClick", 7);
|
28
37
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
38
|
+
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
39
|
+
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
29
40
|
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
30
41
|
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
31
42
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
32
43
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
33
44
|
this._taskbarProcessor = new TaskbarProcessor({
|
34
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
35
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
36
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
37
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
45
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
|
46
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
|
47
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
|
48
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
|
38
49
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
39
50
|
});
|
51
|
+
this._showPopUpGridConfig = false;
|
52
|
+
this._showFormConfig = false;
|
40
53
|
this._currentViewMode = VIEW_MODE.GRID;
|
41
54
|
this._config = undefined;
|
42
55
|
this._fieldToGetFocus = undefined;
|
56
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
43
57
|
this.dataState = undefined;
|
44
58
|
this.dataUnit = undefined;
|
45
59
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
@@ -51,6 +65,22 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
51
65
|
this.taskbarManager = undefined;
|
52
66
|
this.messagesBuilder = undefined;
|
53
67
|
this.useEnterLikeTab = false;
|
68
|
+
this.actionsList = undefined;
|
69
|
+
this.configName = undefined;
|
70
|
+
this.showConfiguratorButtons = undefined;
|
71
|
+
}
|
72
|
+
getButtons(selected, changeModeBtn) {
|
73
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? this.REGULAR_DEFAULT_BTNS : this.REGULAR_SELECTED_BTNS)
|
74
|
+
.concat(changeModeBtn));
|
75
|
+
}
|
76
|
+
addConfigButton(buttons) {
|
77
|
+
if (this.configName === undefined) {
|
78
|
+
return buttons;
|
79
|
+
}
|
80
|
+
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
81
|
+
}
|
82
|
+
get application() {
|
83
|
+
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
54
84
|
}
|
55
85
|
resolveInMemoryBtns(taskbarButtons) {
|
56
86
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -70,7 +100,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
70
100
|
}
|
71
101
|
actionClickListener(evt) {
|
72
102
|
const act = evt.detail;
|
73
|
-
if (act === TaskbarElement.
|
103
|
+
if (act === TaskbarElement.CONFIGURATOR) {
|
104
|
+
this._snkConfigurator.open();
|
105
|
+
}
|
106
|
+
else if (act === TaskbarElement.GRID_MODE) {
|
74
107
|
this.goToView(VIEW_MODE.GRID);
|
75
108
|
}
|
76
109
|
else if (act === TaskbarElement.FORM_MODE) {
|
@@ -88,8 +121,64 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
88
121
|
this.dataStateChange.emit(newValue);
|
89
122
|
}
|
90
123
|
}
|
91
|
-
|
124
|
+
openConfig(viewMode) {
|
125
|
+
this._snkConfigurator.close();
|
126
|
+
if (viewMode === VIEW_MODE.GRID) {
|
127
|
+
this.openGridConfig();
|
128
|
+
}
|
129
|
+
else if (viewMode === VIEW_MODE.FORM) {
|
130
|
+
this.openFormConfig();
|
131
|
+
}
|
132
|
+
}
|
133
|
+
openGridConfig() {
|
134
|
+
this._grid.getColumnsState()
|
135
|
+
.then((gridColumns) => {
|
136
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
137
|
+
this._snkGridConfig.selectedIndex = 0;
|
138
|
+
this._showPopUpGridConfig = true;
|
139
|
+
});
|
140
|
+
}
|
141
|
+
openFormConfig() {
|
142
|
+
this._showFormConfig = true;
|
143
|
+
}
|
144
|
+
loadGridConfig() {
|
145
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
146
|
+
return;
|
147
|
+
}
|
148
|
+
this._gridConfigAlreadyLoaded = true;
|
149
|
+
return new Promise((accept, reject) => {
|
150
|
+
ConfigStorage.loadGridConfig(this.configName, this._resourceID)
|
151
|
+
.then(config => {
|
152
|
+
this.setGridConfig(config);
|
153
|
+
accept();
|
154
|
+
})
|
155
|
+
.catch(reason => {
|
156
|
+
reject(reason);
|
157
|
+
});
|
158
|
+
});
|
159
|
+
}
|
160
|
+
async loadFormConfig() {
|
161
|
+
if (this._formConfigManager == undefined) {
|
162
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
|
163
|
+
this._formConfigManager.setConfig(this.formConfig);
|
164
|
+
}
|
165
|
+
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
166
|
+
return;
|
167
|
+
}
|
168
|
+
this._formConfigAlreadyLoaded = true;
|
169
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
170
|
+
}
|
171
|
+
async componentWillRender() {
|
172
|
+
this._resourceID = await this.application.getResourceID();
|
92
173
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
174
|
+
if (this.configName === undefined) {
|
175
|
+
return;
|
176
|
+
}
|
177
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
178
|
+
return;
|
179
|
+
}
|
180
|
+
this.loadGridConfig();
|
181
|
+
this.loadFormConfig();
|
93
182
|
}
|
94
183
|
componentWillLoad() {
|
95
184
|
this.processMetadata();
|
@@ -97,8 +186,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
97
186
|
this.configDatasource();
|
98
187
|
}
|
99
188
|
configDatasource() {
|
100
|
-
|
101
|
-
this._multiSelectionListDataSource.setApplication(application);
|
189
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
102
190
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
103
191
|
}
|
104
192
|
getTaskBarId() {
|
@@ -139,6 +227,20 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
139
227
|
getRecords() {
|
140
228
|
return Promise.resolve(this.dataUnit.records);
|
141
229
|
}
|
230
|
+
/**
|
231
|
+
* Usado para abrir o configurator do CRUD
|
232
|
+
*/
|
233
|
+
async openConfigurator() {
|
234
|
+
var _a;
|
235
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
236
|
+
}
|
237
|
+
/**
|
238
|
+
* Usado para fechar o configurator do CRUD
|
239
|
+
*/
|
240
|
+
async closeConfigurator() {
|
241
|
+
var _a;
|
242
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
243
|
+
}
|
142
244
|
processMetadata() {
|
143
245
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
144
246
|
const fieldMetadata = [];
|
@@ -193,6 +295,14 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
193
295
|
this.dataUnit.clearSelection();
|
194
296
|
}
|
195
297
|
}
|
298
|
+
handleConfiguratorEvent(evt, type) {
|
299
|
+
evt.stopImmediatePropagation();
|
300
|
+
if (type === 'SAVE') {
|
301
|
+
this.configuratorSave.emit();
|
302
|
+
return;
|
303
|
+
}
|
304
|
+
this.configuratorCancel.emit();
|
305
|
+
}
|
196
306
|
getColumnSearch(actionButton, item) {
|
197
307
|
if (this._columnSearch != undefined) {
|
198
308
|
return this._columnSearch;
|
@@ -249,7 +359,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
249
359
|
}
|
250
360
|
getActionsList() {
|
251
361
|
var _a, _b;
|
252
|
-
|
362
|
+
const hardList = [{
|
253
363
|
value: StringUtils.generateUUID(),
|
254
364
|
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
|
255
365
|
disableCloseOnSelect: true,
|
@@ -258,6 +368,16 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
258
368
|
? this.getColumnSearch(actionButton, item)
|
259
369
|
: this.getFieldSearch(actionButton, item)
|
260
370
|
}];
|
371
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
372
|
+
const taskbarID = this.getTopTaskBarId();
|
373
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
374
|
+
}
|
375
|
+
return hardList.concat(this.actionsList);
|
376
|
+
}
|
377
|
+
getTopTaskBarId() {
|
378
|
+
var _a;
|
379
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
|
380
|
+
`snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
|
261
381
|
}
|
262
382
|
async keyDownListener(event) {
|
263
383
|
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
@@ -296,11 +416,42 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
296
416
|
disconnectedCallback() {
|
297
417
|
window.removeEventListener("keydown", this._keyDownHandler);
|
298
418
|
}
|
419
|
+
gridConfigChangeHandler(evt) {
|
420
|
+
const config = evt.detail;
|
421
|
+
ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
|
422
|
+
evt.stopPropagation();
|
423
|
+
}
|
424
|
+
modalConfigChangeHandler(evt) {
|
425
|
+
const config = evt.detail;
|
426
|
+
this._grid.setColumnsState(config.columns)
|
427
|
+
.then(() => {
|
428
|
+
this.setGridConfig(config);
|
429
|
+
this.closeGridConfig();
|
430
|
+
});
|
431
|
+
evt.stopPropagation();
|
432
|
+
}
|
433
|
+
setGridConfig(config) {
|
434
|
+
this.gridConfig = config;
|
435
|
+
CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
436
|
+
}
|
437
|
+
setFormConfig(config) {
|
438
|
+
this.formConfig = config;
|
439
|
+
}
|
440
|
+
closeGridConfig() {
|
441
|
+
this._showPopUpGridConfig = false;
|
442
|
+
}
|
443
|
+
closeFormConfig() {
|
444
|
+
this._showFormConfig = false;
|
445
|
+
}
|
446
|
+
/* istanbul ignore next */
|
299
447
|
render() {
|
300
|
-
var _a;
|
301
|
-
|
448
|
+
var _a, _b, _c;
|
449
|
+
if (this.dataUnit == undefined) {
|
450
|
+
return;
|
451
|
+
}
|
452
|
+
return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
302
453
|
? undefined
|
303
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { dataUnit: this.dataUnit, config: this.
|
454
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this._showFormConfig ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this._showFormConfig && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, 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("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, 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), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
|
304
455
|
}
|
305
456
|
get _element() { return this; }
|
306
457
|
static get watchers() { return {
|
@@ -312,27 +463,35 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
312
463
|
"dataState": [16],
|
313
464
|
"dataUnit": [16],
|
314
465
|
"mode": [2],
|
315
|
-
"gridConfig": [
|
466
|
+
"gridConfig": [1040],
|
316
467
|
"formConfig": [16],
|
317
468
|
"multipleSelection": [4, "multiple-selection"],
|
318
469
|
"useCancelConfirm": [4, "use-cancel-confirm"],
|
319
470
|
"taskbarManager": [16],
|
320
471
|
"messagesBuilder": [1040],
|
321
472
|
"useEnterLikeTab": [4, "use-enter-like-tab"],
|
473
|
+
"actionsList": [16],
|
474
|
+
"configName": [1025, "config-name"],
|
475
|
+
"showConfiguratorButtons": [4, "show-configurator-buttons"],
|
476
|
+
"_showPopUpGridConfig": [32],
|
477
|
+
"_showFormConfig": [32],
|
322
478
|
"_currentViewMode": [32],
|
323
479
|
"_config": [32],
|
324
480
|
"_fieldToGetFocus": [32],
|
481
|
+
"_customContainerId": [32],
|
325
482
|
"_formFields": [32],
|
326
483
|
"goToView": [64],
|
327
484
|
"setMetadata": [64],
|
328
485
|
"setRecords": [64],
|
329
|
-
"getRecords": [64]
|
486
|
+
"getRecords": [64],
|
487
|
+
"openConfigurator": [64],
|
488
|
+
"closeConfigurator": [64]
|
330
489
|
}, [[0, "actionClick", "actionClickListener"]]]);
|
331
490
|
function defineCustomElement() {
|
332
491
|
if (typeof customElements === "undefined") {
|
333
492
|
return;
|
334
493
|
}
|
335
|
-
const components = ["snk-simple-crud", "snk-actions-button", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-taskbar", "taskbar-actions-button"];
|
494
|
+
const components = ["snk-simple-crud", "snk-actions-button", "snk-config-options", "snk-configurator", "snk-data-exporter", "snk-data-unit", "snk-exporter-email-sender", "snk-field-config", "snk-form-config", "snk-grid-config", "snk-select-box", "snk-tab-config", "snk-taskbar", "taskbar-actions-button"];
|
336
495
|
components.forEach(tagName => { switch (tagName) {
|
337
496
|
case "snk-simple-crud":
|
338
497
|
if (!customElements.get(tagName)) {
|
@@ -341,20 +500,55 @@ function defineCustomElement() {
|
|
341
500
|
break;
|
342
501
|
case "snk-actions-button":
|
343
502
|
if (!customElements.get(tagName)) {
|
344
|
-
defineCustomElement$
|
503
|
+
defineCustomElement$d();
|
504
|
+
}
|
505
|
+
break;
|
506
|
+
case "snk-config-options":
|
507
|
+
if (!customElements.get(tagName)) {
|
508
|
+
defineCustomElement$c();
|
509
|
+
}
|
510
|
+
break;
|
511
|
+
case "snk-configurator":
|
512
|
+
if (!customElements.get(tagName)) {
|
513
|
+
defineCustomElement$b();
|
345
514
|
}
|
346
515
|
break;
|
347
516
|
case "snk-data-exporter":
|
348
517
|
if (!customElements.get(tagName)) {
|
349
|
-
defineCustomElement$
|
518
|
+
defineCustomElement$a();
|
350
519
|
}
|
351
520
|
break;
|
352
521
|
case "snk-data-unit":
|
353
522
|
if (!customElements.get(tagName)) {
|
354
|
-
defineCustomElement$
|
523
|
+
defineCustomElement$9();
|
355
524
|
}
|
356
525
|
break;
|
357
526
|
case "snk-exporter-email-sender":
|
527
|
+
if (!customElements.get(tagName)) {
|
528
|
+
defineCustomElement$8();
|
529
|
+
}
|
530
|
+
break;
|
531
|
+
case "snk-field-config":
|
532
|
+
if (!customElements.get(tagName)) {
|
533
|
+
defineCustomElement$7();
|
534
|
+
}
|
535
|
+
break;
|
536
|
+
case "snk-form-config":
|
537
|
+
if (!customElements.get(tagName)) {
|
538
|
+
defineCustomElement$6();
|
539
|
+
}
|
540
|
+
break;
|
541
|
+
case "snk-grid-config":
|
542
|
+
if (!customElements.get(tagName)) {
|
543
|
+
defineCustomElement$5();
|
544
|
+
}
|
545
|
+
break;
|
546
|
+
case "snk-select-box":
|
547
|
+
if (!customElements.get(tagName)) {
|
548
|
+
defineCustomElement$4();
|
549
|
+
}
|
550
|
+
break;
|
551
|
+
case "snk-tab-config":
|
358
552
|
if (!customElements.get(tagName)) {
|
359
553
|
defineCustomElement$3();
|
360
554
|
}
|
@@ -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
98
|
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--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,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
164
171
|
}
|
165
172
|
observeButtons() {
|
166
173
|
this._definitions = undefined;
|
174
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
167
175
|
}
|
168
176
|
// Internal methods
|
169
177
|
elementsFromString(strButtons) {
|
@@ -259,12 +267,19 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
259
267
|
}
|
260
268
|
const taskbarElement = TaskbarElement[def.toString()];
|
261
269
|
if (taskbarElement) {
|
262
|
-
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.
|
270
|
+
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
271
|
}
|
264
272
|
else {
|
265
273
|
return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
266
274
|
}
|
267
275
|
}
|
276
|
+
buildDynamicActionsList() {
|
277
|
+
var _a;
|
278
|
+
if (this._hiddenActionsList.length) {
|
279
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), { type: 'divider', label: "", value: "" }, ...this._hiddenActionsList];
|
280
|
+
}
|
281
|
+
return this.actionsList;
|
282
|
+
}
|
268
283
|
getIdElemBtnNative(taskbarElem) {
|
269
284
|
return StringUtils.toCamelCase(taskbarElem);
|
270
285
|
}
|
@@ -305,9 +320,11 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
305
320
|
});
|
306
321
|
}
|
307
322
|
addCustomElementContainer(elem) {
|
323
|
+
var _a;
|
308
324
|
const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
|
309
325
|
if (!this._customElementsId.includes(elementId)) {
|
310
326
|
this._customElementsId.push(elementId);
|
327
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
311
328
|
}
|
312
329
|
return h("span", { key: elementId, id: elementId });
|
313
330
|
}
|
@@ -344,15 +361,76 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
344
361
|
}
|
345
362
|
this.validatePresentationMode();
|
346
363
|
}
|
364
|
+
handleOverFlow(overFlowingElements) {
|
365
|
+
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
366
|
+
this.resetOverFlowedElements();
|
367
|
+
this.doOverFlowElements(elementsToHandle);
|
368
|
+
}
|
369
|
+
resetOverFlowedElements() {
|
370
|
+
this._overFlowedElements.forEach(element => {
|
371
|
+
element.classList.remove(OVERFLOWED_CLASS_NAME);
|
372
|
+
});
|
373
|
+
this._hiddenActionsList = [];
|
374
|
+
this._overFlowedElements = [];
|
375
|
+
}
|
376
|
+
doOverFlowElements(overFlowedElements) {
|
377
|
+
overFlowedElements.forEach(element => {
|
378
|
+
element.classList.add(OVERFLOWED_CLASS_NAME);
|
379
|
+
this._overFlowedElements.push(element);
|
380
|
+
this.addItemToActionList(element);
|
381
|
+
});
|
382
|
+
}
|
383
|
+
addItemToActionList(element) {
|
384
|
+
const taskbarElement = this.getTaskbarElementName(element);
|
385
|
+
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
386
|
+
const optionItem = {
|
387
|
+
value: taskbarElement,
|
388
|
+
label: this.getTaskbarElementLabel(element),
|
389
|
+
iconName: this.getTaskbarElementIcon(element)
|
390
|
+
};
|
391
|
+
this._hiddenActionsList.push(optionItem);
|
392
|
+
}
|
393
|
+
}
|
394
|
+
getTaskbarElementName(element) {
|
395
|
+
var _a;
|
396
|
+
return (_a = element.getAttribute('data-taskbar-element')) !== null && _a !== void 0 ? _a : "";
|
397
|
+
}
|
398
|
+
getTaskbarElementIcon(element) {
|
399
|
+
var _a;
|
400
|
+
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
401
|
+
}
|
402
|
+
getTaskbarElementLabel(element) {
|
403
|
+
var _a;
|
404
|
+
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
405
|
+
}
|
406
|
+
hasToIgnoreOverFlow(element) {
|
407
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
|
408
|
+
}
|
409
|
+
handleOverFlowStrategy() {
|
410
|
+
if (this.overflowStrategy === 'hiddenItems') {
|
411
|
+
this._overFlowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
412
|
+
}
|
413
|
+
}
|
414
|
+
buildOverFlowWatcherParams() {
|
415
|
+
return {
|
416
|
+
element: this._element,
|
417
|
+
callback: this.handleOverFlow.bind(this),
|
418
|
+
overFlowDirection: OverflowDirection.HORIZONTAL,
|
419
|
+
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
420
|
+
};
|
421
|
+
}
|
347
422
|
componentDidLoad() {
|
348
423
|
const dataInfo = { dataUnit: this.dataUnit };
|
349
424
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
425
|
+
this.handleOverFlowStrategy();
|
350
426
|
}
|
351
427
|
componentDidRender() {
|
352
428
|
this.appendCustomElementsInTaskbar();
|
353
429
|
}
|
354
430
|
disconnectedCallback() {
|
431
|
+
var _a;
|
355
432
|
this.unlinkAllCustomElements();
|
433
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
356
434
|
}
|
357
435
|
unlinkAllCustomElements() {
|
358
436
|
var _a;
|
@@ -370,8 +448,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
370
448
|
return undefined;
|
371
449
|
}
|
372
450
|
let index = 0;
|
373
|
-
return (h(Host,
|
374
|
-
var _a;
|
451
|
+
return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
452
|
+
var _a, _b;
|
375
453
|
if (elem === TaskbarElement.DIVIDER) {
|
376
454
|
index = 0;
|
377
455
|
}
|
@@ -387,8 +465,14 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
387
465
|
if (this._customElements.has(elem)) {
|
388
466
|
return this.addCustomElementContainer(elem);
|
389
467
|
}
|
468
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
390
469
|
return h("slot", { name: elem });
|
391
|
-
})), h("div", { class:
|
470
|
+
})), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))));
|
471
|
+
}
|
472
|
+
getHostClasses() {
|
473
|
+
if (this.overflowStrategy !== 'hiddenItems')
|
474
|
+
return 'no-wrap';
|
475
|
+
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
392
476
|
}
|
393
477
|
get _element() { return this; }
|
394
478
|
static get watchers() { return {
|
@@ -396,8 +480,10 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
396
480
|
}; }
|
397
481
|
static get style() { return snkTaskbarCss; }
|
398
482
|
}, [6, "snk-taskbar", {
|
483
|
+
"alignRigth": [4, "align-rigth"],
|
399
484
|
"customSlotId": [1, "custom-slot-id"],
|
400
485
|
"customContainerId": [1, "custom-container-id"],
|
486
|
+
"overflowStrategy": [1, "overflow-strategy"],
|
401
487
|
"configName": [1, "config-name"],
|
402
488
|
"resourceID": [1, "resource-i-d"],
|
403
489
|
"buttons": [1],
|
@@ -409,9 +495,11 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
409
495
|
"presentationMode": [1537, "presentation-mode"],
|
410
496
|
"messagesBuilder": [1040],
|
411
497
|
"_permissions": [32],
|
498
|
+
"_overFlowedElements": [32],
|
412
499
|
"_customElements": [32],
|
413
500
|
"_customElementsId": [32],
|
414
|
-
"_slotContainer": [32]
|
501
|
+
"_slotContainer": [32],
|
502
|
+
"_hiddenActionsList": [32]
|
415
503
|
}]);
|
416
504
|
function defineCustomElement() {
|
417
505
|
if (typeof customElements === "undefined") {
|