@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
@@ -11,6 +11,7 @@ export class SnkFilterBar {
|
|
11
11
|
this._updateSequence = [];
|
12
12
|
this._loadingPending = false;
|
13
13
|
this._configUpdated = false;
|
14
|
+
this._firstLoad = true;
|
14
15
|
this._pendingVariables = false;
|
15
16
|
this._customfiltersToBeUpdated = [];
|
16
17
|
this._calculateSortIndex = (item) => {
|
@@ -27,16 +28,25 @@ export class SnkFilterBar {
|
|
27
28
|
return this._calculateSortIndex(b) - this._calculateSortIndex(a);
|
28
29
|
};
|
29
30
|
this.dataUnit = undefined;
|
31
|
+
this.title = undefined;
|
30
32
|
this.configName = undefined;
|
31
33
|
this.resourceID = undefined;
|
34
|
+
this.mode = "regular";
|
32
35
|
this.filterConfig = undefined;
|
33
36
|
this.messagesBuilder = undefined;
|
37
|
+
this.disablePersonalizedFilter = undefined;
|
38
|
+
this.filterBarLegacyConfigName = undefined;
|
34
39
|
this.allowDefault = undefined;
|
35
40
|
this.scrollerLocked = false;
|
36
41
|
this.showPersonalizedFilter = false;
|
37
42
|
this.personalizedFilterId = undefined;
|
38
43
|
}
|
39
44
|
observeFilterConfig(newValue, oldValue) {
|
45
|
+
if (ObjectUtils.equals(newValue, oldValue))
|
46
|
+
return;
|
47
|
+
this.handleFilterConfigsChanged(oldValue, newValue);
|
48
|
+
}
|
49
|
+
handleFilterConfigsChanged(oldValue, newValue) {
|
40
50
|
if (oldValue != undefined && newValue == undefined) {
|
41
51
|
this._loadingPending = true;
|
42
52
|
this._configUpdated = true;
|
@@ -74,7 +84,7 @@ export class SnkFilterBar {
|
|
74
84
|
* Faz o recarregamento da filterbar buscando o state no servidor.
|
75
85
|
*/
|
76
86
|
async reload() {
|
77
|
-
this.loadConfigFromStorage();
|
87
|
+
this.loadConfigFromStorage(true);
|
78
88
|
}
|
79
89
|
/**
|
80
90
|
* Retorna um item de filtro pelo ID.
|
@@ -164,13 +174,27 @@ export class SnkFilterBar {
|
|
164
174
|
return;
|
165
175
|
}
|
166
176
|
this._loadingPending = false;
|
167
|
-
this.dataUnit.
|
177
|
+
this.doLoadData(this.dataUnit.getLastLoadRequest() != undefined);
|
168
178
|
}
|
169
179
|
if (this._configUpdated) {
|
170
180
|
this._configUpdated = false;
|
171
181
|
ConfigStorage.saveFilterBarConfig(this.filterConfig, this.configName, this.resourceID);
|
172
182
|
}
|
173
183
|
}
|
184
|
+
async doLoadData(forceReload = false) {
|
185
|
+
try {
|
186
|
+
if (this._firstLoad && !forceReload) {
|
187
|
+
let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
|
188
|
+
if (!autoLoad) {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
}
|
192
|
+
this.dataUnit.loadData(undefined, undefined, true);
|
193
|
+
}
|
194
|
+
finally {
|
195
|
+
this._firstLoad = false;
|
196
|
+
}
|
197
|
+
}
|
174
198
|
/**
|
175
199
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
176
200
|
* através de um pequeno modulo na estrutura da aplicação:
|
@@ -179,6 +203,9 @@ export class SnkFilterBar {
|
|
179
203
|
*/
|
180
204
|
getMessage(key, params, defaultValue) {
|
181
205
|
var _a;
|
206
|
+
if (this.messagesBuilder == undefined && this._application) {
|
207
|
+
this.messagesBuilder = this._application.messagesBuilder;
|
208
|
+
}
|
182
209
|
return ((_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params)) || defaultValue;
|
183
210
|
}
|
184
211
|
getFilter(_dataUnit) {
|
@@ -205,7 +232,7 @@ export class SnkFilterBar {
|
|
205
232
|
registryFilterProvider() {
|
206
233
|
this.dataUnit.addFilterProvider(this);
|
207
234
|
if (this.filterConfig) {
|
208
|
-
this.
|
235
|
+
this.doLoadData();
|
209
236
|
}
|
210
237
|
}
|
211
238
|
itemFocused(selectedItem) {
|
@@ -223,6 +250,17 @@ export class SnkFilterBar {
|
|
223
250
|
filterActiveFilter(item) {
|
224
251
|
return item.visible || item.removalBlocked;
|
225
252
|
}
|
253
|
+
filterPersonalizedItems(item) {
|
254
|
+
return item.type === FilterItemType.PERSONALIZED;
|
255
|
+
}
|
256
|
+
getPersonalizedFilterVariableItems() {
|
257
|
+
return this.filterConfig
|
258
|
+
.filter(this.filterPersonalizedItems)
|
259
|
+
.map(item => {
|
260
|
+
const itemId = `filter-${item.id}`;
|
261
|
+
return (h("snk-filter-item", { key: item.id, id: itemId, config: Object.assign({}, item), onFocusin: () => this.itemFocused(itemId), onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), getMessage: (key, props) => this.getMessage(key, props), showChips: false }));
|
262
|
+
});
|
263
|
+
}
|
226
264
|
getFilterItems() {
|
227
265
|
const pinnedItems = [];
|
228
266
|
const unpinnedItems = [];
|
@@ -282,7 +320,15 @@ export class SnkFilterBar {
|
|
282
320
|
loadPermitions() {
|
283
321
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
284
322
|
}
|
285
|
-
|
323
|
+
addFilterBarLegacyConfigName() {
|
324
|
+
if (this.filterBarLegacyConfigName && this.configName) {
|
325
|
+
ConfigStorage.addFilterBarLegacyConfig(this.configName, this.filterBarLegacyConfigName);
|
326
|
+
}
|
327
|
+
}
|
328
|
+
async loadConfigFromStorage(clearCache) {
|
329
|
+
if (clearCache) {
|
330
|
+
await ConfigStorage.deleteFilterBarConfigCache(this.configName, this.resourceID);
|
331
|
+
}
|
286
332
|
return new Promise(accept => {
|
287
333
|
ConfigStorage.loadFilterBarConfig(this.configName, this.resourceID, { contextURI: this.dataUnit.name })
|
288
334
|
.then((filters) => {
|
@@ -325,6 +371,9 @@ export class SnkFilterBar {
|
|
325
371
|
filterChangeListener(evt) {
|
326
372
|
this.updateFilter(evt.detail);
|
327
373
|
}
|
374
|
+
/**
|
375
|
+
* Abre o modal de filtros
|
376
|
+
*/
|
328
377
|
async showFilterModal() {
|
329
378
|
const callbackOnApplyFilter = (filters) => {
|
330
379
|
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
@@ -337,6 +386,7 @@ export class SnkFilterBar {
|
|
337
386
|
filterConfig: filtersConfigCopy,
|
338
387
|
configName: this.configName,
|
339
388
|
onComplete: callbackOnApplyFilter,
|
389
|
+
disablePersonalizedFilter: this.disablePersonalizedFilter,
|
340
390
|
getMessage: (key, props) => this.getMessage(key, props),
|
341
391
|
onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
|
342
392
|
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
|
@@ -381,6 +431,7 @@ export class SnkFilterBar {
|
|
381
431
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
382
432
|
if (this._application) {
|
383
433
|
this.loadPermitions();
|
434
|
+
this.addFilterBarLegacyConfigName();
|
384
435
|
this.loadConfigFromStorage();
|
385
436
|
}
|
386
437
|
this.attachDataUnit();
|
@@ -395,7 +446,10 @@ export class SnkFilterBar {
|
|
395
446
|
if (this.showPersonalizedFilter) {
|
396
447
|
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
397
448
|
}
|
398
|
-
|
449
|
+
if (this.mode !== "regular") {
|
450
|
+
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
|
451
|
+
}
|
452
|
+
return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
399
453
|
}
|
400
454
|
static get is() { return "snk-filter-bar"; }
|
401
455
|
static get encapsulation() { return "scoped"; }
|
@@ -431,6 +485,23 @@ export class SnkFilterBar {
|
|
431
485
|
"text": "Recebe o DataUnit do ambiente. Se n\u00E3o for informado, procura pela refer\u00EAncia\ndo SnkDataUnit. Necess\u00E1rio para se registrar como provedor de filtros."
|
432
486
|
}
|
433
487
|
},
|
488
|
+
"title": {
|
489
|
+
"type": "string",
|
490
|
+
"mutable": false,
|
491
|
+
"complexType": {
|
492
|
+
"original": "string",
|
493
|
+
"resolved": "string",
|
494
|
+
"references": {}
|
495
|
+
},
|
496
|
+
"required": false,
|
497
|
+
"optional": false,
|
498
|
+
"docs": {
|
499
|
+
"tags": [],
|
500
|
+
"text": "T\u00EDtulo que ser\u00E1 apresentado na barra de filtros"
|
501
|
+
},
|
502
|
+
"attribute": "title",
|
503
|
+
"reflect": false
|
504
|
+
},
|
434
505
|
"configName": {
|
435
506
|
"type": "string",
|
436
507
|
"mutable": false,
|
@@ -465,6 +536,24 @@ export class SnkFilterBar {
|
|
465
536
|
"attribute": "resource-i-d",
|
466
537
|
"reflect": false
|
467
538
|
},
|
539
|
+
"mode": {
|
540
|
+
"type": "string",
|
541
|
+
"mutable": false,
|
542
|
+
"complexType": {
|
543
|
+
"original": "\"regular\" | \"button\" | \"hidden\"",
|
544
|
+
"resolved": "\"button\" | \"hidden\" | \"regular\"",
|
545
|
+
"references": {}
|
546
|
+
},
|
547
|
+
"required": false,
|
548
|
+
"optional": false,
|
549
|
+
"docs": {
|
550
|
+
"tags": [],
|
551
|
+
"text": "Modo de apresenta\u00E7\u00E3o da filterbar."
|
552
|
+
},
|
553
|
+
"attribute": "mode",
|
554
|
+
"reflect": false,
|
555
|
+
"defaultValue": "\"regular\""
|
556
|
+
},
|
468
557
|
"filterConfig": {
|
469
558
|
"type": "unknown",
|
470
559
|
"mutable": true,
|
@@ -507,6 +596,40 @@ export class SnkFilterBar {
|
|
507
596
|
"tags": [],
|
508
597
|
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
509
598
|
}
|
599
|
+
},
|
600
|
+
"disablePersonalizedFilter": {
|
601
|
+
"type": "boolean",
|
602
|
+
"mutable": false,
|
603
|
+
"complexType": {
|
604
|
+
"original": "boolean",
|
605
|
+
"resolved": "boolean",
|
606
|
+
"references": {}
|
607
|
+
},
|
608
|
+
"required": false,
|
609
|
+
"optional": false,
|
610
|
+
"docs": {
|
611
|
+
"tags": [],
|
612
|
+
"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)."
|
613
|
+
},
|
614
|
+
"attribute": "disable-personalized-filter",
|
615
|
+
"reflect": false
|
616
|
+
},
|
617
|
+
"filterBarLegacyConfigName": {
|
618
|
+
"type": "string",
|
619
|
+
"mutable": false,
|
620
|
+
"complexType": {
|
621
|
+
"original": "string",
|
622
|
+
"resolved": "string",
|
623
|
+
"references": {}
|
624
|
+
},
|
625
|
+
"required": false,
|
626
|
+
"optional": false,
|
627
|
+
"docs": {
|
628
|
+
"tags": [],
|
629
|
+
"text": "Chave da configura\u00E7\u00E3o legado da barra de filtros."
|
630
|
+
},
|
631
|
+
"attribute": "filter-bar-legacy-config-name",
|
632
|
+
"reflect": false
|
510
633
|
}
|
511
634
|
};
|
512
635
|
}
|
@@ -668,6 +791,37 @@ export class SnkFilterBar {
|
|
668
791
|
"text": "- Retorna o item de filtro removido, ou undefined caso n\u00E3o encontrado."
|
669
792
|
}]
|
670
793
|
}
|
794
|
+
},
|
795
|
+
"showFilterModal": {
|
796
|
+
"complexType": {
|
797
|
+
"signature": "() => Promise<void>",
|
798
|
+
"parameters": [],
|
799
|
+
"references": {
|
800
|
+
"Promise": {
|
801
|
+
"location": "global"
|
802
|
+
},
|
803
|
+
"SnkFilterItemConfig": {
|
804
|
+
"location": "import",
|
805
|
+
"path": "./filter-item/snk-filter-item"
|
806
|
+
},
|
807
|
+
"Array": {
|
808
|
+
"location": "global"
|
809
|
+
},
|
810
|
+
"SnkFilterModalFactoryParams": {
|
811
|
+
"location": "import",
|
812
|
+
"path": "./utils/SnkFilterModalFactory"
|
813
|
+
},
|
814
|
+
"IPersonalizedFilter": {
|
815
|
+
"location": "import",
|
816
|
+
"path": "../snk-personalized-filter/interfaces/IPersonalizedFilter"
|
817
|
+
}
|
818
|
+
},
|
819
|
+
"return": "Promise<void>"
|
820
|
+
},
|
821
|
+
"docs": {
|
822
|
+
"text": "Abre o modal de filtros",
|
823
|
+
"tags": []
|
824
|
+
}
|
671
825
|
}
|
672
826
|
};
|
673
827
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
2
2
|
class SnkFilterModalFactory {
|
3
|
-
constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
3
|
+
constructor({ filterConfig, configName, onComplete, getMessage, disablePersonalizedFilter, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
4
4
|
this._filterConfig = filterConfig;
|
5
5
|
this._configName = configName;
|
6
6
|
this._onComplete = onComplete;
|
7
7
|
this._getMessage = getMessage;
|
8
|
+
this._disablePersonalizedFilter = disablePersonalizedFilter;
|
8
9
|
this._addPersonalizedFilterFn = onAddPersonalizedFilter;
|
9
10
|
this._editPersonalizedFilterFn = onEditPersonalizedFilter;
|
10
11
|
this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
|
@@ -18,6 +19,7 @@ class SnkFilterModalFactory {
|
|
18
19
|
filterModal.className = "ez-size-height--full";
|
19
20
|
filterModal.filters = this._filterConfig;
|
20
21
|
filterModal.configName = this._configName;
|
22
|
+
filterModal.disablePersonalizedFilter = this._disablePersonalizedFilter;
|
21
23
|
filterModal.getMessage = this._getMessage.bind(this);
|
22
24
|
filterModal.applyFilters = this.applyFilters.bind(this);
|
23
25
|
filterModal.closeModal = () => this._closeModal();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
2
2
|
import { h } from '@stencil/core';
|
3
|
-
import { SnkFormConfigManager } from '
|
3
|
+
import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
4
4
|
import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
|
5
5
|
export class SnkForm {
|
6
6
|
constructor() {
|
@@ -11,6 +11,7 @@ export class SnkForm {
|
|
11
11
|
this.configName = undefined;
|
12
12
|
this.recordsValidator = undefined;
|
13
13
|
this.messagesBuilder = undefined;
|
14
|
+
this.formLegacyConfigName = undefined;
|
14
15
|
this.resourceID = undefined;
|
15
16
|
}
|
16
17
|
/**
|
@@ -58,8 +59,14 @@ export class SnkForm {
|
|
58
59
|
this.resourceID = await ResourceIDUtils.getResourceID();
|
59
60
|
}
|
60
61
|
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
|
62
|
+
this.addFormLegacyConfig();
|
61
63
|
this._configManager.loadConfig();
|
62
64
|
}
|
65
|
+
addFormLegacyConfig() {
|
66
|
+
if (this.formLegacyConfigName) {
|
67
|
+
this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
|
68
|
+
}
|
69
|
+
}
|
63
70
|
render() {
|
64
71
|
if (!this._dataUnit || !this._dataState) {
|
65
72
|
return undefined;
|
@@ -138,6 +145,23 @@ export class SnkForm {
|
|
138
145
|
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
139
146
|
}
|
140
147
|
},
|
148
|
+
"formLegacyConfigName": {
|
149
|
+
"type": "string",
|
150
|
+
"mutable": false,
|
151
|
+
"complexType": {
|
152
|
+
"original": "string",
|
153
|
+
"resolved": "string",
|
154
|
+
"references": {}
|
155
|
+
},
|
156
|
+
"required": false,
|
157
|
+
"optional": false,
|
158
|
+
"docs": {
|
159
|
+
"tags": [],
|
160
|
+
"text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
|
161
|
+
},
|
162
|
+
"attribute": "form-legacy-config-name",
|
163
|
+
"reflect": false
|
164
|
+
},
|
141
165
|
"resourceID": {
|
142
166
|
"type": "string",
|
143
167
|
"mutable": false,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ConfigStorage } from
|
1
|
+
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
2
2
|
import { ObjectUtils, StringUtils } from "@sankhyalabs/core";
|
3
3
|
import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
4
4
|
export class SnkFormConfigManager {
|
@@ -7,6 +7,11 @@ export class SnkFormConfigManager {
|
|
7
7
|
this._configName = configName;
|
8
8
|
this._onConfigChange = onConfigChange;
|
9
9
|
}
|
10
|
+
addFormLegacyConfig(legacyConfigName) {
|
11
|
+
if (this._configName) {
|
12
|
+
ConfigStorage.addFormLegacyConfig(this._configName, legacyConfigName);
|
13
|
+
}
|
14
|
+
}
|
10
15
|
async loadConfig() {
|
11
16
|
return new Promise(resolve => {
|
12
17
|
ConfigStorage.loadFormConfig(this._configName, this._resourceID)
|
@@ -92,16 +97,19 @@ export class SnkFormConfigManager {
|
|
92
97
|
const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
|
93
98
|
return normalizedText.includes(normalizedFilter);
|
94
99
|
}
|
95
|
-
getInsertionConfig(dataUnit) {
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
if (
|
100
|
-
|
100
|
+
getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
|
101
|
+
let fields = this.getFieldsList(dataUnit);
|
102
|
+
if (ignoreReadOnlyFormFields) {
|
103
|
+
fields = fields.filter(field => {
|
104
|
+
if (dataUnit) {
|
105
|
+
const def = dataUnit.getField(field.name);
|
106
|
+
if (def && def.readOnly) {
|
107
|
+
return false;
|
108
|
+
}
|
101
109
|
}
|
102
|
-
|
103
|
-
|
104
|
-
}
|
110
|
+
return !field.readOnly;
|
111
|
+
});
|
112
|
+
}
|
105
113
|
return Object.assign(Object.assign({}, this._config), { fields });
|
106
114
|
}
|
107
115
|
setConfig(config) {
|
@@ -121,8 +129,8 @@ export class SnkFormConfigManager {
|
|
121
129
|
this._onConfigChange(Object.assign({}, this._config));
|
122
130
|
}
|
123
131
|
}
|
124
|
-
getConfig(insertionMode, dataUnit) {
|
125
|
-
return insertionMode ? this.getInsertionConfig(dataUnit) : Object.assign({}, this._config);
|
132
|
+
getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
|
133
|
+
return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
|
126
134
|
}
|
127
135
|
getFormConfigFetcher() {
|
128
136
|
if (this._formConfigFetcher == undefined) {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
2
2
|
import { Sortable } from '@shopify/draggable';
|
3
|
-
import { ObjectUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
|
+
import { ObjectUtils, ArrayUtils, ElementIDUtils, ApplicationContext } from '@sankhyalabs/core';
|
4
4
|
import { ApplicationUtils, DialogType } from "@sankhyalabs/ezui/dist/collection/utils";
|
5
|
-
import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "
|
6
|
-
import { UserConfigType } from "
|
5
|
+
import { ACTION_CONFIG, CONFIG_EVENTS, CONFIG_SORTABLE_EVENTS, DEFAULT_TYPE, TAB_NAMES } from "../../lib/utils/constants";
|
6
|
+
import { UserConfigType } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
7
7
|
import { buildFormConfigFromDataUnit } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
8
8
|
const CONTAINER_ID = {
|
9
9
|
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
@@ -25,6 +25,7 @@ export class SnkFormConfig {
|
|
25
25
|
this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
|
26
26
|
this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
|
27
27
|
this._fieldFloatingStyle = "form-config__field-config--dragged";
|
28
|
+
this._sortableTimer = 100;
|
28
29
|
this._formConfigOptions = [];
|
29
30
|
this._fieldConfigSelected = undefined;
|
30
31
|
this._layoutFormConfig = undefined;
|
@@ -39,20 +40,27 @@ export class SnkFormConfig {
|
|
39
40
|
this.messagesBuilder = undefined;
|
40
41
|
}
|
41
42
|
observeConfigManager() {
|
42
|
-
this.loadConfig();
|
43
|
+
this.loadConfig(this._sortableTimer);
|
43
44
|
}
|
44
|
-
loadFields() {
|
45
|
+
loadFields(updateTimer = 0) {
|
45
46
|
this._layoutFormConfig = [];
|
46
|
-
|
47
|
+
if (updateTimer > 0) {
|
48
|
+
setTimeout(() => {
|
49
|
+
this.buildFields();
|
50
|
+
}, updateTimer);
|
51
|
+
}
|
52
|
+
else {
|
53
|
+
this.buildFields();
|
54
|
+
}
|
47
55
|
}
|
48
56
|
buildFields() {
|
49
57
|
this.buildFormConfig();
|
50
58
|
this.buildAvailableFields();
|
51
59
|
}
|
52
|
-
loadFormConfig() {
|
60
|
+
loadFormConfig(updateTimer) {
|
53
61
|
var _a;
|
54
62
|
this._formConfig = this.getConfig();
|
55
|
-
this.loadFields();
|
63
|
+
this.loadFields(updateTimer);
|
56
64
|
this.controlFieldConfig();
|
57
65
|
if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
58
66
|
this._filterFieldsAvailable.value = "";
|
@@ -95,12 +103,12 @@ export class SnkFormConfig {
|
|
95
103
|
}
|
96
104
|
}
|
97
105
|
resetChangeConfig() {
|
98
|
-
this.loadFormConfig();
|
106
|
+
this.loadFormConfig(this._sortableTimer);
|
99
107
|
this.clearTempGroups();
|
100
108
|
}
|
101
109
|
resetChangeOptionConfig() {
|
102
110
|
this._formConfigChanged = false;
|
103
|
-
this.loadConfig();
|
111
|
+
this.loadConfig(this._sortableTimer);
|
104
112
|
this.clearTempGroups();
|
105
113
|
}
|
106
114
|
getTabsToSave() {
|
@@ -318,7 +326,9 @@ export class SnkFormConfig {
|
|
318
326
|
&& oldContainer.id === newContainer.id) {
|
319
327
|
evt.cancel();
|
320
328
|
this._fieldsAvailable = [];
|
321
|
-
|
329
|
+
setTimeout(() => {
|
330
|
+
this.buildAvailableFields();
|
331
|
+
}, this._sortableTimer);
|
322
332
|
return true;
|
323
333
|
}
|
324
334
|
return false;
|
@@ -361,7 +371,11 @@ export class SnkFormConfig {
|
|
361
371
|
if (isNewGroup) {
|
362
372
|
this.clearTempGroups(true);
|
363
373
|
}
|
364
|
-
|
374
|
+
const sortableTimer = oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
375
|
+
|| (newContainer.id === CONTAINER_ID.withoutGroup && oldContainer.id === CONTAINER_ID.fieldsAvailable)
|
376
|
+
? this._sortableTimer
|
377
|
+
: 0;
|
378
|
+
this.updateFieldsToSave(sortableTimer);
|
365
379
|
}, this._renderTimer);
|
366
380
|
return true;
|
367
381
|
}
|
@@ -391,12 +405,12 @@ export class SnkFormConfig {
|
|
391
405
|
return;
|
392
406
|
}
|
393
407
|
}
|
394
|
-
updateFieldsToSave() {
|
408
|
+
updateFieldsToSave(updateTimer = 0) {
|
395
409
|
const fields = this.getFieldsToSave();
|
396
410
|
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
397
411
|
this._formConfig.fields = fields;
|
398
412
|
}
|
399
|
-
this.loadFields();
|
413
|
+
this.loadFields(updateTimer);
|
400
414
|
this._formConfigChanged = true;
|
401
415
|
}
|
402
416
|
controlSortableField() {
|
@@ -426,7 +440,7 @@ export class SnkFormConfig {
|
|
426
440
|
controlStopDraggingGroup(evt) {
|
427
441
|
if (evt.data.newIndex !== evt.data.oldIndex) {
|
428
442
|
setTimeout(() => {
|
429
|
-
this.updateFieldsToSave();
|
443
|
+
this.updateFieldsToSave(this._sortableTimer);
|
430
444
|
}, this._renderTimer);
|
431
445
|
}
|
432
446
|
}
|
@@ -499,7 +513,7 @@ export class SnkFormConfig {
|
|
499
513
|
});
|
500
514
|
if (tabs.length > 0) {
|
501
515
|
this._formConfig.tabs = tabs;
|
502
|
-
this.loadFields();
|
516
|
+
this.loadFields(this._sortableTimer);
|
503
517
|
this.controlFieldConfig();
|
504
518
|
this._formConfigChanged = true;
|
505
519
|
}
|
@@ -523,13 +537,13 @@ export class SnkFormConfig {
|
|
523
537
|
if (config != undefined) {
|
524
538
|
this._formConfig = config;
|
525
539
|
this._tabSelected = 1;
|
526
|
-
this.loadFields();
|
540
|
+
this.loadFields(this._sortableTimer);
|
527
541
|
this.controlFieldConfig();
|
528
542
|
this.clearTempGroups();
|
529
543
|
}
|
530
544
|
}
|
531
|
-
loadConfig() {
|
532
|
-
this.loadFormConfig();
|
545
|
+
loadConfig(updateTimer = 0) {
|
546
|
+
this.loadFormConfig(updateTimer);
|
533
547
|
this.loadUserConfig();
|
534
548
|
}
|
535
549
|
addNewGroup() {
|
@@ -570,7 +584,7 @@ export class SnkFormConfig {
|
|
570
584
|
});
|
571
585
|
}
|
572
586
|
else {
|
573
|
-
this.updateFieldsToSave();
|
587
|
+
this.updateFieldsToSave(this._sortableTimer);
|
574
588
|
}
|
575
589
|
}
|
576
590
|
checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
|
@@ -616,7 +630,7 @@ export class SnkFormConfig {
|
|
616
630
|
field.group = newLabel;
|
617
631
|
}
|
618
632
|
});
|
619
|
-
this.loadFields();
|
633
|
+
this.loadFields(this._sortableTimer);
|
620
634
|
this.controlFieldConfig();
|
621
635
|
this._formConfigChanged = true;
|
622
636
|
}
|
@@ -830,14 +844,14 @@ export class SnkFormConfig {
|
|
830
844
|
this._formConfigChanged = true;
|
831
845
|
this.resetSortables();
|
832
846
|
}
|
833
|
-
controlRemoveFieldConfig(fieldConfig) {
|
847
|
+
controlRemoveFieldConfig(fieldConfig, updateTimer) {
|
834
848
|
var _a;
|
835
849
|
this._formConfigChanged = false;
|
836
850
|
if (fieldConfig == undefined) {
|
837
851
|
return;
|
838
852
|
}
|
839
853
|
this._formConfig.fields = (_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.filter((field) => field.name !== fieldConfig.name);
|
840
|
-
this.loadFields();
|
854
|
+
this.loadFields(updateTimer);
|
841
855
|
this.controlFieldConfig();
|
842
856
|
this._formConfigChanged = true;
|
843
857
|
this.resetSortables();
|
@@ -846,14 +860,14 @@ export class SnkFormConfig {
|
|
846
860
|
this.controlSortableField();
|
847
861
|
this.controlSortableGroup();
|
848
862
|
}
|
849
|
-
handleFieldConfigChange(evt) {
|
863
|
+
handleFieldConfigChange(evt, updateTimer = 0) {
|
850
864
|
const { field: fieldConfig, type: actionType } = evt.detail;
|
851
865
|
if (actionType === ACTION_CONFIG.configuration) {
|
852
866
|
this.controlFieldConfig(fieldConfig);
|
853
867
|
return;
|
854
868
|
}
|
855
869
|
if (actionType === ACTION_CONFIG.remove) {
|
856
|
-
this.controlRemoveFieldConfig(fieldConfig);
|
870
|
+
this.controlRemoveFieldConfig(fieldConfig, updateTimer);
|
857
871
|
return;
|
858
872
|
}
|
859
873
|
if (actionType === ACTION_CONFIG.add) {
|
@@ -874,7 +888,7 @@ export class SnkFormConfig {
|
|
874
888
|
tab.label = newLabel;
|
875
889
|
}
|
876
890
|
});
|
877
|
-
this.loadFields();
|
891
|
+
this.loadFields(this._sortableTimer);
|
878
892
|
this.controlFieldConfig();
|
879
893
|
this._formConfigChanged = true;
|
880
894
|
}
|
@@ -894,7 +908,7 @@ export class SnkFormConfig {
|
|
894
908
|
this._formConfig.tabs = (_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.filter((tab) => {
|
895
909
|
return tab.label !== tabSelected.detail.label;
|
896
910
|
});
|
897
|
-
this.loadFields();
|
911
|
+
this.loadFields(this._sortableTimer);
|
898
912
|
this.controlFieldConfig();
|
899
913
|
this._formConfigChanged = true;
|
900
914
|
}
|
@@ -907,7 +921,7 @@ export class SnkFormConfig {
|
|
907
921
|
tab.visible = !tab.visible;
|
908
922
|
}
|
909
923
|
});
|
910
|
-
this.loadFields();
|
924
|
+
this.loadFields(this._sortableTimer);
|
911
925
|
this.controlFieldConfig();
|
912
926
|
this._formConfigChanged = true;
|
913
927
|
}
|
@@ -932,6 +946,12 @@ export class SnkFormConfig {
|
|
932
946
|
this.controlSortableField();
|
933
947
|
this.controlSortableGroup();
|
934
948
|
}
|
949
|
+
async componentWillRender() {
|
950
|
+
if (this.messagesBuilder == undefined) {
|
951
|
+
const application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
952
|
+
this.messagesBuilder = application.messagesBuilder;
|
953
|
+
}
|
954
|
+
}
|
935
955
|
componentWillLoad() {
|
936
956
|
this.loadConfig();
|
937
957
|
}
|
@@ -1005,7 +1025,7 @@ export class SnkFormConfig {
|
|
1005
1025
|
"references": {
|
1006
1026
|
"SnkFormConfigManager": {
|
1007
1027
|
"location": "import",
|
1008
|
-
"path": "
|
1028
|
+
"path": "./SnkFormConfigManager"
|
1009
1029
|
}
|
1010
1030
|
}
|
1011
1031
|
},
|
@@ -1025,7 +1045,7 @@ export class SnkFormConfig {
|
|
1025
1045
|
"references": {
|
1026
1046
|
"SnkMessageBuilder": {
|
1027
1047
|
"location": "import",
|
1028
|
-
"path": "
|
1048
|
+
"path": "../../lib/message/SnkMessageBuilder"
|
1029
1049
|
}
|
1030
1050
|
}
|
1031
1051
|
},
|