@sankhyalabs/sankhyablocks 8.16.0-dev.8 → 8.16.0-dev.81
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-d024aec8.js} +2 -2
- package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-c27b439e.js} +66 -23
- package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-65879b2c.js} +216 -76
- package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
- package/dist/cjs/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-c11d8468.js} +75 -17
- package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
- package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-8480751c.js} +1 -1
- package/dist/cjs/{constants-35ddd366.js → constants-241934b3.js} +9 -0
- package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-8291ac21.js} +239 -43
- package/dist/cjs/{field-search-f56aa7d6.js → field-search-68e34bf4.js} +5 -1
- package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-90126e4c.js} +42 -2
- package/dist/cjs/index-f9e81701.js +16 -32
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-fetcher-5c583c93.js +365 -0
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +156 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +138 -42
- package/dist/cjs/snk-application.cjs.entry.js +293 -69
- package/dist/cjs/snk-attach.cjs.entry.js +47 -34
- package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +399 -13
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +23 -9
- package/dist/cjs/snk-data-exporter.cjs.entry.js +35 -23
- package/dist/cjs/{snk-data-unit-04df81bf.js → snk-data-unit-d75e6220.js} +54 -32
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
- package/dist/cjs/snk-detail-view.cjs.entry.js +13 -13
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1436 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -1
- package/dist/cjs/snk-grid.cjs.entry.js +89 -24
- package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-bff0d27d.js} +30 -14
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +4 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +111 -31
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +102 -45
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +70 -38
- package/dist/collection/collection-manifest.json +14 -31
- package/dist/collection/components/snk-actions-button/actions/index.js +16 -13
- package/dist/collection/components/snk-actions-button/interfaces/index.js +1 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +29 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
- package/dist/collection/components/snk-application/snk-application.css +36 -0
- package/dist/collection/components/snk-application/snk-application.js +315 -64
- package/dist/collection/components/snk-attach/snk-attach.js +25 -16
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
- package/dist/collection/components/snk-configurator/snk-configurator.css +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +122 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +72 -6
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +13 -7
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +9 -2
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +3 -5
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +52 -30
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css +13 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -3
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js +8 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +5 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +118 -28
- package/dist/collection/components/snk-form/snk-form.js +2 -2
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +73 -15
- package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +49 -8
- package/dist/collection/components/snk-grid/snk-grid.css +2 -0
- package/dist/collection/components/snk-grid/snk-grid.js +170 -11
- package/dist/collection/components/snk-grid-config/snk-grid-config.css +1 -1
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +9 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +226 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +28 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +208 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +99 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +35 -6
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +174 -32
- package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +180 -34
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +112 -38
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +29 -21
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +59 -14
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +21 -7
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +108 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +17 -9
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +45 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +107 -7
- package/dist/collection/lib/index.js +1 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
- package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
- package/dist/collection/lib/utils/CrudUtils.js +25 -16
- package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
- package/dist/collection/lib/utils/constants.js +9 -0
- package/dist/collection/sw.js +46 -0
- package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +67 -23
- package/dist/components/DataFetcher.js +217 -77
- package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
- package/dist/components/ISave.js +362 -1
- package/dist/components/SnkFormConfigManager.js +73 -15
- package/dist/components/SnkMessageBuilder.js +7 -3
- package/dist/components/constants.js +10 -1
- package/dist/components/dataunit-fetcher.js +238 -40
- package/dist/components/form-config-fetcher.js +41 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/pesquisa-grid.d.ts +11 -0
- package/dist/components/pesquisa-grid.js +6 -0
- package/dist/components/pesquisa-grid2.js +102 -0
- package/dist/components/pesquisa-tree.d.ts +11 -0
- package/dist/components/pesquisa-tree.js +6 -0
- package/dist/components/pesquisa-tree2.js +91 -0
- package/dist/components/snk-actions-button2.js +44 -40
- package/dist/components/snk-application2.js +312 -68
- package/dist/components/snk-attach2.js +54 -60
- package/dist/components/snk-config-options2.js +1 -1
- package/dist/components/snk-configurator2.js +1 -1
- package/dist/components/snk-crud.js +83 -59
- package/dist/components/snk-data-exporter2.js +28 -17
- package/dist/components/snk-data-unit2.js +55 -70
- package/dist/components/snk-detail-view2.js +115 -106
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +64 -30
- package/dist/components/snk-filter-binary-select.js +1 -1
- package/dist/components/snk-filter-checkbox-list.js +1 -1
- package/dist/components/snk-filter-item2.js +5 -1
- package/dist/components/snk-filter-modal.js +4 -2
- package/dist/components/snk-filter-text.js +2 -1
- package/dist/components/snk-form-config2.js +35 -10
- package/dist/components/snk-form.js +2 -2
- package/dist/components/snk-grid-config2.js +1 -1
- package/dist/components/snk-grid2.js +86 -16
- package/dist/components/snk-personalized-filter-editor.js +4 -4
- package/dist/components/snk-pesquisa2.js +125 -33
- package/dist/components/snk-print-selector.js +1 -1
- package/dist/components/snk-simple-bar2.js +1 -1
- package/dist/components/snk-simple-crud2.js +108 -65
- package/dist/components/snk-simple-form-config.d.ts +11 -0
- package/dist/components/snk-simple-form-config.js +6 -0
- package/dist/components/snk-simple-form-config2.js +121 -0
- package/dist/components/snk-tab-config2.js +1 -1
- package/dist/components/snk-taskbar2.js +72 -40
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-6bf78c5e.js} +67 -25
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5221b992.js} +217 -77
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
- package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-5022f87f.js} +75 -17
- package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
- package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-e32fe8a4.js} +1 -1
- package/dist/esm/{constants-8457af36.js → constants-75abb876.js} +10 -1
- package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-5247a708.js} +239 -41
- package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
- package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-126e2471.js} +42 -2
- package/dist/esm/index-a7d3d3f1.js +16 -32
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-fetcher-4284f2a3.js +362 -0
- package/dist/esm/pesquisa-grid_2.entry.js +151 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +139 -44
- package/dist/esm/snk-application.entry.js +295 -71
- package/dist/esm/snk-attach.entry.js +47 -34
- package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +399 -15
- package/dist/esm/snk-configurator.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +23 -9
- package/dist/esm/snk-data-exporter.entry.js +35 -23
- package/dist/esm/{snk-data-unit-8eec78bd.js → snk-data-unit-bfd10c71.js} +54 -32
- package/dist/esm/snk-data-unit.entry.js +5 -5
- package/dist/esm/snk-detail-view.entry.js +13 -13
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +1429 -0
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-text.entry.js +2 -1
- package/dist/esm/snk-grid.entry.js +84 -19
- package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-454ebc07.js} +30 -14
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter-editor.entry.js +4 -4
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +111 -31
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +99 -42
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +71 -39
- package/dist/sankhyablocks/p-03e6825e.js +1 -0
- package/dist/sankhyablocks/p-1435701f.js +26 -0
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/p-17425c72.js +1 -0
- package/dist/sankhyablocks/{p-52920496.js → p-19dc71e9.js} +1 -1
- package/dist/sankhyablocks/p-1bd8eae1.entry.js +1 -0
- package/dist/sankhyablocks/{p-47db7e88.entry.js → p-1cf39cfd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0ef4383.js → p-1d19a5b0.js} +1 -1
- package/dist/sankhyablocks/p-23736d75.js +1 -0
- package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-23cd6abf.entry.js} +1 -1
- package/dist/sankhyablocks/p-28ca3908.entry.js +1 -0
- package/dist/sankhyablocks/{p-95df461f.entry.js → p-2953c481.entry.js} +1 -1
- package/dist/sankhyablocks/p-38179225.js +60 -0
- package/dist/sankhyablocks/p-3ba431c9.js +1 -0
- package/dist/sankhyablocks/p-41c3bee5.js +6 -0
- package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
- package/dist/sankhyablocks/p-47178038.entry.js +1 -0
- package/dist/sankhyablocks/p-478ab2b6.js +1 -0
- package/dist/sankhyablocks/{p-7663f597.entry.js → p-4c9adf1c.entry.js} +1 -1
- package/dist/sankhyablocks/p-50bf8dbc.entry.js +1 -0
- package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-643b2aaa.entry.js +1 -0
- package/dist/sankhyablocks/p-655bdd60.js +1 -0
- package/dist/sankhyablocks/p-6fc8bfa2.entry.js +1 -0
- package/dist/sankhyablocks/p-73b037a8.entry.js +1 -0
- package/dist/sankhyablocks/p-7dd49d15.js +1 -0
- package/dist/sankhyablocks/{p-2c68b3ae.entry.js → p-82ee6dc3.entry.js} +1 -1
- package/dist/sankhyablocks/p-89c92727.entry.js +1 -0
- package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
- package/dist/sankhyablocks/p-91e34755.entry.js +1 -0
- package/dist/sankhyablocks/p-9a99c67b.entry.js +1 -0
- package/dist/sankhyablocks/p-a04f38aa.entry.js +1 -0
- package/dist/sankhyablocks/p-ae26e8d0.entry.js +1 -0
- package/dist/sankhyablocks/p-bd234604.entry.js +1 -0
- package/dist/sankhyablocks/p-c021a3a9.entry.js +1 -0
- package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
- package/dist/sankhyablocks/p-d62228fb.js +1 -0
- package/dist/sankhyablocks/p-d9bb48c4.entry.js +11 -0
- package/dist/sankhyablocks/p-edbe8e15.entry.js +1 -0
- package/dist/sankhyablocks/{p-913a9979.js → p-f0b9303b.js} +1 -1
- package/dist/sankhyablocks/p-f8db6795.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
- package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
- package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
- package/dist/types/components/snk-application/snk-application.d.ts +38 -14
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +28 -0
- package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +44 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +33 -0
- package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +24 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +35 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +27 -3
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
- package/dist/types/components.d.ts +390 -14
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +12 -2
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +9 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +3 -3
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +17 -1
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
- package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
- package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
- package/dist/types/lib/utils/constants.d.ts +7 -0
- package/package.json +4 -3
- package/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/pesquisa-fetcher-680e198f.js +0 -166
- package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
- package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
- package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
- package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
- package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
- package/dist/cjs/snk-form.cjs.entry.js +0 -143
- package/dist/components/pesquisa-fetcher.js +0 -164
- package/dist/esm/pesquisa-fetcher-03c8f919.js +0 -164
- package/dist/esm/snk-config-options.entry.js +0 -235
- package/dist/esm/snk-filter-bar.entry.js +0 -710
- package/dist/esm/snk-filter-item.entry.js +0 -308
- package/dist/esm/snk-filter-list.entry.js +0 -148
- package/dist/esm/snk-filter-modal.entry.js +0 -245
- package/dist/esm/snk-form.entry.js +0 -139
- package/dist/sankhyablocks/p-045eae4d.entry.js +0 -11
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-2a408684.js +0 -1
- package/dist/sankhyablocks/p-3a212712.js +0 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
- package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
- package/dist/sankhyablocks/p-4e5e1313.entry.js +0 -1
- package/dist/sankhyablocks/p-547eeac8.entry.js +0 -1
- package/dist/sankhyablocks/p-62ba211a.entry.js +0 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
- package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
- package/dist/sankhyablocks/p-75e674ed.entry.js +0 -1
- package/dist/sankhyablocks/p-7a337364.js +0 -1
- package/dist/sankhyablocks/p-7a85fd49.entry.js +0 -1
- package/dist/sankhyablocks/p-7b08d0f8.entry.js +0 -1
- package/dist/sankhyablocks/p-80042dc6.entry.js +0 -1
- package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
- package/dist/sankhyablocks/p-96a89d58.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-af8efd95.js +0 -6
- package/dist/sankhyablocks/p-b05d8893.entry.js +0 -1
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
- package/dist/sankhyablocks/p-c1d57831.entry.js +0 -1
- package/dist/sankhyablocks/p-c2495304.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
- package/dist/sankhyablocks/p-d6e26ea8.entry.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-df5451c7.js +0 -26
- package/dist/sankhyablocks/p-e549f7d1.js +0 -1
- package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- package/dist/sankhyablocks/p-fa4d8cb4.js +0 -1
- package/dist/sankhyablocks/p-fe79f83a.js +0 -60
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -1,5 +1,5 @@
|
|
1
|
-
import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
2
|
-
import { CSSVarsUtils } from
|
1
|
+
import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, KeyboardManager, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
2
|
+
import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
3
3
|
import { h } from '@stencil/core';
|
4
4
|
import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
|
5
5
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
@@ -13,7 +13,8 @@ import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
|
13
13
|
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './regular-buttons';
|
14
14
|
import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
|
15
15
|
import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
|
16
|
-
import store from
|
16
|
+
import store from '../../lib/store';
|
17
|
+
import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
|
17
18
|
export class SnkSimpleCrud {
|
18
19
|
constructor() {
|
19
20
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
@@ -22,18 +23,19 @@ export class SnkSimpleCrud {
|
|
22
23
|
this._customEditors = new Map();
|
23
24
|
this._customRenders = new Map();
|
24
25
|
this._taskbarProcessor = new TaskbarProcessor({
|
25
|
-
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE]),
|
26
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE], true),
|
26
27
|
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
|
27
|
-
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE]),
|
28
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE], true),
|
28
29
|
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
|
29
|
-
"snkSimpleCrudTaskbar.finish_edition":
|
30
|
+
"snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
|
30
31
|
});
|
31
32
|
this._showPopUpGridConfig = false;
|
32
|
-
this._showFormConfig = false;
|
33
33
|
this._currentViewMode = VIEW_MODE.GRID;
|
34
34
|
this._config = undefined;
|
35
35
|
this._fieldToGetFocus = undefined;
|
36
36
|
this._customContainerId = `SNK-SIMPLE-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
37
|
+
this.enableLockManagerLoadingComp = false;
|
38
|
+
this.enableLockManagerTaskbarClick = false;
|
37
39
|
this.dataState = undefined;
|
38
40
|
this.dataUnit = undefined;
|
39
41
|
this.entityName = undefined;
|
@@ -42,10 +44,12 @@ export class SnkSimpleCrud {
|
|
42
44
|
this.formConfig = undefined;
|
43
45
|
this._formFields = [];
|
44
46
|
this._fieldsProps = new Map();
|
47
|
+
this.enableContinuousInsert = false;
|
45
48
|
this.multipleSelection = undefined;
|
46
49
|
this.useCancelConfirm = true;
|
47
50
|
this.pageSize = 150;
|
48
51
|
this.resourceID = undefined;
|
52
|
+
this.enableGridInsert = false;
|
49
53
|
this.taskbarManager = undefined;
|
50
54
|
this.messagesBuilder = undefined;
|
51
55
|
this.useEnterLikeTab = false;
|
@@ -58,6 +62,7 @@ export class SnkSimpleCrud {
|
|
58
62
|
this.autoFocus = true;
|
59
63
|
this.domainMessagesBuilder = undefined;
|
60
64
|
this.autoLoad = undefined;
|
65
|
+
this.outlineMode = false;
|
61
66
|
}
|
62
67
|
/**
|
63
68
|
* Registra um editor customizado para campos da grade e formulário.
|
@@ -115,8 +120,19 @@ export class SnkSimpleCrud {
|
|
115
120
|
newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
|
116
121
|
this._fieldsProps = newCustomFieldProps;
|
117
122
|
}
|
118
|
-
|
119
|
-
|
123
|
+
getFinishEditionButtonsCallback() {
|
124
|
+
const btns = ["CANCEL", "SAVE"];
|
125
|
+
if (this.enableGridInsert && this._currentViewMode !== VIEW_MODE.ATTACHMENT) {
|
126
|
+
btns.push(this._currentViewMode === VIEW_MODE.GRID ? TaskbarElement.FORM_MODE : TaskbarElement.GRID_MODE);
|
127
|
+
}
|
128
|
+
return btns;
|
129
|
+
}
|
130
|
+
getButtons(selected, extraButtons, removeRefresh) {
|
131
|
+
let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
|
132
|
+
if (removeRefresh) {
|
133
|
+
btnList = btnList.filter(item => item !== TaskbarElement.REFRESH);
|
134
|
+
}
|
135
|
+
return this.addConfigButton(this.resolveInMemoryBtns(btnList)
|
120
136
|
.concat(extraButtons));
|
121
137
|
}
|
122
138
|
addConfigButton(buttons) {
|
@@ -197,7 +213,6 @@ export class SnkSimpleCrud {
|
|
197
213
|
await this.setFieldProp(field, 'precision', rmPrecision);
|
198
214
|
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
199
215
|
}
|
200
|
-
;
|
201
216
|
this._rmPrecisionCustomValueFormatter.setDataState(this.dataState);
|
202
217
|
}
|
203
218
|
async handleUpdateGridLegacyConfig(newValue, oldValue) {
|
@@ -236,15 +251,9 @@ export class SnkSimpleCrud {
|
|
236
251
|
});
|
237
252
|
}
|
238
253
|
async openFormConfig() {
|
239
|
-
|
240
|
-
|
241
|
-
if (this.formLegacyConfigName) {
|
242
|
-
const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
|
243
|
-
const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
|
244
|
-
await this.application.alert(title, message);
|
245
|
-
return;
|
254
|
+
if (this.formLegacyConfigName || this.configName) {
|
255
|
+
await this._snkSimpleFormConfig.show();
|
246
256
|
}
|
247
|
-
this._showFormConfig = true;
|
248
257
|
}
|
249
258
|
addGridLegacyConfigName() {
|
250
259
|
if (this.gridLegacyConfigName && this.configName) {
|
@@ -274,12 +283,12 @@ export class SnkSimpleCrud {
|
|
274
283
|
formConfigIsLoaded() {
|
275
284
|
return this.formConfig != undefined || this._formConfigAlreadyLoaded;
|
276
285
|
}
|
277
|
-
async loadFormConfig(forceLoad = false) {
|
286
|
+
async loadFormConfig(forceLoad = false, forceSetNewConfig = false) {
|
278
287
|
if (this.configName === undefined) {
|
279
288
|
return;
|
280
289
|
}
|
281
290
|
if (this._formConfigManager == undefined) {
|
282
|
-
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
291
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID(), undefined, this.dataUnit);
|
283
292
|
this._formConfigManager.setConfig(this.formConfig);
|
284
293
|
}
|
285
294
|
if (this.formConfigIsLoaded() && !forceLoad) {
|
@@ -289,7 +298,7 @@ export class SnkSimpleCrud {
|
|
289
298
|
let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
|
290
299
|
if (loadedLegacyConfig != undefined) {
|
291
300
|
this._formConfigManager.setConfig(loadedLegacyConfig);
|
292
|
-
this.setFormConfig(loadedLegacyConfig);
|
301
|
+
this.setFormConfig(loadedLegacyConfig, forceSetNewConfig);
|
293
302
|
return;
|
294
303
|
}
|
295
304
|
this.setFormConfig(await this._formConfigManager.loadConfig());
|
@@ -320,9 +329,14 @@ export class SnkSimpleCrud {
|
|
320
329
|
this.onModeChange();
|
321
330
|
this.configDatasource();
|
322
331
|
this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
|
332
|
+
this._continuousInsertUtils = new ContinuousInsertUtils(this.application, this.resolveResourceID(), this.configName);
|
333
|
+
if (this.enableGridInsert) {
|
334
|
+
this._continuousInsertUtils.getConfig().then(value => this.enableContinuousInsert = value);
|
335
|
+
}
|
323
336
|
}
|
324
337
|
componentDidLoad() {
|
325
338
|
CSSVarsUtils.applyVarsGrid(this._element, this._grid);
|
339
|
+
this.initKeyboardManager();
|
326
340
|
}
|
327
341
|
setCustomRenders() {
|
328
342
|
if (!this._grid) {
|
@@ -554,6 +568,9 @@ export class SnkSimpleCrud {
|
|
554
568
|
const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
|
555
569
|
return Promise.resolve(options);
|
556
570
|
}
|
571
|
+
isGridInsertActive() {
|
572
|
+
return this.enableGridInsert && this.dataUnit.hasNewRecord();
|
573
|
+
}
|
557
574
|
getActionsList() {
|
558
575
|
var _a, _b;
|
559
576
|
const hardList = [{
|
@@ -565,11 +582,21 @@ export class SnkSimpleCrud {
|
|
565
582
|
? this.getColumnSearch(actionButton, item)
|
566
583
|
: this.getFieldSearch(actionButton, item)
|
567
584
|
}];
|
585
|
+
if (this.enableGridInsert) {
|
586
|
+
hardList.push(this._continuousInsertUtils.actionContinuousInsert(this.enableContinuousInsert, () => {
|
587
|
+
this.enableContinuousInsert = !this.enableContinuousInsert;
|
588
|
+
this._continuousInsertUtils.handleSaveConfig(this.enableContinuousInsert);
|
589
|
+
}));
|
590
|
+
}
|
591
|
+
if (this.isGridInsertActive())
|
592
|
+
return hardList;
|
568
593
|
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
569
594
|
const taskbarID = this.getTopTaskBarId();
|
570
595
|
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
571
596
|
}
|
572
|
-
|
597
|
+
if (this.actionsList)
|
598
|
+
return hardList.concat(this.actionsList);
|
599
|
+
return hardList;
|
573
600
|
}
|
574
601
|
getTopTaskBarId() {
|
575
602
|
var _a;
|
@@ -614,9 +641,11 @@ export class SnkSimpleCrud {
|
|
614
641
|
window.removeEventListener("keydown", this._keyDownHandler);
|
615
642
|
}
|
616
643
|
gridConfigChangeHandler(evt) {
|
644
|
+
evt.stopPropagation();
|
645
|
+
if (!this.configName)
|
646
|
+
return;
|
617
647
|
const config = evt.detail;
|
618
648
|
ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
|
619
|
-
evt.stopPropagation();
|
620
649
|
}
|
621
650
|
modalConfigChangeHandler(evt) {
|
622
651
|
const config = evt.detail;
|
@@ -653,9 +682,6 @@ export class SnkSimpleCrud {
|
|
653
682
|
closeGridConfig() {
|
654
683
|
this._showPopUpGridConfig = false;
|
655
684
|
}
|
656
|
-
closeFormConfig() {
|
657
|
-
this._showFormConfig = false;
|
658
|
-
}
|
659
685
|
getPageSize() {
|
660
686
|
if (this.mode === SIMPLE_CRUD_MODE.IN_MEMORY) {
|
661
687
|
return 0;
|
@@ -665,10 +691,6 @@ export class SnkSimpleCrud {
|
|
665
691
|
}
|
666
692
|
return this.pageSize;
|
667
693
|
}
|
668
|
-
//No momento não daremos suporte para configuração de formulário quando houver formLegacyConfigName
|
669
|
-
handleShowFormConfig() {
|
670
|
-
return this._showFormConfig && !this.formLegacyConfigName;
|
671
|
-
}
|
672
694
|
resolveResourceID() {
|
673
695
|
return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
|
674
696
|
}
|
@@ -681,22 +703,57 @@ export class SnkSimpleCrud {
|
|
681
703
|
return configFromManager;
|
682
704
|
}
|
683
705
|
updateFormConfig() {
|
684
|
-
|
706
|
+
let newConfig = this.formConfig;
|
707
|
+
if (this.formLegacyConfigName == undefined) {
|
708
|
+
newConfig = Object.assign(Object.assign({}, this.formConfig), { fields: this.dataUnit.metadata.fields });
|
709
|
+
}
|
685
710
|
this.setFormConfig(newConfig, true);
|
686
711
|
if (this._formConfigManager == undefined) {
|
687
712
|
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
688
713
|
}
|
689
714
|
this._formConfigManager.setConfig(this.formConfig);
|
690
715
|
}
|
716
|
+
handleDataUnitOnInsertionMode() {
|
717
|
+
if (this.enableGridInsert)
|
718
|
+
return;
|
719
|
+
this.goToView(VIEW_MODE.FORM);
|
720
|
+
}
|
721
|
+
async initKeyboardManager() {
|
722
|
+
var _a;
|
723
|
+
const keyboardManager = new KeyboardManager();
|
724
|
+
const dataUnit = this.dataUnit || await ((_a = this._snkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
|
725
|
+
if (dataUnit == undefined) {
|
726
|
+
return;
|
727
|
+
}
|
728
|
+
keyboardManager
|
729
|
+
.bind("F7", () => dataUnit.saveData(), { description: "Salva os dados.", element: this._element })
|
730
|
+
.bind("F8", dataUnit.addRecord.bind(dataUnit), { description: "Adiciona um novo registro.", element: this._element })
|
731
|
+
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
732
|
+
.bind("Escape", () => {
|
733
|
+
if (dataUnit.isDirty()) {
|
734
|
+
dataUnit.cancelEdition();
|
735
|
+
}
|
736
|
+
}, {
|
737
|
+
debounceTime: 1000,
|
738
|
+
description: "Cancela uma ação.", element: this._element
|
739
|
+
});
|
740
|
+
}
|
741
|
+
async handleFormConfigSaved() {
|
742
|
+
await this.loadFormConfig(true, true);
|
743
|
+
}
|
744
|
+
renderTaskbarContent() {
|
745
|
+
var _a;
|
746
|
+
return (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow-xsmall'} ez-padding--small`, dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
747
|
+
}
|
691
748
|
/* istanbul ignore next */
|
692
749
|
render() {
|
693
750
|
var _a;
|
694
751
|
if (this.dataUnit == undefined) {
|
695
752
|
return;
|
696
753
|
}
|
697
|
-
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode:
|
754
|
+
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: `ez-box ${this.outlineMode ? 'ez-box--outline' : 'ez-box--shadow'} simple-crud__container-section` }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
698
755
|
? undefined
|
699
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large
|
756
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this.enableContinuousInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp, outlineMode: this.outlineMode }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), h("snk-simple-form-config", { ref: (ref) => this._snkSimpleFormConfig = ref, dataUnit: this.dataUnit, onSnkConfigSaved: this.handleFormConfigSaved.bind(this), configName: (_a = this.formLegacyConfigName) !== null && _a !== void 0 ? _a : this.configName })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
700
757
|
}
|
701
758
|
static get is() { return "snk-simple-crud"; }
|
702
759
|
static get encapsulation() { return "scoped"; }
|
@@ -712,6 +769,42 @@ export class SnkSimpleCrud {
|
|
712
769
|
}
|
713
770
|
static get properties() {
|
714
771
|
return {
|
772
|
+
"enableLockManagerLoadingComp": {
|
773
|
+
"type": "boolean",
|
774
|
+
"mutable": false,
|
775
|
+
"complexType": {
|
776
|
+
"original": "boolean",
|
777
|
+
"resolved": "boolean",
|
778
|
+
"references": {}
|
779
|
+
},
|
780
|
+
"required": false,
|
781
|
+
"optional": true,
|
782
|
+
"docs": {
|
783
|
+
"tags": [],
|
784
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
785
|
+
},
|
786
|
+
"attribute": "enable-lock-manager-loading-comp",
|
787
|
+
"reflect": false,
|
788
|
+
"defaultValue": "false"
|
789
|
+
},
|
790
|
+
"enableLockManagerTaskbarClick": {
|
791
|
+
"type": "boolean",
|
792
|
+
"mutable": false,
|
793
|
+
"complexType": {
|
794
|
+
"original": "boolean",
|
795
|
+
"resolved": "boolean",
|
796
|
+
"references": {}
|
797
|
+
},
|
798
|
+
"required": false,
|
799
|
+
"optional": true,
|
800
|
+
"docs": {
|
801
|
+
"tags": [],
|
802
|
+
"text": "Ativa o gerenciamento de locks na grade pela Taskbar."
|
803
|
+
},
|
804
|
+
"attribute": "enable-lock-manager-taskbar-click",
|
805
|
+
"reflect": false,
|
806
|
+
"defaultValue": "false"
|
807
|
+
},
|
715
808
|
"dataState": {
|
716
809
|
"type": "unknown",
|
717
810
|
"mutable": false,
|
@@ -832,6 +925,24 @@ export class SnkSimpleCrud {
|
|
832
925
|
"text": ""
|
833
926
|
}
|
834
927
|
},
|
928
|
+
"enableContinuousInsert": {
|
929
|
+
"type": "boolean",
|
930
|
+
"mutable": true,
|
931
|
+
"complexType": {
|
932
|
+
"original": "boolean",
|
933
|
+
"resolved": "boolean",
|
934
|
+
"references": {}
|
935
|
+
},
|
936
|
+
"required": false,
|
937
|
+
"optional": false,
|
938
|
+
"docs": {
|
939
|
+
"tags": [],
|
940
|
+
"text": ""
|
941
|
+
},
|
942
|
+
"attribute": "enable-continuous-insert",
|
943
|
+
"reflect": false,
|
944
|
+
"defaultValue": "false"
|
945
|
+
},
|
835
946
|
"multipleSelection": {
|
836
947
|
"type": "boolean",
|
837
948
|
"mutable": false,
|
@@ -902,6 +1013,24 @@ export class SnkSimpleCrud {
|
|
902
1013
|
"attribute": "resource-i-d",
|
903
1014
|
"reflect": false
|
904
1015
|
},
|
1016
|
+
"enableGridInsert": {
|
1017
|
+
"type": "boolean",
|
1018
|
+
"mutable": false,
|
1019
|
+
"complexType": {
|
1020
|
+
"original": "boolean",
|
1021
|
+
"resolved": "boolean",
|
1022
|
+
"references": {}
|
1023
|
+
},
|
1024
|
+
"required": false,
|
1025
|
+
"optional": true,
|
1026
|
+
"docs": {
|
1027
|
+
"tags": [],
|
1028
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
1029
|
+
},
|
1030
|
+
"attribute": "enable-grid-insert",
|
1031
|
+
"reflect": false,
|
1032
|
+
"defaultValue": "false"
|
1033
|
+
},
|
905
1034
|
"taskbarManager": {
|
906
1035
|
"type": "unknown",
|
907
1036
|
"mutable": false,
|
@@ -1120,13 +1249,30 @@ export class SnkSimpleCrud {
|
|
1120
1249
|
},
|
1121
1250
|
"attribute": "auto-load",
|
1122
1251
|
"reflect": false
|
1252
|
+
},
|
1253
|
+
"outlineMode": {
|
1254
|
+
"type": "boolean",
|
1255
|
+
"mutable": false,
|
1256
|
+
"complexType": {
|
1257
|
+
"original": "boolean",
|
1258
|
+
"resolved": "boolean",
|
1259
|
+
"references": {}
|
1260
|
+
},
|
1261
|
+
"required": false,
|
1262
|
+
"optional": true,
|
1263
|
+
"docs": {
|
1264
|
+
"tags": [],
|
1265
|
+
"text": "Altera visualmente as sombras e bordas do componente\nQuando false, aplica o padr\u00E3o de sombras ao componente (Utilizar quando for o elemento principal do layout)\nQuando true, aplica o padr\u00E3o de outline ao componente (Utilizar quando estiver contido em outro elemento como um painel ou pop-up)"
|
1266
|
+
},
|
1267
|
+
"attribute": "outline-mode",
|
1268
|
+
"reflect": false,
|
1269
|
+
"defaultValue": "false"
|
1123
1270
|
}
|
1124
1271
|
};
|
1125
1272
|
}
|
1126
1273
|
static get states() {
|
1127
1274
|
return {
|
1128
1275
|
"_showPopUpGridConfig": {},
|
1129
|
-
"_showFormConfig": {},
|
1130
1276
|
"_currentViewMode": {},
|
1131
1277
|
"_config": {},
|
1132
1278
|
"_fieldToGetFocus": {},
|
@@ -0,0 +1,22 @@
|
|
1
|
+
:host {
|
2
|
+
display: block;
|
3
|
+
}
|
4
|
+
|
5
|
+
.config-container {
|
6
|
+
display: flex;
|
7
|
+
flex-direction: column;
|
8
|
+
align-items: center;
|
9
|
+
justify-content: space-between;
|
10
|
+
}
|
11
|
+
|
12
|
+
.config-lists {
|
13
|
+
margin-bottom: 12px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.config-actions {
|
17
|
+
display: flex;
|
18
|
+
flex-direction: row;
|
19
|
+
justify-content: flex-end;
|
20
|
+
width: 100%;
|
21
|
+
gap: 12px;
|
22
|
+
}
|
@@ -0,0 +1,181 @@
|
|
1
|
+
import { h } from '@stencil/core';
|
2
|
+
import { FormConfigFetcher } from '../../lib';
|
3
|
+
export class SnkSimpleFormConfig {
|
4
|
+
constructor() {
|
5
|
+
this._formConfigFetcher = new FormConfigFetcher();
|
6
|
+
this.fieldsToSave = [];
|
7
|
+
this.dataUnit = undefined;
|
8
|
+
this.configName = undefined;
|
9
|
+
this.avaliableFields = [];
|
10
|
+
this.selectedFields = [];
|
11
|
+
}
|
12
|
+
/**
|
13
|
+
* Responsável por abrir o configurador.
|
14
|
+
*/
|
15
|
+
async show() {
|
16
|
+
var _a;
|
17
|
+
await ((_a = this.ezDoubleListRef) === null || _a === void 0 ? void 0 : _a.resetSelectedLists());
|
18
|
+
await this.initializeFormConfig();
|
19
|
+
this.ezPopupRef.opened = true;
|
20
|
+
}
|
21
|
+
;
|
22
|
+
async initializeFormConfig() {
|
23
|
+
if (!this.configName)
|
24
|
+
return;
|
25
|
+
const allFields = this.getAllVisibleFieldsFromDataUnit();
|
26
|
+
const displayedFieldNameList = await this.getConfig();
|
27
|
+
//Quando não retorna dados, é por quê não existe configuração do usuário salva.
|
28
|
+
if (displayedFieldNameList.length === 0) {
|
29
|
+
this.avaliableFields = [];
|
30
|
+
this.selectedFields = [...allFields];
|
31
|
+
this.fieldsToSave = [...this.selectedFields];
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
const selectedFieldsAux = this.sortDisplayedFields(displayedFieldNameList, allFields);
|
35
|
+
const avaliableFieldsAux = allFields.filter(field => !displayedFieldNameList.includes(field.id));
|
36
|
+
this.avaliableFields = [...avaliableFieldsAux];
|
37
|
+
this.selectedFields = [...selectedFieldsAux];
|
38
|
+
this.fieldsToSave = [...this.selectedFields];
|
39
|
+
}
|
40
|
+
async getConfig() {
|
41
|
+
const fieldList = await this._formConfigFetcher.fetchSimpleFormConfig(this.configName);
|
42
|
+
return [...this.removeDuplicates(fieldList)];
|
43
|
+
}
|
44
|
+
removeDuplicates(strings) {
|
45
|
+
return strings.filter((item, index) => strings.indexOf(item) === index);
|
46
|
+
}
|
47
|
+
sortDisplayedFields(displayedFieldNameList, allFields) {
|
48
|
+
const selectedFieldsAux = [];
|
49
|
+
//É preciso garantir a ordem na qual os campos vieram na resposta do fetchSimpleFormConfig.
|
50
|
+
displayedFieldNameList.forEach(fieldName => {
|
51
|
+
const field = allFields.find(field => field.id === fieldName);
|
52
|
+
if (!field)
|
53
|
+
return;
|
54
|
+
selectedFieldsAux.push(field);
|
55
|
+
});
|
56
|
+
return selectedFieldsAux;
|
57
|
+
}
|
58
|
+
getAllVisibleFieldsFromDataUnit() {
|
59
|
+
var _a, _b, _c;
|
60
|
+
const visibleFields = ((_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields) !== null && _c !== void 0 ? _c : []).filter(field => field.visible);
|
61
|
+
return visibleFields.map(field => {
|
62
|
+
return { id: field.name, label: field.label };
|
63
|
+
});
|
64
|
+
}
|
65
|
+
close() {
|
66
|
+
this.ezPopupRef.opened = false;
|
67
|
+
}
|
68
|
+
async handleResetConfigs() {
|
69
|
+
await this._formConfigFetcher.restoreFormConfig(this.configName);
|
70
|
+
await this.initializeFormConfig();
|
71
|
+
await this.handleSave();
|
72
|
+
}
|
73
|
+
handleCancel() {
|
74
|
+
this.close();
|
75
|
+
}
|
76
|
+
async handleSave() {
|
77
|
+
const saveList = this.fieldsToSave.map(field => field.id);
|
78
|
+
await this._formConfigFetcher.saveSimpleFormConfig(this.configName, saveList);
|
79
|
+
this.close();
|
80
|
+
this.snkConfigSaved.emit();
|
81
|
+
}
|
82
|
+
render() {
|
83
|
+
return (h("ez-popup", { ref: (ref) => this.ezPopupRef = ref, heightMode: 'auto', size: 'auto', ezTitle: 'Configurar formul\u00E1rio' }, h("div", { class: 'config-container' }, h("div", { class: 'config-lists' }, h("ez-double-list", { ref: (ref) => this.ezDoubleListRef = ref, leftList: this.avaliableFields, leftTitle: 'Campos disponíveis', rightList: this.selectedFields, rightTitle: 'Campos selecionados', onEzRightListChanged: ({ detail }) => this.fieldsToSave = [...detail], entityLabel: 'campo', entityLabelPlural: 'campos' })), h("div", { class: 'config-actions' }, h("ez-button", { label: 'Restaurar', onClick: this.handleResetConfigs.bind(this), size: 'small' }), h("ez-button", { label: 'Cancelar', onClick: this.handleCancel.bind(this), size: 'small' }), h("ez-button", { label: 'Salvar', class: 'ez-button--primary', onClick: this.handleSave.bind(this), size: 'small' })))));
|
84
|
+
}
|
85
|
+
static get is() { return "snk-simple-form-config"; }
|
86
|
+
static get originalStyleUrls() {
|
87
|
+
return {
|
88
|
+
"$": ["snk-simple-form-config.css"]
|
89
|
+
};
|
90
|
+
}
|
91
|
+
static get styleUrls() {
|
92
|
+
return {
|
93
|
+
"$": ["snk-simple-form-config.css"]
|
94
|
+
};
|
95
|
+
}
|
96
|
+
static get properties() {
|
97
|
+
return {
|
98
|
+
"dataUnit": {
|
99
|
+
"type": "unknown",
|
100
|
+
"mutable": false,
|
101
|
+
"complexType": {
|
102
|
+
"original": "DataUnit",
|
103
|
+
"resolved": "DataUnit",
|
104
|
+
"references": {
|
105
|
+
"DataUnit": {
|
106
|
+
"location": "import",
|
107
|
+
"path": "@sankhyalabs/core"
|
108
|
+
}
|
109
|
+
}
|
110
|
+
},
|
111
|
+
"required": false,
|
112
|
+
"optional": false,
|
113
|
+
"docs": {
|
114
|
+
"tags": [],
|
115
|
+
"text": "Data unit respons\u00E1vel pelos campos dispon\u00EDveis"
|
116
|
+
}
|
117
|
+
},
|
118
|
+
"configName": {
|
119
|
+
"type": "string",
|
120
|
+
"mutable": false,
|
121
|
+
"complexType": {
|
122
|
+
"original": "string",
|
123
|
+
"resolved": "string",
|
124
|
+
"references": {}
|
125
|
+
},
|
126
|
+
"required": false,
|
127
|
+
"optional": false,
|
128
|
+
"docs": {
|
129
|
+
"tags": [],
|
130
|
+
"text": "Chave que representa a configura\u00E7\u00E3o do formul\u00E1rio"
|
131
|
+
},
|
132
|
+
"attribute": "config-name",
|
133
|
+
"reflect": false
|
134
|
+
}
|
135
|
+
};
|
136
|
+
}
|
137
|
+
static get states() {
|
138
|
+
return {
|
139
|
+
"avaliableFields": {},
|
140
|
+
"selectedFields": {}
|
141
|
+
};
|
142
|
+
}
|
143
|
+
static get events() {
|
144
|
+
return [{
|
145
|
+
"method": "snkConfigSaved",
|
146
|
+
"name": "snkConfigSaved",
|
147
|
+
"bubbles": true,
|
148
|
+
"cancelable": true,
|
149
|
+
"composed": true,
|
150
|
+
"docs": {
|
151
|
+
"tags": [],
|
152
|
+
"text": ""
|
153
|
+
},
|
154
|
+
"complexType": {
|
155
|
+
"original": "void",
|
156
|
+
"resolved": "void",
|
157
|
+
"references": {}
|
158
|
+
}
|
159
|
+
}];
|
160
|
+
}
|
161
|
+
static get methods() {
|
162
|
+
return {
|
163
|
+
"show": {
|
164
|
+
"complexType": {
|
165
|
+
"signature": "() => Promise<void>",
|
166
|
+
"parameters": [],
|
167
|
+
"references": {
|
168
|
+
"Promise": {
|
169
|
+
"location": "global"
|
170
|
+
}
|
171
|
+
},
|
172
|
+
"return": "Promise<void>"
|
173
|
+
},
|
174
|
+
"docs": {
|
175
|
+
"text": "Respons\u00E1vel por abrir o configurador.",
|
176
|
+
"tags": []
|
177
|
+
}
|
178
|
+
}
|
179
|
+
};
|
180
|
+
}
|
181
|
+
}
|
@@ -29,12 +29,16 @@ export default class TaskbarProcessor {
|
|
29
29
|
});
|
30
30
|
}
|
31
31
|
getButtonsArray(taskbarId, taskbarManager, dataState) {
|
32
|
-
const defaults = this.
|
32
|
+
const defaults = this.getButtonsFromKey(taskbarId);
|
33
33
|
if (taskbarManager) {
|
34
34
|
return taskbarManager.getButtons(taskbarId, dataState, [...defaults]);
|
35
35
|
}
|
36
36
|
return defaults;
|
37
37
|
}
|
38
|
+
getButtonsFromKey(taskbarId) {
|
39
|
+
const btnsValue = this._defaultButtons[taskbarId];
|
40
|
+
return typeof btnsValue === 'function' ? btnsValue() : btnsValue;
|
41
|
+
}
|
38
42
|
isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabled) {
|
39
43
|
const originalValue = disabled.includes(buttonName) ? false : true;
|
40
44
|
if (taskbarManager && taskbarManager.isEnabled) {
|