@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
@@ -3,17 +3,377 @@
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
|
-
const Sortable = require('./Sortable-fb1c4cbb.js');
|
7
6
|
const core = require('@sankhyalabs/core');
|
7
|
+
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
9
|
-
const constants = require('./constants-
|
10
|
-
const
|
9
|
+
const constants = require('./constants-241934b3.js');
|
10
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-c11d8468.js');
|
11
|
+
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
12
|
+
const Sortable = require('./Sortable-fb1c4cbb.js');
|
13
|
+
const formConfigFetcher = require('./form-config-fetcher-90126e4c.js');
|
11
14
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
12
|
-
require('./
|
15
|
+
require('./ConfigStorage-d024aec8.js');
|
16
|
+
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
|
+
require('./DataFetcher-65879b2c.js');
|
13
18
|
require('./PrintUtils-bcaeb82f.js');
|
14
19
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
20
|
|
16
|
-
const
|
21
|
+
const snkConfigOptionsCss = ".sc-snk-config-options-h{--snk-config-options--border:2px solid var(--color--secondary-200, #D2D3DA);width:100%;border-radius:15px;border:var(--snk-config-options--border)}.config-options__switch-row.sc-snk-config-options{margin-top:-30px}";
|
22
|
+
|
23
|
+
const SnkConfigOptions = class {
|
24
|
+
constructor(hostRef) {
|
25
|
+
index.registerInstance(this, hostRef);
|
26
|
+
this.configOptionsChanged = index.createEvent(this, "configOptionsChanged", 7);
|
27
|
+
this._defaultType = undefined;
|
28
|
+
this.fieldConfig = {};
|
29
|
+
this.idConfig = undefined;
|
30
|
+
this.dataUnit = undefined;
|
31
|
+
this.messagesBuilder = undefined;
|
32
|
+
}
|
33
|
+
onConfigDefault(optionSelected) {
|
34
|
+
if (optionSelected != undefined) {
|
35
|
+
this._defaultType = optionSelected;
|
36
|
+
this.fieldConfig.defaultValue = {
|
37
|
+
type: this._defaultType
|
38
|
+
};
|
39
|
+
this.configOptionsChanged.emit(this.fieldConfig);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
buildOptions() {
|
43
|
+
var _a, _b, _c;
|
44
|
+
let interfaceField = (_c = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.name)) === null || _c === void 0 ? void 0 : _c.userInterface;
|
45
|
+
if (interfaceField === core.UserInterface.SEARCH) {
|
46
|
+
interfaceField = core.UserInterface.INTEGERNUMBER;
|
47
|
+
}
|
48
|
+
return constants.VARS_BY_TYPE.UserInterface[interfaceField];
|
49
|
+
}
|
50
|
+
enabledValueDefault() {
|
51
|
+
var _a, _b, _c;
|
52
|
+
const field = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.name);
|
53
|
+
const allowDefault = (_c = field === null || field === void 0 ? void 0 : field.properties) === null || _c === void 0 ? void 0 : _c.allowDefault;
|
54
|
+
const hasVariableVar = constants.VARS_BY_TYPE.UserInterface.hasOwnProperty(field === null || field === void 0 ? void 0 : field.userInterface)
|
55
|
+
|| (field === null || field === void 0 ? void 0 : field.userInterface) === core.UserInterface.SEARCH;
|
56
|
+
if ((allowDefault == undefined || allowDefault === "true") && hasVariableVar) {
|
57
|
+
return true;
|
58
|
+
}
|
59
|
+
return false;
|
60
|
+
}
|
61
|
+
isAllowDefault() {
|
62
|
+
var _a, _b;
|
63
|
+
const allowDefault = (_b = (_a = this._fieldProperties) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.allowDefault;
|
64
|
+
if (allowDefault == undefined) {
|
65
|
+
return true;
|
66
|
+
}
|
67
|
+
return allowDefault === "true";
|
68
|
+
}
|
69
|
+
loadDefaultValue() {
|
70
|
+
var _a;
|
71
|
+
if (this.fieldConfig == undefined) {
|
72
|
+
this._defaultType = constants.DEFAULT_TYPE.fixed;
|
73
|
+
this.fieldConfig = {
|
74
|
+
defaultValue: {
|
75
|
+
type: this._defaultType
|
76
|
+
}
|
77
|
+
};
|
78
|
+
}
|
79
|
+
else if (((_a = this.fieldConfig.defaultValue) === null || _a === void 0 ? void 0 : _a.type) == undefined) {
|
80
|
+
this._defaultType = constants.DEFAULT_TYPE.fixed;
|
81
|
+
this.fieldConfig.defaultValue = {
|
82
|
+
type: this._defaultType
|
83
|
+
};
|
84
|
+
}
|
85
|
+
else {
|
86
|
+
this._defaultType = this.fieldConfig.defaultValue.type;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
getFieldProperties(field) {
|
90
|
+
var _a;
|
91
|
+
if (field != undefined) {
|
92
|
+
return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(field);
|
93
|
+
}
|
94
|
+
}
|
95
|
+
getMessage(key, params) {
|
96
|
+
return this.messagesBuilder.getMessage(key, params);
|
97
|
+
}
|
98
|
+
getDefaultType() {
|
99
|
+
var _a;
|
100
|
+
return (_a = this.fieldConfig.defaultValue.type) !== null && _a !== void 0 ? _a : constants.DEFAULT_TYPE.fixed;
|
101
|
+
}
|
102
|
+
getEnabledByProperty(attribName, propertyName) {
|
103
|
+
const fieldDescriptor = this._fieldProperties;
|
104
|
+
if (fieldDescriptor == undefined) {
|
105
|
+
return true;
|
106
|
+
}
|
107
|
+
const fieldProperties = fieldDescriptor.properties || {};
|
108
|
+
return fieldProperties.hasOwnProperty(propertyName) ? fieldProperties[propertyName] !== "S" : fieldDescriptor[attribName] !== true;
|
109
|
+
}
|
110
|
+
getValueByProperty(property) {
|
111
|
+
const properties = this._fieldProperties;
|
112
|
+
if (properties != undefined && properties[property] === true) {
|
113
|
+
return true;
|
114
|
+
}
|
115
|
+
return this.fieldConfig[property];
|
116
|
+
}
|
117
|
+
getValidatedValue(fieldValue) {
|
118
|
+
var _a, _b;
|
119
|
+
if (fieldValue == undefined) {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
const field = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField((_b = this.fieldConfig) === null || _b === void 0 ? void 0 : _b.name);
|
123
|
+
const dataType = field === null || field === void 0 ? void 0 : field.dataType;
|
124
|
+
if (dataType == undefined) {
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
const value = (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.waitmessage) != undefined ? undefined :
|
128
|
+
dataType !== DataType.DataType.OBJECT && dataType !== DataType.DataType.DATE
|
129
|
+
&& typeof fieldValue === "object"
|
130
|
+
? fieldValue.value
|
131
|
+
: fieldValue;
|
132
|
+
return dataType === DataType.DataType.OBJECT ? JSON.stringify(value) : value;
|
133
|
+
}
|
134
|
+
buildInputDefault({ value, enabled, label, name, required, userInterface }, properties = undefined, mode = undefined) {
|
135
|
+
let options;
|
136
|
+
let precision = 0;
|
137
|
+
let prettyPrecision = 0;
|
138
|
+
const TagName = userInterface == undefined || constants.TAGS_BY_TYPE[userInterface] == undefined
|
139
|
+
? constants.TAGS_BY_TYPE.DEFAULT
|
140
|
+
: constants.TAGS_BY_TYPE[userInterface];
|
141
|
+
if (userInterface === core.UserInterface.OPTIONSELECTOR) {
|
142
|
+
const prop = properties === null || properties === void 0 ? void 0 : properties.options;
|
143
|
+
if (typeof prop === "string") {
|
144
|
+
const parsed = core.ObjectUtils.stringToObject(prop);
|
145
|
+
options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
|
146
|
+
}
|
147
|
+
else {
|
148
|
+
options = prop;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
else if (userInterface === core.UserInterface.DECIMALNUMBER) {
|
152
|
+
precision = Number((properties === null || properties === void 0 ? void 0 : properties.precision) || 2);
|
153
|
+
prettyPrecision = Number((properties === null || properties === void 0 ? void 0 : properties.prettyPrecision) || precision);
|
154
|
+
}
|
155
|
+
return index.h(TagName, Object.assign({ value: value, enabled: enabled, label: label, "data-field-name": name, key: name, onEzChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail) }, (this.getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode))));
|
156
|
+
}
|
157
|
+
getConditionalAttributes(userInterface, required, options, precision, prettyPrecision, mode) {
|
158
|
+
switch (userInterface) {
|
159
|
+
case core.UserInterface.SEARCH:
|
160
|
+
return {
|
161
|
+
suppressEmptyOption: required,
|
162
|
+
optionLoader: (searchArgument) => this.onSearch(searchArgument)
|
163
|
+
};
|
164
|
+
case core.UserInterface.OPTIONSELECTOR:
|
165
|
+
return {
|
166
|
+
suppressEmptyOption: required,
|
167
|
+
options
|
168
|
+
};
|
169
|
+
case core.UserInterface.CHECKBOX:
|
170
|
+
case core.UserInterface.SWITCH:
|
171
|
+
return {
|
172
|
+
mode
|
173
|
+
};
|
174
|
+
case core.UserInterface.INTEGERNUMBER:
|
175
|
+
case core.UserInterface.DECIMALNUMBER:
|
176
|
+
return {
|
177
|
+
precision,
|
178
|
+
prettyPrecision,
|
179
|
+
onEzStartChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail)
|
180
|
+
};
|
181
|
+
case core.UserInterface.DATE:
|
182
|
+
case core.UserInterface.DATETIME:
|
183
|
+
case core.UserInterface.TIME:
|
184
|
+
return {
|
185
|
+
onEzStartChange: (evt) => this.onChange(evt === null || evt === void 0 ? void 0 : evt.detail)
|
186
|
+
};
|
187
|
+
default:
|
188
|
+
return {};
|
189
|
+
}
|
190
|
+
}
|
191
|
+
onChange(fieldValue) {
|
192
|
+
this.fieldConfig.defaultValue.value = this.getValidatedValue(fieldValue);
|
193
|
+
this.configOptionsChanged.emit(this.fieldConfig);
|
194
|
+
}
|
195
|
+
onSearch(searchArgument) {
|
196
|
+
if (this._application != undefined && this.fieldConfig != undefined) {
|
197
|
+
return this._application.executeSearch(searchArgument, this.fieldConfig.name, this.dataUnit);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
buildField(descriptor, config) {
|
201
|
+
const { name, label, readOnly, required, defaultValue } = config;
|
202
|
+
const { userInterface, properties } = descriptor;
|
203
|
+
const allowDefault = properties === null || properties === void 0 ? void 0 : properties.allowDefault;
|
204
|
+
let value;
|
205
|
+
let enabled = core.StringUtils.getBooleanValue(allowDefault, !readOnly);
|
206
|
+
if (userInterface === core.UserInterface.FILE) {
|
207
|
+
enabled = false;
|
208
|
+
}
|
209
|
+
if (enabled) {
|
210
|
+
value = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.value;
|
211
|
+
if (value != undefined) {
|
212
|
+
value = DataType.getConvertedValue(descriptor === null || descriptor === void 0 ? void 0 : descriptor.dataType, value);
|
213
|
+
}
|
214
|
+
}
|
215
|
+
const configField = { value, enabled, label, name, required, userInterface };
|
216
|
+
switch (userInterface) {
|
217
|
+
case core.UserInterface.SWITCH:
|
218
|
+
return this.buildInputDefault(configField, undefined, utils.CheckMode.SWITCH);
|
219
|
+
case core.UserInterface.CHECKBOX:
|
220
|
+
return this.buildInputDefault(configField, undefined, utils.CheckMode.REGULAR);
|
221
|
+
case core.UserInterface.OPTIONSELECTOR:
|
222
|
+
case core.UserInterface.DECIMALNUMBER:
|
223
|
+
return this.buildInputDefault(configField, properties);
|
224
|
+
default:
|
225
|
+
return this.buildInputDefault(configField);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
componentWillLoad() {
|
229
|
+
var _a;
|
230
|
+
this.loadDefaultValue();
|
231
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
232
|
+
this._fieldProperties = this.getFieldProperties((_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.name);
|
233
|
+
}
|
234
|
+
componentDidLoad() {
|
235
|
+
core.ElementIDUtils.addIDInfo(this._element, this.fieldConfig.name);
|
236
|
+
}
|
237
|
+
render() {
|
238
|
+
var _a, _b;
|
239
|
+
return (index.h(index.Host, null, index.h("div", { id: this.idConfig }, index.h("div", { class: "ez-row ez-padding--medium" }, index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-text-input", { label: this.getMessage("snkConfigOptions.label.nameField"), value: (_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.label, onEzChange: (evt) => { this.fieldConfig.label = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-combo-box", { label: this.getMessage("snkConfigOptions.label.typeValueDefault"), suppressEmptyOption: true, enabled: this.enabledValueDefault(), onEzChange: (evt) => { var _a; return this.onConfigDefault((_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value); }, value: this.getDefaultType() }, index.h("option", { value: constants.DEFAULT_TYPE.fixed }, this.getMessage("snkConfigOptions.options.valueFixed")), index.h("option", { value: constants.DEFAULT_TYPE.variable }, this.getMessage("snkConfigOptions.options.variable")))), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, this._defaultType === constants.DEFAULT_TYPE.variable ?
|
240
|
+
index.h("ez-combo-box", { label: this.getMessage("snkConfigOptions.label.valueDefault"), enabled: this.isAllowDefault(), onEzChange: (evt) => { var _a; this.fieldConfig.defaultValue.value = (_a = evt.detail) === null || _a === void 0 ? void 0 : _a.value; this.configOptionsChanged.emit(this.fieldConfig); }, value: this.fieldConfig.defaultValue.value, options: this.buildOptions() })
|
241
|
+
:
|
242
|
+
((_b = this._fieldProperties) === null || _b === void 0 ? void 0 : _b.userInterface) &&
|
243
|
+
this.buildField(this._fieldProperties, this.fieldConfig))), index.h("div", { class: "ez-row ez-padding--medium config-options__switch-row" }, index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-check", { mode: utils.CheckMode.SWITCH, label: this.getMessage("snkConfigOptions.label.clearDuplicate"), value: this.fieldConfig.cleanOnCopy, onEzChange: (evt) => { this.fieldConfig.cleanOnCopy = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-check", { mode: utils.CheckMode.SWITCH, label: this.getMessage("snkConfigOptions.label.requiredField"), enabled: this.getEnabledByProperty("required", "systemRequired"), value: this.getValueByProperty("required"), onEzChange: (evt) => { this.fieldConfig.required = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } })), index.h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding--small" }, index.h("ez-check", { mode: utils.CheckMode.SWITCH, label: this.getMessage("snkConfigOptions.label.protectedField"), enabled: this.getEnabledByProperty("readOnly", "systemReadOnly"), value: this.getValueByProperty("readOnly"), onEzChange: (evt) => { this.fieldConfig.readOnly = evt.detail; this.configOptionsChanged.emit(this.fieldConfig); } }))))));
|
244
|
+
}
|
245
|
+
get _element() { return index.getElement(this); }
|
246
|
+
};
|
247
|
+
SnkConfigOptions.style = snkConfigOptionsCss;
|
248
|
+
|
249
|
+
const snkFormCss = ".sc-snk-form-h{--snk-form__header--min-height:94px;display:block}.snk-form__form--hidden.sc-snk-form{display:none}";
|
250
|
+
|
251
|
+
const SnkForm = class {
|
252
|
+
constructor(hostRef) {
|
253
|
+
index.registerInstance(this, hostRef);
|
254
|
+
this.exit = index.createEvent(this, "exit", 7);
|
255
|
+
this.actionClick = index.createEvent(this, "actionClick", 7);
|
256
|
+
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
257
|
+
this._customEditors = new Map();
|
258
|
+
this._dataUnit = undefined;
|
259
|
+
this._dataState = undefined;
|
260
|
+
this._showFormConfig = false;
|
261
|
+
this._configManager = undefined;
|
262
|
+
this.configName = undefined;
|
263
|
+
this.recordsValidator = undefined;
|
264
|
+
this.messagesBuilder = undefined;
|
265
|
+
this.formLegacyConfigName = undefined;
|
266
|
+
this.resourceID = undefined;
|
267
|
+
}
|
268
|
+
/**
|
269
|
+
* Exibe a janela de configurações do formulário.
|
270
|
+
*/
|
271
|
+
async showConfig() {
|
272
|
+
this._showFormConfig = true;
|
273
|
+
}
|
274
|
+
/**
|
275
|
+
* Fecha a janela de configurações do formulário.
|
276
|
+
*/
|
277
|
+
async hideConfig() {
|
278
|
+
this._showFormConfig = false;
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* Registra um editor customizado para campos da grade e formulário.
|
282
|
+
*/
|
283
|
+
async addCustomEditor(fieldName, customEditor) {
|
284
|
+
if (this._form) {
|
285
|
+
this._form.addCustomEditor(fieldName, customEditor);
|
286
|
+
return;
|
287
|
+
}
|
288
|
+
const newCustomEditors = new Map(this._customEditors);
|
289
|
+
newCustomEditors.set(fieldName, customEditor);
|
290
|
+
this._customEditors = newCustomEditors;
|
291
|
+
}
|
292
|
+
/**
|
293
|
+
* Altera/adiciona uma propriedade nos metadados do campo.
|
294
|
+
*/
|
295
|
+
async setFieldProp(fieldName, propName, value) {
|
296
|
+
await this._form.setFieldProp(fieldName, propName, value);
|
297
|
+
}
|
298
|
+
closeConfig() {
|
299
|
+
this.hideConfig();
|
300
|
+
}
|
301
|
+
dataunitReady() {
|
302
|
+
const dataInfo = { dataUnit: this._dataUnit };
|
303
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
304
|
+
}
|
305
|
+
setCustomEditors() {
|
306
|
+
if (!this._form) {
|
307
|
+
return;
|
308
|
+
}
|
309
|
+
for (const [fieldName, customEditor] of this._customEditors) {
|
310
|
+
this._form.addCustomEditor(fieldName, customEditor);
|
311
|
+
this._customEditors.delete(fieldName);
|
312
|
+
}
|
313
|
+
}
|
314
|
+
async componentDidRender() {
|
315
|
+
this.setCustomEditors();
|
316
|
+
}
|
317
|
+
async componentWillLoad() {
|
318
|
+
let parent = this._element.parentElement;
|
319
|
+
while (parent) {
|
320
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
321
|
+
this._snkDataUnit = parent;
|
322
|
+
this._dataUnit = this._snkDataUnit.dataUnit;
|
323
|
+
this._dataState = this._snkDataUnit.dataState;
|
324
|
+
if (this._dataUnit) {
|
325
|
+
this.dataunitReady();
|
326
|
+
}
|
327
|
+
else {
|
328
|
+
this._snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
329
|
+
this._dataUnit = evt.detail;
|
330
|
+
});
|
331
|
+
}
|
332
|
+
this._snkDataUnit.addEventListener("dataStateChange", this.handleDataStateChange.bind(this));
|
333
|
+
break;
|
334
|
+
}
|
335
|
+
parent = parent.parentElement;
|
336
|
+
}
|
337
|
+
if (this.resourceID == undefined) {
|
338
|
+
this.resourceID = await ResourceIDUtils.ResourceIDUtils.getResourceID();
|
339
|
+
}
|
340
|
+
this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID, undefined, this._dataUnit);
|
341
|
+
this.addFormLegacyConfig();
|
342
|
+
await this._configManager.loadConfig();
|
343
|
+
}
|
344
|
+
async handleDataStateChange(evt) {
|
345
|
+
var _a;
|
346
|
+
this._dataState = evt.detail;
|
347
|
+
const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
|
348
|
+
for (const field of fieldsWithRmPrecision || []) {
|
349
|
+
if (!field) {
|
350
|
+
continue;
|
351
|
+
}
|
352
|
+
const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
|
353
|
+
if (!rmPrecision && rmPrecision !== 0) {
|
354
|
+
continue;
|
355
|
+
}
|
356
|
+
await this.setFieldProp(field, 'precision', rmPrecision);
|
357
|
+
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
358
|
+
}
|
359
|
+
}
|
360
|
+
addFormLegacyConfig() {
|
361
|
+
if (this.formLegacyConfigName) {
|
362
|
+
this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
|
363
|
+
}
|
364
|
+
}
|
365
|
+
render() {
|
366
|
+
if (!this._dataUnit || !this._dataState) {
|
367
|
+
return undefined;
|
368
|
+
}
|
369
|
+
return (index.h("section", null, index.h("div", { class: "ez-row" }, index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("ez-form", { ref: (ref) => this._form = ref, key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
370
|
+
index.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
|
371
|
+
}
|
372
|
+
get _element() { return index.getElement(this); }
|
373
|
+
};
|
374
|
+
SnkForm.style = snkFormCss;
|
375
|
+
|
376
|
+
const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config--z-index:var(--more-visible, 2);--snk-form-config--background-color:var(--background--xlight, #fff);--snk-form-config__icon--color:var(--text--disable, #AFB6C0);--snk-form-config__label-counter--font-weight:var(--text-weight--extra-small, 200);--snk-form-config__add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__add-group-container--background-color:var(--background--medium, #d2dce9);--snk-form-config__add-group-container--padding:var(--space--small, 6px);--snk-form-config__add-group-content--border:2px dashed var(--color-strokes, #DCE0E8);--snk-form-config__add-group-content--border-radius:var(--border--radius-small, 6px);--snk-form-config__add-group-label--padding:var(--space--large, 24px);--snk-form-config__btn-add-group--padding:var(--space--large, 24px) var(--space--medium, 12px) 0;--snk-form-config__btn-add-group-container--padding:var(--space--medium, 12px);--snk-form-config__btn-add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__btn-add-group-container--border:2px solid var(--color-strokes, #DCE0E8);--snk-form-config__btn-add-group-container--background-color:var(--background--body, #fafcff);display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--snk-form-config--z-index);background-color:var(--snk-form-config--background-color)}div.sc-snk-form-config:focus-visible,div.sc-snk-form-config:focus{outline:none}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--snk-form-config__icon--color)}.ez-box__label-counter.sc-snk-form-config{margin-top:-7px;font-weight:var(--snk-form-config__label-counter--font-weight)}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:var(--snk-form-config--background-color)}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--snk-form-config--z-index)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--snk-form-config__add-group-container--border-radius);background-color:var(--snk-form-config__add-group-container--background-color);padding:var(--snk-form-config__add-group-container--padding)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:var(--snk-form-config__add-group-content--border);border-radius:var(--snk-form-config__add-group-content--border-radius)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--snk-form-config__add-group-label--padding)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--snk-form-config__btn-add-group--padding)}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--snk-form-config__btn-add-group-container--padding);border-radius:var(--snk-form-config__btn-add-group-container--border-radius);border:var(--snk-form-config__btn-add-group-container--border);background-color:var(--snk-form-config__btn-add-group-container--background-color)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:var(--snk-form-config--background-color)}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -1)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -2)}}";
|
17
377
|
|
18
378
|
const CONTAINER_ID = {
|
19
379
|
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
@@ -51,6 +411,7 @@ const SnkFormConfig = class {
|
|
51
411
|
this.dataUnit = undefined;
|
52
412
|
this.configManager = undefined;
|
53
413
|
this.messagesBuilder = undefined;
|
414
|
+
this.ignoreReadOnlyFormFields = undefined;
|
54
415
|
}
|
55
416
|
observeConfigManager() {
|
56
417
|
this.loadConfig(this._sortableTimer);
|
@@ -80,7 +441,7 @@ const SnkFormConfig = class {
|
|
80
441
|
}
|
81
442
|
}
|
82
443
|
getConfig() {
|
83
|
-
let config = this.configManager.getConfig(this.dataUnit);
|
444
|
+
let config = this.configManager.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
|
84
445
|
if (config.fields && config.fields.length === 0) {
|
85
446
|
config = undefined;
|
86
447
|
}
|
@@ -205,7 +566,12 @@ const SnkFormConfig = class {
|
|
205
566
|
this._optionFormConfigChanged = false;
|
206
567
|
this.configManager.saveConfig(this.buildConfigToSave())
|
207
568
|
.then(savedConfig => {
|
569
|
+
var _a;
|
208
570
|
utils.ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
571
|
+
const userOption = (_a = this._formConfigOptions) === null || _a === void 0 ? void 0 : _a.find((config) => {
|
572
|
+
return config.origin === formConfigFetcher.UserConfigType.USER;
|
573
|
+
});
|
574
|
+
this.setFormConfig(userOption);
|
209
575
|
this.configChange.emit(savedConfig);
|
210
576
|
});
|
211
577
|
}
|
@@ -539,9 +905,12 @@ const SnkFormConfig = class {
|
|
539
905
|
switch (this._optionFormConfigSelected.origin) {
|
540
906
|
case formConfigFetcher.UserConfigType.DEFAULT:
|
541
907
|
config = await this.configManager.fetchDefaultConfig();
|
908
|
+
if (!config) {
|
909
|
+
config = this.configManager.getEmptyConfig();
|
910
|
+
}
|
542
911
|
break;
|
543
|
-
|
544
|
-
config =
|
912
|
+
default:
|
913
|
+
config = this.getConfig();
|
545
914
|
break;
|
546
915
|
}
|
547
916
|
if (config != undefined) {
|
@@ -680,7 +1049,7 @@ const SnkFormConfig = class {
|
|
680
1049
|
}
|
681
1050
|
}
|
682
1051
|
getLayoutFormConfig() {
|
683
|
-
var _a, _b;
|
1052
|
+
var _a, _b, _c;
|
684
1053
|
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined) {
|
685
1054
|
return;
|
686
1055
|
}
|
@@ -693,7 +1062,11 @@ const SnkFormConfig = class {
|
|
693
1062
|
if (hasField == undefined) {
|
694
1063
|
fields.push(field);
|
695
1064
|
const fieldMD = this.dataUnit.getField(field.name);
|
696
|
-
|
1065
|
+
/**
|
1066
|
+
* Quando um campo é ocultado pelo dev, mas queremos manter ele na config precisamos fazer essa tratativa.
|
1067
|
+
*/
|
1068
|
+
const visibleOnConfig = ((_b = fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.properties) === null || _b === void 0 ? void 0 : _b.visibleOnConfig) === true && (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.visible) === false;
|
1069
|
+
if ((fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.visible) || visibleOnConfig) {
|
697
1070
|
if (field.label == undefined || field.label === "") {
|
698
1071
|
field.label = fieldMD.label;
|
699
1072
|
}
|
@@ -709,7 +1082,7 @@ const SnkFormConfig = class {
|
|
709
1082
|
visible = configTabs[0].visible;
|
710
1083
|
}
|
711
1084
|
}
|
712
|
-
const tabLabel = ((
|
1085
|
+
const tabLabel = ((_c = field.tab) === null || _c === void 0 ? void 0 : _c.label) || field.tab;
|
713
1086
|
if (visible !== null) {
|
714
1087
|
tab = { tab: tabLabel, groups: [], visible };
|
715
1088
|
}
|
@@ -744,6 +1117,9 @@ const SnkFormConfig = class {
|
|
744
1117
|
if (layoutFormConfig == undefined) {
|
745
1118
|
layoutFormConfig = [];
|
746
1119
|
}
|
1120
|
+
if (this._formConfig.defaultConfiguration) {
|
1121
|
+
return layoutFormConfig;
|
1122
|
+
}
|
747
1123
|
return this._formConfig.tabs.map((tab) => {
|
748
1124
|
return layoutFormConfig.find(config => { var _a, _b; return ((_a = tab.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = config.tab) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })
|
749
1125
|
|| { tab: tab.label, groups: [], visible: tab.visible };
|
@@ -791,8 +1167,16 @@ const SnkFormConfig = class {
|
|
791
1167
|
for (const field of this._formConfig.fields) {
|
792
1168
|
fieldsFormConfig.push(field);
|
793
1169
|
}
|
794
|
-
const listFieldsAvailable = fieldsMetadata.filter(({ name: _nameFieldMetadado, visible: _visibleMetadado }) =>
|
795
|
-
|
1170
|
+
const listFieldsAvailable = fieldsMetadata.filter(({ name: _nameFieldMetadado, visible: _visibleMetadado, properties }) => {
|
1171
|
+
const hasCfg = fieldsFormConfig.some(({ name: _nameFieldForm }) => _nameFieldForm === _nameFieldMetadado);
|
1172
|
+
/**
|
1173
|
+
* Quando a visibilidade de um campo é alterada pelo dataunit, mas o desenvolvedor deseja que o mesmo continue
|
1174
|
+
* sendo apresentado no configurador, precisamos fazer essa tratativa, verificando se o campo não tem configuração
|
1175
|
+
*/
|
1176
|
+
if (!hasCfg && properties.visibleOnConfig === true && !_visibleMetadado)
|
1177
|
+
return properties.visibleOnConfig;
|
1178
|
+
return _visibleMetadado === true && hasCfg === false;
|
1179
|
+
});
|
796
1180
|
this._fieldsAvailable = listFieldsAvailable;
|
797
1181
|
this._listEnabledFields = listFieldsAvailable;
|
798
1182
|
if (((_b = this._filterFieldsAvailable) === null || _b === void 0 ? void 0 : _b.value) != undefined) {
|
@@ -999,4 +1383,6 @@ const SnkFormConfig = class {
|
|
999
1383
|
};
|
1000
1384
|
SnkFormConfig.style = snkFormConfigCss;
|
1001
1385
|
|
1386
|
+
exports.snk_config_options = SnkConfigOptions;
|
1387
|
+
exports.snk_form = SnkForm;
|
1002
1388
|
exports.snk_form_config = SnkFormConfig;
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const constants = require('./constants-
|
7
|
+
const constants = require('./constants-241934b3.js');
|
8
8
|
const AuthorizationConfig = require('./AuthorizationConfig-79ffae4b.js');
|
9
9
|
|
10
|
-
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--
|
10
|
+
const snkConfiguratorCss = ".sc-snk-configurator-h{--snk-configurator__button-close--padding-left:var(--space--medium, 12px);--snk-configurator__title--color:var(--title--primary, #2B3A54);--snk-configurator__title--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__title--font-size:var(--title--large, 20px);--snk-configurator__title--font-weight:var(--text-weight--extra-large, 700);--snk-configurator__subtitle--color:var(--title--primary, #2B3A54);--snk-configurator__subtitle--font-family:var(--font-pattern, \"Roboto\");--snk-configurator__subtitle--font-size:var(--text--medium, 14px);--snk-configurator__subtitle--font-weight:var(--text-weight--large, 600);--snk-configurator__scrollbar--color-default:var(--scrollbar--default, #626e82);--snk-configurator__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--snk-configurator__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--snk-configurator__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--snk-configurator__scrollbar--border-radius:var(--border--radius-small, 6px);--snk-configurator__scrollbar--width:var(--space--small, 6px)}.snk-configurator.sc-snk-configurator{display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}.snk-configurator__collsable-box-action.sc-snk-configurator{width:100%}.snk-configurator__action-buttons.sc-snk-configurator{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--space--medium)}.snk-configurator__outline.sc-snk-configurator{display:flex;flex-direction:column;gap:var(--space--small);margin-top:var(--space--small);margin-bottom:var(--space--large)}@media screen and (min-width: 480px){.snk-configurator.sc-snk-configurator{width:359px;max-width:359px}}.snk-configurator__button-config.sc-snk-configurator{--ez-button--min-width:100%}.snk-configurator__header.sc-snk-configurator{display:flex;justify-content:space-between;align-items:center;width:100%}.snk-configurator__title.sc-snk-configurator{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--snk-configurator__title--color);font-size:var(--snk-configurator__title--font-size);font-family:var(--snk-configurator__title--font-family);font-weight:var(--snk-configurator__title--font-weight)}.snk-configurator__subtitle.sc-snk-configurator{display:flex;margin:0;padding-top:var(--space--medium);padding-bottom:var(--space--small);color:var(--snk-configurator__subtitle--color);font-size:var(--snk-configurator__subtitle--font-size);font-family:var(--snk-configurator__subtitle--font-family);font-weight:var(--snk-configurator__subtitle--font-weight)}.snk-configurator__button-close.sc-snk-configurator{padding-left:var(--snk-configurator__button-close--padding-left)}.snk-configurator__main.sc-snk-configurator{overflow-y:auto;scrollbar-width:thin;margin:var(--space--medium) 0;scrollbar-color:var(--snk-configurator__scrollbar--color-clicked) var(--snk-configurator__scrollbar--color-background)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar{background-color:var(--snk-configurator__scrollbar--color-background);width:var(--snk-configurator__scrollbar--width);max-width:var(--snk-configurator__scrollbar--width);min-width:var(--snk-configurator__scrollbar--width)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-track{background-color:var(--snk-configurator__scrollbar--color-background);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb{background-color:var(--snk-configurator__scrollbar--color-default);border-radius:var(--snk-configurator__scrollbar--border-radius)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:hover,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--snk-configurator__scrollbar--color-hover)}.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:vertical:active,.snk-configurator__main.sc-snk-configurator::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--snk-configurator__scrollbar--color-clicked)}";
|
11
11
|
|
12
12
|
const SnkConfigurator = class {
|
13
13
|
constructor(hostRef) {
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
8
|
-
require('./DataFetcher-
|
9
|
-
require('./pesquisa-fetcher-
|
8
|
+
require('./DataFetcher-65879b2c.js');
|
9
|
+
require('./pesquisa-fetcher-5c583c93.js');
|
10
10
|
const index$1 = require('./index-1dfc7a6e.js');
|
11
11
|
require('./ISave-e91b70a7.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-8291ac21.js');
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
16
|
-
require('./form-config-fetcher-
|
17
|
-
const constants = require('./constants-
|
18
|
-
const authFetcher = require('./auth-fetcher-
|
16
|
+
require('./form-config-fetcher-90126e4c.js');
|
17
|
+
const constants = require('./constants-241934b3.js');
|
18
|
+
const authFetcher = require('./auth-fetcher-8480751c.js');
|
19
19
|
require('./index-102ba62d.js');
|
20
20
|
require('./PrintUtils-bcaeb82f.js');
|
21
21
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
@@ -31,6 +31,7 @@ const SnkCrud = class {
|
|
31
31
|
this.configuratorSave = index.createEvent(this, "configuratorSave", 7);
|
32
32
|
this.configuratorCancel = index.createEvent(this, "configuratorCancel", 7);
|
33
33
|
this.formItemsReady = index.createEvent(this, "formItemsReady", 7);
|
34
|
+
this.viewModeChanged = index.createEvent(this, "viewModeChanged", 7);
|
34
35
|
this._keyDownHandler = async (event) => this.keyDownListener(event);
|
35
36
|
this._viewHistory = [];
|
36
37
|
this._customEditors = new Map();
|
@@ -41,6 +42,8 @@ const SnkCrud = class {
|
|
41
42
|
this._currentViewMode = constants.VIEW_MODE.GRID;
|
42
43
|
this._canEdit = undefined;
|
43
44
|
this._resourceID = undefined;
|
45
|
+
this.enableLockManagerLoadingComp = false;
|
46
|
+
this.enableLockManagerTaskbarClick = false;
|
44
47
|
this.configName = undefined;
|
45
48
|
this.filterBarTitle = undefined;
|
46
49
|
this.selectionToastConfig = undefined;
|
@@ -59,7 +62,10 @@ const SnkCrud = class {
|
|
59
62
|
this.disablePersonalizedFilter = undefined;
|
60
63
|
this.autoLoad = undefined;
|
61
64
|
this.autoFocus = true;
|
65
|
+
this.enableGridInsert = false;
|
62
66
|
this.domainMessagesBuilder = undefined;
|
67
|
+
this.ignoreReadOnlyFormFields = undefined;
|
68
|
+
this.setCustomFormTitle = undefined;
|
63
69
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${core.StringUtils.generateUUID()}`;
|
64
70
|
}
|
65
71
|
/**
|
@@ -168,6 +174,7 @@ const SnkCrud = class {
|
|
168
174
|
else if (viewMode === constants.VIEW_MODE.FORM) {
|
169
175
|
this._guidesViewer.setFocus();
|
170
176
|
}
|
177
|
+
this.viewModeChanged.emit(viewMode);
|
171
178
|
}
|
172
179
|
openConfig(viewMode) {
|
173
180
|
this._snkConfigurator.close();
|
@@ -183,6 +190,8 @@ const SnkCrud = class {
|
|
183
190
|
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
184
191
|
}
|
185
192
|
insertionModeHandler() {
|
193
|
+
if (this.enableGridInsert)
|
194
|
+
return;
|
186
195
|
this.gridToForm();
|
187
196
|
}
|
188
197
|
cancelHandler() {
|
@@ -296,11 +305,16 @@ const SnkCrud = class {
|
|
296
305
|
if (!isDocumentBody)
|
297
306
|
element.focus();
|
298
307
|
}
|
308
|
+
async function handleAddRecord() {
|
309
|
+
if (!dataUnit.hasNewRecord()) {
|
310
|
+
dataUnit.addRecord();
|
311
|
+
}
|
312
|
+
}
|
299
313
|
keyboardManager
|
300
314
|
.bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade.", element: this._element })
|
301
315
|
.bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
302
316
|
.bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
303
|
-
.bind("F8",
|
317
|
+
.bind("F8", handleAddRecord.bind(this), { description: "Adiciona um novo registro.", element: this._element })
|
304
318
|
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
305
319
|
.bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
306
320
|
.bind("ctrl + .", () => {
|
@@ -396,8 +410,8 @@ const SnkCrud = class {
|
|
396
410
|
if (this._resourceID == undefined) {
|
397
411
|
return;
|
398
412
|
}
|
399
|
-
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === constants.VIEW_MODE.GRID;
|
400
|
-
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item",
|
413
|
+
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === constants.VIEW_MODE.GRID && !this.enableGridInsert);
|
414
|
+
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full', filterBarTitle: this.filterBarTitle, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableLockManagerTaskbarClick: this.enableLockManagerTaskbarClick, enableLockManagerLoadingComp: this.enableLockManagerLoadingComp }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId, formLegacyConfigName: this.formLegacyConfigName, enableGridInsert: this.enableGridInsert, getCustomTitle: this.setCustomFormTitle, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
401
415
|
}
|
402
416
|
get _element() { return index.getElement(this); }
|
403
417
|
static get watchers() { return {
|