@sankhyalabs/sankhyablocks 8.16.0-dev.113 → 8.16.0-dev.115
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/{ClientSideExporterProvider-a2753c93.js → ClientSideExporterProvider-0ce2bcd9.js} +2 -2
- package/dist/cjs/{ConfigStorage-df09fb78.js → ConfigStorage-48ba265b.js} +45 -17
- package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
- package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-45a8d7b7.js → SnkFormConfigManager-aa4631bd.js} +3 -4
- package/dist/cjs/{SnkMessageBuilder-9deeae08.js → SnkMessageBuilder-e3b7850b.js} +28 -3
- package/dist/cjs/config-header.cjs.entry.js +79 -0
- package/dist/cjs/configs-button.cjs.entry.js +61 -0
- package/dist/cjs/{constants-77c1b8bd.js → constants-6d82e405.js} +8 -38
- package/dist/cjs/default-filters-a09bf82b.js +8 -0
- package/dist/cjs/field-config_2.cjs.entry.js +324 -0
- package/dist/cjs/fields-layout.cjs.entry.js +341 -0
- package/dist/cjs/fields-selector.cjs.entry.js +74 -0
- package/dist/cjs/{filter-type.enum-b14ce507.js → filter-type.enum-2bb46d2a.js} +1 -0
- package/dist/cjs/guides-configurator.cjs.entry.js +164 -0
- package/dist/cjs/{index-102ba62d.js → index-0ad2baeb.js} +4 -5
- package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +32 -10
- package/dist/cjs/{index-c5771aba.js → index-62760a9c.js} +5 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +2 -2
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +3 -3
- 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 +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +2 -2
- package/dist/cjs/snk-crud.cjs.entry.js +4 -4
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
- package/dist/cjs/{snk-data-unit-57916de4.js → snk-data-unit-3684c96e.js} +2 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-default-filter.cjs.entry.js +77 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -8
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +10 -8
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +5 -4
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +82 -28
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- 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 +1 -1
- 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-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +1 -1
- package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-d33379cd.js → snk-guides-viewer-edc0a00a.js} +5 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +53 -18
- package/dist/cjs/snk-pesquisa.cjs.entry.js +2 -2
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-bar.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +7 -7
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -3
- package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
- package/dist/cjs/{taskbar-elements-6f4e06af.js → taskbar-elements-3b74cd21.js} +2 -2
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +8 -14
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +80 -12
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +24 -15
- package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -5
- package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
- package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
- package/dist/collection/components/snk-form-config/snk-form-config.css +16 -229
- package/dist/collection/components/snk-form-config/snk-form-config.js +288 -980
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
- package/dist/collection/lib/configs/ConfigStorage.js +16 -8
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
- package/dist/collection/lib/utils/constants.js +7 -1
- package/dist/components/ConfigStorage.js +45 -17
- package/dist/components/PersonalizedFilterUtils.js +6 -1
- package/dist/components/SnkFormConfigManager.js +2 -3
- package/dist/components/SnkMessageBuilder.js +28 -3
- package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
- package/dist/components/config-header.js +6 -0
- package/dist/components/config-header2.js +103 -0
- package/dist/components/configs-button.d.ts +11 -0
- package/dist/components/configs-button.js +6 -0
- package/dist/components/configs-button2.js +76 -0
- package/dist/components/constants.js +8 -34
- package/dist/components/field-config.d.ts +11 -0
- package/dist/components/field-config.js +6 -0
- package/dist/components/field-config2.js +525 -0
- package/dist/components/field-item.d.ts +11 -0
- package/dist/components/field-item.js +6 -0
- package/dist/components/field-item2.js +93 -0
- package/dist/components/fields-layout.d.ts +11 -0
- package/dist/components/fields-layout.js +6 -0
- package/dist/components/fields-layout2.js +370 -0
- package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
- package/dist/components/fields-selector.js +6 -0
- package/dist/components/fields-selector2.js +98 -0
- package/dist/components/guides-configurator.d.ts +11 -0
- package/dist/components/guides-configurator.js +6 -0
- package/dist/components/guides-configurator2.js +182 -0
- package/dist/components/index.d.ts +8 -3
- package/dist/components/index.js +8 -3
- package/dist/components/index2.js +3 -4
- package/dist/components/snk-application2.js +1 -1
- package/dist/components/snk-crud.js +86 -62
- package/dist/components/{snk-config-options.d.ts → snk-default-filter.d.ts} +4 -4
- package/dist/components/snk-default-filter.js +6 -0
- package/dist/components/snk-default-filter2.js +97 -0
- package/dist/components/snk-detail-view2.js +113 -89
- package/dist/components/snk-expression-group2.js +4 -2
- package/dist/components/snk-expression-item2.js +5 -3
- package/dist/components/snk-filter-assistent-mode2.js +4 -2
- package/dist/components/snk-filter-bar2.js +28 -19
- package/dist/components/snk-filter-modal-item2.js +1 -0
- package/dist/components/snk-filter-modal.js +59 -8
- package/dist/components/snk-form-config2.js +253 -953
- package/dist/components/snk-form.js +33 -9
- package/dist/components/snk-personalized-filter2.js +50 -14
- package/dist/components/sortable.esm.js +2666 -0
- package/dist/esm/{ClientSideExporterProvider-b3871edb.js → ClientSideExporterProvider-3ed744fd.js} +2 -2
- package/dist/esm/{ConfigStorage-71e6766f.js → ConfigStorage-79b9e180.js} +45 -17
- package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
- package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-be490a33.js → SnkFormConfigManager-b4b93298.js} +3 -4
- package/dist/esm/{SnkMessageBuilder-2dbd8fa2.js → SnkMessageBuilder-9c269caf.js} +28 -3
- package/dist/esm/config-header.entry.js +75 -0
- package/dist/esm/configs-button.entry.js +57 -0
- package/dist/esm/{constants-7db1128a.js → constants-7b422de0.js} +8 -34
- package/dist/esm/default-filters-50105e43.js +8 -0
- package/dist/esm/field-config_2.entry.js +319 -0
- package/dist/esm/fields-layout.entry.js +337 -0
- package/dist/esm/fields-selector.entry.js +70 -0
- package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
- package/dist/esm/guides-configurator.entry.js +160 -0
- package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +32 -10
- package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
- package/dist/esm/{index-bdf75557.js → index-b72af127.js} +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pesquisa-grid_2.entry.js +2 -2
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/snk-actions-button_8.entry.js +3 -3
- 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 +1 -1
- package/dist/esm/snk-configurator.entry.js +2 -2
- package/dist/esm/snk-crud.entry.js +4 -4
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +4 -4
- package/dist/esm/{snk-data-unit-65c9dd1a.js → snk-data-unit-027bca56.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-default-filter.entry.js +73 -0
- package/dist/esm/snk-detail-view.entry.js +8 -8
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +10 -8
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +5 -4
- package/dist/esm/snk-filter-bar_4.entry.js +82 -28
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-detail.entry.js +3 -3
- package/dist/esm/snk-filter-field-search_2.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- 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 +1 -1
- 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-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +1 -1
- package/dist/esm/snk-form_2.entry.js +428 -0
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-72953334.js → snk-guides-viewer-32f3d3ab.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-personalized-filter.entry.js +53 -18
- package/dist/esm/snk-pesquisa.entry.js +2 -2
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-simple-bar.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +7 -7
- package/dist/esm/snk-taskbar.entry.js +3 -3
- package/dist/esm/sortable.esm-842f85a3.js +2666 -0
- package/dist/esm/{taskbar-elements-f2cb4922.js → taskbar-elements-171476d4.js} +2 -2
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-24a0dbd2.entry.js → p-0024d3fd.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b8d649dd.entry.js → p-09e60995.entry.js} +1 -1
- package/dist/sankhyablocks/{p-bc101064.entry.js → p-0cb295c1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b0ab5066.entry.js → p-1456d7cb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a03b190.entry.js → p-1ea34488.entry.js} +1 -1
- package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
- package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
- package/dist/sankhyablocks/p-290fea5f.entry.js +1 -0
- package/dist/sankhyablocks/{p-08ea6c86.entry.js → p-295aa209.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c9675d64.js → p-2bde486e.js} +1 -1
- package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
- package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
- package/dist/sankhyablocks/p-35e73c5d.js +1 -0
- package/dist/sankhyablocks/{p-89c92727.entry.js → p-398cdd67.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ddf93f36.entry.js → p-3a48bff3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-434817f0.entry.js → p-3d41f5a8.entry.js} +1 -1
- package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
- package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
- package/dist/sankhyablocks/p-51833248.js +7 -0
- package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
- package/dist/sankhyablocks/p-6416975c.js +56 -0
- package/dist/sankhyablocks/{p-7beeabc1.entry.js → p-65c5d430.entry.js} +1 -1
- package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
- package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
- package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
- package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-885802c3.js → p-763b04fa.js} +1 -1
- package/dist/sankhyablocks/{p-d07b18a4.js → p-7de79adf.js} +1 -1
- package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
- package/dist/sankhyablocks/{p-47178038.entry.js → p-83c100f2.entry.js} +1 -1
- package/dist/sankhyablocks/p-84345e7a.js +1 -0
- package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
- package/dist/sankhyablocks/p-9019a32f.js +1 -0
- package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-90805683.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c2e468c9.entry.js → p-91a9abb6.entry.js} +1 -1
- package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
- package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
- package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-90684a75.entry.js → p-9ad3557c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-b6200d32.entry.js → p-9fd87bfd.entry.js} +1 -1
- package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
- package/dist/sankhyablocks/{p-33718dfc.entry.js → p-a227b650.entry.js} +1 -1
- package/dist/sankhyablocks/p-a349689a.js +1 -0
- package/dist/sankhyablocks/p-a5bb2f93.entry.js +1 -0
- package/dist/sankhyablocks/{p-ebdb9d89.js → p-a6513fcb.js} +1 -1
- package/dist/sankhyablocks/{p-8c235d4c.entry.js → p-a76e6d51.entry.js} +1 -1
- package/dist/sankhyablocks/p-b568c1d4.js +1 -0
- package/dist/sankhyablocks/{p-ce94e6c4.entry.js → p-bd665460.entry.js} +1 -1
- package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
- package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
- package/dist/sankhyablocks/{p-165cde3b.entry.js → p-c926cf6b.entry.js} +1 -1
- package/dist/sankhyablocks/{p-79f823f3.entry.js → p-d67526b6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
- package/dist/sankhyablocks/{p-5f157b09.entry.js → p-dff65083.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3372178e.entry.js → p-e2988bb1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a4ebeec4.entry.js → p-e3521eae.entry.js} +1 -1
- package/dist/sankhyablocks/p-e7cccc45.entry.js +1 -0
- package/dist/sankhyablocks/{p-1f80174b.entry.js → p-f4e31122.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0fadb620.js → p-fc0b609e.js} +1 -1
- package/dist/sankhyablocks/{p-a14a09c3.entry.js → p-ff7060bc.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +4 -3
- package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +3 -3
- package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
- package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
- package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
- package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +51 -120
- package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
- package/dist/types/components.d.ts +276 -203
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
- package/dist/types/lib/utils/constants.d.ts +6 -0
- package/package.json +4 -2
- package/react/components.d.ts +8 -3
- package/react/components.js +8 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
- package/dist/cjs/snk-config-options_3.cjs.entry.js +0 -1390
- package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
- package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -346
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
- package/dist/components/snk-config-options.js +0 -6
- package/dist/components/snk-config-options2.js +0 -257
- package/dist/components/snk-field-config.js +0 -6
- package/dist/components/snk-field-config2.js +0 -76
- package/dist/components/snk-tab-config.js +0 -6
- package/dist/components/snk-tab-config2.js +0 -3202
- package/dist/esm/Sortable-83960219.js +0 -2851
- package/dist/esm/snk-config-options_3.entry.js +0 -1384
- package/dist/esm/snk-field-config.entry.js +0 -56
- package/dist/esm/snk-tab-config.entry.js +0 -328
- package/dist/sankhyablocks/p-03b68a74.js +0 -56
- package/dist/sankhyablocks/p-3749dffb.entry.js +0 -1
- package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
- package/dist/sankhyablocks/p-4689c2e6.js +0 -1
- package/dist/sankhyablocks/p-490b75b5.entry.js +0 -1
- package/dist/sankhyablocks/p-52d10014.entry.js +0 -1
- package/dist/sankhyablocks/p-5ffa0493.entry.js +0 -1
- package/dist/sankhyablocks/p-60137b7a.entry.js +0 -1
- package/dist/sankhyablocks/p-6dc031de.js +0 -1
- package/dist/sankhyablocks/p-9261d8a0.js +0 -1
- package/dist/sankhyablocks/p-933c0c0b.js +0 -1
- package/dist/sankhyablocks/p-9d3a025a.entry.js +0 -1
- package/dist/sankhyablocks/p-c0eb761b.entry.js +0 -1
- package/dist/sankhyablocks/p-d9804798.js +0 -1
- package/dist/sankhyablocks/p-fa816fb2.js +0 -1
- package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
- package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
- package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
@@ -1,8 +1,8 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
const index = require('./index-
|
3
|
+
const index = require('./index-1cf293c1.js');
|
4
4
|
const index$2 = require('./index-e3e39724.js');
|
5
|
-
const index$1 = require('./index-
|
5
|
+
const index$1 = require('./index-0ad2baeb.js');
|
6
6
|
|
7
7
|
exports.TaskbarElement = void 0;
|
8
8
|
(function (TaskbarElement) {
|
@@ -32,12 +32,17 @@
|
|
32
32
|
"./components/snk-filter-bar/filter-item/editors/snk-filter-text.js",
|
33
33
|
"./components/snk-filter-bar/filter-modal/snk-filter-modal.js",
|
34
34
|
"./components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js",
|
35
|
+
"./components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js",
|
35
36
|
"./components/snk-filter-field-search/snk-filter-field-search.js",
|
36
37
|
"./components/snk-form/snk-form.js",
|
37
|
-
"./components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js",
|
38
38
|
"./components/snk-form-config/snk-form-config.js",
|
39
|
-
"./components/snk-form-config/
|
40
|
-
"./components/snk-form-config/
|
39
|
+
"./components/snk-form-config/config-header/config-header.js",
|
40
|
+
"./components/snk-form-config/config-header/configs-button/configs-button.js",
|
41
|
+
"./components/snk-form-config/field-item/field-item.js",
|
42
|
+
"./components/snk-form-config/field-item/field-config/field-config.js",
|
43
|
+
"./components/snk-form-config/fields-layout/fields-layout.js",
|
44
|
+
"./components/snk-form-config/fields-selector/fields-selector.js",
|
45
|
+
"./components/snk-form-config/guides-configurator/guides-configurator.js",
|
41
46
|
"./components/snk-grid/snk-grid.js",
|
42
47
|
"./components/snk-grid-config/snk-grid-config.js",
|
43
48
|
"./components/snk-grid-config/snk-select-box/snk-select-box.js",
|
@@ -71,11 +76,6 @@
|
|
71
76
|
"snk-application"
|
72
77
|
]
|
73
78
|
},
|
74
|
-
{
|
75
|
-
"components": [
|
76
|
-
"snk-tab-config"
|
77
|
-
]
|
78
|
-
},
|
79
79
|
{
|
80
80
|
"components": [
|
81
81
|
"snk-configurator"
|
@@ -121,11 +121,6 @@
|
|
121
121
|
"snk-data-unit"
|
122
122
|
]
|
123
123
|
},
|
124
|
-
{
|
125
|
-
"components": [
|
126
|
-
"snk-field-config"
|
127
|
-
]
|
128
|
-
},
|
129
124
|
{
|
130
125
|
"components": [
|
131
126
|
"snk-grid"
|
@@ -143,7 +138,6 @@
|
|
143
138
|
},
|
144
139
|
{
|
145
140
|
"components": [
|
146
|
-
"snk-config-options",
|
147
141
|
"snk-form",
|
148
142
|
"snk-form-config"
|
149
143
|
]
|
@@ -544,7 +544,7 @@ export class SnkGuidesViewer {
|
|
544
544
|
render() {
|
545
545
|
var _a, _b;
|
546
546
|
if (this._formEditorConfigManager != undefined) {
|
547
|
-
return (h("snk-form-config", { tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null
|
547
|
+
return (h("snk-form-config", { ref: ref => this._container = ref, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = null }));
|
548
548
|
}
|
549
549
|
if (!this.dataUnit || !this._configManager.isLoaded) {
|
550
550
|
return;
|
@@ -3,9 +3,11 @@ import { ModalAction } from "@sankhyalabs/ezui/dist/collection/components/ez-mod
|
|
3
3
|
import { ApplicationUtils } from "@sankhyalabs/ezui/dist/collection/utils";
|
4
4
|
import FilterType from '../types/filter-type.enum';
|
5
5
|
import FilterItemType from '../filter-item/filter-item-type.enum';
|
6
|
-
import { ObjectUtils } from '@sankhyalabs/core';
|
6
|
+
import { ApplicationContext, ObjectUtils } from '@sankhyalabs/core';
|
7
7
|
import { PersonalizedFilterUtils } from '../../snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils';
|
8
8
|
import { FilterNumberVariation } from '../filter-item/editors/enum/filterNumberVariation';
|
9
|
+
import { ActionDefaultFilter } from '../types/default-filters';
|
10
|
+
import { DefaultFilter } from '../../snk-personalized-filter/interfaces';
|
9
11
|
export class SnkFilterModal {
|
10
12
|
constructor() {
|
11
13
|
this.getMessage = undefined;
|
@@ -17,6 +19,7 @@ export class SnkFilterModal {
|
|
17
19
|
this.editPersonalizedFilter = undefined;
|
18
20
|
this.deletePersonalizedFilter = undefined;
|
19
21
|
this.filtersToDelete = [];
|
22
|
+
this.filterDefaultToDelete = undefined;
|
20
23
|
this.disablePersonalizedFilter = undefined;
|
21
24
|
}
|
22
25
|
/**
|
@@ -75,8 +78,12 @@ export class SnkFilterModal {
|
|
75
78
|
return copy;
|
76
79
|
});
|
77
80
|
}
|
81
|
+
hasChangeToSave() {
|
82
|
+
const hasChangesPersonalizedFilters = ObjectUtils.objectToString(this.filters) !== ObjectUtils.objectToString(this._originalFilterConfig);
|
83
|
+
return hasChangesPersonalizedFilters;
|
84
|
+
}
|
78
85
|
handleClose() {
|
79
|
-
const hasChangesToSave =
|
86
|
+
const hasChangesToSave = this.hasChangeToSave();
|
80
87
|
if (!hasChangesToSave) {
|
81
88
|
this.closeModal();
|
82
89
|
return;
|
@@ -87,7 +94,7 @@ export class SnkFilterModal {
|
|
87
94
|
});
|
88
95
|
}
|
89
96
|
handleApplyFilters() {
|
90
|
-
const filterPersonalized = this.filters.find(filter => filter.filterType === FilterType.CUSTOM_FILTER);
|
97
|
+
const filterPersonalized = this.filters.find(filter => filter.filterType === FilterType.CUSTOM_FILTER || filter.filterType === FilterType.DEFAULT_FILTER);
|
91
98
|
if (this.isValidCustomFilter(filterPersonalized)) {
|
92
99
|
this.applyFilters(this.filters);
|
93
100
|
}
|
@@ -97,6 +104,11 @@ export class SnkFilterModal {
|
|
97
104
|
});
|
98
105
|
this.filtersToDelete = [];
|
99
106
|
}
|
107
|
+
if (this.filterDefaultToDelete) {
|
108
|
+
this.deletePersonalizedFilter(this.filterDefaultToDelete, this.configName, true);
|
109
|
+
this._defaultFilter = undefined;
|
110
|
+
this.filterDefaultToDelete = undefined;
|
111
|
+
}
|
100
112
|
}
|
101
113
|
isValidCustomFilter(filterPersonalized) {
|
102
114
|
const isValid = PersonalizedFilterUtils.validateVariableValues(filterPersonalized);
|
@@ -223,6 +235,41 @@ export class SnkFilterModal {
|
|
223
235
|
const lines = this.mountFiltersLines(listItems);
|
224
236
|
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() })), h("div", { class: "ez-row snk-filter-modal__rendered-items" }, 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) })))));
|
225
237
|
}
|
238
|
+
handleDeleteFilter() {
|
239
|
+
this._application.confirm(this.getMessage('snkPersonalizedFilter.deleteConfirm.title'), this.getMessage('snkPersonalizedFilter.info.deleteDefaultFilterConfirm'), "alert-circle-inverted", "critical").then((actionConfirmed) => {
|
240
|
+
if (!actionConfirmed) {
|
241
|
+
return;
|
242
|
+
}
|
243
|
+
this.filterDefaultToDelete = this._defaultFilter;
|
244
|
+
this.filters = this.filters.filter(filter => filter.id !== FilterType.DEFAULT_FILTER);
|
245
|
+
});
|
246
|
+
}
|
247
|
+
handleActionSelectedDefaultFilter({ detail: action }) {
|
248
|
+
switch (action) {
|
249
|
+
case ActionDefaultFilter.CREATE:
|
250
|
+
this.addPersonalizedFilter(true);
|
251
|
+
break;
|
252
|
+
case ActionDefaultFilter.EDIT:
|
253
|
+
this.editPersonalizedFilter(this._defaultFilter.id, true);
|
254
|
+
break;
|
255
|
+
case ActionDefaultFilter.REMOVE:
|
256
|
+
this.handleDeleteFilter();
|
257
|
+
break;
|
258
|
+
default:
|
259
|
+
break;
|
260
|
+
}
|
261
|
+
}
|
262
|
+
getCustomFilter(filters) {
|
263
|
+
const customFilters = filters.filter((filter) => filter.filterType === FilterType.CUSTOM_FILTER);
|
264
|
+
return customFilters;
|
265
|
+
}
|
266
|
+
getDefaultFilter(filters) {
|
267
|
+
const defaultFilter = filters.find((item) => item.id === DefaultFilter.id);
|
268
|
+
return defaultFilter;
|
269
|
+
}
|
270
|
+
componentWillLoad() {
|
271
|
+
this._application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
272
|
+
}
|
226
273
|
componentWillRender() {
|
227
274
|
this._modalTitle = this.getCustomMessage('title');
|
228
275
|
this._okButtonLabel = this.getCustomMessage('okButtonLabel');
|
@@ -233,10 +280,11 @@ export class SnkFilterModal {
|
|
233
280
|
this._originalFilterConfig = this.filters;
|
234
281
|
}
|
235
282
|
render() {
|
236
|
-
|
283
|
+
this._defaultFilter = this.getDefaultFilter(this.filters);
|
284
|
+
const customFilters = this.getCustomFilter(this.filters);
|
237
285
|
const quickFilters = this.filters.filter(filter => filter.filterType === FilterType.QUICK_FILTER);
|
238
286
|
const otherFilters = this.filters.filter(filter => filter.filterType === FilterType.OTHER_FILTERS);
|
239
|
-
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.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
287
|
+
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" }, h("snk-default-filter", { getMessage: this.getCustomMessage.bind(this), hasDefaultFilter: !!this._defaultFilter, onActionSelected: this.handleActionSelectedDefaultFilter.bind(this) }), !this.disablePersonalizedFilter && this.renderCollapsibleFilterBox(this.getCustomMessage('customFilters'), customFilters, false, false), this.renderCollapsibleFilterBox(this.getCustomMessage('quickFilters'), quickFilters, false), otherFilters.map(filter => this.renderCollapsibleFilterBox(filter.label, [filter], true)))));
|
240
288
|
}
|
241
289
|
static get is() { return "snk-filter-modal"; }
|
242
290
|
static get originalStyleUrls() {
|
@@ -348,8 +396,8 @@ export class SnkFilterModal {
|
|
348
396
|
"type": "unknown",
|
349
397
|
"mutable": false,
|
350
398
|
"complexType": {
|
351
|
-
"original": "() => void",
|
352
|
-
"resolved": "() => void",
|
399
|
+
"original": "(isDefault?: boolean) => void",
|
400
|
+
"resolved": "(isDefault?: boolean) => void",
|
353
401
|
"references": {}
|
354
402
|
},
|
355
403
|
"required": false,
|
@@ -363,8 +411,8 @@ export class SnkFilterModal {
|
|
363
411
|
"type": "unknown",
|
364
412
|
"mutable": false,
|
365
413
|
"complexType": {
|
366
|
-
"original": "(id:string) => void",
|
367
|
-
"resolved": "(id: string) => void",
|
414
|
+
"original": "(id:string, isDefault?: boolean) => void",
|
415
|
+
"resolved": "(id: string, isDefault?: boolean) => void",
|
368
416
|
"references": {}
|
369
417
|
},
|
370
418
|
"required": false,
|
@@ -378,8 +426,8 @@ export class SnkFilterModal {
|
|
378
426
|
"type": "unknown",
|
379
427
|
"mutable": false,
|
380
428
|
"complexType": {
|
381
|
-
"original": "(filter: IPersonalizedFilter, configName: string) => void",
|
382
|
-
"resolved": "(filter: IPersonalizedFilter, configName: string) => void",
|
429
|
+
"original": "(filter: IPersonalizedFilter, configName: string, isDefault?: boolean) => void",
|
430
|
+
"resolved": "(filter: IPersonalizedFilter, configName: string, isDefault?: boolean) => void",
|
383
431
|
"references": {
|
384
432
|
"IPersonalizedFilter": {
|
385
433
|
"location": "import",
|
@@ -396,7 +444,7 @@ export class SnkFilterModal {
|
|
396
444
|
},
|
397
445
|
"filtersToDelete": {
|
398
446
|
"type": "unknown",
|
399
|
-
"mutable":
|
447
|
+
"mutable": true,
|
400
448
|
"complexType": {
|
401
449
|
"original": "IPersonalizedFilter[]",
|
402
450
|
"resolved": "IPersonalizedFilter[]",
|
@@ -415,6 +463,26 @@ export class SnkFilterModal {
|
|
415
463
|
},
|
416
464
|
"defaultValue": "[]"
|
417
465
|
},
|
466
|
+
"filterDefaultToDelete": {
|
467
|
+
"type": "unknown",
|
468
|
+
"mutable": true,
|
469
|
+
"complexType": {
|
470
|
+
"original": "SnkFilterItemConfig",
|
471
|
+
"resolved": "SnkFilterItemConfig",
|
472
|
+
"references": {
|
473
|
+
"SnkFilterItemConfig": {
|
474
|
+
"location": "import",
|
475
|
+
"path": "../filter-item/snk-filter-item"
|
476
|
+
}
|
477
|
+
}
|
478
|
+
},
|
479
|
+
"required": false,
|
480
|
+
"optional": false,
|
481
|
+
"docs": {
|
482
|
+
"tags": [],
|
483
|
+
"text": "Guarda o filtro a ser deletado no Apply do modal"
|
484
|
+
}
|
485
|
+
},
|
418
486
|
"disablePersonalizedFilter": {
|
419
487
|
"type": "boolean",
|
420
488
|
"mutable": false,
|
@@ -0,0 +1,34 @@
|
|
1
|
+
:host {
|
2
|
+
display: flex;
|
3
|
+
justify-content: flex-end;
|
4
|
+
}
|
5
|
+
|
6
|
+
.default_container {
|
7
|
+
border: none;
|
8
|
+
background: none;
|
9
|
+
display: flex;
|
10
|
+
align-items: center;
|
11
|
+
gap: var(--space--3xs, 4px);
|
12
|
+
font-family: var(--font-pattern);
|
13
|
+
color: var(--title--primary, #2b3a54);
|
14
|
+
font-size: var(--text--medium, 14px);
|
15
|
+
padding: 0;
|
16
|
+
outline: none;
|
17
|
+
}
|
18
|
+
|
19
|
+
.default_container ez-icon {
|
20
|
+
cursor: pointer;
|
21
|
+
}
|
22
|
+
|
23
|
+
.default_container ez-icon:hover {
|
24
|
+
color: var(--color--primary-600);
|
25
|
+
}
|
26
|
+
|
27
|
+
.new_filter {
|
28
|
+
cursor: pointer;
|
29
|
+
margin: 0 var(--space--3xs, 4px);
|
30
|
+
}
|
31
|
+
|
32
|
+
.new_filter:hover {
|
33
|
+
color: var(--color--primary-600);
|
34
|
+
}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
import { h, Host } from '@stencil/core';
|
2
|
+
import { ActionDefaultFilter } from '../../../types/default-filters';
|
3
|
+
export class SnkDefaultFilter {
|
4
|
+
constructor() {
|
5
|
+
this.OFFSET_HEIGHT = 5;
|
6
|
+
this.getMessage = undefined;
|
7
|
+
this.hasDefaultFilter = false;
|
8
|
+
this._opened = false;
|
9
|
+
}
|
10
|
+
repositionDropDown() {
|
11
|
+
if (!this._refIcon || !this._refDropdown) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
const boundingIcon = this._refIcon.getBoundingClientRect();
|
15
|
+
const boundingDropDown = this._refDropdown.getBoundingClientRect();
|
16
|
+
this._refDropdown.style.top = (boundingIcon.y + boundingIcon.height + this.OFFSET_HEIGHT) + "px";
|
17
|
+
this._refDropdown.style.left = ((boundingIcon.x + (boundingIcon.width / 2)) - boundingDropDown.width) + "px";
|
18
|
+
}
|
19
|
+
toggleDropdown() {
|
20
|
+
this._opened = !this._opened;
|
21
|
+
}
|
22
|
+
closeDropdown(evt) {
|
23
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
24
|
+
if (!target) {
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
if (!target.closest("#dropdown-parent-demo")) {
|
28
|
+
this._opened = false;
|
29
|
+
}
|
30
|
+
}
|
31
|
+
buildItems() {
|
32
|
+
return ([
|
33
|
+
{
|
34
|
+
id: ActionDefaultFilter.EDIT,
|
35
|
+
label: this.getMessage('defaultFilter.edit'),
|
36
|
+
},
|
37
|
+
{
|
38
|
+
id: ActionDefaultFilter.REMOVE,
|
39
|
+
label: this.getMessage('defaultFilter.remove'),
|
40
|
+
},
|
41
|
+
]);
|
42
|
+
}
|
43
|
+
onValueSelected({ detail: item }) {
|
44
|
+
this._opened = false;
|
45
|
+
this.actionSelected.emit(item.id);
|
46
|
+
}
|
47
|
+
openCreateNewFilter() {
|
48
|
+
this.actionSelected.emit(ActionDefaultFilter.CREATE);
|
49
|
+
}
|
50
|
+
componentDidRender() {
|
51
|
+
this.repositionDropDown();
|
52
|
+
}
|
53
|
+
componentWillLoad() {
|
54
|
+
this._items = this.buildItems();
|
55
|
+
document.removeEventListener("scroll", this.repositionDropDown.bind(this));
|
56
|
+
document.addEventListener("scroll", this.repositionDropDown.bind(this));
|
57
|
+
}
|
58
|
+
render() {
|
59
|
+
if (!this.hasDefaultFilter) {
|
60
|
+
return (h(Host, null, h("button", { class: "default_container new_filter", onClick: this.openCreateNewFilter.bind(this) }, h("span", null, this.getMessage('defaultFilter.create')))));
|
61
|
+
}
|
62
|
+
return (h(Host, null, h("button", { class: "default_container", onClick: this.toggleDropdown.bind(this) }, h("span", null, this.getMessage('defaultFilter.title')), h("ez-icon", { ref: (ref) => this._refIcon = ref, iconName: 'dots-vertical' })), this._opened &&
|
63
|
+
h("ez-dropdown", { ref: (ref) => this._refDropdown = ref, items: this._items, onEzClick: this.onValueSelected.bind(this), onEzOutsideClick: this.closeDropdown.bind(this) })));
|
64
|
+
}
|
65
|
+
static get is() { return "snk-default-filter"; }
|
66
|
+
static get encapsulation() { return "scoped"; }
|
67
|
+
static get originalStyleUrls() {
|
68
|
+
return {
|
69
|
+
"$": ["snk-default-filter.css"]
|
70
|
+
};
|
71
|
+
}
|
72
|
+
static get styleUrls() {
|
73
|
+
return {
|
74
|
+
"$": ["snk-default-filter.css"]
|
75
|
+
};
|
76
|
+
}
|
77
|
+
static get properties() {
|
78
|
+
return {
|
79
|
+
"getMessage": {
|
80
|
+
"type": "unknown",
|
81
|
+
"mutable": false,
|
82
|
+
"complexType": {
|
83
|
+
"original": "(key: string, props?: any) => string",
|
84
|
+
"resolved": "(key: string, props?: any) => string",
|
85
|
+
"references": {}
|
86
|
+
},
|
87
|
+
"required": false,
|
88
|
+
"optional": false,
|
89
|
+
"docs": {
|
90
|
+
"tags": [],
|
91
|
+
"text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
|
92
|
+
}
|
93
|
+
},
|
94
|
+
"hasDefaultFilter": {
|
95
|
+
"type": "boolean",
|
96
|
+
"mutable": false,
|
97
|
+
"complexType": {
|
98
|
+
"original": "boolean",
|
99
|
+
"resolved": "boolean",
|
100
|
+
"references": {}
|
101
|
+
},
|
102
|
+
"required": false,
|
103
|
+
"optional": false,
|
104
|
+
"docs": {
|
105
|
+
"tags": [],
|
106
|
+
"text": "Informa se j\u00E1 existe um filtro padr\u00E3o criado."
|
107
|
+
},
|
108
|
+
"attribute": "has-default-filter",
|
109
|
+
"reflect": false,
|
110
|
+
"defaultValue": "false"
|
111
|
+
}
|
112
|
+
};
|
113
|
+
}
|
114
|
+
static get states() {
|
115
|
+
return {
|
116
|
+
"_opened": {}
|
117
|
+
};
|
118
|
+
}
|
119
|
+
static get events() {
|
120
|
+
return [{
|
121
|
+
"method": "actionSelected",
|
122
|
+
"name": "actionSelected",
|
123
|
+
"bubbles": true,
|
124
|
+
"cancelable": true,
|
125
|
+
"composed": true,
|
126
|
+
"docs": {
|
127
|
+
"tags": [],
|
128
|
+
"text": ""
|
129
|
+
},
|
130
|
+
"complexType": {
|
131
|
+
"original": "ActionDefaultFilter",
|
132
|
+
"resolved": "ActionDefaultFilter.CREATE | ActionDefaultFilter.EDIT | ActionDefaultFilter.REMOVE",
|
133
|
+
"references": {
|
134
|
+
"ActionDefaultFilter": {
|
135
|
+
"location": "import",
|
136
|
+
"path": "../../../types/default-filters"
|
137
|
+
}
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}];
|
141
|
+
}
|
142
|
+
}
|
@@ -13,6 +13,7 @@ export class SnkFilterBar {
|
|
13
13
|
this._configUpdated = false;
|
14
14
|
this._firstLoad = true;
|
15
15
|
this._pendingVariables = false;
|
16
|
+
this._isDefaultFilter = false;
|
16
17
|
this._customfiltersToBeUpdated = [];
|
17
18
|
this._resolveLoading = undefined;
|
18
19
|
this._calculateSortIndex = (item) => {
|
@@ -246,10 +247,10 @@ export class SnkFilterBar {
|
|
246
247
|
}
|
247
248
|
return this.filterActiveFilter(item) && (item.groupedItems || item.value != undefined);
|
248
249
|
}
|
249
|
-
registryFilterProvider() {
|
250
|
+
async registryFilterProvider() {
|
250
251
|
this.dataUnit.addFilterProvider(this);
|
251
252
|
if (this.filterConfig) {
|
252
|
-
this.doLoadData();
|
253
|
+
await this.doLoadData();
|
253
254
|
}
|
254
255
|
}
|
255
256
|
itemFocused(selectedItem) {
|
@@ -338,7 +339,7 @@ export class SnkFilterBar {
|
|
338
339
|
this._application.isUserSup().then(value => this.allowDefault = value);
|
339
340
|
}
|
340
341
|
addFilterBarLegacyConfigName() {
|
341
|
-
if (this.filterBarLegacyConfigName
|
342
|
+
if (this.filterBarLegacyConfigName) {
|
342
343
|
ConfigStorage.addFilterBarLegacyConfig(this.configName, this.filterBarLegacyConfigName);
|
343
344
|
}
|
344
345
|
}
|
@@ -361,7 +362,7 @@ export class SnkFilterBar {
|
|
361
362
|
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), e);
|
362
363
|
}
|
363
364
|
}
|
364
|
-
attachDataUnit() {
|
365
|
+
async attachDataUnit() {
|
365
366
|
if (this.dataUnit == undefined) {
|
366
367
|
let parent = this._element.parentElement;
|
367
368
|
while (parent) {
|
@@ -369,12 +370,12 @@ export class SnkFilterBar {
|
|
369
370
|
const snkDataUnit = parent;
|
370
371
|
this.dataUnit = snkDataUnit.dataUnit;
|
371
372
|
if (this.dataUnit) {
|
372
|
-
this.registryFilterProvider();
|
373
|
+
await this.registryFilterProvider();
|
373
374
|
}
|
374
375
|
else {
|
375
|
-
snkDataUnit.addEventListener("dataUnitReady", (evt) => {
|
376
|
+
snkDataUnit.addEventListener("dataUnitReady", async (evt) => {
|
376
377
|
this.dataUnit = evt.detail;
|
377
|
-
this.registryFilterProvider();
|
378
|
+
await this.registryFilterProvider();
|
378
379
|
});
|
379
380
|
}
|
380
381
|
break;
|
@@ -383,7 +384,7 @@ export class SnkFilterBar {
|
|
383
384
|
parent = parent.parentElement;
|
384
385
|
}
|
385
386
|
else {
|
386
|
-
this.registryFilterProvider();
|
387
|
+
await this.registryFilterProvider();
|
387
388
|
}
|
388
389
|
}
|
389
390
|
/**
|
@@ -411,27 +412,34 @@ export class SnkFilterBar {
|
|
411
412
|
onComplete: callbackOnApplyFilter,
|
412
413
|
disablePersonalizedFilter: this.disablePersonalizedFilter,
|
413
414
|
getMessage: (key, props) => this.getMessage(key, props),
|
414
|
-
onAddPersonalizedFilter: () => this.addPersonalizedFilter(),
|
415
|
-
onEditPersonalizedFilter: (id) => this.editPersonalizedFilter(id),
|
416
|
-
onDeletePersonalizedFilter: (filter, configName) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName),
|
415
|
+
onAddPersonalizedFilter: (isDefault) => this.addPersonalizedFilter(isDefault),
|
416
|
+
onEditPersonalizedFilter: (id, isDefault) => this.editPersonalizedFilter(id, isDefault),
|
417
|
+
onDeletePersonalizedFilter: (filter, configName, isDefault) => this.deletePersonalizedFilter(filter, FilterItemType.PERSONALIZED, configName, isDefault),
|
417
418
|
};
|
418
419
|
this._filterModalFactory = new SnkFilterModalFactory(factoryParams);
|
419
420
|
await this._filterModalFactory.showModal();
|
420
421
|
}
|
421
|
-
addPersonalizedFilter() {
|
422
|
+
addPersonalizedFilter(isDefault = false) {
|
422
423
|
this._filterModalFactory.closeModal();
|
424
|
+
this._isDefaultFilter = isDefault;
|
423
425
|
this.personalizedFilterId = undefined;
|
424
426
|
this.showPersonalizedFilter = true;
|
425
427
|
window.requestAnimationFrame(() => {
|
426
428
|
this._elPersonalizedFilter.createPersonalizedFilter();
|
427
429
|
});
|
428
430
|
}
|
429
|
-
editPersonalizedFilter(id) {
|
431
|
+
editPersonalizedFilter(id, isDefault = false) {
|
430
432
|
this._filterModalFactory.closeModal();
|
433
|
+
this._isDefaultFilter = isDefault;
|
431
434
|
this.showPersonalizedFilter = true;
|
432
435
|
this.personalizedFilterId = id;
|
433
436
|
}
|
434
|
-
deletePersonalizedFilter(filter, filterItemType, configName) {
|
437
|
+
deletePersonalizedFilter(filter, filterItemType, configName, isDefault = false) {
|
438
|
+
if (isDefault) {
|
439
|
+
ConfigStorage.removeDefaultFilter(filter, this.resourceID, configName);
|
440
|
+
this._isDefaultFilter = false;
|
441
|
+
return;
|
442
|
+
}
|
435
443
|
if (filterItemType === FilterItemType.PERSONALIZED) {
|
436
444
|
ConfigStorage.removePersonalizedFilter(filter, this.resourceID, configName);
|
437
445
|
}
|
@@ -449,6 +457,7 @@ export class SnkFilterBar {
|
|
449
457
|
hidePersonalizedFilter() {
|
450
458
|
this.personalizedFilterId = undefined;
|
451
459
|
this.showPersonalizedFilter = false;
|
460
|
+
this._isDefaultFilter = false;
|
452
461
|
}
|
453
462
|
async componentWillLoad() {
|
454
463
|
var _a;
|
@@ -479,7 +488,7 @@ export class SnkFilterBar {
|
|
479
488
|
return undefined;
|
480
489
|
}
|
481
490
|
if (this.showPersonalizedFilter) {
|
482
|
-
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
491
|
+
return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, isDefaultFilter: this._isDefaultFilter, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
|
483
492
|
}
|
484
493
|
if (this.mode !== "regular") {
|
485
494
|
return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
|
@@ -3,5 +3,6 @@ export var FilterType;
|
|
3
3
|
FilterType["QUICK_FILTER"] = "QUICK_FILTER";
|
4
4
|
FilterType["CUSTOM_FILTER"] = "CUSTOM_FILTER";
|
5
5
|
FilterType["OTHER_FILTERS"] = "OTHER_FILTERS";
|
6
|
+
FilterType["DEFAULT_FILTER"] = "DEFAULT_FILTER";
|
6
7
|
})(FilterType || (FilterType = {}));
|
7
8
|
export default FilterType;
|
@@ -23,16 +23,16 @@ class SnkFilterModalFactory {
|
|
23
23
|
filterModal.getMessage = this._getMessage.bind(this);
|
24
24
|
filterModal.applyFilters = this.applyFilters.bind(this);
|
25
25
|
filterModal.closeModal = () => this._closeModal();
|
26
|
-
filterModal.addPersonalizedFilter = () => this._addPersonalizedFilterFn();
|
27
|
-
filterModal.editPersonalizedFilter = (id) => this._editPersonalizedFilterFn(id);
|
28
|
-
filterModal.deletePersonalizedFilter = (filter, configName) => this._onDeletePersonalizedFilter(filter, configName);
|
26
|
+
filterModal.addPersonalizedFilter = (isDefault) => this._addPersonalizedFilterFn(isDefault);
|
27
|
+
filterModal.editPersonalizedFilter = (id, isDefault) => this._editPersonalizedFilterFn(id, isDefault);
|
28
|
+
filterModal.deletePersonalizedFilter = (filter, configName, isDefault) => this._onDeletePersonalizedFilter(filter, configName, isDefault);
|
29
29
|
return filterModal;
|
30
30
|
}
|
31
31
|
async showModal() {
|
32
32
|
const filterModal = this.buildFilterModal();
|
33
33
|
const modalProps = {
|
34
34
|
content: filterModal,
|
35
|
-
position: '
|
35
|
+
position: 'right',
|
36
36
|
heightMode: 'full',
|
37
37
|
closeOutsideClick: false,
|
38
38
|
useScrimLight: true
|