@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,4 +1,4 @@
|
|
1
|
-
import { ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
1
|
+
import { ApplicationContext, ElementIDUtils, OverflowDirection, OverflowWatcher, StringUtils, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
|
2
2
|
import { h, Host } from '@stencil/core';
|
3
3
|
import { AuthorizationConfig } from '../snk-configurator/AuthorizationConfig';
|
4
4
|
import { AuthorizationElements, buildCustomButton, buildElem, TaskbarElement, VisibleWhenForbidden, } from './elements/taskbar-elements';
|
@@ -6,6 +6,9 @@ import { PresentationMode } from '../../lib/@types';
|
|
6
6
|
export class SnkTaskbar {
|
7
7
|
constructor() {
|
8
8
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
9
|
+
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
10
|
+
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
11
|
+
this.NOT_OVERFLOW_ELEMENTS = ["moreOptions", "dataExporter_snkDataExporter", "actionsButton_snkActionsButton"];
|
9
12
|
this._titleKeyByElement = {
|
10
13
|
[TaskbarElement.UPDATE]: "snkTaskbar.titleUpdate",
|
11
14
|
[TaskbarElement.PREVIOUS]: "snkTaskbar.titlePrevious",
|
@@ -23,11 +26,15 @@ export class SnkTaskbar {
|
|
23
26
|
[TaskbarElement.ATTACH]: "snkTaskbar.titleAttach",
|
24
27
|
};
|
25
28
|
this._permissions = undefined;
|
29
|
+
this._overFlowedElements = [];
|
26
30
|
this._customElements = undefined;
|
27
31
|
this._customElementsId = undefined;
|
28
32
|
this._slotContainer = undefined;
|
33
|
+
this._hiddenActionsList = [];
|
34
|
+
this.alignRigth = false;
|
29
35
|
this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
|
30
36
|
this.customContainerId = undefined;
|
37
|
+
this.overflowStrategy = 'hiddenItems';
|
31
38
|
this.configName = undefined;
|
32
39
|
this.resourceID = undefined;
|
33
40
|
this.buttons = undefined;
|
@@ -41,6 +48,13 @@ export class SnkTaskbar {
|
|
41
48
|
}
|
42
49
|
observeButtons() {
|
43
50
|
this._definitions = undefined;
|
51
|
+
requestAnimationFrame(() => {
|
52
|
+
requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
|
53
|
+
});
|
54
|
+
}
|
55
|
+
observeDisabledButtons() {
|
56
|
+
var _a;
|
57
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
|
44
58
|
}
|
45
59
|
// Internal methods
|
46
60
|
elementsFromString(strButtons) {
|
@@ -136,12 +150,19 @@ export class SnkTaskbar {
|
|
136
150
|
}
|
137
151
|
const taskbarElement = TaskbarElement[def.toString()];
|
138
152
|
if (taskbarElement) {
|
139
|
-
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.
|
153
|
+
return buildElem(def, className, this.getIdElemBtnNative(def), elem => this.getTitle(elem), elem => this.elementClick(elem), elem => this.isEnabled(elem), this.buildDynamicActionsList(), this.configName, this.presentationMode);
|
140
154
|
}
|
141
155
|
else {
|
142
156
|
return buildCustomButton(def, className, this.getIdElemBtnCustom(def), elem => this.elementClick(elem), elem => this.isEnabled(elem));
|
143
157
|
}
|
144
158
|
}
|
159
|
+
buildDynamicActionsList() {
|
160
|
+
var _a;
|
161
|
+
if (this._hiddenActionsList.length) {
|
162
|
+
return [...((_a = this.actionsList) !== null && _a !== void 0 ? _a : []), { type: 'divider', label: "", value: "" }, ...this._hiddenActionsList];
|
163
|
+
}
|
164
|
+
return this.actionsList;
|
165
|
+
}
|
145
166
|
getIdElemBtnNative(taskbarElem) {
|
146
167
|
return StringUtils.toCamelCase(taskbarElem);
|
147
168
|
}
|
@@ -182,11 +203,13 @@ export class SnkTaskbar {
|
|
182
203
|
});
|
183
204
|
}
|
184
205
|
addCustomElementContainer(elem) {
|
206
|
+
var _a;
|
185
207
|
const elementId = `${this.TASKBAR_ITEM_ID_PREFIX}${elem}`;
|
186
208
|
if (!this._customElementsId.includes(elementId)) {
|
187
209
|
this._customElementsId.push(elementId);
|
210
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.addNotOverFlowElement(elementId);
|
188
211
|
}
|
189
|
-
return h("span", { key: elementId, id: elementId });
|
212
|
+
return h("span", { class: "ez-padding-left--medium", key: elementId, id: elementId });
|
190
213
|
}
|
191
214
|
getCustomElements() {
|
192
215
|
var _a, _b;
|
@@ -221,15 +244,76 @@ export class SnkTaskbar {
|
|
221
244
|
}
|
222
245
|
this.validatePresentationMode();
|
223
246
|
}
|
247
|
+
handleOverFlow(overFlowingElements) {
|
248
|
+
const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
|
249
|
+
this.resetOverFlowedElements();
|
250
|
+
this.doOverFlowElements(elementsToHandle);
|
251
|
+
}
|
252
|
+
resetOverFlowedElements() {
|
253
|
+
this._overFlowedElements.forEach(element => {
|
254
|
+
element.classList.remove(OVERFLOWED_CLASS_NAME);
|
255
|
+
});
|
256
|
+
this._hiddenActionsList = [];
|
257
|
+
this._overFlowedElements = [];
|
258
|
+
}
|
259
|
+
doOverFlowElements(overFlowedElements) {
|
260
|
+
overFlowedElements.forEach(element => {
|
261
|
+
element.classList.add(OVERFLOWED_CLASS_NAME);
|
262
|
+
this._overFlowedElements.push(element);
|
263
|
+
this.addItemToActionList(element);
|
264
|
+
});
|
265
|
+
}
|
266
|
+
addItemToActionList(element) {
|
267
|
+
const taskbarElement = this.getTaskbarElementName(element);
|
268
|
+
if (taskbarElement && this.isEnabled(taskbarElement) && this.isAllowed(taskbarElement)) {
|
269
|
+
const optionItem = {
|
270
|
+
value: taskbarElement,
|
271
|
+
label: this.getTaskbarElementLabel(element),
|
272
|
+
iconName: this.getTaskbarElementIcon(element)
|
273
|
+
};
|
274
|
+
this._hiddenActionsList.push(optionItem);
|
275
|
+
}
|
276
|
+
}
|
277
|
+
getTaskbarElementName(element) {
|
278
|
+
var _a;
|
279
|
+
return (_a = element.getAttribute('data-taskbar-element')) !== null && _a !== void 0 ? _a : "";
|
280
|
+
}
|
281
|
+
getTaskbarElementIcon(element) {
|
282
|
+
var _a;
|
283
|
+
return (_a = element.getAttribute('data-taskbar-icon')) !== null && _a !== void 0 ? _a : "";
|
284
|
+
}
|
285
|
+
getTaskbarElementLabel(element) {
|
286
|
+
var _a;
|
287
|
+
return (_a = element.getAttribute('data-taskbar-label')) !== null && _a !== void 0 ? _a : "";
|
288
|
+
}
|
289
|
+
hasToIgnoreOverFlow(element) {
|
290
|
+
return element.classList.contains(this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME);
|
291
|
+
}
|
292
|
+
handleOverFlowStrategy() {
|
293
|
+
if (this.overflowStrategy === 'hiddenItems') {
|
294
|
+
this._overFlowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
|
295
|
+
}
|
296
|
+
}
|
297
|
+
buildOverFlowWatcherParams() {
|
298
|
+
return {
|
299
|
+
element: this._element,
|
300
|
+
callback: this.handleOverFlow.bind(this),
|
301
|
+
overFlowDirection: OverflowDirection.HORIZONTAL,
|
302
|
+
notOverFlow: this.NOT_OVERFLOW_ELEMENTS
|
303
|
+
};
|
304
|
+
}
|
224
305
|
componentDidLoad() {
|
225
306
|
const dataInfo = { dataUnit: this.dataUnit };
|
226
307
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
308
|
+
this.handleOverFlowStrategy();
|
227
309
|
}
|
228
310
|
componentDidRender() {
|
229
311
|
this.appendCustomElementsInTaskbar();
|
230
312
|
}
|
231
313
|
disconnectedCallback() {
|
314
|
+
var _a;
|
232
315
|
this.unlinkAllCustomElements();
|
316
|
+
(_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
|
233
317
|
}
|
234
318
|
unlinkAllCustomElements() {
|
235
319
|
var _a;
|
@@ -247,14 +331,9 @@ export class SnkTaskbar {
|
|
247
331
|
return undefined;
|
248
332
|
}
|
249
333
|
let index = 0;
|
250
|
-
return (h(Host,
|
251
|
-
var _a;
|
252
|
-
|
253
|
-
index = 0;
|
254
|
-
}
|
255
|
-
else {
|
256
|
-
index++;
|
257
|
-
}
|
334
|
+
return (h(Host, { class: this.getHostClasses() }, this.removeEmpty(this._definitions.map((elem) => {
|
335
|
+
var _a, _b;
|
336
|
+
index++;
|
258
337
|
if (TaskbarElement[elem]) {
|
259
338
|
return this.getElement(index, TaskbarElement[elem]);
|
260
339
|
}
|
@@ -264,8 +343,14 @@ export class SnkTaskbar {
|
|
264
343
|
if (this._customElements.has(elem)) {
|
265
344
|
return this.addCustomElementContainer(elem);
|
266
345
|
}
|
346
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.addNotOverFlowElement(elem);
|
267
347
|
return h("slot", { name: elem });
|
268
|
-
})), h("div", { class:
|
348
|
+
})), h("div", { class: this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME }, h("slot", { name: this.customSlotId }))));
|
349
|
+
}
|
350
|
+
getHostClasses() {
|
351
|
+
if (this.overflowStrategy !== 'hiddenItems')
|
352
|
+
return 'no-wrap';
|
353
|
+
return `full-width ${this.alignRigth ? 'align-right' : ""}`;
|
269
354
|
}
|
270
355
|
static get is() { return "snk-taskbar"; }
|
271
356
|
static get encapsulation() { return "scoped"; }
|
@@ -281,6 +366,24 @@ export class SnkTaskbar {
|
|
281
366
|
}
|
282
367
|
static get properties() {
|
283
368
|
return {
|
369
|
+
"alignRigth": {
|
370
|
+
"type": "boolean",
|
371
|
+
"mutable": false,
|
372
|
+
"complexType": {
|
373
|
+
"original": "boolean",
|
374
|
+
"resolved": "boolean",
|
375
|
+
"references": {}
|
376
|
+
},
|
377
|
+
"required": false,
|
378
|
+
"optional": false,
|
379
|
+
"docs": {
|
380
|
+
"tags": [],
|
381
|
+
"text": "Usado para determinar O alinhamento dos items na taskbar."
|
382
|
+
},
|
383
|
+
"attribute": "align-rigth",
|
384
|
+
"reflect": false,
|
385
|
+
"defaultValue": "false"
|
386
|
+
},
|
284
387
|
"customSlotId": {
|
285
388
|
"type": "string",
|
286
389
|
"mutable": false,
|
@@ -316,6 +419,24 @@ export class SnkTaskbar {
|
|
316
419
|
"attribute": "custom-container-id",
|
317
420
|
"reflect": false
|
318
421
|
},
|
422
|
+
"overflowStrategy": {
|
423
|
+
"type": "string",
|
424
|
+
"mutable": false,
|
425
|
+
"complexType": {
|
426
|
+
"original": "'hiddenItems' | 'none'",
|
427
|
+
"resolved": "\"hiddenItems\" | \"none\"",
|
428
|
+
"references": {}
|
429
|
+
},
|
430
|
+
"required": false,
|
431
|
+
"optional": false,
|
432
|
+
"docs": {
|
433
|
+
"tags": [],
|
434
|
+
"text": "Define como ser\u00E1 o comportamento da taskbar quando ocorrer overflow"
|
435
|
+
},
|
436
|
+
"attribute": "overflow-strategy",
|
437
|
+
"reflect": false,
|
438
|
+
"defaultValue": "'hiddenItems'"
|
439
|
+
},
|
319
440
|
"configName": {
|
320
441
|
"type": "string",
|
321
442
|
"mutable": false,
|
@@ -515,9 +636,11 @@ export class SnkTaskbar {
|
|
515
636
|
static get states() {
|
516
637
|
return {
|
517
638
|
"_permissions": {},
|
639
|
+
"_overFlowedElements": {},
|
518
640
|
"_customElements": {},
|
519
641
|
"_customElementsId": {},
|
520
|
-
"_slotContainer": {}
|
642
|
+
"_slotContainer": {},
|
643
|
+
"_hiddenActionsList": {}
|
521
644
|
};
|
522
645
|
}
|
523
646
|
static get events() {
|
@@ -543,6 +666,9 @@ export class SnkTaskbar {
|
|
543
666
|
return [{
|
544
667
|
"propName": "buttons",
|
545
668
|
"methodName": "observeButtons"
|
669
|
+
}, {
|
670
|
+
"propName": "disabledButtons",
|
671
|
+
"methodName": "observeDisabledButtons"
|
546
672
|
}];
|
547
673
|
}
|
548
674
|
}
|
@@ -2,18 +2,37 @@ import { FormConfigFetcher } from "../http/data-fetcher/fetchers/form-config-fet
|
|
2
2
|
import GridConfigFetcher from "../http/data-fetcher/fetchers/grid-config-fetcher";
|
3
3
|
import FilterBarConfigFetcher from "../http/data-fetcher/fetchers/filter-bar-config-fetcher";
|
4
4
|
import PersonalizedFilterFetcher from "../http/data-fetcher/fetchers/personalized-filter-fetcher";
|
5
|
-
var CONFIG_SOURCE;
|
5
|
+
export var CONFIG_SOURCE;
|
6
6
|
(function (CONFIG_SOURCE) {
|
7
7
|
CONFIG_SOURCE["form"] = "form";
|
8
8
|
CONFIG_SOURCE["grid"] = "grid";
|
9
9
|
CONFIG_SOURCE["filterBar"] = "filterBar";
|
10
10
|
})(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
|
11
11
|
export class ConfigStorage {
|
12
|
-
static
|
12
|
+
static addFilterBarLegacyConfig(configName, legacyConfigName) {
|
13
|
+
this.validateConfigName(configName, legacyConfigName);
|
14
|
+
this.filterBarLegacyConfig.set(configName, legacyConfigName);
|
15
|
+
}
|
16
|
+
static addFormLegacyConfig(configName, legacyConfigName) {
|
17
|
+
this.validateConfigName(configName, legacyConfigName);
|
18
|
+
this.formLegacyConfig.set(configName, legacyConfigName);
|
19
|
+
}
|
20
|
+
static addGridLegacyConfig(configName, legacyConfigName) {
|
21
|
+
this.validateConfigName(configName, legacyConfigName);
|
22
|
+
this.gridLegacyConfig.set(configName, legacyConfigName);
|
23
|
+
}
|
24
|
+
static preload(resourceID, configName, legacyConfigs) {
|
25
|
+
if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.gridLegacyConfig)) {
|
26
|
+
ConfigStorage.addGridLegacyConfig(configName, legacyConfigs.gridLegacyConfig);
|
27
|
+
}
|
28
|
+
if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.formLegacyConfig)) {
|
29
|
+
ConfigStorage.addFormLegacyConfig(configName, legacyConfigs.formLegacyConfig);
|
30
|
+
}
|
13
31
|
ConfigStorage.loadFormConfig(configName, resourceID);
|
14
32
|
ConfigStorage.loadGridConfig(configName, resourceID);
|
15
33
|
}
|
16
34
|
static async loadFilterBarConfig(name, resourceID, urlParams) {
|
35
|
+
urlParams = this.handleLegacyConfig(name, CONFIG_SOURCE.filterBar, urlParams);
|
17
36
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
|
18
37
|
if (!ConfigStorage.configById.has(cacheID)) {
|
19
38
|
ConfigStorage.configById.set(cacheID, ConfigStorage.filterBarConfigFetcher.getConfig(resourceID, name, urlParams));
|
@@ -21,6 +40,7 @@ export class ConfigStorage {
|
|
21
40
|
return ConfigStorage.configById.get(cacheID);
|
22
41
|
}
|
23
42
|
static async loadFormConfig(name, resourceID) {
|
43
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
|
24
44
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
|
25
45
|
if (!ConfigStorage.configById.has(cacheID)) {
|
26
46
|
ConfigStorage.configById.set(cacheID, ConfigStorage.formConfigFetcher.loadFormConfig(name, resourceID));
|
@@ -28,6 +48,7 @@ export class ConfigStorage {
|
|
28
48
|
return ConfigStorage.configById.get(cacheID);
|
29
49
|
}
|
30
50
|
static async loadGridConfig(name, resourceID) {
|
51
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
31
52
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
|
32
53
|
if (!ConfigStorage.configById.has(cacheID)) {
|
33
54
|
ConfigStorage.configById.set(cacheID, ConfigStorage.gridConfigFetcher.getConfig(name, resourceID));
|
@@ -39,6 +60,7 @@ export class ConfigStorage {
|
|
39
60
|
return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
|
40
61
|
}
|
41
62
|
static async saveFormConfig(config, name, resourceID) {
|
63
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
|
42
64
|
await this.deleteFormConfigCache(name, resourceID);
|
43
65
|
return this.formConfigFetcher.saveConfig(config, name, resourceID);
|
44
66
|
}
|
@@ -53,7 +75,8 @@ export class ConfigStorage {
|
|
53
75
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
54
76
|
}
|
55
77
|
static async loadPersonalizedFilter(filterId, resourceID, configName) {
|
56
|
-
|
78
|
+
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
79
|
+
return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
|
57
80
|
}
|
58
81
|
static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
59
82
|
//Ao criar ou alterar um filtro personalizado,
|
@@ -76,6 +99,38 @@ export class ConfigStorage {
|
|
76
99
|
static async deleteFilterBarConfigCache(name, resourceID) {
|
77
100
|
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
|
78
101
|
}
|
102
|
+
static validateConfigName(configName, legacyConfigName) {
|
103
|
+
if (!configName)
|
104
|
+
throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
|
105
|
+
if (!legacyConfigName)
|
106
|
+
throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
|
107
|
+
}
|
108
|
+
static handleLegacyConfig(configName, configSource, urlParams) {
|
109
|
+
let legacyConfigName;
|
110
|
+
switch (configSource) {
|
111
|
+
case CONFIG_SOURCE.filterBar:
|
112
|
+
legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
113
|
+
break;
|
114
|
+
case CONFIG_SOURCE.grid:
|
115
|
+
legacyConfigName = this.gridLegacyConfig.get(configName);
|
116
|
+
break;
|
117
|
+
case CONFIG_SOURCE.form:
|
118
|
+
legacyConfigName = this.formLegacyConfig.get(configName);
|
119
|
+
}
|
120
|
+
const params = urlParams ? Object.assign({}, urlParams) : {};
|
121
|
+
if (legacyConfigName) {
|
122
|
+
params['legacyResourceID'] = legacyConfigName;
|
123
|
+
}
|
124
|
+
return params;
|
125
|
+
}
|
126
|
+
static handleLegacyConfigAsString(name, source) {
|
127
|
+
const params = this.handleLegacyConfig(name, source);
|
128
|
+
const legacyResourceID = params['legacyResourceID'];
|
129
|
+
if (legacyResourceID) {
|
130
|
+
name = name + `?legacyResourceID=${legacyResourceID}`;
|
131
|
+
}
|
132
|
+
return name;
|
133
|
+
}
|
79
134
|
static async deleteConfigCache(name, resourceID, source) {
|
80
135
|
const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
|
81
136
|
this.configById.delete(cacheID);
|
@@ -87,6 +142,11 @@ export class ConfigStorage {
|
|
87
142
|
return `req_${source}_${name}_${resourceID}`;
|
88
143
|
}
|
89
144
|
}
|
145
|
+
ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
|
146
|
+
ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
|
147
|
+
ConfigStorage.filterBarLegacyConfig = new Map();
|
148
|
+
ConfigStorage.formLegacyConfig = new Map();
|
149
|
+
ConfigStorage.gridLegacyConfig = new Map();
|
90
150
|
ConfigStorage.configById = new Map();
|
91
151
|
ConfigStorage.filterBarConfigFetcher = new FilterBarConfigFetcher();
|
92
152
|
ConfigStorage.formConfigFetcher = new FormConfigFetcher();
|
@@ -13,7 +13,7 @@ export default class InMemoryLoader {
|
|
13
13
|
this.dataUnit.loadMetadata().then(() => this.dataUnit.loadData());
|
14
14
|
}
|
15
15
|
getRecordsToLoad() {
|
16
|
-
if (this._initialRecords == undefined
|
16
|
+
if (this._initialRecords == undefined || this.dataUnit.records.length > 0) {
|
17
17
|
this._initialRecords = this.dataUnit.records;
|
18
18
|
}
|
19
19
|
return this._initialRecords;
|
@@ -275,7 +275,6 @@ export class DataFetcher {
|
|
275
275
|
if (http.readyState == 4 && http.status == 200) {
|
276
276
|
try {
|
277
277
|
const jsonResp = JSON.parse(http.responseText);
|
278
|
-
await this.processServiceBrokerClientEvents({ clientEvents: jsonResp === null || jsonResp === void 0 ? void 0 : jsonResp.clientEvents, serviceName, payloadJson, accept, reject });
|
279
278
|
/**
|
280
279
|
* Este trecho difere do projeto HTML5 devido à decisão de adotar uma abordagem síncrona para esta chamada. Isso é justificado pelo fato de que, no cenário em questão, a abordagem assíncrona teria impactos negativos.
|
281
280
|
*
|
@@ -286,8 +285,10 @@ export class DataFetcher {
|
|
286
285
|
if (this.isServiceBrokerError(jsonResp)) {
|
287
286
|
reject(this.processServiceBrokerErrorInfo(jsonResp));
|
288
287
|
}
|
289
|
-
else if (jsonResp.status == DataFetcher.SERVICE_BROKER_STATUS.SERVICE_CANCELED
|
290
|
-
|
288
|
+
else if (jsonResp.status == DataFetcher.SERVICE_BROKER_STATUS.SERVICE_CANCELED) {
|
289
|
+
if (jsonResp.statusMessage) {
|
290
|
+
console.debug(`[DataFetcher] ${jsonResp.statusMessage}`);
|
291
|
+
}
|
291
292
|
}
|
292
293
|
else {
|
293
294
|
accept(jsonResp.responseBody);
|
@@ -295,6 +296,7 @@ export class DataFetcher {
|
|
295
296
|
(_a = this.application) === null || _a === void 0 ? void 0 : _a.info(jsonResp.statusMessage);
|
296
297
|
}
|
297
298
|
}
|
299
|
+
this.processServiceBrokerClientEvents({ clientEvents: jsonResp === null || jsonResp === void 0 ? void 0 : jsonResp.clientEvents, serviceName, payloadJson, accept, reject });
|
298
300
|
}
|
299
301
|
catch (err) {
|
300
302
|
console.warn(`Erro ao executar serviço: ${err}`);
|
@@ -1,6 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
|
1
|
+
import { SaveErrorsEnum } from "./interfaces";
|
2
|
+
import { DataFetcher } from "../../DataFetcher";
|
3
|
+
const SERVICE = {
|
4
|
+
save: "AnexoSistemaSP.salvar",
|
5
|
+
delete: "AnexoSistemaSP.excluir",
|
6
|
+
download: "AnexoSistemaSP.baixar",
|
7
|
+
};
|
8
|
+
export class AnexoSistemaFetcher {
|
4
9
|
constructor(entityName, registerKey, dataUnitName) {
|
5
10
|
var _a;
|
6
11
|
this.entityName = entityName;
|
@@ -18,14 +23,13 @@ export class AttachFetcher {
|
|
18
23
|
}
|
19
24
|
async save(change) {
|
20
25
|
var _a, _b;
|
21
|
-
const serviceName = "AnexoSistemaSP.salvar";
|
22
26
|
let { updatingFields: fields } = change;
|
23
27
|
fields = Object.assign(Object.assign({}, fields), { NOMEARQUIVO: (_a = fields.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0] });
|
24
28
|
try {
|
25
29
|
this.validateFields(fields);
|
26
30
|
const fileInfo = !fields.LINK ? fields.NOMEARQUIVO : null;
|
27
31
|
const reqBody = {
|
28
|
-
serviceName,
|
32
|
+
serviceName: SERVICE.save,
|
29
33
|
requestBody: {
|
30
34
|
params: {
|
31
35
|
resourceID: this.resourceID,
|
@@ -41,7 +45,7 @@ export class AttachFetcher {
|
|
41
45
|
}
|
42
46
|
}
|
43
47
|
};
|
44
|
-
const result = await DataFetcher.get().callServiceBroker(
|
48
|
+
const result = await DataFetcher.get().callServiceBroker(SERVICE.save, JSON.stringify(reqBody));
|
45
49
|
return Promise.resolve([Object.assign(Object.assign(Object.assign({}, result), fields), { ARQUIVOOULINK: !!fields.LINK ? fields.LINK : fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name, __owner__dataunit__name__: this.dataUnitName })]);
|
46
50
|
}
|
47
51
|
catch (error) {
|
@@ -50,7 +54,6 @@ export class AttachFetcher {
|
|
50
54
|
}
|
51
55
|
async edit(change) {
|
52
56
|
var _a, _b, _c;
|
53
|
-
const serviceName = "AnexoSistemaSP.salvar";
|
54
57
|
let { updatingFields: fields, record } = change;
|
55
58
|
const getFieldValue = (fieldValue) => {
|
56
59
|
if (fields[fieldValue] !== undefined)
|
@@ -64,7 +67,7 @@ export class AttachFetcher {
|
|
64
67
|
try {
|
65
68
|
this.validateFields(fields);
|
66
69
|
const reqBody = {
|
67
|
-
serviceName,
|
70
|
+
serviceName: SERVICE.save,
|
68
71
|
requestBody: {
|
69
72
|
params: {
|
70
73
|
resourceID: this.resourceID,
|
@@ -82,7 +85,7 @@ export class AttachFetcher {
|
|
82
85
|
}
|
83
86
|
}
|
84
87
|
};
|
85
|
-
const result = await DataFetcher.get().callServiceBroker(
|
88
|
+
const result = await DataFetcher.get().callServiceBroker(SERVICE.save, JSON.stringify(reqBody));
|
86
89
|
return Promise.resolve([Object.assign(Object.assign(Object.assign({}, result), fields), { ARQUIVOOULINK: !!fields.LINK ? fields.LINK : fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name, __owner__dataunit__name__: this.dataUnitName })]);
|
87
90
|
}
|
88
91
|
catch (error) {
|
@@ -91,10 +94,9 @@ export class AttachFetcher {
|
|
91
94
|
}
|
92
95
|
delete(record) {
|
93
96
|
var _a;
|
94
|
-
const serviceName = "AnexoSistemaSP.excluir";
|
95
97
|
const attachField = ((_a = record.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
96
98
|
const reqBody = {
|
97
|
-
serviceName,
|
99
|
+
serviceName: SERVICE.delete,
|
98
100
|
requestBody: {
|
99
101
|
paramsDelete: {
|
100
102
|
keyAttach: record.CHAVEARQUIVO,
|
@@ -106,17 +108,16 @@ export class AttachFetcher {
|
|
106
108
|
}
|
107
109
|
};
|
108
110
|
return new Promise((resolve, reject) => {
|
109
|
-
DataFetcher.get().callServiceBroker(
|
111
|
+
DataFetcher.get().callServiceBroker(SERVICE.delete, JSON.stringify(reqBody))
|
110
112
|
.then(result => resolve(result))
|
111
113
|
.catch(error => reject(error));
|
112
114
|
});
|
113
115
|
}
|
114
116
|
getDownloadKey(record) {
|
115
117
|
var _a;
|
116
|
-
const serviceName = "AnexoSistemaSP.baixar";
|
117
118
|
const attachField = ((_a = record.NOMEARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) || {};
|
118
119
|
const reqBody = {
|
119
|
-
serviceName,
|
120
|
+
serviceName: SERVICE.download,
|
120
121
|
requestBody: {
|
121
122
|
paramsDown: {
|
122
123
|
nameAttach: attachField === null || attachField === void 0 ? void 0 : attachField.name,
|
@@ -128,7 +129,7 @@ export class AttachFetcher {
|
|
128
129
|
}
|
129
130
|
};
|
130
131
|
return new Promise((resolve, reject) => {
|
131
|
-
DataFetcher.get().callServiceBroker(
|
132
|
+
DataFetcher.get().callServiceBroker(SERVICE.download, JSON.stringify(reqBody))
|
132
133
|
.then(result => resolve(result))
|
133
134
|
.catch(error => reject(error));
|
134
135
|
});
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { SaveErrorsEnum } from "./interfaces";
|
2
|
+
import { DataFetcher } from "../../DataFetcher";
|
3
|
+
const SERVICE = {
|
4
|
+
save: "Attach.save",
|
5
|
+
delete: "Attach.remove",
|
6
|
+
view: "Attach.view",
|
7
|
+
repository: "RepositorioArquivoSP.abreArquivo"
|
8
|
+
};
|
9
|
+
export class AttachFetcher {
|
10
|
+
constructor(dataUnitName) {
|
11
|
+
this.dataUnitName = dataUnitName;
|
12
|
+
}
|
13
|
+
async save({ dataUnit: dataUnitName, record, updatingFields: fields, operation }) {
|
14
|
+
var _a, _b;
|
15
|
+
const isInsert = operation == "INSERT";
|
16
|
+
const dataBody = isInsert ? fields : record;
|
17
|
+
if (!isInsert && (fields === null || fields === void 0 ? void 0 : fields.DESCRICAO) && (fields === null || fields === void 0 ? void 0 : fields.DESCRICAO) !== (record === null || record === void 0 ? void 0 : record.DESCRICAO)) {
|
18
|
+
throw new Error(SaveErrorsEnum.DESCRIPTION_CANNOT_BE_CHANGED);
|
19
|
+
}
|
20
|
+
const reqBody = {
|
21
|
+
"anexo": {
|
22
|
+
"codata": isInsert ? fields === null || fields === void 0 ? void 0 : fields.REGISTER_KEY : record === null || record === void 0 ? void 0 : record.CODATA,
|
23
|
+
"sequencia": (dataBody === null || dataBody === void 0 ? void 0 : dataBody.SEQUENCIA) || "0",
|
24
|
+
"tipo": (dataBody === null || dataBody === void 0 ? void 0 : dataBody.TIPO) || "N",
|
25
|
+
"descricao": dataBody === null || dataBody === void 0 ? void 0 : dataBody.DESCRICAO,
|
26
|
+
"arquivo": (_b = (_a = fields.CAMINHO_ARQUIVO) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.name,
|
27
|
+
"ehInclusao": isInsert ? "S" : "N",
|
28
|
+
"ehArquivoRepositorio": "N"
|
29
|
+
}
|
30
|
+
};
|
31
|
+
return new Promise((resolve, reject) => {
|
32
|
+
DataFetcher.get().callServiceBroker(SERVICE.save, JSON.stringify(reqBody))
|
33
|
+
.then(result => {
|
34
|
+
var _a;
|
35
|
+
return resolve([Object.assign(Object.assign(Object.assign({}, result), fields), { __owner__dataunit__name__: (_a = this.dataUnitName) !== null && _a !== void 0 ? _a : dataUnitName })]);
|
36
|
+
})
|
37
|
+
.catch(error => reject(error));
|
38
|
+
});
|
39
|
+
}
|
40
|
+
async edit(change) {
|
41
|
+
throw new Error("Method not implemented.");
|
42
|
+
}
|
43
|
+
async delete(record) {
|
44
|
+
var request = {
|
45
|
+
anexo: {
|
46
|
+
codata: record.CODATA,
|
47
|
+
tipo: record.TIPO,
|
48
|
+
descricao: record.DESCRICAO,
|
49
|
+
}
|
50
|
+
};
|
51
|
+
const result = await DataFetcher.get().callServiceBroker(SERVICE.delete, JSON.stringify(request));
|
52
|
+
return Promise.resolve(result);
|
53
|
+
}
|
54
|
+
async getDownloadKey(record) {
|
55
|
+
var _a, _b, _c;
|
56
|
+
if (record.EHARQUIVOREPOSITORIO == 'S') {
|
57
|
+
const request = {
|
58
|
+
config: {
|
59
|
+
path: record.ARQUIVO,
|
60
|
+
tipoconteudo: record.TIPOCONTEUDO
|
61
|
+
}
|
62
|
+
};
|
63
|
+
const result = await DataFetcher.get().callServiceBroker(SERVICE.repository, JSON.stringify(request));
|
64
|
+
return Promise.resolve({
|
65
|
+
chave: {
|
66
|
+
valor: (_b = (_a = result === null || result === void 0 ? void 0 : result.responseBody) === null || _a === void 0 ? void 0 : _a.chave) === null || _b === void 0 ? void 0 : _b.valor
|
67
|
+
}
|
68
|
+
});
|
69
|
+
}
|
70
|
+
const criteria = {
|
71
|
+
anexo: {
|
72
|
+
codata: record.CODATA,
|
73
|
+
codemp: record.CODEMP,
|
74
|
+
sequencia: record.SEQUENCIA,
|
75
|
+
tipo: record.TIPO,
|
76
|
+
descricao: record.DESCRICAO,
|
77
|
+
tipoConteudo: record.TIPOCONTEUDO
|
78
|
+
}
|
79
|
+
};
|
80
|
+
const result = await DataFetcher.get().callServiceBroker(SERVICE.view, JSON.stringify(criteria));
|
81
|
+
if (result === null || result === void 0 ? void 0 : result.chaveAnexo) {
|
82
|
+
return Promise.resolve({
|
83
|
+
chave: {
|
84
|
+
valor: (_c = result === null || result === void 0 ? void 0 : result.chaveAnexo) === null || _c === void 0 ? void 0 : _c.idChaveAnexo
|
85
|
+
}
|
86
|
+
});
|
87
|
+
}
|
88
|
+
return Promise.reject(new Error("File not found."));
|
89
|
+
}
|
90
|
+
}
|
package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -3,4 +3,5 @@ export var SaveErrorsEnum;
|
|
3
3
|
SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
|
4
4
|
SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
|
5
5
|
SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
|
6
|
+
SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
|
6
7
|
})(SaveErrorsEnum || (SaveErrorsEnum = {}));
|
@@ -184,15 +184,29 @@ export default class DataUnitFetcher {
|
|
184
184
|
});
|
185
185
|
return updatingFields;
|
186
186
|
}
|
187
|
+
getUpdatingFields(dataUnit, originalUpdatingFields) {
|
188
|
+
if (originalUpdatingFields == undefined) {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
const updatingFields = Object.assign({}, originalUpdatingFields);
|
192
|
+
Object.keys(updatingFields).forEach(key => {
|
193
|
+
const descriptor = dataUnit.getField(key);
|
194
|
+
if (descriptor != undefined && descriptor.standAlone) {
|
195
|
+
delete updatingFields[key];
|
196
|
+
}
|
197
|
+
});
|
198
|
+
return this.addTransientProperties(dataUnit, updatingFields);
|
199
|
+
}
|
187
200
|
saveData(dataUnit, duChanges) {
|
188
201
|
const updatedRecordsIds = [];
|
189
202
|
const addedRecordsIds = [];
|
190
203
|
const changes = duChanges.map((change) => {
|
191
|
-
const { dataUnit: changeDU, record,
|
204
|
+
const { dataUnit: changeDU, record, operation } = change;
|
192
205
|
const dataUnitInstance = DataUnitStorage.get(changeDU);
|
206
|
+
const updatingFields = this.getUpdatingFields(dataUnitInstance, change.updatingFields);
|
193
207
|
let parsedUpdatingFields;
|
194
|
-
if (updatingFields) {
|
195
|
-
parsedUpdatingFields = Object.entries(
|
208
|
+
if (updatingFields != undefined) {
|
209
|
+
parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
|
196
210
|
const descriptor = dataUnitInstance.getField(fieldName);
|
197
211
|
const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
|
198
212
|
return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
|