@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
@@ -7,20 +7,20 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
8
|
const constants = require('./constants-35ddd366.js');
|
9
9
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./pesquisa-fetcher-
|
12
|
-
const
|
10
|
+
require('./DataFetcher-e059eb72.js');
|
11
|
+
require('./pesquisa-fetcher-a9bfeb22.js');
|
12
|
+
const ContinuousInsertUtils = require('./ContinuousInsertUtils-64e47516.js');
|
13
13
|
const index = require('./index-1dfc7a6e.js');
|
14
14
|
require('./ISave-e91b70a7.js');
|
15
15
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
17
|
+
const dataunitFetcher = require('./dataunit-fetcher-228016f4.js');
|
18
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
19
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
20
|
-
const fieldSearch = require('./field-search-
|
21
|
-
const ConfigStorage = require('./ConfigStorage-
|
22
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
23
|
-
const
|
19
|
+
const formConfigFetcher = require('./form-config-fetcher-39397ac5.js');
|
20
|
+
const fieldSearch = require('./field-search-68e34bf4.js');
|
21
|
+
const ConfigStorage = require('./ConfigStorage-f079f5fd.js');
|
22
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-63369164.js');
|
23
|
+
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
24
24
|
const index$2 = require('./index-102ba62d.js');
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
26
26
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
@@ -31,7 +31,7 @@ require('./ResourceIDUtils-5ff86aa7.js');
|
|
31
31
|
const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
|
32
32
|
const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
|
33
33
|
|
34
|
-
class ClientSideExporterProvider extends
|
34
|
+
class ClientSideExporterProvider extends ContinuousInsertUtils.CommonsExporter {
|
35
35
|
getSelectedNumber() {
|
36
36
|
return this.dataUnit.getSelectionInfo().length;
|
37
37
|
}
|
@@ -41,7 +41,7 @@ class ClientSideExporterProvider extends IExporterProvider.CommonsExporter {
|
|
41
41
|
return total !== null && total !== void 0 ? total : (_c = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.records) === null || _c === void 0 ? void 0 : _c.length;
|
42
42
|
}
|
43
43
|
getSelectedIDs() {
|
44
|
-
return
|
44
|
+
return GetSelectedRecordsIDsInfo.getSelectedRecordsIDsInfo(this.dataUnit);
|
45
45
|
}
|
46
46
|
getRecordID() {
|
47
47
|
var _a, _b, _c;
|
@@ -86,7 +86,7 @@ class ClientSideExporterProvider extends IExporterProvider.CommonsExporter {
|
|
86
86
|
}
|
87
87
|
}
|
88
88
|
|
89
|
-
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;
|
89
|
+
const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";
|
90
90
|
|
91
91
|
const SnkSimpleCrud = class {
|
92
92
|
constructor(hostRef) {
|
@@ -97,17 +97,17 @@ const SnkSimpleCrud = class {
|
|
97
97
|
this.formItemsReady = index$1.createEvent(this, "formItemsReady", 7);
|
98
98
|
this.configuratorSave = index$1.createEvent(this, "configuratorSave", 7);
|
99
99
|
this.configuratorCancel = index$1.createEvent(this, "configuratorCancel", 7);
|
100
|
-
this._multiSelectionListDataSource = new
|
100
|
+
this._multiSelectionListDataSource = new ContinuousInsertUtils.SnkMultiSelectionListDataSource();
|
101
101
|
this._keyDownHandler = (event) => this.keyDownListener(event);
|
102
102
|
this._formConfigFetcher = new formConfigFetcher.FormConfigFetcher();
|
103
103
|
this._customEditors = new Map();
|
104
104
|
this._customRenders = new Map();
|
105
105
|
this._taskbarProcessor = new fieldSearch.TaskbarProcessor({
|
106
|
-
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [taskbarElements.TaskbarElement.GRID_MODE]),
|
106
|
+
"snkSimpleCrudTaskbar.form_regular": this.getButtons(false, [taskbarElements.TaskbarElement.GRID_MODE], true),
|
107
107
|
"snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, [taskbarElements.TaskbarElement.DATA_EXPORTER, taskbarElements.TaskbarElement.FORM_MODE]),
|
108
|
-
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [taskbarElements.TaskbarElement.GRID_MODE]),
|
108
|
+
"snkSimpleCrudTaskbar.form_selected": this.getButtons(true, [taskbarElements.TaskbarElement.GRID_MODE], true),
|
109
109
|
"snkSimpleCrudTaskbar.grid_selected": this.getButtons(true, [taskbarElements.TaskbarElement.DATA_EXPORTER, taskbarElements.TaskbarElement.FORM_MODE]),
|
110
|
-
"snkSimpleCrudTaskbar.finish_edition":
|
110
|
+
"snkSimpleCrudTaskbar.finish_edition": this.getFinishEditionButtonsCallback.bind(this)
|
111
111
|
});
|
112
112
|
this._showPopUpGridConfig = false;
|
113
113
|
this._showFormConfig = false;
|
@@ -121,12 +121,15 @@ const SnkSimpleCrud = class {
|
|
121
121
|
this.mode = constants.SIMPLE_CRUD_MODE.SERVER;
|
122
122
|
this.gridConfig = undefined;
|
123
123
|
this.formConfig = undefined;
|
124
|
+
this.enableLockManger = false;
|
124
125
|
this._formFields = [];
|
125
126
|
this._fieldsProps = new Map();
|
127
|
+
this._enableContinuousInsert = true;
|
126
128
|
this.multipleSelection = undefined;
|
127
129
|
this.useCancelConfirm = true;
|
128
130
|
this.pageSize = 150;
|
129
131
|
this.resourceID = undefined;
|
132
|
+
this.enableGridInsert = false;
|
130
133
|
this.taskbarManager = undefined;
|
131
134
|
this.messagesBuilder = undefined;
|
132
135
|
this.useEnterLikeTab = false;
|
@@ -137,6 +140,7 @@ const SnkSimpleCrud = class {
|
|
137
140
|
this.formLegacyConfigName = undefined;
|
138
141
|
this.ignoreReadOnlyFormFields = false;
|
139
142
|
this.autoFocus = true;
|
143
|
+
this.domainMessagesBuilder = undefined;
|
140
144
|
this.autoLoad = undefined;
|
141
145
|
}
|
142
146
|
/**
|
@@ -195,8 +199,19 @@ const SnkSimpleCrud = class {
|
|
195
199
|
newCustomFieldProps.set(fieldName, Object.assign(Object.assign({}, currentProps), { [propName]: value }));
|
196
200
|
this._fieldsProps = newCustomFieldProps;
|
197
201
|
}
|
198
|
-
|
199
|
-
|
202
|
+
getFinishEditionButtonsCallback() {
|
203
|
+
const btns = ["CANCEL", "SAVE"];
|
204
|
+
if (this.enableGridInsert && this._currentViewMode !== constants.VIEW_MODE.ATTACHMENT) {
|
205
|
+
btns.push(this._currentViewMode === constants.VIEW_MODE.GRID ? taskbarElements.TaskbarElement.FORM_MODE : taskbarElements.TaskbarElement.GRID_MODE);
|
206
|
+
}
|
207
|
+
return btns;
|
208
|
+
}
|
209
|
+
getButtons(selected, extraButtons, removeRefresh) {
|
210
|
+
let btnList = selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS;
|
211
|
+
if (removeRefresh) {
|
212
|
+
btnList = btnList.filter(item => item !== taskbarElements.TaskbarElement.REFRESH);
|
213
|
+
}
|
214
|
+
return this.addConfigButton(this.resolveInMemoryBtns(btnList)
|
200
215
|
.concat(extraButtons));
|
201
216
|
}
|
202
217
|
addConfigButton(buttons) {
|
@@ -358,7 +373,7 @@ const SnkSimpleCrud = class {
|
|
358
373
|
return;
|
359
374
|
}
|
360
375
|
if (this._formConfigManager == undefined) {
|
361
|
-
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID());
|
376
|
+
this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resolveResourceID(), undefined, this.dataUnit);
|
362
377
|
this._formConfigManager.setConfig(this.formConfig);
|
363
378
|
}
|
364
379
|
if (this.formConfigIsLoaded() && !forceLoad) {
|
@@ -398,7 +413,11 @@ const SnkSimpleCrud = class {
|
|
398
413
|
this.processMetadata();
|
399
414
|
this.onModeChange();
|
400
415
|
this.configDatasource();
|
401
|
-
this._rmPrecisionCustomValueFormatter = new
|
416
|
+
this._rmPrecisionCustomValueFormatter = new ContinuousInsertUtils.RmPrecisionCustomValueFormatter();
|
417
|
+
this._continuousInsertUtils = new ContinuousInsertUtils.ContinuousInsertUtils(this.application, this.resolveResourceID(), this.configName);
|
418
|
+
if (this.enableGridInsert) {
|
419
|
+
this._continuousInsertUtils.getConfig().then(value => this._enableContinuousInsert = value);
|
420
|
+
}
|
402
421
|
}
|
403
422
|
componentDidLoad() {
|
404
423
|
utils.CSSVarsUtils.applyVarsGrid(this._element, this._grid);
|
@@ -633,6 +652,9 @@ const SnkSimpleCrud = class {
|
|
633
652
|
const options = filteredFields.map(field => ({ value: field.name, label: field.label }));
|
634
653
|
return Promise.resolve(options);
|
635
654
|
}
|
655
|
+
isGridInsertActive() {
|
656
|
+
return this.enableGridInsert && this.dataUnit.hasNewRecord();
|
657
|
+
}
|
636
658
|
getActionsList() {
|
637
659
|
var _a, _b;
|
638
660
|
const hardList = [{
|
@@ -644,11 +666,21 @@ const SnkSimpleCrud = class {
|
|
644
666
|
? this.getColumnSearch(actionButton, item)
|
645
667
|
: this.getFieldSearch(actionButton, item)
|
646
668
|
}];
|
669
|
+
if (this.enableGridInsert) {
|
670
|
+
hardList.push(this._continuousInsertUtils.actionContinuousInsert(this._enableContinuousInsert, () => {
|
671
|
+
this._enableContinuousInsert = !this._enableContinuousInsert;
|
672
|
+
this._continuousInsertUtils.handleSaveConfig(this._enableContinuousInsert);
|
673
|
+
}));
|
674
|
+
}
|
675
|
+
if (this.isGridInsertActive())
|
676
|
+
return hardList;
|
647
677
|
if (this.taskbarManager != undefined && this.taskbarManager.getMoreOptions != undefined) {
|
648
678
|
const taskbarID = this.getTopTaskBarId();
|
649
679
|
return hardList.concat(this.taskbarManager.getMoreOptions(taskbarID, this.configName, this.dataState, this.actionsList));
|
650
680
|
}
|
651
|
-
|
681
|
+
if (this.actionsList)
|
682
|
+
return hardList.concat(this.actionsList);
|
683
|
+
return hardList;
|
652
684
|
}
|
653
685
|
getTopTaskBarId() {
|
654
686
|
var _a;
|
@@ -693,9 +725,11 @@ const SnkSimpleCrud = class {
|
|
693
725
|
window.removeEventListener("keydown", this._keyDownHandler);
|
694
726
|
}
|
695
727
|
gridConfigChangeHandler(evt) {
|
728
|
+
evt.stopPropagation();
|
729
|
+
if (!this.configName)
|
730
|
+
return;
|
696
731
|
const config = evt.detail;
|
697
732
|
ConfigStorage.ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
|
698
|
-
evt.stopPropagation();
|
699
733
|
}
|
700
734
|
modalConfigChangeHandler(evt) {
|
701
735
|
const config = evt.detail;
|
@@ -722,7 +756,7 @@ const SnkSimpleCrud = class {
|
|
722
756
|
}
|
723
757
|
setGridConfig(config) {
|
724
758
|
this.gridConfig = config;
|
725
|
-
|
759
|
+
ContinuousInsertUtils.CrudUtils.assertDefaultSorting(this.gridConfig, this.dataUnit);
|
726
760
|
}
|
727
761
|
setFormConfig(config, forceUpdate) {
|
728
762
|
if (this.formConfig && !forceUpdate)
|
@@ -767,15 +801,23 @@ const SnkSimpleCrud = class {
|
|
767
801
|
}
|
768
802
|
this._formConfigManager.setConfig(this.formConfig);
|
769
803
|
}
|
804
|
+
handleDataUnitOnInsertionMode() {
|
805
|
+
if (this.enableGridInsert)
|
806
|
+
return;
|
807
|
+
this.goToView(constants.VIEW_MODE.FORM);
|
808
|
+
}
|
809
|
+
renderTaskbarContent() {
|
810
|
+
var _a;
|
811
|
+
return (index$1.h("snk-taskbar", { class: this._currentViewMode === constants.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: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
812
|
+
}
|
770
813
|
/* istanbul ignore next */
|
771
814
|
render() {
|
772
|
-
var _a;
|
773
815
|
if (this.dataUnit == undefined) {
|
774
816
|
return;
|
775
817
|
}
|
776
|
-
return (index$1.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:
|
818
|
+
return (index$1.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 === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.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(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
777
819
|
? undefined
|
778
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, index$1.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() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.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 })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
820
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus, enableGridInsert: this.enableGridInsert, enableContinuousInsert: this._enableContinuousInsert, enableLockManger: this.enableLockManger }, this.renderTaskbarContent(), index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, this.renderTaskbarContent(), index$1.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() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.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 })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
779
821
|
}
|
780
822
|
get _element() { return index$1.getElement(this); }
|
781
823
|
static get watchers() { return {
|
@@ -15,6 +15,8 @@ const SnkTaskbar = class {
|
|
15
15
|
constructor(hostRef) {
|
16
16
|
index.registerInstance(this, hostRef);
|
17
17
|
this.actionClick = index.createEvent(this, "actionClick", 7);
|
18
|
+
this.taskbarSaveLocker = index.createEvent(this, "taskbarSaveLocker", 7);
|
19
|
+
this.taskbarSaveUnlocker = index.createEvent(this, "taskbarSaveUnlocker", 7);
|
18
20
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
19
21
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
20
22
|
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
@@ -38,8 +40,10 @@ const SnkTaskbar = class {
|
|
38
40
|
this.onSaveEvent = (action) => {
|
39
41
|
switch (action.type) {
|
40
42
|
case core.Action.FIELD_INVALIDATED:
|
43
|
+
case core.Action.INVALIDATE_CLEAN:
|
41
44
|
case core.Action.DATA_SAVED:
|
42
45
|
case core.Action.SAVING_ERROR:
|
46
|
+
case core.Action.SAVING_CANCELED:
|
43
47
|
this._isWaitingForSave = false;
|
44
48
|
break;
|
45
49
|
case core.Action.SAVING_DATA:
|
@@ -76,6 +80,16 @@ const SnkTaskbar = class {
|
|
76
80
|
this.getCustomElements(true);
|
77
81
|
}
|
78
82
|
}
|
83
|
+
handleTaskbarSaveLocker() {
|
84
|
+
if (this._isWaitingForSave !== true) {
|
85
|
+
this._isWaitingForSave = true;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
handleTaskbarSaveUnlocker() {
|
89
|
+
if (this._isWaitingForSave === true) {
|
90
|
+
this._isWaitingForSave = false;
|
91
|
+
}
|
92
|
+
}
|
79
93
|
hasToSearchCustomElements(event) {
|
80
94
|
return this.customSlotId === event.detail && !this._slotContainer;
|
81
95
|
}
|
@@ -94,6 +108,14 @@ const SnkTaskbar = class {
|
|
94
108
|
this._hasToUpdateOverFlow = true;
|
95
109
|
}
|
96
110
|
}
|
111
|
+
observeIsWaitingForSave(newValue, oldValue) {
|
112
|
+
if (newValue == true && oldValue == false) {
|
113
|
+
this.taskbarSaveLocker.emit();
|
114
|
+
}
|
115
|
+
if (newValue == false && oldValue == true) {
|
116
|
+
this.taskbarSaveUnlocker.emit();
|
117
|
+
}
|
118
|
+
}
|
97
119
|
// Internal methods
|
98
120
|
elementsFromString(strButtons) {
|
99
121
|
const elements = [];
|
@@ -138,42 +160,44 @@ const SnkTaskbar = class {
|
|
138
160
|
return key ? (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, {}) : "";
|
139
161
|
}
|
140
162
|
elementClick(elem) {
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
this._isWaitingForSave
|
167
|
-
|
168
|
-
.
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
163
|
+
core.LockManager.whenResolve(this._element, core.LockManagerOperation.TASKBAR_CLICK).then(() => {
|
164
|
+
if (this.dataUnit) {
|
165
|
+
switch (elem) {
|
166
|
+
case taskbarElements.TaskbarElement.PREVIOUS:
|
167
|
+
this.dataUnit.previousRecord();
|
168
|
+
break;
|
169
|
+
case taskbarElements.TaskbarElement.NEXT:
|
170
|
+
this.dataUnit.nextRecord();
|
171
|
+
break;
|
172
|
+
case taskbarElements.TaskbarElement.REFRESH:
|
173
|
+
this.dataUnit.loadData();
|
174
|
+
break;
|
175
|
+
case taskbarElements.TaskbarElement.CLONE:
|
176
|
+
this.dataUnit.copySelected();
|
177
|
+
break;
|
178
|
+
case taskbarElements.TaskbarElement.REMOVE:
|
179
|
+
this.dataUnit.removeSelectedRecords();
|
180
|
+
break;
|
181
|
+
case taskbarElements.TaskbarElement.INSERT:
|
182
|
+
this.dataUnit.addRecord();
|
183
|
+
break;
|
184
|
+
case taskbarElements.TaskbarElement.CANCEL:
|
185
|
+
this.dataUnit.cancelEdition();
|
186
|
+
break;
|
187
|
+
case taskbarElements.TaskbarElement.SAVE:
|
188
|
+
if (!this._isWaitingForSave) {
|
189
|
+
this._isWaitingForSave = true;
|
190
|
+
this.dataUnit.saveData()
|
191
|
+
.finally(() => {
|
192
|
+
this._isWaitingForSave = false;
|
193
|
+
});
|
194
|
+
}
|
195
|
+
break;
|
196
|
+
}
|
173
197
|
}
|
174
|
-
|
175
|
-
|
176
|
-
|
198
|
+
if (this.isEnabled(elem))
|
199
|
+
this.actionClick.emit(elem);
|
200
|
+
});
|
177
201
|
}
|
178
202
|
isEnabled(elem) {
|
179
203
|
if (!this.isAllowed(elem)) {
|
@@ -377,9 +401,10 @@ const SnkTaskbar = class {
|
|
377
401
|
this._lastWidth = this._element.getBoundingClientRect().width;
|
378
402
|
}
|
379
403
|
disconnectedCallback() {
|
380
|
-
var _a;
|
404
|
+
var _a, _b;
|
405
|
+
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.unsubscribe(this.onSaveEvent);
|
381
406
|
this.unlinkAllCustomElements();
|
382
|
-
(
|
407
|
+
(_b = this._overFlowWatcher) === null || _b === void 0 ? void 0 : _b.destroy();
|
383
408
|
}
|
384
409
|
unlinkAllCustomElements() {
|
385
410
|
var _a;
|
@@ -422,7 +447,8 @@ const SnkTaskbar = class {
|
|
422
447
|
static get watchers() { return {
|
423
448
|
"buttons": ["observeButtons"],
|
424
449
|
"disabledButtons": ["observeDisabledButtons"],
|
425
|
-
"_lastWidth": ["observeLastWidth"]
|
450
|
+
"_lastWidth": ["observeLastWidth"],
|
451
|
+
"_isWaitingForSave": ["observeIsWaitingForSave"]
|
426
452
|
}; }
|
427
453
|
};
|
428
454
|
SnkTaskbar.style = snkTaskbarCss;
|
@@ -65,21 +65,6 @@
|
|
65
65
|
"snk-application"
|
66
66
|
]
|
67
67
|
},
|
68
|
-
{
|
69
|
-
"components": [
|
70
|
-
"snk-form"
|
71
|
-
]
|
72
|
-
},
|
73
|
-
{
|
74
|
-
"components": [
|
75
|
-
"snk-form-config"
|
76
|
-
]
|
77
|
-
},
|
78
|
-
{
|
79
|
-
"components": [
|
80
|
-
"snk-config-options"
|
81
|
-
]
|
82
|
-
},
|
83
68
|
{
|
84
69
|
"components": [
|
85
70
|
"snk-tab-config"
|
@@ -132,42 +117,37 @@
|
|
132
117
|
},
|
133
118
|
{
|
134
119
|
"components": [
|
135
|
-
"snk-
|
136
|
-
]
|
137
|
-
},
|
138
|
-
{
|
139
|
-
"components": [
|
140
|
-
"snk-filter-item"
|
141
|
-
]
|
142
|
-
},
|
143
|
-
{
|
144
|
-
"components": [
|
145
|
-
"snk-filter-list"
|
120
|
+
"snk-field-config"
|
146
121
|
]
|
147
122
|
},
|
148
123
|
{
|
149
124
|
"components": [
|
150
|
-
"snk-
|
125
|
+
"snk-grid"
|
151
126
|
]
|
152
127
|
},
|
153
128
|
{
|
154
129
|
"components": [
|
155
|
-
"snk-
|
130
|
+
"snk-pesquisa"
|
156
131
|
]
|
157
132
|
},
|
158
133
|
{
|
159
134
|
"components": [
|
160
|
-
"snk-
|
135
|
+
"snk-taskbar"
|
161
136
|
]
|
162
137
|
},
|
163
138
|
{
|
164
139
|
"components": [
|
165
|
-
"snk-
|
140
|
+
"snk-config-options",
|
141
|
+
"snk-form",
|
142
|
+
"snk-form-config"
|
166
143
|
]
|
167
144
|
},
|
168
145
|
{
|
169
146
|
"components": [
|
170
|
-
"snk-
|
147
|
+
"snk-filter-bar",
|
148
|
+
"snk-filter-item",
|
149
|
+
"snk-filter-list",
|
150
|
+
"snk-filter-modal"
|
171
151
|
]
|
172
152
|
}
|
173
153
|
]
|
@@ -3,9 +3,9 @@ import { RefreshType } from "./enum/RefreshType";
|
|
3
3
|
import { ParamType } from "./enum/ParamType";
|
4
4
|
import { DataFetcher } from "../../../lib";
|
5
5
|
import { ActionsType } from "./enum/ActionsType";
|
6
|
+
import { getSelectedRecordsIDsInfo } from "../../../lib/utils/GetSelectedRecordsIDsInfo";
|
6
7
|
const MASTER_ROW_PROPERTY = "__MASTER_ROW__";
|
7
8
|
const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
|
8
|
-
const NUFIN_COLUMN = 'NUFIN';
|
9
9
|
const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
|
10
10
|
export default class Actions {
|
11
11
|
constructor(actionsExecuteInterface, dataUnit, appResourceId) {
|
@@ -17,6 +17,10 @@ export default class Actions {
|
|
17
17
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
18
18
|
this._appResourceId = appResourceId;
|
19
19
|
}
|
20
|
+
getPrimaryKeys() {
|
21
|
+
const ids = getSelectedRecordsIDsInfo(this._dataUnit);
|
22
|
+
return ids.map(({ name }) => name);
|
23
|
+
}
|
20
24
|
apply(action, hasParamsToSave) {
|
21
25
|
this._application.closePopUp();
|
22
26
|
this._actionsExecuteInterface.execute(action, this._dataUnit)
|
@@ -285,6 +289,7 @@ export default class Actions {
|
|
285
289
|
executeAction(execSource);
|
286
290
|
}
|
287
291
|
addRows(execSource) {
|
292
|
+
const primaryKeys = this.getPrimaryKeys();
|
288
293
|
const rows = {
|
289
294
|
row: []
|
290
295
|
};
|
@@ -298,15 +303,13 @@ export default class Actions {
|
|
298
303
|
delete sourceRow[MASTER_ROW_PROPERTY];
|
299
304
|
delete sourceRow[ENTITY_NAME_PROPERTY];
|
300
305
|
}
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
row.field = [];
|
306
|
-
}
|
306
|
+
if (!row.field) {
|
307
|
+
row.field = [];
|
308
|
+
}
|
309
|
+
for (const primaryKey of primaryKeys) {
|
307
310
|
row.field.push({
|
308
|
-
fieldName:
|
309
|
-
$: sourceRow[
|
311
|
+
fieldName: primaryKey,
|
312
|
+
$: sourceRow[primaryKey]
|
310
313
|
});
|
311
314
|
}
|
312
315
|
rows.row.push(row);
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
2
|
-
import { ApplicationContext, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, ArrayUtils, ElementIDUtils, ServiceUtils, StorageType } from '@sankhyalabs/core';
|
3
3
|
import { DataFetcher } from '../../lib/http/data-fetcher/DataFetcher';
|
4
4
|
import ExecutorFactory from './actions/factory/executor.factory';
|
5
5
|
import Actions from './actions';
|
@@ -8,6 +8,7 @@ import ResourceIDUtils from '../../lib/resourceid/ResourceIDUtils';
|
|
8
8
|
export class SnkActionsButton {
|
9
9
|
constructor() {
|
10
10
|
this.CLIENT_EVENT_CONFIRM_NAME = "br.com.sankhya.actionbutton.clientconfirm";
|
11
|
+
this._actions = [];
|
11
12
|
this.handleClick = (evt) => {
|
12
13
|
const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
|
13
14
|
const executor = new ExecutorFactory(selectedAction.type).executor;
|
@@ -17,27 +18,22 @@ export class SnkActionsButton {
|
|
17
18
|
};
|
18
19
|
this._items = [];
|
19
20
|
this._showDropdown = false;
|
20
|
-
this._actions = [];
|
21
|
-
this._isOrderActions = false;
|
22
21
|
}
|
23
22
|
async getActions() {
|
24
|
-
|
25
|
-
param: {
|
26
|
-
entityName: this._entityName,
|
27
|
-
resourceID: this._resourceID
|
28
|
-
}
|
29
|
-
};
|
30
|
-
return DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param).then((result) => {
|
23
|
+
const actions = await ServiceUtils.useCacheWithService(`SnkActionsButton_${this._entityName}-${this._resourceID}`, async () => {
|
31
24
|
var _a;
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
});
|
25
|
+
const param = {
|
26
|
+
param: {
|
27
|
+
entityName: this._entityName,
|
28
|
+
resourceID: this._resourceID,
|
29
|
+
},
|
30
|
+
};
|
31
|
+
const result = await DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param);
|
32
|
+
return ((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action) || [];
|
33
|
+
}, StorageType.IN_MEMORY_CACHE);
|
34
|
+
this._actions = SnkActionsButton.parameters.isOrderActions
|
35
|
+
? ArrayUtils.sortAlphabetically(actions, 'description')
|
36
|
+
: actions;
|
41
37
|
}
|
42
38
|
controlDropdown() {
|
43
39
|
this._showDropdown = !this._showDropdown;
|
@@ -70,7 +66,7 @@ export class SnkActionsButton {
|
|
70
66
|
}
|
71
67
|
async componentWillLoad() {
|
72
68
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
73
|
-
|
69
|
+
await this.loadParameters();
|
74
70
|
const snkDataUnit = this._element.parentElement;
|
75
71
|
this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
|
76
72
|
this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
|
@@ -79,9 +75,8 @@ export class SnkActionsButton {
|
|
79
75
|
this._resourceID = await ResourceIDUtils.getResourceID();
|
80
76
|
}
|
81
77
|
this.setEvents();
|
82
|
-
this.getActions()
|
83
|
-
|
84
|
-
});
|
78
|
+
await this.getActions();
|
79
|
+
this.loadItems();
|
85
80
|
}
|
86
81
|
async componentDidLoad() {
|
87
82
|
if (!this._element)
|
@@ -108,6 +103,11 @@ export class SnkActionsButton {
|
|
108
103
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
|
109
104
|
};
|
110
105
|
}
|
106
|
+
async loadParameters() {
|
107
|
+
if (SnkActionsButton.parameters.isOrderActions != null)
|
108
|
+
return;
|
109
|
+
SnkActionsButton.parameters.isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
|
110
|
+
}
|
111
111
|
render() {
|
112
112
|
return (h(Host, null, (this._actions && this._actions.length > 0) &&
|
113
113
|
(h("div", { class: `ez-padding-left--medium snk-actions-button
|
@@ -134,10 +134,11 @@ export class SnkActionsButton {
|
|
134
134
|
static get states() {
|
135
135
|
return {
|
136
136
|
"_items": {},
|
137
|
-
"_showDropdown": {}
|
138
|
-
"_actions": {},
|
139
|
-
"_isOrderActions": {}
|
137
|
+
"_showDropdown": {}
|
140
138
|
};
|
141
139
|
}
|
142
140
|
static get elementRef() { return "_element"; }
|
143
141
|
}
|
142
|
+
SnkActionsButton.parameters = {
|
143
|
+
isOrderActions: null
|
144
|
+
};
|
package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
class DebouncedRequestListener {
|
2
|
+
constructor() {
|
3
|
+
this._debounceTime = 1500;
|
4
|
+
this.requests = new Map();
|
5
|
+
this.requestsLoadingBar = [];
|
6
|
+
}
|
7
|
+
onRequestStart(param) {
|
8
|
+
if (param.url.includes("quietMode=true")) {
|
9
|
+
return;
|
10
|
+
}
|
11
|
+
this.requestsLoadingBar.push(param.requestId);
|
12
|
+
const timeout = setTimeout(() => {
|
13
|
+
this.ezLoadingBar.show();
|
14
|
+
}, this._debounceTime);
|
15
|
+
this.requests.set(param.requestId, timeout);
|
16
|
+
}
|
17
|
+
;
|
18
|
+
onRequestEnd(param) {
|
19
|
+
const timeoutId = this.requests.get(param.requestId);
|
20
|
+
clearTimeout(timeoutId);
|
21
|
+
if (this.requestsLoadingBar.includes(param.requestId)) {
|
22
|
+
this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
|
23
|
+
!this.requestsLoadingBar.length && this.ezLoadingBar.hide();
|
24
|
+
}
|
25
|
+
}
|
26
|
+
;
|
27
|
+
}
|
28
|
+
export default DebouncedRequestListener;
|