@sankhyalabs/sankhyablocks 8.15.0-dev.5 → 8.15.0-dev.50
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-8009ecb2.js → ConfigStorage-8d4e9d53.js} +94 -21
- 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-7d850fbc.js → SnkFormConfigManager-33995e92.js} +21 -13
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-66aa2557.js} +19 -1
- package/dist/cjs/SnkMultiSelectionListDataSource-8b5bfa05.js +140 -0
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-bb8e9ae4.js} +1 -1
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-d73f4449.js} +13 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-bd4c52da.js → pesquisa-fetcher-036a9588.js} +498 -76
- 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} +538 -8
- package/dist/cjs/snk-application.cjs.entry.js +44 -10
- package/dist/cjs/snk-attach.cjs.entry.js +413 -62
- package/dist/cjs/snk-crud.cjs.entry.js +17 -12
- package/dist/cjs/snk-data-exporter.cjs.entry.js +10 -6
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-41c29713.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 +61 -10
- package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
- package/dist/cjs/snk-filter-item.cjs.entry.js +13 -6
- 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 +37 -22
- package/dist/cjs/{snk-guides-viewer-cb176c4d.js → snk-guides-viewer-2f61fb02.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 +264 -27
- package/dist/cjs/snk-taskbar.cjs.entry.js +123 -15
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-3ecd1278.js} +9 -9
- package/dist/collection/collection-manifest.json +7 -7
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +94 -11
- package/dist/collection/components/snk-attach/snk-attach.js +203 -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 +118 -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 +7 -3
- 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-detail.js +22 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +31 -6
- 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 +24 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +154 -5
- 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 +20 -12
- 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 +100 -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 +10 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +467 -19
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +18 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +9 -9
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +166 -14
- package/dist/collection/lib/configs/ConfigStorage.js +86 -16
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +5 -40
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +5 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/{attach-fetcher.js → AttachFetcher/anexo-sistema-fetcher.js} +16 -15
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.js +90 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/index.js +2 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +31 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +37 -23
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
- 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/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/collection/lib/utils/CrudUtils.js +13 -1
- package/dist/components/ConfigStorage.js +92 -19
- package/dist/components/DataFetcher.js +5 -3
- package/dist/components/SnkFormConfigManager.js +19 -11
- package/dist/components/SnkMessageBuilder.js +19 -1
- package/dist/components/dataunit-fetcher.js +116 -77
- package/dist/components/field-search.js +93 -3
- package/dist/components/form-config-fetcher.js +12 -0
- 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 +469 -69
- package/dist/components/snk-crud.js +15 -3
- package/dist/components/snk-data-exporter2.js +7 -3
- 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 +64 -8
- package/dist/components/snk-filter-detail2.js +5 -1
- package/dist/components/snk-filter-item2.js +14 -6
- 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 +38 -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 +325 -31
- package/dist/components/snk-taskbar2.js +139 -25
- package/dist/components/taskbar-actions-button2.js +18 -2
- package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-6e241cd7.js} +94 -21
- 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-9be0e7d4.js → SnkFormConfigManager-7a4e678f.js} +21 -13
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0a4becdd.js} +19 -1
- package/dist/esm/SnkMultiSelectionListDataSource-4274be27.js +133 -0
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-8ec448b0.js} +1 -1
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-765b8498.js} +13 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-65714f21.js → pesquisa-fetcher-a9e27c84.js} +486 -69
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +537 -9
- package/dist/esm/snk-application.entry.js +43 -9
- package/dist/esm/snk-attach.entry.js +413 -62
- package/dist/esm/snk-crud.entry.js +17 -12
- package/dist/esm/snk-data-exporter.entry.js +10 -6
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-de1d140d.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 +61 -10
- package/dist/esm/snk-filter-detail.entry.js +4 -1
- package/dist/esm/snk-filter-item.entry.js +13 -6
- 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 +38 -23
- package/dist/esm/{snk-guides-viewer-eeb8f354.js → snk-guides-viewer-16974807.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 +264 -27
- package/dist/esm/snk-taskbar.entry.js +124 -16
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-2473c8ac.js} +9 -9
- package/dist/sankhyablocks/p-004c356e.js +26 -0
- package/dist/sankhyablocks/p-0624f62d.js +56 -0
- package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
- package/dist/sankhyablocks/p-1048bd26.entry.js +1 -0
- package/dist/sankhyablocks/{p-e6380c60.js → p-125bb902.js} +1 -1
- package/dist/sankhyablocks/p-1c7d57e5.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/{p-3520c088.entry.js → p-24ed6ad6.entry.js} +1 -1
- package/dist/sankhyablocks/p-32331e9b.entry.js +1 -0
- package/dist/sankhyablocks/p-32556aa6.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-3f88728d.js +1 -0
- package/dist/sankhyablocks/p-433f0d45.entry.js +1 -0
- package/dist/sankhyablocks/p-4ab95a67.entry.js +1 -0
- package/dist/sankhyablocks/{p-32f0935f.js → p-52c8e589.js} +1 -1
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/p-751bd42a.entry.js +1 -0
- package/dist/sankhyablocks/p-85af23fe.entry.js +1 -0
- package/dist/sankhyablocks/{p-f514913b.entry.js → p-ac77949b.entry.js} +1 -1
- package/dist/sankhyablocks/p-ae4fc9a9.js +1 -0
- package/dist/sankhyablocks/p-b10b9934.entry.js +1 -0
- package/dist/sankhyablocks/p-b11aa1e0.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-bf39bdb8.entry.js +1 -0
- package/dist/sankhyablocks/p-c6751382.entry.js +11 -0
- package/dist/sankhyablocks/p-d0126ca0.js +65 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d6321b12.entry.js +1 -0
- package/dist/sankhyablocks/p-dcce8ca0.entry.js +1 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/p-efeca7ba.js +1 -0
- package/dist/sankhyablocks/p-f7d0fab9.entry.js +1 -0
- package/dist/sankhyablocks/p-fbc60023.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +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 +28 -6
- package/dist/types/components/snk-attach/structure/builder/anexo-sistema-crud-config.builder.d.ts +2 -0
- package/dist/types/components/snk-attach/structure/builder/attach-crud-config.builder.d.ts +40 -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 +16 -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-detail.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +7 -3
- 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 +26 -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 +2 -1
- 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 +19 -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 +85 -4
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +34 -1
- package/dist/types/components.d.ts +298 -12
- package/dist/types/lib/configs/ConfigStorage.d.ts +25 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +0 -2
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/{attach-fetcher.d.ts → AttachFetcher/anexo-sistema-fetcher.d.ts} +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/attach-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/facade/attach-fetcher.facade.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{fecthAttach → AttachFetcher}/interfaces/ISave.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -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 +15 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/pesquisa-fetcher-ef050a47.js +0 -167
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/pesquisa-fetcher-dd3ca0a5.js +0 -165
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-0874adb5.entry.js +0 -1
- package/dist/sankhyablocks/p-094c30cb.js +0 -1
- package/dist/sankhyablocks/p-0d7863ed.js +0 -26
- package/dist/sankhyablocks/p-11081798.entry.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-29804fc5.js +0 -60
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-585294ee.js +0 -56
- package/dist/sankhyablocks/p-6977a26c.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.entry.js +0 -1
- package/dist/sankhyablocks/p-6d20d38c.entry.js +0 -1
- package/dist/sankhyablocks/p-776ee8e3.js +0 -1
- package/dist/sankhyablocks/p-7d51d949.entry.js +0 -11
- package/dist/sankhyablocks/p-809f367d.entry.js +0 -1
- package/dist/sankhyablocks/p-95a3778f.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
- package/dist/sankhyablocks/p-b146a9f0.entry.js +0 -1
- package/dist/sankhyablocks/p-bedb8ad6.entry.js +0 -1
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c758265f.entry.js +0 -1
- package/dist/sankhyablocks/p-ca4d337a.entry.js +0 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +0 -1
- package/dist/sankhyablocks/p-cdd66657.entry.js +0 -1
- package/dist/sankhyablocks/p-d1f5bc50.js +0 -1
- package/dist/sankhyablocks/p-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
- package/dist/sankhyablocks/p-fd8814b9.entry.js +0 -1
- package/dist/sankhyablocks/p-ff6064e7.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
@@ -89,31 +89,31 @@ const buildElem = (element, className, dataElementId, getTitle, action, isEnable
|
|
89
89
|
case exports.TaskbarElement.CONFIGURATOR:
|
90
90
|
return iconButton("settings-inverted", element, className, dataElementId, title, action, isEnabled);
|
91
91
|
case exports.TaskbarElement.MORE_OPTIONS:
|
92
|
-
return actionButton(element, dataElementId, title, isEnabled, actions, action);
|
92
|
+
return actionButton(element, className, dataElementId, title, isEnabled, actions, action);
|
93
93
|
case exports.TaskbarElement.DIVIDER:
|
94
|
-
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-
|
94
|
+
return index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin--none ez-margin-left--medium", "data-taskbar-divider": true });
|
95
95
|
case exports.TaskbarElement.DATA_EXPORTER:
|
96
96
|
const provider = (_a = index$1.store.get("exporterProviders")) === null || _a === void 0 ? void 0 : _a[configName];
|
97
|
-
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId });
|
97
|
+
return index.h("snk-data-exporter", { class: className, provider: provider, "data-element-id": dataElementId, "data-taskbar-element": element });
|
98
98
|
case exports.TaskbarElement.ATTACH:
|
99
99
|
return iconButton("anexo", element, className, dataElementId, title, action, isEnabled);
|
100
100
|
case exports.TaskbarElement.ACTIONS_BUTTON:
|
101
|
-
return index.h("snk-actions-button", { "data-element-id": dataElementId });
|
101
|
+
return index.h("snk-actions-button", { "data-element-id": dataElementId, "data-taskbar-element": element });
|
102
102
|
}
|
103
103
|
};
|
104
104
|
function textButton(name, className, dataElementId, text, title, action, isEnabled) {
|
105
|
-
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) });
|
105
|
+
return index.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) });
|
106
106
|
}
|
107
107
|
function iconButton(iconName, name, className, dataElementId, title, action, isEnabled) {
|
108
|
-
return index.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) });
|
108
|
+
return index.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) });
|
109
109
|
}
|
110
110
|
function iconTextButton(iconName, name, className, dataElementId, text, title, action, isEnabled) {
|
111
|
-
return index.h("ez-button", { key: dataElementId, title: title, label: text, size: "small", class: className, "data-element-id": dataElementId, enabled: isEnabled(name), onClick: () => action(name) },
|
111
|
+
return index.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) },
|
112
112
|
index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: iconName }));
|
113
113
|
}
|
114
|
-
function actionButton(element, dataElementId, title, isEnabled, actions, action) {
|
114
|
+
function actionButton(element, className, dataElementId, title, isEnabled, actions, action) {
|
115
115
|
return actions && actions.length > 0
|
116
|
-
? index.h("taskbar-actions-button", { key: dataElementId, title: title, "data-element-id": dataElementId, enabled: isEnabled(element), actions: actions, onTaskbarActionSelected: (evt) => action(evt.detail.value) })
|
116
|
+
? index.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) })
|
117
117
|
: undefined;
|
118
118
|
}
|
119
119
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
"./components/snk-data-unit/snk-data-unit.js",
|
6
6
|
"./components/snk-taskbar/snk-taskbar.js",
|
7
7
|
"./components/snk-filter-bar/filter-list/snk-filter-list.js",
|
8
|
-
"./components/snk-
|
8
|
+
"./components/snk-print-selector/snk-print-selector.js",
|
9
9
|
"./components/snk-actions-button/snk-actions-button.js",
|
10
10
|
"./components/snk-actions-button/subcomponents/snk-actions-form.js",
|
11
11
|
"./components/snk-actions-button/subcomponents/snk-client-confirm.js",
|
@@ -34,12 +34,13 @@
|
|
34
34
|
"./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
|
35
35
|
"./components/snk-filter-field-search/snk-filter-field-search.js",
|
36
36
|
"./components/snk-form/snk-form.js",
|
37
|
-
"./components/snk-form/subcomponents/snk-config
|
38
|
-
"./components/snk-form
|
39
|
-
"./components/snk-form/subcomponents/snk-
|
37
|
+
"./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
|
38
|
+
"./components/snk-form-config/snk-form-config.js",
|
39
|
+
"./components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js",
|
40
|
+
"./components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js",
|
40
41
|
"./components/snk-grid/snk-grid.js",
|
41
|
-
"./components/snk-grid
|
42
|
-
"./components/snk-grid/
|
42
|
+
"./components/snk-grid-config/snk-grid-config.js",
|
43
|
+
"./components/snk-grid-config/snk-select-box/snk-select-box.js",
|
43
44
|
"./components/snk-personalized-filter/snk-personalized-filter.js",
|
44
45
|
"./components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js",
|
45
46
|
"./components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js",
|
@@ -47,7 +48,6 @@
|
|
47
48
|
"./components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js",
|
48
49
|
"./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
|
49
50
|
"./components/snk-pesquisa/snk-pesquisa.js",
|
50
|
-
"./components/snk-print-selector/snk-print-selector.js",
|
51
51
|
"./components/snk-simple-bar/snk-simple-bar.js",
|
52
52
|
"./components/snk-simple-crud/snk-simple-crud.js",
|
53
53
|
"./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
|
@@ -3,7 +3,7 @@ import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
|
3
3
|
import { h } from "@stencil/core";
|
4
4
|
import AppletCaller from "../../lib/applet-caller/applet-caller";
|
5
5
|
import MGEAuthorization from '../../lib/auth/mgeauthorization.module';
|
6
|
-
import { ConfigStorage } from
|
6
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
7
7
|
import { DataFetcher } from "../../lib/http/data-fetcher/DataFetcher";
|
8
8
|
import AuthFetcher, { AutorizationType } from "../../lib/http/data-fetcher/fetchers/auth-fetcher";
|
9
9
|
import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher";
|
@@ -33,6 +33,8 @@ export class SnkApplication {
|
|
33
33
|
this._isLoadedByPk = false;
|
34
34
|
this.messagesBuilder = undefined;
|
35
35
|
this.configName = undefined;
|
36
|
+
this.gridLegacyConfigName = undefined;
|
37
|
+
this.formLegacyConfigName = undefined;
|
36
38
|
this.loadByPK = undefined;
|
37
39
|
}
|
38
40
|
async processPendingActions(actionsLocker) {
|
@@ -757,6 +759,15 @@ export class SnkApplication {
|
|
757
759
|
this._waitingAppReady.push(() => resolve(this));
|
758
760
|
});
|
759
761
|
}
|
762
|
+
/**
|
763
|
+
* Atribui valor para parâmetros de contexto no componente de pesquisa.
|
764
|
+
*
|
765
|
+
* @param name - Nome do parâmetro
|
766
|
+
* @param value - String conversível de acordo com o tipo do parâmetro
|
767
|
+
*/
|
768
|
+
async setSearchFilterContext(name, value) {
|
769
|
+
ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
|
770
|
+
}
|
760
771
|
clearContent(container) {
|
761
772
|
if (container) {
|
762
773
|
Array.from(container.children).forEach(child => {
|
@@ -932,7 +943,11 @@ export class SnkApplication {
|
|
932
943
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
933
944
|
this.registerPkChangeListener();
|
934
945
|
ErrorTracking.init();
|
935
|
-
|
946
|
+
let legacyConfig = {
|
947
|
+
gridLegacyConfig: this.gridLegacyConfigName,
|
948
|
+
formLegacyConfig: this.formLegacyConfigName
|
949
|
+
};
|
950
|
+
ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
|
936
951
|
document.addEventListener("click", () => Workspace.applicationClick());
|
937
952
|
this._waitingAppReady.forEach(resolve => resolve());
|
938
953
|
}
|
@@ -1021,6 +1036,40 @@ export class SnkApplication {
|
|
1021
1036
|
"attribute": "config-name",
|
1022
1037
|
"reflect": false
|
1023
1038
|
},
|
1039
|
+
"gridLegacyConfigName": {
|
1040
|
+
"type": "string",
|
1041
|
+
"mutable": false,
|
1042
|
+
"complexType": {
|
1043
|
+
"original": "string",
|
1044
|
+
"resolved": "string",
|
1045
|
+
"references": {}
|
1046
|
+
},
|
1047
|
+
"required": false,
|
1048
|
+
"optional": false,
|
1049
|
+
"docs": {
|
1050
|
+
"tags": [],
|
1051
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grade."
|
1052
|
+
},
|
1053
|
+
"attribute": "grid-legacy-config-name",
|
1054
|
+
"reflect": false
|
1055
|
+
},
|
1056
|
+
"formLegacyConfigName": {
|
1057
|
+
"type": "string",
|
1058
|
+
"mutable": false,
|
1059
|
+
"complexType": {
|
1060
|
+
"original": "string",
|
1061
|
+
"resolved": "string",
|
1062
|
+
"references": {}
|
1063
|
+
},
|
1064
|
+
"required": false,
|
1065
|
+
"optional": false,
|
1066
|
+
"docs": {
|
1067
|
+
"tags": [],
|
1068
|
+
"text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
|
1069
|
+
},
|
1070
|
+
"attribute": "form-legacy-config-name",
|
1071
|
+
"reflect": false
|
1072
|
+
},
|
1024
1073
|
"loadByPK": {
|
1025
1074
|
"type": "unknown",
|
1026
1075
|
"mutable": false,
|
@@ -2141,6 +2190,10 @@ export class SnkApplication {
|
|
2141
2190
|
"Promise": {
|
2142
2191
|
"location": "global"
|
2143
2192
|
},
|
2193
|
+
"IOption": {
|
2194
|
+
"location": "import",
|
2195
|
+
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
2196
|
+
},
|
2144
2197
|
"ISearchArgument": {
|
2145
2198
|
"location": "import",
|
2146
2199
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
@@ -2152,16 +2205,12 @@ export class SnkApplication {
|
|
2152
2205
|
"Array": {
|
2153
2206
|
"location": "global"
|
2154
2207
|
},
|
2155
|
-
"IOption": {
|
2156
|
-
"location": "import",
|
2157
|
-
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
2158
|
-
},
|
2159
2208
|
"SearchCriteria": {
|
2160
2209
|
"location": "import",
|
2161
2210
|
"path": "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher"
|
2162
2211
|
}
|
2163
2212
|
},
|
2164
|
-
"return": "Promise<
|
2213
|
+
"return": "Promise<IOption | IOption[]>"
|
2165
2214
|
},
|
2166
2215
|
"docs": {
|
2167
2216
|
"text": "Obt\u00E9m as op\u00E7\u00F5es em componentes de pesquisa\nEx.: snk-config-options",
|
@@ -2185,18 +2234,18 @@ export class SnkApplication {
|
|
2185
2234
|
"Promise": {
|
2186
2235
|
"location": "global"
|
2187
2236
|
},
|
2188
|
-
"Array": {
|
2189
|
-
"location": "global"
|
2190
|
-
},
|
2191
2237
|
"IOption": {
|
2192
2238
|
"location": "import",
|
2193
2239
|
"path": "@sankhyalabs/ezui/dist/types/components/ez-search/ez-search"
|
2194
2240
|
},
|
2241
|
+
"Array": {
|
2242
|
+
"location": "global"
|
2243
|
+
},
|
2195
2244
|
"HTMLSnkPesquisaElement": {
|
2196
2245
|
"location": "global"
|
2197
2246
|
}
|
2198
2247
|
},
|
2199
|
-
"return": "Promise<
|
2248
|
+
"return": "Promise<IOption | IOption[]>"
|
2200
2249
|
},
|
2201
2250
|
"docs": {
|
2202
2251
|
"text": "Obt\u00E9m as op\u00E7\u00F5es em componentes de pesquisa\nEx.: snk-config-options",
|
@@ -2392,6 +2441,40 @@ export class SnkApplication {
|
|
2392
2441
|
"text": "SnkApplication carregado."
|
2393
2442
|
}]
|
2394
2443
|
}
|
2444
|
+
},
|
2445
|
+
"setSearchFilterContext": {
|
2446
|
+
"complexType": {
|
2447
|
+
"signature": "(name: string, value: string) => Promise<void>",
|
2448
|
+
"parameters": [{
|
2449
|
+
"tags": [{
|
2450
|
+
"name": "param",
|
2451
|
+
"text": "name - Nome do par\u00E2metro"
|
2452
|
+
}],
|
2453
|
+
"text": "- Nome do par\u00E2metro"
|
2454
|
+
}, {
|
2455
|
+
"tags": [{
|
2456
|
+
"name": "param",
|
2457
|
+
"text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2458
|
+
}],
|
2459
|
+
"text": "- String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2460
|
+
}],
|
2461
|
+
"references": {
|
2462
|
+
"Promise": {
|
2463
|
+
"location": "global"
|
2464
|
+
}
|
2465
|
+
},
|
2466
|
+
"return": "Promise<void>"
|
2467
|
+
},
|
2468
|
+
"docs": {
|
2469
|
+
"text": "Atribui valor para par\u00E2metros de contexto no componente de pesquisa.",
|
2470
|
+
"tags": [{
|
2471
|
+
"name": "param",
|
2472
|
+
"text": "name - Nome do par\u00E2metro"
|
2473
|
+
}, {
|
2474
|
+
"name": "param",
|
2475
|
+
"text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2476
|
+
}]
|
2477
|
+
}
|
2395
2478
|
}
|
2396
2479
|
};
|
2397
2480
|
}
|
@@ -1,47 +1,63 @@
|
|
1
1
|
import { h } from "@stencil/core";
|
2
|
-
import { ApplicationContext } from "@sankhyalabs/core";
|
3
|
-
import { AttachFetcher } from "../../lib
|
2
|
+
import { DataUnit, ApplicationContext, Action } from "@sankhyalabs/core";
|
3
|
+
import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from "../../lib";
|
4
4
|
import { VIEW_MODE } from "../../lib/utils/constants";
|
5
|
-
import
|
6
|
-
import
|
5
|
+
import { AnexoSistemaDataUnitFactory, AttachFetcherDataUnitFactory, buildTaskBarManager, anexoSistemaCrudConfig, attachCrudConfig } from "./structure";
|
6
|
+
import InMemoryLoader from "../../lib/dataUnit/InMemoryLoader";
|
7
7
|
const RESOURCE_ID = 'AnexoSistema';
|
8
8
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
9
9
|
export class SnkAttach {
|
10
10
|
constructor() {
|
11
|
-
this.handleTaskbarClick = ({ detail: taskbar }) => {
|
11
|
+
this.handleTaskbarClick = async ({ detail: taskbar }) => {
|
12
12
|
if (["DOWNLOAD", "LINK"].includes(taskbar))
|
13
|
-
return this.downloadAttachment(this.
|
13
|
+
return this.downloadAttachment(this._currentDataUnit.getSelectedRecord());
|
14
|
+
if (this.fetcherType === "Attach" && ["SAVE"].includes(taskbar) && this._currentDataUnit.isDirty()) {
|
15
|
+
await this._currentDataUnit.setFieldValue("REGISTER_KEY", this.registerKey);
|
16
|
+
}
|
14
17
|
};
|
15
18
|
this.handleBack = () => {
|
16
|
-
this.
|
19
|
+
this._currentDataUnit.cancelEdition().then((cancelationConfirmed) => {
|
17
20
|
if (cancelationConfirmed)
|
18
21
|
this.back.emit();
|
19
22
|
});
|
20
23
|
};
|
21
24
|
this.handleFinish = () => {
|
22
|
-
if (!this.
|
25
|
+
if (!this._currentDataUnit.isDirty())
|
23
26
|
return this.back.emit();
|
24
|
-
this.
|
27
|
+
this._currentDataUnit.saveData().then(() => {
|
25
28
|
this.showFinishedToast();
|
26
29
|
this.back.emit();
|
27
30
|
});
|
28
31
|
};
|
32
|
+
this.fetcherType = undefined;
|
33
|
+
this.fetcher = undefined;
|
34
|
+
this.dataUnit = undefined;
|
35
|
+
this.dataUnitBuilder = undefined;
|
29
36
|
this.registerKey = undefined;
|
30
37
|
this.entityName = undefined;
|
31
38
|
this.messagesBuilder = undefined;
|
32
|
-
this.
|
39
|
+
this._currentFetcher = undefined;
|
40
|
+
this._currentDataUnit = undefined;
|
33
41
|
this.crudConfig = undefined;
|
34
42
|
}
|
35
43
|
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
36
|
-
var _a;
|
37
|
-
if (this.
|
44
|
+
var _a, _b, _c, _d, _e, _f;
|
45
|
+
if (!this._currentDataUnit) {
|
38
46
|
this.loadAttachmentDataUnit();
|
39
47
|
}
|
40
48
|
if (oldRegisterKey !== newRegisterKey) {
|
41
49
|
this.returnToGridMode();
|
42
|
-
|
43
|
-
|
44
|
-
|
50
|
+
if (this.fetcherType === "AnexoSistema") {
|
51
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
52
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
53
|
+
return (_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData();
|
54
|
+
}
|
55
|
+
if (this.fetcherType === "Attach") {
|
56
|
+
const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
|
57
|
+
if (hasMoreOneItem)
|
58
|
+
return;
|
59
|
+
}
|
60
|
+
return (_f = (_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata()) === null || _f === void 0 ? void 0 : _f.then(this._currentDataUnit.loadData.bind(undefined, undefined, true, this.registerKey));
|
45
61
|
}
|
46
62
|
}
|
47
63
|
/**
|
@@ -64,44 +80,94 @@ export class SnkAttach {
|
|
64
80
|
window.open(`${selectedRecord.LINK}`);
|
65
81
|
return;
|
66
82
|
}
|
67
|
-
this.
|
68
|
-
|
83
|
+
this._currentFetcher
|
84
|
+
.getDownloadKey(selectedRecord)
|
85
|
+
.then(({ chave }) => {
|
86
|
+
var _a;
|
87
|
+
let forceDownload = false;
|
88
|
+
if (!((_a = selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.ARQUIVO) === null || _a === void 0 ? void 0 : _a.endsWith(".pdf"))) {
|
89
|
+
forceDownload = true;
|
90
|
+
}
|
91
|
+
window.open(`/mge/visualizadorArquivos.mge?chaveArquivo=${chave.valor}${forceDownload ? "&forcarDownload=S" : ""}`);
|
69
92
|
});
|
70
93
|
}
|
71
94
|
returnToGridMode() {
|
72
|
-
|
95
|
+
var _a;
|
96
|
+
(_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.clearSelection();
|
73
97
|
if (this._crudElement)
|
74
98
|
this._crudElement.goToView(VIEW_MODE.GRID);
|
75
99
|
}
|
76
100
|
loadAttachmentDataUnit() {
|
77
|
-
var _a;
|
78
101
|
try {
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
});
|
92
|
-
return this.dataUnit;
|
102
|
+
switch (this.fetcherType) {
|
103
|
+
case "AnexoSistema":
|
104
|
+
this.loadAnexoSistema();
|
105
|
+
break;
|
106
|
+
case "Attach":
|
107
|
+
this.loadAttach();
|
108
|
+
break;
|
109
|
+
default:
|
110
|
+
this._currentFetcher = this.fetcher;
|
111
|
+
this._currentDataUnit = this.dataUnit;
|
112
|
+
this._currentDataUnitBuilder = this.dataUnitBuilder;
|
113
|
+
}
|
93
114
|
}
|
94
115
|
catch (error) {
|
95
116
|
throw new Error('There was an error while creating the data unit');
|
96
117
|
}
|
97
118
|
}
|
119
|
+
loadAnexoSistema() {
|
120
|
+
var _a;
|
121
|
+
this._currentDataUnit = this._currentDataUnit || new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
122
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
123
|
+
if (!this._currentDataUnit.metadata) {
|
124
|
+
this._currentDataUnit
|
125
|
+
.loadMetadata()
|
126
|
+
.then(() => this.crudConfig = Object.assign({}, anexoSistemaCrudConfig));
|
127
|
+
}
|
128
|
+
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
129
|
+
this._currentDataUnit.addFilterProvider({
|
130
|
+
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
131
|
+
});
|
132
|
+
this._currentDataUnit.addInterceptor({
|
133
|
+
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
134
|
+
});
|
135
|
+
this._currentDataUnit.loadData().then(this.disableEditFieldsNotInForm.bind(this));
|
136
|
+
}
|
137
|
+
loadAttach() {
|
138
|
+
var _a, _b, _c;
|
139
|
+
this._currentFetcher = new AttachFetcher();
|
140
|
+
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
141
|
+
this._currentDataUnit.addInterceptor({
|
142
|
+
interceptAction: (action) => {
|
143
|
+
var _a;
|
144
|
+
if (action.type === Action.METADATA_LOADED) {
|
145
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
146
|
+
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
147
|
+
}
|
148
|
+
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
149
|
+
}
|
150
|
+
});
|
151
|
+
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
152
|
+
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
153
|
+
this.returnToGridMode();
|
154
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
155
|
+
});
|
156
|
+
if (!this._currentDataUnit.metadata) {
|
157
|
+
(_c = (_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata()) === null || _c === void 0 ? void 0 : _c.then(() => {
|
158
|
+
var _a, _b;
|
159
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
160
|
+
(_b = (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData(undefined, undefined, true, this.registerKey)) === null || _b === void 0 ? void 0 : _b.then(this.disableEditFieldsNotInForm.bind(this));
|
161
|
+
});
|
162
|
+
}
|
163
|
+
}
|
98
164
|
disableEditFieldsNotInForm() {
|
99
165
|
var _a;
|
100
166
|
(_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
|
101
167
|
var _a;
|
102
168
|
const fieldName = column.name;
|
103
169
|
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
104
|
-
this.
|
170
|
+
this._currentDataUnit.disableField(fieldName);
|
105
171
|
}
|
106
172
|
});
|
107
173
|
}
|
@@ -109,15 +175,30 @@ export class SnkAttach {
|
|
109
175
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
110
176
|
}
|
111
177
|
componentWillRender() {
|
112
|
-
if (this.
|
178
|
+
if (!this.fetcherType) {
|
179
|
+
this.fetcherType = "AnexoSistema";
|
180
|
+
}
|
181
|
+
if (this._currentDataUnit == null) {
|
113
182
|
this.loadAttachmentDataUnit();
|
114
183
|
}
|
115
184
|
}
|
185
|
+
async handleOnDataStateChange({ detail }) {
|
186
|
+
if (this.fetcherType !== 'Attach')
|
187
|
+
return;
|
188
|
+
if (!detail.insertionMode) {
|
189
|
+
this._currentDataUnit.disableField('DESCRICAO');
|
190
|
+
}
|
191
|
+
else {
|
192
|
+
this._currentDataUnit.enableField('DESCRICAO');
|
193
|
+
}
|
194
|
+
await this._currentDataUnit.loadMetadata();
|
195
|
+
}
|
196
|
+
;
|
116
197
|
render() {
|
117
198
|
var _a, _b;
|
118
|
-
if (!this.
|
199
|
+
if (!this._currentDataUnit)
|
119
200
|
return null;
|
120
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this.
|
201
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this) }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary" }, this.getMessage("snkAttach.description")))))))));
|
121
202
|
}
|
122
203
|
static get is() { return "snk-attach"; }
|
123
204
|
static get encapsulation() { return "scoped"; }
|
@@ -133,6 +214,88 @@ export class SnkAttach {
|
|
133
214
|
}
|
134
215
|
static get properties() {
|
135
216
|
return {
|
217
|
+
"fetcherType": {
|
218
|
+
"type": "string",
|
219
|
+
"mutable": false,
|
220
|
+
"complexType": {
|
221
|
+
"original": "TFetcherType",
|
222
|
+
"resolved": "\"AnexoSistema\" | \"Another\" | \"Attach\"",
|
223
|
+
"references": {
|
224
|
+
"TFetcherType": {
|
225
|
+
"location": "import",
|
226
|
+
"path": "./interfaces/TFetcherType"
|
227
|
+
}
|
228
|
+
}
|
229
|
+
},
|
230
|
+
"required": false,
|
231
|
+
"optional": false,
|
232
|
+
"docs": {
|
233
|
+
"tags": [],
|
234
|
+
"text": "FetcherType define o tipo de fetcher respons\u00E1vel por carregar os dados do DataUnit."
|
235
|
+
},
|
236
|
+
"attribute": "fetcher-type",
|
237
|
+
"reflect": false
|
238
|
+
},
|
239
|
+
"fetcher": {
|
240
|
+
"type": "unknown",
|
241
|
+
"mutable": false,
|
242
|
+
"complexType": {
|
243
|
+
"original": "AttachFetcherFacadeInterface",
|
244
|
+
"resolved": "AttachFetcherFacadeInterface",
|
245
|
+
"references": {
|
246
|
+
"AttachFetcherFacadeInterface": {
|
247
|
+
"location": "import",
|
248
|
+
"path": "../../lib"
|
249
|
+
}
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"required": false,
|
253
|
+
"optional": false,
|
254
|
+
"docs": {
|
255
|
+
"tags": [],
|
256
|
+
"text": "Fetcher respons\u00E1vel por carregar os dados do DataUnit."
|
257
|
+
}
|
258
|
+
},
|
259
|
+
"dataUnit": {
|
260
|
+
"type": "unknown",
|
261
|
+
"mutable": false,
|
262
|
+
"complexType": {
|
263
|
+
"original": "DataUnit",
|
264
|
+
"resolved": "DataUnit",
|
265
|
+
"references": {
|
266
|
+
"DataUnit": {
|
267
|
+
"location": "import",
|
268
|
+
"path": "@sankhyalabs/core"
|
269
|
+
}
|
270
|
+
}
|
271
|
+
},
|
272
|
+
"required": false,
|
273
|
+
"optional": false,
|
274
|
+
"docs": {
|
275
|
+
"tags": [],
|
276
|
+
"text": "DataUnit respons\u00E1vel por carregar os dados."
|
277
|
+
}
|
278
|
+
},
|
279
|
+
"dataUnitBuilder": {
|
280
|
+
"type": "unknown",
|
281
|
+
"mutable": false,
|
282
|
+
"complexType": {
|
283
|
+
"original": "FetcherFacade",
|
284
|
+
"resolved": "FetcherFacade",
|
285
|
+
"references": {
|
286
|
+
"FetcherFacade": {
|
287
|
+
"location": "import",
|
288
|
+
"path": "./structure"
|
289
|
+
}
|
290
|
+
}
|
291
|
+
},
|
292
|
+
"required": false,
|
293
|
+
"optional": false,
|
294
|
+
"docs": {
|
295
|
+
"tags": [],
|
296
|
+
"text": "DataUnitBuilder respons\u00E1vel por implementar dados a serem utilizados no DataUnit."
|
297
|
+
}
|
298
|
+
},
|
136
299
|
"registerKey": {
|
137
300
|
"type": "string",
|
138
301
|
"mutable": false,
|
@@ -158,7 +321,7 @@ export class SnkAttach {
|
|
158
321
|
"resolved": "string",
|
159
322
|
"references": {}
|
160
323
|
},
|
161
|
-
"required":
|
324
|
+
"required": false,
|
162
325
|
"optional": false,
|
163
326
|
"docs": {
|
164
327
|
"tags": [],
|
@@ -191,7 +354,8 @@ export class SnkAttach {
|
|
191
354
|
}
|
192
355
|
static get states() {
|
193
356
|
return {
|
194
|
-
"
|
357
|
+
"_currentFetcher": {},
|
358
|
+
"_currentDataUnit": {},
|
195
359
|
"crudConfig": {}
|
196
360
|
};
|
197
361
|
}
|