@sankhyalabs/sankhyablocks 5.19.0 → 6.0.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-0a738cdc.js +304 -0
- package/dist/cjs/IExpressionItem-1090c3fd.js +7 -0
- package/dist/cjs/PersonalizedFilterUtils-7d959e91.js +229 -0
- package/dist/cjs/{SnkFormConfigManager-69df3f74.js → SnkFormConfigManager-a583f503.js} +1 -1
- package/dist/cjs/{SnkMessageBuilder-3b5b5614.js → SnkMessageBuilder-8a2d3f26.js} +65 -4
- package/dist/cjs/{filter-bar-config-fetcher-a14536bf.js → filter-bar-config-fetcher-75219599.js} +34 -11
- package/dist/cjs/{index-de79181a.js → index-59a3e2de.js} +1 -1
- package/dist/cjs/{index-f400b1d6.js → index-614af008.js} +2 -0
- package/dist/cjs/{index-21bd01e1.js → index-aaaa2af5.js} +6 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-actions-button.cjs.entry.js +2 -2
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +4 -4
- package/dist/cjs/snk-attach.cjs.entry.js +4 -4
- package/dist/cjs/snk-client-confirm.cjs.entry.js +2 -2
- package/dist/cjs/snk-config-options.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +4 -4
- package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
- package/dist/cjs/{snk-data-unit-e9c20097.js → snk-data-unit-53fc9200.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -10
- package/dist/cjs/snk-entity-list.cjs.entry.js +6 -4
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group.cjs.entry.js +246 -0
- package/dist/cjs/{snk-filter-field-search_2.cjs.entry.js → snk-expression-item_3.cjs.entry.js} +327 -66
- package/dist/cjs/snk-field-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar.cjs.entry.js +161 -72
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +54 -69
- package/dist/cjs/snk-filter-item.cjs.entry.js +21 -7
- package/dist/cjs/snk-filter-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +57 -29
- package/dist/cjs/snk-filter-modal.cjs.entry.js +66 -12
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-period.cjs.entry.js +5 -3
- package/dist/cjs/snk-filter-personalized.cjs.entry.js +135 -55
- package/dist/cjs/snk-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid-config.cjs.entry.js +3 -3
- package/dist/cjs/snk-grid.cjs.entry.js +7 -7
- package/dist/cjs/{snk-guides-viewer-c8843478.js → snk-guides-viewer-10ffca10.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +9 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +166 -94
- package/dist/cjs/snk-pesquisa.cjs.entry.js +1 -1
- package/dist/cjs/snk-select-box.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +45 -0
- package/dist/cjs/{snk-simple-bar_2.cjs.entry.js → snk-simple-crud.cjs.entry.js} +5 -43
- package/dist/cjs/snk-tab-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +4 -4
- package/dist/cjs/{taskbar-elements-3be287d6.js → taskbar-elements-068aa945.js} +3 -3
- package/dist/cjs/{taskbar-processor-02f0fc84.js → taskbar-processor-6442c585.js} +1 -1
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js +1 -1
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +6 -4
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +34 -12
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +4 -2
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.css +66 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.js +370 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +52 -68
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +20 -6
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +110 -10
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +98 -27
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +21 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +100 -49
- package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js +1 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +22 -3
- package/dist/collection/components/snk-filter-bar/utils/filters-mock.js +96 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css +1 -1
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js +27 -6
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +39 -2
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +276 -30
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +73 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +443 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +16 -24
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css +18 -4
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +131 -21
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionGroup.js +0 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.js +5 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IParameter.js +1 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IPersonalizedFilter.js +1 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/index.js +3 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +1 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +184 -15
- package/dist/collection/lib/@types/index.js +2 -0
- package/dist/collection/lib/configs/ConfigStorage.js +15 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +36 -13
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +106 -4
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +15 -2
- package/dist/collection/lib/message/resources/snk-filter-field-search.msg.js +2 -0
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +48 -2
- package/dist/components/ConfigStorage.js +180 -1
- package/dist/components/PersonalizedFilterUtils.js +227 -0
- package/dist/components/SnkMessageBuilder.js +65 -4
- package/dist/components/filter-bar-config-fetcher.js +34 -11
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +3 -1
- package/dist/components/snk-client-confirm.js +1 -1
- package/dist/components/snk-crud.js +65 -35
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-detail-view2.js +99 -44
- package/dist/components/snk-entity-list.js +6 -4
- package/dist/components/snk-expression-group.d.ts +11 -0
- package/dist/components/snk-expression-group.js +6 -0
- package/dist/components/snk-expression-group2.js +296 -0
- package/dist/components/snk-expression-item2.js +133 -46
- package/dist/components/snk-filter-bar2.js +195 -68
- package/dist/components/snk-filter-detail2.js +52 -68
- package/dist/components/snk-filter-field-search2.js +26 -5
- package/dist/components/snk-filter-item2.js +20 -6
- package/dist/components/snk-filter-modal-item2.js +54 -27
- package/dist/components/snk-filter-modal.js +68 -12
- package/dist/components/snk-filter-param-config2.js +3 -57
- package/dist/components/snk-filter-period.js +4 -2
- package/dist/components/snk-filter-personalized.js +139 -58
- package/dist/components/snk-grid2.js +52 -16
- package/dist/components/snk-personalized-filter.js +1 -153
- package/dist/components/snk-personalized-filter2.js +238 -0
- package/dist/esm/ConfigStorage-9f4d2e67.js +300 -0
- package/dist/esm/IExpressionItem-2e922b2c.js +7 -0
- package/dist/esm/PersonalizedFilterUtils-202cd721.js +227 -0
- package/dist/esm/{SnkFormConfigManager-e60367a0.js → SnkFormConfigManager-def999fe.js} +1 -1
- package/dist/esm/{SnkMessageBuilder-188a38bb.js → SnkMessageBuilder-cc4d1599.js} +65 -4
- package/dist/esm/{filter-bar-config-fetcher-edc48f4b.js → filter-bar-config-fetcher-bd2070a3.js} +34 -11
- package/dist/esm/{index-cfd4bb13.js → index-8c3d76a6.js} +6 -1
- package/dist/esm/{index-507e19ec.js → index-a255b326.js} +3 -1
- package/dist/esm/{index-8efbf198.js → index-d60ca0ac.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/snk-actions-button.entry.js +2 -2
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +4 -4
- package/dist/esm/snk-attach.entry.js +4 -4
- package/dist/esm/snk-client-confirm.entry.js +2 -2
- package/dist/esm/snk-config-options.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +4 -4
- package/dist/esm/snk-data-exporter.entry.js +4 -4
- package/dist/esm/{snk-data-unit-79b1583a.js → snk-data-unit-97824457.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +10 -10
- package/dist/esm/snk-entity-list.entry.js +7 -5
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group.entry.js +242 -0
- package/dist/esm/{snk-filter-field-search_2.entry.js → snk-expression-item_3.entry.js} +326 -66
- package/dist/esm/snk-field-config.entry.js +1 -1
- package/dist/esm/snk-filter-bar.entry.js +156 -67
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +55 -70
- package/dist/esm/snk-filter-item.entry.js +21 -7
- package/dist/esm/snk-filter-list.entry.js +1 -1
- package/dist/esm/snk-filter-modal-item.entry.js +57 -29
- package/dist/esm/snk-filter-modal.entry.js +66 -12
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +1 -1
- package/dist/esm/snk-filter-period.entry.js +5 -3
- package/dist/esm/snk-filter-personalized.entry.js +135 -55
- package/dist/esm/snk-filter-search.entry.js +1 -1
- package/dist/esm/snk-filter-text.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form.entry.js +4 -4
- package/dist/esm/snk-grid-config.entry.js +3 -3
- package/dist/esm/snk-grid.entry.js +7 -7
- package/dist/esm/{snk-guides-viewer-59d3a78c.js → snk-guides-viewer-0380f3df.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +9 -9
- package/dist/esm/snk-personalized-filter.entry.js +166 -94
- package/dist/esm/snk-pesquisa.entry.js +1 -1
- package/dist/esm/snk-select-box.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +41 -0
- package/dist/esm/{snk-simple-bar_2.entry.js → snk-simple-crud.entry.js} +7 -44
- package/dist/esm/snk-tab-config.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +4 -4
- package/dist/esm/{taskbar-elements-8ff33c26.js → taskbar-elements-26d0fba3.js} +3 -3
- package/dist/esm/{taskbar-processor-20de6616.js → taskbar-processor-dfef41a8.js} +1 -1
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-f27dc5e9.entry.js → p-00d1cac4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b9667fbe.js → p-066ee142.js} +2 -2
- package/dist/sankhyablocks/p-09a058ba.entry.js +1 -0
- package/dist/sankhyablocks/{p-82bc4666.entry.js → p-0dec4d29.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1e6a95f5.entry.js → p-12632b8e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-384c4a6b.js → p-18b34bb4.js} +1 -1
- package/dist/sankhyablocks/{p-538c057a.entry.js → p-2ad89e28.entry.js} +1 -1
- package/dist/sankhyablocks/p-2d5108b3.js +1 -0
- package/dist/sankhyablocks/{p-ff398057.entry.js → p-34cd4b39.entry.js} +1 -1
- package/dist/sankhyablocks/p-36ecb6ab.js +1 -0
- package/dist/sankhyablocks/p-372e0185.entry.js +1 -0
- package/dist/sankhyablocks/p-3be34bd1.entry.js +1 -0
- package/dist/sankhyablocks/p-3d45107f.js +1 -0
- package/dist/sankhyablocks/{p-28c12f65.js → p-463e0936.js} +1 -1
- package/dist/sankhyablocks/{p-e701646c.entry.js → p-49d628d1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e642bf7a.entry.js → p-50db4bc4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-093febff.entry.js → p-5427566a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a02e236.js → p-590d8900.js} +1 -1
- package/dist/sankhyablocks/p-5a6c090e.entry.js +1 -0
- package/dist/sankhyablocks/p-639be4aa.entry.js +1 -0
- package/dist/sankhyablocks/{p-e2bb9c9a.entry.js → p-67a19b48.entry.js} +1 -1
- package/dist/sankhyablocks/{p-19692f92.js → p-69770075.js} +1 -1
- package/dist/sankhyablocks/p-6d4169fc.entry.js +1 -0
- package/dist/sankhyablocks/{p-0b40c655.js → p-708ee8ee.js} +1 -1
- package/dist/sankhyablocks/{p-9af04fc7.entry.js → p-718cc24b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-2d0fc912.entry.js → p-7946512f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-900b2889.entry.js → p-7a5e1be7.entry.js} +1 -1
- package/dist/sankhyablocks/p-801b8858.js +68 -0
- package/dist/sankhyablocks/{p-80e52e85.entry.js → p-847b9506.entry.js} +1 -1
- package/dist/sankhyablocks/{p-56d70073.entry.js → p-8d541539.entry.js} +1 -1
- package/dist/sankhyablocks/{p-584a315a.entry.js → p-8e98a893.entry.js} +1 -1
- package/dist/sankhyablocks/p-9731180c.entry.js +1 -0
- package/dist/sankhyablocks/p-a6055eb9.entry.js +1 -0
- package/dist/sankhyablocks/{p-b680fa7a.entry.js → p-a655ea15.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b75ce8b8.entry.js → p-a8b06801.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b25450ab.js → p-a8e5ded0.js} +1 -1
- package/dist/sankhyablocks/{p-6ac29569.entry.js → p-b66b99d9.entry.js} +1 -1
- package/dist/sankhyablocks/p-b7efc49a.entry.js +1 -0
- package/dist/sankhyablocks/{p-9c7f7214.entry.js → p-b91ee370.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e551b19a.entry.js → p-b940798f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-72e78de0.entry.js → p-bbefb3b2.entry.js} +1 -1
- package/dist/sankhyablocks/p-bdd61fa8.entry.js +1 -0
- package/dist/sankhyablocks/{p-f8c66aa3.entry.js → p-c06973e7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-257c71a7.entry.js → p-c17e19a2.entry.js} +1 -1
- package/dist/sankhyablocks/p-c6bf66e0.js +1 -0
- package/dist/sankhyablocks/p-cf90a195.entry.js +1 -0
- package/dist/sankhyablocks/{p-44c2ed16.entry.js → p-d11c5026.entry.js} +1 -1
- package/dist/sankhyablocks/p-d5145c3f.entry.js +1 -0
- package/dist/sankhyablocks/p-de328b00.entry.js +1 -0
- package/dist/sankhyablocks/{p-971abcc2.entry.js → p-e500863b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-22e44b9d.entry.js → p-e824aef2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4ce96831.entry.js → p-eb24c092.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4c2015a9.js → p-eb90de43.js} +1 -1
- package/dist/sankhyablocks/p-ebb8de34.entry.js +1 -0
- package/dist/sankhyablocks/{p-8652d177.entry.js → p-fc512cbe.entry.js} +1 -1
- package/dist/sankhyablocks/{p-786ae316.entry.js → p-fced1d89.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e0b4aec3.entry.js → p-fdb43927.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized/snk-filter-personalized.d.ts +85 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +6 -6
- 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 +18 -1
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +14 -6
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +10 -3
- package/dist/types/components/snk-filter-bar/types/custom-element-filter.d.ts +6 -0
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +10 -1
- package/dist/types/components/snk-filter-bar/utils/filters-mock.d.ts +92 -15
- package/dist/types/components/snk-filter-field-search/interfaces/index.d.ts +5 -11
- package/dist/types/components/snk-filter-field-search/snk-filter-field-search.d.ts +3 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +39 -6
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +82 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.d.ts +1 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +13 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionGroup.d.ts +0 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IExpressionItem.d.ts +23 -3
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IParameter.d.ts +21 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/IPersonalizedFilter.d.ts +11 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/interfaces/index.d.ts +3 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +14 -2
- package/dist/types/components.d.ts +169 -10
- package/dist/types/lib/@types/index.d.ts +3 -1
- package/dist/types/lib/configs/ConfigStorage.d.ts +5 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +4 -2
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +5 -0
- package/dist/types/lib/store/index.d.ts +1 -2
- package/package.json +5 -5
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ConfigStorage-f68c3607.js +0 -124
- package/dist/cjs/index-8d94b7e0.js +0 -7
- package/dist/cjs/snk-expression-item.cjs.entry.js +0 -213
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.js +0 -214
- package/dist/esm/ConfigStorage-e6c17998.js +0 -121
- package/dist/esm/index-620ac460.js +0 -7
- package/dist/esm/snk-expression-item.entry.js +0 -209
- package/dist/sankhyablocks/p-0b6ddb67.entry.js +0 -1
- package/dist/sankhyablocks/p-0c2afa63.entry.js +0 -1
- package/dist/sankhyablocks/p-343699ad.entry.js +0 -1
- package/dist/sankhyablocks/p-471568c7.entry.js +0 -1
- package/dist/sankhyablocks/p-6c2c71ca.js +0 -1
- package/dist/sankhyablocks/p-8ce9ea9f.entry.js +0 -1
- package/dist/sankhyablocks/p-8efb0f47.entry.js +0 -1
- package/dist/sankhyablocks/p-9a448ff9.entry.js +0 -1
- package/dist/sankhyablocks/p-9e50681c.entry.js +0 -1
- package/dist/sankhyablocks/p-9f66bc54.entry.js +0 -1
- package/dist/sankhyablocks/p-b1c02726.js +0 -1
- package/dist/sankhyablocks/p-b34d23fa.js +0 -1
- package/dist/sankhyablocks/p-c20dd153.entry.js +0 -1
- package/dist/sankhyablocks/p-cbb5c440.entry.js +0 -1
- package/dist/sankhyablocks/p-f3241ada.entry.js +0 -1
- package/dist/sankhyablocks/p-f4184ce7.js +0 -1
- package/dist/sankhyablocks/p-ff96b509.entry.js +0 -27
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-personalized.d.ts +0 -40
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-aaaa2af5.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
@@ -10,7 +10,7 @@ const SnkFilterItem = class {
|
|
10
10
|
constructor(hostRef) {
|
11
11
|
index.registerInstance(this, hostRef);
|
12
12
|
this.visibleChanged = index.createEvent(this, "visibleChanged", 7);
|
13
|
-
this.filterChange = index.createEvent(this, "filterChange",
|
13
|
+
this.filterChange = index.createEvent(this, "filterChange", 3);
|
14
14
|
this.innerClickCheck = (_floatingContainer, node) => {
|
15
15
|
if (node.id != core.FloatingManager.MODAL_ELEMENT_ID) {
|
16
16
|
return true;
|
@@ -120,8 +120,8 @@ const SnkFilterItem = class {
|
|
120
120
|
}
|
121
121
|
getLabel(isTooltipLabel = false) {
|
122
122
|
var _a;
|
123
|
-
const { type, value, label, props } = this.config;
|
124
|
-
if (value) {
|
123
|
+
const { type, value, label, props, groupedItems = [] } = this.config;
|
124
|
+
if (value || groupedItems.length) {
|
125
125
|
if (type === filterItemType_enum.FilterItemType.BINARY_SELECT) {
|
126
126
|
const [optOne, optTwo] = props.options;
|
127
127
|
const tooltip = this.getMessage('snkFilterBar.binarySelectTooltip');
|
@@ -173,7 +173,14 @@ const SnkFilterItem = class {
|
|
173
173
|
return `${label}: ${value.value} - ${value.label}`;
|
174
174
|
}
|
175
175
|
if (type === filterItemType_enum.FilterItemType.PERSONALIZED) {
|
176
|
-
|
176
|
+
const activeCount = groupedItems.reduce((total, item) => {
|
177
|
+
if (!!item.visible)
|
178
|
+
return total + 1;
|
179
|
+
return total;
|
180
|
+
}, 0);
|
181
|
+
if (activeCount <= 0)
|
182
|
+
return label;
|
183
|
+
return `${label}: ${this.getMessage('snkFilterBar.personalizedCount', { activeCount })}`;
|
177
184
|
}
|
178
185
|
if (type === filterItemType_enum.FilterItemType.MULTI_LIST) {
|
179
186
|
const selectedOptions = ((_a = value.elements) !== null && _a !== void 0 ? _a : value).filter(item => item === null || item === void 0 ? void 0 : item.check);
|
@@ -239,10 +246,17 @@ const SnkFilterItem = class {
|
|
239
246
|
}
|
240
247
|
return undefined;
|
241
248
|
}
|
242
|
-
|
249
|
+
getEnabledChip() {
|
243
250
|
var _a, _b, _c, _d;
|
251
|
+
if (this.config.type === filterItemType_enum.FilterItemType.PERSONALIZED) {
|
252
|
+
const { groupedItems = [] } = this.config;
|
253
|
+
return groupedItems.some(item => item.visible);
|
254
|
+
}
|
255
|
+
return (filterItemType_enum.FilterItemType.MULTI_LIST != this.config.type && this.config.value != undefined) || (((_d = (_c = ((_b = (_a = this.config.value) === null || _a === void 0 ? void 0 : _a.elements) !== null && _b !== void 0 ? _b : this.config.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) > 0);
|
256
|
+
}
|
257
|
+
render() {
|
244
258
|
const leftIcon = this.getLeftIconName();
|
245
|
-
return (index.h(index.Host, Object.assign({}, this.applyTooltip()), index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value:
|
259
|
+
return (index.h(index.Host, Object.assign({}, this.applyTooltip()), index.h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? index.h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, index.h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), index.h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, index.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 }))));
|
246
260
|
}
|
247
261
|
get _filterItemElement() { return index.getElement(this); }
|
248
262
|
static get watchers() { return {
|
@@ -2,15 +2,17 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-aaaa2af5.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
|
-
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
9
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
10
|
-
const
|
11
|
-
require('./
|
9
|
+
const ConfigStorage = require('./ConfigStorage-0a738cdc.js');
|
10
|
+
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
11
|
+
require('./form-config-fetcher-92bc8fe7.js');
|
12
12
|
require('./DataFetcher-a9d0228f.js');
|
13
13
|
require('./_commonjsHelpers-537d719a.js');
|
14
|
+
require('./resource-fetcher-2979b54b.js');
|
15
|
+
require('./filter-bar-config-fetcher-75219599.js');
|
14
16
|
|
15
17
|
const snkFilterModalItemCss = ".grow{flex-grow:1}.gap{gap:4px}";
|
16
18
|
|
@@ -18,43 +20,63 @@ const SnkFilterModalItem = class {
|
|
18
20
|
constructor(hostRef) {
|
19
21
|
index.registerInstance(this, hostRef);
|
20
22
|
this.filterChange = index.createEvent(this, "filterChange", 7);
|
23
|
+
this.editPersonalizedFilter = index.createEvent(this, "editPersonalizedFilter", 7);
|
24
|
+
this.addPersonalizedFilter = index.createEvent(this, "addPersonalizedFilter", 7);
|
21
25
|
this.filterItem = undefined;
|
26
|
+
this.configName = undefined;
|
22
27
|
}
|
23
28
|
observeFilterItem(newValue) {
|
24
29
|
var _a, _b;
|
30
|
+
this._editor && (this._editor["config"] = newValue);
|
25
31
|
(_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
|
26
32
|
this.filterChange.emit(newValue);
|
27
|
-
|
33
|
+
//isso faz o filtro salvar o estado precocemente. Caso: Botão limpar filtro dispara dezenas de vezes
|
34
|
+
//this.saveConfig();
|
28
35
|
}
|
29
36
|
getContentEditorConfig() {
|
30
|
-
const
|
37
|
+
const props = { presentationMode: presentationMode.EPresentationMode.MODAL };
|
31
38
|
switch (this.filterItem.type) {
|
32
39
|
case filterItemType_enum.FilterItemType.BINARY_SELECT:
|
33
|
-
return { tag: "snk-filter-binary-select",
|
40
|
+
return { tag: "snk-filter-binary-select", props };
|
34
41
|
case filterItemType_enum.FilterItemType.MULTI_SELECT:
|
35
42
|
return { tag: "snk-filter-multi-select" };
|
36
43
|
case filterItemType_enum.FilterItemType.PERIOD:
|
37
|
-
return { tag: "snk-filter-period",
|
44
|
+
return { tag: "snk-filter-period", props };
|
38
45
|
case filterItemType_enum.FilterItemType.SEARCH:
|
39
46
|
return { tag: "snk-filter-search" };
|
40
47
|
case filterItemType_enum.FilterItemType.NUMBER:
|
41
48
|
return { tag: "snk-filter-number" };
|
42
49
|
case filterItemType_enum.FilterItemType.PERSONALIZED:
|
43
|
-
|
50
|
+
const snkFilterPersonalizedProps = {
|
51
|
+
tag: "snk-filter-personalized", props: {
|
52
|
+
onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, filterItemType_enum.FilterItemType.PERSONALIZED),
|
53
|
+
onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
|
54
|
+
onAddFilter: () => this.addPersonalizedFilter.emit(),
|
55
|
+
}
|
56
|
+
};
|
57
|
+
return snkFilterPersonalizedProps;
|
44
58
|
case filterItemType_enum.FilterItemType.MULTI_LIST:
|
45
|
-
return { tag: "snk-entity-list",
|
59
|
+
return { tag: "snk-entity-list", props: { maxHeightList: "640px", rightListSlotBuilder: item => this.buildRightSlot(item) } };
|
46
60
|
}
|
47
61
|
return { tag: "snk-filter-text" };
|
48
62
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
63
|
+
isVisible(newValue) {
|
64
|
+
return !this.filterItem.visible ? newValue !== undefined : true;
|
65
|
+
}
|
66
|
+
updateFilterValue(data) {
|
67
|
+
const newValue = (data === null || data === void 0 ? void 0 : data.value) !== undefined ? data.value : data;
|
68
|
+
if (this.filterItem.groupedItems != undefined) {
|
69
|
+
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { visible: newValue > 0, value: newValue, groupedItems: data.items });
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: newValue, visible: this.isVisible(newValue) });
|
54
73
|
}
|
74
|
+
this.saveConfig();
|
55
75
|
}
|
56
|
-
|
57
|
-
|
76
|
+
handleDeleteFilter(filter, filterItemType) {
|
77
|
+
if (filterItemType === filterItemType_enum.FilterItemType.PERSONALIZED) {
|
78
|
+
ConfigStorage.ConfigStorage.removePersonalizedFilter(filter, this.configName);
|
79
|
+
}
|
58
80
|
}
|
59
81
|
componentDidLoad() {
|
60
82
|
if (this._element) {
|
@@ -65,25 +87,31 @@ const SnkFilterModalItem = class {
|
|
65
87
|
}
|
66
88
|
}
|
67
89
|
buildRightSlot(item) {
|
68
|
-
return index.h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) });
|
90
|
+
return (index.h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) }));
|
69
91
|
}
|
70
92
|
removeValueFromConfig(item) {
|
71
|
-
var _a, _b, _c
|
72
|
-
const index = (_b = (_a = this.filterItem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.findIndex(
|
73
|
-
|
74
|
-
(
|
75
|
-
this.
|
93
|
+
var _a, _b, _c;
|
94
|
+
const index = (_b = (_a = this.filterItem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.findIndex(({ id }) => id === item.id);
|
95
|
+
const filterItemCopy = core.ObjectUtils.copy(this.filterItem);
|
96
|
+
(_c = filterItemCopy === null || filterItemCopy === void 0 ? void 0 : filterItemCopy.value) === null || _c === void 0 ? void 0 : _c.splice(index, 1);
|
97
|
+
this.updateFilterValue(filterItemCopy.value);
|
98
|
+
}
|
99
|
+
canShowDetailModal() {
|
100
|
+
const { CUSTOM_FILTER, OTHER_FILTERS } = filterType_enum.FilterType;
|
101
|
+
return ![CUSTOM_FILTER, OTHER_FILTERS].includes(this.filterItem.filterType) && this.filterItem.type !== filterItemType_enum.FilterItemType.BINARY_SELECT;
|
76
102
|
}
|
77
103
|
saveConfig() {
|
78
|
-
|
79
|
-
(
|
80
|
-
|
104
|
+
//Precisa ser rediscutido... não podemos salvar configuração por conta própria. Não temos autonomia pra isso.
|
105
|
+
/*if(FilterItemType.MULTI_LIST !== this.filterItem.type) return;
|
106
|
+
|
107
|
+
this._application?.getResourceID().then(resourceId => {
|
108
|
+
const fetcher = new FilterBarConfigFetcher();
|
81
109
|
fetcher.saveEntityListConfig(this.filterItem, resourceId, this._application.configName);
|
82
|
-
})
|
110
|
+
});*/
|
83
111
|
}
|
84
112
|
render() {
|
85
|
-
const { tag: ContentEditor,
|
86
|
-
return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), index.h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor },
|
113
|
+
const { tag: ContentEditor, props } = this.getContentEditorConfig();
|
114
|
+
return (index.h(index.Host, null, index.h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), index.h(ContentEditor, Object.assign({ ref: ref => this._editor = ref, config: this.filterItem, value: this.filterItem.value, onValueChanged: (event) => this.updateFilterValue(event.detail), "data-element-id": this._idContentEditor }, props)))));
|
87
115
|
}
|
88
116
|
get _element() { return index.getElement(this); }
|
89
117
|
static get watchers() { return {
|
@@ -2,29 +2,61 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-aaaa2af5.js');
|
6
6
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
7
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
7
8
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
8
9
|
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
10
|
+
const core = require('@sankhyalabs/core');
|
11
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7d959e91.js');
|
12
|
+
require('./index-614af008.js');
|
9
13
|
|
10
|
-
const snkFilterModalCss = "ez-modal{--ez-modal-content-padding:24px 12px}.snk-filter__modal-container{width:344px;max-width:344px;overflow:hidden}.snk-filter__modal-content{display:flex;flex-direction:column;gap:12px;max-height:760px;overflow-x:clip;overflow-y:auto;padding-right:4px}.snk-filter__modal-content::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.snk-filter__modal-collapsible-box{border:1px solid #DCE0E8;border-radius:var(--border--radius-medium);padding:12px 6px}";
|
14
|
+
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:12px;max-height:760px;overflow-x:clip;overflow-y:auto;padding-right:4px}.snk-filter__modal-content::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}.snk-filter__modal-collapsible-box{border:1px solid #DCE0E8;border-radius:var(--border--radius-medium);padding:12px 6px}";
|
11
15
|
|
12
16
|
const SnkFilterModal = class {
|
13
17
|
constructor(hostRef) {
|
14
18
|
index.registerInstance(this, hostRef);
|
15
19
|
this.getMessage = undefined;
|
20
|
+
this.configName = undefined;
|
16
21
|
this.filters = undefined;
|
17
22
|
this.applyFilters = undefined;
|
18
23
|
this.clearAll = undefined;
|
19
24
|
this.closeModal = undefined;
|
25
|
+
this.addPersonalizedFilter = undefined;
|
26
|
+
this.editPersonalizedFilter = undefined;
|
20
27
|
}
|
21
28
|
getCustomMessage(key, params) {
|
22
29
|
var _a;
|
23
30
|
return (_a = this.getMessage) === null || _a === void 0 ? void 0 : _a.call(this, `snkFilterBar.filterModal.${key}`, params);
|
24
31
|
}
|
32
|
+
//TODO: tratar clear all dos filtros personalizados
|
25
33
|
handleClearAll() {
|
26
|
-
const
|
27
|
-
this.filters
|
34
|
+
const quickFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.QUICK_FILTER);
|
35
|
+
const otherFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.OTHER_FILTERS);
|
36
|
+
this.handleClearFilterList(quickFilters);
|
37
|
+
otherFilters.forEach(this.handleClearSigleFilter.bind(this));
|
38
|
+
if (this.clearAll) {
|
39
|
+
this.filters = this.clearAll(this.filters);
|
40
|
+
}
|
41
|
+
}
|
42
|
+
handleClose() {
|
43
|
+
const hasChangesToSave = JSON.stringify(this.filters) !== JSON.stringify(this._originalFilterConfig);
|
44
|
+
if (!hasChangesToSave) {
|
45
|
+
this.closeModal();
|
46
|
+
return;
|
47
|
+
}
|
48
|
+
return utils.ApplicationUtils.confirm(this.getCustomMessage('validations.notSaved.title'), this.getCustomMessage('validations.notSaved.message')).then((cancelAction) => {
|
49
|
+
if (cancelAction)
|
50
|
+
this.closeModal();
|
51
|
+
});
|
52
|
+
}
|
53
|
+
validatePersonalizedFilter() {
|
54
|
+
const filterPersonalized = this.filters.find(filter => filter.filterType === filterType_enum.FilterType.CUSTOM_FILTER);
|
55
|
+
const isValid = PersonalizedFilterUtils.PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
|
56
|
+
if (!isValid) {
|
57
|
+
return utils.ApplicationUtils.alert(this.getCustomMessage('validations.notFullFilled.title'), this.getCustomMessage('validations.notFullFilled.message'));
|
58
|
+
}
|
59
|
+
this.applyFilters(this.filters);
|
28
60
|
}
|
29
61
|
modalActionListener(evt) {
|
30
62
|
const modalAction = evt.detail;
|
@@ -33,17 +65,32 @@ const SnkFilterModal = class {
|
|
33
65
|
this.handleClearAll();
|
34
66
|
break;
|
35
67
|
case ezModalContainer.ModalAction.OK:
|
36
|
-
this.
|
68
|
+
this.validatePersonalizedFilter();
|
69
|
+
break;
|
37
70
|
case ezModalContainer.ModalAction.CLOSE:
|
38
|
-
this.
|
71
|
+
this.handleClose();
|
72
|
+
break;
|
39
73
|
}
|
40
74
|
}
|
41
75
|
handleFilterChange(filterConfig) {
|
42
76
|
this.filters = this.filters.map(filter => filter.id === filterConfig.id ? filterConfig : filter);
|
43
77
|
}
|
44
|
-
|
78
|
+
handleClearFilterList(filterList) {
|
45
79
|
this.filters = this.filters.map(filter => filterList.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: filterItemType_enum.FilterItemType.MULTI_LIST === filter.type ? this.uncheckFilterValues(filter.value) : undefined })) : filter);
|
46
80
|
}
|
81
|
+
handleClearSigleFilter(filterItem) {
|
82
|
+
if (filterItemType_enum.FilterItemType.MULTI_LIST === filterItem.type) {
|
83
|
+
let filterItemCopy = core.ObjectUtils.copy(filterItem);
|
84
|
+
this.uncheckFilterValues(filterItemCopy.value);
|
85
|
+
const filterListCopy = core.ObjectUtils.copy(this.filters);
|
86
|
+
const index = filterListCopy.findIndex(item => item.id === filterItem.id);
|
87
|
+
filterListCopy.splice(index, 1, filterItemCopy);
|
88
|
+
this.filters = core.ObjectUtils.copy(filterListCopy);
|
89
|
+
}
|
90
|
+
else {
|
91
|
+
this.filters.find(filter => filter.id === filterItem.id).value = undefined;
|
92
|
+
}
|
93
|
+
}
|
47
94
|
uncheckFilterValues(valueList) {
|
48
95
|
valueList.forEach(value => {
|
49
96
|
if (!!value) {
|
@@ -53,7 +100,7 @@ const SnkFilterModal = class {
|
|
53
100
|
return valueList;
|
54
101
|
}
|
55
102
|
renderFilterItem(filterItem, fullRow) {
|
56
|
-
return (index.h("snk-filter-modal-item", { class: fullRow ? 'ez-col ez-col--sd-12' : 'ez-col ez-col--sd-6 ez-padding--small', filterItem: filterItem, onFilterChange: (event) => this.handleFilterChange(event.detail) }));
|
103
|
+
return (index.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() }));
|
57
104
|
}
|
58
105
|
mountFiltersLines(filters) {
|
59
106
|
const MAX_LINE_LENGTH = 2;
|
@@ -91,30 +138,37 @@ const SnkFilterModal = class {
|
|
91
138
|
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;
|
92
139
|
return;
|
93
140
|
}
|
141
|
+
if (item.groupedItems != undefined) {
|
142
|
+
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
143
|
+
return;
|
144
|
+
}
|
94
145
|
if (!!item.value) {
|
95
146
|
countInformedItens++;
|
96
147
|
}
|
97
148
|
});
|
98
149
|
return countInformedItens;
|
99
150
|
}
|
100
|
-
renderCollapsibleFilterBox(label, listItems) {
|
151
|
+
renderCollapsibleFilterBox(label, listItems, isSingleItem, shouldRenderFooter = true) {
|
101
152
|
if (!listItems.length)
|
102
153
|
return null;
|
103
154
|
const appliedFilters = this.getIformedFiltersCount(listItems);
|
104
155
|
const lines = this.mountFiltersLines(listItems);
|
105
|
-
return (index.h("ez-collapsible-box", { class: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters &&
|
106
|
-
index.h("ez-badge", { class: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toString() }), lines.map(this.renderFilterLine.bind(this)), index.h("div", { class: "ez-flex ez-flex--justify-end grow" }, index.h("ez-button", { class: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => this.handleClearFilters(listItems) }))));
|
156
|
+
return (index.h("ez-collapsible-box", { class: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters && (index.h("ez-badge", { class: "ez-badge--primary-subtle", slot: "rightSlot", label: appliedFilters === null || appliedFilters === void 0 ? void 0 : appliedFilters.toString() })), lines.map(this.renderFilterLine.bind(this)), shouldRenderFooter && (index.h("div", { class: "ez-flex ez-flex--justify-end grow" }, index.h("ez-button", { class: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => isSingleItem ? this.handleClearSigleFilter(listItems[0]) : this.handleClearFilterList(listItems) })))));
|
107
157
|
}
|
108
158
|
componentWillRender() {
|
109
159
|
this._modalTitle = this.getCustomMessage('title');
|
110
160
|
this._okButtonLabel = this.getCustomMessage('okButtonLabel');
|
111
161
|
this._cancelButtonLabel = this.getCustomMessage('cancelButtonLabel');
|
112
162
|
}
|
163
|
+
componentDidLoad() {
|
164
|
+
if (!this._originalFilterConfig)
|
165
|
+
this._originalFilterConfig = this.filters;
|
166
|
+
}
|
113
167
|
render() {
|
114
168
|
const customFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.CUSTOM_FILTER);
|
115
169
|
const quickFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.QUICK_FILTER);
|
116
170
|
const otherFilters = this.filters.filter(filter => filter.filterType === filterType_enum.FilterType.OTHER_FILTERS);
|
117
|
-
return (index.h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, index.h("div", { class: "snk-filter__modal-content" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter])))));
|
171
|
+
return (index.h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, index.h("div", { class: "snk-filter__modal-content ez-col--sd-12" }, this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
118
172
|
}
|
119
173
|
};
|
120
174
|
SnkFilterModal.style = snkFilterModalCss;
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-aaaa2af5.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-aaaa2af5.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const index = require('./index-
|
5
|
+
const index = require('./index-aaaa2af5.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-aa823a00.js');
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
@@ -56,8 +56,10 @@ const SnkFilterPeriod = class {
|
|
56
56
|
}
|
57
57
|
}
|
58
58
|
componentWillLoad() {
|
59
|
-
|
60
|
-
|
59
|
+
if (this.getMessage) {
|
60
|
+
this._startDateLabel = this.getMessage('snkFilterBar.labelStartDatePeriod');
|
61
|
+
this._endDateLabel = this.getMessage('snkFilterBar.labelEndDatePeriod');
|
62
|
+
}
|
61
63
|
}
|
62
64
|
render() {
|
63
65
|
if (!this.config || this.config.type !== filterItemType_enum.FilterItemType.PERIOD) {
|