@sankhyalabs/sankhyablocks 8.16.0-dev.5 → 8.16.0-dev.51
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-f079f5fd.js} +3 -2
- package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-64e47516.js} +64 -22
- package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-e059eb72.js} +28 -20
- package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
- package/dist/cjs/{SnkFormConfigManager-26dfc762.js → SnkFormConfigManager-63369164.js} +72 -16
- package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
- package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-4f853233.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-228016f4.js} +48 -20
- package/dist/cjs/{field-search-f56aa7d6.js → field-search-68e34bf4.js} +5 -1
- package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-39397ac5.js} +5 -2
- package/dist/cjs/index-f9e81701.js +8 -28
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-a9bfeb22.js} +7 -2
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +42 -36
- package/dist/cjs/snk-application.cjs.entry.js +119 -61
- package/dist/cjs/snk-attach.cjs.entry.js +38 -29
- package/dist/cjs/{snk-form-config.cjs.entry.js → snk-config-options_3.cjs.entry.js} +398 -12
- package/dist/cjs/snk-crud.cjs.entry.js +23 -8
- package/dist/cjs/snk-data-exporter.cjs.entry.js +19 -18
- package/dist/cjs/{snk-data-unit-685272e7.js → snk-data-unit-3d9b6ed4.js} +66 -34
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
- package/dist/cjs/snk-detail-view.cjs.entry.js +11 -11
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1420 -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 +66 -21
- package/dist/cjs/{snk-guides-viewer-28122419.js → snk-guides-viewer-2139481c.js} +29 -13
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- 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 +68 -26
- package/dist/cjs/snk-taskbar.cjs.entry.js +64 -38
- package/dist/collection/collection-manifest.json +11 -31
- package/dist/collection/components/snk-actions-button/actions/index.js +12 -9
- 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 +28 -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.js +44 -54
- package/dist/collection/components/snk-attach/snk-attach.js +25 -16
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
- 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 +2 -2
- 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 +4 -4
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +5 -5
- 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 +2 -2
- 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-unit/snk-data-unit.js +81 -32
- 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.js +1 -1
- 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/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +79 -21
- package/dist/collection/components/snk-form/snk-form.js +2 -2
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +70 -14
- 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 +100 -8
- 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 +0 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +111 -15
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +106 -38
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
- package/dist/collection/lib/configs/ConfigStorage.js +1 -0
- 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 +2 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +9 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +4 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +6 -1
- 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/sw.js +46 -0
- package/dist/components/ConfigStorage.js +1 -0
- package/dist/components/{IExporterProvider.js → ContinuousInsertUtils.js} +65 -21
- package/dist/components/DataFetcher.js +29 -21
- package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
- package/dist/components/SnkFormConfigManager.js +70 -14
- package/dist/components/SnkMessageBuilder.js +7 -3
- package/dist/components/dataunit-fetcher.js +47 -17
- package/dist/components/form-config-fetcher.js +4 -1
- package/dist/components/pesquisa-fetcher.js +6 -1
- package/dist/components/snk-actions-button2.js +39 -35
- package/dist/components/snk-application2.js +114 -55
- package/dist/components/snk-attach2.js +34 -25
- package/dist/components/snk-crud.js +23 -3
- package/dist/components/snk-data-exporter2.js +12 -11
- package/dist/components/snk-data-unit2.js +68 -72
- package/dist/components/snk-detail-view2.js +29 -10
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +41 -22
- 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-text.js +2 -1
- package/dist/components/snk-form-config2.js +34 -9
- package/dist/components/snk-form.js +2 -2
- package/dist/components/snk-grid2.js +60 -12
- package/dist/components/snk-personalized-filter-editor.js +1 -1
- 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 +62 -15
- package/dist/components/snk-taskbar2.js +66 -40
- package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-6514d66e.js} +3 -2
- package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-b62906f9.js} +65 -24
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5034df59.js} +29 -21
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
- package/dist/esm/{SnkFormConfigManager-5782d6cf.js → SnkFormConfigManager-b409c745.js} +72 -16
- package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
- package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-ca5d3a49.js} +1 -1
- package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
- package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-56cb648b.js} +48 -18
- package/dist/esm/{field-search-efbe307f.js → field-search-f8b1d91e.js} +5 -1
- package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-a7d3e277.js} +5 -2
- package/dist/esm/index-a7d3d3f1.js +8 -28
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-6bc2e41a.js} +7 -2
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +44 -38
- package/dist/esm/snk-application.entry.js +119 -61
- package/dist/esm/snk-attach.entry.js +39 -30
- package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +399 -15
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +24 -9
- package/dist/esm/snk-data-exporter.entry.js +20 -19
- package/dist/esm/{snk-data-unit-63f83504.js → snk-data-unit-9fa7d2b9.js} +66 -34
- package/dist/esm/snk-data-unit.entry.js +5 -5
- package/dist/esm/snk-detail-view.entry.js +12 -12
- 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 +1413 -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 +61 -16
- package/dist/esm/{snk-guides-viewer-7460fe10.js → snk-guides-viewer-b7ed39eb.js} +30 -14
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- 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 +65 -23
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +65 -39
- package/dist/sankhyablocks/p-00278e07.js +1 -0
- package/dist/sankhyablocks/p-0d2a2e9e.entry.js +1 -0
- package/dist/sankhyablocks/p-0e206e62.js +1 -0
- package/dist/sankhyablocks/{p-df5451c7.js → p-126c58ea.js} +2 -2
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/p-17425c72.js +1 -0
- package/dist/sankhyablocks/p-1d3ce0d9.entry.js +1 -0
- package/dist/sankhyablocks/p-23736d75.js +1 -0
- package/dist/sankhyablocks/{p-8eb67fa4.entry.js → p-2d3f9482.entry.js} +1 -1
- package/dist/sankhyablocks/{p-af8efd95.js → p-341465ce.js} +2 -2
- package/dist/sankhyablocks/p-342eeb3b.js +1 -0
- package/dist/sankhyablocks/p-3728d2aa.entry.js +11 -0
- package/dist/sankhyablocks/p-4138da61.entry.js +1 -0
- package/dist/sankhyablocks/{p-7663f597.entry.js → p-41793e17.entry.js} +1 -1
- package/dist/sankhyablocks/{p-72fc257b.entry.js → p-434817f0.entry.js} +1 -1
- package/dist/sankhyablocks/p-47d24ac8.js +60 -0
- package/dist/sankhyablocks/p-4e1f992e.entry.js +1 -0
- package/dist/sankhyablocks/p-5b51491f.entry.js +1 -0
- package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-619aeac8.entry.js +1 -0
- package/dist/sankhyablocks/p-7075b789.entry.js +1 -0
- package/dist/sankhyablocks/p-7dd49d15.js +1 -0
- package/dist/sankhyablocks/p-83e71703.entry.js +1 -0
- package/dist/sankhyablocks/p-89c92727.entry.js +1 -0
- package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-8c235d4c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0ef4383.js → p-95ce311a.js} +1 -1
- package/dist/sankhyablocks/{p-aff76a53.js → p-9ffd9fc7.js} +2 -2
- package/dist/sankhyablocks/p-a2c790ac.entry.js +1 -0
- package/dist/sankhyablocks/p-a3fadd0b.entry.js +1 -0
- package/dist/sankhyablocks/{p-a1d72395.entry.js → p-aa003d4e.entry.js} +1 -1
- package/dist/sankhyablocks/p-aaf94476.js +1 -0
- package/dist/sankhyablocks/p-af7f7b3e.entry.js +1 -0
- package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
- package/dist/sankhyablocks/{p-17359530.entry.js → p-e390641b.entry.js} +1 -1
- package/dist/sankhyablocks/p-e4391e16.js +1 -0
- package/dist/sankhyablocks/p-e97be1c8.js +1 -0
- package/dist/sankhyablocks/p-ec43fcc8.entry.js +1 -0
- package/dist/sankhyablocks/{p-eae7a817.entry.js → p-fca0e5cc.entry.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 +9 -13
- 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/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +7 -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 +9 -0
- 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 +15 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +15 -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 +143 -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/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.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/package.json +4 -3
- 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/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-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-3a212712.js +0 -1
- package/dist/sankhyablocks/p-3a216b81.entry.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-47b60deb.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-75f83d1d.entry.js +0 -1
- package/dist/sankhyablocks/p-7a337364.js +0 -1
- package/dist/sankhyablocks/p-82a0bfb0.entry.js +0 -11
- package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
- package/dist/sankhyablocks/p-913a9979.js +0 -1
- package/dist/sankhyablocks/p-941bf3ef.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-b11aa1e0.entry.js +0 -1
- package/dist/sankhyablocks/p-b8d06bb3.entry.js +0 -1
- package/dist/sankhyablocks/p-bad55caa.entry.js +0 -1
- package/dist/sankhyablocks/p-c2495304.js +0 -1
- package/dist/sankhyablocks/p-c5268346.entry.js +0 -1
- package/dist/sankhyablocks/p-c640163b.entry.js +0 -1
- package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
- package/dist/sankhyablocks/p-f1b31208.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- package/dist/sankhyablocks/p-f4d7fa81.js +0 -1
- package/dist/sankhyablocks/p-f51acb38.js +0 -1
- package/dist/sankhyablocks/p-fcac4dfc.js +0 -1
- package/dist/sankhyablocks/p-fe79f83a.js +0 -60
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -1,4 +1,4 @@
|
|
1
|
-
import { h, Fragment } from '@stencil/core';
|
1
|
+
import { h, Fragment, } from '@stencil/core';
|
2
2
|
import { Action as DUAction, ApplicationContext, ElementIDUtils, StringUtils } from '@sankhyalabs/core';
|
3
3
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
4
4
|
import { ConfigStorage } from '../../lib/configs/ConfigStorage';
|
@@ -11,6 +11,7 @@ import { buildFieldSearch, openFieldSearch } from '../snk-taskbar/subcomponents/
|
|
11
11
|
import { CrudUtils } from '../../lib';
|
12
12
|
import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
|
13
13
|
import ServerSideExporterProvider from '../snk-data-exporter/providers/ServerSideExporterProvider';
|
14
|
+
import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
|
14
15
|
export class SnkGrid {
|
15
16
|
constructor() {
|
16
17
|
this._customEditors = new Map();
|
@@ -19,7 +20,7 @@ export class SnkGrid {
|
|
19
20
|
"snkGridTopTaskbar.regular": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
20
21
|
"snkGridTopTaskbar.regular.secondary": ["FORM_MODE", "CONFIGURATOR", "INSERT"],
|
21
22
|
"snkGridTopTaskbar.regular.singleTaskbar": [],
|
22
|
-
"snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE"],
|
23
|
+
"snkGridTopTaskbar.finish_edition": ["CANCEL", "SAVE", this.handleAddFormMode()],
|
23
24
|
"snkGridTopTaskbar.finish_edition.secondary": [],
|
24
25
|
"snkGridTopTaskbar.finish_edition.singleTaskbar": [],
|
25
26
|
});
|
@@ -32,7 +33,7 @@ export class SnkGrid {
|
|
32
33
|
"snkGridHeaderTaskbar.singleTaskbar.selected": ["UPDATE", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "ATTACH", "FORM_MODE", "CONFIGURATOR", "REFRESH", "DATA_EXPORTER", "ACTIONS_BUTTON"],
|
33
34
|
"snkGridHeaderTaskbar.singleTaskbar.detail.unselected": ["INSERT", "FORM_MODE", "CONFIGURATOR", "REFRESH", "MORE_OPTIONS"],
|
34
35
|
"snkGridHeaderTaskbar.singleTaskbar.detail.selected": ["UPDATE", "ATTACH", "CLONE", "REMOVE", "MORE_OPTIONS", "DIVIDER", "FORM_MODE", "CONFIGURATOR", "REFRESH"],
|
35
|
-
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE"]
|
36
|
+
"snkGridHeaderTaskbar.singleTaskbar.finish_edition": ["CANCEL", "SAVE", this.handleAddFormMode()]
|
36
37
|
});
|
37
38
|
this.dataUnitInterceptor = {
|
38
39
|
interceptAction: async (action) => {
|
@@ -47,6 +48,7 @@ export class SnkGrid {
|
|
47
48
|
this._gridConfig = undefined;
|
48
49
|
this._popUpGridConfig = false;
|
49
50
|
this._showSnkFilterBar = true;
|
51
|
+
this._enableContinuousInsert = false;
|
50
52
|
this.columnFilterDataSource = new SnkMultiSelectionListDataSource();
|
51
53
|
this.configName = undefined;
|
52
54
|
this.filterBarTitle = undefined;
|
@@ -70,6 +72,8 @@ export class SnkGrid {
|
|
70
72
|
this.filterBarLegacyConfigName = undefined;
|
71
73
|
this.autoLoad = undefined;
|
72
74
|
this.autoFocus = true;
|
75
|
+
this.enableGridInsert = false;
|
76
|
+
this.enableLockManger = false;
|
73
77
|
}
|
74
78
|
/**
|
75
79
|
* Exibe a janela de configurações da grade.
|
@@ -156,6 +160,24 @@ export class SnkGrid {
|
|
156
160
|
async setFocus() {
|
157
161
|
this._grid.setFocus();
|
158
162
|
}
|
163
|
+
async handleClick(event) {
|
164
|
+
var _a;
|
165
|
+
if (this.hasToBlockEvent(event)) {
|
166
|
+
event.preventDefault();
|
167
|
+
event.stopPropagation();
|
168
|
+
if (!await this._dataUnit.cancelEdition())
|
169
|
+
return;
|
170
|
+
const newEvent = new event.constructor(event.type, event);
|
171
|
+
(_a = event.target) === null || _a === void 0 ? void 0 : _a.dispatchEvent(newEvent);
|
172
|
+
}
|
173
|
+
if (this._grid && !this._grid.contains(event.target)) {
|
174
|
+
this._grid.stopEdit();
|
175
|
+
}
|
176
|
+
}
|
177
|
+
hasToBlockEvent(event) {
|
178
|
+
var _a;
|
179
|
+
return ((_a = this._snkFilterBar) === null || _a === void 0 ? void 0 : _a.contains(event.target)) && this.enableGridInsert && this._dataUnit.hasNewRecord();
|
180
|
+
}
|
159
181
|
async handleGridLegacyConfigName(newLegacyConfig, oldLegacyConfig) {
|
160
182
|
if (!newLegacyConfig) {
|
161
183
|
return;
|
@@ -166,6 +188,9 @@ export class SnkGrid {
|
|
166
188
|
this.addGridLegacyConfigName();
|
167
189
|
this.loadConfig();
|
168
190
|
}
|
191
|
+
handleAddFormMode() {
|
192
|
+
return this.enableGridInsert ? TaskbarElement.FORM_MODE : "";
|
193
|
+
}
|
169
194
|
openGridConfig() {
|
170
195
|
this._grid.getColumnsState()
|
171
196
|
.then((gridColumns) => {
|
@@ -293,10 +318,15 @@ export class SnkGrid {
|
|
293
318
|
this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
|
294
319
|
this.addGridLegacyConfigName();
|
295
320
|
this.loadConfig();
|
321
|
+
this._continuousInsertUtils = new ContinuousInsertUtils(this._application, this.resourceID, this.configName);
|
322
|
+
if (this.enableGridInsert) {
|
323
|
+
this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
|
324
|
+
}
|
296
325
|
}
|
297
326
|
componentDidRender() {
|
327
|
+
var _a, _b;
|
298
328
|
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
299
|
-
this.loadGridCustomFormatters(this._dataUnit.metadata.fields);
|
329
|
+
this.loadGridCustomFormatters((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.metadata) === null || _b === void 0 ? void 0 : _b.fields);
|
300
330
|
this.setCustomRenders();
|
301
331
|
this.setCustomEditors();
|
302
332
|
}
|
@@ -309,7 +339,7 @@ export class SnkGrid {
|
|
309
339
|
const disabledButtons = [];
|
310
340
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
|
311
341
|
if (this._dataState.selectionInfo.length > 1) {
|
312
|
-
disabledButtons.push(TaskbarElement.CLONE, "ATTACH");
|
342
|
+
disabledButtons.push(TaskbarElement.CLONE, "ATTACH", TaskbarElement.UPDATE);
|
313
343
|
}
|
314
344
|
if (this._dataState.selectionInfo.isAllRecords()) {
|
315
345
|
disabledButtons.push("REMOVE");
|
@@ -394,6 +424,14 @@ export class SnkGrid {
|
|
394
424
|
eagerInitialize: true,
|
395
425
|
itemBuilder: (actionButton, item) => this.getColumnSearch(actionButton, item)
|
396
426
|
}];
|
427
|
+
if (this.enableGridInsert) {
|
428
|
+
hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
|
429
|
+
this._enableContinuousInsert = !this._enableContinuousInsert;
|
430
|
+
this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
|
431
|
+
}));
|
432
|
+
}
|
433
|
+
if (this.isGridInsertActive())
|
434
|
+
return hardList;
|
397
435
|
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
398
436
|
const taskbarID = this.getTopTaskBarId();
|
399
437
|
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this._dataState, this.actionsList));
|
@@ -411,12 +449,20 @@ export class SnkGrid {
|
|
411
449
|
}
|
412
450
|
this._showSnkFilterBar = true;
|
413
451
|
}
|
452
|
+
getGridHeaderButtons() {
|
453
|
+
if (this.isGridInsertActive())
|
454
|
+
return TaskbarElement.MORE_OPTIONS;
|
455
|
+
return this._headerTaskbarProcessor.buttons;
|
456
|
+
}
|
457
|
+
isGridInsertActive() {
|
458
|
+
return this.enableGridInsert && this._dataUnit.hasNewRecord();
|
459
|
+
}
|
414
460
|
render() {
|
415
461
|
if (!this._dataUnit) {
|
416
462
|
return undefined;
|
417
463
|
}
|
418
|
-
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--
|
419
|
-
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.
|
464
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--extra-small" }, this._showSnkFilterBar &&
|
465
|
+
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this.getGridHeaderButtons(), presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
420
466
|
}
|
421
467
|
static get is() { return "snk-grid"; }
|
422
468
|
static get encapsulation() { return "scoped"; }
|
@@ -862,6 +908,42 @@ export class SnkGrid {
|
|
862
908
|
"attribute": "auto-focus",
|
863
909
|
"reflect": false,
|
864
910
|
"defaultValue": "true"
|
911
|
+
},
|
912
|
+
"enableGridInsert": {
|
913
|
+
"type": "boolean",
|
914
|
+
"mutable": false,
|
915
|
+
"complexType": {
|
916
|
+
"original": "boolean",
|
917
|
+
"resolved": "boolean",
|
918
|
+
"references": {}
|
919
|
+
},
|
920
|
+
"required": false,
|
921
|
+
"optional": true,
|
922
|
+
"docs": {
|
923
|
+
"tags": [],
|
924
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
925
|
+
},
|
926
|
+
"attribute": "enable-grid-insert",
|
927
|
+
"reflect": false,
|
928
|
+
"defaultValue": "false"
|
929
|
+
},
|
930
|
+
"enableLockManger": {
|
931
|
+
"type": "boolean",
|
932
|
+
"mutable": false,
|
933
|
+
"complexType": {
|
934
|
+
"original": "boolean",
|
935
|
+
"resolved": "boolean",
|
936
|
+
"references": {}
|
937
|
+
},
|
938
|
+
"required": false,
|
939
|
+
"optional": true,
|
940
|
+
"docs": {
|
941
|
+
"tags": [],
|
942
|
+
"text": "Ativa o gerenciamento de locks na grade."
|
943
|
+
},
|
944
|
+
"attribute": "enable-lock-manger",
|
945
|
+
"reflect": false,
|
946
|
+
"defaultValue": "false"
|
865
947
|
}
|
866
948
|
};
|
867
949
|
}
|
@@ -871,7 +953,8 @@ export class SnkGrid {
|
|
871
953
|
"_dataState": {},
|
872
954
|
"_gridConfig": {},
|
873
955
|
"_popUpGridConfig": {},
|
874
|
-
"_showSnkFilterBar": {}
|
956
|
+
"_showSnkFilterBar": {},
|
957
|
+
"_enableContinuousInsert": {}
|
875
958
|
};
|
876
959
|
}
|
877
960
|
static get events() {
|
@@ -1143,4 +1226,13 @@ export class SnkGrid {
|
|
1143
1226
|
"methodName": "handleGridLegacyConfigName"
|
1144
1227
|
}];
|
1145
1228
|
}
|
1229
|
+
static get listeners() {
|
1230
|
+
return [{
|
1231
|
+
"name": "click",
|
1232
|
+
"method": "handleClick",
|
1233
|
+
"target": undefined,
|
1234
|
+
"capture": true,
|
1235
|
+
"passive": false
|
1236
|
+
}];
|
1237
|
+
}
|
1146
1238
|
}
|
@@ -146,7 +146,7 @@ export class SnkPrintSelector {
|
|
146
146
|
render() {
|
147
147
|
return (h(Host, null, h("ez-popup", Object.assign({ size: 'small', heightMode: 'full', useHeader: false, ref: (ref) => this._ezPopup = ref }, this.getElementID("snk-print-selector")), h("ez-modal-container", { modalTitle: this.getMessage("snkPrintSelector.title.printerSelection"), okButtonLabel: this.getMessage("snkPrintSelector.button.print"), okButtonStatus: this._selectedPrinter ? ModalButtonStatus.ENABLED : ModalButtonStatus.DISABLED, cancelButtonLabel: this.getMessage("snkPrintSelector.button.cancel"), onEzModalAction: (evt) => this.handleModalAction(evt.detail) }, this._isSingleJob &&
|
148
148
|
h("div", { class: 'ez-flex ez-margin-bottom--large' }, h("div", { class: 'ez-flex ez-margin-right--large' }, h("span", { class: 'ez-text ez-text--bold ez-text--medium ez-padding-right--small' }, this.getMessage("snkPrintSelector.subtitle.document")), h("span", { class: 'ez-text ez-text--primary ez-text--medium' }, this._printJobData.pendingPrinters[0].docTypeDescription)), h("div", { class: 'ez-flex ez-margin-right--large' }, h("span", { class: 'ez-text ez-text--bold ez-text--medium ez-padding-right--small' }, this.getMessage("snkPrintSelector.subtitle.jobs")), h("span", { class: 'ez-text ez-text--primary ez-text--medium' }, this._printJobData.pendingPrinters[0].printJobCount))), h("ez-tabselector", { tabs: this.buildIdTabSelector(), onEzChange: (evt) => this.onChangeTab(evt), selectedTab: this._printServerActive ? this.REMOTE_PRINTERS_TAB : this.LOCAL_PRINTERS_TAB }), h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", { hidePolicy: 'hide' }, this._printServerActive &&
|
149
|
-
h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._remotePrintersList = ref, class: `ez-padding-top--medium ${this._hasRemotePrinters ? '' : 'hidden'}`, dataSource: this._remotePrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, false), itemLeftSlotBuilder: this.buildPrinterIcon, useGroups: true, ezSelectable: true, hoverFeedback: true, "data-element-id": 'remotePrintersList' }), !this._hasRemotePrinters && this.renderNoPrinters())), h("stack-item", { hidePolicy: 'hide' }, h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._localPrintersList = ref, class: `ez-padding-top--medium ${this._hasLocalPrinters ? '' : 'hidden'}`, dataSource: this._localPrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, true), itemLeftSlotBuilder: this.buildPrinterIcon, ezSelectable: true, hoverFeedback: true }), !this._hasLocalPrinters && this.renderNoPrinters()))), h("ez-check", { label: this.getMessage("snkPrintSelector.message.savePrinter"), onEzChange: evt => this._saveSubstitute = evt.detail
|
149
|
+
h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._remotePrintersList = ref, class: `ez-padding-top--medium ${this._hasRemotePrinters ? '' : 'hidden'}`, dataSource: this._remotePrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, false), itemLeftSlotBuilder: this.buildPrinterIcon, useGroups: true, ezSelectable: true, hoverFeedback: true, "data-element-id": 'remotePrintersList' }), !this._hasRemotePrinters && this.renderNoPrinters())), h("stack-item", { hidePolicy: 'hide' }, h("div", { class: `list-scroll ez-size-height--full ${this._isSingleJob ? 'with-header' : 'without-header'}` }, h("ez-list", { ref: (ref) => this._localPrintersList = ref, class: `ez-padding-top--medium ${this._hasLocalPrinters ? '' : 'hidden'}`, dataSource: this._localPrintersDataSource, onEzSelectItem: (evt) => this.onSelectPrinter(evt.detail, true), itemLeftSlotBuilder: this.buildPrinterIcon, ezSelectable: true, hoverFeedback: true }), !this._hasLocalPrinters && this.renderNoPrinters()))), h("ez-check", { label: this.getMessage("snkPrintSelector.message.savePrinter"), onEzChange: evt => this._saveSubstitute = evt.detail })))));
|
150
150
|
}
|
151
151
|
static get is() { return "snk-print-selector"; }
|
152
152
|
static get encapsulation() { return "scoped"; }
|
@@ -26,7 +26,7 @@ export class SnkSimpleBar {
|
|
26
26
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
27
27
|
}
|
28
28
|
render() {
|
29
|
-
return (h("div", { class: "simple-bar__container ez-margin-vertical--
|
29
|
+
return (h("div", { class: "simple-bar__container ez-margin-vertical--small ez-padding--extra-small" }, h("div", { class: "simple-bar__left-slot" }, h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), h("div", { class: "simple-bar__column" }, h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), h("div", { class: "simple-bar__right-slot" }, h("slot", { name: "rightSlot" }))));
|
30
30
|
}
|
31
31
|
static get is() { return "snk-simple-bar"; }
|
32
32
|
static get encapsulation() { return "scoped"; }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
2
|
-
import { CSSVarsUtils } from
|
2
|
+
import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
3
3
|
import { h } from '@stencil/core';
|
4
4
|
import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
|
5
5
|
import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
|
@@ -13,7 +13,8 @@ import { SnkFormConfigManager } from '../snk-form-config/SnkFormConfigManager';
|
|
13
13
|
import { REGULAR_DEFAULT_BTNS, REGULAR_SELECTED_BTNS } from './regular-buttons';
|
14
14
|
import RmPrecisionCustomValueFormatter from '../../lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter';
|
15
15
|
import ClientSideExporterProvider from '../snk-data-exporter/providers/ClientSideExporterProvider';
|
16
|
-
import store from
|
16
|
+
import store from '../../lib/store';
|
17
|
+
import { ContinuousInsertUtils } from '../../lib/utils/ContinuousInsertUtils';
|
17
18
|
export class SnkSimpleCrud {
|
18
19
|
constructor() {
|
19
20
|
this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
|
@@ -22,11 +23,11 @@ export class SnkSimpleCrud {
|
|
22
23
|
this._customEditors = new Map();
|
23
24
|
this._customRenders = new Map();
|
24
25
|
this._taskbarProcessor = new TaskbarProcessor({
|
25
|
-
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE]),
|
26
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [TaskbarElement.GRID_MODE], true),
|
26
27
|
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
|
27
|
-
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE]),
|
28
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [TaskbarElement.GRID_MODE], true),
|
28
29
|
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [TaskbarElement.DATA_EXPORTER, TaskbarElement.FORM_MODE]),
|
29
|
-
"snkSimpleCrudTaskbar.finish_edition":
|
30
|
+
"snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
|
30
31
|
});
|
31
32
|
this._showPopUpGridConfig = false;
|
32
33
|
this._showFormConfig = false;
|
@@ -40,12 +41,15 @@ export class SnkSimpleCrud {
|
|
40
41
|
this.mode = SIMPLE_CRUD_MODE.SERVER;
|
41
42
|
this.gridConfig = undefined;
|
42
43
|
this.formConfig = undefined;
|
44
|
+
this.enableLockManger = false;
|
43
45
|
this._formFields = [];
|
44
46
|
this._fieldsProps = new Map();
|
47
|
+
this._enableContinuousInsert = true;
|
45
48
|
this.multipleSelection = undefined;
|
46
49
|
this.useCancelConfirm = true;
|
47
50
|
this.pageSize = 150;
|
48
51
|
this.resourceID = undefined;
|
52
|
+
this.enableGridInsert = false;
|
49
53
|
this.taskbarManager = undefined;
|
50
54
|
this.messagesBuilder = undefined;
|
51
55
|
this.useEnterLikeTab = false;
|
@@ -56,6 +60,7 @@ export class SnkSimpleCrud {
|
|
56
60
|
this.formLegacyConfigName = undefined;
|
57
61
|
this.ignoreReadOnlyFormFields = false;
|
58
62
|
this.autoFocus = true;
|
63
|
+
this.domainMessagesBuilder = undefined;
|
59
64
|
this.autoLoad = undefined;
|
60
65
|
}
|
61
66
|
/**
|
@@ -114,8 +119,19 @@ export class SnkSimpleCrud {
|
|
114
119
|
newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
|
115
120
|
this._fieldsProps = newCustomFieldProps;
|
116
121
|
}
|
117
|
-
|
118
|
-
|
122
|
+
getFinishEditionButtonsCallback() {
|
123
|
+
const btns = ["CANCEL", "SAVE"];
|
124
|
+
if (this.enableGridInsert && this._currentViewMode !== VIEW_MODE.ATTACHMENT) {
|
125
|
+
btns.push(this._currentViewMode === VIEW_MODE.GRID ? TaskbarElement.FORM_MODE : TaskbarElement.GRID_MODE);
|
126
|
+
}
|
127
|
+
return btns;
|
128
|
+
}
|
129
|
+
getButtons(selected, extraButtons, removeRefresh) {
|
130
|
+
let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
|
131
|
+
if (removeRefresh) {
|
132
|
+
btnList = btnList.filter(item => item !== TaskbarElement.REFRESH);
|
133
|
+
}
|
134
|
+
return this.addConfigButton(this.resolveInMemoryBtns(btnList)
|
119
135
|
.concat(extraButtons));
|
120
136
|
}
|
121
137
|
addConfigButton(buttons) {
|
@@ -196,7 +212,6 @@ export class SnkSimpleCrud {
|
|
196
212
|
await this.setFieldProp(field, 'precision', rmPrecision);
|
197
213
|
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
198
214
|
}
|
199
|
-
;
|
200
215
|
this._rmPrecisionCustomValueFormatter.setDataState(this.dataState);
|
201
216
|
}
|
202
217
|
async handleUpdateGridLegacyConfig(newValue, oldValue) {
|
@@ -278,7 +293,7 @@ export class SnkSimpleCrud {
|
|
278
293
|
return;
|
279
294
|
}
|
280
295
|
if (this._formConfigManager == undefined) {
|
281
|
-
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
|
296
|
+
this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID(), undefined, this.dataUnit);
|
282
297
|
this._formConfigManager.setConfig(this.formConfig);
|
283
298
|
}
|
284
299
|
if (this.formConfigIsLoaded() && !forceLoad) {
|
@@ -319,6 +334,10 @@ export class SnkSimpleCrud {
|
|
319
334
|
this.onModeChange();
|
320
335
|
this.configDatasource();
|
321
336
|
this._rmPrecisionCustomValueFormatter = new RmPrecisionCustomValueFormatter();
|
337
|
+
this._continuousInsertUtils = new ContinuousInsertUtils(this.application, this.resolveResourceID(), this.configName);
|
338
|
+
if (this.enableGridInsert) {
|
339
|
+
this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
|
340
|
+
}
|
322
341
|
}
|
323
342
|
componentDidLoad() {
|
324
343
|
CSSVarsUtils.applyVarsGrid(this._element, this._grid);
|
@@ -553,6 +572,9 @@ export class SnkSimpleCrud {
|
|
553
572
|
const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
|
554
573
|
return Promise.resolve(options);
|
555
574
|
}
|
575
|
+
isGridInsertActive() {
|
576
|
+
return this.enableGridInsert && this.dataUnit.hasNewRecord();
|
577
|
+
}
|
556
578
|
getActionsList() {
|
557
579
|
var _a, _b;
|
558
580
|
const hardList = [{
|
@@ -564,11 +586,21 @@ export class SnkSimpleCrud {
|
|
564
586
|
? this.getColumnSearch(actionButton, item)
|
565
587
|
: this.getFieldSearch(actionButton, item)
|
566
588
|
}];
|
589
|
+
if (this.enableGridInsert) {
|
590
|
+
hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
|
591
|
+
this._enableContinuousInsert = !this._enableContinuousInsert;
|
592
|
+
this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
|
593
|
+
}));
|
594
|
+
}
|
595
|
+
if (this.isGridInsertActive())
|
596
|
+
return hardList;
|
567
597
|
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
568
598
|
const taskbarID = this.getTopTaskBarId();
|
569
599
|
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
570
600
|
}
|
571
|
-
|
601
|
+
if (this.actionsList)
|
602
|
+
return hardList.concat(this.actionsList);
|
603
|
+
return hardList;
|
572
604
|
}
|
573
605
|
getTopTaskBarId() {
|
574
606
|
var _a;
|
@@ -613,9 +645,11 @@ export class SnkSimpleCrud {
|
|
613
645
|
window.removeEventListener("keydown", this._keyDownHandler);
|
614
646
|
}
|
615
647
|
gridConfigChangeHandler(evt) {
|
648
|
+
evt.stopPropagation();
|
649
|
+
if (!this.configName)
|
650
|
+
return;
|
616
651
|
const config = evt.detail;
|
617
652
|
ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
|
618
|
-
evt.stopPropagation();
|
619
653
|
}
|
620
654
|
modalConfigChangeHandler(evt) {
|
621
655
|
const config = evt.detail;
|
@@ -687,15 +721,23 @@ export class SnkSimpleCrud {
|
|
687
721
|
}
|
688
722
|
this._formConfigManager.setConfig(this.formConfig);
|
689
723
|
}
|
724
|
+
handleDataUnitOnInsertionMode() {
|
725
|
+
if (this.enableGridInsert)
|
726
|
+
return;
|
727
|
+
this.goToView(VIEW_MODE.FORM);
|
728
|
+
}
|
729
|
+
renderTaskbarContent() {
|
730
|
+
var _a;
|
731
|
+
return (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && "ez-box ez-box--shadow ez-padding--small", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
732
|
+
}
|
690
733
|
/* istanbul ignore next */
|
691
734
|
render() {
|
692
|
-
var _a;
|
693
735
|
if (this.dataUnit == undefined) {
|
694
736
|
return;
|
695
737
|
}
|
696
|
-
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode:
|
738
|
+
return (h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: this.handleDataUnitOnInsertionMode.bind(this), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
697
739
|
? undefined
|
698
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
740
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger }, this.renderTaskbarContent(), h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, this.renderTaskbarContent(), h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
699
741
|
}
|
700
742
|
static get is() { return "snk-simple-crud"; }
|
701
743
|
static get encapsulation() { return "scoped"; }
|
@@ -831,6 +873,24 @@ export class SnkSimpleCrud {
|
|
831
873
|
"text": ""
|
832
874
|
}
|
833
875
|
},
|
876
|
+
"enableLockManger": {
|
877
|
+
"type": "boolean",
|
878
|
+
"mutable": false,
|
879
|
+
"complexType": {
|
880
|
+
"original": "boolean",
|
881
|
+
"resolved": "boolean",
|
882
|
+
"references": {}
|
883
|
+
},
|
884
|
+
"required": false,
|
885
|
+
"optional": true,
|
886
|
+
"docs": {
|
887
|
+
"tags": [],
|
888
|
+
"text": ""
|
889
|
+
},
|
890
|
+
"attribute": "enable-lock-manger",
|
891
|
+
"reflect": false,
|
892
|
+
"defaultValue": "false"
|
893
|
+
},
|
834
894
|
"multipleSelection": {
|
835
895
|
"type": "boolean",
|
836
896
|
"mutable": false,
|
@@ -901,6 +961,24 @@ export class SnkSimpleCrud {
|
|
901
961
|
"attribute": "resource-i-d",
|
902
962
|
"reflect": false
|
903
963
|
},
|
964
|
+
"enableGridInsert": {
|
965
|
+
"type": "boolean",
|
966
|
+
"mutable": false,
|
967
|
+
"complexType": {
|
968
|
+
"original": "boolean",
|
969
|
+
"resolved": "boolean",
|
970
|
+
"references": {}
|
971
|
+
},
|
972
|
+
"required": false,
|
973
|
+
"optional": true,
|
974
|
+
"docs": {
|
975
|
+
"tags": [],
|
976
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
977
|
+
},
|
978
|
+
"attribute": "enable-grid-insert",
|
979
|
+
"reflect": false,
|
980
|
+
"defaultValue": "false"
|
981
|
+
},
|
904
982
|
"taskbarManager": {
|
905
983
|
"type": "unknown",
|
906
984
|
"mutable": false,
|
@@ -1086,6 +1164,23 @@ export class SnkSimpleCrud {
|
|
1086
1164
|
"reflect": false,
|
1087
1165
|
"defaultValue": "true"
|
1088
1166
|
},
|
1167
|
+
"domainMessagesBuilder": {
|
1168
|
+
"type": "string",
|
1169
|
+
"mutable": false,
|
1170
|
+
"complexType": {
|
1171
|
+
"original": "string",
|
1172
|
+
"resolved": "string",
|
1173
|
+
"references": {}
|
1174
|
+
},
|
1175
|
+
"required": false,
|
1176
|
+
"optional": false,
|
1177
|
+
"docs": {
|
1178
|
+
"tags": [],
|
1179
|
+
"text": "Define a chave customizada para sobrescrever as mensagens (N\u00E3o pegando pela entidade)"
|
1180
|
+
},
|
1181
|
+
"attribute": "domain-messages-builder",
|
1182
|
+
"reflect": false
|
1183
|
+
},
|
1089
1184
|
"autoLoad": {
|
1090
1185
|
"type": "boolean",
|
1091
1186
|
"mutable": false,
|
@@ -1114,7 +1209,8 @@ export class SnkSimpleCrud {
|
|
1114
1209
|
"_fieldToGetFocus": {},
|
1115
1210
|
"_customContainerId": {},
|
1116
1211
|
"_formFields": {},
|
1117
|
-
"_fieldsProps": {}
|
1212
|
+
"_fieldsProps": {},
|
1213
|
+
"_enableContinuousInsert": {}
|
1118
1214
|
};
|
1119
1215
|
}
|
1120
1216
|
static get events() {
|
@@ -29,12 +29,16 @@ export default class TaskbarProcessor {
|
|
29
29
|
});
|
30
30
|
}
|
31
31
|
getButtonsArray(taskbarId, taskbarManager, dataState) {
|
32
|
-
const defaults = this.
|
32
|
+
const defaults = this.getButtonsFromKey(taskbarId);
|
33
33
|
if (taskbarManager) {
|
34
34
|
return taskbarManager.getButtons(taskbarId, dataState, [...defaults]);
|
35
35
|
}
|
36
36
|
return defaults;
|
37
37
|
}
|
38
|
+
getButtonsFromKey(taskbarId) {
|
39
|
+
const btnsValue = this._defaultButtons[taskbarId];
|
40
|
+
return typeof btnsValue === 'function' ? btnsValue() : btnsValue;
|
41
|
+
}
|
38
42
|
isEnabled(taskbarId, taskbarManager, buttonName, dataState, disabled) {
|
39
43
|
const originalValue = disabled.includes(buttonName) ? false : true;
|
40
44
|
if (taskbarManager && taskbarManager.isEnabled) {
|