@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
@@ -4,17 +4,15 @@ import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/
|
|
4
4
|
import { ItemBuilder } from './structure/ItemBuilder';
|
5
5
|
import { DataExporterFormat, DataExporterOption, DataExporterType } from '../../lib/@types';
|
6
6
|
import { REPORT_LAUNCHER_RESOURCE_ID } from '../../lib/utils/constants';
|
7
|
-
import fetchDataExporter from '../../lib/http/data-fetcher/fetchers/fetchDataExporter';
|
8
7
|
import fileViewer from '../../lib/utils/fileViewer';
|
9
8
|
import getPersonalizedReports from '../../lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher';
|
10
9
|
import { SnkDataUnit } from '../snk-data-unit/snk-data-unit';
|
11
|
-
|
10
|
+
import ServerSideExporterStrategy from './exporter-strategy/ServerSideExporterStrategy';
|
11
|
+
import ClientSideExporterStrategy from './exporter-strategy/ClientSideExporterStrategy';
|
12
12
|
export class SnkDataExporter {
|
13
13
|
constructor() {
|
14
14
|
this._selectedNumber = 0;
|
15
15
|
this._customPrefix = "$custom$";
|
16
|
-
this._items = [];
|
17
|
-
this._showDropdown = false;
|
18
16
|
this._releasedToExport = [
|
19
17
|
DataExporterOption.EXPORT_TO_PDF,
|
20
18
|
DataExporterOption.EXPORT_TO_XLS,
|
@@ -24,6 +22,8 @@ export class SnkDataExporter {
|
|
24
22
|
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
25
23
|
DataExporterOption.EXPORT_PAGE_TO_XLS
|
26
24
|
];
|
25
|
+
this._items = [];
|
26
|
+
this._showDropdown = false;
|
27
27
|
this.provider = null;
|
28
28
|
this.messagesBuilder = undefined;
|
29
29
|
}
|
@@ -94,33 +94,16 @@ export class SnkDataExporter {
|
|
94
94
|
if (this.provider == undefined || resolveProps == undefined || callbackResolver == undefined) {
|
95
95
|
return;
|
96
96
|
}
|
97
|
-
|
98
|
-
const columns = await this.provider.getColumnsMetadata();
|
99
|
-
const sort = this.provider.getOrders();
|
100
|
-
const resourceURI = this.provider.getResourceURI();
|
101
|
-
const selectedIDs = this.provider.getSelectedIDs();
|
102
|
-
const option = resolveProps.exportOption;
|
103
|
-
const currentPageOptions = [
|
104
|
-
DataExporterOption.EXPORT_PAGE_TO_PDF,
|
105
|
-
DataExporterOption.EXPORT_PAGE_TO_XLS
|
106
|
-
];
|
107
|
-
delete resolveProps.exportOption;
|
108
|
-
let params = Object.assign({ filters,
|
109
|
-
columns,
|
110
|
-
sort,
|
111
|
-
resourceURI, selectedIDs: selectedIDs.slice(0, LIMIT_PER_EXPORT) }, resolveProps);
|
112
|
-
if (currentPageOptions.includes(option) || resolveProps.type == "page") {
|
113
|
-
const offset = this.provider.getOffset();
|
114
|
-
const limit = this.provider.getLimit();
|
115
|
-
params = Object.assign(Object.assign({}, params), { offset,
|
116
|
-
limit, selectedIDs: [] });
|
117
|
-
}
|
118
|
-
else if (resolveProps.type == "all") {
|
119
|
-
params = Object.assign(Object.assign({}, params), { offset: 0, limit: LIMIT_PER_EXPORT, selectedIDs: [] });
|
120
|
-
}
|
121
|
-
fetchDataExporter(params)
|
97
|
+
this.getExporterStrategy().executeExport(resolveProps)
|
122
98
|
.then((result) => callbackResolver(result))
|
123
|
-
.catch((exception) =>
|
99
|
+
.catch((exception) => {
|
100
|
+
console.error(exception);
|
101
|
+
let { title, message, statusMessage } = exception || {};
|
102
|
+
ApplicationUtils.error(title || this.getMessage("snkDataExporter.message.exportError"), statusMessage || message || this.getMessage("snkDataExporter.message.unknownFailure"));
|
103
|
+
});
|
104
|
+
}
|
105
|
+
getExporterStrategy() {
|
106
|
+
return this.provider.getRecords == undefined ? new ServerSideExporterStrategy(this.provider) : new ClientSideExporterStrategy(this.provider);
|
124
107
|
}
|
125
108
|
getOptionKey(option) {
|
126
109
|
return Object.keys(DataExporterOption)
|
@@ -129,7 +112,7 @@ export class SnkDataExporter {
|
|
129
112
|
});
|
130
113
|
}
|
131
114
|
dispatchExporter(option) {
|
132
|
-
var _a;
|
115
|
+
var _a, _b, _c;
|
133
116
|
const optionKey = this.getOptionKey(option);
|
134
117
|
const fileType = (_a = DataExporterType[optionKey]) !== null && _a !== void 0 ? _a : DataExporterType.EXPORT_TO_PDF;
|
135
118
|
const isDownload = DataExporterType[optionKey] === DataExporterType.EXPORT_TO_XLS;
|
@@ -138,7 +121,7 @@ export class SnkDataExporter {
|
|
138
121
|
fileName: this._appLabel,
|
139
122
|
titleGrid: this._appLabel,
|
140
123
|
exportOption: option,
|
141
|
-
limit:
|
124
|
+
limit: (_c = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getExportLimit) === null || _c === void 0 ? void 0 : _c.call(_b)
|
142
125
|
};
|
143
126
|
this.resolveExporter(params, (response) => {
|
144
127
|
fileViewer(Object.assign(Object.assign({}, response), { fileType,
|
@@ -146,7 +129,7 @@ export class SnkDataExporter {
|
|
146
129
|
});
|
147
130
|
}
|
148
131
|
async processExporter(evt) {
|
149
|
-
var _a, _b, _c, _d;
|
132
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
150
133
|
const item = evt === null || evt === void 0 ? void 0 : evt.detail;
|
151
134
|
const exportCurrentPageOptions = [DataExporterOption.EXPORT_PAGE_TO_PDF, DataExporterOption.EXPORT_PAGE_TO_XLS];
|
152
135
|
const isCustomReport = (_a = item === null || item === void 0 ? void 0 : item.id) === null || _a === void 0 ? void 0 : _a.includes(this._customPrefix);
|
@@ -154,18 +137,19 @@ export class SnkDataExporter {
|
|
154
137
|
return;
|
155
138
|
const selectedRecords = (_b = this.provider) === null || _b === void 0 ? void 0 : _b.getSelectedIDs();
|
156
139
|
const totalRecords = (_c = this.provider) === null || _c === void 0 ? void 0 : _c.getTotalRecords();
|
157
|
-
const totalPerPage = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.
|
140
|
+
const totalPerPage = (_e = (_d = this.provider) === null || _d === void 0 ? void 0 : _d.getPageSize) === null || _e === void 0 ? void 0 : _e.call(_d);
|
141
|
+
const exportLimit = (_g = (_f = this.provider) === null || _f === void 0 ? void 0 : _f.getExportLimit) === null || _g === void 0 ? void 0 : _g.call(_f);
|
158
142
|
let limitExceeded = false;
|
159
|
-
if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <=
|
143
|
+
if ((exportCurrentPageOptions.includes(item === null || item === void 0 ? void 0 : item.id) && totalPerPage <= exportLimit) || isCustomReport) {
|
160
144
|
limitExceeded = false;
|
161
145
|
}
|
162
146
|
else if (selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) {
|
163
|
-
limitExceeded = selectedRecords.length >
|
147
|
+
limitExceeded = selectedRecords.length > exportLimit;
|
164
148
|
}
|
165
|
-
else if (totalRecords >
|
149
|
+
else if (totalRecords > exportLimit)
|
166
150
|
limitExceeded = true;
|
167
151
|
if (limitExceeded) {
|
168
|
-
const formattedLimit =
|
152
|
+
const formattedLimit = exportLimit.toLocaleString('pt-BR', { minimumFractionDigits: 0 });
|
169
153
|
const limitModalMessages = {
|
170
154
|
title: this.getMessage("snkDataExporter.limitExceeded.title"),
|
171
155
|
description: `
|
@@ -190,7 +174,7 @@ export class SnkDataExporter {
|
|
190
174
|
this._showDropdown = false;
|
191
175
|
return;
|
192
176
|
}
|
193
|
-
if (!this.
|
177
|
+
if (!this.getFilteredReleasedToExport().includes(item === null || item === void 0 ? void 0 : item.id)) {
|
194
178
|
return;
|
195
179
|
}
|
196
180
|
if (item.id === DataExporterOption.EXPORT_BY_EMAIL) {
|
@@ -201,9 +185,20 @@ export class SnkDataExporter {
|
|
201
185
|
}
|
202
186
|
this._showDropdown = false;
|
203
187
|
}
|
188
|
+
getFilteredReleasedToExport() {
|
189
|
+
var _a, _b;
|
190
|
+
if (this.provider == undefined) {
|
191
|
+
return this._releasedToExport;
|
192
|
+
}
|
193
|
+
const hiddenOptions = (_b = (_a = this.provider).getHiddenOptions) === null || _b === void 0 ? void 0 : _b.call(_a);
|
194
|
+
if (hiddenOptions == undefined) {
|
195
|
+
return this._releasedToExport;
|
196
|
+
}
|
197
|
+
return this._releasedToExport.filter(option => !hiddenOptions.includes(option));
|
198
|
+
}
|
204
199
|
loadItems() {
|
205
200
|
const items = [];
|
206
|
-
this.
|
201
|
+
this.getFilteredReleasedToExport()
|
207
202
|
.forEach((option) => {
|
208
203
|
var _a;
|
209
204
|
(_a = this._itemBuilder) === null || _a === void 0 ? void 0 : _a.setExportOption(option, items);
|
@@ -211,8 +206,8 @@ export class SnkDataExporter {
|
|
211
206
|
this.loadPersonalizedItems(items);
|
212
207
|
}
|
213
208
|
async loadPersonalizedItems(items) {
|
214
|
-
var _a;
|
215
|
-
const recordID = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID();
|
209
|
+
var _a, _b;
|
210
|
+
const recordID = (_b = (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getRecordID) === null || _b === void 0 ? void 0 : _b.call(_a);
|
216
211
|
if (recordID == undefined) {
|
217
212
|
this._items = items;
|
218
213
|
return;
|
@@ -228,18 +223,18 @@ export class SnkDataExporter {
|
|
228
223
|
this._items = items;
|
229
224
|
}
|
230
225
|
openPersonalizedReports(option) {
|
231
|
-
var _a;
|
226
|
+
var _a, _b;
|
232
227
|
const pkObject = [];
|
233
228
|
const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
|
234
|
-
(_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
|
235
|
-
const fields =
|
229
|
+
(_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) => {
|
230
|
+
const fields = {};
|
236
231
|
fields['fields'] = [];
|
237
232
|
// Se for o primeiro elemento, adiciona essa primeira PK
|
238
233
|
if (index === 0) {
|
239
234
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
240
235
|
pkObject['pks'] = [];
|
241
236
|
}
|
242
|
-
const dataFields = { nome: name
|
237
|
+
const dataFields = { nome: `PK_${name}`, tipo: this.parseDataType(type), valor: value };
|
243
238
|
fields['fields'].push(dataFields);
|
244
239
|
pkObject['pks'].push(fields);
|
245
240
|
});
|
@@ -367,8 +362,7 @@ export class SnkDataExporter {
|
|
367
362
|
static get states() {
|
368
363
|
return {
|
369
364
|
"_items": {},
|
370
|
-
"_showDropdown": {}
|
371
|
-
"_releasedToExport": {}
|
365
|
+
"_showDropdown": {}
|
372
366
|
};
|
373
367
|
}
|
374
368
|
static get elementRef() { return "_element"; }
|
@@ -0,0 +1,88 @@
|
|
1
|
+
import { DataType, StringUtils } from "@sankhyalabs/core";
|
2
|
+
export const testMetadata = {
|
3
|
+
name: 'metadataName',
|
4
|
+
label: 'metadataLabel',
|
5
|
+
fields: [{
|
6
|
+
name: 'TESTFIELD',
|
7
|
+
label: 'Test label',
|
8
|
+
dataType: DataType.TEXT,
|
9
|
+
}]
|
10
|
+
};
|
11
|
+
export const recordId1 = StringUtils.generateUUID();
|
12
|
+
export const recordId2 = StringUtils.generateUUID();
|
13
|
+
export const testRecords = [
|
14
|
+
{
|
15
|
+
__record__id__: recordId1,
|
16
|
+
TESTFIELD: 'TESTVALUE'
|
17
|
+
},
|
18
|
+
{
|
19
|
+
__record__id__: recordId2,
|
20
|
+
TESTFIELD: 'TESTVALUE2'
|
21
|
+
},
|
22
|
+
];
|
23
|
+
export const dataFetcherPDFResponse = {
|
24
|
+
chavePDF: {
|
25
|
+
valor: 'KEYPDF'
|
26
|
+
},
|
27
|
+
permiteImprimir: {
|
28
|
+
valor: "S"
|
29
|
+
},
|
30
|
+
permiteExportar: {
|
31
|
+
valor: "S"
|
32
|
+
},
|
33
|
+
canSendEmail: {
|
34
|
+
valor: "S"
|
35
|
+
},
|
36
|
+
};
|
37
|
+
export const dataFetcherXLSResponse = {
|
38
|
+
chaveXLS: {
|
39
|
+
valor: 'KEYXLS'
|
40
|
+
},
|
41
|
+
};
|
42
|
+
export const exportPDFParams = {
|
43
|
+
methodName: 'exportToPDF',
|
44
|
+
fileName: '',
|
45
|
+
titleGrid: '',
|
46
|
+
};
|
47
|
+
export const exportXLSParams = {
|
48
|
+
methodName: 'exportToXLS',
|
49
|
+
fileName: '',
|
50
|
+
titleGrid: '',
|
51
|
+
};
|
52
|
+
export const serviceNamePDF = "GridPDFBuilderSP.buildPDFFromJson";
|
53
|
+
export const serviceNameXLS = "GridXLSBuilderSP.buildXLSFromJson";
|
54
|
+
export function buildExpectedResponse({ serviceName, titleGrid, value, align = 'left', type = 'S' }) {
|
55
|
+
return {
|
56
|
+
serviceName: serviceName,
|
57
|
+
requestBody: {
|
58
|
+
grid: {
|
59
|
+
titleGrid: titleGrid,
|
60
|
+
columns: {
|
61
|
+
column: [
|
62
|
+
{
|
63
|
+
align: align,
|
64
|
+
id: "TESTFIELD",
|
65
|
+
index: 1,
|
66
|
+
label: "Test label",
|
67
|
+
presentationType: "P",
|
68
|
+
type: type,
|
69
|
+
width: undefined,
|
70
|
+
}
|
71
|
+
]
|
72
|
+
},
|
73
|
+
customOptions: {
|
74
|
+
xlsxExtension: false
|
75
|
+
},
|
76
|
+
rows: {
|
77
|
+
row: [
|
78
|
+
{
|
79
|
+
c1: {
|
80
|
+
$: value
|
81
|
+
}
|
82
|
+
}
|
83
|
+
]
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
};
|
88
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import { DataType, JSUtils } from "@sankhyalabs/core";
|
2
|
+
export const getSelectedIDs = (dataUnit) => {
|
3
|
+
const selectionInfo = dataUnit.getSelectionInfo();
|
4
|
+
if (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords()) {
|
5
|
+
return [];
|
6
|
+
}
|
7
|
+
const selectedRecordsIDsInfo = [];
|
8
|
+
const selectedRecords = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.recordIds;
|
9
|
+
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
|
10
|
+
selectedRecords.forEach(recordId => {
|
11
|
+
if (!dataUnit.isNewRecord(recordId)) {
|
12
|
+
/*
|
13
|
+
Esse if foi necessário para tratar corretamente o ID
|
14
|
+
do record quando está sendo utilizado no modo standAlone
|
15
|
+
isso não faz a exportação da grid funcionar no modo standAlone
|
16
|
+
mas deixa de causar erro nas oprações de CRUD.
|
17
|
+
*/
|
18
|
+
if (!JSUtils.isBase64(recordId)) {
|
19
|
+
selectedRecordsIDsInfo.push({
|
20
|
+
name: "__record__id__",
|
21
|
+
type: DataType.TEXT,
|
22
|
+
value: recordId
|
23
|
+
});
|
24
|
+
return;
|
25
|
+
}
|
26
|
+
const revertBase64ToObject = JSON.parse(window.atob(recordId));
|
27
|
+
Object.entries(revertBase64ToObject).forEach(([name, value]) => {
|
28
|
+
const metadataField = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(name);
|
29
|
+
if (metadataField == undefined) {
|
30
|
+
return;
|
31
|
+
}
|
32
|
+
selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
|
33
|
+
});
|
34
|
+
}
|
35
|
+
});
|
36
|
+
}
|
37
|
+
return selectedRecordsIDsInfo;
|
38
|
+
};
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Host, h } from '@stencil/core';
|
2
|
-
import { Action, ApplicationContext, DataUnitAction, ObjectUtils
|
2
|
+
import { Action, ApplicationContext, DataUnitAction, ObjectUtils } from '@sankhyalabs/core';
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
4
|
import { OperationMap, SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
5
|
+
import { getSelectedIDs } from '../snk-data-exporter/utils/RecordIDUtils';
|
5
6
|
export class SnkDataUnit {
|
6
7
|
constructor() {
|
7
8
|
this._onDataUnitResolve = [];
|
@@ -117,43 +118,7 @@ export class SnkDataUnit {
|
|
117
118
|
* @returns Retorna a lista de IDs dos registros selecionados.
|
118
119
|
*/
|
119
120
|
async getSelectedRecordsIDsInfo() {
|
120
|
-
|
121
|
-
const selectionInfo = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
|
122
|
-
if (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords()) {
|
123
|
-
return [];
|
124
|
-
}
|
125
|
-
const selectedRecordsIDsInfo = [];
|
126
|
-
const selectedRecords = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.records;
|
127
|
-
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
|
128
|
-
selectedRecords.forEach(({ __record__id__ }) => {
|
129
|
-
if (!this.dataUnit.isNewRecord(__record__id__)) {
|
130
|
-
/*
|
131
|
-
Esse if foi necessário para tratar corretamente o ID
|
132
|
-
do record quando está sendo utilizado no modo standAlone
|
133
|
-
isso não faz a exportação da grid funcionar no modo standAlone
|
134
|
-
mas deixa de causar erro nas oprações de CRUD.
|
135
|
-
*/
|
136
|
-
if (!JSUtils.isBase64(__record__id__)) {
|
137
|
-
selectedRecordsIDsInfo.push({
|
138
|
-
name: "__record__id__",
|
139
|
-
type: DataType.TEXT,
|
140
|
-
value: __record__id__
|
141
|
-
});
|
142
|
-
return;
|
143
|
-
}
|
144
|
-
const revertBase64ToObject = JSON.parse(window.atob(__record__id__));
|
145
|
-
Object.entries(revertBase64ToObject).forEach(([name, value]) => {
|
146
|
-
var _a;
|
147
|
-
const metadataField = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(name);
|
148
|
-
if (metadataField == undefined) {
|
149
|
-
return;
|
150
|
-
}
|
151
|
-
selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
|
152
|
-
});
|
153
|
-
}
|
154
|
-
});
|
155
|
-
}
|
156
|
-
return selectedRecordsIDsInfo;
|
121
|
+
return Promise.resolve(getSelectedIDs(this.dataUnit));
|
157
122
|
}
|
158
123
|
getCleanOnCopyFields() {
|
159
124
|
var _a;
|
@@ -774,10 +739,6 @@ export class SnkDataUnit {
|
|
774
739
|
},
|
775
740
|
"Array": {
|
776
741
|
"location": "global"
|
777
|
-
},
|
778
|
-
"Record": {
|
779
|
-
"location": "import",
|
780
|
-
"path": "@sankhyalabs/core"
|
781
742
|
}
|
782
743
|
},
|
783
744
|
"return": "Promise<IRecordID[]>"
|
@@ -56,16 +56,18 @@ export class SnkEntityList {
|
|
56
56
|
this.loadListSource();
|
57
57
|
}
|
58
58
|
optionLoader(searchArgument) {
|
59
|
-
var _a, _b, _c, _d;
|
59
|
+
var _a, _b, _c, _d, _e, _f;
|
60
60
|
const { mode, argument } = searchArgument;
|
61
61
|
if (this._application === undefined) {
|
62
62
|
return;
|
63
63
|
}
|
64
64
|
const searchOptions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.searchContext) === null || _c === void 0 ? void 0 : _c.searchOptions;
|
65
|
+
const criteria = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.props) === null || _e === void 0 ? void 0 : _e.criteria;
|
65
66
|
const options = {
|
66
|
-
entityDescription: (
|
67
|
+
entityDescription: (_f = this.config) === null || _f === void 0 ? void 0 : _f.label,
|
67
68
|
entity: this._entityName,
|
68
|
-
searchOptions: searchOptions
|
69
|
+
searchOptions: searchOptions,
|
70
|
+
criteria,
|
69
71
|
};
|
70
72
|
return this._application.executePreparedSearch(mode, argument, options);
|
71
73
|
}
|
package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js
CHANGED
@@ -10,7 +10,8 @@ export class SnkFilterMultiSelect {
|
|
10
10
|
* Emitido quando acontece a alteração de valor do componente snk-filter-multi-select
|
11
11
|
*/
|
12
12
|
ezChangeListener(evt) {
|
13
|
-
|
13
|
+
var _a;
|
14
|
+
this.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value;
|
14
15
|
this.valueChanged.emit(this.value);
|
15
16
|
}
|
16
17
|
/**
|
@@ -55,8 +55,10 @@ export class SnkFilterPersonalized {
|
|
55
55
|
return this.presentationMode === EPresentationMode.MODAL;
|
56
56
|
}
|
57
57
|
doSearch(mode, argument, param) {
|
58
|
+
const context = Object.assign({}, param.searchContext);
|
59
|
+
context.searchOptions = Object.assign(Object.assign({}, context.searchOptions), { showInactives: "true" });
|
58
60
|
return new Promise((resolve, reject) => {
|
59
|
-
this._application.executePreparedSearch(mode, argument,
|
61
|
+
this._application.executePreparedSearch(mode, argument, context)
|
60
62
|
.then(result => {
|
61
63
|
resolve(result);
|
62
64
|
}).catch(reason => {
|
@@ -8,6 +8,7 @@ export class SnkFilterDetail {
|
|
8
8
|
constructor() {
|
9
9
|
this.config = undefined;
|
10
10
|
this.getMessage = undefined;
|
11
|
+
this.showHardFixed = true;
|
11
12
|
}
|
12
13
|
/**
|
13
14
|
* Exibe o componente snk-filter-detail.
|
@@ -85,7 +86,9 @@ export class SnkFilterDetail {
|
|
85
86
|
return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
|
86
87
|
}
|
87
88
|
getPopUpHeaderButtons() {
|
88
|
-
return (h(Fragment, null, !this.config.removalBlocked &&
|
89
|
+
return (h(Fragment, null, !this.config.removalBlocked &&
|
90
|
+
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
|
91
|
+
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
|
89
92
|
}
|
90
93
|
buildIcon(title, iconName, action) {
|
91
94
|
return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
@@ -196,6 +199,24 @@ export class SnkFilterDetail {
|
|
196
199
|
"tags": [],
|
197
200
|
"text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
|
198
201
|
}
|
202
|
+
},
|
203
|
+
"showHardFixed": {
|
204
|
+
"type": "boolean",
|
205
|
+
"mutable": false,
|
206
|
+
"complexType": {
|
207
|
+
"original": "boolean",
|
208
|
+
"resolved": "boolean",
|
209
|
+
"references": {}
|
210
|
+
},
|
211
|
+
"required": false,
|
212
|
+
"optional": false,
|
213
|
+
"docs": {
|
214
|
+
"tags": [],
|
215
|
+
"text": "Controla a visibilidade do bot\u00E3o de fixar elemento"
|
216
|
+
},
|
217
|
+
"attribute": "show-hard-fixed",
|
218
|
+
"reflect": false,
|
219
|
+
"defaultValue": "true"
|
199
220
|
}
|
200
221
|
};
|
201
222
|
}
|
@@ -14,6 +14,7 @@ export class SnkFilterItem {
|
|
14
14
|
this.detailIsVisible = undefined;
|
15
15
|
this.config = undefined;
|
16
16
|
this.getMessage = undefined;
|
17
|
+
this.showChips = true;
|
17
18
|
}
|
18
19
|
observeDetailIsVisible(value) {
|
19
20
|
this.visibleChanged.emit(value);
|
@@ -45,19 +46,22 @@ export class SnkFilterItem {
|
|
45
46
|
autoClose: true,
|
46
47
|
innerClickTest: this.innerClickCheck,
|
47
48
|
backClickListener: () => this.onDetailCloseCallback(),
|
48
|
-
left: this.
|
49
|
-
top: this.
|
49
|
+
left: this.getOffsetLeft(),
|
50
|
+
top: this.getOffsetTop(),
|
50
51
|
useOverlay: true,
|
51
52
|
overlayClassName: 'ez-scrim ez-scrim--light',
|
52
53
|
isFixed: true
|
53
54
|
};
|
54
55
|
}
|
55
|
-
|
56
|
+
getOffsetLeft() {
|
56
57
|
const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
|
57
58
|
const rect = this._filterItemElement.getBoundingClientRect();
|
58
|
-
|
59
|
+
// Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
|
60
|
+
const filterDetailWidth = 430;
|
61
|
+
const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
|
62
|
+
return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
|
59
63
|
}
|
60
|
-
|
64
|
+
getOffsetTop() {
|
61
65
|
const rect = this._filterItemElement.getBoundingClientRect();
|
62
66
|
return (rect.y + rect.height) + "px";
|
63
67
|
}
|
@@ -254,6 +258,9 @@ export class SnkFilterItem {
|
|
254
258
|
}
|
255
259
|
canClearFilter() {
|
256
260
|
const { value, groupedItems = [] } = this.config;
|
261
|
+
if (value != undefined && this.config.type === FilterItemType.MULTI_LIST) {
|
262
|
+
return value.some((item) => item.check);
|
263
|
+
}
|
257
264
|
return value !== undefined || groupedItems.some(item => item.visible);
|
258
265
|
}
|
259
266
|
getRightIconName() {
|
@@ -286,7 +293,7 @@ export class SnkFilterItem {
|
|
286
293
|
}
|
287
294
|
render() {
|
288
295
|
const leftIcon = this.getLeftIconName();
|
289
|
-
return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon
|
296
|
+
return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
|
290
297
|
}
|
291
298
|
static get is() { return "snk-filter-item"; }
|
292
299
|
static get properties() {
|
@@ -324,6 +331,24 @@ export class SnkFilterItem {
|
|
324
331
|
"tags": [],
|
325
332
|
"text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
|
326
333
|
}
|
334
|
+
},
|
335
|
+
"showChips": {
|
336
|
+
"type": "boolean",
|
337
|
+
"mutable": false,
|
338
|
+
"complexType": {
|
339
|
+
"original": "boolean",
|
340
|
+
"resolved": "boolean",
|
341
|
+
"references": {}
|
342
|
+
},
|
343
|
+
"required": false,
|
344
|
+
"optional": false,
|
345
|
+
"docs": {
|
346
|
+
"tags": [],
|
347
|
+
"text": "Usado para controlar a visibilidade dos chips de filtros"
|
348
|
+
},
|
349
|
+
"attribute": "show-chips",
|
350
|
+
"reflect": false,
|
351
|
+
"defaultValue": "true"
|
327
352
|
}
|
328
353
|
};
|
329
354
|
}
|
@@ -17,6 +17,7 @@ export class SnkFilterModal {
|
|
17
17
|
this.editPersonalizedFilter = undefined;
|
18
18
|
this.deletePersonalizedFilter = undefined;
|
19
19
|
this.filtersToDelete = [];
|
20
|
+
this.disablePersonalizedFilter = undefined;
|
20
21
|
}
|
21
22
|
/**
|
22
23
|
* Emitido quando um filtro personalizado é deletado.
|
@@ -233,7 +234,7 @@ export class SnkFilterModal {
|
|
233
234
|
const customFilters = this.filters.filter(filter => filter.filterType === FilterType.CUSTOM_FILTER);
|
234
235
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
235
236
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
236
|
-
return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
237
|
+
return (h("ez-modal-container", { class: "snk-filter-modal__container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, h("div", { class: "snk-filter-modal__content ez-col--sd-12" }, !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
237
238
|
}
|
238
239
|
static get is() { return "snk-filter-modal"; }
|
239
240
|
static get originalStyleUrls() {
|
@@ -411,6 +412,23 @@ export class SnkFilterModal {
|
|
411
412
|
"text": "Guarda filtros a serem deletados no Apply do modal"
|
412
413
|
},
|
413
414
|
"defaultValue": "[]"
|
415
|
+
},
|
416
|
+
"disablePersonalizedFilter": {
|
417
|
+
"type": "boolean",
|
418
|
+
"mutable": false,
|
419
|
+
"complexType": {
|
420
|
+
"original": "boolean",
|
421
|
+
"resolved": "boolean",
|
422
|
+
"references": {}
|
423
|
+
},
|
424
|
+
"required": false,
|
425
|
+
"optional": false,
|
426
|
+
"docs": {
|
427
|
+
"tags": [],
|
428
|
+
"text": "Desabilita a apresenta\u00E7\u00E3o da op\u00E7\u00E3o de filtros personalizados na filter bar (chip de filtros) \ne no modal lateral de filtros (container de filtros personalizados)."
|
429
|
+
},
|
430
|
+
"attribute": "disable-personalized-filter",
|
431
|
+
"reflect": false
|
414
432
|
}
|
415
433
|
};
|
416
434
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
:host {
|
2
2
|
display: grid;
|
3
|
-
grid-template-columns: minmax(100px, 100%) 1fr 1fr;
|
3
|
+
grid-template-columns: 1fr minmax(100px, 100%) 1fr 1fr;
|
4
4
|
|
5
5
|
/*@doc Define o z-index do componente.*/
|
6
6
|
--snk-personalized-filter--z-index: var(--elevation--20, 20);
|
@@ -8,6 +8,29 @@
|
|
8
8
|
--snk-personalized-filter--background-color: var(--background--xlight, #fff);
|
9
9
|
}
|
10
10
|
|
11
|
+
.snk-filter-bar__title {
|
12
|
+
max-width: 260px;
|
13
|
+
display: inline-block;
|
14
|
+
text-overflow: ellipsis;
|
15
|
+
overflow: hidden;
|
16
|
+
white-space: nowrap;
|
17
|
+
font-size: 16px;
|
18
|
+
font-family: var(--font-pattern, Arial);
|
19
|
+
font-weight: var(--text-weight--large, 600);
|
20
|
+
color: var(--color--title-primary, #2B3A54);
|
21
|
+
margin-top: 8px;
|
22
|
+
}
|
23
|
+
|
24
|
+
:host([data-mode="hidden"]) {
|
25
|
+
width: 0px;
|
26
|
+
height: 0px;
|
27
|
+
}
|
28
|
+
|
29
|
+
:host([data-mode="button"]) {
|
30
|
+
grid-template-columns: 1fr;
|
31
|
+
width: fit-content;
|
32
|
+
}
|
33
|
+
|
11
34
|
.snk-filter__popover-container{
|
12
35
|
/*private*/
|
13
36
|
display: flex;
|