@sankhyalabs/sankhyablocks 8.15.0-dev.6 → 8.15.0-dev.60
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-7df9d3bb.js} +102 -30
- package/dist/cjs/IExporterProvider-1ed8e92a.js +187 -0
- package/dist/cjs/{ISave-d68ce3cd.js → ISave-e91b70a7.js} +1 -0
- package/dist/cjs/RecordIDUtils-3735135c.js +43 -0
- package/dist/cjs/{SnkFormConfigManager-7d850fbc.js → SnkFormConfigManager-4259edbe.js} +21 -13
- package/dist/cjs/{SnkMessageBuilder-7293d0ad.js → SnkMessageBuilder-66aa2557.js} +19 -1
- package/dist/cjs/{auth-fetcher-c8467c07.js → auth-fetcher-e6112be7.js} +1 -1
- package/dist/cjs/{DataFetcher-ba94ed5b.js → form-config-fetcher-3c4daeb5.js} +258 -4
- 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-cb768be1.js} +520 -86
- 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} +529 -13
- package/dist/cjs/snk-application.cjs.entry.js +62 -28
- package/dist/cjs/snk-attach.cjs.entry.js +422 -62
- package/dist/cjs/snk-crud.cjs.entry.js +17 -12
- package/dist/cjs/snk-data-exporter.cjs.entry.js +204 -82
- package/dist/cjs/{snk-data-unit-1bc69073.js → snk-data-unit-abd2113f.js} +3 -38
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -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 +65 -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 +2 -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 +46 -27
- package/dist/cjs/snk-form.cjs.entry.js +10 -4
- package/dist/cjs/snk-grid.cjs.entry.js +95 -116
- package/dist/cjs/{snk-guides-viewer-cb176c4d.js → snk-guides-viewer-bec9c1a5.js} +15 -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 +2 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +367 -38
- package/dist/cjs/snk-taskbar.cjs.entry.js +124 -15
- package/dist/cjs/{taskbar-elements-01b85b99.js → taskbar-elements-d9392685.js} +11 -11
- 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 +85 -2
- package/dist/collection/components/snk-attach/snk-attach.js +212 -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/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 +48 -1
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +1 -0
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +53 -0
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +55 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +42 -48
- 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 +3 -42
- 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 +159 -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 +102 -109
- 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 +548 -20
- 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 +167 -14
- package/dist/collection/lib/configs/ConfigStorage.js +86 -16
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +9 -40
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +33 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +7 -4
- 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 +32 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +36 -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 +12 -13
- 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 +93 -21
- package/dist/components/IExporterProvider.js +256 -0
- package/dist/components/ISave.js +42 -0
- package/dist/components/SnkFormConfigManager.js +19 -11
- package/dist/components/SnkMessageBuilder.js +19 -1
- package/dist/components/dataunit-fetcher.js +138 -91
- package/dist/components/form-config-fetcher.js +7035 -3
- package/dist/components/index.d.ts +6 -6
- package/dist/components/index2.js +198 -33
- package/dist/components/snk-actions-button2.js +3 -11
- package/dist/components/snk-application2.js +42 -3
- package/dist/components/snk-attach2.js +478 -70
- package/dist/components/snk-crud.js +18 -7
- package/dist/components/snk-data-exporter2.js +199 -82
- package/dist/components/snk-data-unit2.js +41 -39
- package/dist/components/snk-detail-view2.js +44 -12
- 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 -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 +47 -27
- package/dist/components/snk-form.js +8 -0
- package/dist/components/snk-grid-config2.js +128 -102
- package/dist/components/snk-grid2.js +96 -112
- 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 +421 -34
- package/dist/components/snk-taskbar2.js +144 -29
- package/dist/components/taskbar-actions-button2.js +4 -2
- package/dist/esm/{ConfigStorage-1244b8b0.js → ConfigStorage-928c3bf4.js} +93 -21
- package/dist/esm/IExporterProvider-ceabfb7e.js +179 -0
- package/dist/esm/{ISave-4412b20c.js → ISave-d8c8bc59.js} +1 -0
- package/dist/esm/RecordIDUtils-87d02110.js +41 -0
- package/dist/esm/{SnkFormConfigManager-9be0e7d4.js → SnkFormConfigManager-a87ade7a.js} +21 -13
- package/dist/esm/{SnkMessageBuilder-ca843d1b.js → SnkMessageBuilder-0a4becdd.js} +19 -1
- package/dist/esm/{auth-fetcher-c05dc474.js → auth-fetcher-e1cb288f.js} +1 -1
- package/dist/esm/{DataFetcher-aa159c5a.js → form-config-fetcher-e3094014.js} +257 -5
- package/dist/esm/index-a7d3d3f1.js +2 -10
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-65714f21.js → pesquisa-fetcher-72125b13.js} +494 -69
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_2.entry.js → snk-actions-button_4.entry.js} +523 -9
- package/dist/esm/snk-application.entry.js +43 -9
- package/dist/esm/snk-attach.entry.js +422 -62
- package/dist/esm/snk-crud.entry.js +17 -12
- package/dist/esm/snk-data-exporter.entry.js +204 -82
- package/dist/esm/{snk-data-unit-6208ebf0.js → snk-data-unit-29eba11a.js} +4 -39
- package/dist/esm/snk-data-unit.entry.js +3 -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 +65 -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 +2 -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 +47 -28
- package/dist/esm/snk-form.entry.js +10 -4
- package/dist/esm/snk-grid.entry.js +95 -116
- package/dist/esm/{snk-guides-viewer-eeb8f354.js → snk-guides-viewer-303aafb4.js} +15 -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 +2 -3
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +359 -30
- package/dist/esm/snk-taskbar.entry.js +125 -16
- package/dist/esm/{taskbar-elements-d4d0b424.js → taskbar-elements-ad766858.js} +11 -11
- package/dist/sankhyablocks/p-029bfc09.js +1 -0
- package/dist/sankhyablocks/p-07825198.js +1 -0
- package/dist/sankhyablocks/p-0e8702f0.js +1 -0
- package/dist/sankhyablocks/p-13ea113d.entry.js +1 -0
- package/dist/sankhyablocks/p-1fa244c0.entry.js +1 -0
- package/dist/sankhyablocks/{p-9e7d65a4.js → p-21749402.js} +1 -1
- package/dist/sankhyablocks/p-2d972c2e.entry.js +1 -0
- package/dist/sankhyablocks/p-314e2d1a.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-3494a28e.entry.js +1 -0
- package/dist/sankhyablocks/p-35bd4df7.entry.js +1 -0
- package/dist/sankhyablocks/p-536eeb16.js +26 -0
- package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
- package/dist/sankhyablocks/p-563701f3.js +1 -0
- package/dist/sankhyablocks/p-61984566.entry.js +1 -0
- package/dist/sankhyablocks/p-61dd89eb.js +1 -0
- package/dist/sankhyablocks/p-64977b22.entry.js +1 -0
- package/dist/sankhyablocks/p-65b6dba3.entry.js +1 -0
- package/dist/sankhyablocks/p-6bc64fb0.entry.js +1 -0
- package/dist/sankhyablocks/p-70a4af56.entry.js +1 -0
- package/dist/sankhyablocks/p-9863d682.js +1 -0
- package/dist/sankhyablocks/p-aedf37fb.js +65 -0
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +1 -0
- package/dist/sankhyablocks/p-b233f5aa.entry.js +1 -0
- package/dist/sankhyablocks/p-b86ea293.entry.js +1 -0
- package/dist/sankhyablocks/p-bf2acf72.entry.js +1 -0
- package/dist/sankhyablocks/p-c73482cf.js +1 -0
- package/dist/sankhyablocks/p-cb3c7b4a.entry.js +11 -0
- package/dist/sankhyablocks/p-cfb98f51.entry.js +1 -0
- package/dist/sankhyablocks/{p-247a8b36.entry.js → p-d1791da2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d911a023.entry.js +1 -0
- package/dist/sankhyablocks/p-e27496ed.js +56 -0
- package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
- package/dist/sankhyablocks/p-fa84e72f.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/__mocks__/snk-application.d.ts +3 -0
- package/dist/types/components/snk-application/snk-application.d.ts +15 -0
- package/dist/types/components/snk-attach/{structure/crud-config-builder.d.ts → interfaces/ICrudConfig.d.ts} +1 -2
- package/dist/types/components/snk-attach/interfaces/TFetcherType.d.ts +1 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +29 -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-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 +21 -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-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 +27 -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 -4
- 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 +98 -4
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +34 -1
- package/dist/types/components.d.ts +314 -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/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/loadstrategy/DatasetStrategy.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.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/form-config-fetcher-df043d3d.js +0 -244
- 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/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +0 -34
- package/dist/components/DataFetcher.js +0 -7021
- 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/form-config-fetcher-36219cd3.js +0 -241
- 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-0dca29cb.entry.js +0 -1
- 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-32f0935f.js +0 -1
- package/dist/sankhyablocks/p-3520c088.entry.js +0 -1
- 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-9695f78b.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-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-e6380c60.js +0 -1
- package/dist/sankhyablocks/p-f2056f66.entry.js +0 -1
- package/dist/sankhyablocks/p-f514913b.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/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
@@ -1,16 +1,15 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { StringUtils, ElementIDUtils, ApplicationContext, JSUtils, FloatingManager } from '@sankhyalabs/core';
|
3
3
|
import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
|
4
|
-
import './
|
4
|
+
import './form-config-fetcher.js';
|
5
5
|
import './dataunit-fetcher.js';
|
6
|
-
import { P as PresentationMode } from './
|
7
|
-
import { d as defineCustomElement$w } from './snk-actions-button2.js';
|
6
|
+
import { P as PresentationMode } from './ISave.js';
|
8
7
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
8
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
9
|
import './filter-item-type.enum.js';
|
11
|
-
import './form-config-fetcher.js';
|
12
10
|
import { V as VIEW_MODE } from './constants.js';
|
13
11
|
import { A as AutorizationType } from './auth-fetcher.js';
|
12
|
+
import { d as defineCustomElement$w } from './snk-actions-button2.js';
|
14
13
|
import { d as defineCustomElement$v } from './snk-attach2.js';
|
15
14
|
import { d as defineCustomElement$u } from './snk-config-options2.js';
|
16
15
|
import { d as defineCustomElement$t } from './snk-configurator2.js';
|
@@ -59,6 +58,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
59
58
|
this._canEdit = undefined;
|
60
59
|
this._resourceID = undefined;
|
61
60
|
this.configName = undefined;
|
61
|
+
this.filterBarTitle = undefined;
|
62
62
|
this.selectionToastConfig = undefined;
|
63
63
|
this.showActionButtons = false;
|
64
64
|
this.actionsList = undefined;
|
@@ -69,6 +69,10 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
69
69
|
this.presentationMode = PresentationMode.PRIMARY;
|
70
70
|
this.messagesBuilder = undefined;
|
71
71
|
this.useEnterLikeTab = false;
|
72
|
+
this.gridLegacyConfigName = undefined;
|
73
|
+
this.filterBarLegacyConfigName = undefined;
|
74
|
+
this.formLegacyConfigName = undefined;
|
75
|
+
this.disablePersonalizedFilter = undefined;
|
72
76
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
73
77
|
}
|
74
78
|
/**
|
@@ -201,7 +205,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
201
205
|
window.removeEventListener("keydown", this._keyDownHandler);
|
202
206
|
}
|
203
207
|
async initKeyboardManager() {
|
204
|
-
|
208
|
+
var _a;
|
209
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
205
210
|
if (keyboardManager) {
|
206
211
|
const dataUnit = this._dataUnit || await this._snkDataUnit.getDataUnit();
|
207
212
|
async function saveDataUnitHandlingFocus() {
|
@@ -250,7 +255,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
250
255
|
}
|
251
256
|
}
|
252
257
|
async removeShortcuts() {
|
253
|
-
|
258
|
+
var _a;
|
259
|
+
const keyboardManager = await ((_a = this._application) === null || _a === void 0 ? void 0 : _a.getKeyboardManager());
|
254
260
|
if (keyboardManager) {
|
255
261
|
keyboardManager
|
256
262
|
.unbind("F6")
|
@@ -317,7 +323,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
317
323
|
return;
|
318
324
|
}
|
319
325
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
320
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
326
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
321
327
|
}
|
322
328
|
get _element() { return this; }
|
323
329
|
static get watchers() { return {
|
@@ -326,6 +332,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
326
332
|
static get style() { return snkCrudCss; }
|
327
333
|
}, [6, "snk-crud", {
|
328
334
|
"configName": [1025, "config-name"],
|
335
|
+
"filterBarTitle": [1, "filter-bar-title"],
|
329
336
|
"selectionToastConfig": [16],
|
330
337
|
"showActionButtons": [4, "show-action-buttons"],
|
331
338
|
"actionsList": [16],
|
@@ -336,6 +343,10 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
336
343
|
"presentationMode": [1, "presentation-mode"],
|
337
344
|
"messagesBuilder": [1040],
|
338
345
|
"useEnterLikeTab": [4, "use-enter-like-tab"],
|
346
|
+
"gridLegacyConfigName": [1, "grid-legacy-config-name"],
|
347
|
+
"filterBarLegacyConfigName": [1, "filter-bar-legacy-config-name"],
|
348
|
+
"formLegacyConfigName": [1, "form-legacy-config-name"],
|
349
|
+
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
339
350
|
"_dataUnit": [32],
|
340
351
|
"_dataState": [32],
|
341
352
|
"attachmentRegisterKey": [32],
|
@@ -1,10 +1,14 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { ApplicationContext, ObjectUtils, DataType, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, ObjectUtils, UserInterface, DataType, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
-
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './
|
4
|
+
import { D as DataExporterOption, a as DataExporterFormat, b as DataExporterType } from './ISave.js';
|
5
5
|
import { R as REPORT_LAUNCHER_RESOURCE_ID } from './constants.js';
|
6
|
-
import { D as DataFetcher } from './
|
6
|
+
import { D as DataFetcher } from './form-config-fetcher.js';
|
7
7
|
import { S as SnkDataUnit } from './snk-data-unit2.js';
|
8
|
+
import './dataunit-fetcher.js';
|
9
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
+
import './filter-item-type.enum.js';
|
8
12
|
import { d as defineCustomElement$1 } from './snk-exporter-email-sender2.js';
|
9
13
|
|
10
14
|
class ItemBuilder {
|
@@ -147,38 +151,6 @@ class ItemBuilder {
|
|
147
151
|
}
|
148
152
|
}
|
149
153
|
|
150
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
151
|
-
var t = {};
|
152
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
153
|
-
t[p] = s[p];
|
154
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
155
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
156
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
157
|
-
t[p[i]] = s[p[i]];
|
158
|
-
}
|
159
|
-
return t;
|
160
|
-
};
|
161
|
-
function fetchDataExporter(_a) {
|
162
|
-
var { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
|
163
|
-
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
164
|
-
const serviceName = `${application.getModuleName()}@DataExporterSPBean.${methodName}`;
|
165
|
-
const payload = { serviceName, requestBody };
|
166
|
-
return new Promise((resolve, reject) => {
|
167
|
-
DataFetcher.get()
|
168
|
-
.callServiceBroker(serviceName, ObjectUtils.objectToString(payload))
|
169
|
-
.then(result => resolve(getFormatResponse$1(result)))
|
170
|
-
.catch(error => reject(error));
|
171
|
-
});
|
172
|
-
}
|
173
|
-
function getFormatResponse$1(result) {
|
174
|
-
var _a;
|
175
|
-
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
176
|
-
if (response == undefined) {
|
177
|
-
return;
|
178
|
-
}
|
179
|
-
return ObjectUtils.stringToObject(response);
|
180
|
-
}
|
181
|
-
|
182
154
|
function getMessage(application, key, params) {
|
183
155
|
var _a;
|
184
156
|
return (_a = application === null || application === void 0 ? void 0 : application.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
@@ -207,17 +179,166 @@ function getFormatResponse(result) {
|
|
207
179
|
return ObjectUtils.stringToObject(response);
|
208
180
|
}
|
209
181
|
|
182
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
183
|
+
var t = {};
|
184
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
185
|
+
t[p] = s[p];
|
186
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
187
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
188
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
189
|
+
t[p[i]] = s[p[i]];
|
190
|
+
}
|
191
|
+
return t;
|
192
|
+
};
|
193
|
+
class ServerSideExporterStrategy {
|
194
|
+
constructor(provider) {
|
195
|
+
this._provider = provider;
|
196
|
+
}
|
197
|
+
async getParams(resolveProps) {
|
198
|
+
var _a, _b, _c, _d, _e, _f;
|
199
|
+
const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
|
200
|
+
const columns = await this._provider.getColumnsMetadata();
|
201
|
+
const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
|
202
|
+
const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
|
203
|
+
const selectedIDs = this._provider.getSelectedIDs();
|
204
|
+
const option = resolveProps.exportOption;
|
205
|
+
const currentPageOptions = [
|
206
|
+
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
207
|
+
DataExporterOption.EXPORT_PAGE_TO_XLS
|
208
|
+
];
|
209
|
+
delete resolveProps.exportOption;
|
210
|
+
let params = Object.assign({ filters,
|
211
|
+
columns,
|
212
|
+
sort,
|
213
|
+
resourceURI, selectedIDs: selectedIDs.slice(0, this._provider.getExportLimit()) }, resolveProps);
|
214
|
+
if (currentPageOptions.includes(option) || resolveProps.type == "page") {
|
215
|
+
const offset = this._provider.getOffset();
|
216
|
+
const limit = this._provider.getPageSize();
|
217
|
+
params = Object.assign(Object.assign({}, params), { offset,
|
218
|
+
limit, selectedIDs: [] });
|
219
|
+
}
|
220
|
+
else if (resolveProps.type == "all") {
|
221
|
+
params = Object.assign(Object.assign({}, params), { offset: 0, limit: this._provider.getExportLimit(), selectedIDs: [] });
|
222
|
+
}
|
223
|
+
return Promise.resolve(params);
|
224
|
+
}
|
225
|
+
async executeExport(resolveProps) {
|
226
|
+
const _a = await this.getParams(resolveProps), { methodName } = _a, requestBody = __rest(_a, ["methodName"]);
|
227
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
228
|
+
const serviceName = `${application.getModuleName()}@DataExporterSPBean.${methodName}`;
|
229
|
+
const payload = { serviceName, requestBody };
|
230
|
+
return new Promise((resolve, reject) => {
|
231
|
+
DataFetcher.get()
|
232
|
+
.callServiceBroker(serviceName, ObjectUtils.objectToString(payload))
|
233
|
+
.then(result => resolve(this.getFormatResponse(result)))
|
234
|
+
.catch(error => reject(error));
|
235
|
+
});
|
236
|
+
}
|
237
|
+
getFormatResponse(result) {
|
238
|
+
var _a;
|
239
|
+
const response = (_a = result === null || result === void 0 ? void 0 : result.json) === null || _a === void 0 ? void 0 : _a.$;
|
240
|
+
if (response == undefined) {
|
241
|
+
return;
|
242
|
+
}
|
243
|
+
return ObjectUtils.stringToObject(response);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
|
247
|
+
class ClientSideExporterStrategy {
|
248
|
+
constructor(provider) {
|
249
|
+
this._provider = provider;
|
250
|
+
}
|
251
|
+
async executeExport(resolveProps) {
|
252
|
+
const { methodName, titleGrid } = resolveProps;
|
253
|
+
const records = await this._provider.getRecords();
|
254
|
+
const columns = await this._provider.getColumnsMetadata();
|
255
|
+
const [serviceName, processor] = this.getExecutor(methodName);
|
256
|
+
const payload = {
|
257
|
+
serviceName,
|
258
|
+
requestBody: {
|
259
|
+
grid: {
|
260
|
+
titleGrid,
|
261
|
+
columns: this.buildColumnsObject(columns),
|
262
|
+
rows: this.buildRowsObject(columns, records),
|
263
|
+
customOptions: { xlsxExtension: false }
|
264
|
+
}
|
265
|
+
}
|
266
|
+
};
|
267
|
+
return new Promise((resolve, reject) => {
|
268
|
+
DataFetcher.get()
|
269
|
+
.callServiceBroker(serviceName, payload)
|
270
|
+
.then(result => resolve(processor(result)))
|
271
|
+
.catch(error => reject(error));
|
272
|
+
});
|
273
|
+
}
|
274
|
+
getExecutor(methodName) {
|
275
|
+
if (methodName === "exportToPDF") {
|
276
|
+
return [
|
277
|
+
"GridPDFBuilderSP.buildPDFFromJson",
|
278
|
+
responseBody => ({
|
279
|
+
fileSessionKey: responseBody.chavePDF.valor,
|
280
|
+
canPrint: responseBody.permiteImprimir.valor === "S",
|
281
|
+
canExport: responseBody.permiteExportar.valor === "S",
|
282
|
+
canSendEmail: responseBody.canSendEmail.valor === "S",
|
283
|
+
useAppPrint: true
|
284
|
+
})
|
285
|
+
];
|
286
|
+
}
|
287
|
+
return [
|
288
|
+
"GridXLSBuilderSP.buildXLSFromJson",
|
289
|
+
responseBody => ({
|
290
|
+
fileSessionKey: responseBody.chaveXLS.valor,
|
291
|
+
canPrint: false,
|
292
|
+
canExport: false,
|
293
|
+
useAppPrint: false,
|
294
|
+
canSendEmail: false
|
295
|
+
})
|
296
|
+
];
|
297
|
+
}
|
298
|
+
buildColumnsObject(columns) {
|
299
|
+
return {
|
300
|
+
column: columns.map((column, index) => {
|
301
|
+
const { label, id, width, userInterface } = column;
|
302
|
+
return Object.assign({ index: index + 1, id,
|
303
|
+
label,
|
304
|
+
width, presentationType: "P" }, (TYPE_MAP[userInterface] || { type: "S", align: "left" }));
|
305
|
+
})
|
306
|
+
};
|
307
|
+
}
|
308
|
+
buildRowsObject(columns, records) {
|
309
|
+
return {
|
310
|
+
row: records.map(rawRecord => {
|
311
|
+
const record = {};
|
312
|
+
columns.forEach((column, index) => record["c" + (index + 1)] = { $: this.formatValue(rawRecord, column) });
|
313
|
+
return record;
|
314
|
+
})
|
315
|
+
};
|
316
|
+
}
|
317
|
+
formatValue(record, column) {
|
318
|
+
if (this._provider.formatValue != undefined) {
|
319
|
+
return this._provider.formatValue(record, column);
|
320
|
+
}
|
321
|
+
return record[column.id] || "";
|
322
|
+
}
|
323
|
+
}
|
324
|
+
const TYPE_MAP = {
|
325
|
+
[UserInterface.DATE]: { type: "D", align: "center" },
|
326
|
+
[UserInterface.DATETIME]: { type: "H", align: "center" },
|
327
|
+
[UserInterface.TIME]: { type: "I", align: "right" },
|
328
|
+
[UserInterface.ELAPSEDTIME]: { type: "I", align: "right" },
|
329
|
+
[UserInterface.DECIMALNUMBER]: { type: "F", align: "right" },
|
330
|
+
[UserInterface.INTEGERNUMBER]: { type: "I", align: "right" },
|
331
|
+
[UserInterface.SEARCH]: { type: "S", align: "right" }
|
332
|
+
};
|
333
|
+
|
210
334
|
const snkDataExporterCss = ".sc-snk-data-exporter-h{display:flex;width:fit-content;height:fit-content}.snk-data-exporter.sc-snk-data-exporter{display:flex;width:fit-content;height:fit-content}.snk-data-exporter__dropdown.sc-snk-data-exporter{display:none}.snk-data-exporter__dropdown--show.sc-snk-data-exporter{display:flex;flex-direction:column;position:fixed}.snk-data-exporter__dropdown.sc-snk-data-exporter>ez-dropdown.sc-snk-data-exporter{position:relative}";
|
211
335
|
|
212
|
-
const LIMIT_PER_EXPORT = 5000;
|
213
336
|
const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
214
337
|
constructor() {
|
215
338
|
super();
|
216
339
|
this.__registerHost();
|
217
340
|
this._selectedNumber = 0;
|
218
341
|
this._customPrefix = "$custom$";
|
219
|
-
this._items = [];
|
220
|
-
this._showDropdown = false;
|
221
342
|
this._releasedToExport = [
|
222
343
|
DataExporterOption.EXPORT_TO_PDF,
|
223
344
|
DataExporterOption.EXPORT_TO_XLS,
|
@@ -227,6 +348,8 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
227
348
|
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
228
349
|
DataExporterOption.EXPORT_PAGE_TO_XLS
|
229
350
|
];
|
351
|
+
this._items = [];
|
352
|
+
this._showDropdown = false;
|
230
353
|
this.provider = null;
|
231
354
|
this.messagesBuilder = undefined;
|
232
355
|
}
|
@@ -297,33 +420,16 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
297
420
|
if (this.provider == undefined || resolveProps == undefined || callbackResolver == undefined) {
|
298
421
|
return;
|
299
422
|
}
|
300
|
-
|
301
|
-
const columns = await this.provider.getColumnsMetadata();
|
302
|
-
const sort = this.provider.getOrders();
|
303
|
-
const resourceURI = this.provider.getResourceURI();
|
304
|
-
const selectedIDs = this.provider.getSelectedIDs();
|
305
|
-
const option = resolveProps.exportOption;
|
306
|
-
const currentPageOptions = [
|
307
|
-
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
308
|
-
DataExporterOption.EXPORT_PAGE_TO_XLS
|
309
|
-
];
|
310
|
-
delete resolveProps.exportOption;
|
311
|
-
let params = Object.assign({ filters,
|
312
|
-
columns,
|
313
|
-
sort,
|
314
|
-
resourceURI, selectedIDs: selectedIDs.slice(0, LIMIT_PER_EXPORT) }, resolveProps);
|
315
|
-
if (currentPageOptions.includes(option) || resolveProps.type == "page") {
|
316
|
-
const offset = this.provider.getOffset();
|
317
|
-
const limit = this.provider.getLimit();
|
318
|
-
params = Object.assign(Object.assign({}, params), { offset,
|
319
|
-
limit, selectedIDs: [] });
|
320
|
-
}
|
321
|
-
else if (resolveProps.type == "all") {
|
322
|
-
params = Object.assign(Object.assign({}, params), { offset: 0, limit: LIMIT_PER_EXPORT, selectedIDs: [] });
|
323
|
-
}
|
324
|
-
fetchDataExporter(params)
|
423
|
+
this.getExporterStrategy().executeExport(resolveProps)
|
325
424
|
.then((result) => callbackResolver(result))
|
326
|
-
.catch((exception) =>
|
425
|
+
.catch((exception) => {
|
426
|
+
console.error(exception);
|
427
|
+
let { title, message, statusMessage } = exception || {};
|
428
|
+
ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
|
429
|
+
});
|
430
|
+
}
|
431
|
+
getExporterStrategy() {
|
432
|
+
return this.provider.getRecords == undefined ? new ServerSideExporterStrategy(this.provider) : new ClientSideExporterStrategy(this.provider);
|
327
433
|
}
|
328
434
|
getOptionKey(option) {
|
329
435
|
return Object.keys(DataExporterOption)
|
@@ -332,7 +438,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
332
438
|
});
|
333
439
|
}
|
334
440
|
dispatchExporter(option) {
|
335
|
-
var _a;
|
441
|
+
var _a, _b, _c;
|
336
442
|
const optionKey = this.getOptionKey(option);
|
337
443
|
const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
|
338
444
|
const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
|
@@ -341,7 +447,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
341
447
|
fileName: this._appLabel,
|
342
448
|
titleGrid: this._appLabel,
|
343
449
|
exportOption: option,
|
344
|
-
limit:
|
450
|
+
limit: (_c = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getExportLimit) === null || _c === void 0 ? void 0 : _c.call(_b)
|
345
451
|
};
|
346
452
|
this.resolveExporter(params, (response) => {
|
347
453
|
fileViewer(Object.assign(Object.assign({}, response), { fileType,
|
@@ -349,7 +455,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
349
455
|
});
|
350
456
|
}
|
351
457
|
async processExporter(evt) {
|
352
|
-
var _a, _b, _c, _d;
|
458
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
353
459
|
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
354
460
|
const exportCurrentPageOptions = [DataExporterOption.EXPORT_PAGE_TO_PDF, DataExporterOption.EXPORT_PAGE_TO_XLS];
|
355
461
|
const isCustomReport = (_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.includes(this._customPrefix);
|
@@ -357,18 +463,19 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
357
463
|
return;
|
358
464
|
const selectedRecords = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getSelectedIDs();
|
359
465
|
const totalRecords = (_c = this.provider) === null || _c === void 0 ? void 0 : _c.getTotalRecords();
|
360
|
-
const totalPerPage = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.
|
466
|
+
const totalPerPage = (_e = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.getPageSize) === null || _e === void 0 ? void 0 : _e.call(_d);
|
467
|
+
const exportLimit = (_g = (_f = this.provider) === null || _f === void 0 ? void 0 : _f.getExportLimit) === null || _g === void 0 ? void 0 : _g.call(_f);
|
361
468
|
let limitExceeded = false;
|
362
|
-
if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <=
|
469
|
+
if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <= exportLimit) || isCustomReport) {
|
363
470
|
limitExceeded = false;
|
364
471
|
}
|
365
472
|
else if (selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) {
|
366
|
-
limitExceeded = selectedRecords.length >
|
473
|
+
limitExceeded = selectedRecords.length > exportLimit;
|
367
474
|
}
|
368
|
-
else if (totalRecords >
|
475
|
+
else if (totalRecords > exportLimit)
|
369
476
|
limitExceeded = true;
|
370
477
|
if (limitExceeded) {
|
371
|
-
const formattedLimit =
|
478
|
+
const formattedLimit = exportLimit.toLocaleString('pt-BR', { minimumFractionDigits: 0 });
|
372
479
|
const limitModalMessages = {
|
373
480
|
title: this.getMessage("snkDataExporter.limitExceeded.title"),
|
374
481
|
description: `
|
@@ -393,7 +500,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
393
500
|
this._showDropdown = false;
|
394
501
|
return;
|
395
502
|
}
|
396
|
-
if (!this.
|
503
|
+
if (!this.getFilteredReleasedToExport().includes(item === null || item === void 0 ? void 0 : item.id)) {
|
397
504
|
return;
|
398
505
|
}
|
399
506
|
if (item.id === DataExporterOption.EXPORT_BY_EMAIL) {
|
@@ -404,9 +511,20 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
404
511
|
}
|
405
512
|
this._showDropdown = false;
|
406
513
|
}
|
514
|
+
getFilteredReleasedToExport() {
|
515
|
+
var _a, _b;
|
516
|
+
if (this.provider == undefined) {
|
517
|
+
return this._releasedToExport;
|
518
|
+
}
|
519
|
+
const hiddenOptions = (_b = (_a = this.provider).getHiddenOptions) === null || _b === void 0 ? void 0 : _b.call(_a);
|
520
|
+
if (hiddenOptions == undefined) {
|
521
|
+
return this._releasedToExport;
|
522
|
+
}
|
523
|
+
return this._releasedToExport.filter(option => !hiddenOptions.includes(option));
|
524
|
+
}
|
407
525
|
loadItems() {
|
408
526
|
const items = [];
|
409
|
-
this.
|
527
|
+
this.getFilteredReleasedToExport()
|
410
528
|
.forEach((option) => {
|
411
529
|
var _a;
|
412
530
|
(_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
|
@@ -414,8 +532,8 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
414
532
|
this.loadPersonalizedItems(items);
|
415
533
|
}
|
416
534
|
async loadPersonalizedItems(items) {
|
417
|
-
var _a;
|
418
|
-
const recordID = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID();
|
535
|
+
var _a, _b;
|
536
|
+
const recordID = (_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID) === null || _b === void 0 ? void 0 : _b.call(_a);
|
419
537
|
if (recordID == undefined) {
|
420
538
|
this._items = items;
|
421
539
|
return;
|
@@ -431,18 +549,18 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
431
549
|
this._items = items;
|
432
550
|
}
|
433
551
|
openPersonalizedReports(option) {
|
434
|
-
var _a;
|
552
|
+
var _a, _b;
|
435
553
|
const pkObject = [];
|
436
554
|
const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
|
437
|
-
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
|
438
|
-
const fields =
|
555
|
+
(_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs) === null || _b === void 0 ? void 0 : _b.call(_a).forEach(({ name, type, value }, index) => {
|
556
|
+
const fields = {};
|
439
557
|
fields['fields'] = [];
|
440
558
|
// Se for o primeiro elemento, adiciona essa primeira PK
|
441
559
|
if (index === 0) {
|
442
560
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
443
561
|
pkObject['pks'] = [];
|
444
562
|
}
|
445
|
-
const dataFields = { nome: name
|
563
|
+
const dataFields = { nome: `PK_${name}`, tipo: this.parseDataType(type), valor: value };
|
446
564
|
fields['fields'].push(dataFields);
|
447
565
|
pkObject['pks'].push(fields);
|
448
566
|
});
|
@@ -516,8 +634,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
516
634
|
"provider": [16],
|
517
635
|
"messagesBuilder": [1040],
|
518
636
|
"_items": [32],
|
519
|
-
"_showDropdown": [32]
|
520
|
-
"_releasedToExport": [32]
|
637
|
+
"_showDropdown": [32]
|
521
638
|
}]);
|
522
639
|
function defineCustomElement() {
|
523
640
|
if (typeof customElements === "undefined") {
|
@@ -1,8 +1,46 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { Action, ObjectUtils,
|
2
|
+
import { JSUtils, DataType, Action, ObjectUtils, DataUnitAction, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
5
5
|
|
6
|
+
const getSelectedIDs = (dataUnit) => {
|
7
|
+
const selectionInfo = dataUnit.getSelectionInfo();
|
8
|
+
if (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords()) {
|
9
|
+
return [];
|
10
|
+
}
|
11
|
+
const selectedRecordsIDsInfo = [];
|
12
|
+
const selectedRecords = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.recordIds;
|
13
|
+
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
|
14
|
+
selectedRecords.forEach(recordId => {
|
15
|
+
if (!dataUnit.isNewRecord(recordId)) {
|
16
|
+
/*
|
17
|
+
Esse if foi necessário para tratar corretamente o ID
|
18
|
+
do record quando está sendo utilizado no modo standAlone
|
19
|
+
isso não faz a exportação da grid funcionar no modo standAlone
|
20
|
+
mas deixa de causar erro nas oprações de CRUD.
|
21
|
+
*/
|
22
|
+
if (!JSUtils.isBase64(recordId)) {
|
23
|
+
selectedRecordsIDsInfo.push({
|
24
|
+
name: "__record__id__",
|
25
|
+
type: DataType.TEXT,
|
26
|
+
value: recordId
|
27
|
+
});
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
const revertBase64ToObject = JSON.parse(window.atob(recordId));
|
31
|
+
Object.entries(revertBase64ToObject).forEach(([name, value]) => {
|
32
|
+
const metadataField = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(name);
|
33
|
+
if (metadataField == undefined) {
|
34
|
+
return;
|
35
|
+
}
|
36
|
+
selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
|
37
|
+
});
|
38
|
+
}
|
39
|
+
});
|
40
|
+
}
|
41
|
+
return selectedRecordsIDsInfo;
|
42
|
+
};
|
43
|
+
|
6
44
|
const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
7
45
|
constructor() {
|
8
46
|
super();
|
@@ -125,43 +163,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
125
163
|
* @returns Retorna a lista de IDs dos registros selecionados.
|
126
164
|
*/
|
127
165
|
async getSelectedRecordsIDsInfo() {
|
128
|
-
|
129
|
-
const selectionInfo = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
|
130
|
-
if (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords()) {
|
131
|
-
return [];
|
132
|
-
}
|
133
|
-
const selectedRecordsIDsInfo = [];
|
134
|
-
const selectedRecords = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.records;
|
135
|
-
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
|
136
|
-
selectedRecords.forEach(({ __record__id__ }) => {
|
137
|
-
if (!this.dataUnit.isNewRecord(__record__id__)) {
|
138
|
-
/*
|
139
|
-
Esse if foi necessário para tratar corretamente o ID
|
140
|
-
do record quando está sendo utilizado no modo standAlone
|
141
|
-
isso não faz a exportação da grid funcionar no modo standAlone
|
142
|
-
mas deixa de causar erro nas oprações de CRUD.
|
143
|
-
*/
|
144
|
-
if (!JSUtils.isBase64(__record__id__)) {
|
145
|
-
selectedRecordsIDsInfo.push({
|
146
|
-
name: "__record__id__",
|
147
|
-
type: DataType.TEXT,
|
148
|
-
value: __record__id__
|
149
|
-
});
|
150
|
-
return;
|
151
|
-
}
|
152
|
-
const revertBase64ToObject = JSON.parse(window.atob(__record__id__));
|
153
|
-
Object.entries(revertBase64ToObject).forEach(([name, value]) => {
|
154
|
-
var _a;
|
155
|
-
const metadataField = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(name);
|
156
|
-
if (metadataField == undefined) {
|
157
|
-
return;
|
158
|
-
}
|
159
|
-
selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
|
160
|
-
});
|
161
|
-
}
|
162
|
-
});
|
163
|
-
}
|
164
|
-
return selectedRecordsIDsInfo;
|
166
|
+
return Promise.resolve(getSelectedIDs(this.dataUnit));
|
165
167
|
}
|
166
168
|
getCleanOnCopyFields() {
|
167
169
|
var _a;
|
@@ -486,4 +488,4 @@ function defineCustomElement() {
|
|
486
488
|
} });
|
487
489
|
}
|
488
490
|
|
489
|
-
export { SnkDataUnit as S, defineCustomElement as d };
|
491
|
+
export { SnkDataUnit as S, defineCustomElement as d, getSelectedIDs as g };
|