@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-11997.0 → 0.0.0-bugfix-dev-KB-99999.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-0e4275f5.js → ConfigStorage-8009ecb2.js} +20 -4
- package/dist/cjs/{DataFetcher-bd3d53a8.js → DataFetcher-ba94ed5b.js} +142 -102
- package/dist/cjs/{PersonalizedFilterUtils-1aeb625d.js → PersonalizedFilterUtils-0184ffbb.js} +11 -4
- package/dist/cjs/PreloadManager-84466da6.js +224 -0
- package/dist/cjs/{SnkFormConfigManager-5b485cd4.js → SnkFormConfigManager-7d850fbc.js} +23 -6
- package/dist/cjs/{SnkMessageBuilder-d0abb63d.js → SnkMessageBuilder-7293d0ad.js} +29 -8
- package/dist/cjs/{SnkMultiSelectionListDataSource-804ff4c7.js → SnkMultiSelectionListDataSource-ba5838c2.js} +15 -0
- package/dist/cjs/Sortable-fb1c4cbb.js +2853 -0
- package/dist/cjs/{auth-fetcher-1583fe43.js → auth-fetcher-c8467c07.js} +1 -1
- package/dist/cjs/{constants-d187e03e.js → constants-35ddd366.js} +4 -0
- package/dist/cjs/dataunit-fetcher-de65b9fc.js +725 -0
- package/dist/cjs/{taskbar-processor-bce3f499.js → field-search-f56aa7d6.js} +35 -0
- package/dist/cjs/{filter-item-type.enum-aa823a00.js → filter-item-type.enum-a7ffdaa6.js} +1 -0
- package/dist/cjs/filterNumberVariation-d65332da.js +7 -0
- package/dist/cjs/{form-config-fetcher-f6cb55e6.js → form-config-fetcher-df043d3d.js} +1 -1
- package/dist/cjs/{index-0e663819.js → index-0922807b.js} +1 -0
- package/dist/cjs/index-f9e81701.js +10 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-3356b3df.js → pesquisa-fetcher-ef050a47.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/{snk-actions-button.cjs.entry.js → snk-actions-button_2.cjs.entry.js} +214 -91
- package/dist/cjs/snk-application.cjs.entry.js +474 -140
- package/dist/cjs/snk-attach.cjs.entry.js +27 -11
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +17 -2
- package/dist/cjs/snk-crud.cjs.entry.js +127 -17
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +20 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +12 -11
- package/dist/cjs/{snk-data-unit-7cc1846d.js → snk-data-unit-1bc69073.js} +15 -5
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +34 -14
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-bar.cjs.entry.js +163 -17
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +52 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +9 -2
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-item.cjs.entry.js +39 -15
- package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +9 -9
- package/dist/cjs/snk-filter-modal.cjs.entry.js +38 -7
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +42 -3
- package/dist/cjs/snk-filter-period.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +16 -15
- package/dist/cjs/snk-form-view.cjs.entry.js +14 -0
- package/dist/cjs/snk-form.cjs.entry.js +6 -7
- package/dist/cjs/snk-grid-config.cjs.entry.js +6 -7
- package/dist/cjs/snk-grid.cjs.entry.js +131 -40
- package/dist/cjs/{snk-guides-viewer-5e22097d.js → snk-guides-viewer-7f9b6d94.js} +161 -22
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +16 -13
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +24 -13
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +127 -103
- package/dist/cjs/snk-tab-config.cjs.entry.js +12 -11
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
- package/dist/cjs/{taskbar-elements-39949c7a.js → taskbar-elements-01b85b99.js} +4 -4
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js +2 -2
- package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js +2 -2
- package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js +2 -2
- package/dist/collection/components/snk-actions-button/clientEvent/index.js +81 -76
- package/dist/collection/components/snk-actions-button/snk-actions-button.css +4 -11
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +2 -2
- package/dist/collection/components/snk-application/snk-application.js +485 -84
- package/dist/collection/components/snk-attach/snk-attach.css +6 -0
- package/dist/collection/components/snk-attach/snk-attach.js +15 -3
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +4 -1
- package/dist/collection/components/snk-configurator/snk-configurator.js +33 -1
- package/dist/collection/components/snk-crud/snk-crud.js +136 -10
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +21 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +45 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +178 -22
- package/dist/collection/components/snk-custom-slot-elements/snk-custom-slot-elements.css +3 -0
- package/dist/collection/components/{snk-taskbar/snk-taskbar-custom-elements.js → snk-custom-slot-elements/snk-custom-slot-elements.js} +10 -10
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +1 -9
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +15 -12
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +69 -2
- package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.js +5 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +95 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +93 -8
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +2 -2
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +7 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +38 -14
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +87 -6
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +4 -3
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +5 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +218 -7
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +3 -1
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +22 -5
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +10 -8
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +10 -8
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +11 -0
- package/dist/collection/components/snk-grid/snk-grid.css +7 -2
- package/dist/collection/components/snk-grid/snk-grid.js +166 -39
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +32 -6
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +8 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +115 -6
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +6 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +310 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +3 -3
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +0 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -1
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +31 -0
- package/dist/collection/lib/@types/index.js +1 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +74 -15
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +61 -43
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +118 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +80 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +139 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/{dataunit-fetcher.js → data-unit/dataunit-fetcher.js} +49 -100
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.js +68 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +162 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +3 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js +3 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +14 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +3 -0
- package/dist/collection/lib/index.js +1 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +9 -3
- package/dist/collection/lib/message/resources/snk-application.msg.js +9 -0
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +5 -4
- package/dist/collection/lib/message/resources/snk-grid.msg.js +3 -1
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
- package/dist/collection/lib/utils/constants.js +3 -0
- package/dist/collection/lib/utils/urlutils.js +10 -4
- package/dist/collection/lib/workspace/workspace.js +27 -0
- package/dist/components/ConfigStorage.js +17 -1
- package/dist/components/DataFetcher.js +101 -61
- package/dist/components/PersonalizedFilterUtils.js +10 -3
- package/dist/components/SnkFormConfigManager.js +22 -5
- package/dist/components/SnkMessageBuilder.js +29 -8
- package/dist/components/constants.js +4 -1
- package/dist/components/dataunit-fetcher.js +846 -100
- package/dist/components/{SnkMultiSelectionListDataSource.js → field-search.js} +44 -1
- package/dist/components/filter-item-type.enum.js +1 -0
- package/dist/components/filterNumberVariation.js +7 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +3 -1
- package/dist/components/index2.js +1 -0
- package/dist/components/snk-actions-button2.js +91 -86
- package/dist/components/snk-application2.js +392 -55
- package/dist/components/snk-attach2.js +39 -19
- package/dist/components/snk-configurator2.js +18 -2
- package/dist/components/snk-crud.js +184 -70
- package/dist/components/snk-custom-slot-elements.d.ts +11 -0
- package/dist/components/snk-custom-slot-elements.js +35 -0
- package/dist/components/snk-data-exporter2.js +7 -5
- package/dist/components/snk-data-unit2.js +15 -5
- package/dist/components/snk-detail-view2.js +264 -96
- package/dist/components/snk-filter-bar2.js +164 -13
- package/dist/components/snk-filter-checkbox-list.d.ts +11 -0
- package/dist/components/snk-filter-checkbox-list.js +68 -0
- package/dist/components/snk-filter-detail2.js +7 -0
- package/dist/components/snk-filter-item2.js +38 -14
- package/dist/components/snk-filter-list.js +1 -1
- package/dist/components/snk-filter-modal-item2.js +4 -3
- package/dist/components/snk-filter-modal.js +40 -7
- package/dist/components/snk-filter-number.js +43 -2
- package/dist/components/snk-filter-period.js +2 -2
- package/dist/components/snk-form-config2.js +13 -11
- package/dist/components/snk-form-view2.js +15 -0
- package/dist/components/snk-grid2.js +166 -68
- package/dist/components/snk-personalized-filter2.js +18 -6
- package/dist/components/snk-simple-crud2.js +132 -104
- package/dist/components/snk-tab-config2.js +2203 -6233
- package/dist/components/snk-taskbar2.js +16 -10
- package/dist/components/taskbar-actions-button.d.ts +11 -0
- package/dist/components/taskbar-actions-button.js +6 -0
- package/dist/components/taskbar-actions-button2.js +140 -0
- package/dist/esm/{ConfigStorage-f359573c.js → ConfigStorage-1244b8b0.js} +20 -4
- package/dist/esm/{DataFetcher-8daff9ad.js → DataFetcher-aa159c5a.js} +101 -61
- package/dist/esm/{PersonalizedFilterUtils-75fb0106.js → PersonalizedFilterUtils-e2b38ef7.js} +11 -4
- package/dist/esm/PreloadManager-c1c2f2b4.js +222 -0
- package/dist/esm/{SnkFormConfigManager-35876bad.js → SnkFormConfigManager-9be0e7d4.js} +24 -7
- package/dist/esm/{SnkMessageBuilder-68c1c25a.js → SnkMessageBuilder-ca843d1b.js} +29 -8
- package/dist/esm/{SnkMultiSelectionListDataSource-892f37f9.js → SnkMultiSelectionListDataSource-44494b0e.js} +11 -0
- package/dist/esm/Sortable-83960219.js +2851 -0
- package/dist/esm/{auth-fetcher-299fed55.js → auth-fetcher-c05dc474.js} +1 -1
- package/dist/esm/{constants-3644f1b6.js → constants-8457af36.js} +4 -1
- package/dist/esm/dataunit-fetcher-e218c6d2.js +722 -0
- package/dist/esm/{taskbar-processor-94402e6e.js → field-search-efbe307f.js} +34 -1
- package/dist/esm/{filter-item-type.enum-5028ed3f.js → filter-item-type.enum-d45e026f.js} +1 -0
- package/dist/esm/filterNumberVariation-8cee02ea.js +7 -0
- package/dist/esm/{form-config-fetcher-8ef7be16.js → form-config-fetcher-36219cd3.js} +1 -1
- package/dist/esm/{index-1564817d.js → index-0ece87a6.js} +1 -0
- package/dist/esm/index-a7d3d3f1.js +10 -6
- package/dist/esm/loader.js +1 -1
- package/dist/{components/pesquisa-fetcher.js → esm/pesquisa-fetcher-dd3ca0a5.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/{snk-actions-button.entry.js → snk-actions-button_2.entry.js} +215 -93
- package/dist/esm/snk-application.entry.js +475 -141
- package/dist/esm/snk-attach.entry.js +27 -11
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +18 -3
- package/dist/esm/snk-crud.entry.js +128 -18
- package/dist/esm/snk-custom-slot-elements.entry.js +16 -0
- package/dist/esm/snk-data-exporter.entry.js +13 -12
- package/dist/esm/{snk-data-unit-1715d2f1.js → snk-data-unit-6208ebf0.js} +16 -6
- package/dist/esm/snk-data-unit.entry.js +2 -2
- package/dist/esm/snk-detail-view.entry.js +34 -14
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +2 -2
- package/dist/esm/snk-filter-bar.entry.js +165 -19
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +48 -0
- package/dist/esm/snk-filter-detail.entry.js +9 -2
- package/dist/esm/snk-filter-field-search_2.entry.js +2 -2
- package/dist/esm/snk-filter-item.entry.js +39 -15
- package/dist/esm/snk-filter-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +9 -9
- package/dist/esm/snk-filter-modal.entry.js +38 -7
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +42 -3
- package/dist/esm/snk-filter-period.entry.js +3 -3
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +16 -15
- package/dist/esm/snk-form-view.entry.js +14 -0
- package/dist/esm/snk-form.entry.js +6 -7
- package/dist/esm/snk-grid-config.entry.js +6 -7
- package/dist/esm/snk-grid.entry.js +132 -41
- package/dist/esm/{snk-guides-viewer-b0e32a7d.js → snk-guides-viewer-9d5e073f.js} +161 -22
- package/dist/esm/snk-guides-viewer.entry.js +16 -13
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +24 -13
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +126 -102
- package/dist/esm/snk-tab-config.entry.js +12 -11
- package/dist/esm/snk-taskbar.entry.js +3 -3
- package/dist/esm/{taskbar-elements-0a6b8b95.js → taskbar-elements-d4d0b424.js} +4 -4
- package/dist/sankhyablocks/p-01ba23cd.entry.js +1 -0
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
- package/dist/sankhyablocks/{p-5c1aacc7.js → p-057fad05.js} +1 -1
- package/dist/sankhyablocks/p-0874adb5.entry.js +1 -0
- package/dist/sankhyablocks/p-094c30cb.js +1 -0
- package/dist/sankhyablocks/p-0d084a0f.entry.js +1 -0
- package/dist/sankhyablocks/{p-c870b530.js → p-0d7863ed.js} +1 -1
- package/dist/sankhyablocks/p-11081798.entry.js +1 -0
- package/dist/sankhyablocks/p-143425c0.entry.js +1 -0
- package/dist/sankhyablocks/{p-cb37982f.entry.js → p-20726710.entry.js} +1 -1
- package/dist/sankhyablocks/p-32f0935f.js +1 -0
- package/dist/sankhyablocks/p-3520c088.entry.js +1 -0
- package/dist/sankhyablocks/p-374d03f6.js +1 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-25c5428f.entry.js → p-3ab6df3d.entry.js} +1 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +1 -0
- package/dist/sankhyablocks/{p-eb636e15.entry.js → p-41f8bfa3.entry.js} +1 -1
- package/dist/sankhyablocks/p-4775a293.entry.js +1 -0
- package/dist/sankhyablocks/p-4b0938f6.entry.js +1 -0
- package/dist/sankhyablocks/p-585294ee.js +56 -0
- package/dist/sankhyablocks/p-5f74c859.entry.js +1 -0
- package/dist/sankhyablocks/p-69754d94.entry.js +1 -0
- package/dist/sankhyablocks/p-6977a26c.entry.js +1 -0
- package/dist/sankhyablocks/{p-648a7c72.entry.js → p-69efa80d.entry.js} +1 -1
- package/dist/sankhyablocks/p-70589af8.entry.js +1 -0
- package/dist/sankhyablocks/p-776ee8e3.js +1 -0
- package/dist/sankhyablocks/{p-959e0835.entry.js → p-7e2ded86.entry.js} +1 -1
- package/dist/sankhyablocks/p-7f9d6b5d.entry.js +11 -0
- package/dist/sankhyablocks/{p-0885ed3c.entry.js → p-8002dcd0.entry.js} +1 -1
- package/dist/sankhyablocks/p-809f367d.entry.js +1 -0
- package/dist/sankhyablocks/p-8437508f.js +1 -0
- package/dist/sankhyablocks/p-8eb67fa4.entry.js +1 -0
- package/dist/sankhyablocks/{p-f30526a7.entry.js → p-95df461f.entry.js} +1 -1
- package/dist/sankhyablocks/p-9695f78b.js +1 -0
- package/dist/sankhyablocks/{p-838f8234.entry.js → p-98674137.entry.js} +1 -1
- package/dist/sankhyablocks/p-a87229cd.entry.js +1 -0
- package/dist/sankhyablocks/p-a9e5b094.entry.js +1 -0
- package/dist/sankhyablocks/p-aaa3ee68.entry.js +1 -0
- package/dist/sankhyablocks/p-b0ef4383.js +1 -0
- package/dist/sankhyablocks/p-ba627e85.js +60 -0
- package/dist/sankhyablocks/p-c22c1d8e.js +1 -0
- package/dist/sankhyablocks/p-c2495304.js +1 -0
- package/dist/sankhyablocks/{p-26ad62b9.entry.js → p-c758265f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-fe49067d.entry.js → p-c8622597.entry.js} +1 -1
- package/dist/sankhyablocks/p-cb7419e0.entry.js +1 -0
- package/dist/sankhyablocks/p-d1007720.entry.js +1 -0
- package/dist/sankhyablocks/{p-a1e1b305.entry.js → p-d3f53df2.entry.js} +1 -1
- package/dist/sankhyablocks/p-d6317851.entry.js +1 -0
- package/dist/sankhyablocks/{p-b13cb8b5.js → p-d9bb09b3.js} +2 -2
- package/dist/sankhyablocks/p-e3132789.entry.js +1 -0
- package/dist/sankhyablocks/p-e6380c60.js +1 -0
- package/dist/sankhyablocks/p-f514913b.entry.js +1 -0
- package/dist/sankhyablocks/p-fa80e546.js +1 -0
- package/dist/sankhyablocks/p-fa816fb2.js +1 -0
- package/dist/sankhyablocks/p-fd8814b9.entry.js +1 -0
- package/dist/sankhyablocks/{p-584d7212.js → p-ff1990ad.js} +1 -1
- package/dist/sankhyablocks/p-ff6064e7.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/clientEvent/index.d.ts +1 -1
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +90 -15
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +13 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +10 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +49 -12
- package/dist/types/components/snk-custom-slot-elements/snk-custom-slot-elements.d.ts +7 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/enum/filterNumberVariation.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +24 -2
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +15 -1
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +30 -0
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +5 -1
- package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +6 -1
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +20 -6
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +4 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +1 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +24 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +59 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +18 -2
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +4 -0
- package/dist/types/components.d.ts +256 -32
- package/dist/types/lib/@types/index.d.ts +2 -1
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +5 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +8 -4
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +19 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +22 -0
- package/dist/types/lib/http/data-fetcher/fetchers/{dataunit-fetcher.d.ts → data-unit/dataunit-fetcher.d.ts} +5 -3
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataResult.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadDataStrategy.d.ts +7 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.d.ts +10 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRecordField.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IResponseRecord.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DataUnitStrategy.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +16 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/dist/types/lib/message/resources/snk-application.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-simple-crud.msg.d.ts +2 -0
- package/dist/types/lib/utils/constants.d.ts +3 -4
- package/dist/types/lib/workspace/workspace.d.ts +6 -0
- package/package.json +4 -4
- package/react/components.d.ts +3 -1
- package/react/components.js +3 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
- package/dist/cjs/dataunit-fetcher-910be4ce.js +0 -356
- package/dist/cjs/draggable.bundle-82a25c06.js +0 -6886
- package/dist/cjs/snk-taskbar-custom-elements.cjs.entry.js +0 -20
- package/dist/collection/components/snk-data-unit/snk-data-unit.css +0 -6
- package/dist/components/_commonjsHelpers.js +0 -17
- package/dist/components/snk-taskbar-custom-elements.d.ts +0 -11
- package/dist/components/snk-taskbar-custom-elements.js +0 -35
- package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
- package/dist/esm/dataunit-fetcher-bd8f9572.js +0 -354
- package/dist/esm/draggable.bundle-41d56f06.js +0 -6884
- package/dist/esm/pesquisa-fetcher-27819123.js +0 -165
- package/dist/esm/snk-taskbar-custom-elements.entry.js +0 -16
- package/dist/sankhyablocks/p-0df2ead8.entry.js +0 -11
- package/dist/sankhyablocks/p-112455b1.js +0 -1
- package/dist/sankhyablocks/p-324ce41e.entry.js +0 -1
- package/dist/sankhyablocks/p-34604220.entry.js +0 -1
- package/dist/sankhyablocks/p-4a78e118.js +0 -1
- package/dist/sankhyablocks/p-5534e08c.js +0 -1
- package/dist/sankhyablocks/p-5d04ae42.entry.js +0 -1
- package/dist/sankhyablocks/p-6a38bda5.entry.js +0 -1
- package/dist/sankhyablocks/p-7bcd2f89.js +0 -56
- package/dist/sankhyablocks/p-7bd5aea7.js +0 -1
- package/dist/sankhyablocks/p-8014cc25.entry.js +0 -1
- package/dist/sankhyablocks/p-928efcaa.entry.js +0 -1
- package/dist/sankhyablocks/p-989937ee.entry.js +0 -1
- package/dist/sankhyablocks/p-9a270401.entry.js +0 -1
- package/dist/sankhyablocks/p-a7ee0e6f.entry.js +0 -1
- package/dist/sankhyablocks/p-ac0556a3.js +0 -1
- package/dist/sankhyablocks/p-ae6aff81.js +0 -1
- package/dist/sankhyablocks/p-b244640b.js +0 -1
- package/dist/sankhyablocks/p-b6d6b172.js +0 -1
- package/dist/sankhyablocks/p-bba91710.entry.js +0 -1
- package/dist/sankhyablocks/p-bd628455.entry.js +0 -1
- package/dist/sankhyablocks/p-c2beb95c.js +0 -1
- package/dist/sankhyablocks/p-c555075c.entry.js +0 -1
- package/dist/sankhyablocks/p-c9841939.js +0 -1
- package/dist/sankhyablocks/p-d3ec3586.entry.js +0 -1
- package/dist/sankhyablocks/p-d708b4ab.entry.js +0 -1
- package/dist/sankhyablocks/p-d84bc5c1.js +0 -1
- package/dist/sankhyablocks/p-de76b8a8.js +0 -76
- package/dist/sankhyablocks/p-e19014a9.entry.js +0 -1
- package/dist/sankhyablocks/p-e1cb1f0b.js +0 -1
- package/dist/sankhyablocks/p-e3a82e1c.entry.js +0 -1
- package/dist/sankhyablocks/p-e9b53a9a.entry.js +0 -1
- package/dist/sankhyablocks/p-ebf8c5df.entry.js +0 -1
- package/dist/sankhyablocks/p-ed5f1204.entry.js +0 -1
- package/dist/sankhyablocks/p-f9395c20.entry.js +0 -1
- package/dist/sankhyablocks/p-f94b999e.entry.js +0 -1
- package/dist/sankhyablocks/p-fa9d3f73.js +0 -1
- package/dist/sankhyablocks/p-fb1ecd0b.entry.js +0 -1
- package/dist/sankhyablocks/p-fcd09423.entry.js +0 -1
- package/dist/sankhyablocks/p-fd15aaac.entry.js +0 -1
- package/dist/types/components/snk-taskbar/snk-taskbar-custom-elements.d.ts +0 -7
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { DataType, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage.js';
|
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
7
7
|
import { a as FilterOperand, P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
|
|
8
|
+
import { F as FilterNumberVariation } from './filterNumberVariation.js';
|
|
8
9
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
9
10
|
import { d as defineCustomElement$a } from './snk-expression-group2.js';
|
|
10
11
|
import { d as defineCustomElement$9 } from './snk-expression-item2.js';
|
|
@@ -37,6 +38,8 @@ const buildFilter = (item) => {
|
|
|
37
38
|
return buildNumber(item);
|
|
38
39
|
case FilterItemType.PERSONALIZED:
|
|
39
40
|
return buildPersonalized(item);
|
|
41
|
+
case FilterItemType.CHECK_BOX_LIST:
|
|
42
|
+
return buildCheckboxList(item);
|
|
40
43
|
default:
|
|
41
44
|
return undefined;
|
|
42
45
|
}
|
|
@@ -69,6 +72,23 @@ function buildMultiList(item) {
|
|
|
69
72
|
};
|
|
70
73
|
}
|
|
71
74
|
}
|
|
75
|
+
function buildCheckboxList(item) {
|
|
76
|
+
var _a;
|
|
77
|
+
const { id, value, props } = item;
|
|
78
|
+
const selectedOptionNames = Object.entries(value !== null && value !== void 0 ? value : {})
|
|
79
|
+
.filter(([_, valueChecked]) => valueChecked === true)
|
|
80
|
+
.map(([key, _]) => key);
|
|
81
|
+
const selectedOptionsObject = (_a = props.options) === null || _a === void 0 ? void 0 : _a.filter(option => selectedOptionNames.includes(option.name));
|
|
82
|
+
return { name: id, expression: buildCheckboxListExpression(selectedOptionsObject), params: [] };
|
|
83
|
+
}
|
|
84
|
+
function buildCheckboxListExpression(options) {
|
|
85
|
+
let expression = "";
|
|
86
|
+
options.forEach((option, index) => {
|
|
87
|
+
var _a;
|
|
88
|
+
expression += ` ${index > 0 ? ((_a = option.operand) !== null && _a !== void 0 ? _a : 'OR') : ''} ${option.expression}`;
|
|
89
|
+
});
|
|
90
|
+
return expression.trim();
|
|
91
|
+
}
|
|
72
92
|
function parseMultiListValues(multiListValue) {
|
|
73
93
|
var _a, _b;
|
|
74
94
|
const value = (_b = (_a = multiListValue === null || multiListValue === void 0 ? void 0 : multiListValue.elements) !== null && _a !== void 0 ? _a : multiListValue === null || multiListValue === void 0 ? void 0 : multiListValue.members) !== null && _b !== void 0 ? _b : multiListValue;
|
|
@@ -107,15 +127,62 @@ function buildSearch(item) {
|
|
|
107
127
|
return { name: id, expression, params: [{ name: id, dataType: DataType.TEXT, value: toString(DataType.TEXT, value.value) }] };
|
|
108
128
|
}
|
|
109
129
|
function buildText(item) {
|
|
110
|
-
|
|
130
|
+
let { id, value, props } = item;
|
|
111
131
|
const expression = props.expression;
|
|
132
|
+
if (!StringUtils.isEmpty(props.likeAs)) {
|
|
133
|
+
value = buildLikeValue(value, props.likeAs);
|
|
134
|
+
}
|
|
112
135
|
return { name: id, expression, params: [{ name: id, dataType: DataType.TEXT, value: toString(DataType.TEXT, value) }] };
|
|
113
136
|
}
|
|
114
137
|
function buildNumber(item) {
|
|
115
138
|
const { id, value, props } = item;
|
|
139
|
+
const variation = props.variation;
|
|
140
|
+
if (variation === FilterNumberVariation.INTERVAL) {
|
|
141
|
+
const { start, end } = value !== null && value !== void 0 ? value : { start: 0, end: 0 };
|
|
142
|
+
if (start && end) {
|
|
143
|
+
return {
|
|
144
|
+
name: id,
|
|
145
|
+
expression: props.intervalExpression.fullfill,
|
|
146
|
+
params: [
|
|
147
|
+
{ name: `${id}.START`, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, start) },
|
|
148
|
+
{ name: `${id}.END`, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, end) }
|
|
149
|
+
]
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
if (start) {
|
|
153
|
+
return {
|
|
154
|
+
name: id,
|
|
155
|
+
expression: props.intervalExpression.onlystart,
|
|
156
|
+
params: [
|
|
157
|
+
{ name: id, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, start) }
|
|
158
|
+
]
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
if (end) {
|
|
162
|
+
return {
|
|
163
|
+
name: id,
|
|
164
|
+
expression: props.intervalExpression.onlyend,
|
|
165
|
+
params: [
|
|
166
|
+
{ name: id, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, end) }
|
|
167
|
+
]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
116
171
|
const expression = props.expression;
|
|
117
172
|
return { name: id, expression, params: [{ name: id, dataType: DataType.NUMBER, value: toString(DataType.NUMBER, value) }] };
|
|
118
173
|
}
|
|
174
|
+
function buildLikeValue(valueAsString, likeAs) {
|
|
175
|
+
if (likeAs === "CONTANIS") {
|
|
176
|
+
return `%${valueAsString}%`;
|
|
177
|
+
}
|
|
178
|
+
else if (likeAs === "STARTS_WITH") {
|
|
179
|
+
return `${valueAsString}%`;
|
|
180
|
+
}
|
|
181
|
+
else if (likeAs === "ENDS_WITH") {
|
|
182
|
+
return `%${valueAsString}`;
|
|
183
|
+
}
|
|
184
|
+
return valueAsString;
|
|
185
|
+
}
|
|
119
186
|
function buildPersonalized(item) {
|
|
120
187
|
const { id, groupedItems = [] } = item;
|
|
121
188
|
const activeFilters = groupedItems.filter(groupItem => !!groupItem.visible);
|
|
@@ -142,13 +209,14 @@ function buildPersonalized(item) {
|
|
|
142
209
|
}
|
|
143
210
|
|
|
144
211
|
class SnkFilterModalFactory {
|
|
145
|
-
constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter }) {
|
|
212
|
+
constructor({ filterConfig, configName, onComplete, getMessage, onAddPersonalizedFilter, onEditPersonalizedFilter, onDeletePersonalizedFilter }) {
|
|
146
213
|
this._filterConfig = filterConfig;
|
|
147
214
|
this._configName = configName;
|
|
148
215
|
this._onComplete = onComplete;
|
|
149
216
|
this._getMessage = getMessage;
|
|
150
217
|
this._addPersonalizedFilterFn = onAddPersonalizedFilter;
|
|
151
218
|
this._editPersonalizedFilterFn = onEditPersonalizedFilter;
|
|
219
|
+
this._onDeletePersonalizedFilter = onDeletePersonalizedFilter;
|
|
152
220
|
}
|
|
153
221
|
applyFilters(newFilterConfig) {
|
|
154
222
|
this._onComplete(newFilterConfig);
|
|
@@ -164,6 +232,7 @@ class SnkFilterModalFactory {
|
|
|
164
232
|
filterModal.closeModal = () => this._closeModal();
|
|
165
233
|
filterModal.addPersonalizedFilter = () => this._addPersonalizedFilterFn();
|
|
166
234
|
filterModal.editPersonalizedFilter = (id) => this._editPersonalizedFilterFn(id);
|
|
235
|
+
filterModal.deletePersonalizedFilter = (filter, configName) => this._onDeletePersonalizedFilter(filter, configName);
|
|
167
236
|
return filterModal;
|
|
168
237
|
}
|
|
169
238
|
async showModal() {
|
|
@@ -182,12 +251,13 @@ class SnkFilterModalFactory {
|
|
|
182
251
|
}
|
|
183
252
|
}
|
|
184
253
|
|
|
185
|
-
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--
|
|
254
|
+
const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
|
|
186
255
|
|
|
187
256
|
const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
188
257
|
constructor() {
|
|
189
258
|
super();
|
|
190
259
|
this.__registerHost();
|
|
260
|
+
this.configUpdated = createEvent(this, "configUpdated", 7);
|
|
191
261
|
this._updateSequence = [];
|
|
192
262
|
this._loadingPending = false;
|
|
193
263
|
this._configUpdated = false;
|
|
@@ -246,6 +316,8 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
246
316
|
});
|
|
247
317
|
}
|
|
248
318
|
}
|
|
319
|
+
if (this._loadingPending || this._configUpdated)
|
|
320
|
+
this.configUpdated.emit(newValue);
|
|
249
321
|
this.processAfterUpdateConfig();
|
|
250
322
|
}
|
|
251
323
|
/**
|
|
@@ -254,6 +326,61 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
254
326
|
async reload() {
|
|
255
327
|
this.loadConfigFromStorage();
|
|
256
328
|
}
|
|
329
|
+
/**
|
|
330
|
+
* Retorna um item de filtro pelo ID.
|
|
331
|
+
*/
|
|
332
|
+
async getFilterItem(id) {
|
|
333
|
+
const item = this.filterConfig.find(item => item.id === id);
|
|
334
|
+
return Promise.resolve(ObjectUtils.copy(item));
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Atualiza um item do filtro.
|
|
338
|
+
*
|
|
339
|
+
* @param filterItem - Item com as informações atualizadas, caso o item não seja encontrado no array ele mão será modificado
|
|
340
|
+
*/
|
|
341
|
+
async updateFilterItem(newFilterItem) {
|
|
342
|
+
const itemIndex = this.filterConfig.findIndex(item => item.id === newFilterItem.id);
|
|
343
|
+
if (itemIndex == -1) {
|
|
344
|
+
console.warn("[SnkFilterBar.updateFilterItem] FilterItem não encontrado, o mesmo não será atualizado.");
|
|
345
|
+
return Promise.resolve();
|
|
346
|
+
}
|
|
347
|
+
this._loadingPending = true;
|
|
348
|
+
this.updateFilter(newFilterItem);
|
|
349
|
+
return Promise.resolve();
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Adiciona um item de filtro.
|
|
353
|
+
*
|
|
354
|
+
* @param filterItem - Item a ser adicionado, caso o item já exista com o ID ele não será adicionado novamente
|
|
355
|
+
*/
|
|
356
|
+
async addFilterItem(filterItem) {
|
|
357
|
+
const itemIndex = this.filterConfig.findIndex(item => item.id === filterItem.id);
|
|
358
|
+
if (itemIndex > -1) {
|
|
359
|
+
console.warn("[SnkFilterBar.addFilterItem] FilterItem já existe , o mesmo não será adicionado novamente.");
|
|
360
|
+
return Promise.resolve();
|
|
361
|
+
}
|
|
362
|
+
this.filterConfig.push(filterItem);
|
|
363
|
+
this._loadingPending = true;
|
|
364
|
+
this.updateFilter(filterItem);
|
|
365
|
+
return Promise.resolve();
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Remove um item de filtro.
|
|
369
|
+
*
|
|
370
|
+
* @param filterID - ID do a ser adicionado
|
|
371
|
+
*
|
|
372
|
+
* @returns {Promise<SnkFilterItemConfig|undefined>} - Retorna o item de filtro removido, ou undefined caso não encontrado.
|
|
373
|
+
*/
|
|
374
|
+
async removeFilterItem(filterID) {
|
|
375
|
+
const itemIndex = this.filterConfig.findIndex(item => item.id === filterID);
|
|
376
|
+
if (itemIndex > -1) {
|
|
377
|
+
console.warn("[SnkFilterBar.removeFilterItem] FilterItem não encontrado");
|
|
378
|
+
return Promise.resolve(undefined);
|
|
379
|
+
}
|
|
380
|
+
const itemToRemove = this.filterConfig[itemIndex];
|
|
381
|
+
this.filterConfig = this.filterConfig.filter(item => item.id !== filterID);
|
|
382
|
+
return Promise.resolve(itemToRemove);
|
|
383
|
+
}
|
|
257
384
|
componentDidLoad() {
|
|
258
385
|
if (this._element) {
|
|
259
386
|
const dataInfo = { dataUnit: this.dataUnit };
|
|
@@ -278,6 +405,8 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
278
405
|
}
|
|
279
406
|
async processAfterUpdateConfig() {
|
|
280
407
|
if (this._loadingPending) {
|
|
408
|
+
if (await this._application.isLoadedByPk() && !this._configUpdated)
|
|
409
|
+
return;
|
|
281
410
|
const personalizedFilter = this.getPersonalizedFilterItem();
|
|
282
411
|
this._pendingVariables = !PersonalizedFilterUtils.validateVariableValues(personalizedFilter);
|
|
283
412
|
if (this._pendingVariables) {
|
|
@@ -449,13 +578,18 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
449
578
|
const callbackOnApplyFilter = (filters) => {
|
|
450
579
|
this.filterConfig = filters.map(this.normalizeItem).sort((a, b) => this._filtersComparator(a, b));
|
|
451
580
|
};
|
|
581
|
+
let filtersConfigCopy = ObjectUtils.copy(this.filterConfig);
|
|
582
|
+
filtersConfigCopy = filtersConfigCopy.sort((itemA, itemB) => {
|
|
583
|
+
return itemA.originOrder - itemB.originOrder;
|
|
584
|
+
});
|
|
452
585
|
const factoryParams = {
|
|
453
|
-
filterConfig:
|
|
586
|
+
filterConfig: filtersConfigCopy,
|
|
454
587
|
configName: this.configName,
|
|
455
588
|
onComplete: callbackOnApplyFilter,
|
|
456
589
|
getMessage: (key, props) => this.getMessage(key, props),
|
|
457
590
|
onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
|
|
458
|
-
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id)
|
|
591
|
+
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
|
|
592
|
+
onDeletePersonalizedFilter: (filter, configName) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName),
|
|
459
593
|
};
|
|
460
594
|
this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
|
|
461
595
|
await this._filterModalFactory.showModal();
|
|
@@ -473,11 +607,24 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
473
607
|
this.showPersonalizedFilter = true;
|
|
474
608
|
this.personalizedFilterId = id;
|
|
475
609
|
}
|
|
610
|
+
deletePersonalizedFilter(filter, filterItemType, configName) {
|
|
611
|
+
if (filterItemType === FilterItemType.PERSONALIZED) {
|
|
612
|
+
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
handleHidePersonalizedFilter(reloadFilterBar) {
|
|
616
|
+
if (reloadFilterBar) {
|
|
617
|
+
this.loadConfigFromStorage().then(() => {
|
|
618
|
+
this.hidePersonalizedFilter();
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
else {
|
|
622
|
+
this.hidePersonalizedFilter();
|
|
623
|
+
}
|
|
624
|
+
}
|
|
476
625
|
hidePersonalizedFilter() {
|
|
477
|
-
this.
|
|
478
|
-
|
|
479
|
-
this.showPersonalizedFilter = false;
|
|
480
|
-
});
|
|
626
|
+
this.personalizedFilterId = undefined;
|
|
627
|
+
this.showPersonalizedFilter = false;
|
|
481
628
|
}
|
|
482
629
|
componentWillLoad() {
|
|
483
630
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
@@ -495,7 +642,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
495
642
|
return undefined;
|
|
496
643
|
}
|
|
497
644
|
if (this.showPersonalizedFilter) {
|
|
498
|
-
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.
|
|
645
|
+
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
|
499
646
|
}
|
|
500
647
|
return (h(Host, null, h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
|
|
501
648
|
}
|
|
@@ -514,7 +661,11 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
514
661
|
"scrollerLocked": [32],
|
|
515
662
|
"showPersonalizedFilter": [32],
|
|
516
663
|
"personalizedFilterId": [32],
|
|
517
|
-
"reload": [64]
|
|
664
|
+
"reload": [64],
|
|
665
|
+
"getFilterItem": [64],
|
|
666
|
+
"updateFilterItem": [64],
|
|
667
|
+
"addFilterItem": [64],
|
|
668
|
+
"removeFilterItem": [64]
|
|
518
669
|
}, [[0, "filterChange", "filterChangeListener"]]]);
|
|
519
670
|
function defineCustomElement() {
|
|
520
671
|
if (typeof customElements === "undefined") {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SnkFilterCheckboxList extends Components.SnkFilterCheckboxList, HTMLElement {}
|
|
4
|
+
export const SnkFilterCheckboxList: {
|
|
5
|
+
prototype: SnkFilterCheckboxList;
|
|
6
|
+
new (): SnkFilterCheckboxList;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
|
+
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
|
+
|
|
5
|
+
const SnkFilterCheckboxList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.valueChanged = createEvent(this, "valueChanged", 7);
|
|
10
|
+
this.config = undefined;
|
|
11
|
+
this.optionsList = [];
|
|
12
|
+
}
|
|
13
|
+
componentDidLoad() {
|
|
14
|
+
if (this._element) {
|
|
15
|
+
ElementIDUtils.addIDInfo(this._element, 'filterContentEditor');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
handleToggleCheck(itemChanged, checked) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
let configValueMap = (_a = this.config.value) !== null && _a !== void 0 ? _a : {};
|
|
21
|
+
configValueMap[itemChanged.name] = checked;
|
|
22
|
+
this.config = Object.assign(Object.assign({}, this.config), { value: configValueMap });
|
|
23
|
+
this.valueChanged.emit((_b = this.config) === null || _b === void 0 ? void 0 : _b.value);
|
|
24
|
+
}
|
|
25
|
+
renderOptions() {
|
|
26
|
+
return this.optionsList.map(option => (h("ez-check", { label: option.label, compact: true, onEzChange: (event) => this.handleToggleCheck(option, event.detail), value: !!this.isChecked(option.name) })));
|
|
27
|
+
}
|
|
28
|
+
isChecked(itemName) {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = this.config.value) === null || _a === void 0 ? void 0 : _a[itemName];
|
|
31
|
+
}
|
|
32
|
+
buidOptions() {
|
|
33
|
+
var _a, _b, _c;
|
|
34
|
+
const propsOptions = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.options) !== null && _c !== void 0 ? _c : [];
|
|
35
|
+
this.optionsList = [...propsOptions];
|
|
36
|
+
}
|
|
37
|
+
componentWillRender() {
|
|
38
|
+
this.buidOptions();
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
if (!this.config || this.config.type !== FilterItemType.CHECK_BOX_LIST) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
return (h("div", { class: 'ez-flex ez-flex--column' }, this.renderOptions()));
|
|
45
|
+
}
|
|
46
|
+
get _element() { return this; }
|
|
47
|
+
}, [0, "snk-filter-checkbox-list", {
|
|
48
|
+
"config": [1040],
|
|
49
|
+
"optionsList": [32]
|
|
50
|
+
}]);
|
|
51
|
+
function defineCustomElement$1() {
|
|
52
|
+
if (typeof customElements === "undefined") {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const components = ["snk-filter-checkbox-list"];
|
|
56
|
+
components.forEach(tagName => { switch (tagName) {
|
|
57
|
+
case "snk-filter-checkbox-list":
|
|
58
|
+
if (!customElements.get(tagName)) {
|
|
59
|
+
customElements.define(tagName, SnkFilterCheckboxList$1);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
} });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const SnkFilterCheckboxList = SnkFilterCheckboxList$1;
|
|
66
|
+
const defineCustomElement = defineCustomElement$1;
|
|
67
|
+
|
|
68
|
+
export { SnkFilterCheckboxList, defineCustomElement };
|
|
@@ -55,6 +55,13 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
return snkFilterPersonalizedProps;
|
|
58
|
+
case FilterItemType.CHECK_BOX_LIST:
|
|
59
|
+
return {
|
|
60
|
+
tag: "snk-filter-checkbox-list",
|
|
61
|
+
props: {
|
|
62
|
+
onValueChanged: evt => this.config = Object.assign(Object.assign({}, this.config), { value: evt.detail })
|
|
63
|
+
}
|
|
64
|
+
};
|
|
58
65
|
case FilterItemType.MULTI_LIST:
|
|
59
66
|
return {
|
|
60
67
|
tag: "snk-entity-list",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { FloatingManager, DateUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
4
|
+
import { F as FilterNumberVariation } from './filterNumberVariation.js';
|
|
4
5
|
import { d as defineCustomElement$1 } from './snk-filter-detail2.js';
|
|
5
6
|
|
|
6
7
|
const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
@@ -129,7 +130,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
getLabel(isTooltipLabel = false) {
|
|
132
|
-
var _a;
|
|
133
|
+
var _a, _b;
|
|
133
134
|
const { type, value, label, props, groupedItems = [] } = this.config;
|
|
134
135
|
if (value || groupedItems.length) {
|
|
135
136
|
if (type === FilterItemType.BINARY_SELECT) {
|
|
@@ -169,10 +170,10 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
169
170
|
}
|
|
170
171
|
else {
|
|
171
172
|
if (start) {
|
|
172
|
-
return `${label}: ${this.getMessage('snkFilterBar.
|
|
173
|
+
return `${label}: ${this.getMessage('snkFilterBar.onlyStartToltip')} ${dateFormater.format(start)}`;
|
|
173
174
|
}
|
|
174
175
|
else if (end) {
|
|
175
|
-
return `${label}: ${this.getMessage('snkFilterBar.
|
|
176
|
+
return `${label}: ${this.getMessage('snkFilterBar.onlyEndToltip')} ${dateFormater.format(end)}`;
|
|
176
177
|
}
|
|
177
178
|
else {
|
|
178
179
|
return label;
|
|
@@ -190,23 +191,46 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
190
191
|
}
|
|
191
192
|
if (type === FilterItemType.MULTI_LIST) {
|
|
192
193
|
const selectedOptions = ((_a = value.elements) !== null && _a !== void 0 ? _a : value).filter(item => item === null || item === void 0 ? void 0 : item.check);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
194
|
+
return this.getLabelFromCheckedOptions(selectedOptions, label, isTooltipLabel);
|
|
195
|
+
}
|
|
196
|
+
if (type === FilterItemType.CHECK_BOX_LIST) {
|
|
197
|
+
const selectedValues = Object.entries(value !== null && value !== void 0 ? value : {})
|
|
198
|
+
.filter(([_, value]) => value === true)
|
|
199
|
+
.map(([key, _]) => key);
|
|
200
|
+
const options = (_b = props.options) !== null && _b !== void 0 ? _b : [];
|
|
201
|
+
const selectedOptions = options.filter(option => selectedValues.includes(option.name));
|
|
202
|
+
return this.getLabelFromCheckedOptions(selectedOptions, label, isTooltipLabel);
|
|
203
|
+
}
|
|
204
|
+
if (type === FilterItemType.NUMBER && props.variation === FilterNumberVariation.INTERVAL) {
|
|
205
|
+
const { start, end } = value;
|
|
206
|
+
if (start && end) {
|
|
207
|
+
return this.getMessage('snkFilterBar.fullIntervalTooltip', { LABEL: label, START_LABEL: start, END_LABEL: end });
|
|
196
208
|
}
|
|
197
|
-
if (
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
return `${label}: ${checkedAmount} ${this.getMessage('snkFilterBar.multiListToltip')}`;
|
|
209
|
+
if (start) {
|
|
210
|
+
return `${label}: ${this.getMessage('snkFilterBar.onlyStartToltip')} ${Number(start)}`;
|
|
211
|
+
}
|
|
212
|
+
if (end) {
|
|
213
|
+
return `${label}: ${this.getMessage('snkFilterBar.onlyEndToltip')} ${Number(end)}`;
|
|
203
214
|
}
|
|
204
|
-
return `${label}: ${selectedOptions[0].label}`;
|
|
205
215
|
}
|
|
206
216
|
return `${label}: ${value}`;
|
|
207
217
|
}
|
|
208
218
|
return label;
|
|
209
219
|
}
|
|
220
|
+
getLabelFromCheckedOptions(selectedOptions, label, isTooltipLabel) {
|
|
221
|
+
const checkedAmount = selectedOptions.length;
|
|
222
|
+
if (checkedAmount === 0) {
|
|
223
|
+
return `${label}`;
|
|
224
|
+
}
|
|
225
|
+
if (checkedAmount > 1) {
|
|
226
|
+
if (isTooltipLabel) {
|
|
227
|
+
const selectedOptionsDescrptions = selectedOptions.map(item => item.label);
|
|
228
|
+
return `${label}: ${selectedOptionsDescrptions.join(',')}`;
|
|
229
|
+
}
|
|
230
|
+
return `${label}: ${checkedAmount} ${this.getMessage('snkFilterBar.multiListToltip')}`;
|
|
231
|
+
}
|
|
232
|
+
return `${label}: ${selectedOptions[0].label}`;
|
|
233
|
+
}
|
|
210
234
|
calculateActiveCount(groupedItems) {
|
|
211
235
|
return groupedItems.reduce((total, item) => {
|
|
212
236
|
if (!!item.visible)
|
|
@@ -268,7 +292,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
268
292
|
}
|
|
269
293
|
render() {
|
|
270
294
|
const leftIcon = this.getLeftIconName();
|
|
271
|
-
return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
|
|
295
|
+
return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
|
|
272
296
|
}
|
|
273
297
|
get _filterItemElement() { return this; }
|
|
274
298
|
static get watchers() { return {
|
|
@@ -141,7 +141,7 @@ const SnkFilterList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
render() {
|
|
144
|
-
return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small", ref: elem => this._popover = elem }, h("ez-filter-input", { ref: ref => this._filterInput = ref, "data-element-id": "serachFilters", mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail, onFocus: () => this._preselection = 0 }), this.getFilterItems(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
144
|
+
return (h(Host, { class: "ez-flex ez-flex--column" }, h("ez-button", { class: this.buttonClass, label: this.label, onClick: () => this.buttonClick(), mode: this.iconName ? "icon" : undefined, iconName: this.iconName, size: "small" }, h("slot", { name: "leftIcon" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("div", { class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--4", ref: elem => this._popover = elem }, h("ez-filter-input", { ref: ref => this._filterInput = ref, "data-element-id": "serachFilters", mode: "slim", label: this.findFilterText, value: this._filterArgument, onEzChange: (evt) => this._filterArgument = evt.detail, onFocus: () => this._preselection = 0 }), this.getFilterItems(), h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), this.items ? this.getFooterItems().map(item => this.buildItemElement(item)) : undefined))));
|
|
145
145
|
}
|
|
146
146
|
get _element() { return this; }
|
|
147
147
|
}, [4, "snk-filter-list", {
|
|
@@ -43,9 +43,11 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
43
43
|
case FilterItemType.SEARCH:
|
|
44
44
|
return { tag: "snk-filter-search" };
|
|
45
45
|
case FilterItemType.NUMBER:
|
|
46
|
-
return { tag: "snk-filter-number" };
|
|
46
|
+
return { tag: "snk-filter-number", props };
|
|
47
47
|
case FilterItemType.PERSONALIZED:
|
|
48
48
|
return this.buildSnkFilterPersonalizedProps();
|
|
49
|
+
case FilterItemType.CHECK_BOX_LIST:
|
|
50
|
+
return { tag: "snk-filter-checkbox-list", props };
|
|
49
51
|
case FilterItemType.MULTI_LIST:
|
|
50
52
|
return { tag: "snk-entity-list", props: { maxHeightList: "640px", rightListSlotBuilder: item => this.buildRightSlot(item) } };
|
|
51
53
|
}
|
|
@@ -54,7 +56,6 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
54
56
|
buildSnkFilterPersonalizedProps() {
|
|
55
57
|
return {
|
|
56
58
|
tag: "snk-personalized-filter-editor", props: {
|
|
57
|
-
onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, FilterItemType.PERSONALIZED),
|
|
58
59
|
onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
|
|
59
60
|
onAddFilter: () => this.addPersonalizedFilter.emit(),
|
|
60
61
|
}
|
|
@@ -69,7 +70,7 @@ const SnkFilterModalItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLEl
|
|
|
69
70
|
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { visible: newValue > 0, value: newValue, groupedItems: data.items });
|
|
70
71
|
}
|
|
71
72
|
else {
|
|
72
|
-
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: this.filterItem.type === FilterItemType.SEARCH ? data : newValue, visible: this.isVisible(newValue) });
|
|
73
|
+
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: this.filterItem.type === (FilterItemType.SEARCH || FilterItemType.CHECK_BOX_LIST) ? data : newValue, visible: this.isVisible(newValue) });
|
|
73
74
|
}
|
|
74
75
|
}
|
|
75
76
|
handleDeleteFilter(filter, filterItemType) {
|
|
@@ -5,6 +5,7 @@ import { F as FilterType, d as defineCustomElement$2 } from './snk-filter-modal-
|
|
|
5
5
|
import { F as FilterItemType } from './filter-item-type.enum.js';
|
|
6
6
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
7
7
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils.js';
|
|
8
|
+
import { F as FilterNumberVariation } from './filterNumberVariation.js';
|
|
8
9
|
|
|
9
10
|
const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter-modal__container{width:344px;max-width:344px;min-width:344px;overflow:hidden}.snk-filter-modal__content{display:flex;flex-direction:column;gap:var(--space--medium, 12px);padding-right:var(--space--3xs, 4px)}.snk-filter-modal__collapsible-box{border:var(--border--small, 1px solid) var(--color--strokes, #DCE0E8);border-radius:var(--border--radius-medium);padding:var(--space--medium, 12px) var(--space--small, 6px)}.snk-filter-modal__rendered-items{max-height:760px;overflow-x:clip;overflow-y:auto}.snk-filter-modal__rendered-items::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";
|
|
10
11
|
|
|
@@ -19,6 +20,14 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
19
20
|
this.closeModal = undefined;
|
|
20
21
|
this.addPersonalizedFilter = undefined;
|
|
21
22
|
this.editPersonalizedFilter = undefined;
|
|
23
|
+
this.deletePersonalizedFilter = undefined;
|
|
24
|
+
this.filtersToDelete = [];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Emitido quando um filtro personalizado é deletado.
|
|
28
|
+
*/
|
|
29
|
+
deletePersonalizedFilterListener(event) {
|
|
30
|
+
this.filtersToDelete.push(event.detail);
|
|
22
31
|
}
|
|
23
32
|
getCustomMessage(key, params) {
|
|
24
33
|
var _a;
|
|
@@ -86,6 +95,12 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
86
95
|
if (this.isValidCustomFilter(filterPersonalized)) {
|
|
87
96
|
this.applyFilters(this.filters);
|
|
88
97
|
}
|
|
98
|
+
if (this.filtersToDelete.length > 0) {
|
|
99
|
+
this.filtersToDelete.forEach(filter => {
|
|
100
|
+
this.deletePersonalizedFilter(filter, this.configName);
|
|
101
|
+
});
|
|
102
|
+
this.filtersToDelete = [];
|
|
103
|
+
}
|
|
89
104
|
}
|
|
90
105
|
isValidCustomFilter(filterPersonalized) {
|
|
91
106
|
const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
|
|
@@ -123,10 +138,15 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
123
138
|
const index = filterListCopy.findIndex(item => item.id === filterItem.id);
|
|
124
139
|
filterListCopy.splice(index, 1, filterItemCopy);
|
|
125
140
|
this.filters = ObjectUtils.copy(filterListCopy);
|
|
141
|
+
return;
|
|
126
142
|
}
|
|
127
|
-
|
|
128
|
-
|
|
143
|
+
if (FilterItemType.CHECK_BOX_LIST === filterItem.type) {
|
|
144
|
+
const filterListCopy = ObjectUtils.copy(this.filters);
|
|
145
|
+
filterListCopy.find(filter => filter.id === filterItem.id).value = undefined;
|
|
146
|
+
this.filters = ObjectUtils.copy(filterListCopy);
|
|
147
|
+
return;
|
|
129
148
|
}
|
|
149
|
+
this.filters.find(filter => filter.id === filterItem.id).value = undefined;
|
|
130
150
|
}
|
|
131
151
|
uncheckFilterValues(valueList) {
|
|
132
152
|
valueList.forEach(value => {
|
|
@@ -139,6 +159,11 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
139
159
|
renderFilterItem(filterItem, fullRow) {
|
|
140
160
|
return (h("snk-filter-modal-item", { class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-col ez-col--sd-6 ez-padding--small', filterItem: filterItem, configName: this.configName, onFilterChange: (event) => this.handleFilterChange(event.detail), onEditPersonalizedFilter: evt => this.editPersonalizedFilter(evt.detail), onAddPersonalizedFilter: () => this.addPersonalizedFilter() }));
|
|
141
161
|
}
|
|
162
|
+
isDefaultFilterNumberVariation(filter) {
|
|
163
|
+
var _a;
|
|
164
|
+
return filter.type === FilterItemType.NUMBER
|
|
165
|
+
&& (!filter.props.variation || ((_a = filter.props) === null || _a === void 0 ? void 0 : _a.variation) === FilterNumberVariation.DEFAULT);
|
|
166
|
+
}
|
|
142
167
|
mountFiltersLines(filters) {
|
|
143
168
|
const MAX_LINE_LENGTH = 2;
|
|
144
169
|
let currentLine = 0;
|
|
@@ -148,8 +173,8 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
148
173
|
filtersLines[currentLine] = filtersLines[currentLine] || [];
|
|
149
174
|
const item = filters[curr];
|
|
150
175
|
const isLast = curr === filters.length - 1;
|
|
151
|
-
const currentItemMatch =
|
|
152
|
-
const nextItemMatch = isLast ? false : [FilterItemType.TEXT
|
|
176
|
+
const currentItemMatch = item.type === FilterItemType.TEXT || this.isDefaultFilterNumberVariation(item);
|
|
177
|
+
const nextItemMatch = isLast ? false : filters[curr + 1].type === FilterItemType.TEXT || this.isDefaultFilterNumberVariation(filters[curr + 1]);
|
|
153
178
|
if ((currentItemMatch && nextItemMatch) || forceAddCurrent) {
|
|
154
179
|
filtersLines[currentLine].push(item);
|
|
155
180
|
forceAddCurrent = filtersLines[currentLine].length < MAX_LINE_LENGTH;
|
|
@@ -170,11 +195,17 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
170
195
|
getIformedFiltersCount(listItems) {
|
|
171
196
|
let countInformedItens = 0;
|
|
172
197
|
listItems.forEach(item => {
|
|
173
|
-
var _a, _b, _c, _d, _e;
|
|
198
|
+
var _a, _b, _c, _d, _e, _f;
|
|
174
199
|
if (FilterItemType.MULTI_LIST === item.type) {
|
|
175
200
|
countInformedItens += (_e = (_d = (_c = ((_b = (_a = item.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : item.value)) === null || _c === void 0 ? void 0 : _c.filter(value => value === null || value === void 0 ? void 0 : value.check)) === null || _d === void 0 ? void 0 : _d.length) !== null && _e !== void 0 ? _e : 0;
|
|
176
201
|
return;
|
|
177
202
|
}
|
|
203
|
+
if (FilterItemType.CHECK_BOX_LIST === item.type) {
|
|
204
|
+
countInformedItens += Object.entries((_f = item.value) !== null && _f !== void 0 ? _f : {})
|
|
205
|
+
.filter(([_, value]) => value === true)
|
|
206
|
+
.map(([key, _]) => key).length;
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
178
209
|
if (item.groupedItems != undefined) {
|
|
179
210
|
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
|
180
211
|
return;
|
|
@@ -215,8 +246,10 @@ const SnkFilterModal$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
215
246
|
"applyFilters": [16],
|
|
216
247
|
"closeModal": [16],
|
|
217
248
|
"addPersonalizedFilter": [16],
|
|
218
|
-
"editPersonalizedFilter": [16]
|
|
219
|
-
|
|
249
|
+
"editPersonalizedFilter": [16],
|
|
250
|
+
"deletePersonalizedFilter": [16],
|
|
251
|
+
"filtersToDelete": [16]
|
|
252
|
+
}, [[0, "deleteFilter", "deletePersonalizedFilterListener"]]]);
|
|
220
253
|
function defineCustomElement$1() {
|
|
221
254
|
if (typeof customElements === "undefined") {
|
|
222
255
|
return;
|