@sankhyalabs/sankhyablocks 8.15.0-dev.8 → 8.15.0-dev.80
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-942ce74b.js} +70 -7
- package/dist/cjs/{DataFetcher-ba94ed5b.js → DataFetcher-313debd8.js} +18 -8
- package/dist/cjs/IExporterProvider-0c814e9a.js +230 -0
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
- package/dist/cjs/{SnkFormConfigManager-71c4768e.js → SnkFormConfigManager-52f99b4d.js} +23 -15
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-4a95fe86.js} +25 -13
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-54f5ff9d.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-14108bec.js → dataunit-fetcher-620b29a1.js} +409 -77
- package/dist/cjs/{form-config-fetcher-df043d3d.js → form-config-fetcher-2dd00e5b.js} +13 -1
- package/dist/cjs/index-f9e81701.js +2 -10
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-ef050a47.js → pesquisa-fetcher-680e198f.js} +12 -13
- 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} +526 -8
- package/dist/cjs/snk-application.cjs.entry.js +88 -26
- package/dist/cjs/snk-attach.cjs.entry.js +441 -65
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +125 -28
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +6 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +207 -83
- package/dist/cjs/snk-data-unit-eca53cfc.js +671 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +11 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +52 -13
- package/dist/cjs/snk-entity-list.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-bar.cjs.entry.js +65 -8
- 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-view.cjs.entry.js +67 -0
- package/dist/cjs/snk-form.cjs.entry.js +60 -8
- package/dist/cjs/snk-grid.cjs.entry.js +200 -122
- package/dist/cjs/{snk-guides-viewer-c8b9374f.js → snk-guides-viewer-5d5f0f25.js} +56 -20
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -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 +512 -40
- package/dist/cjs/snk-taskbar.cjs.entry.js +143 -20
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-d9392685.js} +11 -11
- package/dist/collection/collection-manifest.json +8 -8
- package/dist/collection/components/snk-application/__mocks__/snk-application.js +7 -0
- package/dist/collection/components/snk-application/snk-application.js +148 -24
- package/dist/collection/components/snk-attach/snk-attach.js +231 -44
- 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-configurator/snk-configurator.js +1 -1
- package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +1 -0
- package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +1 -0
- package/dist/collection/components/snk-crud/snk-crud.js +359 -19
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +137 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +161 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +11 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +163 -13
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +1 -1
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.js +22 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +90 -0
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +68 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +54 -1
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +58 -0
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +44 -50
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +88 -0
- package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +38 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +501 -216
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
- 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 +175 -3
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/snk-form.js +126 -5
- package/dist/collection/components/{snk-form → snk-form-config}/SnkFormConfigManager.js +22 -14
- 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 +360 -115
- 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 +847 -23
- 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 +11 -11
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +17 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +195 -19
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
- package/dist/collection/lib/configs/ConfigStorage.js +63 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +15 -42
- package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +1 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +18 -8
- 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/DataUnitDataLoader.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +4 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -13
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +30 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +87 -24
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
- 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 +12 -13
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +25 -32
- 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-data-unit.msg.js +1 -0
- 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 +68 -5
- package/dist/components/DataFetcher.js +18 -8
- package/dist/components/IExporterProvider.js +298 -0
- package/dist/components/ISave.js +42 -0
- package/dist/components/SnkFormConfigManager.js +21 -13
- package/dist/components/SnkMessageBuilder.js +25 -13
- package/dist/components/dataunit-fetcher.js +185 -241
- package/dist/components/form-config-fetcher.js +12 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index2.js +198 -33
- package/dist/{esm/pesquisa-fetcher-dd3ca0a5.js → components/pesquisa-fetcher.js} +13 -14
- package/dist/components/snk-actions-button2.js +4 -10
- package/dist/components/snk-application2.js +86 -20
- package/dist/components/snk-attach2.js +496 -72
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +133 -23
- package/dist/components/snk-custom-slot-elements.js +7 -3
- package/dist/components/snk-data-exporter2.js +202 -83
- package/dist/components/snk-data-unit2.js +464 -214
- package/dist/components/snk-detail-view2.js +137 -23
- package/dist/components/snk-entity-list.js +5 -3
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +69 -6
- 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-view2.js +72 -1
- package/dist/components/snk-form.js +60 -5
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +209 -119
- package/dist/components/snk-personalized-filter-editor.js +3 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +1 -1
- package/dist/components/snk-simple-crud2.js +574 -36
- package/dist/components/snk-taskbar2.js +164 -35
- package/dist/components/taskbar-actions-button2.js +4 -2
- package/dist/esm/{ConfigStorage-4151acc8.js → ConfigStorage-86187da3.js} +70 -7
- package/dist/esm/{DataFetcher-aa159c5a.js → DataFetcher-c1baf61d.js} +18 -8
- package/dist/esm/IExporterProvider-c0194569.js +221 -0
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/RecordIDUtils-87d02110.js +41 -0
- package/dist/esm/{SnkFormConfigManager-5c7d3771.js → SnkFormConfigManager-5b0d69cd.js} +23 -15
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-3a767111.js} +25 -13
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-039abba3.js} +1 -1
- package/dist/esm/{dataunit-fetcher-cbec1594.js → dataunit-fetcher-3fbf9d12.js} +392 -70
- package/dist/esm/{form-config-fetcher-36219cd3.js → form-config-fetcher-30fb808f.js} +13 -1
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-fetcher-03c8f919.js +164 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +525 -9
- package/dist/esm/snk-application.entry.js +88 -26
- package/dist/esm/snk-attach.entry.js +441 -65
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +125 -28
- package/dist/esm/snk-custom-slot-elements.entry.js +7 -3
- package/dist/esm/snk-data-exporter.entry.js +208 -84
- package/dist/esm/snk-data-unit-49b898f7.js +669 -0
- package/dist/esm/snk-data-unit.entry.js +11 -2
- package/dist/esm/snk-detail-view.entry.js +52 -13
- package/dist/esm/snk-entity-list.entry.js +5 -3
- package/dist/esm/snk-filter-bar.entry.js +65 -8
- 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-view.entry.js +67 -0
- package/dist/esm/snk-form.entry.js +60 -8
- package/dist/esm/snk-grid.entry.js +200 -122
- package/dist/esm/{snk-guides-viewer-8da24475.js → snk-guides-viewer-ef8c4eec.js} +56 -20
- package/dist/esm/snk-guides-viewer.entry.js +10 -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 +505 -33
- package/dist/esm/snk-taskbar.entry.js +144 -21
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-ad766858.js} +11 -11
- package/dist/sankhyablocks/p-039c7148.entry.js +1 -0
- package/dist/sankhyablocks/p-04821c60.entry.js +1 -0
- package/dist/sankhyablocks/p-060fdb6c.js +1 -0
- package/dist/sankhyablocks/p-14a08904.entry.js +1 -0
- package/dist/sankhyablocks/p-1db45d26.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-21a81901.entry.js +1 -0
- package/dist/sankhyablocks/p-294df368.entry.js +1 -0
- package/dist/sankhyablocks/p-2ac8bd11.entry.js +1 -0
- package/dist/sankhyablocks/p-32062be4.entry.js +1 -0
- package/dist/sankhyablocks/p-33718dfc.entry.js +1 -0
- package/dist/sankhyablocks/p-3d0cc5c0.entry.js +1 -0
- package/dist/sankhyablocks/p-3f1efb97.entry.js +1 -0
- package/dist/sankhyablocks/p-47b60deb.entry.js +1 -0
- package/dist/sankhyablocks/p-4ce73e88.js +1 -0
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-5fa1576b.entry.js +11 -0
- package/dist/sankhyablocks/p-61dd89eb.js +1 -0
- package/dist/sankhyablocks/p-672302c3.js +60 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/p-7663f597.entry.js +1 -0
- package/dist/sankhyablocks/p-8322ccdb.entry.js +1 -0
- package/dist/sankhyablocks/p-913a9979.js +1 -0
- package/dist/sankhyablocks/p-9863d682.js +1 -0
- package/dist/sankhyablocks/{p-e0fd9555.entry.js → p-a1d72395.entry.js} +1 -1
- package/dist/sankhyablocks/p-a64baa0f.entry.js +1 -0
- package/dist/sankhyablocks/p-af8efd95.js +6 -0
- package/dist/sankhyablocks/p-aff76a53.js +56 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-ba05fdb8.entry.js +1 -0
- package/dist/sankhyablocks/p-babe7665.js +1 -0
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d26365ad.js +1 -0
- package/dist/sankhyablocks/{p-9695f78b.js → p-dc7c9047.js} +1 -1
- package/dist/sankhyablocks/p-df5451c7.js +26 -0
- package/dist/sankhyablocks/p-e5c25e0b.entry.js +1 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/{p-7f3c7b09.entry.js → p-eae7a817.entry.js} +1 -1
- package/dist/sankhyablocks/p-f88cfc3c.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 +27 -5
- 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 +34 -10
- 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/interfaces/PropsCustomEditor.d.ts +4 -0
- package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +4 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +57 -1
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +24 -1
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +28 -3
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +30 -1
- package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +6 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +11 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +24 -4
- package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +5 -0
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +17 -0
- package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +17 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +3 -1
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +77 -0
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +3 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +61 -2
- package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
- 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 +31 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -1
- package/dist/types/components/snk-form/snk-form.d.ts +20 -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 +69 -7
- 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 +142 -6
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +36 -1
- package/dist/types/components.d.ts +536 -18
- package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +21 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +2 -3
- package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +4 -0
- package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +3 -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/DataUnitDataLoader.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- 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/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +7 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +3 -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/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +1 -0
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/utils/CrudUtils.d.ts +3 -0
- package/package.json +15 -6
- package/dist/cjs/PreloadManager-84466da6.js +0 -224
- package/dist/cjs/SnkMultiSelectionListDataSource-ba5838c2.js +0 -49
- package/dist/cjs/snk-data-unit-1bc69073.js +0 -462
- package/dist/cjs/snk-grid-config.cjs.entry.js +0 -483
- package/dist/cjs/snk-select-box.cjs.entry.js +0 -25
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
- package/dist/components/field-search.js +0 -121
- package/dist/components/index3.js +0 -199
- package/dist/esm/PreloadManager-c1c2f2b4.js +0 -222
- package/dist/esm/SnkMultiSelectionListDataSource-44494b0e.js +0 -43
- package/dist/esm/snk-data-unit-6208ebf0.js +0 -460
- package/dist/esm/snk-grid-config.entry.js +0 -479
- package/dist/esm/snk-select-box.entry.js +0 -21
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
- 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-1d75d9f9.entry.js +0 -1
- package/dist/sankhyablocks/p-20726710.entry.js +0 -1
- package/dist/sankhyablocks/p-25927311.entry.js +0 -1
- package/dist/sankhyablocks/p-32f0935f.js +0 -1
- package/dist/sankhyablocks/p-374d03f6.js +0 -1
- package/dist/sankhyablocks/p-3891ae6f.js +0 -60
- package/dist/sankhyablocks/p-4775a293.entry.js +0 -1
- package/dist/sankhyablocks/p-573a07c5.js +0 -1
- package/dist/sankhyablocks/p-5f74c859.entry.js +0 -1
- package/dist/sankhyablocks/p-69754d94.entry.js +0 -1
- package/dist/sankhyablocks/p-6977a26c.entry.js +0 -1
- package/dist/sankhyablocks/p-69efa80d.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-8d70b5d5.entry.js +0 -1
- package/dist/sankhyablocks/p-98674137.entry.js +0 -1
- package/dist/sankhyablocks/p-a9e4bb55.entry.js +0 -1
- package/dist/sankhyablocks/p-a9e5b094.entry.js +0 -1
- package/dist/sankhyablocks/p-aa0ae6bc.entry.js +0 -1
- package/dist/sankhyablocks/p-aa95fb2c.js +0 -56
- package/dist/sankhyablocks/p-b05ab13d.entry.js +0 -1
- package/dist/sankhyablocks/p-ba3d3fa9.entry.js +0 -11
- package/dist/sankhyablocks/p-c22c1d8e.js +0 -1
- package/dist/sankhyablocks/p-c4d19840.entry.js +0 -1
- package/dist/sankhyablocks/p-c6e477ff.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-d4f9ee17.entry.js +0 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
- package/dist/sankhyablocks/p-d81f20c4.entry.js +0 -1
- package/dist/sankhyablocks/p-d9bb09b3.js +0 -6
- package/dist/sankhyablocks/p-e6380c60.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/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +0 -3
- /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
@@ -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";
|
@@ -30,9 +30,12 @@ export class SnkApplication {
|
|
30
30
|
this._duPromises = new Map();
|
31
31
|
this._requestListener = new RequestListenerLoadingBar();
|
32
32
|
this._pendingActions = new Map;
|
33
|
+
this._loadPkParameter = null;
|
33
34
|
this._isLoadedByPk = false;
|
34
35
|
this.messagesBuilder = undefined;
|
35
36
|
this.configName = undefined;
|
37
|
+
this.gridLegacyConfigName = undefined;
|
38
|
+
this.formLegacyConfigName = undefined;
|
36
39
|
this.loadByPK = undefined;
|
37
40
|
}
|
38
41
|
async processPendingActions(actionsLocker) {
|
@@ -85,6 +88,12 @@ export class SnkApplication {
|
|
85
88
|
});
|
86
89
|
}
|
87
90
|
}
|
91
|
+
watchPropHandler(newValue, _) {
|
92
|
+
if (newValue && this._loadPkParameter) {
|
93
|
+
this.loadByPK(this._loadPkParameter.pk, this._loadPkParameter.redirect);
|
94
|
+
this._loadPkParameter = null;
|
95
|
+
}
|
96
|
+
}
|
88
97
|
/**
|
89
98
|
* Obtém o controlador de teclado.
|
90
99
|
*
|
@@ -345,7 +354,7 @@ export class SnkApplication {
|
|
345
354
|
* Cria o DataUnit a partir do nome da entidade. É possível armazená-lo no cache
|
346
355
|
* passando o dataUnitName, assim, se mais de uma chamada for feita, o mesmo DataUnit será usado.
|
347
356
|
*/
|
348
|
-
async createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID) {
|
357
|
+
async createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID, options) {
|
349
358
|
if (resourceID == undefined) {
|
350
359
|
resourceID = this.applicationResourceID;
|
351
360
|
}
|
@@ -355,21 +364,29 @@ export class SnkApplication {
|
|
355
364
|
duPromisses.push(new PendingPromise(resolve, reject));
|
356
365
|
if (!waitingDu) {
|
357
366
|
const dataUnit = this.dataUnitFetcher.getDataUnit(entityName, resourceID, parentDataUnit, configName);
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
}
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
}
|
369
|
-
}
|
367
|
+
if (options === null || options === void 0 ? void 0 : options.skipLoadMetadata) {
|
368
|
+
this.processResolveDataUnit(dataUnit, dataUnitName, duPromisses);
|
369
|
+
}
|
370
|
+
else {
|
371
|
+
dataUnit.loadMetadata().then(() => {
|
372
|
+
this.processResolveDataUnit(dataUnit, dataUnitName, duPromisses);
|
373
|
+
}).catch(reason => {
|
374
|
+
while (duPromisses.length > 0) {
|
375
|
+
duPromisses.pop().reject(reason);
|
376
|
+
}
|
377
|
+
});
|
378
|
+
}
|
370
379
|
}
|
371
380
|
});
|
372
381
|
}
|
382
|
+
processResolveDataUnit(dataUnit, dataUnitName, duPromisses) {
|
383
|
+
if (dataUnitName) {
|
384
|
+
this.updateDataunitCache(undefined, dataUnitName, dataUnit);
|
385
|
+
}
|
386
|
+
while (duPromisses.length > 0) {
|
387
|
+
duPromisses.pop().resolve(dataUnit);
|
388
|
+
}
|
389
|
+
}
|
373
390
|
/**
|
374
391
|
* Atualiza o cache de dataunits da aplicação.
|
375
392
|
* @param oldName - Nome do dataunit que está em cache.
|
@@ -385,14 +402,14 @@ export class SnkApplication {
|
|
385
402
|
/**
|
386
403
|
* Obtem um DataUnit do cache ou cria um caso ainda não tenha sido criado.
|
387
404
|
*/
|
388
|
-
async getDataUnit(entityName, dataUnitName, parentDataUnit, configName, resourceID) {
|
405
|
+
async getDataUnit(entityName, dataUnitName, parentDataUnit, configName, resourceID, options) {
|
389
406
|
return new Promise((resolve, reject) => {
|
390
407
|
const dataUnit = this._duCache.get(dataUnitName);
|
391
408
|
if (dataUnit) {
|
392
409
|
resolve(dataUnit);
|
393
410
|
}
|
394
411
|
else {
|
395
|
-
this.createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID).then(dataUnit => {
|
412
|
+
this.createDataunit(entityName, dataUnitName, parentDataUnit, configName, resourceID, options).then(dataUnit => {
|
396
413
|
resolve(dataUnit);
|
397
414
|
}).catch(reason => reject(reason));
|
398
415
|
}
|
@@ -757,6 +774,15 @@ export class SnkApplication {
|
|
757
774
|
this._waitingAppReady.push(() => resolve(this));
|
758
775
|
});
|
759
776
|
}
|
777
|
+
/**
|
778
|
+
* Atribui valor para parâmetros de contexto no componente de pesquisa.
|
779
|
+
*
|
780
|
+
* @param name - Nome do parâmetro
|
781
|
+
* @param value - String conversível de acordo com o tipo do parâmetro
|
782
|
+
*/
|
783
|
+
async setSearchFilterContext(name, value) {
|
784
|
+
ApplicationContext.setContextValue(`__SNK__APPLICATION__FILTER__CONTEXT(${name})__`, value);
|
785
|
+
}
|
760
786
|
clearContent(container) {
|
761
787
|
if (container) {
|
762
788
|
Array.from(container.children).forEach(child => {
|
@@ -776,15 +802,23 @@ export class SnkApplication {
|
|
776
802
|
return;
|
777
803
|
const resourceIDfromUrl = this.getResourceIdFromToken();
|
778
804
|
const pkObject = UrlUtils.getPkObjectFromUrlToken(top.window.location.hash);
|
779
|
-
|
805
|
+
const redirectFrom = window["redirectFrom"];
|
806
|
+
if (pkObject === undefined) {
|
780
807
|
return;
|
808
|
+
}
|
809
|
+
if (!redirectFrom || redirectFrom.split("_")[0].indexOf(resourceIDfromUrl.split("_")[0]) === -1) {
|
810
|
+
if (resourceIDfromUrl !== this.applicationResourceID) {
|
811
|
+
return;
|
812
|
+
}
|
813
|
+
}
|
781
814
|
const pkParam = { pk: pkObject };
|
782
815
|
this._isLoadedByPk = true;
|
783
816
|
if (this.loadByPK) {
|
784
|
-
this.loadByPK(pkParam);
|
817
|
+
this.loadByPK(pkParam, redirectFrom);
|
785
818
|
this._currentPkParameter = pkHash;
|
786
819
|
return;
|
787
820
|
}
|
821
|
+
this._loadPkParameter = { pk: pkParam, redirect: redirectFrom };
|
788
822
|
this.defaultLoadByPK(pkParam, pkHash);
|
789
823
|
}
|
790
824
|
getResourceIdFromToken() {
|
@@ -932,7 +966,11 @@ export class SnkApplication {
|
|
932
966
|
ApplicationContext.setContextValue("__EZUI__GRID_LICENSE__", agGridLicense);
|
933
967
|
this.registerPkChangeListener();
|
934
968
|
ErrorTracking.init();
|
935
|
-
|
969
|
+
let legacyConfig = {
|
970
|
+
gridLegacyConfig: this.gridLegacyConfigName,
|
971
|
+
formLegacyConfig: this.formLegacyConfigName
|
972
|
+
};
|
973
|
+
ConfigStorage.preload(this.applicationResourceID, this.configName, legacyConfig);
|
936
974
|
document.addEventListener("click", () => Workspace.applicationClick());
|
937
975
|
this._waitingAppReady.forEach(resolve => resolve());
|
938
976
|
}
|
@@ -1021,14 +1059,48 @@ export class SnkApplication {
|
|
1021
1059
|
"attribute": "config-name",
|
1022
1060
|
"reflect": false
|
1023
1061
|
},
|
1062
|
+
"gridLegacyConfigName": {
|
1063
|
+
"type": "string",
|
1064
|
+
"mutable": false,
|
1065
|
+
"complexType": {
|
1066
|
+
"original": "string",
|
1067
|
+
"resolved": "string",
|
1068
|
+
"references": {}
|
1069
|
+
},
|
1070
|
+
"required": false,
|
1071
|
+
"optional": false,
|
1072
|
+
"docs": {
|
1073
|
+
"tags": [],
|
1074
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grade."
|
1075
|
+
},
|
1076
|
+
"attribute": "grid-legacy-config-name",
|
1077
|
+
"reflect": false
|
1078
|
+
},
|
1079
|
+
"formLegacyConfigName": {
|
1080
|
+
"type": "string",
|
1081
|
+
"mutable": false,
|
1082
|
+
"complexType": {
|
1083
|
+
"original": "string",
|
1084
|
+
"resolved": "string",
|
1085
|
+
"references": {}
|
1086
|
+
},
|
1087
|
+
"required": false,
|
1088
|
+
"optional": false,
|
1089
|
+
"docs": {
|
1090
|
+
"tags": [],
|
1091
|
+
"text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
|
1092
|
+
},
|
1093
|
+
"attribute": "form-legacy-config-name",
|
1094
|
+
"reflect": false
|
1095
|
+
},
|
1024
1096
|
"loadByPK": {
|
1025
1097
|
"type": "unknown",
|
1026
1098
|
"mutable": false,
|
1027
1099
|
"complexType": {
|
1028
|
-
"original": "
|
1029
|
-
"resolved": "(objPK: { pk: Record<string, any>; }) => void",
|
1100
|
+
"original": "LoadByPkHandler",
|
1101
|
+
"resolved": "(objPK: { pk: Record<string, any>; }, redirectFrom?: string) => void",
|
1030
1102
|
"references": {
|
1031
|
-
"
|
1103
|
+
"LoadByPkHandler": {
|
1032
1104
|
"location": "global"
|
1033
1105
|
}
|
1034
1106
|
}
|
@@ -1629,7 +1701,7 @@ export class SnkApplication {
|
|
1629
1701
|
},
|
1630
1702
|
"createDataunit": {
|
1631
1703
|
"complexType": {
|
1632
|
-
"signature": "(entityName: string, dataUnitName?: string, parentDataUnit?: DataUnit, configName?: string, resourceID?: string) => Promise<DataUnit>",
|
1704
|
+
"signature": "(entityName: string, dataUnitName?: string, parentDataUnit?: DataUnit, configName?: string, resourceID?: string, options?: GetDataUnitOptions) => Promise<DataUnit>",
|
1633
1705
|
"parameters": [{
|
1634
1706
|
"tags": [],
|
1635
1707
|
"text": ""
|
@@ -1645,6 +1717,9 @@ export class SnkApplication {
|
|
1645
1717
|
}, {
|
1646
1718
|
"tags": [],
|
1647
1719
|
"text": ""
|
1720
|
+
}, {
|
1721
|
+
"tags": [],
|
1722
|
+
"text": ""
|
1648
1723
|
}],
|
1649
1724
|
"references": {
|
1650
1725
|
"Promise": {
|
@@ -1653,6 +1728,9 @@ export class SnkApplication {
|
|
1653
1728
|
"DataUnit": {
|
1654
1729
|
"location": "import",
|
1655
1730
|
"path": "@sankhyalabs/core"
|
1731
|
+
},
|
1732
|
+
"GetDataUnitOptions": {
|
1733
|
+
"location": "global"
|
1656
1734
|
}
|
1657
1735
|
},
|
1658
1736
|
"return": "Promise<DataUnit>"
|
@@ -1711,7 +1789,7 @@ export class SnkApplication {
|
|
1711
1789
|
},
|
1712
1790
|
"getDataUnit": {
|
1713
1791
|
"complexType": {
|
1714
|
-
"signature": "(entityName: string, dataUnitName: string, parentDataUnit?: DataUnit, configName?: string, resourceID?: string) => Promise<DataUnit>",
|
1792
|
+
"signature": "(entityName: string, dataUnitName: string, parentDataUnit?: DataUnit, configName?: string, resourceID?: string, options?: GetDataUnitOptions) => Promise<DataUnit>",
|
1715
1793
|
"parameters": [{
|
1716
1794
|
"tags": [],
|
1717
1795
|
"text": ""
|
@@ -1727,6 +1805,9 @@ export class SnkApplication {
|
|
1727
1805
|
}, {
|
1728
1806
|
"tags": [],
|
1729
1807
|
"text": ""
|
1808
|
+
}, {
|
1809
|
+
"tags": [],
|
1810
|
+
"text": ""
|
1730
1811
|
}],
|
1731
1812
|
"references": {
|
1732
1813
|
"Promise": {
|
@@ -1735,6 +1816,9 @@ export class SnkApplication {
|
|
1735
1816
|
"DataUnit": {
|
1736
1817
|
"location": "import",
|
1737
1818
|
"path": "@sankhyalabs/core"
|
1819
|
+
},
|
1820
|
+
"GetDataUnitOptions": {
|
1821
|
+
"location": "global"
|
1738
1822
|
}
|
1739
1823
|
},
|
1740
1824
|
"return": "Promise<DataUnit>"
|
@@ -2392,10 +2476,50 @@ export class SnkApplication {
|
|
2392
2476
|
"text": "SnkApplication carregado."
|
2393
2477
|
}]
|
2394
2478
|
}
|
2479
|
+
},
|
2480
|
+
"setSearchFilterContext": {
|
2481
|
+
"complexType": {
|
2482
|
+
"signature": "(name: string, value: string) => Promise<void>",
|
2483
|
+
"parameters": [{
|
2484
|
+
"tags": [{
|
2485
|
+
"name": "param",
|
2486
|
+
"text": "name - Nome do par\u00E2metro"
|
2487
|
+
}],
|
2488
|
+
"text": "- Nome do par\u00E2metro"
|
2489
|
+
}, {
|
2490
|
+
"tags": [{
|
2491
|
+
"name": "param",
|
2492
|
+
"text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2493
|
+
}],
|
2494
|
+
"text": "- String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2495
|
+
}],
|
2496
|
+
"references": {
|
2497
|
+
"Promise": {
|
2498
|
+
"location": "global"
|
2499
|
+
}
|
2500
|
+
},
|
2501
|
+
"return": "Promise<void>"
|
2502
|
+
},
|
2503
|
+
"docs": {
|
2504
|
+
"text": "Atribui valor para par\u00E2metros de contexto no componente de pesquisa.",
|
2505
|
+
"tags": [{
|
2506
|
+
"name": "param",
|
2507
|
+
"text": "name - Nome do par\u00E2metro"
|
2508
|
+
}, {
|
2509
|
+
"name": "param",
|
2510
|
+
"text": "value - String convers\u00EDvel de acordo com o tipo do par\u00E2metro"
|
2511
|
+
}]
|
2512
|
+
}
|
2395
2513
|
}
|
2396
2514
|
};
|
2397
2515
|
}
|
2398
2516
|
static get elementRef() { return "_element"; }
|
2517
|
+
static get watchers() {
|
2518
|
+
return [{
|
2519
|
+
"propName": "loadByPK",
|
2520
|
+
"methodName": "watchPropHandler"
|
2521
|
+
}];
|
2522
|
+
}
|
2399
2523
|
}
|
2400
2524
|
class RequestListenerLoadingBar {
|
2401
2525
|
constructor() {
|
@@ -1,48 +1,75 @@
|
|
1
|
-
import { h } from
|
2
|
-
import { ApplicationContext } from
|
3
|
-
import { AttachFetcher } from
|
4
|
-
import { VIEW_MODE } from
|
5
|
-
import
|
6
|
-
import
|
1
|
+
import { h } from '@stencil/core';
|
2
|
+
import { Action, ApplicationContext, DataUnit } from '@sankhyalabs/core';
|
3
|
+
import { AnexoSistemaFetcher, AttachFetcher, DataUnitFetcher } from '../../lib';
|
4
|
+
import { VIEW_MODE } from '../../lib/utils/constants';
|
5
|
+
import { anexoSistemaCrudConfig, AnexoSistemaDataUnitFactory, attachCrudConfig, AttachFetcherDataUnitFactory, buildTaskBarManager, } 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
|
-
registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
43
|
+
async registerKeyWatcher(newRegisterKey, oldRegisterKey) {
|
36
44
|
var _a;
|
37
|
-
if (this.
|
45
|
+
if (this._currentDataUnit == null) {
|
38
46
|
this.loadAttachmentDataUnit();
|
39
47
|
}
|
40
48
|
if (oldRegisterKey !== newRegisterKey) {
|
41
|
-
this.
|
42
|
-
|
43
|
-
|
44
|
-
|
49
|
+
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
|
50
|
+
}
|
51
|
+
}
|
52
|
+
async initAttach() {
|
53
|
+
var _a, _b, _c, _d, _e, _f;
|
54
|
+
if (!this.fetcherType && !this.registerKey)
|
55
|
+
return;
|
56
|
+
if (!this.fetcherType) {
|
57
|
+
this.fetcherType = "AnexoSistema";
|
45
58
|
}
|
59
|
+
this.returnToGridMode();
|
60
|
+
if (this.fetcherType === "AnexoSistema") {
|
61
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
62
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
63
|
+
await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
|
64
|
+
return;
|
65
|
+
}
|
66
|
+
if (this.fetcherType === "Attach") {
|
67
|
+
const hasMoreOneItem = ((_d = this.registerKey) === null || _d === void 0 ? void 0 : _d.split("_").length) > 1;
|
68
|
+
if (hasMoreOneItem)
|
69
|
+
return;
|
70
|
+
}
|
71
|
+
await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadMetadata());
|
72
|
+
await ((_f = this._currentDataUnit) === null || _f === void 0 ? void 0 : _f.loadData(undefined, undefined, true, this.registerKey));
|
46
73
|
}
|
47
74
|
/**
|
48
75
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
@@ -64,60 +91,137 @@ export class SnkAttach {
|
|
64
91
|
window.open(`${selectedRecord.LINK}`);
|
65
92
|
return;
|
66
93
|
}
|
67
|
-
this.
|
68
|
-
|
94
|
+
this._currentFetcher
|
95
|
+
.getDownloadKey(selectedRecord)
|
96
|
+
.then(({ chave }) => {
|
97
|
+
var _a;
|
98
|
+
let forceDownload = false;
|
99
|
+
if (!((_a = selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.ARQUIVO) === null || _a === void 0 ? void 0 : _a.endsWith(".pdf"))) {
|
100
|
+
forceDownload = true;
|
101
|
+
}
|
102
|
+
window.open(`/mge/visualizadorArquivos.mge?chaveArquivo=${chave.valor}${forceDownload ? "&forcarDownload=S" : ""}`);
|
69
103
|
});
|
70
104
|
}
|
71
105
|
returnToGridMode() {
|
72
|
-
|
106
|
+
var _a;
|
107
|
+
(_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.clearSelection();
|
73
108
|
if (this._crudElement)
|
74
109
|
this._crudElement.goToView(VIEW_MODE.GRID);
|
75
110
|
}
|
76
|
-
loadAttachmentDataUnit() {
|
77
|
-
var _a;
|
111
|
+
async loadAttachmentDataUnit() {
|
78
112
|
try {
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
});
|
92
|
-
return this.dataUnit;
|
113
|
+
switch (this.fetcherType) {
|
114
|
+
case "AnexoSistema":
|
115
|
+
await this.loadAnexoSistema();
|
116
|
+
break;
|
117
|
+
case "Attach":
|
118
|
+
await this.loadAttach();
|
119
|
+
break;
|
120
|
+
default:
|
121
|
+
this._currentFetcher = this.fetcher;
|
122
|
+
this._currentDataUnit = this.dataUnit;
|
123
|
+
this._currentDataUnitBuilder = this.dataUnitBuilder;
|
124
|
+
}
|
93
125
|
}
|
94
126
|
catch (error) {
|
95
127
|
throw new Error('There was an error while creating the data unit');
|
96
128
|
}
|
97
129
|
}
|
130
|
+
async loadAnexoSistema() {
|
131
|
+
var _a, _b, _c;
|
132
|
+
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
133
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
134
|
+
if (!this._currentDataUnit.metadata) {
|
135
|
+
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadMetadata());
|
136
|
+
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
137
|
+
}
|
138
|
+
this.initDataUnitLoaders();
|
139
|
+
this._currentDataUnit.addFilterProvider({
|
140
|
+
getFilter: () => this._currentDataUnitBuilder.getFilters(this.registerKey)
|
141
|
+
});
|
142
|
+
this._currentDataUnit.addInterceptor({
|
143
|
+
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
144
|
+
});
|
145
|
+
await ((_c = this._currentDataUnit) === null || _c === void 0 ? void 0 : _c.loadData());
|
146
|
+
this.disableEditFieldsNotInForm();
|
147
|
+
}
|
148
|
+
async loadAttach() {
|
149
|
+
var _a, _b;
|
150
|
+
this._currentFetcher = new AttachFetcher();
|
151
|
+
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
152
|
+
this.initDataUnitLoaders();
|
153
|
+
this._currentDataUnit.addInterceptor({
|
154
|
+
interceptAction: (action) => {
|
155
|
+
var _a;
|
156
|
+
if (action.type === Action.METADATA_LOADED) {
|
157
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
158
|
+
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
159
|
+
}
|
160
|
+
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
161
|
+
}
|
162
|
+
});
|
163
|
+
if (!this._currentDataUnit.metadata) {
|
164
|
+
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
165
|
+
this.crudConfig = Object.assign({}, attachCrudConfig);
|
166
|
+
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
167
|
+
this.disableEditFieldsNotInForm();
|
168
|
+
}
|
169
|
+
}
|
170
|
+
initDataUnitLoaders() {
|
171
|
+
var _a, _b, _c;
|
172
|
+
if (this.fetcherType === "AnexoSistema") {
|
173
|
+
this._currentFetcher = new AnexoSistemaFetcher(this.entityName, this.registerKey, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
174
|
+
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
175
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
176
|
+
}
|
177
|
+
if (this.fetcherType === "Attach") {
|
178
|
+
this._currentFetcher = new AttachFetcher();
|
179
|
+
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
180
|
+
(_c = this._currentDataUnitBuilder) === null || _c === void 0 ? void 0 : _c.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
181
|
+
this.returnToGridMode();
|
182
|
+
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
183
|
+
});
|
184
|
+
}
|
185
|
+
}
|
98
186
|
disableEditFieldsNotInForm() {
|
99
187
|
var _a;
|
100
188
|
(_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid.columns.forEach(column => {
|
101
189
|
var _a;
|
102
190
|
const fieldName = column.name;
|
103
191
|
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
104
|
-
this.
|
192
|
+
this._currentDataUnit.disableField(fieldName);
|
105
193
|
}
|
106
194
|
});
|
107
195
|
}
|
108
|
-
componentWillLoad() {
|
196
|
+
async componentWillLoad() {
|
109
197
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
198
|
+
await this.initAttach();
|
110
199
|
}
|
111
200
|
componentWillRender() {
|
112
|
-
if (this.
|
201
|
+
if (!this.fetcherType) {
|
202
|
+
this.fetcherType = "AnexoSistema";
|
203
|
+
}
|
204
|
+
if (this._currentDataUnit == null) {
|
113
205
|
this.loadAttachmentDataUnit();
|
114
206
|
}
|
115
207
|
}
|
208
|
+
async handleOnDataStateChange({ detail }) {
|
209
|
+
if (this.fetcherType !== 'Attach')
|
210
|
+
return;
|
211
|
+
if (!detail.insertionMode) {
|
212
|
+
this._currentDataUnit.disableField('DESCRICAO');
|
213
|
+
}
|
214
|
+
else {
|
215
|
+
this._currentDataUnit.enableField('DESCRICAO');
|
216
|
+
}
|
217
|
+
await this._currentDataUnit.loadMetadata();
|
218
|
+
}
|
219
|
+
;
|
116
220
|
render() {
|
117
221
|
var _a, _b;
|
118
|
-
if (!this.
|
222
|
+
if (!this._currentDataUnit)
|
119
223
|
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.
|
224
|
+
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
225
|
}
|
122
226
|
static get is() { return "snk-attach"; }
|
123
227
|
static get encapsulation() { return "scoped"; }
|
@@ -133,6 +237,88 @@ export class SnkAttach {
|
|
133
237
|
}
|
134
238
|
static get properties() {
|
135
239
|
return {
|
240
|
+
"fetcherType": {
|
241
|
+
"type": "string",
|
242
|
+
"mutable": false,
|
243
|
+
"complexType": {
|
244
|
+
"original": "TFetcherType",
|
245
|
+
"resolved": "\"AnexoSistema\" | \"Another\" | \"Attach\"",
|
246
|
+
"references": {
|
247
|
+
"TFetcherType": {
|
248
|
+
"location": "import",
|
249
|
+
"path": "./interfaces/TFetcherType"
|
250
|
+
}
|
251
|
+
}
|
252
|
+
},
|
253
|
+
"required": false,
|
254
|
+
"optional": false,
|
255
|
+
"docs": {
|
256
|
+
"tags": [],
|
257
|
+
"text": "FetcherType define o tipo de fetcher respons\u00E1vel por carregar os dados do DataUnit."
|
258
|
+
},
|
259
|
+
"attribute": "fetcher-type",
|
260
|
+
"reflect": false
|
261
|
+
},
|
262
|
+
"fetcher": {
|
263
|
+
"type": "unknown",
|
264
|
+
"mutable": false,
|
265
|
+
"complexType": {
|
266
|
+
"original": "AttachFetcherFacadeInterface",
|
267
|
+
"resolved": "AttachFetcherFacadeInterface",
|
268
|
+
"references": {
|
269
|
+
"AttachFetcherFacadeInterface": {
|
270
|
+
"location": "import",
|
271
|
+
"path": "../../lib"
|
272
|
+
}
|
273
|
+
}
|
274
|
+
},
|
275
|
+
"required": false,
|
276
|
+
"optional": false,
|
277
|
+
"docs": {
|
278
|
+
"tags": [],
|
279
|
+
"text": "Fetcher respons\u00E1vel por carregar os dados do DataUnit."
|
280
|
+
}
|
281
|
+
},
|
282
|
+
"dataUnit": {
|
283
|
+
"type": "unknown",
|
284
|
+
"mutable": false,
|
285
|
+
"complexType": {
|
286
|
+
"original": "DataUnit",
|
287
|
+
"resolved": "DataUnit",
|
288
|
+
"references": {
|
289
|
+
"DataUnit": {
|
290
|
+
"location": "import",
|
291
|
+
"path": "@sankhyalabs/core"
|
292
|
+
}
|
293
|
+
}
|
294
|
+
},
|
295
|
+
"required": false,
|
296
|
+
"optional": false,
|
297
|
+
"docs": {
|
298
|
+
"tags": [],
|
299
|
+
"text": "DataUnit respons\u00E1vel por carregar os dados."
|
300
|
+
}
|
301
|
+
},
|
302
|
+
"dataUnitBuilder": {
|
303
|
+
"type": "unknown",
|
304
|
+
"mutable": false,
|
305
|
+
"complexType": {
|
306
|
+
"original": "FetcherFacade",
|
307
|
+
"resolved": "FetcherFacade",
|
308
|
+
"references": {
|
309
|
+
"FetcherFacade": {
|
310
|
+
"location": "import",
|
311
|
+
"path": "./structure"
|
312
|
+
}
|
313
|
+
}
|
314
|
+
},
|
315
|
+
"required": false,
|
316
|
+
"optional": false,
|
317
|
+
"docs": {
|
318
|
+
"tags": [],
|
319
|
+
"text": "DataUnitBuilder respons\u00E1vel por implementar dados a serem utilizados no DataUnit."
|
320
|
+
}
|
321
|
+
},
|
136
322
|
"registerKey": {
|
137
323
|
"type": "string",
|
138
324
|
"mutable": false,
|
@@ -158,7 +344,7 @@ export class SnkAttach {
|
|
158
344
|
"resolved": "string",
|
159
345
|
"references": {}
|
160
346
|
},
|
161
|
-
"required":
|
347
|
+
"required": false,
|
162
348
|
"optional": false,
|
163
349
|
"docs": {
|
164
350
|
"tags": [],
|
@@ -191,7 +377,8 @@ export class SnkAttach {
|
|
191
377
|
}
|
192
378
|
static get states() {
|
193
379
|
return {
|
194
|
-
"
|
380
|
+
"_currentFetcher": {},
|
381
|
+
"_currentDataUnit": {},
|
195
382
|
"crudConfig": {}
|
196
383
|
};
|
197
384
|
}
|