@sankhyalabs/sankhyablocks 8.15.0-dev.9 → 8.15.0-rc.10
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-302bbbd4.js → ConfigStorage-34be11ce.js} +70 -7
- 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-71c4768e.js → SnkFormConfigManager-6211fb28.js} +7 -2
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-141aa18d.js} +15 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-353e4af2.js → pesquisa-fetcher-94f6b316.js} +439 -39
- 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} +524 -8
- package/dist/cjs/snk-application.cjs.entry.js +44 -10
- package/dist/cjs/snk-attach.cjs.entry.js +392 -62
- package/dist/cjs/snk-crud.cjs.entry.js +17 -12
- package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -5
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-6026a9f7.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -12
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +44 -8
- package/dist/cjs/snk-filter-item.cjs.entry.js +4 -47
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
- package/dist/cjs/snk-form.cjs.entry.js +11 -4
- package/dist/cjs/snk-grid.cjs.entry.js +40 -22
- package/dist/cjs/{snk-guides-viewer-e60ccc5e.js → snk-guides-viewer-508bb6fe.js} +16 -11
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -10
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +229 -27
- package/dist/cjs/snk-taskbar.cjs.entry.js +100 -14
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-3ecd1278.js} +9 -9
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +85 -2
- package/dist/collection/components/snk-attach/snk-attach.js +188 -39
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +95 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +27 -3
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +6 -2
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +4 -47
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +137 -3
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +6 -1
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
- package/dist/collection/components/snk-grid/snk-grid.js +103 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +378 -18
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +4 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +139 -13
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- 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 +17 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +29 -22
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +11 -12
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +68 -5
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkFormConfigManager.js +5 -0
- package/dist/components/SnkMessageBuilder.js +15 -1
- package/dist/components/dataunit-fetcher.js +58 -38
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +41 -2
- package/dist/components/snk-attach2.js +448 -69
- package/dist/components/snk-crud.js +15 -3
- package/dist/components/snk-data-exporter2.js +6 -2
- package/dist/components/snk-detail-view2.js +40 -7
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +47 -6
- package/dist/components/snk-filter-item2.js +4 -47
- package/dist/components/snk-filter-modal.js +4 -2
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-form-config2.js +46 -26
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +41 -17
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +285 -29
- package/dist/components/snk-taskbar2.js +114 -24
- package/dist/components/taskbar-actions-button2.js +4 -2
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-101a2b4c.js} +70 -7
- 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-5c7d3771.js → SnkFormConfigManager-d86ba46f.js} +7 -2
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-9747ddd2.js} +15 -1
- package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-0fc935a0.js → pesquisa-fetcher-f05a12ca.js} +429 -31
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +523 -9
- package/dist/esm/snk-application.entry.js +43 -9
- package/dist/esm/snk-attach.entry.js +392 -62
- package/dist/esm/snk-crud.entry.js +17 -12
- package/dist/esm/snk-data-exporter.entry.js +9 -5
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-4c343635.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +10 -12
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +44 -8
- package/dist/esm/snk-filter-item.entry.js +4 -47
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-modal.entry.js +2 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +48 -28
- package/dist/esm/snk-form.entry.js +11 -4
- package/dist/esm/snk-grid.entry.js +41 -23
- package/dist/esm/{snk-guides-viewer-98a8e45e.js → snk-guides-viewer-18859840.js} +16 -11
- package/dist/esm/snk-guides-viewer.entry.js +8 -10
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +229 -27
- package/dist/esm/snk-taskbar.entry.js +101 -15
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
- package/dist/sankhyablocks/p-1f3174cb.entry.js +1 -0
- package/dist/sankhyablocks/p-1fa5a18c.entry.js +11 -0
- package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/{p-ff6064e7.js → p-2936303b.js} +1 -1
- package/dist/sankhyablocks/p-2b909f08.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-5c0b53ce.js +56 -0
- package/dist/sankhyablocks/p-5dbc1a3f.js +1 -0
- package/dist/sankhyablocks/p-60fa6c7a.js +1 -0
- package/dist/sankhyablocks/p-64c1b368.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-6b28cc74.entry.js} +1 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-7ddd95b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
- package/dist/sankhyablocks/p-7f97fee2.entry.js +1 -0
- package/dist/sankhyablocks/p-86801b08.entry.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-9a5d1b39.js} +1 -1
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b41a622a.entry.js +1 -0
- package/dist/sankhyablocks/p-b4de81ac.entry.js +1 -0
- package/dist/sankhyablocks/p-ba4871b5.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-d01ceda6.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d304659d.entry.js +1 -0
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-e4fb3308.entry.js +1 -0
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +15 -0
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +27 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -2
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +24 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
- package/dist/types/components/snk-form/snk-form.d.ts +6 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +1 -0
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +20 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +71 -4
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +28 -1
- package/dist/types/components.d.ts +265 -12
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +13 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-1d75d9f9.entry.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-41560fd8.entry.js +0 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-573a07c5.js +0 -1
- package/dist/sankhyablocks/p-6678d5d4.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-71439fd9.entry.js +0 -1
- package/dist/sankhyablocks/p-761ed32f.entry.js +0 -1
- package/dist/sankhyablocks/p-7d8d7fe9.entry.js +0 -1
- package/dist/sankhyablocks/p-90f9b4db.entry.js +0 -11
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a91bb13d.js +0 -1
- package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
- package/dist/sankhyablocks/p-aa95fb2c.js +0 -56
- package/dist/sankhyablocks/p-abfa8101.entry.js +0 -1
- package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
- package/dist/sankhyablocks/p-b3020263.entry.js +0 -1
- package/dist/sankhyablocks/p-bf93a748.js +0 -60
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c6f89389.entry.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-cebae710.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/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -1,26 +1,29 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-a7d3d3f1.js';
|
2
|
-
import {
|
2
|
+
import { StringUtils, ApplicationContext, ObjectUtils, DataType, UserInterface, JSUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { d as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants-8457af36.js';
|
4
|
-
import { T as TaskbarElement } from './taskbar-elements-
|
5
|
-
import './DataFetcher-
|
6
|
-
import './pesquisa-fetcher-
|
4
|
+
import { T as TaskbarElement } from './taskbar-elements-2473c8ac.js';
|
5
|
+
import './DataFetcher-a650ae58.js';
|
6
|
+
import { I as InMemoryLoader } from './pesquisa-fetcher-f05a12ca.js';
|
7
|
+
import { S as SnkMultiSelectionListDataSource, C as CrudUtils } from './SnkMultiSelectionListDataSource-7e7eada5.js';
|
7
8
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
8
|
-
import './ISave-
|
9
|
+
import './ISave-d8c8bc59.js';
|
9
10
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
11
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import { I as InMemoryLoader } from './dataunit-fetcher-0fc935a0.js';
|
12
|
-
import './PreloadManager-c1c2f2b4.js';
|
13
12
|
import './filter-item-type.enum-d45e026f.js';
|
14
|
-
import './form-config-fetcher-
|
13
|
+
import './form-config-fetcher-f121f880.js';
|
15
14
|
import { T as TaskbarProcessor, b as buildFieldSearch, o as openFieldSearch } from './field-search-efbe307f.js';
|
16
|
-
import {
|
15
|
+
import { C as ConfigStorage } from './ConfigStorage-101a2b4c.js';
|
16
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-d86ba46f.js';
|
17
17
|
import './index-bdf75557.js';
|
18
18
|
import './PrintUtils-3e4ff0f5.js';
|
19
|
-
import './ResourceIDUtils-a114189a.js';
|
20
19
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
20
|
+
import './ResourceIDUtils-a114189a.js';
|
21
21
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
22
22
|
|
23
|
-
const
|
23
|
+
const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
24
|
+
const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
25
|
+
|
26
|
+
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}";
|
24
27
|
|
25
28
|
const SnkSimpleCrud = class {
|
26
29
|
constructor(hostRef) {
|
@@ -29,20 +32,23 @@ const SnkSimpleCrud = class {
|
|
29
32
|
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
30
33
|
this.actionClick = createEvent(this, "actionClick", 7);
|
31
34
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
32
|
-
this.
|
33
|
-
this.
|
35
|
+
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
36
|
+
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
34
37
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
35
38
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
36
39
|
this._taskbarProcessor = new TaskbarProcessor({
|
37
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
38
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
39
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
40
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
40
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
|
41
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
|
42
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
|
43
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
|
41
44
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
42
45
|
});
|
46
|
+
this._showPopUpGridConfig = false;
|
47
|
+
this._showFormConfig = false;
|
43
48
|
this._currentViewMode = VIEW_MODE.GRID;
|
44
49
|
this._config = undefined;
|
45
50
|
this._fieldToGetFocus = undefined;
|
51
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
46
52
|
this.dataState = undefined;
|
47
53
|
this.dataUnit = undefined;
|
48
54
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
@@ -54,6 +60,24 @@ const SnkSimpleCrud = class {
|
|
54
60
|
this.taskbarManager = undefined;
|
55
61
|
this.messagesBuilder = undefined;
|
56
62
|
this.useEnterLikeTab = false;
|
63
|
+
this.actionsList = undefined;
|
64
|
+
this.configName = undefined;
|
65
|
+
this.showConfiguratorButtons = undefined;
|
66
|
+
this.gridLegacyConfigName = undefined;
|
67
|
+
this.formLegacyConfigName = undefined;
|
68
|
+
}
|
69
|
+
getButtons(selected, changeModeBtn) {
|
70
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
|
71
|
+
.concat(changeModeBtn));
|
72
|
+
}
|
73
|
+
addConfigButton(buttons) {
|
74
|
+
if (this.configName === undefined) {
|
75
|
+
return buttons;
|
76
|
+
}
|
77
|
+
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
78
|
+
}
|
79
|
+
get application() {
|
80
|
+
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
57
81
|
}
|
58
82
|
resolveInMemoryBtns(taskbarButtons) {
|
59
83
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -73,7 +97,10 @@ const SnkSimpleCrud = class {
|
|
73
97
|
}
|
74
98
|
actionClickListener(evt) {
|
75
99
|
const act = evt.detail;
|
76
|
-
if (act === TaskbarElement.
|
100
|
+
if (act === TaskbarElement.CONFIGURATOR) {
|
101
|
+
this._snkConfigurator.open();
|
102
|
+
}
|
103
|
+
else if (act === TaskbarElement.GRID_MODE) {
|
77
104
|
this.goToView(VIEW_MODE.GRID);
|
78
105
|
}
|
79
106
|
else if (act === TaskbarElement.FORM_MODE) {
|
@@ -91,8 +118,111 @@ const SnkSimpleCrud = class {
|
|
91
118
|
this.dataStateChange.emit(newValue);
|
92
119
|
}
|
93
120
|
}
|
94
|
-
|
121
|
+
async observeFormLegacy() {
|
122
|
+
await this.handleUpdateFormLegacyConfig();
|
123
|
+
}
|
124
|
+
async observeGridLegacy() {
|
125
|
+
await this.handleUpdateGridLegacyConfig();
|
126
|
+
}
|
127
|
+
async handleUpdateGridLegacyConfig() {
|
128
|
+
if (this.gridLegacyConfigName) {
|
129
|
+
this.addGridLegacyConfigName();
|
130
|
+
if (this._gridConfigAlreadyLoaded) {
|
131
|
+
await this.loadGridConfig(true);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
async handleUpdateFormLegacyConfig() {
|
136
|
+
var _a, _b, _c;
|
137
|
+
if (this.formLegacyConfigName) {
|
138
|
+
const legacyConfig = await this.fetchFormLegacyConfig();
|
139
|
+
if (!legacyConfig)
|
140
|
+
return;
|
141
|
+
const rawFields = (_c = (_b = (_a = legacyConfig === null || legacyConfig === void 0 ? void 0 : legacyConfig.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
|
142
|
+
const fields = Array.isArray(rawFields) ? rawFields : [rawFields];
|
143
|
+
const newConfig = { emptyConfig: false, fields: fields };
|
144
|
+
this.setFormConfig(newConfig, true);
|
145
|
+
this._formConfigManager.setConfig(this.formConfig);
|
146
|
+
}
|
147
|
+
}
|
148
|
+
async fetchFormLegacyConfig() {
|
149
|
+
const payload = {
|
150
|
+
'requestBody': {
|
151
|
+
'config': {
|
152
|
+
'chave': this.formLegacyConfigName,
|
153
|
+
'tipo': 'T',
|
154
|
+
},
|
155
|
+
},
|
156
|
+
};
|
157
|
+
return await this.application.callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
|
158
|
+
}
|
159
|
+
openConfig(viewMode) {
|
160
|
+
this._snkConfigurator.close();
|
161
|
+
if (viewMode === VIEW_MODE.GRID) {
|
162
|
+
this.openGridConfig();
|
163
|
+
}
|
164
|
+
else if (viewMode === VIEW_MODE.FORM) {
|
165
|
+
this.openFormConfig();
|
166
|
+
}
|
167
|
+
}
|
168
|
+
openGridConfig() {
|
169
|
+
this._grid.getColumnsState()
|
170
|
+
.then((gridColumns) => {
|
171
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
172
|
+
this._snkGridConfig.selectedIndex = 0;
|
173
|
+
this._showPopUpGridConfig = true;
|
174
|
+
});
|
175
|
+
}
|
176
|
+
openFormConfig() {
|
177
|
+
//No momento não daremos suporte para configuraçao de formulário quando houver legacy config
|
178
|
+
if (this.formLegacyConfigName)
|
179
|
+
return;
|
180
|
+
this._showFormConfig = true;
|
181
|
+
}
|
182
|
+
addGridLegacyConfigName() {
|
183
|
+
if (this.gridLegacyConfigName && this.configName) {
|
184
|
+
ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
|
185
|
+
}
|
186
|
+
}
|
187
|
+
loadGridConfig(forceUpdate) {
|
188
|
+
if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
this._gridConfigAlreadyLoaded = true;
|
192
|
+
return new Promise((accept, reject) => {
|
193
|
+
ConfigStorage.loadGridConfig(this.configName, this._resourceID)
|
194
|
+
.then(config => {
|
195
|
+
this.setGridConfig(config);
|
196
|
+
accept();
|
197
|
+
})
|
198
|
+
.catch(reason => {
|
199
|
+
reject(reason);
|
200
|
+
});
|
201
|
+
});
|
202
|
+
}
|
203
|
+
async loadFormConfig() {
|
204
|
+
if (this._formConfigManager == undefined) {
|
205
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
|
206
|
+
this._formConfigManager.setConfig(this.formConfig);
|
207
|
+
}
|
208
|
+
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
209
|
+
return;
|
210
|
+
}
|
211
|
+
this._formConfigAlreadyLoaded = true;
|
212
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
213
|
+
}
|
214
|
+
async componentWillRender() {
|
215
|
+
this._resourceID = await this.application.getResourceID();
|
95
216
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
217
|
+
if (this.configName === undefined) {
|
218
|
+
return;
|
219
|
+
}
|
220
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
221
|
+
return;
|
222
|
+
}
|
223
|
+
await this.addGridLegacyConfigName();
|
224
|
+
this.loadGridConfig();
|
225
|
+
this.loadFormConfig();
|
96
226
|
}
|
97
227
|
componentWillLoad() {
|
98
228
|
this.processMetadata();
|
@@ -100,8 +230,7 @@ const SnkSimpleCrud = class {
|
|
100
230
|
this.configDatasource();
|
101
231
|
}
|
102
232
|
configDatasource() {
|
103
|
-
|
104
|
-
this._multiSelectionListDataSource.setApplication(application);
|
233
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
105
234
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
106
235
|
}
|
107
236
|
getTaskBarId() {
|
@@ -142,6 +271,20 @@ const SnkSimpleCrud = class {
|
|
142
271
|
getRecords() {
|
143
272
|
return Promise.resolve(this.dataUnit.records);
|
144
273
|
}
|
274
|
+
/**
|
275
|
+
* Usado para abrir o configurator do CRUD
|
276
|
+
*/
|
277
|
+
async openConfigurator() {
|
278
|
+
var _a;
|
279
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
280
|
+
}
|
281
|
+
/**
|
282
|
+
* Usado para fechar o configurator do CRUD
|
283
|
+
*/
|
284
|
+
async closeConfigurator() {
|
285
|
+
var _a;
|
286
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
287
|
+
}
|
145
288
|
processMetadata() {
|
146
289
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
147
290
|
const fieldMetadata = [];
|
@@ -196,6 +339,14 @@ const SnkSimpleCrud = class {
|
|
196
339
|
this.dataUnit.clearSelection();
|
197
340
|
}
|
198
341
|
}
|
342
|
+
handleConfiguratorEvent(evt, type) {
|
343
|
+
evt.stopImmediatePropagation();
|
344
|
+
if (type === 'SAVE') {
|
345
|
+
this.configuratorSave.emit();
|
346
|
+
return;
|
347
|
+
}
|
348
|
+
this.configuratorCancel.emit();
|
349
|
+
}
|
199
350
|
getColumnSearch(actionButton, item) {
|
200
351
|
if (this._columnSearch != undefined) {
|
201
352
|
return this._columnSearch;
|
@@ -237,7 +388,9 @@ const SnkSimpleCrud = class {
|
|
237
388
|
return (_b = (_a = this.formConfig) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : this._formFields;
|
238
389
|
}
|
239
390
|
handleFormSetFields(fields) {
|
240
|
-
this._formFields
|
391
|
+
if (!ObjectUtils.equals(this._formFields, fields)) {
|
392
|
+
this._formFields = fields !== null && fields !== void 0 ? fields : [];
|
393
|
+
}
|
241
394
|
}
|
242
395
|
fieldsOptionLoader(argument) {
|
243
396
|
const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
|
@@ -252,7 +405,7 @@ const SnkSimpleCrud = class {
|
|
252
405
|
}
|
253
406
|
getActionsList() {
|
254
407
|
var _a, _b;
|
255
|
-
|
408
|
+
const hardList = [{
|
256
409
|
value: StringUtils.generateUUID(),
|
257
410
|
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
|
258
411
|
disableCloseOnSelect: true,
|
@@ -261,6 +414,16 @@ const SnkSimpleCrud = class {
|
|
261
414
|
? this.getColumnSearch(actionButton, item)
|
262
415
|
: this.getFieldSearch(actionButton, item)
|
263
416
|
}];
|
417
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
418
|
+
const taskbarID = this.getTopTaskBarId();
|
419
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
420
|
+
}
|
421
|
+
return hardList.concat(this.actionsList);
|
422
|
+
}
|
423
|
+
getTopTaskBarId() {
|
424
|
+
var _a;
|
425
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
|
426
|
+
`snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
|
264
427
|
}
|
265
428
|
async keyDownListener(event) {
|
266
429
|
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
@@ -299,16 +462,55 @@ const SnkSimpleCrud = class {
|
|
299
462
|
disconnectedCallback() {
|
300
463
|
window.removeEventListener("keydown", this._keyDownHandler);
|
301
464
|
}
|
465
|
+
gridConfigChangeHandler(evt) {
|
466
|
+
const config = evt.detail;
|
467
|
+
ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
|
468
|
+
evt.stopPropagation();
|
469
|
+
}
|
470
|
+
modalConfigChangeHandler(evt) {
|
471
|
+
const config = evt.detail;
|
472
|
+
this._grid.setColumnsState(config.columns)
|
473
|
+
.then(() => {
|
474
|
+
this.setGridConfig(config);
|
475
|
+
this.closeGridConfig();
|
476
|
+
});
|
477
|
+
evt.stopPropagation();
|
478
|
+
}
|
479
|
+
setGridConfig(config) {
|
480
|
+
this.gridConfig = config;
|
481
|
+
CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
482
|
+
}
|
483
|
+
setFormConfig(config, forceUpdate) {
|
484
|
+
if (this.formConfig && !forceUpdate)
|
485
|
+
return;
|
486
|
+
this.formConfig = config;
|
487
|
+
}
|
488
|
+
closeGridConfig() {
|
489
|
+
this._showPopUpGridConfig = false;
|
490
|
+
}
|
491
|
+
closeFormConfig() {
|
492
|
+
this._showFormConfig = false;
|
493
|
+
}
|
494
|
+
//No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
|
495
|
+
handleShowFormConfig() {
|
496
|
+
return this._showFormConfig && !this.formLegacyConfigName;
|
497
|
+
}
|
498
|
+
/* istanbul ignore next */
|
302
499
|
render() {
|
303
|
-
var _a;
|
304
|
-
|
500
|
+
var _a, _b, _c;
|
501
|
+
if (this.dataUnit == undefined) {
|
502
|
+
return;
|
503
|
+
}
|
504
|
+
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)
|
305
505
|
? undefined
|
306
|
-
: 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.
|
506
|
+
: 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.handleShowFormConfig() ? "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.handleShowFormConfig() && 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 }))));
|
307
507
|
}
|
308
508
|
get _element() { return getElement(this); }
|
309
509
|
static get watchers() { return {
|
310
510
|
"mode": ["onModeChange"],
|
311
|
-
"dataState": ["observeDataState"]
|
511
|
+
"dataState": ["observeDataState"],
|
512
|
+
"formLegacyConfigName": ["observeFormLegacy"],
|
513
|
+
"gridLegacyConfigName": ["observeGridLegacy"]
|
312
514
|
}; }
|
313
515
|
};
|
314
516
|
SnkSimpleCrud.style = snkSimpleCrudCss;
|
@@ -1,17 +1,20 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
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-dcbd207a.js';
|
4
|
-
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-
|
4
|
+
import { T as TaskbarElement, V as VisibleWhenForbidden, A as AuthorizationElements, b as buildElem, a as buildCustomButton } from './taskbar-elements-2473c8ac.js';
|
5
5
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
6
6
|
import './index-bdf75557.js';
|
7
7
|
|
8
|
-
const snkTaskbarCss = ".sc-snk-taskbar-h{display:flex}";
|
8
|
+
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}";
|
9
9
|
|
10
10
|
const SnkTaskbar = class {
|
11
11
|
constructor(hostRef) {
|
12
12
|
registerInstance(this, hostRef);
|
13
13
|
this.actionClick = createEvent(this, "actionClick", 7);
|
14
14
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
15
|
+
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
16
|
+
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
17
|
+
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
15
18
|
this._titleKeyByElement = {
|
16
19
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
17
20
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -29,11 +32,15 @@ const SnkTaskbar = class {
|
|
29
32
|
[TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
30
33
|
};
|
31
34
|
this._permissions = undefined;
|
35
|
+
this._overFlowedElements = [];
|
32
36
|
this._customElements = undefined;
|
33
37
|
this._customElementsId = undefined;
|
34
38
|
this._slotContainer = undefined;
|
39
|
+
this._hiddenActionsList = [];
|
40
|
+
this.alignRigth = false;
|
35
41
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
36
42
|
this.customContainerId = undefined;
|
43
|
+
this.overflowStrategy = 'hiddenItems';
|
37
44
|
this.configName = undefined;
|
38
45
|
this.resourceID = undefined;
|
39
46
|
this.buttons = undefined;
|
@@ -47,6 +54,13 @@ const SnkTaskbar = class {
|
|
47
54
|
}
|
48
55
|
observeButtons() {
|
49
56
|
this._definitions = undefined;
|
57
|
+
requestAnimationFrame(() => {
|
58
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
59
|
+
});
|
60
|
+
}
|
61
|
+
observeDisabledButtons() {
|
62
|
+
var _a;
|
63
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
|
50
64
|
}
|
51
65
|
// Internal methods
|
52
66
|
elementsFromString(strButtons) {
|
@@ -142,12 +156,19 @@ const SnkTaskbar = class {
|
|
142
156
|
}
|
143
157
|
const taskbarElement = TaskbarElement[def.toString()];
|
144
158
|
if (taskbarElement) {
|
145
|
-
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.
|
159
|
+
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);
|
146
160
|
}
|
147
161
|
else {
|
148
162
|
return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
149
163
|
}
|
150
164
|
}
|
165
|
+
buildDynamicActionsList() {
|
166
|
+
var _a;
|
167
|
+
if (this._hiddenActionsList.length) {
|
168
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), { type: 'divider', label: "", value: "" }, ...this._hiddenActionsList];
|
169
|
+
}
|
170
|
+
return this.actionsList;
|
171
|
+
}
|
151
172
|
getIdElemBtnNative(taskbarElem) {
|
152
173
|
return StringUtils.toCamelCase(taskbarElem);
|
153
174
|
}
|
@@ -188,11 +209,13 @@ const SnkTaskbar = class {
|
|
188
209
|
});
|
189
210
|
}
|
190
211
|
addCustomElementContainer(elem) {
|
212
|
+
var _a;
|
191
213
|
const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
|
192
214
|
if (!this._customElementsId.includes(elementId)) {
|
193
215
|
this._customElementsId.push(elementId);
|
216
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
194
217
|
}
|
195
|
-
return h("span", { key: elementId, id: elementId });
|
218
|
+
return h("span", { class: "ez-padding-left--medium", key: elementId, id: elementId });
|
196
219
|
}
|
197
220
|
getCustomElements() {
|
198
221
|
var _a, _b;
|
@@ -227,15 +250,76 @@ const SnkTaskbar = class {
|
|
227
250
|
}
|
228
251
|
this.validatePresentationMode();
|
229
252
|
}
|
253
|
+
handleOverFlow(overFlowingElements) {
|
254
|
+
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
255
|
+
this.resetOverFlowedElements();
|
256
|
+
this.doOverFlowElements(elementsToHandle);
|
257
|
+
}
|
258
|
+
resetOverFlowedElements() {
|
259
|
+
this._overFlowedElements.forEach(element => {
|
260
|
+
element.classList.remove(OVERFLOWED_CLASS_NAME);
|
261
|
+
});
|
262
|
+
this._hiddenActionsList = [];
|
263
|
+
this._overFlowedElements = [];
|
264
|
+
}
|
265
|
+
doOverFlowElements(overFlowedElements) {
|
266
|
+
overFlowedElements.forEach(element => {
|
267
|
+
element.classList.add(OVERFLOWED_CLASS_NAME);
|
268
|
+
this._overFlowedElements.push(element);
|
269
|
+
this.addItemToActionList(element);
|
270
|
+
});
|
271
|
+
}
|
272
|
+
addItemToActionList(element) {
|
273
|
+
const taskbarElement = this.getTaskbarElementName(element);
|
274
|
+
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
275
|
+
const optionItem = {
|
276
|
+
value: taskbarElement,
|
277
|
+
label: this.getTaskbarElementLabel(element),
|
278
|
+
iconName: this.getTaskbarElementIcon(element)
|
279
|
+
};
|
280
|
+
this._hiddenActionsList.push(optionItem);
|
281
|
+
}
|
282
|
+
}
|
283
|
+
getTaskbarElementName(element) {
|
284
|
+
var _a;
|
285
|
+
return (_a = element.getAttribute('data-taskbar-element')) !== null && _a !== void 0 ? _a : "";
|
286
|
+
}
|
287
|
+
getTaskbarElementIcon(element) {
|
288
|
+
var _a;
|
289
|
+
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
290
|
+
}
|
291
|
+
getTaskbarElementLabel(element) {
|
292
|
+
var _a;
|
293
|
+
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
294
|
+
}
|
295
|
+
hasToIgnoreOverFlow(element) {
|
296
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
|
297
|
+
}
|
298
|
+
handleOverFlowStrategy() {
|
299
|
+
if (this.overflowStrategy === 'hiddenItems') {
|
300
|
+
this._overFlowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
301
|
+
}
|
302
|
+
}
|
303
|
+
buildOverFlowWatcherParams() {
|
304
|
+
return {
|
305
|
+
element: this._element,
|
306
|
+
callback: this.handleOverFlow.bind(this),
|
307
|
+
overFlowDirection: OverflowDirection.HORIZONTAL,
|
308
|
+
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
309
|
+
};
|
310
|
+
}
|
230
311
|
componentDidLoad() {
|
231
312
|
const dataInfo = { dataUnit: this.dataUnit };
|
232
313
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
314
|
+
this.handleOverFlowStrategy();
|
233
315
|
}
|
234
316
|
componentDidRender() {
|
235
317
|
this.appendCustomElementsInTaskbar();
|
236
318
|
}
|
237
319
|
disconnectedCallback() {
|
320
|
+
var _a;
|
238
321
|
this.unlinkAllCustomElements();
|
322
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
239
323
|
}
|
240
324
|
unlinkAllCustomElements() {
|
241
325
|
var _a;
|
@@ -253,14 +337,9 @@ const SnkTaskbar = class {
|
|
253
337
|
return undefined;
|
254
338
|
}
|
255
339
|
let index = 0;
|
256
|
-
return (h(Host,
|
257
|
-
var _a;
|
258
|
-
|
259
|
-
index = 0;
|
260
|
-
}
|
261
|
-
else {
|
262
|
-
index++;
|
263
|
-
}
|
340
|
+
return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
341
|
+
var _a, _b;
|
342
|
+
index++;
|
264
343
|
if (TaskbarElement[elem]) {
|
265
344
|
return this.getElement(index, TaskbarElement[elem]);
|
266
345
|
}
|
@@ -270,12 +349,19 @@ const SnkTaskbar = class {
|
|
270
349
|
if (this._customElements.has(elem)) {
|
271
350
|
return this.addCustomElementContainer(elem);
|
272
351
|
}
|
352
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
273
353
|
return h("slot", { name: elem });
|
274
|
-
})), h("div", { class:
|
354
|
+
})), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))));
|
355
|
+
}
|
356
|
+
getHostClasses() {
|
357
|
+
if (this.overflowStrategy !== 'hiddenItems')
|
358
|
+
return 'no-wrap';
|
359
|
+
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
275
360
|
}
|
276
361
|
get _element() { return getElement(this); }
|
277
362
|
static get watchers() { return {
|
278
|
-
"buttons": ["observeButtons"]
|
363
|
+
"buttons": ["observeButtons"],
|
364
|
+
"disabledButtons": ["observeDisabledButtons"]
|
279
365
|
}; }
|
280
366
|
};
|
281
367
|
SnkTaskbar.style = snkTaskbarCss;
|
@@ -87,31 +87,31 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
87
87
|
case TaskbarElement.CONFIGURATOR:
|
88
88
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
89
89
|
case TaskbarElement.MORE_OPTIONS:
|
90
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
90
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
91
91
|
case TaskbarElement.DIVIDER:
|
92
|
-
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-
|
92
|
+
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
93
93
|
case TaskbarElement.DATA_EXPORTER:
|
94
94
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
95
|
-
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
95
|
+
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
96
96
|
case TaskbarElement.ATTACH:
|
97
97
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
98
98
|
case TaskbarElement.ACTIONS_BUTTON:
|
99
|
-
return h("snk-actions-button", { "data-element-id": dataElementId });
|
99
|
+
return h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
100
100
|
}
|
101
101
|
};
|
102
102
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
103
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
103
|
+
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) });
|
104
104
|
}
|
105
105
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
106
|
-
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) });
|
106
|
+
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) });
|
107
107
|
}
|
108
108
|
function iconTextButton(iconName, 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-icon": iconName, "data-taskbar-element": name, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
110
110
|
h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
111
111
|
}
|
112
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
112
|
+
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
113
113
|
return actions && actions.length > 0
|
114
|
-
? h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
114
|
+
? 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) })
|
115
115
|
: undefined;
|
116
116
|
}
|
117
117
|
|