@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
@@ -11,6 +11,7 @@ export class SnkFilterBar {
|
|
11
11
|
this._updateSequence = [];
|
12
12
|
this._loadingPending = false;
|
13
13
|
this._configUpdated = false;
|
14
|
+
this._firstLoad = true;
|
14
15
|
this._pendingVariables = false;
|
15
16
|
this._customfiltersToBeUpdated = [];
|
16
17
|
this._calculateSortIndex = (item) => {
|
@@ -27,10 +28,13 @@ export class SnkFilterBar {
|
|
27
28
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
28
29
|
};
|
29
30
|
this.dataUnit = undefined;
|
31
|
+
this.title = undefined;
|
30
32
|
this.configName = undefined;
|
31
33
|
this.resourceID = undefined;
|
34
|
+
this.mode = "regular";
|
32
35
|
this.filterConfig = undefined;
|
33
36
|
this.messagesBuilder = undefined;
|
37
|
+
this.disablePersonalizedFilter = undefined;
|
34
38
|
this.allowDefault = undefined;
|
35
39
|
this.scrollerLocked = false;
|
36
40
|
this.showPersonalizedFilter = false;
|
@@ -74,7 +78,7 @@ export class SnkFilterBar {
|
|
74
78
|
* Faz o recarregamento da filterbar buscando o state no servidor.
|
75
79
|
*/
|
76
80
|
async reload() {
|
77
|
-
this.loadConfigFromStorage();
|
81
|
+
this.loadConfigFromStorage(true);
|
78
82
|
}
|
79
83
|
/**
|
80
84
|
* Retorna um item de filtro pelo ID.
|
@@ -114,6 +118,24 @@ export class SnkFilterBar {
|
|
114
118
|
this.updateFilter(filterItem);
|
115
119
|
return Promise.resolve();
|
116
120
|
}
|
121
|
+
/**
|
122
|
+
* Remove um item de filtro.
|
123
|
+
*
|
124
|
+
* @param filterID - ID do a ser adicionado
|
125
|
+
*
|
126
|
+
* @returns {Promise<SnkFilterItemConfig|undefined>} - Retorna o item de filtro removido, ou undefined caso não encontrado.
|
127
|
+
*/
|
128
|
+
async removeFilterItem(filterID) {
|
129
|
+
const itemIndex = this.filterConfig.findIndex(item => item.id === filterID);
|
130
|
+
if (itemIndex == -1) {
|
131
|
+
console.warn("[SnkFilterBar.removeFilterItem] FilterItem não encontrado");
|
132
|
+
return Promise.resolve(undefined);
|
133
|
+
}
|
134
|
+
const itemToRemove = this.filterConfig[itemIndex];
|
135
|
+
;
|
136
|
+
this.filterConfig = this.filterConfig.filter(item => item.id !== filterID);
|
137
|
+
return Promise.resolve(itemToRemove);
|
138
|
+
}
|
117
139
|
componentDidLoad() {
|
118
140
|
if (this._element) {
|
119
141
|
const dataInfo = { dataUnit: this.dataUnit };
|
@@ -146,13 +168,27 @@ export class SnkFilterBar {
|
|
146
168
|
return;
|
147
169
|
}
|
148
170
|
this._loadingPending = false;
|
149
|
-
this.dataUnit.
|
171
|
+
this.doLoadData(this.dataUnit.getLastLoadRequest() != undefined);
|
150
172
|
}
|
151
173
|
if (this._configUpdated) {
|
152
174
|
this._configUpdated = false;
|
153
175
|
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
154
176
|
}
|
155
177
|
}
|
178
|
+
async doLoadData(forceReload = false) {
|
179
|
+
try {
|
180
|
+
if (this._firstLoad && !forceReload) {
|
181
|
+
let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
|
182
|
+
if (!autoLoad) {
|
183
|
+
return;
|
184
|
+
}
|
185
|
+
}
|
186
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
187
|
+
}
|
188
|
+
finally {
|
189
|
+
this._firstLoad = false;
|
190
|
+
}
|
191
|
+
}
|
156
192
|
/**
|
157
193
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
158
194
|
* através de um pequeno modulo na estrutura da aplicação:
|
@@ -161,6 +197,9 @@ export class SnkFilterBar {
|
|
161
197
|
*/
|
162
198
|
getMessage(key, params, defaultValue) {
|
163
199
|
var _a;
|
200
|
+
if (this.messagesBuilder == undefined && this._application) {
|
201
|
+
this.messagesBuilder = this._application.messagesBuilder;
|
202
|
+
}
|
164
203
|
return ((_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params)) || defaultValue;
|
165
204
|
}
|
166
205
|
getFilter(_dataUnit) {
|
@@ -187,7 +226,7 @@ export class SnkFilterBar {
|
|
187
226
|
registryFilterProvider() {
|
188
227
|
this.dataUnit.addFilterProvider(this);
|
189
228
|
if (this.filterConfig) {
|
190
|
-
this.
|
229
|
+
this.doLoadData();
|
191
230
|
}
|
192
231
|
}
|
193
232
|
itemFocused(selectedItem) {
|
@@ -264,7 +303,10 @@ export class SnkFilterBar {
|
|
264
303
|
loadPermitions() {
|
265
304
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
266
305
|
}
|
267
|
-
loadConfigFromStorage() {
|
306
|
+
async loadConfigFromStorage(clearCache) {
|
307
|
+
if (clearCache) {
|
308
|
+
await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
|
309
|
+
}
|
268
310
|
return new Promise(accept => {
|
269
311
|
ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
|
270
312
|
.then((filters) => {
|
@@ -307,6 +349,9 @@ export class SnkFilterBar {
|
|
307
349
|
filterChangeListener(evt) {
|
308
350
|
this.updateFilter(evt.detail);
|
309
351
|
}
|
352
|
+
/**
|
353
|
+
* Abre o modal de filtros
|
354
|
+
*/
|
310
355
|
async showFilterModal() {
|
311
356
|
const callbackOnApplyFilter = (filters) => {
|
312
357
|
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
@@ -319,9 +364,11 @@ export class SnkFilterBar {
|
|
319
364
|
filterConfig: filtersConfigCopy,
|
320
365
|
configName: this.configName,
|
321
366
|
onComplete: callbackOnApplyFilter,
|
367
|
+
disablePersonalizedFilter: this.disablePersonalizedFilter,
|
322
368
|
getMessage: (key, props) => this.getMessage(key, props),
|
323
369
|
onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
|
324
|
-
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id)
|
370
|
+
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
|
371
|
+
onDeletePersonalizedFilter: (filter, configName) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName),
|
325
372
|
};
|
326
373
|
this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
|
327
374
|
await this._filterModalFactory.showModal();
|
@@ -339,6 +386,11 @@ export class SnkFilterBar {
|
|
339
386
|
this.showPersonalizedFilter = true;
|
340
387
|
this.personalizedFilterId = id;
|
341
388
|
}
|
389
|
+
deletePersonalizedFilter(filter, filterItemType, configName) {
|
390
|
+
if (filterItemType === FilterItemType.PERSONALIZED) {
|
391
|
+
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
|
392
|
+
}
|
393
|
+
}
|
342
394
|
handleHidePersonalizedFilter(reloadFilterBar) {
|
343
395
|
if (reloadFilterBar) {
|
344
396
|
this.loadConfigFromStorage().then(() => {
|
@@ -371,7 +423,9 @@ export class SnkFilterBar {
|
|
371
423
|
if (this.showPersonalizedFilter) {
|
372
424
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
373
425
|
}
|
374
|
-
|
426
|
+
if (this.mode === "button")
|
427
|
+
return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
|
428
|
+
return (h(Host, { "data-mode": this.mode }, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
375
429
|
}
|
376
430
|
static get is() { return "snk-filter-bar"; }
|
377
431
|
static get encapsulation() { return "scoped"; }
|
@@ -407,6 +461,23 @@ export class SnkFilterBar {
|
|
407
461
|
"text": "Recebe o DataUnit do ambiente. Se n\u00E3o for informado, procura pela refer\u00EAncia\ndo SnkDataUnit. Necess\u00E1rio para se registrar como provedor de filtros."
|
408
462
|
}
|
409
463
|
},
|
464
|
+
"title": {
|
465
|
+
"type": "string",
|
466
|
+
"mutable": false,
|
467
|
+
"complexType": {
|
468
|
+
"original": "string",
|
469
|
+
"resolved": "string",
|
470
|
+
"references": {}
|
471
|
+
},
|
472
|
+
"required": false,
|
473
|
+
"optional": false,
|
474
|
+
"docs": {
|
475
|
+
"tags": [],
|
476
|
+
"text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
|
477
|
+
},
|
478
|
+
"attribute": "title",
|
479
|
+
"reflect": false
|
480
|
+
},
|
410
481
|
"configName": {
|
411
482
|
"type": "string",
|
412
483
|
"mutable": false,
|
@@ -441,6 +512,24 @@ export class SnkFilterBar {
|
|
441
512
|
"attribute": "resource-i-d",
|
442
513
|
"reflect": false
|
443
514
|
},
|
515
|
+
"mode": {
|
516
|
+
"type": "string",
|
517
|
+
"mutable": false,
|
518
|
+
"complexType": {
|
519
|
+
"original": "\"regular\" | \"button\" | \"hidden\"",
|
520
|
+
"resolved": "\"button\" | \"hidden\" | \"regular\"",
|
521
|
+
"references": {}
|
522
|
+
},
|
523
|
+
"required": false,
|
524
|
+
"optional": false,
|
525
|
+
"docs": {
|
526
|
+
"tags": [],
|
527
|
+
"text": "Modo de apresenta\u00E7\u00E3o da filterbar."
|
528
|
+
},
|
529
|
+
"attribute": "mode",
|
530
|
+
"reflect": false,
|
531
|
+
"defaultValue": "\"regular\""
|
532
|
+
},
|
444
533
|
"filterConfig": {
|
445
534
|
"type": "unknown",
|
446
535
|
"mutable": true,
|
@@ -483,6 +572,23 @@ export class SnkFilterBar {
|
|
483
572
|
"tags": [],
|
484
573
|
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
485
574
|
}
|
575
|
+
},
|
576
|
+
"disablePersonalizedFilter": {
|
577
|
+
"type": "boolean",
|
578
|
+
"mutable": false,
|
579
|
+
"complexType": {
|
580
|
+
"original": "boolean",
|
581
|
+
"resolved": "boolean",
|
582
|
+
"references": {}
|
583
|
+
},
|
584
|
+
"required": false,
|
585
|
+
"optional": false,
|
586
|
+
"docs": {
|
587
|
+
"tags": [],
|
588
|
+
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros)\ne no modal lateral de filtros (container de filtros personalizados)."
|
589
|
+
},
|
590
|
+
"attribute": "disable-personalized-filter",
|
591
|
+
"reflect": false
|
486
592
|
}
|
487
593
|
};
|
488
594
|
}
|
@@ -612,6 +718,69 @@ export class SnkFilterBar {
|
|
612
718
|
"text": "filterItem - Item a ser adicionado, caso o item j\u00E1 exista com o ID ele n\u00E3o ser\u00E1 adicionado novamente"
|
613
719
|
}]
|
614
720
|
}
|
721
|
+
},
|
722
|
+
"removeFilterItem": {
|
723
|
+
"complexType": {
|
724
|
+
"signature": "(filterID: string) => Promise<SnkFilterItemConfig | undefined>",
|
725
|
+
"parameters": [{
|
726
|
+
"tags": [{
|
727
|
+
"name": "param",
|
728
|
+
"text": "filterID - ID do a ser adicionado"
|
729
|
+
}],
|
730
|
+
"text": "- ID do a ser adicionado"
|
731
|
+
}],
|
732
|
+
"references": {
|
733
|
+
"Promise": {
|
734
|
+
"location": "global"
|
735
|
+
},
|
736
|
+
"SnkFilterItemConfig": {
|
737
|
+
"location": "import",
|
738
|
+
"path": "./filter-item/snk-filter-item"
|
739
|
+
}
|
740
|
+
},
|
741
|
+
"return": "Promise<SnkFilterItemConfig>"
|
742
|
+
},
|
743
|
+
"docs": {
|
744
|
+
"text": "Remove um item de filtro.",
|
745
|
+
"tags": [{
|
746
|
+
"name": "param",
|
747
|
+
"text": "filterID - ID do a ser adicionado"
|
748
|
+
}, {
|
749
|
+
"name": "returns",
|
750
|
+
"text": "- Retorna o item de filtro removido, ou undefined caso n\u00E3o encontrado."
|
751
|
+
}]
|
752
|
+
}
|
753
|
+
},
|
754
|
+
"showFilterModal": {
|
755
|
+
"complexType": {
|
756
|
+
"signature": "() => Promise<void>",
|
757
|
+
"parameters": [],
|
758
|
+
"references": {
|
759
|
+
"Promise": {
|
760
|
+
"location": "global"
|
761
|
+
},
|
762
|
+
"SnkFilterItemConfig": {
|
763
|
+
"location": "import",
|
764
|
+
"path": "./filter-item/snk-filter-item"
|
765
|
+
},
|
766
|
+
"Array": {
|
767
|
+
"location": "global"
|
768
|
+
},
|
769
|
+
"SnkFilterModalFactoryParams": {
|
770
|
+
"location": "import",
|
771
|
+
"path": "./utils/SnkFilterModalFactory"
|
772
|
+
},
|
773
|
+
"IPersonalizedFilter": {
|
774
|
+
"location": "import",
|
775
|
+
"path": "../snk-personalized-filter/interfaces/IPersonalizedFilter"
|
776
|
+
}
|
777
|
+
},
|
778
|
+
"return": "Promise<void>"
|
779
|
+
},
|
780
|
+
"docs": {
|
781
|
+
"text": "Abre o modal de filtros",
|
782
|
+
"tags": []
|
783
|
+
}
|
615
784
|
}
|
616
785
|
};
|
617
786
|
}
|
@@ -1,12 +1,14 @@
|
|
1
1
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
2
2
|
class SnkFilterModalFactory {
|
3
|
-
constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter }) {
|
3
|
+
constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
4
4
|
this._filterConfig = filterConfig;
|
5
5
|
this._configName = configName;
|
6
6
|
this._onComplete = onComplete;
|
7
7
|
this._getMessage = getMessage;
|
8
|
+
this._disablePersonalizedFilter = disablePersonalizedFilter;
|
8
9
|
this._addPersonalizedFilterFn = onAddPersonalizedFilter;
|
9
10
|
this._editPersonalizedFilterFn = onEditPersonalizedFilter;
|
11
|
+
this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
|
10
12
|
}
|
11
13
|
applyFilters(newFilterConfig) {
|
12
14
|
this._onComplete(newFilterConfig);
|
@@ -17,11 +19,13 @@ class SnkFilterModalFactory {
|
|
17
19
|
filterModal.className = "ez-size-height--full";
|
18
20
|
filterModal.filters = this._filterConfig;
|
19
21
|
filterModal.configName = this._configName;
|
22
|
+
filterModal.disablePersonalizedFilter = this._disablePersonalizedFilter;
|
20
23
|
filterModal.getMessage = this._getMessage.bind(this);
|
21
24
|
filterModal.applyFilters = this.applyFilters.bind(this);
|
22
25
|
filterModal.closeModal = () => this._closeModal();
|
23
26
|
filterModal.addPersonalizedFilter = () => this._addPersonalizedFilterFn();
|
24
27
|
filterModal.editPersonalizedFilter = (id) => this._editPersonalizedFilterFn(id);
|
28
|
+
filterModal.deletePersonalizedFilter = (filter, configName) => this._onDeletePersonalizedFilter(filter, configName);
|
25
29
|
return filterModal;
|
26
30
|
}
|
27
31
|
async showModal() {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
2
2
|
import { h } from '@stencil/core';
|
3
|
-
import { SnkFormConfigManager } from '
|
3
|
+
import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
4
4
|
import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
|
5
5
|
export class SnkForm {
|
6
6
|
constructor() {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
2
2
|
import { Sortable } from '@shopify/draggable';
|
3
|
-
import { ObjectUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
+
import { ObjectUtils, ArrayUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
4
4
|
import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
5
|
-
import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "
|
6
|
-
import { UserConfigType } from "
|
5
|
+
import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../lib/utils/constants";
|
6
|
+
import { UserConfigType } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
7
7
|
import { buildFormConfigFromDataUnit } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
8
8
|
const CONTAINER_ID = {
|
9
9
|
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
@@ -932,6 +932,12 @@ export class SnkFormConfig {
|
|
932
932
|
this.controlSortableField();
|
933
933
|
this.controlSortableGroup();
|
934
934
|
}
|
935
|
+
async componentWillRender() {
|
936
|
+
if (this.messagesBuilder == undefined) {
|
937
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
938
|
+
this.messagesBuilder = application.messagesBuilder;
|
939
|
+
}
|
940
|
+
}
|
935
941
|
componentWillLoad() {
|
936
942
|
this.loadConfig();
|
937
943
|
}
|
@@ -1005,7 +1011,7 @@ export class SnkFormConfig {
|
|
1005
1011
|
"references": {
|
1006
1012
|
"SnkFormConfigManager": {
|
1007
1013
|
"location": "import",
|
1008
|
-
"path": "
|
1014
|
+
"path": "./SnkFormConfigManager"
|
1009
1015
|
}
|
1010
1016
|
}
|
1011
1017
|
},
|
@@ -1025,7 +1031,7 @@ export class SnkFormConfig {
|
|
1025
1031
|
"references": {
|
1026
1032
|
"SnkMessageBuilder": {
|
1027
1033
|
"location": "import",
|
1028
|
-
"path": "
|
1034
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
1029
1035
|
}
|
1030
1036
|
}
|
1031
1037
|
},
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { h, Fragment } from '@stencil/core';
|
2
2
|
import { ApplicationContext, DataType, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
3
|
-
import {
|
3
|
+
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
4
4
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
5
5
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
6
6
|
import { PresentationMode } from '../../lib/@types';
|
@@ -9,19 +9,27 @@ import store from "../../lib/store";
|
|
9
9
|
import SnkMultiSelectionListDataSource from './filtercolumn/SnkMultiSelectionListDataSource';
|
10
10
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
11
11
|
import { buildFieldSearch, openFieldSearch } from '../snk-taskbar/subcomponents/field-search';
|
12
|
+
import { CrudUtils } from '../../lib';
|
12
13
|
export class SnkGrid {
|
13
14
|
constructor() {
|
14
15
|
this._topTaskbarProcessor = new TaskbarProcessor({
|
15
16
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
16
17
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
18
|
+
"snkGridTopTaskbar.regular.singleTaskbar": [],
|
17
19
|
"snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
|
18
|
-
"snkGridTopTaskbar.finish_edition.secondary": []
|
20
|
+
"snkGridTopTaskbar.finish_edition.secondary": [],
|
21
|
+
"snkGridTopTaskbar.finish_edition.singleTaskbar": [],
|
19
22
|
});
|
20
23
|
this._headerTaskbarProcessor = new TaskbarProcessor({
|
21
24
|
"snkGridHeaderTaskbar.unselected": ["REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
22
25
|
"snkGridHeaderTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
23
26
|
"snkGridHeaderTaskbar.detail.unselected": ["REFRESH", "MORE_OPTIONS"],
|
24
|
-
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"]
|
27
|
+
"snkGridHeaderTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "REFRESH"],
|
28
|
+
"snkGridHeaderTaskbar.singleTaskbar.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON", "MORE_OPTIONS"],
|
29
|
+
"snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
30
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
|
31
|
+
"snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
|
32
|
+
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
25
33
|
});
|
26
34
|
this._dataUnit = undefined;
|
27
35
|
this._dataState = undefined;
|
@@ -30,6 +38,7 @@ export class SnkGrid {
|
|
30
38
|
this._showSnkFilterBar = true;
|
31
39
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
32
40
|
this.configName = undefined;
|
41
|
+
this.filterBarTitle = undefined;
|
33
42
|
this.resourceID = undefined;
|
34
43
|
this.selectionToastConfig = undefined;
|
35
44
|
this.actionsList = undefined;
|
@@ -45,6 +54,7 @@ export class SnkGrid {
|
|
45
54
|
this.taskbarCustomContainerId = undefined;
|
46
55
|
this.gridHeaderCustomSlotId = 'GRID_HEADER_CUSTOM_ELEMENTS';
|
47
56
|
this.topTaskbarCustomSlotId = 'GRID_TASKBAR_CUSTOM_ELEMENTS';
|
57
|
+
this.disablePersonalizedFilter = undefined;
|
48
58
|
}
|
49
59
|
/**
|
50
60
|
* Exibe a janela de configurações da grade.
|
@@ -102,19 +112,7 @@ export class SnkGrid {
|
|
102
112
|
}
|
103
113
|
setGridConfig(config) {
|
104
114
|
this._gridConfig = config;
|
105
|
-
|
106
|
-
}
|
107
|
-
assertDefaultSorting() {
|
108
|
-
if (this._gridConfig && this._dataUnit) {
|
109
|
-
this._dataUnit.defaultSorting = this._gridConfig
|
110
|
-
.columns
|
111
|
-
.filter(col => col.ascending != undefined)
|
112
|
-
.sort((colA, colB) => colA.orderIndex - colB.orderIndex)
|
113
|
-
.map(({ name: field, ascending }) => {
|
114
|
-
const { dataType } = this._dataUnit.getField(field);
|
115
|
-
return { field, dataType, mode: ascending ? SortMode.ASC : SortMode.DESC };
|
116
|
-
});
|
117
|
-
}
|
115
|
+
CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
118
116
|
}
|
119
117
|
loadConfig() {
|
120
118
|
ConfigStorage.loadGridConfig(this.configName, this.resourceID)
|
@@ -240,7 +238,7 @@ export class SnkGrid {
|
|
240
238
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
241
239
|
}
|
242
240
|
finshLoading() {
|
243
|
-
|
241
|
+
CrudUtils.assertDefaultSorting(this._gridConfig, this._dataUnit);
|
244
242
|
this.addElementID();
|
245
243
|
if (this.columnFilterDataSource != undefined) {
|
246
244
|
this.columnFilterDataSource.setApplication(this._application);
|
@@ -302,30 +300,46 @@ export class SnkGrid {
|
|
302
300
|
return invisibleButtons;
|
303
301
|
}
|
304
302
|
componentWillRender() {
|
305
|
-
var _a;
|
306
303
|
const invisibleButtons = this.getInvisibleButtons();
|
307
|
-
|
308
|
-
let headerTaskbarId;
|
309
|
-
if (hasSelectedRecord) {
|
310
|
-
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.selected" : "snkGridHeaderTaskbar.selected";
|
311
|
-
}
|
312
|
-
else {
|
313
|
-
headerTaskbarId = this.isDetail ? "snkGridHeaderTaskbar.detail.unselected" : "snkGridHeaderTaskbar.unselected";
|
314
|
-
}
|
315
|
-
this._headerTaskbarProcessor.process(headerTaskbarId, this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
304
|
+
this._headerTaskbarProcessor.process(this.getHeaderTaskbarId(), this.taskbarManager, this._dataState, this.getHeaderDisabledButtons(), invisibleButtons);
|
316
305
|
this._topTaskbarProcessor.process(this.getTopTaskBarId(), this.taskbarManager, this._dataState, undefined, invisibleButtons);
|
317
306
|
this.dataExporterProviderStore();
|
318
307
|
}
|
308
|
+
getHeaderTaskbarId() {
|
309
|
+
var _a, _b;
|
310
|
+
const hasSelectedRecord = this._dataState && !!((_a = this._dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.length);
|
311
|
+
const taskbarIdPrefixLookup = {
|
312
|
+
primary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
313
|
+
secondary: this.isDetail ? "snkGridHeaderTaskbar.detail" : "snkGridHeaderTaskbar",
|
314
|
+
singleTaskbar: this.isDetail ? "snkGridHeaderTaskbar.singleTaskbar.detail" : "snkGridHeaderTaskbar.singleTaskbar"
|
315
|
+
};
|
316
|
+
const taskbarIdPrefix = taskbarIdPrefixLookup[this.presentationMode];
|
317
|
+
let headerTaskbarId = hasSelectedRecord ? `${taskbarIdPrefix}.selected` : `${taskbarIdPrefix}.unselected`;
|
318
|
+
if (((_b = this._dataState) === null || _b === void 0 ? void 0 : _b.isDirty) && this.presentationMode === PresentationMode.SINGLE_TASKBAR) {
|
319
|
+
headerTaskbarId = "snkGridHeaderTaskbar.singleTaskbar.finish_edition";
|
320
|
+
}
|
321
|
+
return headerTaskbarId;
|
322
|
+
}
|
319
323
|
getTopTaskBarId() {
|
320
324
|
var _a;
|
321
|
-
const
|
325
|
+
const suffixLookup = {
|
326
|
+
primary: "",
|
327
|
+
secondary: ".secondary",
|
328
|
+
singleTaskbar: ".singleTaskbar"
|
329
|
+
};
|
330
|
+
const sufix = suffixLookup[this.presentationMode];
|
322
331
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.isDirty) {
|
323
332
|
return `snkGridTopTaskbar.finish_edition${sufix}`;
|
324
333
|
}
|
325
334
|
return `snkGridTopTaskbar.regular${sufix}`;
|
326
335
|
}
|
327
336
|
getPrimaryButton() {
|
328
|
-
|
337
|
+
const primaryButtonLookup = {
|
338
|
+
primary: "INSERT",
|
339
|
+
secondary: "",
|
340
|
+
singleTaskbar: "INSERT"
|
341
|
+
};
|
342
|
+
return primaryButtonLookup[this.presentationMode];
|
329
343
|
}
|
330
344
|
getColumnSearch(actionButton, item) {
|
331
345
|
if (this._columnSearch != undefined) {
|
@@ -376,7 +390,7 @@ export class SnkGrid {
|
|
376
390
|
return undefined;
|
377
391
|
}
|
378
392
|
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
379
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail) }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, 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),
|
393
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, 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 }))));
|
380
394
|
}
|
381
395
|
static get is() { return "snk-grid"; }
|
382
396
|
static get encapsulation() { return "scoped"; }
|
@@ -430,6 +444,23 @@ export class SnkGrid {
|
|
430
444
|
"attribute": "config-name",
|
431
445
|
"reflect": false
|
432
446
|
},
|
447
|
+
"filterBarTitle": {
|
448
|
+
"type": "string",
|
449
|
+
"mutable": false,
|
450
|
+
"complexType": {
|
451
|
+
"original": "string",
|
452
|
+
"resolved": "string",
|
453
|
+
"references": {}
|
454
|
+
},
|
455
|
+
"required": false,
|
456
|
+
"optional": false,
|
457
|
+
"docs": {
|
458
|
+
"tags": [],
|
459
|
+
"text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
|
460
|
+
},
|
461
|
+
"attribute": "filter-bar-title",
|
462
|
+
"reflect": false
|
463
|
+
},
|
433
464
|
"resourceID": {
|
434
465
|
"type": "string",
|
435
466
|
"mutable": false,
|
@@ -573,7 +604,7 @@ export class SnkGrid {
|
|
573
604
|
"mutable": false,
|
574
605
|
"complexType": {
|
575
606
|
"original": "PresentationMode",
|
576
|
-
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY",
|
607
|
+
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
|
577
608
|
"references": {
|
578
609
|
"PresentationMode": {
|
579
610
|
"location": "import",
|
@@ -719,6 +750,23 @@ export class SnkGrid {
|
|
719
750
|
"attribute": "top-taskbar-custom-slot-id",
|
720
751
|
"reflect": false,
|
721
752
|
"defaultValue": "'GRID_TASKBAR_CUSTOM_ELEMENTS'"
|
753
|
+
},
|
754
|
+
"disablePersonalizedFilter": {
|
755
|
+
"type": "boolean",
|
756
|
+
"mutable": false,
|
757
|
+
"complexType": {
|
758
|
+
"original": "boolean",
|
759
|
+
"resolved": "boolean",
|
760
|
+
"references": {}
|
761
|
+
},
|
762
|
+
"required": false,
|
763
|
+
"optional": false,
|
764
|
+
"docs": {
|
765
|
+
"tags": [],
|
766
|
+
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros)\ne no modal lateral de filtros (container de filtros personalizados)."
|
767
|
+
},
|
768
|
+
"attribute": "disable-personalized-filter",
|
769
|
+
"reflect": false
|
722
770
|
}
|
723
771
|
};
|
724
772
|
}
|