@sankhyalabs/sankhyablocks 8.15.0-dev.9 → 8.15.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-302bbbd4.js → ConfigStorage-34be11ce.js} +70 -7
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-99f0f6ed.js} +5 -3
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-6211fb28.js} +7 -2
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-141aa18d.js} +15 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-5213120b.js +140 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-5161d082.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-9f1a13ca.js} +1 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-353e4af2.js → pesquisa-fetcher-94f6b316.js} +439 -39
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_2.cjs.entry.js → snk-actions-button_4.cjs.entry.js} +524 -8
- package/dist/cjs/snk-application.cjs.entry.js +44 -10
- package/dist/cjs/snk-attach.cjs.entry.js +392 -62
- package/dist/cjs/snk-crud.cjs.entry.js +17 -12
- package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -5
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-6026a9f7.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -12
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +44 -8
- package/dist/cjs/snk-filter-item.cjs.entry.js +4 -47
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal.cjs.entry.js +2 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +47 -27
- package/dist/cjs/snk-form.cjs.entry.js +11 -4
- package/dist/cjs/snk-grid.cjs.entry.js +40 -22
- package/dist/cjs/{snk-guides-viewer-e60ccc5e.js → snk-guides-viewer-508bb6fe.js} +16 -11
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -10
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +3 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +229 -27
- package/dist/cjs/snk-taskbar.cjs.entry.js +100 -14
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-3ecd1278.js} +9 -9
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +85 -2
- package/dist/collection/components/snk-attach/snk-attach.js +188 -39
- package/dist/collection/components/snk-attach/structure/{crud-config-builder.js → builder/anexo-sistema-crud-config.builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/builder/attach-crud-config.builder.js +62 -0
- package/dist/collection/components/snk-attach/structure/{taskbar-builder.js → builder/taskbar-builder.js} +1 -1
- package/dist/collection/components/snk-attach/structure/fetcher/facade/fetcher.facade.js +1 -0
- package/dist/collection/components/snk-attach/structure/{data-unit-builder.js → fetcher/factory/anexo-sistema-data-unit.factory.js} +14 -11
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +111 -0
- package/dist/collection/components/snk-attach/structure/index.js +6 -3
- package/dist/collection/components/snk-crud/snk-crud.js +95 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +27 -3
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +6 -2
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +5 -3
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +4 -47
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +19 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +23 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +137 -3
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/snk-form.js +25 -1
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +6 -1
- package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.js +50 -30
- package/dist/collection/components/snk-grid/snk-grid.js +103 -16
- package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.js +130 -123
- package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.js +1 -1
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +2 -4
- package/dist/collection/components/snk-simple-crud/regular-buttons.js +3 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +378 -18
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +4 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +139 -13
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +17 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +29 -22
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +21 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +6 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +11 -12
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/resources/snk-attach.msg.js +13 -0
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +2 -1
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +68 -5
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkFormConfigManager.js +5 -0
- package/dist/components/SnkMessageBuilder.js +15 -1
- package/dist/components/dataunit-fetcher.js +58 -38
- package/dist/components/field-search.js +93 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/snk-actions-button2.js +1 -0
- package/dist/components/snk-application2.js +41 -2
- package/dist/components/snk-attach2.js +448 -69
- package/dist/components/snk-crud.js +15 -3
- package/dist/components/snk-data-exporter2.js +6 -2
- package/dist/components/snk-detail-view2.js +40 -7
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-filter-bar2.js +47 -6
- package/dist/components/snk-filter-item2.js +4 -47
- package/dist/components/snk-filter-modal.js +4 -2
- package/dist/components/snk-filter-multi-select.js +2 -1
- package/dist/components/snk-form-config2.js +46 -26
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +41 -17
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +285 -29
- package/dist/components/snk-taskbar2.js +114 -24
- package/dist/components/taskbar-actions-button2.js +4 -2
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-101a2b4c.js} +70 -7
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-a650ae58.js} +5 -3
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-d86ba46f.js} +7 -2
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-9747ddd2.js} +15 -1
- package/dist/esm/SnkMultiSelectionListDataSource-7e7eada5.js +133 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-17dc5b5e.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-f121f880.js} +1 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-0fc935a0.js → pesquisa-fetcher-f05a12ca.js} +429 -31
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +523 -9
- package/dist/esm/snk-application.entry.js +43 -9
- package/dist/esm/snk-attach.entry.js +392 -62
- package/dist/esm/snk-crud.entry.js +17 -12
- package/dist/esm/snk-data-exporter.entry.js +9 -5
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-4c343635.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +10 -12
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +44 -8
- package/dist/esm/snk-filter-item.entry.js +4 -47
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-modal.entry.js +2 -1
- package/dist/esm/snk-filter-multi-select.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +48 -28
- package/dist/esm/snk-form.entry.js +11 -4
- package/dist/esm/snk-grid.entry.js +41 -23
- package/dist/esm/{snk-guides-viewer-98a8e45e.js → snk-guides-viewer-18859840.js} +16 -11
- package/dist/esm/snk-guides-viewer.entry.js +8 -10
- package/dist/esm/snk-personalized-filter-editor.entry.js +3 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +229 -27
- package/dist/esm/snk-taskbar.entry.js +101 -15
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
- package/dist/sankhyablocks/p-1f3174cb.entry.js +1 -0
- package/dist/sankhyablocks/p-1fa5a18c.entry.js +11 -0
- package/dist/sankhyablocks/p-20b46647.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2897fb8c.js +1 -0
- package/dist/sankhyablocks/{p-ff6064e7.js → p-2936303b.js} +1 -1
- package/dist/sankhyablocks/p-2b909f08.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-50783a8b.js +1 -0
- package/dist/sankhyablocks/p-5c0b53ce.js +56 -0
- package/dist/sankhyablocks/p-5dbc1a3f.js +1 -0
- package/dist/sankhyablocks/p-60fa6c7a.js +1 -0
- package/dist/sankhyablocks/p-64c1b368.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-6b28cc74.entry.js} +1 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-7ddd95b6.entry.js} +1 -1
- package/dist/sankhyablocks/p-7e05bd83.entry.js +1 -0
- package/dist/sankhyablocks/p-7f97fee2.entry.js +1 -0
- package/dist/sankhyablocks/p-86801b08.entry.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-9a5d1b39.js} +1 -1
- package/dist/sankhyablocks/{p-0d7863ed.js → p-a13ccb86.js} +1 -1
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b41a622a.entry.js +1 -0
- package/dist/sankhyablocks/p-b4de81ac.entry.js +1 -0
- package/dist/sankhyablocks/p-ba4871b5.entry.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-be75153c.js} +1 -1
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-d01ceda6.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d304659d.entry.js +1 -0
- package/dist/sankhyablocks/p-d78d4062.js +65 -0
- package/dist/sankhyablocks/p-e4fb3308.entry.js +1 -0
- package/dist/sankhyablocks/p-e7dbe53a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +15 -0
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +27 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +31 -0
- package/dist/types/components/snk-attach/structure/{taskbar-builder.d.ts → builder/taskbar-builder.d.ts} +1 -1
- package/dist/types/components/snk-attach/structure/fetcher/facade/fetcher.facade.d.ts +11 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/anexo-sistema-data-unit.factory.d.ts +17 -0
- package/dist/types/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +6 -3
- package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +1 -2
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +24 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
- package/dist/types/components/snk-form/snk-form.d.ts +6 -1
- package/dist/types/components/{snk-form → snk-form-config}/SnkFormConfigManager.d.ts +1 -0
- package/dist/types/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.d.ts +5 -3
- package/dist/types/components/snk-grid/snk-grid.d.ts +20 -1
- package/dist/types/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.d.ts +11 -6
- package/dist/types/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/regular-buttons.d.ts +3 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +71 -4
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +28 -1
- package/dist/types/components.d.ts +265 -12
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +2 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +13 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-1d75d9f9.entry.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-41560fd8.entry.js +0 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-573a07c5.js +0 -1
- package/dist/sankhyablocks/p-6678d5d4.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-71439fd9.entry.js +0 -1
- package/dist/sankhyablocks/p-761ed32f.entry.js +0 -1
- package/dist/sankhyablocks/p-7d8d7fe9.entry.js +0 -1
- package/dist/sankhyablocks/p-90f9b4db.entry.js +0 -11
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a91bb13d.js +0 -1
- package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
- package/dist/sankhyablocks/p-aa95fb2c.js +0 -56
- package/dist/sankhyablocks/p-abfa8101.entry.js +0 -1
- package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
- package/dist/sankhyablocks/p-b3020263.entry.js +0 -1
- package/dist/sankhyablocks/p-bf93a748.js +0 -60
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c6f89389.entry.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-cebae710.entry.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-e6380c60.js +0 -1
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +0 -15
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js → components/snk-attach/interfaces/ICrudConfig.js} +0 -0
- /package/dist/collection/{lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js → components/snk-attach/interfaces/TFetcherType.js} +0 -0
- /package/dist/collection/components/{snk-form/subcomponents/snk-form-config → snk-form-config}/snk-form-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.js +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.css +0 -0
- /package/dist/collection/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.js +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents/snk-grid-config → snk-grid-config}/snk-grid-config.css +0 -0
- /package/dist/collection/components/{snk-grid/subcomponents → snk-grid-config}/snk-select-box/snk-select-box.css +0 -0
- /package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.js +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-config-options/snk-config-options.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-field-config/snk-field-config.d.ts +0 -0
- /package/dist/types/components/{snk-form → snk-form-config}/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDelete.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/IDownloadKey.d.ts +0 -0
- /package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/index.d.ts +0 -0
@@ -1,28 +1,32 @@
|
|
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';
|
12
|
+
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './regular-buttons';
|
10
13
|
export class SnkSimpleCrud {
|
11
14
|
constructor() {
|
12
|
-
this.REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
13
|
-
this.REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
14
15
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
15
16
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
16
17
|
this._taskbarProcessor = new TaskbarProcessor({
|
17
|
-
"snkSimpleCrudTaskbar.form_regular": this.
|
18
|
-
"snkSimpleCrudTaskbar.grid_regular": this.
|
19
|
-
"snkSimpleCrudTaskbar.form_selected": this.
|
20
|
-
"snkSimpleCrudTaskbar.grid_selected": this.
|
18
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
|
19
|
+
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
|
20
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, TaskbarElement.GRID_MODE),
|
21
|
+
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, TaskbarElement.FORM_MODE),
|
21
22
|
"snkSimpleCrudTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
22
23
|
});
|
24
|
+
this._showPopUpGridConfig = false;
|
25
|
+
this._showFormConfig = false;
|
23
26
|
this._currentViewMode = VIEW_MODE.GRID;
|
24
27
|
this._config = undefined;
|
25
28
|
this._fieldToGetFocus = undefined;
|
29
|
+
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
26
30
|
this.dataState = undefined;
|
27
31
|
this.dataUnit = undefined;
|
28
32
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
@@ -34,6 +38,24 @@ export class SnkSimpleCrud {
|
|
34
38
|
this.taskbarManager = undefined;
|
35
39
|
this.messagesBuilder = undefined;
|
36
40
|
this.useEnterLikeTab = false;
|
41
|
+
this.actionsList = undefined;
|
42
|
+
this.configName = undefined;
|
43
|
+
this.showConfiguratorButtons = undefined;
|
44
|
+
this.gridLegacyConfigName = undefined;
|
45
|
+
this.formLegacyConfigName = undefined;
|
46
|
+
}
|
47
|
+
getButtons(selected, changeModeBtn) {
|
48
|
+
return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
|
49
|
+
.concat(changeModeBtn));
|
50
|
+
}
|
51
|
+
addConfigButton(buttons) {
|
52
|
+
if (this.configName === undefined) {
|
53
|
+
return buttons;
|
54
|
+
}
|
55
|
+
return buttons.concat(TaskbarElement.CONFIGURATOR);
|
56
|
+
}
|
57
|
+
get application() {
|
58
|
+
return ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
37
59
|
}
|
38
60
|
resolveInMemoryBtns(taskbarButtons) {
|
39
61
|
const newTaskBarConfig = [...taskbarButtons];
|
@@ -53,7 +75,10 @@ export class SnkSimpleCrud {
|
|
53
75
|
}
|
54
76
|
actionClickListener(evt) {
|
55
77
|
const act = evt.detail;
|
56
|
-
if (act === TaskbarElement.
|
78
|
+
if (act === TaskbarElement.CONFIGURATOR) {
|
79
|
+
this._snkConfigurator.open();
|
80
|
+
}
|
81
|
+
else if (act === TaskbarElement.GRID_MODE) {
|
57
82
|
this.goToView(VIEW_MODE.GRID);
|
58
83
|
}
|
59
84
|
else if (act === TaskbarElement.FORM_MODE) {
|
@@ -71,8 +96,111 @@ export class SnkSimpleCrud {
|
|
71
96
|
this.dataStateChange.emit(newValue);
|
72
97
|
}
|
73
98
|
}
|
74
|
-
|
99
|
+
async observeFormLegacy() {
|
100
|
+
await this.handleUpdateFormLegacyConfig();
|
101
|
+
}
|
102
|
+
async observeGridLegacy() {
|
103
|
+
await this.handleUpdateGridLegacyConfig();
|
104
|
+
}
|
105
|
+
async handleUpdateGridLegacyConfig() {
|
106
|
+
if (this.gridLegacyConfigName) {
|
107
|
+
this.addGridLegacyConfigName();
|
108
|
+
if (this._gridConfigAlreadyLoaded) {
|
109
|
+
await this.loadGridConfig(true);
|
110
|
+
}
|
111
|
+
}
|
112
|
+
}
|
113
|
+
async handleUpdateFormLegacyConfig() {
|
114
|
+
var _a, _b, _c;
|
115
|
+
if (this.formLegacyConfigName) {
|
116
|
+
const legacyConfig = await this.fetchFormLegacyConfig();
|
117
|
+
if (!legacyConfig)
|
118
|
+
return;
|
119
|
+
const rawFields = (_c = (_b = (_a = legacyConfig === null || legacyConfig === void 0 ? void 0 : legacyConfig.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
|
120
|
+
const fields = Array.isArray(rawFields) ? rawFields : [rawFields];
|
121
|
+
const newConfig = { emptyConfig: false, fields: fields };
|
122
|
+
this.setFormConfig(newConfig, true);
|
123
|
+
this._formConfigManager.setConfig(this.formConfig);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
async fetchFormLegacyConfig() {
|
127
|
+
const payload = {
|
128
|
+
'requestBody': {
|
129
|
+
'config': {
|
130
|
+
'chave': this.formLegacyConfigName,
|
131
|
+
'tipo': 'T',
|
132
|
+
},
|
133
|
+
},
|
134
|
+
};
|
135
|
+
return await this.application.callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
|
136
|
+
}
|
137
|
+
openConfig(viewMode) {
|
138
|
+
this._snkConfigurator.close();
|
139
|
+
if (viewMode === VIEW_MODE.GRID) {
|
140
|
+
this.openGridConfig();
|
141
|
+
}
|
142
|
+
else if (viewMode === VIEW_MODE.FORM) {
|
143
|
+
this.openFormConfig();
|
144
|
+
}
|
145
|
+
}
|
146
|
+
openGridConfig() {
|
147
|
+
this._grid.getColumnsState()
|
148
|
+
.then((gridColumns) => {
|
149
|
+
this._snkGridConfig.columns = gridColumns.filter(c => c.name);
|
150
|
+
this._snkGridConfig.selectedIndex = 0;
|
151
|
+
this._showPopUpGridConfig = true;
|
152
|
+
});
|
153
|
+
}
|
154
|
+
openFormConfig() {
|
155
|
+
//No momento não daremos suporte para configuraçao de formulário quando houver legacy config
|
156
|
+
if (this.formLegacyConfigName)
|
157
|
+
return;
|
158
|
+
this._showFormConfig = true;
|
159
|
+
}
|
160
|
+
addGridLegacyConfigName() {
|
161
|
+
if (this.gridLegacyConfigName && this.configName) {
|
162
|
+
ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
|
163
|
+
}
|
164
|
+
}
|
165
|
+
loadGridConfig(forceUpdate) {
|
166
|
+
if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
|
167
|
+
return;
|
168
|
+
}
|
169
|
+
this._gridConfigAlreadyLoaded = true;
|
170
|
+
return new Promise((accept, reject) => {
|
171
|
+
ConfigStorage.loadGridConfig(this.configName, this._resourceID)
|
172
|
+
.then(config => {
|
173
|
+
this.setGridConfig(config);
|
174
|
+
accept();
|
175
|
+
})
|
176
|
+
.catch(reason => {
|
177
|
+
reject(reason);
|
178
|
+
});
|
179
|
+
});
|
180
|
+
}
|
181
|
+
async loadFormConfig() {
|
182
|
+
if (this._formConfigManager == undefined) {
|
183
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
|
184
|
+
this._formConfigManager.setConfig(this.formConfig);
|
185
|
+
}
|
186
|
+
if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
this._formConfigAlreadyLoaded = true;
|
190
|
+
this.setFormConfig(await this._formConfigManager.loadConfig());
|
191
|
+
}
|
192
|
+
async componentWillRender() {
|
193
|
+
this._resourceID = await this.application.getResourceID();
|
75
194
|
this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
|
195
|
+
if (this.configName === undefined) {
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
|
199
|
+
return;
|
200
|
+
}
|
201
|
+
await this.addGridLegacyConfigName();
|
202
|
+
this.loadGridConfig();
|
203
|
+
this.loadFormConfig();
|
76
204
|
}
|
77
205
|
componentWillLoad() {
|
78
206
|
this.processMetadata();
|
@@ -80,8 +208,7 @@ export class SnkSimpleCrud {
|
|
80
208
|
this.configDatasource();
|
81
209
|
}
|
82
210
|
configDatasource() {
|
83
|
-
|
84
|
-
this._multiSelectionListDataSource.setApplication(application);
|
211
|
+
this._multiSelectionListDataSource.setApplication(this.application);
|
85
212
|
this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
|
86
213
|
}
|
87
214
|
getTaskBarId() {
|
@@ -122,6 +249,20 @@ export class SnkSimpleCrud {
|
|
122
249
|
getRecords() {
|
123
250
|
return Promise.resolve(this.dataUnit.records);
|
124
251
|
}
|
252
|
+
/**
|
253
|
+
* Usado para abrir o configurator do CRUD
|
254
|
+
*/
|
255
|
+
async openConfigurator() {
|
256
|
+
var _a;
|
257
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
258
|
+
}
|
259
|
+
/**
|
260
|
+
* Usado para fechar o configurator do CRUD
|
261
|
+
*/
|
262
|
+
async closeConfigurator() {
|
263
|
+
var _a;
|
264
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close();
|
265
|
+
}
|
125
266
|
processMetadata() {
|
126
267
|
const fieldsMetadataElem = this._element.querySelectorAll("snk-field-metadata");
|
127
268
|
const fieldMetadata = [];
|
@@ -176,6 +317,14 @@ export class SnkSimpleCrud {
|
|
176
317
|
this.dataUnit.clearSelection();
|
177
318
|
}
|
178
319
|
}
|
320
|
+
handleConfiguratorEvent(evt, type) {
|
321
|
+
evt.stopImmediatePropagation();
|
322
|
+
if (type === 'SAVE') {
|
323
|
+
this.configuratorSave.emit();
|
324
|
+
return;
|
325
|
+
}
|
326
|
+
this.configuratorCancel.emit();
|
327
|
+
}
|
179
328
|
getColumnSearch(actionButton, item) {
|
180
329
|
if (this._columnSearch != undefined) {
|
181
330
|
return this._columnSearch;
|
@@ -217,7 +366,9 @@ export class SnkSimpleCrud {
|
|
217
366
|
return (_b = (_a = this.formConfig) === null || _a === void 0 ? void 0 : _a.fields) !== null && _b !== void 0 ? _b : this._formFields;
|
218
367
|
}
|
219
368
|
handleFormSetFields(fields) {
|
220
|
-
this._formFields
|
369
|
+
if (!ObjectUtils.equals(this._formFields, fields)) {
|
370
|
+
this._formFields = fields !== null && fields !== void 0 ? fields : [];
|
371
|
+
}
|
221
372
|
}
|
222
373
|
fieldsOptionLoader(argument) {
|
223
374
|
const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
|
@@ -232,7 +383,7 @@ export class SnkSimpleCrud {
|
|
232
383
|
}
|
233
384
|
getActionsList() {
|
234
385
|
var _a, _b;
|
235
|
-
|
386
|
+
const hardList = [{
|
236
387
|
value: StringUtils.generateUUID(),
|
237
388
|
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "Buscar",
|
238
389
|
disableCloseOnSelect: true,
|
@@ -241,6 +392,16 @@ export class SnkSimpleCrud {
|
|
241
392
|
? this.getColumnSearch(actionButton, item)
|
242
393
|
: this.getFieldSearch(actionButton, item)
|
243
394
|
}];
|
395
|
+
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
396
|
+
const taskbarID = this.getTopTaskBarId();
|
397
|
+
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
398
|
+
}
|
399
|
+
return hardList.concat(this.actionsList);
|
400
|
+
}
|
401
|
+
getTopTaskBarId() {
|
402
|
+
var _a;
|
403
|
+
return ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? `snkGridTopTaskbar.finish_edition${PresentationMode.PRIMARY}` :
|
404
|
+
`snkGridTopTaskbar.regular${PresentationMode.PRIMARY}`;
|
244
405
|
}
|
245
406
|
async keyDownListener(event) {
|
246
407
|
if (!event.ctrlKey || event.key == undefined || event.key.toUpperCase() !== "F") {
|
@@ -279,11 +440,48 @@ export class SnkSimpleCrud {
|
|
279
440
|
disconnectedCallback() {
|
280
441
|
window.removeEventListener("keydown", this._keyDownHandler);
|
281
442
|
}
|
443
|
+
gridConfigChangeHandler(evt) {
|
444
|
+
const config = evt.detail;
|
445
|
+
ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
|
446
|
+
evt.stopPropagation();
|
447
|
+
}
|
448
|
+
modalConfigChangeHandler(evt) {
|
449
|
+
const config = evt.detail;
|
450
|
+
this._grid.setColumnsState(config.columns)
|
451
|
+
.then(() => {
|
452
|
+
this.setGridConfig(config);
|
453
|
+
this.closeGridConfig();
|
454
|
+
});
|
455
|
+
evt.stopPropagation();
|
456
|
+
}
|
457
|
+
setGridConfig(config) {
|
458
|
+
this.gridConfig = config;
|
459
|
+
CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
460
|
+
}
|
461
|
+
setFormConfig(config, forceUpdate) {
|
462
|
+
if (this.formConfig && !forceUpdate)
|
463
|
+
return;
|
464
|
+
this.formConfig = config;
|
465
|
+
}
|
466
|
+
closeGridConfig() {
|
467
|
+
this._showPopUpGridConfig = false;
|
468
|
+
}
|
469
|
+
closeFormConfig() {
|
470
|
+
this._showFormConfig = false;
|
471
|
+
}
|
472
|
+
//No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
|
473
|
+
handleShowFormConfig() {
|
474
|
+
return this._showFormConfig && !this.formLegacyConfigName;
|
475
|
+
}
|
476
|
+
/* istanbul ignore next */
|
282
477
|
render() {
|
283
|
-
var _a;
|
284
|
-
|
478
|
+
var _a, _b, _c;
|
479
|
+
if (this.dataUnit == undefined) {
|
480
|
+
return;
|
481
|
+
}
|
482
|
+
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
483
|
? 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.
|
484
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
|
287
485
|
}
|
288
486
|
static get is() { return "snk-simple-crud"; }
|
289
487
|
static get encapsulation() { return "scoped"; }
|
@@ -364,7 +562,7 @@ export class SnkSimpleCrud {
|
|
364
562
|
},
|
365
563
|
"gridConfig": {
|
366
564
|
"type": "unknown",
|
367
|
-
"mutable":
|
565
|
+
"mutable": true,
|
368
566
|
"complexType": {
|
369
567
|
"original": "IGridConfig",
|
370
568
|
"resolved": "IGridConfig",
|
@@ -494,14 +692,108 @@ export class SnkSimpleCrud {
|
|
494
692
|
"attribute": "use-enter-like-tab",
|
495
693
|
"reflect": false,
|
496
694
|
"defaultValue": "false"
|
695
|
+
},
|
696
|
+
"actionsList": {
|
697
|
+
"type": "unknown",
|
698
|
+
"mutable": false,
|
699
|
+
"complexType": {
|
700
|
+
"original": "Array<Action>",
|
701
|
+
"resolved": "Action[]",
|
702
|
+
"references": {
|
703
|
+
"Array": {
|
704
|
+
"location": "global"
|
705
|
+
},
|
706
|
+
"Action": {
|
707
|
+
"location": "import",
|
708
|
+
"path": "../snk-taskbar/snk-taskbar"
|
709
|
+
}
|
710
|
+
}
|
711
|
+
},
|
712
|
+
"required": false,
|
713
|
+
"optional": false,
|
714
|
+
"docs": {
|
715
|
+
"tags": [],
|
716
|
+
"text": "A\u00E7\u00F5es a serem colocadas no bot\u00E3o \"Mais op\u00E7\u00F5es\" do componente snk-taskbar."
|
717
|
+
}
|
718
|
+
},
|
719
|
+
"configName": {
|
720
|
+
"type": "string",
|
721
|
+
"mutable": true,
|
722
|
+
"complexType": {
|
723
|
+
"original": "string",
|
724
|
+
"resolved": "string",
|
725
|
+
"references": {}
|
726
|
+
},
|
727
|
+
"required": false,
|
728
|
+
"optional": false,
|
729
|
+
"docs": {
|
730
|
+
"tags": [],
|
731
|
+
"text": "Usado para salvar as configura\u00E7\u00F5es dos blocos de constru\u00E7\u00E3o."
|
732
|
+
},
|
733
|
+
"attribute": "config-name",
|
734
|
+
"reflect": false
|
735
|
+
},
|
736
|
+
"showConfiguratorButtons": {
|
737
|
+
"type": "boolean",
|
738
|
+
"mutable": false,
|
739
|
+
"complexType": {
|
740
|
+
"original": "boolean",
|
741
|
+
"resolved": "boolean",
|
742
|
+
"references": {}
|
743
|
+
},
|
744
|
+
"required": false,
|
745
|
+
"optional": false,
|
746
|
+
"docs": {
|
747
|
+
"tags": [],
|
748
|
+
"text": "Usado para exibir os bot\u00F5es de a\u00E7\u00E3o do snk-configurator."
|
749
|
+
},
|
750
|
+
"attribute": "show-configurator-buttons",
|
751
|
+
"reflect": false
|
752
|
+
},
|
753
|
+
"gridLegacyConfigName": {
|
754
|
+
"type": "string",
|
755
|
+
"mutable": false,
|
756
|
+
"complexType": {
|
757
|
+
"original": "string",
|
758
|
+
"resolved": "string",
|
759
|
+
"references": {}
|
760
|
+
},
|
761
|
+
"required": false,
|
762
|
+
"optional": false,
|
763
|
+
"docs": {
|
764
|
+
"tags": [],
|
765
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grade."
|
766
|
+
},
|
767
|
+
"attribute": "grid-legacy-config-name",
|
768
|
+
"reflect": false
|
769
|
+
},
|
770
|
+
"formLegacyConfigName": {
|
771
|
+
"type": "string",
|
772
|
+
"mutable": false,
|
773
|
+
"complexType": {
|
774
|
+
"original": "string",
|
775
|
+
"resolved": "string",
|
776
|
+
"references": {}
|
777
|
+
},
|
778
|
+
"required": false,
|
779
|
+
"optional": false,
|
780
|
+
"docs": {
|
781
|
+
"tags": [],
|
782
|
+
"text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
|
783
|
+
},
|
784
|
+
"attribute": "form-legacy-config-name",
|
785
|
+
"reflect": false
|
497
786
|
}
|
498
787
|
};
|
499
788
|
}
|
500
789
|
static get states() {
|
501
790
|
return {
|
791
|
+
"_showPopUpGridConfig": {},
|
792
|
+
"_showFormConfig": {},
|
502
793
|
"_currentViewMode": {},
|
503
794
|
"_config": {},
|
504
795
|
"_fieldToGetFocus": {},
|
796
|
+
"_customContainerId": {},
|
505
797
|
"_formFields": {}
|
506
798
|
};
|
507
799
|
}
|
@@ -583,6 +875,36 @@ export class SnkSimpleCrud {
|
|
583
875
|
}
|
584
876
|
}
|
585
877
|
}
|
878
|
+
}, {
|
879
|
+
"method": "configuratorSave",
|
880
|
+
"name": "configuratorSave",
|
881
|
+
"bubbles": true,
|
882
|
+
"cancelable": true,
|
883
|
+
"composed": true,
|
884
|
+
"docs": {
|
885
|
+
"tags": [],
|
886
|
+
"text": "Emitido quando salva a configura\u00E7\u00E3o no configurator do CRUD."
|
887
|
+
},
|
888
|
+
"complexType": {
|
889
|
+
"original": "any",
|
890
|
+
"resolved": "any",
|
891
|
+
"references": {}
|
892
|
+
}
|
893
|
+
}, {
|
894
|
+
"method": "configuratorCancel",
|
895
|
+
"name": "configuratorCancel",
|
896
|
+
"bubbles": true,
|
897
|
+
"cancelable": true,
|
898
|
+
"composed": true,
|
899
|
+
"docs": {
|
900
|
+
"tags": [],
|
901
|
+
"text": "Emitido quando cancela o salvamento da configura\u00E7\u00E3o no configurator do CRUD."
|
902
|
+
},
|
903
|
+
"complexType": {
|
904
|
+
"original": "any",
|
905
|
+
"resolved": "any",
|
906
|
+
"references": {}
|
907
|
+
}
|
586
908
|
}];
|
587
909
|
}
|
588
910
|
static get methods() {
|
@@ -681,6 +1003,38 @@ export class SnkSimpleCrud {
|
|
681
1003
|
"text": "",
|
682
1004
|
"tags": []
|
683
1005
|
}
|
1006
|
+
},
|
1007
|
+
"openConfigurator": {
|
1008
|
+
"complexType": {
|
1009
|
+
"signature": "() => Promise<void>",
|
1010
|
+
"parameters": [],
|
1011
|
+
"references": {
|
1012
|
+
"Promise": {
|
1013
|
+
"location": "global"
|
1014
|
+
}
|
1015
|
+
},
|
1016
|
+
"return": "Promise<void>"
|
1017
|
+
},
|
1018
|
+
"docs": {
|
1019
|
+
"text": "Usado para abrir o configurator do CRUD",
|
1020
|
+
"tags": []
|
1021
|
+
}
|
1022
|
+
},
|
1023
|
+
"closeConfigurator": {
|
1024
|
+
"complexType": {
|
1025
|
+
"signature": "() => Promise<void>",
|
1026
|
+
"parameters": [],
|
1027
|
+
"references": {
|
1028
|
+
"Promise": {
|
1029
|
+
"location": "global"
|
1030
|
+
}
|
1031
|
+
},
|
1032
|
+
"return": "Promise<void>"
|
1033
|
+
},
|
1034
|
+
"docs": {
|
1035
|
+
"text": "Usado para fechar o configurator do CRUD",
|
1036
|
+
"tags": []
|
1037
|
+
}
|
684
1038
|
}
|
685
1039
|
};
|
686
1040
|
}
|
@@ -692,6 +1046,12 @@ export class SnkSimpleCrud {
|
|
692
1046
|
}, {
|
693
1047
|
"propName": "dataState",
|
694
1048
|
"methodName": "observeDataState"
|
1049
|
+
}, {
|
1050
|
+
"propName": "formLegacyConfigName",
|
1051
|
+
"methodName": "observeFormLegacy"
|
1052
|
+
}, {
|
1053
|
+
"propName": "gridLegacyConfigName",
|
1054
|
+
"methodName": "observeGridLegacy"
|
695
1055
|
}];
|
696
1056
|
}
|
697
1057
|
static get listeners() {
|
@@ -67,7 +67,7 @@ export class TaskbarActionsButton {
|
|
67
67
|
}
|
68
68
|
}
|
69
69
|
getSelectedAction(id, actions) {
|
70
|
-
let selectedItem;
|
70
|
+
let selectedItem = null;
|
71
71
|
for (const item of actions) {
|
72
72
|
if (item.id === id) {
|
73
73
|
selectedItem = item;
|
@@ -76,6 +76,8 @@ export class TaskbarActionsButton {
|
|
76
76
|
if (!(item === null || item === void 0 ? void 0 : item.children))
|
77
77
|
continue;
|
78
78
|
selectedItem = this.getSelectedAction(id, item.children);
|
79
|
+
if (selectedItem)
|
80
|
+
break;
|
79
81
|
}
|
80
82
|
return selectedItem;
|
81
83
|
}
|
@@ -116,7 +118,7 @@ export class TaskbarActionsButton {
|
|
116
118
|
this.taskbarActionsButtonDisconnected.emit();
|
117
119
|
}
|
118
120
|
render() {
|
119
|
-
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) }))));
|
120
122
|
}
|
121
123
|
static get is() { return "taskbar-actions-button"; }
|
122
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
|
-
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-
|
91
|
+
return h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--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
|
}
|