@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
@@ -235,6 +235,21 @@ function applyFilter(records, dataUnit, filters) {
|
|
235
235
|
}
|
236
236
|
return records.filter(filterFunction);
|
237
237
|
}
|
238
|
+
function buildLoadDataResponse(recordsIn, dataUnit, request) {
|
239
|
+
let records = recordsIn ? [...recordsIn] : [];
|
240
|
+
records = applyFilter(records, dataUnit, request.filters);
|
241
|
+
records = applySorting(records, dataUnit, request.sort);
|
242
|
+
const { offset, limit } = request;
|
243
|
+
const paginationInfoBuilderParams = {
|
244
|
+
recordsLength: records.length,
|
245
|
+
offset,
|
246
|
+
recordsPerPage: limit,
|
247
|
+
};
|
248
|
+
return Promise.resolve({
|
249
|
+
records: getPagesByRecords(records, offset, limit),
|
250
|
+
paginationInfo: buildPaginationInfo(paginationInfoBuilderParams),
|
251
|
+
});
|
252
|
+
}
|
238
253
|
function applySorting(records, dataUnit, sorting) {
|
239
254
|
if (sorting == undefined || sorting.length == 0) {
|
240
255
|
return records;
|
@@ -245,18 +260,28 @@ function applySorting(records, dataUnit, sorting) {
|
|
245
260
|
}
|
246
261
|
return records.sort(sortingFunction);
|
247
262
|
}
|
248
|
-
function
|
249
|
-
|
250
|
-
|
263
|
+
function hasValidLimitAndOffset(offset, limit) {
|
264
|
+
return offset >= 0 && limit >= 0;
|
265
|
+
}
|
266
|
+
function getPagesByRecords(records, offset = 0, limit = 0) {
|
267
|
+
if (!records || !records.length || !hasValidLimitAndOffset(offset, limit))
|
268
|
+
return [];
|
269
|
+
if (limit === 0 && offset === 0)
|
270
|
+
return records;
|
271
|
+
return records.slice(offset, offset + limit);
|
272
|
+
}
|
273
|
+
function buildPaginationInfo({ recordsLength = 0, offset = 0, recordsPerPage = 0 }) {
|
274
|
+
if (!recordsLength) {
|
275
|
+
return { currentPage: 0, firstRecord: 0, lastRecord: 0, total: 0, hasMore: false };
|
251
276
|
}
|
252
|
-
const
|
253
|
-
const lastRecord = Math.min(
|
277
|
+
const lastRecordIndex = offset + recordsPerPage;
|
278
|
+
const lastRecord = lastRecordIndex ? Math.min(lastRecordIndex, recordsLength) : recordsLength;
|
254
279
|
return {
|
255
|
-
currentPage:
|
256
|
-
firstRecord: offset,
|
280
|
+
currentPage: recordsPerPage === 0 ? 0 : Math.ceil(offset / recordsPerPage),
|
281
|
+
firstRecord: offset + 1,
|
257
282
|
lastRecord: lastRecord,
|
258
|
-
total:
|
259
|
-
hasMore:
|
283
|
+
total: recordsLength,
|
284
|
+
hasMore: lastRecord < recordsLength,
|
260
285
|
};
|
261
286
|
}
|
262
287
|
|
@@ -342,9 +367,7 @@ class InMemoryLoader {
|
|
342
367
|
return StringUtils.generateUUID();
|
343
368
|
}
|
344
369
|
inMemoryLoader(dataUnit, request, recordsIn) {
|
345
|
-
|
346
|
-
records = applySorting(records, dataUnit, request.sort);
|
347
|
-
return Promise.resolve({ records, paginationInfo: buildPaginationInfo(records, request.offset, request.limit) });
|
370
|
+
return buildLoadDataResponse(recordsIn, dataUnit, request);
|
348
371
|
}
|
349
372
|
metadaLoader() {
|
350
373
|
return Promise.resolve(this._metadata);
|
@@ -424,12 +447,19 @@ class DatasetStrategy {
|
|
424
447
|
const records = this.processRecords(dataUnit, fields, responseRecords);
|
425
448
|
const loadingInProgress = pagerId != undefined;
|
426
449
|
const count = loadingInfo.count + records.length;
|
450
|
+
const isInsertingNewRecord = dataUnit.hasNewRecord();
|
427
451
|
const needReload = !loadingInProgress && localSorting.length > 0;
|
452
|
+
/**
|
453
|
+
* Caso precise recarregar dados, porém está no meio de uma inserção, os dados não devem recarregados instantaneamente,
|
454
|
+
* Mas sim, sinalizar que o dataUnit está aguardando para der recarregado.
|
455
|
+
*/
|
456
|
+
if (needReload && isInsertingNewRecord) {
|
457
|
+
dataUnit.setWaitingToReload(true);
|
458
|
+
}
|
428
459
|
return Promise.resolve({
|
429
460
|
records,
|
430
461
|
loadingInfo: Object.assign(Object.assign({}, loadingInfo), { pagerId,
|
431
|
-
loadingInProgress, total: loadingInProgress ? undefined : count, count,
|
432
|
-
needReload })
|
462
|
+
loadingInProgress, total: loadingInProgress ? undefined : count, count, needReload: needReload && !isInsertingNewRecord })
|
433
463
|
});
|
434
464
|
}
|
435
465
|
catch (error) {
|
@@ -682,7 +712,7 @@ class DataUnitDataLoader {
|
|
682
712
|
}
|
683
713
|
const count = loadingInfo.count;
|
684
714
|
if (loadingInfo.loadingInProgress) {
|
685
|
-
dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count }));
|
715
|
+
dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { count, loadingInProgress: true }));
|
686
716
|
return;
|
687
717
|
}
|
688
718
|
if (loadingInfo.needReload) {
|
@@ -690,7 +720,7 @@ class DataUnitDataLoader {
|
|
690
720
|
dataUnit.gotoPage(0);
|
691
721
|
return;
|
692
722
|
}
|
693
|
-
dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count }));
|
723
|
+
dataUnit.updatePagination(Object.assign(Object.assign({}, dataUnitPagination), { total: count, count, loadingInProgress: false }));
|
694
724
|
}
|
695
725
|
static registryLoading(dataUnit, loadingInfo) {
|
696
726
|
if (loadingInfo == undefined) {
|
@@ -1052,4 +1082,4 @@ class DataUnitFetcher {
|
|
1052
1082
|
}
|
1053
1083
|
}
|
1054
1084
|
|
1055
|
-
export { DataUnitFetcher as D, InMemoryLoader as I, PreloadManager as P,
|
1085
|
+
export { DataUnitFetcher as D, InMemoryLoader as I, PreloadManager as P, DatasetStrategy as a, buildLoadDataResponse as b, getRecordValue as g };
|
@@ -217,7 +217,10 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
217
217
|
query: this.queryConfig.get("fetchDefaultConfig"),
|
218
218
|
})
|
219
219
|
.then((result) => {
|
220
|
-
|
220
|
+
if (!(result === null || result === void 0 ? void 0 : result.resource)) {
|
221
|
+
resolve(null);
|
222
|
+
}
|
223
|
+
resolve(ObjectUtils.stringToObject(result === null || result === void 0 ? void 0 : result.resource));
|
221
224
|
})
|
222
225
|
.catch((error) => {
|
223
226
|
reject(error);
|
@@ -96,9 +96,14 @@ class PesquisaFetcher {
|
|
96
96
|
}
|
97
97
|
}
|
98
98
|
};
|
99
|
+
const urlOptions = {
|
100
|
+
urlParams: {
|
101
|
+
"quietMode": true
|
102
|
+
}
|
103
|
+
};
|
99
104
|
return new Promise((resolve, reject) => {
|
100
105
|
DataFetcher.get()
|
101
|
-
.callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody))
|
106
|
+
.callServiceBroker("PesquisaSP.getSuggestion", JSON.stringify(reqBody), urlOptions)
|
102
107
|
.then(result => resolve(result))
|
103
108
|
.catch(error => reject(error));
|
104
109
|
});
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, StringUtils, ErrorException, WarningException, ObjectUtils, DateUtils, ServiceUtils, StorageType, ArrayUtils, ElementIDUtils } from '@sankhyalabs/core';
|
3
3
|
import { D as DataFetcher } from './DataFetcher.js';
|
4
4
|
import { P as ParamType } from './ParamType.js';
|
5
5
|
import './pesquisa-fetcher.js';
|
@@ -9,6 +9,7 @@ import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
9
9
|
import './dataunit-fetcher.js';
|
10
10
|
import './filter-item-type.enum.js';
|
11
11
|
import './form-config-fetcher.js';
|
12
|
+
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo.js';
|
12
13
|
import { R as ResourceIDUtils } from './ResourceIDUtils.js';
|
13
14
|
|
14
15
|
const SERVICE_ACTION_EXECUTE_JAVA = 'ActionButtonsSP.executeJava';
|
@@ -161,7 +162,6 @@ var RefreshType;
|
|
161
162
|
|
162
163
|
const MASTER_ROW_PROPERTY = "__MASTER_ROW__";
|
163
164
|
const ENTITY_NAME_PROPERTY = '__ENTITY_NAME__';
|
164
|
-
const NUFIN_COLUMN = 'NUFIN';
|
165
165
|
const SERVICE_GET_CONFIGURATIONS = 'SystemUtilsSP.getConf';
|
166
166
|
class Actions {
|
167
167
|
constructor(actionsExecuteInterface, dataUnit, appResourceId) {
|
@@ -173,6 +173,10 @@ class Actions {
|
|
173
173
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
174
174
|
this._appResourceId = appResourceId;
|
175
175
|
}
|
176
|
+
getPrimaryKeys() {
|
177
|
+
const ids = getSelectedRecordsIDsInfo(this._dataUnit);
|
178
|
+
return ids.map(({ name }) => name);
|
179
|
+
}
|
176
180
|
apply(action, hasParamsToSave) {
|
177
181
|
this._application.closePopUp();
|
178
182
|
this._actionsExecuteInterface.execute(action, this._dataUnit)
|
@@ -441,6 +445,7 @@ class Actions {
|
|
441
445
|
executeAction(execSource);
|
442
446
|
}
|
443
447
|
addRows(execSource) {
|
448
|
+
const primaryKeys = this.getPrimaryKeys();
|
444
449
|
const rows = {
|
445
450
|
row: []
|
446
451
|
};
|
@@ -454,15 +459,13 @@ class Actions {
|
|
454
459
|
delete sourceRow[MASTER_ROW_PROPERTY];
|
455
460
|
delete sourceRow[ENTITY_NAME_PROPERTY];
|
456
461
|
}
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
row.field = [];
|
462
|
-
}
|
462
|
+
if (!row.field) {
|
463
|
+
row.field = [];
|
464
|
+
}
|
465
|
+
for (const primaryKey of primaryKeys) {
|
463
466
|
row.field.push({
|
464
|
-
fieldName:
|
465
|
-
$: sourceRow[
|
467
|
+
fieldName: primaryKey,
|
468
|
+
$: sourceRow[primaryKey]
|
466
469
|
});
|
467
470
|
}
|
468
471
|
rows.row.push(row);
|
@@ -595,6 +598,7 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
595
598
|
super();
|
596
599
|
this.__registerHost();
|
597
600
|
this.CLIENT_EVENT_CONFIRM_NAME = "br.com.sankhya.actionbutton.clientconfirm";
|
601
|
+
this._actions = [];
|
598
602
|
this.handleClick = (evt) => {
|
599
603
|
const selectedAction = this._actions.find((action) => action.actionID == evt.detail.id);
|
600
604
|
const executor = new ExecutorFactory(selectedAction.type).executor;
|
@@ -604,27 +608,22 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
604
608
|
};
|
605
609
|
this._items = [];
|
606
610
|
this._showDropdown = false;
|
607
|
-
this._actions = [];
|
608
|
-
this._isOrderActions = false;
|
609
611
|
}
|
610
612
|
async getActions() {
|
611
|
-
|
612
|
-
param: {
|
613
|
-
entityName: this._entityName,
|
614
|
-
resourceID: this._resourceID
|
615
|
-
}
|
616
|
-
};
|
617
|
-
return DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param).then((result) => {
|
613
|
+
const actions = await ServiceUtils.useCacheWithService(`SnkActionsButton_${this._entityName}-${this._resourceID}`, async () => {
|
618
614
|
var _a;
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
});
|
615
|
+
const param = {
|
616
|
+
param: {
|
617
|
+
entityName: this._entityName,
|
618
|
+
resourceID: this._resourceID,
|
619
|
+
},
|
620
|
+
};
|
621
|
+
const result = await DataFetcher.get().callServiceBroker('ActionButtonsSP.getActions', param);
|
622
|
+
return ((_a = result.actions) === null || _a === void 0 ? void 0 : _a.action) || [];
|
623
|
+
}, StorageType.IN_MEMORY_CACHE);
|
624
|
+
this._actions = SnkActionsButton.parameters.isOrderActions
|
625
|
+
? ArrayUtils.sortAlphabetically(actions, 'description')
|
626
|
+
: actions;
|
628
627
|
}
|
629
628
|
controlDropdown() {
|
630
629
|
this._showDropdown = !this._showDropdown;
|
@@ -657,7 +656,7 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
657
656
|
}
|
658
657
|
async componentWillLoad() {
|
659
658
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
660
|
-
|
659
|
+
await this.loadParameters();
|
661
660
|
const snkDataUnit = this._element.parentElement;
|
662
661
|
this._dataUnit = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.dataUnit;
|
663
662
|
this._resourceID = snkDataUnit === null || snkDataUnit === void 0 ? void 0 : snkDataUnit.resourceID;
|
@@ -666,9 +665,8 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
666
665
|
this._resourceID = await ResourceIDUtils.getResourceID();
|
667
666
|
}
|
668
667
|
this.setEvents();
|
669
|
-
this.getActions()
|
670
|
-
|
671
|
-
});
|
668
|
+
await this.getActions();
|
669
|
+
this.loadItems();
|
672
670
|
}
|
673
671
|
async componentDidLoad() {
|
674
672
|
if (!this._element)
|
@@ -695,6 +693,11 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
695
693
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(sufix)
|
696
694
|
};
|
697
695
|
}
|
696
|
+
async loadParameters() {
|
697
|
+
if (SnkActionsButton.parameters.isOrderActions != null)
|
698
|
+
return;
|
699
|
+
SnkActionsButton.parameters.isOrderActions = await this._application.getBooleanParam('global.ordenar.acoes.personalizadas');
|
700
|
+
}
|
698
701
|
render() {
|
699
702
|
return (h(Host, null, (this._actions && this._actions.length > 0) &&
|
700
703
|
(h("div", { class: `ez-padding-left--medium snk-actions-button
|
@@ -710,10 +713,11 @@ const SnkActionsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
710
713
|
static get style() { return snkActionsButtonCss; }
|
711
714
|
}, [2, "snk-actions-button", {
|
712
715
|
"_items": [32],
|
713
|
-
"_showDropdown": [32]
|
714
|
-
"_actions": [32],
|
715
|
-
"_isOrderActions": [32]
|
716
|
+
"_showDropdown": [32]
|
716
717
|
}]);
|
718
|
+
SnkActionsButton.parameters = {
|
719
|
+
isOrderActions: null
|
720
|
+
};
|
717
721
|
function defineCustomElement() {
|
718
722
|
if (typeof customElements === "undefined") {
|
719
723
|
return;
|
@@ -4,7 +4,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher.js';
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher.js';
|
7
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher.js';
|
7
|
+
import { P as PreloadManager, D as DataUnitFetcher } from './dataunit-fetcher.js';
|
8
8
|
import { P as PesquisaFetcher } from './pesquisa-fetcher.js';
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
10
10
|
import { d as defineCustomElement$1 } from './snk-pesquisa2.js';
|
@@ -74,6 +74,7 @@ class TotalsFetcher {
|
|
74
74
|
class ParametersFetcher {
|
75
75
|
constructor() {
|
76
76
|
this._embeddedParams = new Map();
|
77
|
+
this._cachedParams = new Map();
|
77
78
|
this.templateByQuery = new Map();
|
78
79
|
try {
|
79
80
|
if (window["MGE_PARAMS"] != undefined) {
|
@@ -103,11 +104,16 @@ class ParametersFetcher {
|
|
103
104
|
if (this._embeddedParams.has(name)) {
|
104
105
|
return Promise.resolve(this._embeddedParams.get(name));
|
105
106
|
}
|
107
|
+
if (this._cachedParams.has(name)) {
|
108
|
+
return this._cachedParams.get(name);
|
109
|
+
}
|
106
110
|
const completPath = `param://application?params=${name}`;
|
107
|
-
|
111
|
+
const param = await DataFetcher.get().callGraphQL({
|
108
112
|
values: { name: completPath },
|
109
113
|
query: this.templateByQuery.get("fetchParam"),
|
110
114
|
});
|
115
|
+
this._cachedParams.set(name, param);
|
116
|
+
return param;
|
111
117
|
}
|
112
118
|
async asString(name) {
|
113
119
|
const paramArr = await this.getParam(name);
|
@@ -274,6 +280,99 @@ class SnkErrorHandler {
|
|
274
280
|
}
|
275
281
|
}
|
276
282
|
|
283
|
+
class DebouncedRequestListener {
|
284
|
+
constructor() {
|
285
|
+
this._debounceTime = 1500;
|
286
|
+
this.requests = new Map();
|
287
|
+
this.requestsLoadingBar = [];
|
288
|
+
}
|
289
|
+
onRequestStart(param) {
|
290
|
+
if (param.url.includes("quietMode=true")) {
|
291
|
+
return;
|
292
|
+
}
|
293
|
+
this.requestsLoadingBar.push(param.requestId);
|
294
|
+
const timeout = setTimeout(() => {
|
295
|
+
this.ezLoadingBar.show();
|
296
|
+
}, this._debounceTime);
|
297
|
+
this.requests.set(param.requestId, timeout);
|
298
|
+
}
|
299
|
+
;
|
300
|
+
onRequestEnd(param) {
|
301
|
+
const timeoutId = this.requests.get(param.requestId);
|
302
|
+
clearTimeout(timeoutId);
|
303
|
+
if (this.requestsLoadingBar.includes(param.requestId)) {
|
304
|
+
this.requestsLoadingBar = this.requestsLoadingBar.filter(id => id !== param.requestId);
|
305
|
+
!this.requestsLoadingBar.length && this.ezLoadingBar.hide();
|
306
|
+
}
|
307
|
+
}
|
308
|
+
;
|
309
|
+
}
|
310
|
+
|
311
|
+
class RequestListenerLoadingBar {
|
312
|
+
constructor() {
|
313
|
+
this._debounceTime = 1000;
|
314
|
+
this._ignoredNameTypes = ["totals"];
|
315
|
+
this._countRequest = 0;
|
316
|
+
}
|
317
|
+
onRequestStart(param) {
|
318
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
319
|
+
return;
|
320
|
+
}
|
321
|
+
this._countRequest++;
|
322
|
+
this.ezLoadingBar.show();
|
323
|
+
if (this._timerLoading) {
|
324
|
+
clearTimeout(this._timerLoading);
|
325
|
+
}
|
326
|
+
}
|
327
|
+
;
|
328
|
+
onRequestEnd(param) {
|
329
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
330
|
+
return;
|
331
|
+
}
|
332
|
+
this._countRequest--;
|
333
|
+
this._timerLoading = setTimeout(() => {
|
334
|
+
if (this._countRequest <= 0) {
|
335
|
+
this.ezLoadingBar.hide();
|
336
|
+
}
|
337
|
+
}, this._debounceTime);
|
338
|
+
}
|
339
|
+
;
|
340
|
+
isIgnoreLoadingOnRequest(param) {
|
341
|
+
if (param == undefined) {
|
342
|
+
return false;
|
343
|
+
}
|
344
|
+
if (param.url.includes("quietMode=true")) {
|
345
|
+
return true;
|
346
|
+
}
|
347
|
+
if (param.requestBody == undefined) {
|
348
|
+
return false;
|
349
|
+
}
|
350
|
+
if (param.requestBody.length == 1) {
|
351
|
+
const { name } = param.requestBody[0].variables;
|
352
|
+
if (name) {
|
353
|
+
const nameParts = name.split(":");
|
354
|
+
const nameType = nameParts[0];
|
355
|
+
return this._ignoredNameTypes.indexOf(nameType) >= 0;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
return false;
|
359
|
+
}
|
360
|
+
;
|
361
|
+
}
|
362
|
+
|
363
|
+
class RequestListenerFactory {
|
364
|
+
static create({ strategy }) {
|
365
|
+
switch (strategy) {
|
366
|
+
case 'request_name':
|
367
|
+
return new RequestListenerLoadingBar();
|
368
|
+
case 'request_time':
|
369
|
+
return new DebouncedRequestListener();
|
370
|
+
default:
|
371
|
+
throw new Error('Strategy not found');
|
372
|
+
}
|
373
|
+
}
|
374
|
+
}
|
375
|
+
|
277
376
|
const snkApplicationCss = ".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";
|
278
377
|
|
279
378
|
const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
@@ -288,7 +387,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
288
387
|
this._waitingAppReady = new Array();
|
289
388
|
this._duCache = new Map();
|
290
389
|
this._duPromises = new Map();
|
291
|
-
this._requestListener =
|
390
|
+
this._requestListener = RequestListenerFactory.create({ strategy: 'request_time' });
|
292
391
|
this._pendingActions = new Map;
|
293
392
|
this._loadPkParameter = null;
|
294
393
|
this._isLoadedByPk = false;
|
@@ -776,6 +875,16 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
776
875
|
async isLoadedByPk() {
|
777
876
|
return Promise.resolve(this._isLoadedByPk);
|
778
877
|
}
|
878
|
+
/**
|
879
|
+
* Remove registro do cache do PreLoader do dataunit.
|
880
|
+
* Deve ser usado quando existe um dataunit usando loader do application, mas o removeLoader está sendo sobrescrito.
|
881
|
+
*/
|
882
|
+
async preloadMangerRemoveRecord(dataUnit, recordsIDs) {
|
883
|
+
const records = recordsIDs.map(id => {
|
884
|
+
return { "__record__id__": id };
|
885
|
+
});
|
886
|
+
PreloadManager.removeRecords(dataUnit, records);
|
887
|
+
}
|
779
888
|
async getAuthList(auth) {
|
780
889
|
return await (new MGEAuthorization()).parseFromJSON(auth);
|
781
890
|
}
|
@@ -1262,7 +1371,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1262
1371
|
.unbind("F1");
|
1263
1372
|
}
|
1264
1373
|
render() {
|
1265
|
-
return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.
|
1374
|
+
return (h("div", null, h("ez-loading-bar", { ref: (ref) => this._requestListener.ezLoadingBar = ref }), h("ez-popup", { opened: false, ref: (ref) => this._popUp = ref, onEzClosePopup: () => this.closePopUp() }), h("ez-modal", { opened: false, ref: (ref) => this._rightModal = ref, "modal-size": "small", closeOutsideClick: true, closeEsc: true })));
|
1266
1375
|
}
|
1267
1376
|
get _element() { return this; }
|
1268
1377
|
static get watchers() { return {
|
@@ -1314,6 +1423,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1314
1423
|
"info": [64],
|
1315
1424
|
"loadTotals": [64],
|
1316
1425
|
"isLoadedByPk": [64],
|
1426
|
+
"preloadMangerRemoveRecord": [64],
|
1317
1427
|
"executeSearch": [64],
|
1318
1428
|
"executePreparedSearch": [64],
|
1319
1429
|
"isDebugMode": [64],
|
@@ -1326,57 +1436,6 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
1326
1436
|
"whenApplicationReady": [64],
|
1327
1437
|
"setSearchFilterContext": [64]
|
1328
1438
|
}]);
|
1329
|
-
class RequestListenerLoadingBar {
|
1330
|
-
constructor() {
|
1331
|
-
this._debounceTime = 1000;
|
1332
|
-
this._ignoredNameTypes = ["totals"];
|
1333
|
-
this._countRequest = 0;
|
1334
|
-
}
|
1335
|
-
onRequestStart(param) {
|
1336
|
-
if (this.isIgnoreLoadingOnRequest(param)) {
|
1337
|
-
return;
|
1338
|
-
}
|
1339
|
-
this._countRequest++;
|
1340
|
-
this.loadingBar.show();
|
1341
|
-
if (this._timerLoading) {
|
1342
|
-
clearTimeout(this._timerLoading);
|
1343
|
-
}
|
1344
|
-
}
|
1345
|
-
;
|
1346
|
-
onRequestEnd(param) {
|
1347
|
-
if (this.isIgnoreLoadingOnRequest(param)) {
|
1348
|
-
return;
|
1349
|
-
}
|
1350
|
-
this._countRequest--;
|
1351
|
-
this._timerLoading = setTimeout(() => {
|
1352
|
-
if (this._countRequest <= 0) {
|
1353
|
-
this.loadingBar.hide();
|
1354
|
-
}
|
1355
|
-
}, this._debounceTime);
|
1356
|
-
}
|
1357
|
-
;
|
1358
|
-
isIgnoreLoadingOnRequest(param) {
|
1359
|
-
if (param == undefined) {
|
1360
|
-
return false;
|
1361
|
-
}
|
1362
|
-
if (param.url.includes("quietMode=true")) {
|
1363
|
-
return true;
|
1364
|
-
}
|
1365
|
-
if (param.requestBody == undefined) {
|
1366
|
-
return false;
|
1367
|
-
}
|
1368
|
-
if (param.requestBody.length == 1) {
|
1369
|
-
const { name } = param.requestBody[0].variables;
|
1370
|
-
if (name) {
|
1371
|
-
const nameParts = name.split(":");
|
1372
|
-
const nameType = nameParts[0];
|
1373
|
-
return this._ignoredNameTypes.indexOf(nameType) >= 0;
|
1374
|
-
}
|
1375
|
-
}
|
1376
|
-
return false;
|
1377
|
-
}
|
1378
|
-
;
|
1379
|
-
}
|
1380
1439
|
class PendingPromise {
|
1381
1440
|
constructor(resolve, reject) {
|
1382
1441
|
this.resolve = resolve;
|