@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,9 +1,8 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
3
|
+
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
4
4
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
5
5
|
const core = require('@sankhyalabs/core');
|
6
|
-
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
7
6
|
|
8
7
|
class GridConfigFetcher extends formConfigFetcher.ResourceFetcher {
|
9
8
|
constructor() {
|
@@ -195,7 +194,7 @@ class PersonalizedFilterFetcher {
|
|
195
194
|
return uri;
|
196
195
|
}
|
197
196
|
buildTemplates() {
|
198
|
-
this.templateByQuery.set("fetchFilterFields",
|
197
|
+
this.templateByQuery.set("fetchFilterFields", formConfigFetcher.dist.gql `
|
199
198
|
query($name: String!) {
|
200
199
|
$queryAlias$: fetchFilterFields(name: $name){
|
201
200
|
currentLink {
|
@@ -223,7 +222,7 @@ class PersonalizedFilterFetcher {
|
|
223
222
|
}
|
224
223
|
}
|
225
224
|
`);
|
226
|
-
this.templateByQuery.set("fetchFilterAssistent",
|
225
|
+
this.templateByQuery.set("fetchFilterAssistent", formConfigFetcher.dist.gql `
|
227
226
|
query($name: String!) {
|
228
227
|
$queryAlias$: fetchFilterAssistent(name: $name) {
|
229
228
|
id
|
@@ -234,21 +233,21 @@ class PersonalizedFilterFetcher {
|
|
234
233
|
assistent
|
235
234
|
}
|
236
235
|
}`);
|
237
|
-
this.templateByQuery.set("savePersonalizedFilter",
|
236
|
+
this.templateByQuery.set("savePersonalizedFilter", formConfigFetcher.dist.gql `
|
238
237
|
mutation($name: String!, $filterAssistent: InputFilterAssistent!) {
|
239
238
|
$queryAlias$: savePersonalizedFilter(name: $name, filterAssistent: $filterAssistent) {
|
240
239
|
id
|
241
240
|
name
|
242
241
|
}
|
243
242
|
}`);
|
244
|
-
this.templateByQuery.set("deletePersonalizedFilter",
|
243
|
+
this.templateByQuery.set("deletePersonalizedFilter", formConfigFetcher.dist.gql `
|
245
244
|
mutation($name: String!, $filterId: String!) {
|
246
245
|
$queryAlias$: deletePersonalizedFilter(name: $name, filterId: $filterId) {
|
247
246
|
id
|
248
247
|
name
|
249
248
|
}
|
250
249
|
}`);
|
251
|
-
this.templateByQuery.set("validateExpression",
|
250
|
+
this.templateByQuery.set("validateExpression", formConfigFetcher.dist.gql `
|
252
251
|
query($dataUnitName: String!, $expression: String!) {
|
253
252
|
$queryAlias$: validateExpression(dataUnitName: $dataUnitName, expression: $expression) {
|
254
253
|
valid
|
@@ -256,11 +255,11 @@ class PersonalizedFilterFetcher {
|
|
256
255
|
}
|
257
256
|
}`);
|
258
257
|
}
|
259
|
-
async loadPersonalizedFilter(resourceID, filterID, configName) {
|
258
|
+
async loadPersonalizedFilter(resourceID, filterID, configName, legacyConfigName) {
|
260
259
|
return new Promise((resolve, reject) => {
|
261
|
-
|
260
|
+
formConfigFetcher.DataFetcher.get()
|
262
261
|
.callGraphQL({
|
263
|
-
values: { name: this.resolveURI(resourceID, configName) + "/" + filterID },
|
262
|
+
values: { name: this.resolveURI(resourceID, configName) + "/" + filterID + this.resolveLegacyConfigName(legacyConfigName) },
|
264
263
|
query: this.templateByQuery.get("fetchFilterAssistent"),
|
265
264
|
})
|
266
265
|
.then((resp) => {
|
@@ -272,6 +271,9 @@ class PersonalizedFilterFetcher {
|
|
272
271
|
});
|
273
272
|
});
|
274
273
|
}
|
274
|
+
resolveLegacyConfigName(legacyConfigName) {
|
275
|
+
return legacyConfigName ? `?legacyResourceID=${legacyConfigName}` : '';
|
276
|
+
}
|
275
277
|
async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
276
278
|
if (!personalizedFilter || Object.keys(personalizedFilter).length == 0) {
|
277
279
|
return Promise.reject(new Error("personalizedFilter não pode ser vazio"));
|
@@ -279,7 +281,7 @@ class PersonalizedFilterFetcher {
|
|
279
281
|
let personalizedFilterParsed = JSON.parse(JSON.stringify(personalizedFilter));
|
280
282
|
personalizedFilterParsed.assistent = JSON.stringify(personalizedFilterParsed.assistent);
|
281
283
|
return new Promise((resolve, reject) => {
|
282
|
-
|
284
|
+
formConfigFetcher.DataFetcher.get()
|
283
285
|
.callGraphQL({
|
284
286
|
values: { name: this.resolveURI(resourceID, configName), filterAssistent: personalizedFilterParsed },
|
285
287
|
query: this.templateByQuery.get("savePersonalizedFilter"),
|
@@ -294,7 +296,7 @@ class PersonalizedFilterFetcher {
|
|
294
296
|
}
|
295
297
|
async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
296
298
|
return new Promise((resolve, reject) => {
|
297
|
-
|
299
|
+
formConfigFetcher.DataFetcher.get()
|
298
300
|
.callGraphQL({
|
299
301
|
values: { name: this.resolveURI(resourceID, configName), filterId: personalizedFilter.id },
|
300
302
|
query: this.templateByQuery.get("deletePersonalizedFilter"),
|
@@ -309,7 +311,7 @@ class PersonalizedFilterFetcher {
|
|
309
311
|
}
|
310
312
|
async validatePersonalizedFilter(dataUnitName, expression) {
|
311
313
|
return new Promise((resolve, reject) => {
|
312
|
-
|
314
|
+
formConfigFetcher.DataFetcher.get()
|
313
315
|
.callGraphQL({
|
314
316
|
values: { dataUnitName: dataUnitName, expression: expression },
|
315
317
|
query: this.templateByQuery.get("validateExpression"),
|
@@ -324,7 +326,7 @@ class PersonalizedFilterFetcher {
|
|
324
326
|
}
|
325
327
|
loadFields(uri) {
|
326
328
|
return new Promise((resolve, reject) => {
|
327
|
-
|
329
|
+
formConfigFetcher.DataFetcher.get()
|
328
330
|
.callGraphQL({
|
329
331
|
values: { name: uri },
|
330
332
|
query: this.templateByQuery.get("fetchFilterFields"),
|
@@ -353,17 +355,37 @@ class PersonalizedFilterFetcher {
|
|
353
355
|
}
|
354
356
|
}
|
355
357
|
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
358
|
+
var CONFIG_SOURCE;
|
359
|
+
(function (CONFIG_SOURCE) {
|
360
|
+
CONFIG_SOURCE["form"] = "form";
|
361
|
+
CONFIG_SOURCE["grid"] = "grid";
|
362
|
+
CONFIG_SOURCE["filterBar"] = "filterBar";
|
363
|
+
})(CONFIG_SOURCE || (CONFIG_SOURCE = {}));
|
361
364
|
class ConfigStorage {
|
362
|
-
static
|
365
|
+
static addFilterBarLegacyConfig(configName, legacyConfigName) {
|
366
|
+
this.validateConfigName(configName, legacyConfigName);
|
367
|
+
this.filterBarLegacyConfig.set(configName, legacyConfigName);
|
368
|
+
}
|
369
|
+
static addFormLegacyConfig(configName, legacyConfigName) {
|
370
|
+
this.validateConfigName(configName, legacyConfigName);
|
371
|
+
this.formLegacyConfig.set(configName, legacyConfigName);
|
372
|
+
}
|
373
|
+
static addGridLegacyConfig(configName, legacyConfigName) {
|
374
|
+
this.validateConfigName(configName, legacyConfigName);
|
375
|
+
this.gridLegacyConfig.set(configName, legacyConfigName);
|
376
|
+
}
|
377
|
+
static preload(resourceID, configName, legacyConfigs) {
|
378
|
+
if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.gridLegacyConfig)) {
|
379
|
+
ConfigStorage.addGridLegacyConfig(configName, legacyConfigs.gridLegacyConfig);
|
380
|
+
}
|
381
|
+
if (configName && (legacyConfigs === null || legacyConfigs === void 0 ? void 0 : legacyConfigs.formLegacyConfig)) {
|
382
|
+
ConfigStorage.addFormLegacyConfig(configName, legacyConfigs.formLegacyConfig);
|
383
|
+
}
|
363
384
|
ConfigStorage.loadFormConfig(configName, resourceID);
|
364
385
|
ConfigStorage.loadGridConfig(configName, resourceID);
|
365
386
|
}
|
366
387
|
static async loadFilterBarConfig(name, resourceID, urlParams) {
|
388
|
+
urlParams = this.handleLegacyConfig(name, CONFIG_SOURCE.filterBar, urlParams);
|
367
389
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.filterBar, resourceID);
|
368
390
|
if (!ConfigStorage.configById.has(cacheID)) {
|
369
391
|
ConfigStorage.configById.set(cacheID, ConfigStorage.filterBarConfigFetcher.getConfig(resourceID, name, urlParams));
|
@@ -371,6 +393,7 @@ class ConfigStorage {
|
|
371
393
|
return ConfigStorage.configById.get(cacheID);
|
372
394
|
}
|
373
395
|
static async loadFormConfig(name, resourceID) {
|
396
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
|
374
397
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.form, resourceID);
|
375
398
|
if (!ConfigStorage.configById.has(cacheID)) {
|
376
399
|
ConfigStorage.configById.set(cacheID, ConfigStorage.formConfigFetcher.loadFormConfig(name, resourceID));
|
@@ -378,6 +401,7 @@ class ConfigStorage {
|
|
378
401
|
return ConfigStorage.configById.get(cacheID);
|
379
402
|
}
|
380
403
|
static async loadGridConfig(name, resourceID) {
|
404
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
381
405
|
const cacheID = ConfigStorage.buildCacheID(name, CONFIG_SOURCE.grid, resourceID);
|
382
406
|
if (!ConfigStorage.configById.has(cacheID)) {
|
383
407
|
ConfigStorage.configById.set(cacheID, ConfigStorage.gridConfigFetcher.getConfig(name, resourceID));
|
@@ -385,13 +409,12 @@ class ConfigStorage {
|
|
385
409
|
return ConfigStorage.configById.get(cacheID);
|
386
410
|
}
|
387
411
|
static async saveFilterBarConfig(config, name, resourceID) {
|
388
|
-
|
389
|
-
this.configById.delete(cacheID);
|
412
|
+
await this.deleteFilterBarConfigCache(name, resourceID);
|
390
413
|
return this.filterBarConfigFetcher.saveConfig(config, resourceID, name);
|
391
414
|
}
|
392
415
|
static async saveFormConfig(config, name, resourceID) {
|
393
|
-
|
394
|
-
this.
|
416
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.form);
|
417
|
+
await this.deleteFormConfigCache(name, resourceID);
|
395
418
|
return this.formConfigFetcher.saveConfig(config, name, resourceID);
|
396
419
|
}
|
397
420
|
static async saveCardState(config, name, resourceID) {
|
@@ -401,18 +424,17 @@ class ConfigStorage {
|
|
401
424
|
if (config == undefined) {
|
402
425
|
return;
|
403
426
|
}
|
404
|
-
|
405
|
-
this.configById.delete(cacheID);
|
427
|
+
await this.deleteGridConfigCache(name, resourceID);
|
406
428
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
407
429
|
}
|
408
430
|
static async loadPersonalizedFilter(filterId, resourceID, configName) {
|
409
|
-
|
431
|
+
const legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
432
|
+
return this.personalizedFilterFetcher.loadPersonalizedFilter(resourceID, filterId, configName, legacyConfigName);
|
410
433
|
}
|
411
434
|
static async savePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
412
|
-
//Ao criar ou alterar um filtro personalizado,
|
435
|
+
//Ao criar ou alterar um filtro personalizado,
|
413
436
|
//precisamos remover o cache do status da filterbar.
|
414
|
-
|
415
|
-
this.configById.delete(cacheID);
|
437
|
+
await this.deleteFilterBarConfigCache(configName, resourceID);
|
416
438
|
return this.personalizedFilterFetcher.savePersonalizedFilter(personalizedFilter, resourceID, configName);
|
417
439
|
}
|
418
440
|
static async removePersonalizedFilter(personalizedFilter, resourceID, configName) {
|
@@ -421,6 +443,51 @@ class ConfigStorage {
|
|
421
443
|
static async validatePersonalizedFilter(dataUnitName, expression) {
|
422
444
|
return this.personalizedFilterFetcher.validatePersonalizedFilter(dataUnitName, expression);
|
423
445
|
}
|
446
|
+
static async deleteGridConfigCache(name, resourceID) {
|
447
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.grid);
|
448
|
+
}
|
449
|
+
static async deleteFormConfigCache(name, resourceID) {
|
450
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.form);
|
451
|
+
}
|
452
|
+
static async deleteFilterBarConfigCache(name, resourceID) {
|
453
|
+
await this.deleteConfigCache(name, resourceID, CONFIG_SOURCE.filterBar);
|
454
|
+
}
|
455
|
+
static validateConfigName(configName, legacyConfigName) {
|
456
|
+
if (!configName)
|
457
|
+
throw Error(this.CONFIG_NAME_ERROR_MESSAGE);
|
458
|
+
if (!legacyConfigName)
|
459
|
+
throw Error(this.LEGACY_CONFIG_NAME_ERROR_MESSAGE);
|
460
|
+
}
|
461
|
+
static handleLegacyConfig(configName, configSource, urlParams) {
|
462
|
+
let legacyConfigName;
|
463
|
+
switch (configSource) {
|
464
|
+
case CONFIG_SOURCE.filterBar:
|
465
|
+
legacyConfigName = this.filterBarLegacyConfig.get(configName);
|
466
|
+
break;
|
467
|
+
case CONFIG_SOURCE.grid:
|
468
|
+
legacyConfigName = this.gridLegacyConfig.get(configName);
|
469
|
+
break;
|
470
|
+
case CONFIG_SOURCE.form:
|
471
|
+
legacyConfigName = this.formLegacyConfig.get(configName);
|
472
|
+
}
|
473
|
+
const params = urlParams ? Object.assign({}, urlParams) : {};
|
474
|
+
if (legacyConfigName) {
|
475
|
+
params['legacyResourceID'] = legacyConfigName;
|
476
|
+
}
|
477
|
+
return params;
|
478
|
+
}
|
479
|
+
static handleLegacyConfigAsString(name, source) {
|
480
|
+
const params = this.handleLegacyConfig(name, source);
|
481
|
+
const legacyResourceID = params['legacyResourceID'];
|
482
|
+
if (legacyResourceID) {
|
483
|
+
name = name + `?legacyResourceID=${legacyResourceID}`;
|
484
|
+
}
|
485
|
+
return name;
|
486
|
+
}
|
487
|
+
static async deleteConfigCache(name, resourceID, source) {
|
488
|
+
const cacheID = ConfigStorage.buildCacheID(name, source, resourceID);
|
489
|
+
this.configById.delete(cacheID);
|
490
|
+
}
|
424
491
|
static buildCacheID(name, source, resourceID) {
|
425
492
|
if (name == undefined) {
|
426
493
|
return `req_${source}_${resourceID}`;
|
@@ -428,6 +495,11 @@ class ConfigStorage {
|
|
428
495
|
return `req_${source}_${name}_${resourceID}`;
|
429
496
|
}
|
430
497
|
}
|
498
|
+
ConfigStorage.CONFIG_NAME_ERROR_MESSAGE = "ConfigName precisa ser informado.";
|
499
|
+
ConfigStorage.LEGACY_CONFIG_NAME_ERROR_MESSAGE = "LegacyConfigName precisa ser informado.";
|
500
|
+
ConfigStorage.filterBarLegacyConfig = new Map();
|
501
|
+
ConfigStorage.formLegacyConfig = new Map();
|
502
|
+
ConfigStorage.gridLegacyConfig = new Map();
|
431
503
|
ConfigStorage.configById = new Map();
|
432
504
|
ConfigStorage.filterBarConfigFetcher = new FilterBarConfigFetcher();
|
433
505
|
ConfigStorage.formConfigFetcher = new formConfigFetcher.FormConfigFetcher();
|
@@ -0,0 +1,187 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
4
|
+
const pesquisaFetcher = require('./pesquisa-fetcher-cb768be1.js');
|
5
|
+
const core = require('@sankhyalabs/core');
|
6
|
+
require('./index-0922807b.js');
|
7
|
+
require('./ISave-e91b70a7.js');
|
8
|
+
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
9
|
+
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
10
|
+
require('./filter-item-type.enum-a7ffdaa6.js');
|
11
|
+
const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
12
|
+
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
14
|
+
|
15
|
+
const InMemoryFilterColumnDataSource__default = /*#__PURE__*/_interopDefaultLegacy(InMemoryFilterColumnDataSource);
|
16
|
+
|
17
|
+
class CrudUtils {
|
18
|
+
static assertDefaultSorting(gridConfig, dataUnit) {
|
19
|
+
if (gridConfig && dataUnit) {
|
20
|
+
dataUnit.defaultSorting = gridConfig
|
21
|
+
.columns
|
22
|
+
.filter(col => col.ascending != undefined)
|
23
|
+
.sort((colA, colB) => colA.orderIndex - colB.orderIndex)
|
24
|
+
.map(({ name: field, ascending }) => {
|
25
|
+
const { dataType } = dataUnit.getField(field);
|
26
|
+
return { field, dataType, mode: ascending ? core.SortMode.ASC : core.SortMode.DESC };
|
27
|
+
});
|
28
|
+
}
|
29
|
+
}
|
30
|
+
static find(entityName, fields, criteria, onlyFirst = true, criteriaExpression, orderBy) {
|
31
|
+
const SERVICE_CRUD_FIND = "mge@crud.find";
|
32
|
+
let parsedFields = [];
|
33
|
+
let parsedCriteria = [];
|
34
|
+
let literalCriteria = {};
|
35
|
+
let application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
36
|
+
if (fields) {
|
37
|
+
if (!Array.isArray(fields)) {
|
38
|
+
throw new Error(application.messagesBuilder.getMessage("crudUtils.errorArray", null));
|
39
|
+
}
|
40
|
+
fields.forEach((fieldName) => {
|
41
|
+
parsedFields.push({
|
42
|
+
name: fieldName
|
43
|
+
});
|
44
|
+
});
|
45
|
+
}
|
46
|
+
if (criteria) {
|
47
|
+
for (const key in criteria) {
|
48
|
+
if (criteria.hasOwnProperty(key)) {
|
49
|
+
parsedCriteria.push({ nome: key, valor: criteria[key] });
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
if (criteriaExpression) {
|
54
|
+
literalCriteria = {
|
55
|
+
expression: {
|
56
|
+
$: criteriaExpression
|
57
|
+
}
|
58
|
+
};
|
59
|
+
}
|
60
|
+
let request = {
|
61
|
+
requestBody: {
|
62
|
+
entity: {
|
63
|
+
name: entityName,
|
64
|
+
criterio: parsedCriteria,
|
65
|
+
fields: {
|
66
|
+
field: parsedFields
|
67
|
+
},
|
68
|
+
literalCriteria: literalCriteria,
|
69
|
+
orderby: orderBy
|
70
|
+
}
|
71
|
+
}
|
72
|
+
};
|
73
|
+
return new Promise((resolve) => {
|
74
|
+
formConfigFetcher.DataFetcher.get().callServiceBroker(SERVICE_CRUD_FIND, JSON.stringify(request)).then((result) => {
|
75
|
+
var _a;
|
76
|
+
let entities = (_a = result.entidades) === null || _a === void 0 ? void 0 : _a.entidade;
|
77
|
+
if (entities != undefined) {
|
78
|
+
let crudFindResult = {
|
79
|
+
fields: new Map()
|
80
|
+
};
|
81
|
+
for (let key in entities) {
|
82
|
+
let fieldValue = entities[key];
|
83
|
+
if (fieldValue.hasOwnProperty('$')) {
|
84
|
+
crudFindResult.fields.set(key, fieldValue.$);
|
85
|
+
}
|
86
|
+
if (onlyFirst) {
|
87
|
+
break;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
resolve(crudFindResult);
|
91
|
+
}
|
92
|
+
else {
|
93
|
+
resolve(null);
|
94
|
+
}
|
95
|
+
});
|
96
|
+
});
|
97
|
+
}
|
98
|
+
}
|
99
|
+
|
100
|
+
class SnkMultiSelectionListDataSource {
|
101
|
+
setDataUnit(dataUnit) {
|
102
|
+
this._dataUnit = dataUnit;
|
103
|
+
}
|
104
|
+
setApplication(application) {
|
105
|
+
this._application = application;
|
106
|
+
}
|
107
|
+
formatLabel(fieldName, value) {
|
108
|
+
const { userInterface } = this._dataUnit.getField(fieldName);
|
109
|
+
if (userInterface === core.UserInterface.DATETIME) {
|
110
|
+
return core.DateUtils.formatDate(this._dataUnit.valueFromString(fieldName, value));
|
111
|
+
}
|
112
|
+
return String(this._dataUnit.getFormattedValue(fieldName, value));
|
113
|
+
}
|
114
|
+
async getStaticOptions(fieldName) {
|
115
|
+
if (fieldName == undefined) {
|
116
|
+
return Promise.resolve(undefined);
|
117
|
+
}
|
118
|
+
return Promise.resolve(await pesquisaFetcher.PreloadManager.getDistinct(this._dataUnit, fieldName));
|
119
|
+
}
|
120
|
+
fetchData(filterTerm, fieldName) {
|
121
|
+
return new Promise(resolve => {
|
122
|
+
this._application.executeSelectDistinct(this._dataUnit, fieldName, filterTerm).then(result => {
|
123
|
+
resolve(result.map(item => {
|
124
|
+
const field = this._dataUnit.getField(fieldName);
|
125
|
+
if (field.userInterface === core.UserInterface.SEARCH) {
|
126
|
+
return Object.assign(Object.assign({}, JSON.parse(item)), { check: true });
|
127
|
+
}
|
128
|
+
return { value: item, label: this.formatLabel(fieldName, item), check: true };
|
129
|
+
}));
|
130
|
+
});
|
131
|
+
});
|
132
|
+
}
|
133
|
+
sortItems(fieldName, items) {
|
134
|
+
return InMemoryFilterColumnDataSource__default['default'].defaultSorterMultSelectionOption(this._dataUnit, fieldName, items);
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
class CommonsExporter {
|
139
|
+
constructor(dataUnit, grid) {
|
140
|
+
this.dataUnit = dataUnit;
|
141
|
+
this.grid = grid;
|
142
|
+
}
|
143
|
+
async getColumnsMetadata() {
|
144
|
+
var _a;
|
145
|
+
const columnsState = await ((_a = this.grid) === null || _a === void 0 ? void 0 : _a.getColumnsState());
|
146
|
+
return this.buildColumnsMetadata(columnsState);
|
147
|
+
}
|
148
|
+
buildColumnsMetadata(gridColumns) {
|
149
|
+
const columnsMetadata = [];
|
150
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach((column) => {
|
151
|
+
var _a, _b;
|
152
|
+
/**
|
153
|
+
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
154
|
+
*/
|
155
|
+
if (column.hidden && column.name !== "RECDESP") {
|
156
|
+
return;
|
157
|
+
}
|
158
|
+
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
159
|
+
const columnData = {
|
160
|
+
label: column.label,
|
161
|
+
id: column.name,
|
162
|
+
width: (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UnitMetadata.UserInterface.SEARCH ? 30 : column.width,
|
163
|
+
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
164
|
+
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface
|
165
|
+
};
|
166
|
+
columnsMetadata.push(columnData);
|
167
|
+
if (((_b = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _b === void 0 ? void 0 : _b.DESCRIPTIONFIELD) != undefined) {
|
168
|
+
const mergedFrom = fieldData.properties.mergedFrom;
|
169
|
+
const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
|
170
|
+
const descriptionColumn = {
|
171
|
+
label: fieldData.properties.DESCRIPTIONENTITY,
|
172
|
+
id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
|
173
|
+
width: 200,
|
174
|
+
type: core.DataType.TEXT,
|
175
|
+
userInterface: UnitMetadata.UserInterface.LONGTEXT,
|
176
|
+
descriptionFrom: fieldData.name
|
177
|
+
};
|
178
|
+
columnsMetadata.push(descriptionColumn);
|
179
|
+
}
|
180
|
+
});
|
181
|
+
return columnsMetadata || [];
|
182
|
+
}
|
183
|
+
}
|
184
|
+
|
185
|
+
exports.CommonsExporter = CommonsExporter;
|
186
|
+
exports.CrudUtils = CrudUtils;
|
187
|
+
exports.SnkMultiSelectionListDataSource = SnkMultiSelectionListDataSource;
|
@@ -5,4 +5,5 @@ exports.SaveErrorsEnum = void 0;
|
|
5
5
|
SaveErrorsEnum["LINK_AND_FILE_AT_THE_SAME_TIME"] = "LINK_AND_FILE_AT_THE_SAME_TIME";
|
6
6
|
SaveErrorsEnum["ANY_LINK_OR_FILE_FILLED"] = "ANY_LINK_OR_FILE_FILLED";
|
7
7
|
SaveErrorsEnum["UNKNOWN"] = "UNKNOWN";
|
8
|
+
SaveErrorsEnum["DESCRIPTION_CANNOT_BE_CHANGED"] = "DESCRIPTION_CANNOT_BE_CHANGED";
|
8
9
|
})(exports.SaveErrorsEnum || (exports.SaveErrorsEnum = {}));
|
@@ -0,0 +1,43 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
const core = require('@sankhyalabs/core');
|
4
|
+
|
5
|
+
const getSelectedIDs = (dataUnit) => {
|
6
|
+
const selectionInfo = dataUnit.getSelectionInfo();
|
7
|
+
if (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isAllRecords()) {
|
8
|
+
return [];
|
9
|
+
}
|
10
|
+
const selectedRecordsIDsInfo = [];
|
11
|
+
const selectedRecords = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.recordIds;
|
12
|
+
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) > 0) {
|
13
|
+
selectedRecords.forEach(recordId => {
|
14
|
+
if (!dataUnit.isNewRecord(recordId)) {
|
15
|
+
/*
|
16
|
+
Esse if foi necessário para tratar corretamente o ID
|
17
|
+
do record quando está sendo utilizado no modo standAlone
|
18
|
+
isso não faz a exportação da grid funcionar no modo standAlone
|
19
|
+
mas deixa de causar erro nas oprações de CRUD.
|
20
|
+
*/
|
21
|
+
if (!core.JSUtils.isBase64(recordId)) {
|
22
|
+
selectedRecordsIDsInfo.push({
|
23
|
+
name: "__record__id__",
|
24
|
+
type: core.DataType.TEXT,
|
25
|
+
value: recordId
|
26
|
+
});
|
27
|
+
return;
|
28
|
+
}
|
29
|
+
const revertBase64ToObject = JSON.parse(window.atob(recordId));
|
30
|
+
Object.entries(revertBase64ToObject).forEach(([name, value]) => {
|
31
|
+
const metadataField = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(name);
|
32
|
+
if (metadataField == undefined) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
selectedRecordsIDsInfo.push(Object.assign({ name, type: metadataField.dataType }, value));
|
36
|
+
});
|
37
|
+
}
|
38
|
+
});
|
39
|
+
}
|
40
|
+
return selectedRecordsIDsInfo;
|
41
|
+
};
|
42
|
+
|
43
|
+
exports.getSelectedIDs = getSelectedIDs;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
const ConfigStorage = require('./ConfigStorage-
|
3
|
+
const ConfigStorage = require('./ConfigStorage-7df9d3bb.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
5
|
+
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
6
6
|
|
7
7
|
class SnkFormConfigManager {
|
8
8
|
constructor(configName, resourceID, onConfigChange) {
|
@@ -10,6 +10,11 @@ class SnkFormConfigManager {
|
|
10
10
|
this._configName = configName;
|
11
11
|
this._onConfigChange = onConfigChange;
|
12
12
|
}
|
13
|
+
addFormLegacyConfig(legacyConfigName) {
|
14
|
+
if (this._configName) {
|
15
|
+
ConfigStorage.ConfigStorage.addFormLegacyConfig(this._configName, legacyConfigName);
|
16
|
+
}
|
17
|
+
}
|
13
18
|
async loadConfig() {
|
14
19
|
return new Promise(resolve => {
|
15
20
|
ConfigStorage.ConfigStorage.loadFormConfig(this._configName, this._resourceID)
|
@@ -95,16 +100,19 @@ class SnkFormConfigManager {
|
|
95
100
|
const normalizedFilter = core.StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
|
96
101
|
return normalizedText.includes(normalizedFilter);
|
97
102
|
}
|
98
|
-
getInsertionConfig(dataUnit) {
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
if (
|
103
|
-
|
103
|
+
getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
|
104
|
+
let fields = this.getFieldsList(dataUnit);
|
105
|
+
if (ignoreReadOnlyFormFields) {
|
106
|
+
fields = fields.filter(field => {
|
107
|
+
if (dataUnit) {
|
108
|
+
const def = dataUnit.getField(field.name);
|
109
|
+
if (def && def.readOnly) {
|
110
|
+
return false;
|
111
|
+
}
|
104
112
|
}
|
105
|
-
|
106
|
-
|
107
|
-
}
|
113
|
+
return !field.readOnly;
|
114
|
+
});
|
115
|
+
}
|
108
116
|
return Object.assign(Object.assign({}, this._config), { fields });
|
109
117
|
}
|
110
118
|
setConfig(config) {
|
@@ -124,8 +132,8 @@ class SnkFormConfigManager {
|
|
124
132
|
this._onConfigChange(Object.assign({}, this._config));
|
125
133
|
}
|
126
134
|
}
|
127
|
-
getConfig(insertionMode, dataUnit) {
|
128
|
-
return insertionMode ? this.getInsertionConfig(dataUnit) : Object.assign({}, this._config);
|
135
|
+
getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
|
136
|
+
return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
|
129
137
|
}
|
130
138
|
getFormConfigFetcher() {
|
131
139
|
if (this._formConfigFetcher == undefined) {
|
@@ -168,6 +168,10 @@ const snkCrudMessages = {
|
|
168
168
|
|
169
169
|
const snkSimpleCrudMessages = {
|
170
170
|
findColumn: "Busca de colunas",
|
171
|
+
formConfigUnavaliable: {
|
172
|
+
title: "Aviso",
|
173
|
+
message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
|
174
|
+
}
|
171
175
|
};
|
172
176
|
|
173
177
|
const fileViewerMessages = {
|
@@ -308,7 +312,8 @@ const snkDataExporterMessages = {
|
|
308
312
|
},
|
309
313
|
message: {
|
310
314
|
emailSuccess: "E-mail enviado com sucesso",
|
311
|
-
exportError: "
|
315
|
+
exportError: "Falha ao exportar dados",
|
316
|
+
unknownFailure: "O motivo da falha não pode ser identificado.",
|
312
317
|
exportPermission: "O usuário não possui permissão para exportar o arquivo.",
|
313
318
|
},
|
314
319
|
title: {
|
@@ -373,11 +378,24 @@ const snkAttachMessages = {
|
|
373
378
|
anyLinkOrFileFilled: {
|
374
379
|
title: "Atenção",
|
375
380
|
message: `É necessário preencher o campo "Link" ou anexar um arquivo.`
|
381
|
+
},
|
382
|
+
descriptionCannotBeChanged: {
|
383
|
+
title: "Atenção",
|
384
|
+
message: "O campo 'Descrição' não pode ser alterado."
|
376
385
|
}
|
377
386
|
},
|
378
387
|
taskbar: {
|
379
388
|
titleDownload: "Fazer download",
|
380
389
|
titleLink: "Abrir link",
|
390
|
+
},
|
391
|
+
attachMetadata: {
|
392
|
+
lblCode: "Código",
|
393
|
+
lblDescription: "Descrição",
|
394
|
+
lblFileOrLink: "Arquivo / Link",
|
395
|
+
lblUser: "Usuário",
|
396
|
+
lblDate: "Data de alteração",
|
397
|
+
lblFile: "Arquivo",
|
398
|
+
lblSubTitle: "Clique para selecionar um arquivo",
|
381
399
|
}
|
382
400
|
};
|
383
401
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
const core = require('@sankhyalabs/core');
|
4
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
4
|
+
const formConfigFetcher = require('./form-config-fetcher-3c4daeb5.js');
|
5
5
|
|
6
6
|
class AuthFetcher extends formConfigFetcher.ResourceFetcher {
|
7
7
|
getData(resourceID) {
|