@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
@@ -5,26 +5,26 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const constants = require('./constants-35ddd366.js');
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
9
|
-
require('./DataFetcher-
|
10
|
-
require('./pesquisa-fetcher-
|
11
|
-
const
|
12
|
-
require('./
|
8
|
+
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
9
|
+
require('./DataFetcher-99f0f6ed.js');
|
10
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
|
11
|
+
const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
|
12
|
+
const index$1 = require('./index-0922807b.js');
|
13
|
+
require('./ISave-e91b70a7.js');
|
13
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
-
const dataunitFetcher = require('./dataunit-fetcher-de65b9fc.js');
|
16
|
-
require('./PreloadManager-84466da6.js');
|
17
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
|
-
require('./form-config-fetcher-
|
17
|
+
require('./form-config-fetcher-9f1a13ca.js');
|
19
18
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
20
|
-
const
|
19
|
+
const ConfigStorage = require('./ConfigStorage-d4c99a5e.js');
|
20
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-0ffd098d.js');
|
21
21
|
require('./index-102ba62d.js');
|
22
22
|
require('./PrintUtils-bcaeb82f.js');
|
23
|
-
require('./ResourceIDUtils-5ff86aa7.js');
|
24
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
24
|
+
require('./ResourceIDUtils-5ff86aa7.js');
|
25
25
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
26
26
|
|
27
|
-
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}";
|
27
|
+
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}";
|
28
28
|
|
29
29
|
const SnkSimpleCrud = class {
|
30
30
|
constructor(hostRef) {
|
@@ -33,20 +33,25 @@ const SnkSimpleCrud = class {
|
|
33
33
|
this.dataUnitReady = index.createEvent(this, "dataUnitReady", 3);
|
34
34
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
35
35
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
36
|
+
this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
|
37
|
+
this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
|
36
38
|
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
37
39
|
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
38
40
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource.SnkMultiSelectionListDataSource();
|
39
41
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
40
42
|
this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
|
41
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
42
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
43
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
44
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
43
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, taskbarElements.TaskbarElement.GRID_MODE),
|
44
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, taskbarElements.TaskbarElement.FORM_MODE),
|
45
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, taskbarElements.TaskbarElement.GRID_MODE),
|
46
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, taskbarElements.TaskbarElement.FORM_MODE),
|
45
47
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
46
48
|
});
|
49
|
+
this._showPopUpGridConfig = false;
|
50
|
+
this._showFormConfig = false;
|
47
51
|
this._currentViewMode = constants.VIEW_MODE.GRID;
|
48
52
|
this._config = undefined;
|
49
53
|
this._fieldToGetFocus = undefined;
|
54
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
50
55
|
this.dataState = undefined;
|
51
56
|
this.dataUnit = undefined;
|
52
57
|
this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
|
@@ -58,6 +63,22 @@ const SnkSimpleCrud = class {
|
|
58
63
|
this.taskbarManager = undefined;
|
59
64
|
this.messagesBuilder = undefined;
|
60
65
|
this.useEnterLikeTab = false;
|
66
|
+
this.actionsList = undefined;
|
67
|
+
this.configName = undefined;
|
68
|
+
this.showConfiguratorButtons = undefined;
|
69
|
+
}
|
70
|
+
getButtons(selected, changeModeBtn) {
|
71
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? this.REGULAR_DEFAULT_BTNS : this.REGULAR_SELECTED_BTNS)
|
72
|
+
.concat(changeModeBtn));
|
73
|
+
}
|
74
|
+
addConfigButton(buttons) {
|
75
|
+
if (this.configName === undefined) {
|
76
|
+
return buttons;
|
77
|
+
}
|
78
|
+
return buttons.concat(taskbarElements.TaskbarElement.CONFIGURATOR);
|
79
|
+
}
|
80
|
+
get application() {
|
81
|
+
return core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
61
82
|
}
|
62
83
|
resolveInMemoryBtns(taskbarButtons) {
|
63
84
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -77,7 +98,10 @@ const SnkSimpleCrud = class {
|
|
77
98
|
}
|
78
99
|
actionClickListener(evt) {
|
79
100
|
const act = evt.detail;
|
80
|
-
if (act === taskbarElements.TaskbarElement.
|
101
|
+
if (act === taskbarElements.TaskbarElement.CONFIGURATOR) {
|
102
|
+
this._snkConfigurator.open();
|
103
|
+
}
|
104
|
+
else if (act === taskbarElements.TaskbarElement.GRID_MODE) {
|
81
105
|
this.goToView(constants.VIEW_MODE.GRID);
|
82
106
|
}
|
83
107
|
else if (act === taskbarElements.TaskbarElement.FORM_MODE) {
|
@@ -95,8 +119,64 @@ const SnkSimpleCrud = class {
|
|
95
119
|
this.dataStateChange.emit(newValue);
|
96
120
|
}
|
97
121
|
}
|
98
|
-
|
122
|
+
openConfig(viewMode) {
|
123
|
+
this._snkConfigurator.close();
|
124
|
+
if (viewMode === constants.VIEW_MODE.GRID) {
|
125
|
+
this.openGridConfig();
|
126
|
+
}
|
127
|
+
else if (viewMode === constants.VIEW_MODE.FORM) {
|
128
|
+
this.openFormConfig();
|
129
|
+
}
|
130
|
+
}
|
131
|
+
openGridConfig() {
|
132
|
+
this._grid.getColumnsState()
|
133
|
+
.then((gridColumns) => {
|
134
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
135
|
+
this._snkGridConfig.selectedIndex = 0;
|
136
|
+
this._showPopUpGridConfig = true;
|
137
|
+
});
|
138
|
+
}
|
139
|
+
openFormConfig() {
|
140
|
+
this._showFormConfig = true;
|
141
|
+
}
|
142
|
+
loadGridConfig() {
|
143
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
144
|
+
return;
|
145
|
+
}
|
146
|
+
this._gridConfigAlreadyLoaded = true;
|
147
|
+
return new Promise((accept, reject) => {
|
148
|
+
ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this._resourceID)
|
149
|
+
.then(config => {
|
150
|
+
this.setGridConfig(config);
|
151
|
+
accept();
|
152
|
+
})
|
153
|
+
.catch(reason => {
|
154
|
+
reject(reason);
|
155
|
+
});
|
156
|
+
});
|
157
|
+
}
|
158
|
+
async loadFormConfig() {
|
159
|
+
if (this._formConfigManager == undefined) {
|
160
|
+
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
|
161
|
+
this._formConfigManager.setConfig(this.formConfig);
|
162
|
+
}
|
163
|
+
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
164
|
+
return;
|
165
|
+
}
|
166
|
+
this._formConfigAlreadyLoaded = true;
|
167
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
168
|
+
}
|
169
|
+
async componentWillRender() {
|
170
|
+
this._resourceID = await this.application.getResourceID();
|
99
171
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
172
|
+
if (this.configName === undefined) {
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
176
|
+
return;
|
177
|
+
}
|
178
|
+
this.loadGridConfig();
|
179
|
+
this.loadFormConfig();
|
100
180
|
}
|
101
181
|
componentWillLoad() {
|
102
182
|
this.processMetadata();
|
@@ -104,8 +184,7 @@ const SnkSimpleCrud = class {
|
|
104
184
|
this.configDatasource();
|
105
185
|
}
|
106
186
|
configDatasource() {
|
107
|
-
|
108
|
-
this._multiSelectionListDataSource.setApplication(application);
|
187
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
109
188
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
110
189
|
}
|
111
190
|
getTaskBarId() {
|
@@ -121,7 +200,7 @@ const SnkSimpleCrud = class {
|
|
121
200
|
return this._currentViewMode === constants.VIEW_MODE.GRID ? "snkSimpleCrudTaskbar.grid_regular" : "snkSimpleCrudTaskbar.form_regular";
|
122
201
|
}
|
123
202
|
initInMemoryDataUnit() {
|
124
|
-
this._inMemoryLoader = new
|
203
|
+
this._inMemoryLoader = new pesquisaFetcher.InMemoryLoader(this._metadata);
|
125
204
|
this.dataUnit = this._inMemoryLoader.dataUnit;
|
126
205
|
this.dataUnitReady.emit(this.dataUnit);
|
127
206
|
}
|
@@ -146,6 +225,20 @@ const SnkSimpleCrud = class {
|
|
146
225
|
getRecords() {
|
147
226
|
return Promise.resolve(this.dataUnit.records);
|
148
227
|
}
|
228
|
+
/**
|
229
|
+
* Usado para abrir o configurator do CRUD
|
230
|
+
*/
|
231
|
+
async openConfigurator() {
|
232
|
+
var _a;
|
233
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
234
|
+
}
|
235
|
+
/**
|
236
|
+
* Usado para fechar o configurator do CRUD
|
237
|
+
*/
|
238
|
+
async closeConfigurator() {
|
239
|
+
var _a;
|
240
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
241
|
+
}
|
149
242
|
processMetadata() {
|
150
243
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
151
244
|
const fieldMetadata = [];
|
@@ -200,6 +293,14 @@ const SnkSimpleCrud = class {
|
|
200
293
|
this.dataUnit.clearSelection();
|
201
294
|
}
|
202
295
|
}
|
296
|
+
handleConfiguratorEvent(evt, type) {
|
297
|
+
evt.stopImmediatePropagation();
|
298
|
+
if (type === 'SAVE') {
|
299
|
+
this.configuratorSave.emit();
|
300
|
+
return;
|
301
|
+
}
|
302
|
+
this.configuratorCancel.emit();
|
303
|
+
}
|
203
304
|
getColumnSearch(actionButton, item) {
|
204
305
|
if (this._columnSearch != undefined) {
|
205
306
|
return this._columnSearch;
|
@@ -256,7 +357,7 @@ const SnkSimpleCrud = class {
|
|
256
357
|
}
|
257
358
|
getActionsList() {
|
258
359
|
var _a, _b;
|
259
|
-
|
360
|
+
const hardList = [{
|
260
361
|
value: core.StringUtils.generateUUID(),
|
261
362
|
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
|
262
363
|
disableCloseOnSelect: true,
|
@@ -265,6 +366,16 @@ const SnkSimpleCrud = class {
|
|
265
366
|
? this.getColumnSearch(actionButton, item)
|
266
367
|
: this.getFieldSearch(actionButton, item)
|
267
368
|
}];
|
369
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
370
|
+
const taskbarID = this.getTopTaskBarId();
|
371
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
372
|
+
}
|
373
|
+
return hardList.concat(this.actionsList);
|
374
|
+
}
|
375
|
+
getTopTaskBarId() {
|
376
|
+
var _a;
|
377
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${index$1.PresentationMode.PRIMARY}` :
|
378
|
+
`snkGridTopTaskbar.regular${index$1.PresentationMode.PRIMARY}`;
|
268
379
|
}
|
269
380
|
async keyDownListener(event) {
|
270
381
|
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
@@ -303,11 +414,42 @@ const SnkSimpleCrud = class {
|
|
303
414
|
disconnectedCallback() {
|
304
415
|
window.removeEventListener("keydown", this._keyDownHandler);
|
305
416
|
}
|
417
|
+
gridConfigChangeHandler(evt) {
|
418
|
+
const config = evt.detail;
|
419
|
+
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
|
420
|
+
evt.stopPropagation();
|
421
|
+
}
|
422
|
+
modalConfigChangeHandler(evt) {
|
423
|
+
const config = evt.detail;
|
424
|
+
this._grid.setColumnsState(config.columns)
|
425
|
+
.then(() => {
|
426
|
+
this.setGridConfig(config);
|
427
|
+
this.closeGridConfig();
|
428
|
+
});
|
429
|
+
evt.stopPropagation();
|
430
|
+
}
|
431
|
+
setGridConfig(config) {
|
432
|
+
this.gridConfig = config;
|
433
|
+
SnkMultiSelectionListDataSource.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
434
|
+
}
|
435
|
+
setFormConfig(config) {
|
436
|
+
this.formConfig = config;
|
437
|
+
}
|
438
|
+
closeGridConfig() {
|
439
|
+
this._showPopUpGridConfig = false;
|
440
|
+
}
|
441
|
+
closeFormConfig() {
|
442
|
+
this._showFormConfig = false;
|
443
|
+
}
|
444
|
+
/* istanbul ignore next */
|
306
445
|
render() {
|
307
|
-
var _a;
|
308
|
-
|
446
|
+
var _a, _b, _c;
|
447
|
+
if (this.dataUnit == undefined) {
|
448
|
+
return;
|
449
|
+
}
|
450
|
+
return (index.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(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, index.h("header", null, index.h("slot", { name: "snkSimpleCrudHeader" })), index.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index.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: index$1.PresentationMode.SECONDARY }, index.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index.h("stack-item", null, index.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(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(pesquisaFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
309
451
|
? undefined
|
310
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.h("ez-form", { dataUnit: this.dataUnit, config: this.
|
452
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, index.h("div", { slot: "footer" }, index.h("slot", { name: "snkSimpleCrudFooter" })))), index.h("stack-item", null, index.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 && index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index.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 })), index.h("div", { id: `${this._customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }))), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
|
311
453
|
}
|
312
454
|
get _element() { return index.getElement(this); }
|
313
455
|
static get watchers() { return {
|
@@ -5,17 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
8
|
-
const taskbarElements = require('./taskbar-elements-
|
9
|
-
const index$1 = require('./index-
|
8
|
+
const taskbarElements = require('./taskbar-elements-1e4fb2e0.js');
|
9
|
+
const index$1 = require('./index-0922807b.js');
|
10
10
|
require('./index-102ba62d.js');
|
11
11
|
|
12
|
-
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
12
|
+
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}";
|
13
13
|
|
14
14
|
const SnkTaskbar = class {
|
15
15
|
constructor(hostRef) {
|
16
16
|
index.registerInstance(this, hostRef);
|
17
17
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
18
18
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
19
|
+
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
20
|
+
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
21
|
+
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
19
22
|
this._titleKeyByElement = {
|
20
23
|
[taskbarElements.TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
21
24
|
[taskbarElements.TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -33,11 +36,15 @@ const SnkTaskbar = class {
|
|
33
36
|
[taskbarElements.TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
34
37
|
};
|
35
38
|
this._permissions = undefined;
|
39
|
+
this._overFlowedElements = [];
|
36
40
|
this._customElements = undefined;
|
37
41
|
this._customElementsId = undefined;
|
38
42
|
this._slotContainer = undefined;
|
43
|
+
this._hiddenActionsList = [];
|
44
|
+
this.alignRigth = false;
|
39
45
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
40
46
|
this.customContainerId = undefined;
|
47
|
+
this.overflowStrategy = 'hiddenItems';
|
41
48
|
this.configName = undefined;
|
42
49
|
this.resourceID = undefined;
|
43
50
|
this.buttons = undefined;
|
@@ -51,6 +58,7 @@ const SnkTaskbar = class {
|
|
51
58
|
}
|
52
59
|
observeButtons() {
|
53
60
|
this._definitions = undefined;
|
61
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
54
62
|
}
|
55
63
|
// Internal methods
|
56
64
|
elementsFromString(strButtons) {
|
@@ -146,12 +154,19 @@ const SnkTaskbar = class {
|
|
146
154
|
}
|
147
155
|
const taskbarElement = taskbarElements.TaskbarElement[def.toString()];
|
148
156
|
if (taskbarElement) {
|
149
|
-
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.
|
157
|
+
return taskbarElements.buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), this.configName, this.presentationMode);
|
150
158
|
}
|
151
159
|
else {
|
152
160
|
return taskbarElements.buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
153
161
|
}
|
154
162
|
}
|
163
|
+
buildDynamicActionsList() {
|
164
|
+
var _a;
|
165
|
+
if (this._hiddenActionsList.length) {
|
166
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), { type: 'divider', label: "", value: "" }, ...this._hiddenActionsList];
|
167
|
+
}
|
168
|
+
return this.actionsList;
|
169
|
+
}
|
155
170
|
getIdElemBtnNative(taskbarElem) {
|
156
171
|
return core.StringUtils.toCamelCase(taskbarElem);
|
157
172
|
}
|
@@ -192,9 +207,11 @@ const SnkTaskbar = class {
|
|
192
207
|
});
|
193
208
|
}
|
194
209
|
addCustomElementContainer(elem) {
|
210
|
+
var _a;
|
195
211
|
const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
|
196
212
|
if (!this._customElementsId.includes(elementId)) {
|
197
213
|
this._customElementsId.push(elementId);
|
214
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
198
215
|
}
|
199
216
|
return index.h("span", { key: elementId, id: elementId });
|
200
217
|
}
|
@@ -231,15 +248,76 @@ const SnkTaskbar = class {
|
|
231
248
|
}
|
232
249
|
this.validatePresentationMode();
|
233
250
|
}
|
251
|
+
handleOverFlow(overFlowingElements) {
|
252
|
+
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
253
|
+
this.resetOverFlowedElements();
|
254
|
+
this.doOverFlowElements(elementsToHandle);
|
255
|
+
}
|
256
|
+
resetOverFlowedElements() {
|
257
|
+
this._overFlowedElements.forEach(element => {
|
258
|
+
element.classList.remove(core.OVERFLOWED_CLASS_NAME);
|
259
|
+
});
|
260
|
+
this._hiddenActionsList = [];
|
261
|
+
this._overFlowedElements = [];
|
262
|
+
}
|
263
|
+
doOverFlowElements(overFlowedElements) {
|
264
|
+
overFlowedElements.forEach(element => {
|
265
|
+
element.classList.add(core.OVERFLOWED_CLASS_NAME);
|
266
|
+
this._overFlowedElements.push(element);
|
267
|
+
this.addItemToActionList(element);
|
268
|
+
});
|
269
|
+
}
|
270
|
+
addItemToActionList(element) {
|
271
|
+
const taskbarElement = this.getTaskbarElementName(element);
|
272
|
+
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
273
|
+
const optionItem = {
|
274
|
+
value: taskbarElement,
|
275
|
+
label: this.getTaskbarElementLabel(element),
|
276
|
+
iconName: this.getTaskbarElementIcon(element)
|
277
|
+
};
|
278
|
+
this._hiddenActionsList.push(optionItem);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
getTaskbarElementName(element) {
|
282
|
+
var _a;
|
283
|
+
return (_a = element.getAttribute('data-taskbar-element')) !== null && _a !== void 0 ? _a : "";
|
284
|
+
}
|
285
|
+
getTaskbarElementIcon(element) {
|
286
|
+
var _a;
|
287
|
+
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
288
|
+
}
|
289
|
+
getTaskbarElementLabel(element) {
|
290
|
+
var _a;
|
291
|
+
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
292
|
+
}
|
293
|
+
hasToIgnoreOverFlow(element) {
|
294
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
|
295
|
+
}
|
296
|
+
handleOverFlowStrategy() {
|
297
|
+
if (this.overflowStrategy === 'hiddenItems') {
|
298
|
+
this._overFlowWatcher = new core.OverflowWatcher(this.buildOverFlowWatcherParams());
|
299
|
+
}
|
300
|
+
}
|
301
|
+
buildOverFlowWatcherParams() {
|
302
|
+
return {
|
303
|
+
element: this._element,
|
304
|
+
callback: this.handleOverFlow.bind(this),
|
305
|
+
overFlowDirection: core.OverflowDirection.HORIZONTAL,
|
306
|
+
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
307
|
+
};
|
308
|
+
}
|
234
309
|
componentDidLoad() {
|
235
310
|
const dataInfo = { dataUnit: this.dataUnit };
|
236
311
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
312
|
+
this.handleOverFlowStrategy();
|
237
313
|
}
|
238
314
|
componentDidRender() {
|
239
315
|
this.appendCustomElementsInTaskbar();
|
240
316
|
}
|
241
317
|
disconnectedCallback() {
|
318
|
+
var _a;
|
242
319
|
this.unlinkAllCustomElements();
|
320
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
243
321
|
}
|
244
322
|
unlinkAllCustomElements() {
|
245
323
|
var _a;
|
@@ -257,8 +335,8 @@ const SnkTaskbar = class {
|
|
257
335
|
return undefined;
|
258
336
|
}
|
259
337
|
let index$1 = 0;
|
260
|
-
return (index.h(index.Host,
|
261
|
-
var _a;
|
338
|
+
return (index.h(index.Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
339
|
+
var _a, _b;
|
262
340
|
if (elem === taskbarElements.TaskbarElement.DIVIDER) {
|
263
341
|
index$1 = 0;
|
264
342
|
}
|
@@ -274,8 +352,14 @@ const SnkTaskbar = class {
|
|
274
352
|
if (this._customElements.has(elem)) {
|
275
353
|
return this.addCustomElementContainer(elem);
|
276
354
|
}
|
355
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
277
356
|
return index.h("slot", { name: elem });
|
278
|
-
})), index.h("div", { class:
|
357
|
+
})), index.h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, index.h("slot", { name: this.customSlotId }))));
|
358
|
+
}
|
359
|
+
getHostClasses() {
|
360
|
+
if (this.overflowStrategy !== 'hiddenItems')
|
361
|
+
return 'no-wrap';
|
362
|
+
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
279
363
|
}
|
280
364
|
get _element() { return index.getElement(this); }
|
281
365
|
static get watchers() { return {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
4
|
-
const index$2 = require('./index-
|
4
|
+
const index$2 = require('./index-0922807b.js');
|
5
5
|
const index$1 = require('./index-102ba62d.js');
|
6
6
|
|
7
7
|
exports.TaskbarElement = void 0;
|
@@ -89,31 +89,31 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
89
89
|
case exports.TaskbarElement.CONFIGURATOR:
|
90
90
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
91
91
|
case exports.TaskbarElement.MORE_OPTIONS:
|
92
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
92
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
93
93
|
case exports.TaskbarElement.DIVIDER:
|
94
94
|
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
95
95
|
case exports.TaskbarElement.DATA_EXPORTER:
|
96
96
|
const provider = (_a = index$1.store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
97
|
-
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
97
|
+
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
98
98
|
case exports.TaskbarElement.ATTACH:
|
99
99
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
100
100
|
case exports.TaskbarElement.ACTIONS_BUTTON:
|
101
|
-
return index.h("snk-actions-button", { "data-element-id": dataElementId });
|
101
|
+
return index.h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
102
102
|
}
|
103
103
|
};
|
104
104
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
105
|
-
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
105
|
+
return index.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) });
|
106
106
|
}
|
107
107
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
108
|
-
return index.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) });
|
108
|
+
return index.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) });
|
109
109
|
}
|
110
110
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
111
|
-
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
111
|
+
return index.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) },
|
112
112
|
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
113
113
|
}
|
114
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
114
|
+
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
115
115
|
return actions && actions.length > 0
|
116
|
-
? index.h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
116
|
+
? index.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) })
|
117
117
|
: undefined;
|
118
118
|
}
|
119
119
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
"./components/snk-data-unit/snk-data-unit.js",
|
6
6
|
"./components/snk-taskbar/snk-taskbar.js",
|
7
7
|
"./components/snk-filter-bar/filter-list/snk-filter-list.js",
|
8
|
-
"./components/snk-
|
8
|
+
"./components/snk-print-selector/snk-print-selector.js",
|
9
9
|
"./components/snk-actions-button/snk-actions-button.js",
|
10
10
|
"./components/snk-actions-button/subcomponents/snk-actions-form.js",
|
11
11
|
"./components/snk-actions-button/subcomponents/snk-client-confirm.js",
|
@@ -34,12 +34,13 @@
|
|
34
34
|
"./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
|
35
35
|
"./components/snk-filter-field-search/snk-filter-field-search.js",
|
36
36
|
"./components/snk-form/snk-form.js",
|
37
|
-
"./components/snk-form/subcomponents/snk-config
|
38
|
-
"./components/snk-form
|
39
|
-
"./components/snk-form/subcomponents/snk-
|
37
|
+
"./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
|
38
|
+
"./components/snk-form-config/snk-form-config.js",
|
39
|
+
"./components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js",
|
40
|
+
"./components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js",
|
40
41
|
"./components/snk-grid/snk-grid.js",
|
41
|
-
"./components/snk-grid
|
42
|
-
"./components/snk-grid/
|
42
|
+
"./components/snk-grid-config/snk-grid-config.js",
|
43
|
+
"./components/snk-grid-config/snk-select-box/snk-select-box.js",
|
43
44
|
"./components/snk-personalized-filter/snk-personalized-filter.js",
|
44
45
|
"./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
|
45
46
|
"./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
|
@@ -47,7 +48,6 @@
|
|
47
48
|
"./components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js",
|
48
49
|
"./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
|
49
50
|
"./components/snk-pesquisa/snk-pesquisa.js",
|
50
|
-
"./components/snk-print-selector/snk-print-selector.js",
|
51
51
|
"./components/snk-simple-bar/snk-simple-bar.js",
|
52
52
|
"./components/snk-simple-crud/snk-simple-crud.js",
|
53
53
|
"./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
|