@sankhyalabs/sankhyablocks 8.16.0-dev.7 → 8.16.0-dev.70
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/{ConfigStorage-a343e418.js → ConfigStorage-d024aec8.js} +2 -2
- package/dist/cjs/{IExporterProvider-597949f9.js → ContinuousInsertUtils-54d44192.js} +65 -23
- package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-65879b2c.js} +216 -76
- package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
- package/dist/cjs/{SnkFormConfigManager-166cbd1f.js → SnkFormConfigManager-07f747be.js} +75 -17
- package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-bae64d0d.js} +7 -3
- package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-8480751c.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-8ea97d88.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-90126e4c.js} +42 -2
- package/dist/cjs/index-f9e81701.js +16 -32
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-f3454c23.js} +185 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +133 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_5.cjs.entry.js} +136 -40
- package/dist/cjs/snk-application.cjs.entry.js +248 -69
- package/dist/cjs/snk-attach.cjs.entry.js +46 -33
- 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 +22 -8
- package/dist/cjs/snk-data-exporter.cjs.entry.js +34 -22
- package/dist/cjs/{snk-data-unit-04df81bf.js → snk-data-unit-72ef8777.js} +54 -32
- package/dist/cjs/snk-data-unit.cjs.entry.js +5 -5
- package/dist/cjs/snk-detail-view.cjs.entry.js +12 -12
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1436 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -1
- package/dist/cjs/snk-grid.cjs.entry.js +71 -21
- package/dist/cjs/{snk-guides-viewer-bdc41281.js → snk-guides-viewer-b20b0cfd.js} +29 -13
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +4 -4
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-pesquisa.cjs.entry.js +123 -31
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +101 -45
- package/dist/cjs/snk-taskbar.cjs.entry.js +64 -38
- package/dist/collection/collection-manifest.json +14 -31
- package/dist/collection/components/snk-actions-button/actions/index.js +16 -13
- package/dist/collection/components/snk-actions-button/interfaces/index.js +1 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +29 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
- package/dist/collection/components/snk-application/snk-application.css +34 -0
- package/dist/collection/components/snk-application/snk-application.js +235 -64
- package/dist/collection/components/snk-attach/snk-attach.js +25 -16
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +2 -4
- package/dist/collection/components/snk-crud/snk-crud.js +122 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +3 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +72 -6
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +13 -7
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +9 -2
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +3 -5
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +52 -30
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css +13 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -3
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js +8 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +5 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +3 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -1
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +118 -28
- package/dist/collection/components/snk-form/snk-form.js +2 -2
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +73 -15
- package/dist/collection/components/snk-form-config/snk-form-config.css +8 -3
- package/dist/collection/components/snk-form-config/snk-form-config.js +49 -8
- package/dist/collection/components/snk-grid/snk-grid.css +2 -0
- package/dist/collection/components/snk-grid/snk-grid.js +153 -8
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +10 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +190 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +25 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +179 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +89 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +24 -5
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +186 -32
- package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +160 -50
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +106 -38
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +3 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +2 -4
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +34 -9
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +29 -21
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +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 +45 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +98 -4
- 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/{IExporterProvider.js → ContinuousInsertUtils.js} +66 -23
- package/dist/components/DataFetcher.js +217 -77
- package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
- package/dist/components/ISave.js +346 -1
- package/dist/components/SnkFormConfigManager.js +73 -15
- package/dist/components/SnkMessageBuilder.js +7 -3
- package/dist/components/dataunit-fetcher.js +47 -17
- package/dist/components/form-config-fetcher.js +41 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/pesquisa-grid.d.ts +11 -0
- package/dist/components/pesquisa-grid.js +6 -0
- package/dist/components/pesquisa-grid2.js +86 -0
- package/dist/components/pesquisa-tree.d.ts +11 -0
- package/dist/components/pesquisa-tree.js +6 -0
- package/dist/components/pesquisa-tree2.js +82 -0
- package/dist/components/snk-actions-button2.js +43 -40
- package/dist/components/snk-application2.js +264 -68
- package/dist/components/snk-attach2.js +54 -60
- package/dist/components/snk-crud.js +83 -59
- package/dist/components/snk-data-exporter2.js +28 -17
- package/dist/components/snk-data-unit2.js +55 -70
- package/dist/components/snk-detail-view2.js +114 -105
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +64 -30
- package/dist/components/snk-filter-binary-select.js +1 -1
- package/dist/components/snk-filter-checkbox-list.js +1 -1
- package/dist/components/snk-filter-item2.js +5 -1
- package/dist/components/snk-filter-modal.js +3 -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 +68 -13
- package/dist/components/snk-personalized-filter-editor.js +4 -4
- package/dist/components/snk-pesquisa2.js +136 -33
- package/dist/components/snk-print-selector.js +1 -1
- package/dist/components/snk-simple-bar2.js +1 -1
- package/dist/components/snk-simple-crud2.js +108 -66
- package/dist/components/snk-simple-form-config.d.ts +11 -0
- package/dist/components/snk-simple-form-config.js +6 -0
- package/dist/components/snk-simple-form-config2.js +120 -0
- package/dist/components/snk-taskbar2.js +66 -40
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/{ConfigStorage-3806514e.js → ConfigStorage-373bb440.js} +2 -2
- package/dist/esm/{IExporterProvider-63a188b6.js → ContinuousInsertUtils-25e7bd9a.js} +66 -25
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-5221b992.js} +217 -77
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
- package/dist/esm/{SnkFormConfigManager-31b24066.js → SnkFormConfigManager-1ff928fa.js} +75 -17
- package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-6fff4a4c.js} +7 -3
- package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-e32fe8a4.js} +1 -1
- package/dist/esm/{constants-8457af36.js → constants-7302ee87.js} +1 -1
- package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-8dd93d8b.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-126e2471.js} +42 -2
- package/dist/esm/index-a7d3d3f1.js +16 -32
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-0af41f09.js} +186 -4
- package/dist/esm/pesquisa-grid_2.entry.js +128 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_5.entry.js} +138 -43
- package/dist/esm/snk-application.entry.js +250 -71
- package/dist/esm/snk-attach.entry.js +47 -34
- package/dist/esm/{snk-form-config.entry.js → snk-config-options_3.entry.js} +399 -15
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +23 -9
- package/dist/esm/snk-data-exporter.entry.js +35 -23
- package/dist/esm/{snk-data-unit-8eec78bd.js → snk-data-unit-11a49fc3.js} +54 -32
- package/dist/esm/snk-data-unit.entry.js +5 -5
- package/dist/esm/snk-detail-view.entry.js +13 -13
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-bar_4.entry.js +1429 -0
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-filter-text.entry.js +2 -1
- package/dist/esm/snk-grid.entry.js +66 -16
- package/dist/esm/{snk-guides-viewer-dda0fede.js → snk-guides-viewer-94918cf7.js} +30 -14
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter-editor.entry.js +4 -4
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +123 -31
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +99 -43
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +65 -39
- package/dist/sankhyablocks/p-09067bee.entry.js +1 -0
- package/dist/sankhyablocks/p-0d86c004.entry.js +1 -0
- package/dist/sankhyablocks/p-1435701f.js +26 -0
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/p-16cc8640.entry.js +11 -0
- package/dist/sankhyablocks/p-17425c72.js +1 -0
- package/dist/sankhyablocks/{p-52920496.js → p-19dc71e9.js} +1 -1
- package/dist/sankhyablocks/p-1a91d1f3.entry.js +1 -0
- package/dist/sankhyablocks/{p-47db7e88.entry.js → p-1cf39cfd.entry.js} +1 -1
- 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-3150ad41.js +1 -0
- package/dist/sankhyablocks/{p-c1d57831.entry.js → p-3a3d4055.entry.js} +1 -1
- 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-469384a2.entry.js +1 -0
- package/dist/sankhyablocks/p-47178038.entry.js +1 -0
- package/dist/sankhyablocks/p-471785a1.entry.js +1 -0
- package/dist/sankhyablocks/p-4ca8e061.entry.js +1 -0
- package/dist/sankhyablocks/{p-aaa3ee68.entry.js → p-5f157b09.entry.js} +1 -1
- package/dist/sankhyablocks/p-60e4db34.js +1 -0
- package/dist/sankhyablocks/p-618a29ed.entry.js +1 -0
- package/dist/sankhyablocks/p-619aeac8.entry.js +1 -0
- package/dist/sankhyablocks/p-68134a67.entry.js +1 -0
- package/dist/sankhyablocks/p-798386c7.js +6 -0
- package/dist/sankhyablocks/p-7dd49d15.js +1 -0
- package/dist/sankhyablocks/{p-2c68b3ae.entry.js → p-82ee6dc3.entry.js} +1 -1
- package/dist/sankhyablocks/p-89c92727.entry.js +1 -0
- package/dist/sankhyablocks/p-8a1ee5b5.js +1 -0
- package/dist/sankhyablocks/{p-95df461f.entry.js → p-8b4fc28f.entry.js} +1 -1
- package/dist/sankhyablocks/p-8bd86610.entry.js +1 -0
- 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-a3803d7c.entry.js +1 -0
- package/dist/sankhyablocks/p-aaef93e8.js +1 -0
- package/dist/sankhyablocks/p-c2e468c9.entry.js +1 -0
- package/dist/sankhyablocks/p-d62228fb.js +1 -0
- package/dist/sankhyablocks/p-d92d4f91.entry.js +1 -0
- package/dist/sankhyablocks/p-ddefbbc7.js +60 -0
- package/dist/sankhyablocks/p-e5430b29.entry.js +1 -0
- package/dist/sankhyablocks/{p-913a9979.js → p-f0b9303b.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
- package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
- package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
- package/dist/types/components/snk-application/snk-application.d.ts +28 -14
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +21 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +15 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +15 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +7 -2
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +4 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +26 -0
- package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +38 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +29 -0
- package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +19 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +36 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +27 -7
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +11 -0
- package/dist/types/components.d.ts +372 -15
- 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/form-config-fetcher.d.ts +8 -2
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +10 -1
- 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/react/components.d.ts +3 -0
- package/react/components.js +3 -0
- package/react/components.js.map +1 -1
- 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/pesquisa-fetcher-03c8f919.js +0 -164
- package/dist/esm/snk-config-options.entry.js +0 -235
- package/dist/esm/snk-filter-bar.entry.js +0 -710
- package/dist/esm/snk-filter-item.entry.js +0 -308
- package/dist/esm/snk-filter-list.entry.js +0 -148
- package/dist/esm/snk-filter-modal.entry.js +0 -245
- package/dist/esm/snk-form.entry.js +0 -139
- package/dist/sankhyablocks/p-045eae4d.entry.js +0 -11
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-2a408684.js +0 -1
- package/dist/sankhyablocks/p-3a212712.js +0 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
- package/dist/sankhyablocks/p-450c60e4.entry.js +0 -1
- package/dist/sankhyablocks/p-46d38387.entry.js +0 -1
- package/dist/sankhyablocks/p-4e5e1313.entry.js +0 -1
- package/dist/sankhyablocks/p-547eeac8.entry.js +0 -1
- package/dist/sankhyablocks/p-62ba211a.entry.js +0 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
- package/dist/sankhyablocks/p-7505da04.entry.js +0 -1
- package/dist/sankhyablocks/p-75e674ed.entry.js +0 -1
- package/dist/sankhyablocks/p-7a337364.js +0 -1
- package/dist/sankhyablocks/p-7a85fd49.entry.js +0 -1
- package/dist/sankhyablocks/p-7b08d0f8.entry.js +0 -1
- package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
- package/dist/sankhyablocks/p-96a89d58.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-af8efd95.js +0 -6
- package/dist/sankhyablocks/p-b05d8893.entry.js +0 -1
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
- package/dist/sankhyablocks/p-c2495304.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
- package/dist/sankhyablocks/p-d6e26ea8.entry.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-df5451c7.js +0 -26
- package/dist/sankhyablocks/p-e549f7d1.js +0 -1
- package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- package/dist/sankhyablocks/p-fa4d8cb4.js +0 -1
- package/dist/sankhyablocks/p-fe79f83a.js +0 -60
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
@@ -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;
|
@@ -48,8 +48,11 @@
|
|
48
48
|
"./components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js",
|
49
49
|
"./components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js",
|
50
50
|
"./components/snk-pesquisa/snk-pesquisa.js",
|
51
|
+
"./components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js",
|
52
|
+
"./components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js",
|
51
53
|
"./components/snk-simple-bar/snk-simple-bar.js",
|
52
54
|
"./components/snk-simple-crud/snk-simple-crud.js",
|
55
|
+
"./components/snk-simple-form-config/snk-simple-form-config.js",
|
53
56
|
"./components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js",
|
54
57
|
"./components/teste-pesquisa/teste-pesquisa.js"
|
55
58
|
],
|
@@ -65,21 +68,6 @@
|
|
65
68
|
"snk-application"
|
66
69
|
]
|
67
70
|
},
|
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
71
|
{
|
84
72
|
"components": [
|
85
73
|
"snk-tab-config"
|
@@ -132,42 +120,37 @@
|
|
132
120
|
},
|
133
121
|
{
|
134
122
|
"components": [
|
135
|
-
"snk-
|
136
|
-
]
|
137
|
-
},
|
138
|
-
{
|
139
|
-
"components": [
|
140
|
-
"snk-filter-item"
|
141
|
-
]
|
142
|
-
},
|
143
|
-
{
|
144
|
-
"components": [
|
145
|
-
"snk-filter-list"
|
123
|
+
"snk-field-config"
|
146
124
|
]
|
147
125
|
},
|
148
126
|
{
|
149
127
|
"components": [
|
150
|
-
"snk-
|
128
|
+
"snk-grid"
|
151
129
|
]
|
152
130
|
},
|
153
131
|
{
|
154
132
|
"components": [
|
155
|
-
"snk-
|
133
|
+
"snk-pesquisa"
|
156
134
|
]
|
157
135
|
},
|
158
136
|
{
|
159
137
|
"components": [
|
160
|
-
"snk-
|
138
|
+
"snk-taskbar"
|
161
139
|
]
|
162
140
|
},
|
163
141
|
{
|
164
142
|
"components": [
|
165
|
-
"snk-
|
143
|
+
"snk-config-options",
|
144
|
+
"snk-form",
|
145
|
+
"snk-form-config"
|
166
146
|
]
|
167
147
|
},
|
168
148
|
{
|
169
149
|
"components": [
|
170
|
-
"snk-
|
150
|
+
"snk-filter-bar",
|
151
|
+
"snk-filter-item",
|
152
|
+
"snk-filter-list",
|
153
|
+
"snk-filter-modal"
|
171
154
|
]
|
172
155
|
}
|
173
156
|
]
|
@@ -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)
|
@@ -83,9 +87,9 @@ export default class Actions {
|
|
83
87
|
return resultParams;
|
84
88
|
});
|
85
89
|
}
|
86
|
-
actionExecute(execSource, callback) {
|
90
|
+
async actionExecute(execSource, callback) {
|
87
91
|
execSource.virtualPage = this.buildVirtualPage();
|
88
|
-
this.prepareAndExecute(execSource, callback);
|
92
|
+
await this.prepareAndExecute(execSource, callback);
|
89
93
|
this.recordsReloader(execSource.refreshType);
|
90
94
|
}
|
91
95
|
resolvePromptParams(action, execSource, hasParamsToSave) {
|
@@ -280,11 +284,12 @@ export default class Actions {
|
|
280
284
|
async buildResourceId(actionId) {
|
281
285
|
return this._appResourceId + '.actionconfig.' + actionId;
|
282
286
|
}
|
283
|
-
prepareAndExecute(execSource, executeAction) {
|
287
|
+
async prepareAndExecute(execSource, executeAction) {
|
284
288
|
this.addRows(execSource);
|
285
|
-
executeAction(execSource);
|
289
|
+
await 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,29 @@
|
|
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
|
+
var _a, _b, _c;
|
20
|
+
const timeoutId = this.requests.get(param.requestId);
|
21
|
+
clearTimeout(timeoutId);
|
22
|
+
if ((_a = this.requestsLoadingBar) === null || _a === void 0 ? void 0 : _a.includes(param.requestId)) {
|
23
|
+
this.requestsLoadingBar = (_b = this.requestsLoadingBar) === null || _b === void 0 ? void 0 : _b.filter(id => id !== param.requestId);
|
24
|
+
!this.requestsLoadingBar.length && ((_c = this.ezLoadingBar) === null || _c === void 0 ? void 0 : _c.hide());
|
25
|
+
}
|
26
|
+
}
|
27
|
+
;
|
28
|
+
}
|
29
|
+
export default DebouncedRequestListener;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import DebouncedRequestListener from "./DebouncedRequestListener";
|
2
|
+
import RequestListenerLoadingBar from "./RequestListenerLoadingBar";
|
3
|
+
class RequestListenerFactory {
|
4
|
+
static create({ strategy }) {
|
5
|
+
switch (strategy) {
|
6
|
+
case 'request_name':
|
7
|
+
return new RequestListenerLoadingBar();
|
8
|
+
case 'request_time':
|
9
|
+
return new DebouncedRequestListener();
|
10
|
+
default:
|
11
|
+
throw new Error('Strategy not found');
|
12
|
+
}
|
13
|
+
;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
export default RequestListenerFactory;
|
package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
class RequestListenerLoadingBar {
|
2
|
+
constructor() {
|
3
|
+
this._debounceTime = 1000;
|
4
|
+
this._ignoredNameTypes = ["totals"];
|
5
|
+
this._countRequest = 0;
|
6
|
+
}
|
7
|
+
onRequestStart(param) {
|
8
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
9
|
+
return;
|
10
|
+
}
|
11
|
+
this._countRequest++;
|
12
|
+
this.ezLoadingBar.show();
|
13
|
+
if (this._timerLoading) {
|
14
|
+
clearTimeout(this._timerLoading);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
;
|
18
|
+
onRequestEnd(param) {
|
19
|
+
if (this.isIgnoreLoadingOnRequest(param)) {
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
this._countRequest--;
|
23
|
+
this._timerLoading = setTimeout(() => {
|
24
|
+
if (this._countRequest <= 0) {
|
25
|
+
this.ezLoadingBar.hide();
|
26
|
+
}
|
27
|
+
}, this._debounceTime);
|
28
|
+
}
|
29
|
+
;
|
30
|
+
isIgnoreLoadingOnRequest(param) {
|
31
|
+
if (param == undefined) {
|
32
|
+
return false;
|
33
|
+
}
|
34
|
+
if (param.url.includes("quietMode=true")) {
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
if (param.requestBody == undefined) {
|
38
|
+
return false;
|
39
|
+
}
|
40
|
+
if (param.requestBody.length == 1) {
|
41
|
+
const { name } = param.requestBody[0].variables;
|
42
|
+
if (name) {
|
43
|
+
const nameParts = name.split(":");
|
44
|
+
const nameType = nameParts[0];
|
45
|
+
return this._ignoredNameTypes.indexOf(nameType) >= 0;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
return false;
|
49
|
+
}
|
50
|
+
;
|
51
|
+
}
|
52
|
+
export default RequestListenerLoadingBar;
|
@@ -3,3 +3,37 @@
|
|
3
3
|
flex-direction: column;
|
4
4
|
height: 100%;
|
5
5
|
}
|
6
|
+
|
7
|
+
:host > .loading-hidden {
|
8
|
+
display: none;
|
9
|
+
pointer-events: none;
|
10
|
+
}
|
11
|
+
|
12
|
+
.skeleton-content-left {
|
13
|
+
width: 300px;
|
14
|
+
padding-right: 5px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.skeleton-content {
|
18
|
+
height: calc(100vh - 310px);
|
19
|
+
}
|
20
|
+
|
21
|
+
.spinner {
|
22
|
+
height: 100vh;
|
23
|
+
gap: 10px;
|
24
|
+
}
|
25
|
+
.spinner > .spin {
|
26
|
+
animation-name: spin;
|
27
|
+
animation-duration: 5000ms;
|
28
|
+
animation-iteration-count: infinite;
|
29
|
+
animation-timing-function: linear;
|
30
|
+
}
|
31
|
+
|
32
|
+
@keyframes spin {
|
33
|
+
from {
|
34
|
+
transform:rotate(0deg);
|
35
|
+
}
|
36
|
+
to {
|
37
|
+
transform:rotate(360deg);
|
38
|
+
}
|
39
|
+
}
|