@sankhyalabs/sankhyablocks 8.16.0-dev.9 → 8.16.0-dev.90
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/{IExporterProvider-597949f9.js → ClientSideExporterProvider-6b781452.js} +136 -24
- package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-d024aec8.js} +2 -2
- 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/IFetchDataExporterParams-e78ec415.js +8 -0
- package/dist/cjs/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-c11d8468.js} +75 -17
- package/dist/cjs/{SnkMessageBuilder-897ffd08.js → SnkMessageBuilder-bae64d0d.js} +6 -2
- 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-1dfc7a6e.js → index-e3e39724.js} +5 -0
- 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} +139 -43
- package/dist/cjs/snk-application.cjs.entry.js +301 -70
- package/dist/cjs/snk-attach.cjs.entry.js +49 -36
- 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 +26 -22
- package/dist/cjs/snk-data-exporter.cjs.entry.js +38 -29
- package/dist/cjs/{snk-data-unit-8fa7917a.js → snk-data-unit-c8096724.js} +55 -31
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
- package/dist/cjs/snk-detail-view.cjs.entry.js +15 -15
- 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 +1437 -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-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -1
- package/dist/cjs/snk-grid.cjs.entry.js +96 -27
- package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-a029ff50.js} +32 -16
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +11 -11
- 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 +115 -112
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +72 -40
- package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-7e19882d.js} +1 -1
- 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 +323 -65
- 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 +147 -14
- 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 +8 -8
- 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 +18 -6
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +10 -9
- 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 +53 -29
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +3 -3
- 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-number.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 +9 -4
- 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 +2 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +119 -29
- 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 +8 -0
- package/dist/collection/components/snk-grid/snk-grid.js +199 -13
- 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/@types/index.js +5 -0
- 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/fetchDataExporter/interfaces/IFetchDataExporterParams.js +6 -1
- 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-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} +136 -24
- package/dist/components/DataFetcher.js +217 -77
- package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
- package/dist/components/ISave.js +367 -1
- package/dist/components/SnkFormConfigManager.js +73 -15
- package/dist/components/SnkMessageBuilder.js +6 -2
- 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 +320 -69
- 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 +86 -71
- package/dist/components/snk-data-exporter2.js +37 -23
- package/dist/components/snk-data-unit2.js +56 -69
- 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 +68 -34
- 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 +9 -4
- package/dist/components/snk-filter-modal.js +4 -2
- package/dist/components/snk-filter-number.js +1 -1
- 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 +92 -18
- 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 +107 -120
- 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/{IExporterProvider-63a188b6.js → ClientSideExporterProvider-ff89c7e9.js} +136 -26
- package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5221b992.js} +217 -77
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
- package/dist/esm/IFetchDataExporterParams-d73bed3d.js +8 -0
- package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-5022f87f.js} +75 -17
- package/dist/esm/{SnkMessageBuilder-571462fb.js → SnkMessageBuilder-6fff4a4c.js} +6 -2
- 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/{index-3aa4977a.js → index-b40568ff.js} +6 -1
- 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} +140 -45
- package/dist/esm/snk-application.entry.js +303 -72
- package/dist/esm/snk-attach.entry.js +49 -36
- 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 +26 -22
- package/dist/esm/snk-data-exporter.entry.js +38 -29
- package/dist/esm/{snk-data-unit-f5cbe64b.js → snk-data-unit-51659955.js} +55 -31
- package/dist/esm/snk-data-unit.entry.js +5 -5
- package/dist/esm/snk-detail-view.entry.js +15 -15
- 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 +1430 -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-number.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +2 -1
- package/dist/esm/snk-grid.entry.js +91 -22
- package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-fa45714d.js} +32 -16
- package/dist/esm/snk-guides-viewer.entry.js +11 -11
- 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 +101 -98
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +73 -41
- package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-d2353c64.js} +1 -1
- package/dist/sankhyablocks/p-0b00d69c.entry.js +1 -0
- package/dist/sankhyablocks/p-0ce56d43.entry.js +1 -0
- package/dist/sankhyablocks/p-0f3698af.js +1 -0
- package/dist/sankhyablocks/p-1435701f.js +26 -0
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/p-172848d4.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-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-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-7e7a7473.js → p-3fc82614.js} +1 -1
- package/dist/sankhyablocks/p-40e323f9.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-7663f597.entry.js → p-4c9adf1c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-700a4cc3.entry.js +1 -0
- package/dist/sankhyablocks/p-79f823f3.entry.js +1 -0
- package/dist/sankhyablocks/p-7dd49d15.js +1 -0
- package/dist/sankhyablocks/p-82839c9f.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-8f3f2306.js +1 -0
- package/dist/sankhyablocks/p-a962a3e4.entry.js +1 -0
- package/dist/sankhyablocks/p-aa1a0f3e.entry.js +1 -0
- package/dist/sankhyablocks/p-b02e58fd.entry.js +1 -0
- package/dist/sankhyablocks/p-b0ff53b7.entry.js +1 -0
- package/dist/sankhyablocks/p-bee2a6d3.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-c82deea7.entry.js +1 -0
- package/dist/sankhyablocks/p-d2d0535f.entry.js +1 -0
- package/dist/sankhyablocks/p-d62228fb.js +1 -0
- package/dist/sankhyablocks/p-de9da2f2.js +1 -0
- package/dist/sankhyablocks/p-e0a6d819.entry.js +1 -0
- package/dist/sankhyablocks/p-e10faff0.entry.js +11 -0
- package/dist/sankhyablocks/p-e718fb81.entry.js +1 -0
- package/dist/sankhyablocks/{p-913a9979.js → p-f0b9303b.js} +1 -1
- 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 +26 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
- package/dist/types/components/snk-data-exporter/data/export-result.d.ts +2 -1
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +2 -1
- package/dist/types/components/snk-data-exporter/interfaces/IRecordID.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +3 -1
- 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 +33 -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 +407 -15
- package/dist/types/lib/@types/index.d.ts +4 -0
- 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 +6 -2
- 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-01ba23cd.entry.js +0 -1
- package/dist/sankhyablocks/p-17def7cd.js +0 -1
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-2a408684.js +0 -1
- package/dist/sankhyablocks/p-30cf616e.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-62ba211a.entry.js +0 -1
- package/dist/sankhyablocks/p-6bb2f3e9.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-7619bdb1.entry.js +0 -11
- package/dist/sankhyablocks/p-7a85fd49.entry.js +0 -1
- package/dist/sankhyablocks/p-7ef9c55c.js +0 -1
- package/dist/sankhyablocks/p-80042dc6.entry.js +0 -1
- package/dist/sankhyablocks/p-871aa14e.entry.js +0 -1
- package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
- package/dist/sankhyablocks/p-8c59edd7.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-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-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
@@ -25,14 +25,18 @@ export const buildTaskBarManager = () => {
|
|
25
25
|
];
|
26
26
|
return {
|
27
27
|
getButtons: (_, dataState, currentButtons) => {
|
28
|
-
|
28
|
+
const refreshBtnIndex = currentButtons.indexOf(TaskbarElement.REFRESH);
|
29
|
+
if ((dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty)) {
|
29
30
|
return currentButtons.reverse();
|
30
|
-
|
31
|
-
|
31
|
+
}
|
32
|
+
else if (refreshBtnIndex !== -1) {
|
33
|
+
currentButtons.splice(refreshBtnIndex, 1);
|
34
|
+
}
|
32
35
|
const { selectedRecord } = dataState || {};
|
33
36
|
const taskbarTobeAdded = !!(selectedRecord === null || selectedRecord === void 0 ? void 0 : selectedRecord.LINK) ? TaskbarAttachButtons.LINK : TaskbarAttachButtons.DOWNLOAD;
|
34
37
|
currentButtons.splice(currentButtons.indexOf(TaskbarElement.DIVIDER) + 1, 0, TaskbarElement.REMOVE, taskbarTobeAdded, TaskbarElement.DIVIDER);
|
35
|
-
const
|
38
|
+
const buttonsToRemove = [TaskbarElement.CLONE, TaskbarElement.DATA_EXPORTER];
|
39
|
+
const updatedButtons = Array.from(new Set(currentButtons.filter((button) => !buttonsToRemove.includes(button))));
|
36
40
|
updatedButtons.splice(updatedButtons.indexOf(taskbarTobeAdded) + 1, 0, TaskbarElement.DIVIDER);
|
37
41
|
return updatedButtons;
|
38
42
|
},
|
@@ -3,7 +3,7 @@ import { SaveErrorsEnum } from '../../../../../lib/http/data-fetcher/fetchers/At
|
|
3
3
|
import { AutorizationType } from '../../../../../lib/http/data-fetcher/fetchers/auth-fetcher';
|
4
4
|
import { attachFetcherMetadataBuilder } from '../../builder/attach-crud-config.builder';
|
5
5
|
import { VIEW_MODE } from '../../../../../lib/utils/constants';
|
6
|
-
import {
|
6
|
+
import { buildLoadDataResponse } from '../../../../../lib/dataUnit/dataUnitInMemoryUtils';
|
7
7
|
const SERVICE_LOAD = "Attach.load";
|
8
8
|
export class AttachFetcherDataUnitFactory {
|
9
9
|
constructor(getMessage) {
|
@@ -49,9 +49,7 @@ export class AttachFetcherDataUnitFactory {
|
|
49
49
|
});
|
50
50
|
this._records = records;
|
51
51
|
}
|
52
|
-
|
53
|
-
records = applySorting(records, dataUnit, request.sort);
|
54
|
-
return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
|
52
|
+
return buildLoadDataResponse(this._records, dataUnit, request);
|
55
53
|
}
|
56
54
|
saveLoader(changes, fetcher) {
|
57
55
|
return new Promise((resolve) => {
|
@@ -38,7 +38,7 @@
|
|
38
38
|
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
39
39
|
--snk-configurator__scrollbar--border-radius: var(--border--radius-small, 6px);
|
40
40
|
/*@doc Define a largura da barra de rolagem do componente.*/
|
41
|
-
--snk-configurator__scrollbar--width: var(--space--
|
41
|
+
--snk-configurator__scrollbar--width: var(--space--small, 6px);
|
42
42
|
}
|
43
43
|
|
44
44
|
.snk-configurator {
|
@@ -4,6 +4,7 @@ import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
|
4
4
|
import { PresentationMode } from '../../lib';
|
5
5
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
6
6
|
import { AutorizationType } from '../../lib/http/data-fetcher/fetchers/auth-fetcher';
|
7
|
+
import { ExporterStrategy } from '../../lib/@types';
|
7
8
|
/**
|
8
9
|
* É possível customizar as mensagens dos blocos de construção através de um pequeno modulo na estrutura da aplicação:
|
9
10
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
@@ -21,6 +22,8 @@ export class SnkCrud {
|
|
21
22
|
this._currentViewMode = VIEW_MODE.GRID;
|
22
23
|
this._canEdit = undefined;
|
23
24
|
this._resourceID = undefined;
|
25
|
+
this.enableLockManagerLoadingComp = false;
|
26
|
+
this.enableLockManagerTaskbarClick = false;
|
24
27
|
this.configName = undefined;
|
25
28
|
this.filterBarTitle = undefined;
|
26
29
|
this.selectionToastConfig = undefined;
|
@@ -39,7 +42,11 @@ export class SnkCrud {
|
|
39
42
|
this.disablePersonalizedFilter = undefined;
|
40
43
|
this.autoLoad = undefined;
|
41
44
|
this.autoFocus = true;
|
45
|
+
this.enableGridInsert = false;
|
42
46
|
this.domainMessagesBuilder = undefined;
|
47
|
+
this.ignoreReadOnlyFormFields = undefined;
|
48
|
+
this.setCustomFormTitle = undefined;
|
49
|
+
this.strategyExporter = ExporterStrategy.SERVER_SIDE;
|
43
50
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
44
51
|
}
|
45
52
|
/**
|
@@ -148,6 +155,7 @@ export class SnkCrud {
|
|
148
155
|
else if (viewMode === VIEW_MODE.FORM) {
|
149
156
|
this._guidesViewer.setFocus();
|
150
157
|
}
|
158
|
+
this.viewModeChanged.emit(viewMode);
|
151
159
|
}
|
152
160
|
openConfig(viewMode) {
|
153
161
|
this._snkConfigurator.close();
|
@@ -163,6 +171,8 @@ export class SnkCrud {
|
|
163
171
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
164
172
|
}
|
165
173
|
insertionModeHandler() {
|
174
|
+
if (this.enableGridInsert)
|
175
|
+
return;
|
166
176
|
this.gridToForm();
|
167
177
|
}
|
168
178
|
cancelHandler() {
|
@@ -277,22 +287,18 @@ export class SnkCrud {
|
|
277
287
|
if (!isDocumentBody)
|
278
288
|
element.focus();
|
279
289
|
}
|
290
|
+
async function handleAddRecord() {
|
291
|
+
if (!dataUnit.hasNewRecord()) {
|
292
|
+
dataUnit.addRecord();
|
293
|
+
}
|
294
|
+
}
|
280
295
|
keyboardManager
|
281
296
|
.bind("F6", this.toggleView.bind(this), { description: "Alterna entre modo formulário e grade.", element: this._element })
|
282
297
|
.bind("F7", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
283
298
|
.bind("ctrl + \\", saveDataUnitHandlingFocus.bind(this), { description: "Salva os dados.", element: this._element })
|
284
|
-
.bind("F8",
|
299
|
+
.bind("F8", handleAddRecord.bind(this), { description: "Adiciona um novo registro.", element: this._element })
|
285
300
|
.bind("F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
286
301
|
.bind("ctrl + F9", dataUnit.removeSelectedRecords.bind(dataUnit), { description: "Remove o registro selecionado.", element: this._element })
|
287
|
-
.bind("ctrl + .", () => {
|
288
|
-
if (dataUnit.getSelectionInfo().records.length === 0) {
|
289
|
-
return dataUnit.selectFirst();
|
290
|
-
}
|
291
|
-
return dataUnit.nextRecord();
|
292
|
-
}, {
|
293
|
-
description: "Avança para o próximo registro.", element: this._element
|
294
|
-
})
|
295
|
-
.bind("ctrl + ,", dataUnit.previousRecord.bind(dataUnit), { description: "Retorna ao registro anterior.", element: this._element })
|
296
302
|
.bind("F5", async () => {
|
297
303
|
const currentView = await this._viewStack.getSelectedIndex();
|
298
304
|
if (VIEW_MODE.GRID === currentView) {
|
@@ -320,8 +326,6 @@ export class SnkCrud {
|
|
320
326
|
.unbind("F8")
|
321
327
|
.unbind("F9")
|
322
328
|
.unbind("ctrl + F9")
|
323
|
-
.unbind("ctrl + .")
|
324
|
-
.unbind("ctrl + ,")
|
325
329
|
.unbind("F5")
|
326
330
|
.unbind("Escape");
|
327
331
|
}
|
@@ -377,8 +381,8 @@ export class SnkCrud {
|
|
377
381
|
if (this._resourceID == undefined) {
|
378
382
|
return;
|
379
383
|
}
|
380
|
-
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
381
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item",
|
384
|
+
this._snkDataUnit.ignoreSaveMessage = (this._currentViewMode === VIEW_MODE.GRID && !this.enableGridInsert);
|
385
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", { class: 'ez-flex ez-flex--column ez-size-height--full ez-size-width--full ez-padding--medium' }, 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, strategyExporter: this.strategyExporter }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(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 }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), 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 })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
382
386
|
}
|
383
387
|
static get is() { return "snk-crud"; }
|
384
388
|
static get encapsulation() { return "scoped"; }
|
@@ -394,6 +398,42 @@ export class SnkCrud {
|
|
394
398
|
}
|
395
399
|
static get properties() {
|
396
400
|
return {
|
401
|
+
"enableLockManagerLoadingComp": {
|
402
|
+
"type": "boolean",
|
403
|
+
"mutable": false,
|
404
|
+
"complexType": {
|
405
|
+
"original": "boolean",
|
406
|
+
"resolved": "boolean",
|
407
|
+
"references": {}
|
408
|
+
},
|
409
|
+
"required": false,
|
410
|
+
"optional": true,
|
411
|
+
"docs": {
|
412
|
+
"tags": [],
|
413
|
+
"text": "Define se o componente deve usar o LockManager para controle de carregamento da aplica\u00E7\u00E3o"
|
414
|
+
},
|
415
|
+
"attribute": "enable-lock-manager-loading-comp",
|
416
|
+
"reflect": false,
|
417
|
+
"defaultValue": "false"
|
418
|
+
},
|
419
|
+
"enableLockManagerTaskbarClick": {
|
420
|
+
"type": "boolean",
|
421
|
+
"mutable": false,
|
422
|
+
"complexType": {
|
423
|
+
"original": "boolean",
|
424
|
+
"resolved": "boolean",
|
425
|
+
"references": {}
|
426
|
+
},
|
427
|
+
"required": false,
|
428
|
+
"optional": true,
|
429
|
+
"docs": {
|
430
|
+
"tags": [],
|
431
|
+
"text": "Ativa o gerenciamento de locks na grade pela Taskbar."
|
432
|
+
},
|
433
|
+
"attribute": "enable-lock-manager-taskbar-click",
|
434
|
+
"reflect": false,
|
435
|
+
"defaultValue": "false"
|
436
|
+
},
|
397
437
|
"configName": {
|
398
438
|
"type": "string",
|
399
439
|
"mutable": true,
|
@@ -735,6 +775,24 @@ export class SnkCrud {
|
|
735
775
|
"reflect": false,
|
736
776
|
"defaultValue": "true"
|
737
777
|
},
|
778
|
+
"enableGridInsert": {
|
779
|
+
"type": "boolean",
|
780
|
+
"mutable": false,
|
781
|
+
"complexType": {
|
782
|
+
"original": "boolean",
|
783
|
+
"resolved": "boolean",
|
784
|
+
"references": {}
|
785
|
+
},
|
786
|
+
"required": false,
|
787
|
+
"optional": true,
|
788
|
+
"docs": {
|
789
|
+
"tags": [],
|
790
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
791
|
+
},
|
792
|
+
"attribute": "enable-grid-insert",
|
793
|
+
"reflect": false,
|
794
|
+
"defaultValue": "false"
|
795
|
+
},
|
738
796
|
"domainMessagesBuilder": {
|
739
797
|
"type": "string",
|
740
798
|
"mutable": false,
|
@@ -751,6 +809,61 @@ export class SnkCrud {
|
|
751
809
|
},
|
752
810
|
"attribute": "domain-messages-builder",
|
753
811
|
"reflect": false
|
812
|
+
},
|
813
|
+
"ignoreReadOnlyFormFields": {
|
814
|
+
"type": "boolean",
|
815
|
+
"mutable": false,
|
816
|
+
"complexType": {
|
817
|
+
"original": "boolean",
|
818
|
+
"resolved": "boolean",
|
819
|
+
"references": {}
|
820
|
+
},
|
821
|
+
"required": false,
|
822
|
+
"optional": true,
|
823
|
+
"docs": {
|
824
|
+
"tags": [],
|
825
|
+
"text": "Ignora os campos \"somente leitura\" no modo de inser\u00E7\u00E3o."
|
826
|
+
},
|
827
|
+
"attribute": "ignore-read-only-form-fields",
|
828
|
+
"reflect": false
|
829
|
+
},
|
830
|
+
"setCustomFormTitle": {
|
831
|
+
"type": "unknown",
|
832
|
+
"mutable": false,
|
833
|
+
"complexType": {
|
834
|
+
"original": "() => string",
|
835
|
+
"resolved": "() => string",
|
836
|
+
"references": {}
|
837
|
+
},
|
838
|
+
"required": false,
|
839
|
+
"optional": false,
|
840
|
+
"docs": {
|
841
|
+
"tags": [],
|
842
|
+
"text": "Define uma fun\u00E7\u00E3o para configurar um t\u00EDtulo cusotmizado no modo formul\u00E1rio."
|
843
|
+
}
|
844
|
+
},
|
845
|
+
"strategyExporter": {
|
846
|
+
"type": "string",
|
847
|
+
"mutable": true,
|
848
|
+
"complexType": {
|
849
|
+
"original": "IExporterStrategyMode",
|
850
|
+
"resolved": "\"ClientSideExporterStrategy\" | \"ServerSideExporterStrategy\"",
|
851
|
+
"references": {
|
852
|
+
"IExporterStrategyMode": {
|
853
|
+
"location": "import",
|
854
|
+
"path": "../snk-data-exporter/interfaces/IRecordID"
|
855
|
+
}
|
856
|
+
}
|
857
|
+
},
|
858
|
+
"required": false,
|
859
|
+
"optional": false,
|
860
|
+
"docs": {
|
861
|
+
"tags": [],
|
862
|
+
"text": "Modo de exporta\u00E7\u00E3o dos dados."
|
863
|
+
},
|
864
|
+
"attribute": "strategy-exporter",
|
865
|
+
"reflect": false,
|
866
|
+
"defaultValue": "ExporterStrategy.SERVER_SIDE"
|
754
867
|
}
|
755
868
|
};
|
756
869
|
}
|
@@ -833,6 +946,26 @@ export class SnkCrud {
|
|
833
946
|
}
|
834
947
|
}
|
835
948
|
}
|
949
|
+
}, {
|
950
|
+
"method": "viewModeChanged",
|
951
|
+
"name": "viewModeChanged",
|
952
|
+
"bubbles": true,
|
953
|
+
"cancelable": true,
|
954
|
+
"composed": true,
|
955
|
+
"docs": {
|
956
|
+
"tags": [],
|
957
|
+
"text": ""
|
958
|
+
},
|
959
|
+
"complexType": {
|
960
|
+
"original": "VIEW_MODE",
|
961
|
+
"resolved": "VIEW_MODE.ATTACHMENT | VIEW_MODE.FORM | VIEW_MODE.GRID",
|
962
|
+
"references": {
|
963
|
+
"VIEW_MODE": {
|
964
|
+
"location": "import",
|
965
|
+
"path": "../../lib/utils/constants"
|
966
|
+
}
|
967
|
+
}
|
968
|
+
}
|
836
969
|
}];
|
837
970
|
}
|
838
971
|
static get methods() {
|
package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js
CHANGED
@@ -198,7 +198,7 @@ export class SnkDetailView {
|
|
198
198
|
this.emitSwitchEvent(VIEW_MODE.GRID);
|
199
199
|
evt.stopPropagation();
|
200
200
|
}
|
201
|
-
if (evt.detail === TaskbarElement.FORM_MODE) {
|
201
|
+
if (evt.detail === TaskbarElement.FORM_MODE || evt.detail === TaskbarElement.UPDATE) {
|
202
202
|
this.emitSwitchEvent(VIEW_MODE.FORM);
|
203
203
|
evt.stopPropagation();
|
204
204
|
}
|
@@ -222,7 +222,7 @@ export class SnkDetailView {
|
|
222
222
|
}
|
223
223
|
componentWillLoad() {
|
224
224
|
this._configName = `dynaform.${this.entityName}`;
|
225
|
-
this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata());
|
225
|
+
this.formConfigManager = new SnkFormConfigManager(this._configName, this.resourceID, () => this.loadMetadata(), this.dataUnit);
|
226
226
|
this.formConfigManager.loadConfig();
|
227
227
|
if (this.messagesBuilder == undefined) {
|
228
228
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
@@ -247,7 +247,7 @@ export class SnkDetailView {
|
|
247
247
|
render() {
|
248
248
|
this.updateLabel();
|
249
249
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
250
|
-
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
250
|
+
return (h(Host, null, h("snk-data-unit", { ref: (el) => this._snkDataUnit = el, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("ez-view-stack", { ref: (ref) => this.updateViewStack(ref) }, h("stack-item", null, h("div", { class: "ez-box ez-box--shadow grid-container" }, h("div", { class: "ez-flex ez-title--primary ez-size-width--full ez-padding--large detail-header" }, h("div", { class: "ez-flex ez-text ez-text--bold ez-flex--justify-start ez-flex--align-items-center" }, this._levelPath ? h("span", { class: "level-path" }, this._levelPath + " /") : undefined, this.label)), h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => this._snkGrid = ref, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.emitSwitchEvent(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: PresentationMode.SECONDARY, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: false }))), h("stack-item", null, h("snk-form-view", { ref: (ref) => this._snkFormView = ref, canExpand: false, canFix: false, name: this.selectedForm, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), label: this.label, levelPath: this._levelPath, onFormItemsReady: ({ detail: formItems }) => this.formItemsReady.emit(formItems) }, h("snk-taskbar", { key: "guideViewerTaskbar", class: "form-taskbar", "data-element-id": "guideViewer", configName: this._configName, messagesBuilder: this.messagesBuilder, disabledButtons: this._disabledButtons, buttons: "INSERT,PREVIOUS,NEXT,DIVIDER,CLONE,REMOVE,MORE_OPTIONS,DIVIDER,GRID_MODE,CONFIGURATOR", primaryButton: "INSERT", presentationMode: PresentationMode.SECONDARY, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this.entityName, onBack: this.handleAttachBack.bind(this) }))))));
|
251
251
|
}
|
252
252
|
static get is() { return "snk-detail-view"; }
|
253
253
|
static get encapsulation() { return "scoped"; }
|
@@ -2,9 +2,9 @@
|
|
2
2
|
/*@doc Define o espaçamento maior utilizado no componente.*/
|
3
3
|
--snk-guides-viewer--space-large: var(--space--large, 24px);
|
4
4
|
/*@doc Define o espaçamento médio utilizado no componente.*/
|
5
|
-
--snk-guides-viewer--space-
|
5
|
+
--snk-guides-viewer--space-small: var(--space--2xs, 8px);
|
6
6
|
/*@doc Define a altura mínima do cabeçalho do componente.*/
|
7
|
-
--snk-guides-viewer__header--min-height:
|
7
|
+
--snk-guides-viewer__header--min-height: 68px;
|
8
8
|
/*@doc Define a posição de z-index do cabeçalho do componente.*/
|
9
9
|
--snk-guides-viewer__header--z-index: var(--more-visible, 2);
|
10
10
|
/*@doc Define a cor de fundo do cabeçalho do componente.*/
|
@@ -51,10 +51,10 @@ snk-form-view {
|
|
51
51
|
padding-left: var(--snk-guides-viewer--space-large);
|
52
52
|
padding-right: var(--snk-guides-viewer--space-large);
|
53
53
|
padding-top: var(--snk-guides-viewer--space-large);
|
54
|
-
padding-bottom: var(--snk-guides-viewer--space-
|
54
|
+
padding-bottom: var(--snk-guides-viewer--space-small);
|
55
55
|
margin-left: calc(var(--snk-guides-viewer--space-large) * -1);
|
56
56
|
margin-right: calc(var(--snk-guides-viewer--space-large) * -1);
|
57
|
-
margin-bottom: var(--snk-guides-viewer--space-
|
57
|
+
margin-bottom: var(--snk-guides-viewer--space-small);
|
58
58
|
}
|
59
59
|
|
60
60
|
.snk-guides-viewer__header-breadcrumb{
|
@@ -81,8 +81,8 @@ snk-form-view {
|
|
81
81
|
position: sticky;
|
82
82
|
|
83
83
|
/*public*/
|
84
|
-
top: calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-
|
85
|
-
height: calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-
|
84
|
+
top: calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-small));
|
85
|
+
height: calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-small));
|
86
86
|
}
|
87
87
|
|
88
88
|
.snk-guides-viewer__guide-navigator[open] {
|
@@ -27,6 +27,9 @@ export class SnkGuidesViewer {
|
|
27
27
|
this.resourceID = undefined;
|
28
28
|
this.detailTaskbarCustomContainerId = undefined;
|
29
29
|
this.formLegacyConfigName = undefined;
|
30
|
+
this.enableGridInsert = false;
|
31
|
+
this.ignoreReadOnlyFormFields = undefined;
|
32
|
+
this.getCustomTitle = undefined;
|
30
33
|
this._hasToCreateFieldSearch = true;
|
31
34
|
this._breadcrumbItems = [];
|
32
35
|
this._guides = undefined;
|
@@ -95,7 +98,7 @@ export class SnkGuidesViewer {
|
|
95
98
|
this._container.focus();
|
96
99
|
}
|
97
100
|
exitViewer() {
|
98
|
-
if (this.dataUnit.isDirty()) {
|
101
|
+
if (!this.enableGridInsert && this.dataUnit.isDirty()) {
|
99
102
|
this.dataUnit.cancelEdition({ after: () => this.exit.emit() });
|
100
103
|
}
|
101
104
|
else {
|
@@ -204,10 +207,13 @@ export class SnkGuidesViewer {
|
|
204
207
|
const invisibleButtons = this.getInvisibleButtons();
|
205
208
|
this._taskbarProcessor = new TaskbarProcessor({
|
206
209
|
"snkGuideViewer.regular": btnsRegularMode,
|
207
|
-
"snkGuideViewer.finish_edition": ["CANCEL", "SAVE"],
|
210
|
+
"snkGuideViewer.finish_edition": ["CANCEL", "SAVE", this.handleAddGridMode()],
|
208
211
|
});
|
209
212
|
this._taskbarProcessor.process(taskbarId, this.taskbarManager, this.dataState, disabledButtons, invisibleButtons);
|
210
213
|
}
|
214
|
+
handleAddGridMode() {
|
215
|
+
return this.enableGridInsert ? TaskbarElement.GRID_MODE : "";
|
216
|
+
}
|
211
217
|
getInvisibleButtons() {
|
212
218
|
const invisibleButtons = [];
|
213
219
|
if (this.dataState && this.dataState.selectionInfo.mode === SelectionMode.ALL_RECORDS)
|
@@ -360,11 +366,14 @@ export class SnkGuidesViewer {
|
|
360
366
|
this._configManager.addFormLegacyConfig(this.formLegacyConfigName);
|
361
367
|
}
|
362
368
|
}
|
369
|
+
setMasterFormConfig(config) {
|
370
|
+
this.masterFormConfig = config;
|
371
|
+
}
|
363
372
|
componentWillLoad() {
|
364
373
|
if (this.resourceID == undefined) {
|
365
374
|
throw new Error("Erro interno: resourceID não informado");
|
366
375
|
}
|
367
|
-
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID,
|
376
|
+
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, this.setMasterFormConfig.bind(this), this.dataUnit);
|
368
377
|
this.addFormLegacyConfigName();
|
369
378
|
this._configManager.loadConfig();
|
370
379
|
}
|
@@ -392,7 +401,7 @@ export class SnkGuidesViewer {
|
|
392
401
|
return this._fieldSearch;
|
393
402
|
}
|
394
403
|
fieldsOptionLoader(argument) {
|
395
|
-
return Promise.resolve(this._configManager.getFieldsList(
|
404
|
+
return Promise.resolve(this._configManager.getFieldsList(argument)
|
396
405
|
.map(field => ({ value: field.name, label: field.label })));
|
397
406
|
}
|
398
407
|
onSelectField(option, actionButton) {
|
@@ -430,6 +439,9 @@ export class SnkGuidesViewer {
|
|
430
439
|
await this.addErrorBadgeToGuide(guideName);
|
431
440
|
await this.openGuideNavigator(guideName);
|
432
441
|
}
|
442
|
+
if (action.type === DUAction.METADATA_LOADED) {
|
443
|
+
this.loadGuides(this.noGuideSelected());
|
444
|
+
}
|
433
445
|
}
|
434
446
|
async addErrorBadgeToGuide(guideName) {
|
435
447
|
var _a;
|
@@ -464,20 +476,24 @@ export class SnkGuidesViewer {
|
|
464
476
|
}
|
465
477
|
return "";
|
466
478
|
}
|
479
|
+
getTitle() {
|
480
|
+
var _a, _b;
|
481
|
+
return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
|
482
|
+
}
|
467
483
|
componentDidLoad() {
|
468
484
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
469
485
|
}
|
470
486
|
render() {
|
471
487
|
var _a, _b;
|
472
488
|
if (this._formEditorConfigManager != undefined) {
|
473
|
-
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null }));
|
489
|
+
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null, ignoreReadOnlyFormFields: this.ignoreReadOnlyFormFields }));
|
474
490
|
}
|
475
491
|
if (!this.dataUnit || !this._configManager.isLoaded) {
|
476
492
|
return;
|
477
493
|
}
|
478
494
|
this.loadTaskbarProcessor();
|
479
495
|
const showGuides = this._guides && (this._guides.length > 1);
|
480
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.
|
496
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
481
497
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
482
498
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
483
499
|
:
|
@@ -794,6 +810,56 @@ export class SnkGuidesViewer {
|
|
794
810
|
},
|
795
811
|
"attribute": "form-legacy-config-name",
|
796
812
|
"reflect": false
|
813
|
+
},
|
814
|
+
"enableGridInsert": {
|
815
|
+
"type": "boolean",
|
816
|
+
"mutable": false,
|
817
|
+
"complexType": {
|
818
|
+
"original": "boolean",
|
819
|
+
"resolved": "boolean",
|
820
|
+
"references": {}
|
821
|
+
},
|
822
|
+
"required": false,
|
823
|
+
"optional": true,
|
824
|
+
"docs": {
|
825
|
+
"tags": [],
|
826
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
827
|
+
},
|
828
|
+
"attribute": "enable-grid-insert",
|
829
|
+
"reflect": false,
|
830
|
+
"defaultValue": "false"
|
831
|
+
},
|
832
|
+
"ignoreReadOnlyFormFields": {
|
833
|
+
"type": "boolean",
|
834
|
+
"mutable": false,
|
835
|
+
"complexType": {
|
836
|
+
"original": "boolean",
|
837
|
+
"resolved": "boolean",
|
838
|
+
"references": {}
|
839
|
+
},
|
840
|
+
"required": false,
|
841
|
+
"optional": true,
|
842
|
+
"docs": {
|
843
|
+
"tags": [],
|
844
|
+
"text": "Ignora os campos \"somente leitura\" no modo de inser\u00E7\u00E3o."
|
845
|
+
},
|
846
|
+
"attribute": "ignore-read-only-form-fields",
|
847
|
+
"reflect": false
|
848
|
+
},
|
849
|
+
"getCustomTitle": {
|
850
|
+
"type": "unknown",
|
851
|
+
"mutable": false,
|
852
|
+
"complexType": {
|
853
|
+
"original": "() => string",
|
854
|
+
"resolved": "() => string",
|
855
|
+
"references": {}
|
856
|
+
},
|
857
|
+
"required": false,
|
858
|
+
"optional": false,
|
859
|
+
"docs": {
|
860
|
+
"tags": [],
|
861
|
+
"text": "Fornece uma fun\u00E7\u00E3o para obter um t\u00EDtulo customizado do formul\u00E1rio."
|
862
|
+
}
|
797
863
|
}
|
798
864
|
};
|
799
865
|
}
|
@@ -4,7 +4,7 @@ export const OptionsStep = ({ getMessage, changeInfo, data }) => {
|
|
4
4
|
const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
|
5
5
|
const formatOptions = [
|
6
6
|
{ label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
|
7
|
-
{ label: getMessage("snkExporter.
|
7
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
|
8
8
|
];
|
9
9
|
const typeOptions = [
|
10
10
|
{ label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
|
package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { UserInterface } from "@sankhyalabs/core";
|
2
2
|
import { DataFetcher } from "../../../lib";
|
3
3
|
import { getOptionKey, getVisibleColumns } from "../utils/ParserExport";
|
4
|
-
import { DataExporterType } from "../../../lib/@types";
|
5
4
|
export default class ClientSideExporterStrategy {
|
6
5
|
constructor(provider) {
|
7
6
|
this._provider = provider;
|
@@ -12,15 +11,16 @@ export default class ClientSideExporterStrategy {
|
|
12
11
|
return visibleColumns;
|
13
12
|
}
|
14
13
|
async executeExport(resolveProps) {
|
15
|
-
|
16
|
-
const
|
17
|
-
const
|
14
|
+
var _a;
|
15
|
+
const { methodName, gridTitle } = resolveProps;
|
16
|
+
const records = await this._provider.getRecords(resolveProps.type);
|
17
|
+
const columns = ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) ? await this.getParsedColumns() : await this._provider.getColumnsMetadata();
|
18
18
|
const [serviceName, processor] = this.getExecutor(methodName);
|
19
19
|
const payload = {
|
20
20
|
serviceName,
|
21
21
|
requestBody: {
|
22
22
|
grid: {
|
23
|
-
|
23
|
+
gridTitle,
|
24
24
|
columns: this.buildColumnsObject(columns),
|
25
25
|
rows: this.buildRowsObject(columns, records),
|
26
26
|
customOptions: { xlsxExtension: false }
|
@@ -51,10 +51,10 @@ export default class ClientSideExporterStrategy {
|
|
51
51
|
"GridXLSBuilderSP.buildXLSFromJson",
|
52
52
|
responseBody => ({
|
53
53
|
fileSessionKey: responseBody.chaveXLS.valor,
|
54
|
-
canPrint:
|
55
|
-
canExport:
|
54
|
+
canPrint: true,
|
55
|
+
canExport: true,
|
56
|
+
canSendEmail: true,
|
56
57
|
useAppPrint: false,
|
57
|
-
canSendEmail: false
|
58
58
|
})
|
59
59
|
];
|
60
60
|
}
|
package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js
CHANGED
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
12
12
|
};
|
13
13
|
import { ApplicationContext, ObjectUtils } from "@sankhyalabs/core";
|
14
14
|
import { DataFetcher } from '../../../lib/http/data-fetcher/DataFetcher';
|
15
|
-
import { DataExporterOption
|
15
|
+
import { DataExporterOption } from "../../../lib/@types";
|
16
16
|
import { getOptionKey, getVisibleColumns } from "../utils/ParserExport";
|
17
17
|
export default class ServerSideExporterStrategy {
|
18
18
|
constructor(provider) {
|
@@ -23,10 +23,17 @@ export default class ServerSideExporterStrategy {
|
|
23
23
|
const visibleColumns = getVisibleColumns(columns);
|
24
24
|
return visibleColumns;
|
25
25
|
}
|
26
|
+
async getColumns(resolveProps) {
|
27
|
+
var _a;
|
28
|
+
if ((_a = getOptionKey(resolveProps === null || resolveProps === void 0 ? void 0 : resolveProps.exportOption)) === null || _a === void 0 ? void 0 : _a.includes("PDF")) {
|
29
|
+
return await this.getParsedColumns();
|
30
|
+
}
|
31
|
+
return await this._provider.getColumnsMetadata();
|
32
|
+
}
|
26
33
|
async getParams(resolveProps) {
|
27
34
|
var _a, _b, _c, _d, _e, _f;
|
28
35
|
const filters = (_b = (_a = this._provider).getFilters) === null || _b === void 0 ? void 0 : _b.call(_a);
|
29
|
-
const columns =
|
36
|
+
const columns = await this.getColumns(resolveProps);
|
30
37
|
const sort = (_d = (_c = this._provider).getOrders) === null || _d === void 0 ? void 0 : _d.call(_c);
|
31
38
|
const resourceURI = (_f = (_e = this._provider).getResourceURI) === null || _f === void 0 ? void 0 : _f.call(_e);
|
32
39
|
const selectedIDs = this._provider.getSelectedIDs();
|
@@ -28,7 +28,7 @@ export class CommonsExporter {
|
|
28
28
|
const columnData = {
|
29
29
|
label: column.label,
|
30
30
|
id: column.name,
|
31
|
-
width: column.width,
|
31
|
+
width: (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface.SEARCH ? 60 : column.width,
|
32
32
|
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
33
33
|
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
|
34
34
|
customFormatter
|