@sankhyalabs/sankhyablocks 8.15.0-dev.3 → 8.15.0-dev.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-0d507a8f.js → ConfigStorage-d4c99a5e.js} +27 -17
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-467907f6.js → SnkFormConfigManager-0ffd098d.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-e7dcf408.js} +13 -0
- package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-de65b9fc.js → pesquisa-fetcher-94f6b316.js} +472 -46
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +539 -9
- package/dist/cjs/snk-application.cjs.entry.js +98 -10
- package/dist/cjs/snk-attach.cjs.entry.js +398 -61
- package/dist/cjs/snk-crud.cjs.entry.js +15 -13
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-82c08a8c.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +11 -13
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +68 -11
- package/dist/cjs/snk-filter-item.cjs.entry.js +3 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -4
- package/dist/cjs/snk-filter-modal.cjs.entry.js +16 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +8 -2
- package/dist/cjs/snk-form.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +53 -37
- package/dist/cjs/{snk-guides-viewer-7e87ffce.js → snk-guides-viewer-c7293cfa.js} +11 -13
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -11
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +4 -4
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +166 -24
- package/dist/cjs/snk-taskbar.cjs.entry.js +91 -7
- package/dist/cjs/{taskbar-elements-b8c428a9.js → taskbar-elements-1e4fb2e0.js} +9 -9
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +111 -5
- package/dist/collection/components/snk-attach/snk-attach.js +194 -38
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +42 -4
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +5 -5
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +3 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +84 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +0 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +175 -6
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +5 -1
- package/dist/collection/components/snk-form/snk-form.js +1 -1
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +11 -5
- package/dist/collection/components/snk-grid/snk-grid.js +79 -31
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +279 -15
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +18 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +8 -8
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +129 -7
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/configs/ConfigStorage.js +24 -14
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +48 -29
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +11 -12
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +25 -15
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkMessageBuilder.js +13 -0
- package/dist/components/dataunit-fetcher.js +91 -45
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index2.js +1 -0
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +94 -3
- package/dist/components/snk-attach2.js +454 -68
- package/dist/components/snk-crud.js +9 -3
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-detail-view2.js +33 -8
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +71 -9
- package/dist/components/snk-filter-item2.js +3 -0
- package/dist/components/snk-filter-modal-item2.js +0 -1
- package/dist/components/snk-filter-modal.js +21 -3
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-form-config2.js +7 -1
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +51 -31
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +219 -25
- package/dist/components/snk-taskbar2.js +103 -15
- package/dist/components/taskbar-actions-button2.js +18 -2
- package/dist/esm/{ConfigStorage-379a9cba.js → ConfigStorage-39ed8aeb.js} +27 -17
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-587e9030.js → SnkFormConfigManager-dd450734.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0fb796b9.js} +13 -0
- package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-e218c6d2.js → pesquisa-fetcher-f05a12ca.js} +462 -38
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +538 -10
- package/dist/esm/snk-application.entry.js +98 -10
- package/dist/esm/snk-attach.entry.js +398 -61
- package/dist/esm/snk-crud.entry.js +15 -13
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-5d201fb3.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +11 -13
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +68 -11
- package/dist/esm/snk-filter-item.entry.js +3 -0
- package/dist/esm/snk-filter-modal-item.entry.js +3 -4
- package/dist/esm/snk-filter-modal.entry.js +16 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +9 -3
- package/dist/esm/snk-form.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +54 -38
- package/dist/esm/{snk-guides-viewer-2134aba2.js → snk-guides-viewer-47443f7c.js} +11 -13
- package/dist/esm/snk-guides-viewer.entry.js +9 -11
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +4 -4
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +166 -24
- package/dist/esm/snk-taskbar.entry.js +92 -8
- package/dist/esm/{taskbar-elements-26c981af.js → taskbar-elements-846c027c.js} +9 -9
- package/dist/sankhyablocks/{p-ff6064e7.js → p-05243555.js} +1 -1
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/p-30735d1e.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/p-3c5b7cfc.entry.js +1 -0
- package/dist/sankhyablocks/p-3e2e2424.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-67aedbe0.js +56 -0
- package/dist/sankhyablocks/p-6ae58da0.js +1 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-729f5f5b.entry.js → p-746fc99e.entry.js} +1 -1
- package/dist/sankhyablocks/p-827e4b01.entry.js +1 -0
- package/dist/sankhyablocks/{p-6977a26c.entry.js → p-86801b08.entry.js} +1 -1
- package/dist/sankhyablocks/p-8c13d8d6.entry.js +1 -0
- package/dist/sankhyablocks/p-8c49760e.js +1 -0
- package/dist/sankhyablocks/p-99b1926b.entry.js +1 -0
- package/dist/sankhyablocks/p-9d608b62.entry.js +1 -0
- package/dist/sankhyablocks/{p-2028633c.js → p-9ea14b61.js} +1 -1
- package/dist/sankhyablocks/p-9fb97691.entry.js +1 -0
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b281e9e9.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-c4874327.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-ec18c04e.entry.js +11 -0
- package/dist/sankhyablocks/p-eefe9954.entry.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-f3d1c48e.js} +1 -1
- package/dist/sankhyablocks/p-fca66dda.entry.js +1 -0
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-fdc4cb9b.entry.js} +1 -1
- package/dist/sankhyablocks/p-fe741404.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +12 -2
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +28 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +19 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +7 -1
- package/dist/types/components/snk-form/snk-form.d.ts +1 -1
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +4 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +10 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +56 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +27 -1
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +1 -0
- package/dist/types/components.d.ts +203 -23
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +15 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0cd2e986.entry.js +0 -1
- package/dist/sankhyablocks/p-145c4434.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-4396d1a6.js +0 -56
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-4b0ea83f.entry.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-58218eb7.entry.js +0 -1
- package/dist/sankhyablocks/p-78777ae0.entry.js +0 -1
- package/dist/sankhyablocks/p-7915c452.entry.js +0 -1
- package/dist/sankhyablocks/p-953346b9.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a037f5b4.entry.js +0 -1
- package/dist/sankhyablocks/p-a49b1019.entry.js +0 -1
- package/dist/sankhyablocks/p-a7923832.entry.js +0 -1
- package/dist/sankhyablocks/p-aaa1438e.entry.js +0 -1
- package/dist/sankhyablocks/p-b52c2175.js +0 -1
- package/dist/sankhyablocks/p-ba627e85.js +0 -60
- package/dist/sankhyablocks/p-bf9b7149.entry.js +0 -11
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c259545b.entry.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-ca8e7da0.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-d1677df0.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +0 -0
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -1,12 +1,14 @@
|
|
1
|
-
import { ApplicationContext, DataType, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
1
|
+
import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
2
2
|
import { h } from '@stencil/core';
|
3
3
|
import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
|
4
4
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
5
|
-
import { PresentationMode } from '../../lib';
|
5
|
+
import { CrudUtils, PresentationMode } from '../../lib';
|
6
6
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
7
7
|
import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
8
8
|
import SnkMultiSelectionListDataSource from '../snk-grid/filtercolumn/SnkMultiSelectionListDataSource';
|
9
9
|
import { buildFieldSearch, openFieldSearch } from '../snk-taskbar/subcomponents/field-search';
|
10
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
11
|
+
import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
10
12
|
export class SnkSimpleCrud {
|
11
13
|
constructor() {
|
12
14
|
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
@@ -14,15 +16,18 @@ export class SnkSimpleCrud {
|
|
14
16
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
15
17
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
16
18
|
this._taskbarProcessor = new TaskbarProcessor({
|
17
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
18
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
19
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
20
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
19
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
|
20
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
|
21
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
|
22
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
|
21
23
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
22
24
|
});
|
25
|
+
this._showPopUpGridConfig = false;
|
26
|
+
this._showFormConfig = false;
|
23
27
|
this._currentViewMode = VIEW_MODE.GRID;
|
24
28
|
this._config = undefined;
|
25
29
|
this._fieldToGetFocus = undefined;
|
30
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
26
31
|
this.dataState = undefined;
|
27
32
|
this.dataUnit = undefined;
|
28
33
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
@@ -34,6 +39,22 @@ export class SnkSimpleCrud {
|
|
34
39
|
this.taskbarManager = undefined;
|
35
40
|
this.messagesBuilder = undefined;
|
36
41
|
this.useEnterLikeTab = false;
|
42
|
+
this.actionsList = undefined;
|
43
|
+
this.configName = undefined;
|
44
|
+
this.showConfiguratorButtons = undefined;
|
45
|
+
}
|
46
|
+
getButtons(selected, changeModeBtn) {
|
47
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? this.REGULAR_DEFAULT_BTNS : this.REGULAR_SELECTED_BTNS)
|
48
|
+
.concat(changeModeBtn));
|
49
|
+
}
|
50
|
+
addConfigButton(buttons) {
|
51
|
+
if (this.configName === undefined) {
|
52
|
+
return buttons;
|
53
|
+
}
|
54
|
+
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
55
|
+
}
|
56
|
+
get application() {
|
57
|
+
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
37
58
|
}
|
38
59
|
resolveInMemoryBtns(taskbarButtons) {
|
39
60
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -53,7 +74,10 @@ export class SnkSimpleCrud {
|
|
53
74
|
}
|
54
75
|
actionClickListener(evt) {
|
55
76
|
const act = evt.detail;
|
56
|
-
if (act === TaskbarElement.
|
77
|
+
if (act === TaskbarElement.CONFIGURATOR) {
|
78
|
+
this._snkConfigurator.open();
|
79
|
+
}
|
80
|
+
else if (act === TaskbarElement.GRID_MODE) {
|
57
81
|
this.goToView(VIEW_MODE.GRID);
|
58
82
|
}
|
59
83
|
else if (act === TaskbarElement.FORM_MODE) {
|
@@ -71,8 +95,64 @@ export class SnkSimpleCrud {
|
|
71
95
|
this.dataStateChange.emit(newValue);
|
72
96
|
}
|
73
97
|
}
|
74
|
-
|
98
|
+
openConfig(viewMode) {
|
99
|
+
this._snkConfigurator.close();
|
100
|
+
if (viewMode === VIEW_MODE.GRID) {
|
101
|
+
this.openGridConfig();
|
102
|
+
}
|
103
|
+
else if (viewMode === VIEW_MODE.FORM) {
|
104
|
+
this.openFormConfig();
|
105
|
+
}
|
106
|
+
}
|
107
|
+
openGridConfig() {
|
108
|
+
this._grid.getColumnsState()
|
109
|
+
.then((gridColumns) => {
|
110
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
111
|
+
this._snkGridConfig.selectedIndex = 0;
|
112
|
+
this._showPopUpGridConfig = true;
|
113
|
+
});
|
114
|
+
}
|
115
|
+
openFormConfig() {
|
116
|
+
this._showFormConfig = true;
|
117
|
+
}
|
118
|
+
loadGridConfig() {
|
119
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
this._gridConfigAlreadyLoaded = true;
|
123
|
+
return new Promise((accept, reject) => {
|
124
|
+
ConfigStorage.loadGridConfig(this.configName, this._resourceID)
|
125
|
+
.then(config => {
|
126
|
+
this.setGridConfig(config);
|
127
|
+
accept();
|
128
|
+
})
|
129
|
+
.catch(reason => {
|
130
|
+
reject(reason);
|
131
|
+
});
|
132
|
+
});
|
133
|
+
}
|
134
|
+
async loadFormConfig() {
|
135
|
+
if (this._formConfigManager == undefined) {
|
136
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
|
137
|
+
this._formConfigManager.setConfig(this.formConfig);
|
138
|
+
}
|
139
|
+
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
140
|
+
return;
|
141
|
+
}
|
142
|
+
this._formConfigAlreadyLoaded = true;
|
143
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
144
|
+
}
|
145
|
+
async componentWillRender() {
|
146
|
+
this._resourceID = await this.application.getResourceID();
|
75
147
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
148
|
+
if (this.configName === undefined) {
|
149
|
+
return;
|
150
|
+
}
|
151
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
152
|
+
return;
|
153
|
+
}
|
154
|
+
this.loadGridConfig();
|
155
|
+
this.loadFormConfig();
|
76
156
|
}
|
77
157
|
componentWillLoad() {
|
78
158
|
this.processMetadata();
|
@@ -80,8 +160,7 @@ export class SnkSimpleCrud {
|
|
80
160
|
this.configDatasource();
|
81
161
|
}
|
82
162
|
configDatasource() {
|
83
|
-
|
84
|
-
this._multiSelectionListDataSource.setApplication(application);
|
163
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
85
164
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
86
165
|
}
|
87
166
|
getTaskBarId() {
|
@@ -122,6 +201,20 @@ export class SnkSimpleCrud {
|
|
122
201
|
getRecords() {
|
123
202
|
return Promise.resolve(this.dataUnit.records);
|
124
203
|
}
|
204
|
+
/**
|
205
|
+
* Usado para abrir o configurator do CRUD
|
206
|
+
*/
|
207
|
+
async openConfigurator() {
|
208
|
+
var _a;
|
209
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
210
|
+
}
|
211
|
+
/**
|
212
|
+
* Usado para fechar o configurator do CRUD
|
213
|
+
*/
|
214
|
+
async closeConfigurator() {
|
215
|
+
var _a;
|
216
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
217
|
+
}
|
125
218
|
processMetadata() {
|
126
219
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
127
220
|
const fieldMetadata = [];
|
@@ -176,6 +269,14 @@ export class SnkSimpleCrud {
|
|
176
269
|
this.dataUnit.clearSelection();
|
177
270
|
}
|
178
271
|
}
|
272
|
+
handleConfiguratorEvent(evt, type) {
|
273
|
+
evt.stopImmediatePropagation();
|
274
|
+
if (type === 'SAVE') {
|
275
|
+
this.configuratorSave.emit();
|
276
|
+
return;
|
277
|
+
}
|
278
|
+
this.configuratorCancel.emit();
|
279
|
+
}
|
179
280
|
getColumnSearch(actionButton, item) {
|
180
281
|
if (this._columnSearch != undefined) {
|
181
282
|
return this._columnSearch;
|
@@ -232,7 +333,7 @@ export class SnkSimpleCrud {
|
|
232
333
|
}
|
233
334
|
getActionsList() {
|
234
335
|
var _a, _b;
|
235
|
-
|
336
|
+
const hardList = [{
|
236
337
|
value: StringUtils.generateUUID(),
|
237
338
|
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
|
238
339
|
disableCloseOnSelect: true,
|
@@ -241,6 +342,16 @@ export class SnkSimpleCrud {
|
|
241
342
|
? this.getColumnSearch(actionButton, item)
|
242
343
|
: this.getFieldSearch(actionButton, item)
|
243
344
|
}];
|
345
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
346
|
+
const taskbarID = this.getTopTaskBarId();
|
347
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
348
|
+
}
|
349
|
+
return hardList.concat(this.actionsList);
|
350
|
+
}
|
351
|
+
getTopTaskBarId() {
|
352
|
+
var _a;
|
353
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
|
354
|
+
`snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
|
244
355
|
}
|
245
356
|
async keyDownListener(event) {
|
246
357
|
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
@@ -279,11 +390,42 @@ export class SnkSimpleCrud {
|
|
279
390
|
disconnectedCallback() {
|
280
391
|
window.removeEventListener("keydown", this._keyDownHandler);
|
281
392
|
}
|
393
|
+
gridConfigChangeHandler(evt) {
|
394
|
+
const config = evt.detail;
|
395
|
+
ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
|
396
|
+
evt.stopPropagation();
|
397
|
+
}
|
398
|
+
modalConfigChangeHandler(evt) {
|
399
|
+
const config = evt.detail;
|
400
|
+
this._grid.setColumnsState(config.columns)
|
401
|
+
.then(() => {
|
402
|
+
this.setGridConfig(config);
|
403
|
+
this.closeGridConfig();
|
404
|
+
});
|
405
|
+
evt.stopPropagation();
|
406
|
+
}
|
407
|
+
setGridConfig(config) {
|
408
|
+
this.gridConfig = config;
|
409
|
+
CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
410
|
+
}
|
411
|
+
setFormConfig(config) {
|
412
|
+
this.formConfig = config;
|
413
|
+
}
|
414
|
+
closeGridConfig() {
|
415
|
+
this._showPopUpGridConfig = false;
|
416
|
+
}
|
417
|
+
closeFormConfig() {
|
418
|
+
this._showFormConfig = false;
|
419
|
+
}
|
420
|
+
/* istanbul ignore next */
|
282
421
|
render() {
|
283
|
-
var _a;
|
284
|
-
|
422
|
+
var _a, _b, _c;
|
423
|
+
if (this.dataUnit == undefined) {
|
424
|
+
return;
|
425
|
+
}
|
426
|
+
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)
|
285
427
|
? undefined
|
286
|
-
: 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.
|
428
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this._showFormConfig ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this._showFormConfig && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
|
287
429
|
}
|
288
430
|
static get is() { return "snk-simple-crud"; }
|
289
431
|
static get encapsulation() { return "scoped"; }
|
@@ -364,7 +506,7 @@ export class SnkSimpleCrud {
|
|
364
506
|
},
|
365
507
|
"gridConfig": {
|
366
508
|
"type": "unknown",
|
367
|
-
"mutable":
|
509
|
+
"mutable": true,
|
368
510
|
"complexType": {
|
369
511
|
"original": "IGridConfig",
|
370
512
|
"resolved": "IGridConfig",
|
@@ -494,14 +636,74 @@ export class SnkSimpleCrud {
|
|
494
636
|
"attribute": "use-enter-like-tab",
|
495
637
|
"reflect": false,
|
496
638
|
"defaultValue": "false"
|
639
|
+
},
|
640
|
+
"actionsList": {
|
641
|
+
"type": "unknown",
|
642
|
+
"mutable": false,
|
643
|
+
"complexType": {
|
644
|
+
"original": "Array<Action>",
|
645
|
+
"resolved": "Action[]",
|
646
|
+
"references": {
|
647
|
+
"Array": {
|
648
|
+
"location": "global"
|
649
|
+
},
|
650
|
+
"Action": {
|
651
|
+
"location": "import",
|
652
|
+
"path": "../snk-taskbar/snk-taskbar"
|
653
|
+
}
|
654
|
+
}
|
655
|
+
},
|
656
|
+
"required": false,
|
657
|
+
"optional": false,
|
658
|
+
"docs": {
|
659
|
+
"tags": [],
|
660
|
+
"text": "A\u00E7\u00F5es a serem colocadas no bot\u00E3o \"Mais op\u00E7\u00F5es\" do componente snk-taskbar."
|
661
|
+
}
|
662
|
+
},
|
663
|
+
"configName": {
|
664
|
+
"type": "string",
|
665
|
+
"mutable": true,
|
666
|
+
"complexType": {
|
667
|
+
"original": "string",
|
668
|
+
"resolved": "string",
|
669
|
+
"references": {}
|
670
|
+
},
|
671
|
+
"required": false,
|
672
|
+
"optional": false,
|
673
|
+
"docs": {
|
674
|
+
"tags": [],
|
675
|
+
"text": "Usado para salvar as configura\u00E7\u00F5es dos blocos de constru\u00E7\u00E3o."
|
676
|
+
},
|
677
|
+
"attribute": "config-name",
|
678
|
+
"reflect": false
|
679
|
+
},
|
680
|
+
"showConfiguratorButtons": {
|
681
|
+
"type": "boolean",
|
682
|
+
"mutable": false,
|
683
|
+
"complexType": {
|
684
|
+
"original": "boolean",
|
685
|
+
"resolved": "boolean",
|
686
|
+
"references": {}
|
687
|
+
},
|
688
|
+
"required": false,
|
689
|
+
"optional": false,
|
690
|
+
"docs": {
|
691
|
+
"tags": [],
|
692
|
+
"text": "Usado para exibir os bot\u00F5es de a\u00E7\u00E3o do snk-configurator."
|
693
|
+
},
|
694
|
+
"attribute": "show-configurator-buttons",
|
695
|
+
"reflect": false
|
497
696
|
}
|
498
697
|
};
|
499
698
|
}
|
500
699
|
static get states() {
|
501
700
|
return {
|
701
|
+
"_showPopUpGridConfig": {},
|
702
|
+
"_showFormConfig": {},
|
502
703
|
"_currentViewMode": {},
|
503
704
|
"_config": {},
|
504
705
|
"_fieldToGetFocus": {},
|
706
|
+
"_customContainerId": {},
|
505
707
|
"_formFields": {}
|
506
708
|
};
|
507
709
|
}
|
@@ -583,6 +785,36 @@ export class SnkSimpleCrud {
|
|
583
785
|
}
|
584
786
|
}
|
585
787
|
}
|
788
|
+
}, {
|
789
|
+
"method": "configuratorSave",
|
790
|
+
"name": "configuratorSave",
|
791
|
+
"bubbles": true,
|
792
|
+
"cancelable": true,
|
793
|
+
"composed": true,
|
794
|
+
"docs": {
|
795
|
+
"tags": [],
|
796
|
+
"text": "Emitido quando salva a configura\u00E7\u00E3o no configurator do CRUD."
|
797
|
+
},
|
798
|
+
"complexType": {
|
799
|
+
"original": "any",
|
800
|
+
"resolved": "any",
|
801
|
+
"references": {}
|
802
|
+
}
|
803
|
+
}, {
|
804
|
+
"method": "configuratorCancel",
|
805
|
+
"name": "configuratorCancel",
|
806
|
+
"bubbles": true,
|
807
|
+
"cancelable": true,
|
808
|
+
"composed": true,
|
809
|
+
"docs": {
|
810
|
+
"tags": [],
|
811
|
+
"text": "Emitido quando cancela o salvamento da configura\u00E7\u00E3o no configurator do CRUD."
|
812
|
+
},
|
813
|
+
"complexType": {
|
814
|
+
"original": "any",
|
815
|
+
"resolved": "any",
|
816
|
+
"references": {}
|
817
|
+
}
|
586
818
|
}];
|
587
819
|
}
|
588
820
|
static get methods() {
|
@@ -681,6 +913,38 @@ export class SnkSimpleCrud {
|
|
681
913
|
"text": "",
|
682
914
|
"tags": []
|
683
915
|
}
|
916
|
+
},
|
917
|
+
"openConfigurator": {
|
918
|
+
"complexType": {
|
919
|
+
"signature": "() => Promise<void>",
|
920
|
+
"parameters": [],
|
921
|
+
"references": {
|
922
|
+
"Promise": {
|
923
|
+
"location": "global"
|
924
|
+
}
|
925
|
+
},
|
926
|
+
"return": "Promise<void>"
|
927
|
+
},
|
928
|
+
"docs": {
|
929
|
+
"text": "Usado para abrir o configurator do CRUD",
|
930
|
+
"tags": []
|
931
|
+
}
|
932
|
+
},
|
933
|
+
"closeConfigurator": {
|
934
|
+
"complexType": {
|
935
|
+
"signature": "() => Promise<void>",
|
936
|
+
"parameters": [],
|
937
|
+
"references": {
|
938
|
+
"Promise": {
|
939
|
+
"location": "global"
|
940
|
+
}
|
941
|
+
},
|
942
|
+
"return": "Promise<void>"
|
943
|
+
},
|
944
|
+
"docs": {
|
945
|
+
"text": "Usado para fechar o configurator do CRUD",
|
946
|
+
"tags": []
|
947
|
+
}
|
684
948
|
}
|
685
949
|
};
|
686
950
|
}
|
@@ -59,12 +59,28 @@ export class TaskbarActionsButton {
|
|
59
59
|
return this._showDropdown && ((_a = this.actions) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
60
60
|
}
|
61
61
|
onSelectAction(iAction) {
|
62
|
-
const
|
62
|
+
const actions = this.actions.map(action => (Object.assign(Object.assign({}, action), { id: action.value })));
|
63
|
+
const selectedAction = this.getSelectedAction(iAction.id, actions);
|
63
64
|
this.taskbarActionSelected.emit(selectedAction);
|
64
65
|
if (!selectedAction.disableCloseOnSelect) {
|
65
66
|
this._showDropdown = false;
|
66
67
|
}
|
67
68
|
}
|
69
|
+
getSelectedAction(id, actions) {
|
70
|
+
let selectedItem = null;
|
71
|
+
for (const item of actions) {
|
72
|
+
if (item.id === id) {
|
73
|
+
selectedItem = item;
|
74
|
+
break;
|
75
|
+
}
|
76
|
+
if (!(item === null || item === void 0 ? void 0 : item.children))
|
77
|
+
continue;
|
78
|
+
selectedItem = this.getSelectedAction(id, item.children);
|
79
|
+
if (selectedItem)
|
80
|
+
break;
|
81
|
+
}
|
82
|
+
return selectedItem;
|
83
|
+
}
|
68
84
|
dropdownItemBuilder(item, _level) {
|
69
85
|
const itemAction = this.actions.find(action => action.value === item.id);
|
70
86
|
if (!itemAction || !itemAction.itemBuilder) {
|
@@ -102,7 +118,7 @@ export class TaskbarActionsButton {
|
|
102
118
|
this.taskbarActionsButtonDisconnected.emit();
|
103
119
|
}
|
104
120
|
render() {
|
105
|
-
return (h(Host, null, h("div", { class:
|
121
|
+
return (h(Host, null, h("div", { class: `${this.canShowDropdown() ? ' ez-elevation--16' : ''}` }, h("ez-button", { title: this.title, mode: 'icon', iconName: 'dots-vertical', size: 'small', enabled: this.enabled, onClick: () => this.controlDropdown() }), this.canShowDropdown() && h("ez-dropdown", { items: this.loadItems(), onEzClick: (evt) => this.onSelectAction(evt.detail), onEzOutsideClick: () => this._showDropdown = false, itemBuilder: (item, level) => this.dropdownItemBuilder(item, level) }))));
|
106
122
|
}
|
107
123
|
static get is() { return "taskbar-actions-button"; }
|
108
124
|
static get encapsulation() { return "scoped"; }
|
@@ -86,29 +86,29 @@ export const buildElem = (element, className, dataElementId, getTitle, action, i
|
|
86
86
|
case TaskbarElement.CONFIGURATOR:
|
87
87
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
88
88
|
case TaskbarElement.MORE_OPTIONS:
|
89
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
89
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
90
90
|
case TaskbarElement.DIVIDER:
|
91
91
|
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-horizontal--medium", "data-taskbar-divider": true });
|
92
92
|
case TaskbarElement.DATA_EXPORTER:
|
93
93
|
const provider = (_a = store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
94
|
-
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
94
|
+
return h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
95
95
|
case TaskbarElement.ATTACH:
|
96
96
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
97
97
|
case TaskbarElement.ACTIONS_BUTTON:
|
98
|
-
return h("snk-actions-button", { "data-element-id": dataElementId });
|
98
|
+
return h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
99
99
|
}
|
100
100
|
};
|
101
101
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
102
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
102
|
+
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) });
|
103
103
|
}
|
104
104
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
105
|
-
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) });
|
105
|
+
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) });
|
106
106
|
}
|
107
107
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
108
|
-
return h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
108
|
+
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) }, h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
109
109
|
}
|
110
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
110
|
+
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
111
111
|
return actions && actions.length > 0
|
112
|
-
? h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
112
|
+
? 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) })
|
113
113
|
: undefined;
|
114
114
|
}
|