@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
@@ -112,8 +112,8 @@ export class SnkFilterItem {
|
|
112
112
|
}
|
113
113
|
getLabel(isTooltipLabel = false) {
|
114
114
|
var _a;
|
115
|
-
const { type, value, label, props } = this.config;
|
116
|
-
if (value) {
|
115
|
+
const { type, value, label, props, groupedItems = [] } = this.config;
|
116
|
+
if (value || groupedItems.length) {
|
117
117
|
if (type === FilterItemType.BINARY_SELECT) {
|
118
118
|
const [optOne, optTwo] = props.options;
|
119
119
|
const tooltip = this.getMessage('snkFilterBar.binarySelectTooltip');
|
@@ -165,7 +165,14 @@ export class SnkFilterItem {
|
|
165
165
|
return `${label}: ${value.value} - ${value.label}`;
|
166
166
|
}
|
167
167
|
if (type === FilterItemType.PERSONALIZED) {
|
168
|
-
|
168
|
+
const activeCount = groupedItems.reduce((total, item) => {
|
169
|
+
if (!!item.visible)
|
170
|
+
return total + 1;
|
171
|
+
return total;
|
172
|
+
}, 0);
|
173
|
+
if (activeCount <= 0)
|
174
|
+
return label;
|
175
|
+
return `${label}: ${this.getMessage('snkFilterBar.personalizedCount', { activeCount })}`;
|
169
176
|
}
|
170
177
|
if (type === FilterItemType.MULTI_LIST) {
|
171
178
|
const selectedOptions = ((_a = value.elements) !== null && _a !== void 0 ? _a : value).filter(item => item === null || item === void 0 ? void 0 : item.check);
|
@@ -231,10 +238,17 @@ export class SnkFilterItem {
|
|
231
238
|
}
|
232
239
|
return undefined;
|
233
240
|
}
|
234
|
-
|
241
|
+
getEnabledChip() {
|
235
242
|
var _a, _b, _c, _d;
|
243
|
+
if (this.config.type === FilterItemType.PERSONALIZED) {
|
244
|
+
const { groupedItems = [] } = this.config;
|
245
|
+
return groupedItems.some(item => item.visible);
|
246
|
+
}
|
247
|
+
return (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);
|
248
|
+
}
|
249
|
+
render() {
|
236
250
|
const leftIcon = this.getLeftIconName();
|
237
|
-
return (h(Host, Object.assign({}, this.applyTooltip()), h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value:
|
251
|
+
return (h(Host, Object.assign({}, this.applyTooltip()), 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 }))));
|
238
252
|
}
|
239
253
|
static get is() { return "snk-filter-item"; }
|
240
254
|
static get properties() {
|
@@ -299,7 +313,7 @@ export class SnkFilterItem {
|
|
299
313
|
}, {
|
300
314
|
"method": "filterChange",
|
301
315
|
"name": "filterChange",
|
302
|
-
"bubbles":
|
316
|
+
"bubbles": false,
|
303
317
|
"cancelable": true,
|
304
318
|
"composed": true,
|
305
319
|
"docs": {
|
@@ -1,22 +1,53 @@
|
|
1
1
|
import { h } from '@stencil/core';
|
2
2
|
import { ModalAction } from "@sankhyalabs/ezui/dist/collection/components/ez-modal-container";
|
3
|
+
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
3
4
|
import FilterType from '../types/filter-type.enum';
|
4
5
|
import FilterItemType from '../filter-item/filter-item-type.enum';
|
6
|
+
import { ObjectUtils } from '@sankhyalabs/core';
|
7
|
+
import { PersonalizedFilterUtils } from '../../snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
|
5
8
|
export class SnkFilterModal {
|
6
9
|
constructor() {
|
7
10
|
this.getMessage = undefined;
|
11
|
+
this.configName = undefined;
|
8
12
|
this.filters = undefined;
|
9
13
|
this.applyFilters = undefined;
|
10
14
|
this.clearAll = undefined;
|
11
15
|
this.closeModal = undefined;
|
16
|
+
this.addPersonalizedFilter = undefined;
|
17
|
+
this.editPersonalizedFilter = undefined;
|
12
18
|
}
|
13
19
|
getCustomMessage(key, params) {
|
14
20
|
var _a;
|
15
21
|
return (_a = this.getMessage) === null || _a === void 0 ? void 0 : _a.call(this, `snkFilterBar.filterModal.${key}`, params);
|
16
22
|
}
|
23
|
+
//TODO: tratar clear all dos filtros personalizados
|
17
24
|
handleClearAll() {
|
18
|
-
const
|
19
|
-
this.filters
|
25
|
+
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
26
|
+
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
27
|
+
this.handleClearFilterList(quickFilters);
|
28
|
+
otherFilters.forEach(this.handleClearSigleFilter.bind(this));
|
29
|
+
if (this.clearAll) {
|
30
|
+
this.filters = this.clearAll(this.filters);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
handleClose() {
|
34
|
+
const hasChangesToSave = JSON.stringify(this.filters) !== JSON.stringify(this._originalFilterConfig);
|
35
|
+
if (!hasChangesToSave) {
|
36
|
+
this.closeModal();
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
return ApplicationUtils.confirm(this.getCustomMessage('validations.notSaved.title'), this.getCustomMessage('validations.notSaved.message')).then((cancelAction) => {
|
40
|
+
if (cancelAction)
|
41
|
+
this.closeModal();
|
42
|
+
});
|
43
|
+
}
|
44
|
+
validatePersonalizedFilter() {
|
45
|
+
const filterPersonalized = this.filters.find(filter => filter.filterType === FilterType.CUSTOM_FILTER);
|
46
|
+
const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
|
47
|
+
if (!isValid) {
|
48
|
+
return ApplicationUtils.alert(this.getCustomMessage('validations.notFullFilled.title'), this.getCustomMessage('validations.notFullFilled.message'));
|
49
|
+
}
|
50
|
+
this.applyFilters(this.filters);
|
20
51
|
}
|
21
52
|
modalActionListener(evt) {
|
22
53
|
const modalAction = evt.detail;
|
@@ -25,9 +56,11 @@ export class SnkFilterModal {
|
|
25
56
|
this.handleClearAll();
|
26
57
|
break;
|
27
58
|
case ModalAction.OK:
|
28
|
-
this.
|
59
|
+
this.validatePersonalizedFilter();
|
60
|
+
break;
|
29
61
|
case ModalAction.CLOSE:
|
30
|
-
this.
|
62
|
+
this.handleClose();
|
63
|
+
break;
|
31
64
|
default:
|
32
65
|
break;
|
33
66
|
}
|
@@ -35,9 +68,22 @@ export class SnkFilterModal {
|
|
35
68
|
handleFilterChange(filterConfig) {
|
36
69
|
this.filters = this.filters.map(filter => filter.id === filterConfig.id ? filterConfig : filter);
|
37
70
|
}
|
38
|
-
|
71
|
+
handleClearFilterList(filterList) {
|
39
72
|
this.filters = this.filters.map(filter => filterList.includes(filter) ? (Object.assign(Object.assign({}, filter), { value: FilterItemType.MULTI_LIST === filter.type ? this.uncheckFilterValues(filter.value) : undefined })) : filter);
|
40
73
|
}
|
74
|
+
handleClearSigleFilter(filterItem) {
|
75
|
+
if (FilterItemType.MULTI_LIST === filterItem.type) {
|
76
|
+
let filterItemCopy = ObjectUtils.copy(filterItem);
|
77
|
+
this.uncheckFilterValues(filterItemCopy.value);
|
78
|
+
const filterListCopy = ObjectUtils.copy(this.filters);
|
79
|
+
const index = filterListCopy.findIndex(item => item.id === filterItem.id);
|
80
|
+
filterListCopy.splice(index, 1, filterItemCopy);
|
81
|
+
this.filters = ObjectUtils.copy(filterListCopy);
|
82
|
+
}
|
83
|
+
else {
|
84
|
+
this.filters.find(filter => filter.id === filterItem.id).value = undefined;
|
85
|
+
}
|
86
|
+
}
|
41
87
|
uncheckFilterValues(valueList) {
|
42
88
|
valueList.forEach(value => {
|
43
89
|
if (!!value) {
|
@@ -47,7 +93,7 @@ export class SnkFilterModal {
|
|
47
93
|
return valueList;
|
48
94
|
}
|
49
95
|
renderFilterItem(filterItem, fullRow) {
|
50
|
-
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, onFilterChange: (event) => this.handleFilterChange(event.detail) }));
|
96
|
+
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() }));
|
51
97
|
}
|
52
98
|
mountFiltersLines(filters) {
|
53
99
|
const MAX_LINE_LENGTH = 2;
|
@@ -85,30 +131,37 @@ export class SnkFilterModal {
|
|
85
131
|
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;
|
86
132
|
return;
|
87
133
|
}
|
134
|
+
if (item.groupedItems != undefined) {
|
135
|
+
countInformedItens = item.groupedItems.filter(item => item.visible).length;
|
136
|
+
return;
|
137
|
+
}
|
88
138
|
if (!!item.value) {
|
89
139
|
countInformedItens++;
|
90
140
|
}
|
91
141
|
});
|
92
142
|
return countInformedItens;
|
93
143
|
}
|
94
|
-
renderCollapsibleFilterBox(label, listItems) {
|
144
|
+
renderCollapsibleFilterBox(label, listItems, isSingleItem, shouldRenderFooter = true) {
|
95
145
|
if (!listItems.length)
|
96
146
|
return null;
|
97
147
|
const appliedFilters = this.getIformedFiltersCount(listItems);
|
98
148
|
const lines = this.mountFiltersLines(listItems);
|
99
|
-
return (h("ez-collapsible-box", { class: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters &&
|
100
|
-
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)), h("div", { class: "ez-flex ez-flex--justify-end grow" }, h("ez-button", { class: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => this.handleClearFilters(listItems) }))));
|
149
|
+
return (h("ez-collapsible-box", { class: "snk-filter__modal-collapsible-box", headerSize: "medium", value: true, label: label }, !!appliedFilters && (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 && (h("div", { class: "ez-flex ez-flex--justify-end grow" }, h("ez-button", { class: "ez-button--tertiary", size: "medium", label: "Limpar", onClick: () => isSingleItem ? this.handleClearSigleFilter(listItems[0]) : this.handleClearFilterList(listItems) })))));
|
101
150
|
}
|
102
151
|
componentWillRender() {
|
103
152
|
this._modalTitle = this.getCustomMessage('title');
|
104
153
|
this._okButtonLabel = this.getCustomMessage('okButtonLabel');
|
105
154
|
this._cancelButtonLabel = this.getCustomMessage('cancelButtonLabel');
|
106
155
|
}
|
156
|
+
componentDidLoad() {
|
157
|
+
if (!this._originalFilterConfig)
|
158
|
+
this._originalFilterConfig = this.filters;
|
159
|
+
}
|
107
160
|
render() {
|
108
161
|
const customFilters = this.filters.filter(filter => filter.filterType === FilterType.CUSTOM_FILTER);
|
109
162
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
110
163
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
111
|
-
return (h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, 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])))));
|
164
|
+
return (h("ez-modal-container", { class: "snk-filter__modal-container", modalTitle: this._modalTitle, cancelButtonLabel: this._cancelButtonLabel, okButtonLabel: this._okButtonLabel, onEzModalAction: this.modalActionListener.bind(this) }, 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)))));
|
112
165
|
}
|
113
166
|
static get is() { return "snk-filter-modal"; }
|
114
167
|
static get originalStyleUrls() {
|
@@ -138,6 +191,23 @@ export class SnkFilterModal {
|
|
138
191
|
"text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
|
139
192
|
}
|
140
193
|
},
|
194
|
+
"configName": {
|
195
|
+
"type": "string",
|
196
|
+
"mutable": true,
|
197
|
+
"complexType": {
|
198
|
+
"original": "string",
|
199
|
+
"resolved": "string",
|
200
|
+
"references": {}
|
201
|
+
},
|
202
|
+
"required": false,
|
203
|
+
"optional": false,
|
204
|
+
"docs": {
|
205
|
+
"tags": [],
|
206
|
+
"text": "Nome da config para buscar no resourceId"
|
207
|
+
},
|
208
|
+
"attribute": "config-name",
|
209
|
+
"reflect": false
|
210
|
+
},
|
141
211
|
"filters": {
|
142
212
|
"type": "unknown",
|
143
213
|
"mutable": true,
|
@@ -221,6 +291,36 @@ export class SnkFilterModal {
|
|
221
291
|
"tags": [],
|
222
292
|
"text": "A\u00E7\u00E3o disparada ao fechar o modal"
|
223
293
|
}
|
294
|
+
},
|
295
|
+
"addPersonalizedFilter": {
|
296
|
+
"type": "unknown",
|
297
|
+
"mutable": false,
|
298
|
+
"complexType": {
|
299
|
+
"original": "() => void",
|
300
|
+
"resolved": "() => void",
|
301
|
+
"references": {}
|
302
|
+
},
|
303
|
+
"required": false,
|
304
|
+
"optional": false,
|
305
|
+
"docs": {
|
306
|
+
"tags": [],
|
307
|
+
"text": "A\u00E7\u00E3o executada ao adicionar um filtro personalizado"
|
308
|
+
}
|
309
|
+
},
|
310
|
+
"editPersonalizedFilter": {
|
311
|
+
"type": "unknown",
|
312
|
+
"mutable": false,
|
313
|
+
"complexType": {
|
314
|
+
"original": "(id:string) => void",
|
315
|
+
"resolved": "(id: string) => void",
|
316
|
+
"references": {}
|
317
|
+
},
|
318
|
+
"required": false,
|
319
|
+
"optional": false,
|
320
|
+
"docs": {
|
321
|
+
"tags": [],
|
322
|
+
"text": "A\u00E7\u00E3o executada ao editart um filtro personalizado"
|
323
|
+
}
|
224
324
|
}
|
225
325
|
};
|
226
326
|
}
|
@@ -1,48 +1,66 @@
|
|
1
1
|
import { h, Host } from '@stencil/core';
|
2
|
-
import { ApplicationContext, ElementIDUtils } from '@sankhyalabs/core';
|
2
|
+
import { ApplicationContext, ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
3
3
|
import FilterItemType from "../../filter-item/filter-item-type.enum";
|
4
|
-
import FilterType from '../../types/filter-type.enum';
|
5
4
|
import { EPresentationMode } from '../../filter-item/editors/enum/presentationMode';
|
6
|
-
import
|
5
|
+
import { ConfigStorage } from '../../../../lib/configs/ConfigStorage';
|
6
|
+
import FilterType from '../../types/filter-type.enum';
|
7
7
|
export class SnkFilterModalItem {
|
8
8
|
constructor() {
|
9
9
|
this.filterItem = undefined;
|
10
|
+
this.configName = undefined;
|
10
11
|
}
|
11
12
|
observeFilterItem(newValue) {
|
12
13
|
var _a, _b;
|
14
|
+
this._editor && (this._editor["config"] = newValue);
|
13
15
|
(_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a['reloadList']) === null || _b === void 0 ? void 0 : _b.call(_a);
|
14
16
|
this.filterChange.emit(newValue);
|
15
|
-
|
17
|
+
//isso faz o filtro salvar o estado precocemente. Caso: Botão limpar filtro dispara dezenas de vezes
|
18
|
+
//this.saveConfig();
|
16
19
|
}
|
17
20
|
getContentEditorConfig() {
|
18
|
-
const
|
21
|
+
const props = { presentationMode: EPresentationMode.MODAL };
|
19
22
|
switch (this.filterItem.type) {
|
20
23
|
case FilterItemType.BINARY_SELECT:
|
21
|
-
return { tag: "snk-filter-binary-select",
|
24
|
+
return { tag: "snk-filter-binary-select", props };
|
22
25
|
case FilterItemType.MULTI_SELECT:
|
23
26
|
return { tag: "snk-filter-multi-select" };
|
24
27
|
case FilterItemType.PERIOD:
|
25
|
-
return { tag: "snk-filter-period",
|
28
|
+
return { tag: "snk-filter-period", props };
|
26
29
|
case FilterItemType.SEARCH:
|
27
30
|
return { tag: "snk-filter-search" };
|
28
31
|
case FilterItemType.NUMBER:
|
29
32
|
return { tag: "snk-filter-number" };
|
30
33
|
case FilterItemType.PERSONALIZED:
|
31
|
-
|
34
|
+
const snkFilterPersonalizedProps = {
|
35
|
+
tag: "snk-filter-personalized", props: {
|
36
|
+
onDeleteFilter: (event) => this.handleDeleteFilter(event.detail, FilterItemType.PERSONALIZED),
|
37
|
+
onEditFilter: (event) => this.editPersonalizedFilter.emit(event.detail),
|
38
|
+
onAddFilter: () => this.addPersonalizedFilter.emit(),
|
39
|
+
}
|
40
|
+
};
|
41
|
+
return snkFilterPersonalizedProps;
|
32
42
|
case FilterItemType.MULTI_LIST:
|
33
|
-
return { tag: "snk-entity-list",
|
43
|
+
return { tag: "snk-entity-list", props: { maxHeightList: "640px", rightListSlotBuilder: item => this.buildRightSlot(item) } };
|
34
44
|
}
|
35
45
|
return { tag: "snk-filter-text" };
|
36
46
|
}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
47
|
+
isVisible(newValue) {
|
48
|
+
return !this.filterItem.visible ? newValue !== undefined : true;
|
49
|
+
}
|
50
|
+
updateFilterValue(data) {
|
51
|
+
const newValue = (data === null || data === void 0 ? void 0 : data.value) !== undefined ? data.value : data;
|
52
|
+
if (this.filterItem.groupedItems != undefined) {
|
53
|
+
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { visible: newValue > 0, value: newValue, groupedItems: data.items });
|
42
54
|
}
|
55
|
+
else {
|
56
|
+
this.filterItem = Object.assign(Object.assign({}, this.filterItem), { value: newValue, visible: this.isVisible(newValue) });
|
57
|
+
}
|
58
|
+
this.saveConfig();
|
43
59
|
}
|
44
|
-
|
45
|
-
|
60
|
+
handleDeleteFilter(filter, filterItemType) {
|
61
|
+
if (filterItemType === FilterItemType.PERSONALIZED) {
|
62
|
+
ConfigStorage.removePersonalizedFilter(filter, this.configName);
|
63
|
+
}
|
46
64
|
}
|
47
65
|
componentDidLoad() {
|
48
66
|
if (this._element) {
|
@@ -53,25 +71,31 @@ export class SnkFilterModalItem {
|
|
53
71
|
}
|
54
72
|
}
|
55
73
|
buildRightSlot(item) {
|
56
|
-
return h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) });
|
74
|
+
return (h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) }));
|
57
75
|
}
|
58
76
|
removeValueFromConfig(item) {
|
59
|
-
var _a, _b, _c
|
60
|
-
const index = (_b = (_a = this.filterItem) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.findIndex(
|
61
|
-
|
62
|
-
(
|
63
|
-
this.
|
77
|
+
var _a, _b, _c;
|
78
|
+
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);
|
79
|
+
const filterItemCopy = ObjectUtils.copy(this.filterItem);
|
80
|
+
(_c = filterItemCopy === null || filterItemCopy === void 0 ? void 0 : filterItemCopy.value) === null || _c === void 0 ? void 0 : _c.splice(index, 1);
|
81
|
+
this.updateFilterValue(filterItemCopy.value);
|
82
|
+
}
|
83
|
+
canShowDetailModal() {
|
84
|
+
const { CUSTOM_FILTER, OTHER_FILTERS } = FilterType;
|
85
|
+
return ![CUSTOM_FILTER, OTHER_FILTERS].includes(this.filterItem.filterType) && this.filterItem.type !== FilterItemType.BINARY_SELECT;
|
64
86
|
}
|
65
87
|
saveConfig() {
|
66
|
-
|
67
|
-
(
|
88
|
+
//Precisa ser rediscutido... não podemos salvar configuração por conta própria. Não temos autonomia pra isso.
|
89
|
+
/*if(FilterItemType.MULTI_LIST !== this.filterItem.type) return;
|
90
|
+
|
91
|
+
this._application?.getResourceID().then(resourceId => {
|
68
92
|
const fetcher = new FilterBarConfigFetcher();
|
69
93
|
fetcher.saveEntityListConfig(this.filterItem, resourceId, this._application.configName);
|
70
|
-
})
|
94
|
+
});*/
|
71
95
|
}
|
72
96
|
render() {
|
73
|
-
const { tag: ContentEditor,
|
74
|
-
return (h(Host, null, h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), 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 },
|
97
|
+
const { tag: ContentEditor, props } = this.getContentEditorConfig();
|
98
|
+
return (h(Host, null, h("div", { class: "ez-flex ez-flex--column grow" }, this.canShowDetailModal() && (h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, h("div", { class: "ez-title ez-title--small ez-title--primary grow" }, this.filterItem.detailModal))), 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)))));
|
75
99
|
}
|
76
100
|
static get is() { return "snk-filter-modal-item"; }
|
77
101
|
static get originalStyleUrls() {
|
@@ -105,6 +129,23 @@ export class SnkFilterModalItem {
|
|
105
129
|
"tags": [],
|
106
130
|
"text": ""
|
107
131
|
}
|
132
|
+
},
|
133
|
+
"configName": {
|
134
|
+
"type": "string",
|
135
|
+
"mutable": true,
|
136
|
+
"complexType": {
|
137
|
+
"original": "string",
|
138
|
+
"resolved": "string",
|
139
|
+
"references": {}
|
140
|
+
},
|
141
|
+
"required": false,
|
142
|
+
"optional": false,
|
143
|
+
"docs": {
|
144
|
+
"tags": [],
|
145
|
+
"text": "Nome da config para buscar no resourceId"
|
146
|
+
},
|
147
|
+
"attribute": "config-name",
|
148
|
+
"reflect": false
|
108
149
|
}
|
109
150
|
};
|
110
151
|
}
|
@@ -129,6 +170,36 @@ export class SnkFilterModalItem {
|
|
129
170
|
}
|
130
171
|
}
|
131
172
|
}
|
173
|
+
}, {
|
174
|
+
"method": "editPersonalizedFilter",
|
175
|
+
"name": "editPersonalizedFilter",
|
176
|
+
"bubbles": true,
|
177
|
+
"cancelable": true,
|
178
|
+
"composed": true,
|
179
|
+
"docs": {
|
180
|
+
"tags": [],
|
181
|
+
"text": ""
|
182
|
+
},
|
183
|
+
"complexType": {
|
184
|
+
"original": "string",
|
185
|
+
"resolved": "string",
|
186
|
+
"references": {}
|
187
|
+
}
|
188
|
+
}, {
|
189
|
+
"method": "addPersonalizedFilter",
|
190
|
+
"name": "addPersonalizedFilter",
|
191
|
+
"bubbles": true,
|
192
|
+
"cancelable": true,
|
193
|
+
"composed": true,
|
194
|
+
"docs": {
|
195
|
+
"tags": [],
|
196
|
+
"text": ""
|
197
|
+
},
|
198
|
+
"complexType": {
|
199
|
+
"original": "void",
|
200
|
+
"resolved": "void",
|
201
|
+
"references": {}
|
202
|
+
}
|
132
203
|
}];
|
133
204
|
}
|
134
205
|
static get elementRef() { return "_element"; }
|
@@ -1,6 +1,11 @@
|
|
1
1
|
:host {
|
2
2
|
display: grid;
|
3
3
|
grid-template-columns: minmax(100px, 100%) 1fr 1fr;
|
4
|
+
|
5
|
+
/*@doc Define o z-index do componente.*/
|
6
|
+
--snk-personalized-filter--z-index: var(--more-visible, 2);
|
7
|
+
/*@doc Define a cor de fundo do componente.*/
|
8
|
+
--snk-personalized-filter--background-color: var(--background--xlight, #fff);
|
4
9
|
}
|
5
10
|
|
6
11
|
.snk-filter__popover-container{
|
@@ -9,6 +14,22 @@
|
|
9
14
|
cursor: auto;
|
10
15
|
}
|
11
16
|
|
17
|
+
.filter-bar__personalized-filter{
|
18
|
+
/*private*/
|
19
|
+
display: flex;
|
20
|
+
flex-direction: column;
|
21
|
+
position: fixed;
|
22
|
+
top: 0;
|
23
|
+
left: 0;
|
24
|
+
width: 100%;
|
25
|
+
height: 100%;
|
26
|
+
overflow: auto;
|
27
|
+
|
28
|
+
/*public*/
|
29
|
+
z-index: var(--snk-personalized-filter--z-index);
|
30
|
+
background-color: var(--snk-personalized-filter--background-color);
|
31
|
+
}
|
32
|
+
|
12
33
|
.snk-filter__popover{
|
13
34
|
/*private*/
|
14
35
|
display: flex;
|