@sankhyalabs/sankhyablocks 10.1.0-dev.51 → 10.1.0-dev.53
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-a1fab5ca.js → ConfigStorage-4201dd3d.js} +2 -2
- package/dist/cjs/{DataFetcher-384d2ce8.js → DataFetcher-b3a8075d.js} +2830 -2
- package/dist/cjs/FormConfigHelper-c5f5473a.js +342 -0
- package/dist/cjs/{ISave-ecbe9336.js → ISave-4674c283.js} +1 -1
- package/dist/cjs/{PersonalizedFilterUtils-eccb267a.js → PersonalizedFilterUtils-263e4d24.js} +52 -5
- package/dist/cjs/{SnkFormConfigManager-44386305.js → SnkFormConfigManager-c3a49038.js} +2 -2
- package/dist/cjs/{SnkMultiSelectionListDataSource-293bc3d2.js → SnkMultiSelectionListDataSource-0bc94d36.js} +71 -24
- package/dist/cjs/{auth-fetcher-6b134ec4.js → auth-fetcher-0ecc53ff.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-b9822794.js → dataunit-fetcher-bcbc38c0.js} +2 -3
- package/dist/cjs/{filter-type.enum-2bb46d2a.js → filter-type.enum-b3b388af.js} +7 -0
- package/dist/cjs/{form-config-fetcher-45d1964c.js → form-config-fetcher-f80dbc3b.js} +23 -5
- package/dist/cjs/index-1894343a.js +24 -36
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -5
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +5 -6
- package/dist/cjs/snk-application.cjs.entry.js +7 -8
- package/dist/cjs/snk-attach_11.cjs.entry.js +2950 -0
- package/dist/cjs/snk-crud.cjs.entry.js +31 -229
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
- package/dist/cjs/{snk-data-unit-4b6dc396.js → snk-data-unit-3b94547d.js} +11 -11
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +16 -11
- package/dist/cjs/snk-dynaform-config-header_5.cjs.entry.js +739 -0
- package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +938 -0
- package/dist/cjs/snk-dynaform-field-config_2.cjs.entry.js +327 -0
- package/dist/cjs/snk-dynaform-guides-view-e98f7f3a.js +747 -0
- package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +23 -0
- package/dist/cjs/snk-dynaform.cjs.entry.js +675 -0
- package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js} +421 -18
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +41 -44
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -5
- package/dist/cjs/snk-grid.cjs.entry.js +7 -8
- package/dist/cjs/{snk-guides-viewer-b4ca3437.js → snk-guides-viewer-3054d541.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +5 -6
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +4 -5
- package/dist/cjs/snk-pesquisa.cjs.entry.js +4 -5
- package/dist/cjs/taskbarUtils-38748460.js +231 -0
- package/dist/collection/collection-manifest.json +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +4 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +6 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +1 -1
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +14 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +67 -20
- package/dist/collection/components/snk-dynaform/interfaces/PropsCustomEditor.js +1 -0
- package/dist/collection/components/snk-dynaform/interfaces/PropsCustomRender.js +1 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.css +64 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.js +1657 -0
- package/dist/collection/components/snk-dynaform/subcomponents/CardFormResizeObserver.js +26 -0
- package/dist/collection/components/snk-dynaform/subcomponents/GuideBuilder.js +51 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.css +112 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +992 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +64 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +588 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +98 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +1167 -0
- package/dist/collection/components/snk-dynaform-form-config/FormConfigHelper.js +325 -0
- package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +212 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.css +17 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.js +236 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.css +41 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.js +170 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.css +22 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.js +408 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.css +88 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item.js +209 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.css +167 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.js +655 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.css +42 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.js +171 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.css +66 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-form-config.js +557 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.css +80 -0
- package/dist/collection/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.js +326 -0
- package/dist/collection/components/snk-grid/snk-grid.css +14 -7
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
- package/dist/components/ContinuousInsertUtils.js +67 -20
- package/dist/components/form-config-fetcher.js +22 -4
- package/dist/components/index.d.ts +12 -0
- package/dist/components/index.js +12 -0
- package/dist/components/snk-crud.js +1 -198
- package/dist/components/snk-detail-view2.js +8 -2
- package/dist/components/snk-dynaform-config-header.d.ts +11 -0
- package/dist/components/snk-dynaform-config-header.js +6 -0
- package/dist/components/snk-dynaform-config-header2.js +103 -0
- package/dist/components/snk-dynaform-configs-button.d.ts +11 -0
- package/dist/components/snk-dynaform-configs-button.js +6 -0
- package/dist/components/snk-dynaform-configs-button2.js +76 -0
- package/dist/components/snk-dynaform-detail-view.d.ts +11 -0
- package/dist/components/snk-dynaform-detail-view.js +6 -0
- package/dist/components/snk-dynaform-detail-view2.js +1835 -0
- package/dist/components/snk-dynaform-field-config.d.ts +11 -0
- package/dist/components/snk-dynaform-field-config.js +6 -0
- package/dist/components/snk-dynaform-field-config2.js +605 -0
- package/dist/components/snk-dynaform-field-item.d.ts +11 -0
- package/dist/components/snk-dynaform-field-item.js +6 -0
- package/dist/components/snk-dynaform-field-item2.js +96 -0
- package/dist/components/snk-dynaform-fields-layout.d.ts +11 -0
- package/dist/components/snk-dynaform-fields-layout.js +6 -0
- package/dist/components/snk-dynaform-fields-layout2.js +428 -0
- package/dist/components/snk-dynaform-fields-selector.d.ts +11 -0
- package/dist/components/snk-dynaform-fields-selector.js +6 -0
- package/dist/components/snk-dynaform-fields-selector2.js +104 -0
- package/dist/components/snk-dynaform-form-config.d.ts +11 -0
- package/dist/components/snk-dynaform-form-config.js +6 -0
- package/dist/components/snk-dynaform-form-config2.js +430 -0
- package/dist/components/snk-dynaform-form-view.d.ts +11 -0
- package/dist/components/snk-dynaform-form-view.js +6 -0
- package/dist/components/snk-dynaform-form-view2.js +270 -0
- package/dist/components/snk-dynaform-guides-configurator.d.ts +11 -0
- package/dist/components/snk-dynaform-guides-configurator.js +6 -0
- package/dist/components/snk-dynaform-guides-configurator2.js +173 -0
- package/dist/components/snk-dynaform-guides-view.d.ts +11 -0
- package/dist/components/snk-dynaform-guides-view.js +6 -0
- package/dist/components/snk-dynaform.d.ts +11 -0
- package/dist/components/snk-dynaform.js +1003 -0
- package/dist/components/snk-grid2.js +1 -1
- package/dist/components/taskbarUtils.js +224 -0
- package/dist/esm/{ConfigStorage-76872695.js → ConfigStorage-e834d1ea.js} +2 -2
- package/dist/esm/{DataFetcher-e60f8d53.js → DataFetcher-5ed0a377.js} +2830 -3
- package/dist/esm/FormConfigHelper-efc29480.js +328 -0
- package/dist/esm/{ISave-4929c071.js → ISave-5b46d691.js} +1 -1
- package/dist/esm/{PersonalizedFilterUtils-d2439a9a.js → PersonalizedFilterUtils-45b5803c.js} +49 -2
- package/dist/esm/{SnkFormConfigManager-83f6b22f.js → SnkFormConfigManager-bfd575c2.js} +2 -2
- package/dist/esm/{SnkMultiSelectionListDataSource-f6cabd15.js → SnkMultiSelectionListDataSource-9e9166ae.js} +71 -24
- package/dist/esm/{auth-fetcher-1a31c1e4.js → auth-fetcher-5283045d.js} +1 -1
- package/dist/esm/{dataunit-fetcher-c176e002.js → dataunit-fetcher-3b1ca96e.js} +1 -2
- package/dist/esm/{filter-type.enum-f6a8fe23.js → filter-type.enum-62b7fe88.js} +8 -1
- package/dist/esm/{form-config-fetcher-b44b2727.js → form-config-fetcher-db1bf140.js} +23 -5
- package/dist/esm/index-04f73a26.js +24 -36
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -5
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_9.entry.js +5 -6
- package/dist/esm/snk-application.entry.js +6 -7
- package/dist/esm/snk-attach_11.entry.js +2936 -0
- package/dist/esm/snk-crud.entry.js +6 -204
- package/dist/esm/snk-data-exporter.entry.js +5 -6
- package/dist/esm/{snk-data-unit-d8cfa950.js → snk-data-unit-dfde62cb.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -4
- package/dist/esm/snk-detail-view.entry.js +14 -9
- package/dist/esm/snk-dynaform-config-header_5.entry.js +731 -0
- package/dist/esm/snk-dynaform-detail-view_2.entry.js +933 -0
- package/dist/esm/snk-dynaform-field-config_2.entry.js +322 -0
- package/dist/esm/snk-dynaform-guides-view-1f1455d6.js +744 -0
- package/dist/esm/snk-dynaform-guides-view.entry.js +15 -0
- package/dist/esm/snk-dynaform.entry.js +671 -0
- package/dist/esm/{snk-expression-group_2.entry.js → snk-expression-group_4.entry.js} +405 -4
- package/dist/esm/snk-filter-bar_4.entry.js +5 -8
- package/dist/esm/snk-form_2.entry.js +4 -5
- package/dist/esm/snk-grid.entry.js +7 -8
- package/dist/esm/{snk-guides-viewer-cc37535b.js → snk-guides-viewer-95fefcaa.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +5 -6
- package/dist/esm/snk-layout-form-config.entry.js +4 -5
- package/dist/esm/snk-pesquisa.entry.js +4 -5
- package/dist/esm/taskbarUtils-8501d09e.js +225 -0
- package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
- package/dist/sankhyablocks/{p-f5ad0720.js → p-19d1ca14.js} +1 -1
- package/dist/sankhyablocks/{p-ab5e12fa.js → p-1cc4cf61.js} +1 -1
- package/dist/sankhyablocks/p-1edd6be6.entry.js +1 -0
- package/dist/sankhyablocks/p-22ddc1a5.entry.js +1 -0
- package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
- package/dist/sankhyablocks/p-2c00b93d.js +1 -0
- package/dist/sankhyablocks/p-3623fddf.entry.js +1 -0
- package/dist/sankhyablocks/p-43c94ba5.entry.js +1 -0
- package/dist/sankhyablocks/p-449dfe55.entry.js +1 -0
- package/dist/sankhyablocks/p-451b5bcc.entry.js +1 -0
- package/dist/sankhyablocks/p-46d7e2de.js +1 -0
- package/dist/sankhyablocks/{p-3c990841.js → p-51e853f2.js} +1 -1
- package/dist/sankhyablocks/p-58709cf9.js +1 -0
- package/dist/sankhyablocks/p-589016e2.entry.js +1 -0
- package/dist/sankhyablocks/p-5d02c032.js +1 -0
- package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
- package/dist/sankhyablocks/p-61776b68.entry.js +1 -0
- package/dist/sankhyablocks/p-6b8a1ec3.js +1 -0
- package/dist/sankhyablocks/p-7038cf62.entry.js +1 -0
- package/dist/sankhyablocks/{p-771b137e.js → p-70c2ee5c.js} +1 -1
- package/dist/sankhyablocks/p-7628e04f.entry.js +1 -0
- package/dist/sankhyablocks/p-7798788b.entry.js +1 -0
- package/dist/sankhyablocks/p-77c26de0.js +1 -0
- package/dist/sankhyablocks/p-7c34a0f7.entry.js +1 -0
- package/dist/sankhyablocks/p-a4a0d9b7.entry.js +1 -0
- package/dist/sankhyablocks/{p-4f7adf97.js → p-b1bf9564.js} +1 -1
- package/dist/sankhyablocks/p-b4c2a99c.entry.js +1 -0
- package/dist/sankhyablocks/p-b75af274.entry.js +1 -0
- package/dist/sankhyablocks/p-c538bd6c.entry.js +1 -0
- package/dist/sankhyablocks/{p-3704bf1b.js → p-d5810110.js} +1 -1
- package/dist/sankhyablocks/p-d7fd447e.entry.js +1 -0
- package/dist/sankhyablocks/p-d88278f8.js +28 -0
- package/dist/sankhyablocks/p-f076d742.js +60 -0
- package/dist/sankhyablocks/{p-8fe740b7.entry.js → p-f1ef090f.entry.js} +2 -2
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +8 -0
- package/dist/types/components/snk-dynaform/interfaces/PropsCustomEditor.d.ts +4 -0
- package/dist/types/components/snk-dynaform/interfaces/PropsCustomRender.d.ts +4 -0
- package/dist/types/components/snk-dynaform/subcomponents/CardFormResizeObserver.d.ts +1 -0
- package/dist/types/components/snk-dynaform/subcomponents/GuideBuilder.d.ts +14 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.d.ts +158 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +107 -0
- package/dist/types/components/snk-dynaform-form-config/FormConfigHelper.d.ts +36 -0
- package/dist/types/components/snk-dynaform-form-config/SnkFormConfigManager.d.ts +35 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header.d.ts +23 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button.d.ts +19 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config.d.ts +56 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout.d.ts +74 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector.d.ts +21 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-form-config.d.ts +95 -0
- package/dist/types/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator.d.ts +35 -0
- package/dist/types/components.d.ts +2403 -1322
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/react/components.d.ts +12 -0
- package/react/components.js +12 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/SnkMessageBuilder-a9300ebe.js +0 -2833
- package/dist/cjs/default-filters-a09bf82b.js +0 -8
- package/dist/cjs/index-62760a9c.js +0 -49
- package/dist/cjs/index-8d94b7e0.js +0 -7
- package/dist/cjs/snk-attach.cjs.entry.js +0 -948
- package/dist/cjs/snk-default-filter.cjs.entry.js +0 -77
- package/dist/cjs/snk-filter-advanced-mode_3.cjs.entry.js +0 -99
- package/dist/cjs/snk-filter-detail.cjs.entry.js +0 -198
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +0 -408
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +0 -109
- package/dist/cjs/snk-image-input.cjs.entry.js +0 -160
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +0 -358
- package/dist/cjs/snk-simple-crud.cjs.entry.js +0 -865
- package/dist/esm/SnkMessageBuilder-1eb7a1af.js +0 -2831
- package/dist/esm/default-filters-50105e43.js +0 -8
- package/dist/esm/index-620ac460.js +0 -7
- package/dist/esm/index-8acbae97.js +0 -49
- package/dist/esm/snk-attach.entry.js +0 -944
- package/dist/esm/snk-default-filter.entry.js +0 -73
- package/dist/esm/snk-filter-advanced-mode_3.entry.js +0 -93
- package/dist/esm/snk-filter-detail.entry.js +0 -194
- package/dist/esm/snk-filter-field-search_2.entry.js +0 -403
- package/dist/esm/snk-filter-modal-item.entry.js +0 -105
- package/dist/esm/snk-image-input.entry.js +0 -156
- package/dist/esm/snk-personalized-filter.entry.js +0 -354
- package/dist/esm/snk-simple-crud.entry.js +0 -861
- package/dist/sankhyablocks/p-0afc64df.entry.js +0 -1
- package/dist/sankhyablocks/p-10f27dc6.entry.js +0 -1
- package/dist/sankhyablocks/p-134702f6.entry.js +0 -1
- package/dist/sankhyablocks/p-20f03230.entry.js +0 -1
- package/dist/sankhyablocks/p-2af8aca3.js +0 -1
- package/dist/sankhyablocks/p-33492640.entry.js +0 -1
- package/dist/sankhyablocks/p-3870748a.js +0 -28
- package/dist/sankhyablocks/p-438a225f.entry.js +0 -1
- package/dist/sankhyablocks/p-4d04bc75.entry.js +0 -1
- package/dist/sankhyablocks/p-554c0e54.js +0 -1
- package/dist/sankhyablocks/p-68c1a093.js +0 -1
- package/dist/sankhyablocks/p-6a4b21dd.js +0 -1
- package/dist/sankhyablocks/p-6ae7543b.entry.js +0 -1
- package/dist/sankhyablocks/p-6e278003.js +0 -60
- package/dist/sankhyablocks/p-82bcb4cf.entry.js +0 -1
- package/dist/sankhyablocks/p-84345e7a.js +0 -1
- package/dist/sankhyablocks/p-95af0bb1.entry.js +0 -1
- package/dist/sankhyablocks/p-95b36bd3.entry.js +0 -1
- package/dist/sankhyablocks/p-9e77e136.js +0 -1
- package/dist/sankhyablocks/p-a905712a.entry.js +0 -1
- package/dist/sankhyablocks/p-aff2d081.entry.js +0 -1
- package/dist/sankhyablocks/p-b0a357b4.entry.js +0 -1
- package/dist/sankhyablocks/p-b568c1d4.js +0 -1
- package/dist/sankhyablocks/p-bab4cde4.entry.js +0 -1
- package/dist/sankhyablocks/p-cc64239c.entry.js +0 -1
- package/dist/sankhyablocks/p-cd00a3d1.entry.js +0 -1
- package/dist/sankhyablocks/p-d9ec8c4b.entry.js +0 -1
- package/dist/sankhyablocks/p-e8df1dea.entry.js +0 -1
- package/dist/sankhyablocks/p-ef9343c3.entry.js +0 -1
- package/dist/sankhyablocks/p-f1bbf065.entry.js +0 -1
- package/dist/sankhyablocks/p-f4184ce7.js +0 -1
- package/dist/sankhyablocks/p-fec88660.entry.js +0 -1
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-1894343a.js');
|
|
6
|
-
const defaultFilters = require('./default-filters-a09bf82b.js');
|
|
7
|
-
|
|
8
|
-
const snkDefaultFilterCss = ".sc-snk-default-filter-h{display:flex;justify-content:flex-end}.default_container.sc-snk-default-filter{border:none;background:none;display:flex;align-items:center;gap:var(--space--3xs, 4px);font-family:var(--font-pattern);color:var(--title--primary, #2b3a54);font-size:var(--text--medium, 14px);padding:0;outline:none}.default_container.sc-snk-default-filter ez-icon.sc-snk-default-filter{cursor:pointer}.default_container.sc-snk-default-filter ez-icon.sc-snk-default-filter:hover{color:var(--color--primary-600)}.new_filter.sc-snk-default-filter{cursor:pointer;margin:0 var(--space--3xs, 4px)}.new_filter.sc-snk-default-filter:hover{color:var(--color--primary-600)}";
|
|
9
|
-
|
|
10
|
-
const SnkDefaultFilter = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.actionSelected = index.createEvent(this, "actionSelected", 7);
|
|
14
|
-
this.OFFSET_HEIGHT = 5;
|
|
15
|
-
this.getMessage = undefined;
|
|
16
|
-
this.hasDefaultFilter = false;
|
|
17
|
-
this._opened = false;
|
|
18
|
-
}
|
|
19
|
-
repositionDropDown() {
|
|
20
|
-
if (!this._refIcon || !this._refDropdown) {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
const boundingIcon = this._refIcon.getBoundingClientRect();
|
|
24
|
-
const boundingDropDown = this._refDropdown.getBoundingClientRect();
|
|
25
|
-
this._refDropdown.style.top = (boundingIcon.y + boundingIcon.height + this.OFFSET_HEIGHT) + "px";
|
|
26
|
-
this._refDropdown.style.left = ((boundingIcon.x + (boundingIcon.width / 2)) - boundingDropDown.width) + "px";
|
|
27
|
-
}
|
|
28
|
-
toggleDropdown() {
|
|
29
|
-
this._opened = !this._opened;
|
|
30
|
-
}
|
|
31
|
-
closeDropdown(evt) {
|
|
32
|
-
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
33
|
-
if (!target) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
if (!target.closest("#dropdown-parent-demo")) {
|
|
37
|
-
this._opened = false;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
buildItems() {
|
|
41
|
-
return ([
|
|
42
|
-
{
|
|
43
|
-
id: defaultFilters.ActionDefaultFilter.EDIT,
|
|
44
|
-
label: this.getMessage('defaultFilter.edit'),
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
id: defaultFilters.ActionDefaultFilter.REMOVE,
|
|
48
|
-
label: this.getMessage('defaultFilter.remove'),
|
|
49
|
-
},
|
|
50
|
-
]);
|
|
51
|
-
}
|
|
52
|
-
onValueSelected({ detail: item }) {
|
|
53
|
-
this._opened = false;
|
|
54
|
-
this.actionSelected.emit(item.id);
|
|
55
|
-
}
|
|
56
|
-
openCreateNewFilter() {
|
|
57
|
-
this.actionSelected.emit(defaultFilters.ActionDefaultFilter.CREATE);
|
|
58
|
-
}
|
|
59
|
-
componentDidRender() {
|
|
60
|
-
this.repositionDropDown();
|
|
61
|
-
}
|
|
62
|
-
componentWillLoad() {
|
|
63
|
-
this._items = this.buildItems();
|
|
64
|
-
document.removeEventListener("scroll", this.repositionDropDown.bind(this));
|
|
65
|
-
document.addEventListener("scroll", this.repositionDropDown.bind(this));
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
if (!this.hasDefaultFilter) {
|
|
69
|
-
return (index.h(index.Host, null, index.h("button", { class: "default_container new_filter", onClick: this.openCreateNewFilter.bind(this) }, index.h("span", null, this.getMessage('defaultFilter.create')))));
|
|
70
|
-
}
|
|
71
|
-
return (index.h(index.Host, null, index.h("button", { class: "default_container", onClick: this.toggleDropdown.bind(this) }, index.h("span", null, this.getMessage('defaultFilter.title')), index.h("ez-icon", { ref: (ref) => this._refIcon = ref, iconName: 'dots-vertical' })), this._opened &&
|
|
72
|
-
index.h("ez-dropdown", { ref: (ref) => this._refDropdown = ref, items: this._items, onEzClick: this.onValueSelected.bind(this), onEzOutsideClick: this.closeDropdown.bind(this) })));
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
SnkDefaultFilter.style = snkDefaultFilterCss;
|
|
76
|
-
|
|
77
|
-
exports.snk_default_filter = SnkDefaultFilter;
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-1894343a.js');
|
|
6
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
7
|
-
const core = require('@sankhyalabs/core');
|
|
8
|
-
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
9
|
-
require('./index-62760a9c.js');
|
|
10
|
-
|
|
11
|
-
const snkFilterAdvancedModeCss = ".sc-snk-filter-advanced-mode-h{display:block;--snk-personalized-filter--title--color:var(--title--primary, #2B3A54)}.snk-filter-advanced-mode__title.sc-snk-filter-advanced-mode{color:var(--snk-personalized-filter--title--color)}";
|
|
12
|
-
|
|
13
|
-
const SnkFilterAdvancedMode = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
this.ezExpressionChange = index.createEvent(this, "ezExpressionChange", 7);
|
|
17
|
-
this.filterAssistent = undefined;
|
|
18
|
-
this.application = undefined;
|
|
19
|
-
}
|
|
20
|
-
getMessage(key, params) {
|
|
21
|
-
return this.application.messagesBuilder.getMessage(key, params);
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
var _a;
|
|
25
|
-
return (index.h(index.Host, null, index.h("span", { class: "ez-title ez-title--small ez-padding-bottom--small snk-filter-advanced-mode__title" }, this.getMessage("snkPersonalizedFilter.info.applyExpression")), index.h("ez-text-area", { rows: 9, label: this.getMessage("snkPersonalizedFilter.info.labelExpression"), value: (_a = this.filterAssistent) === null || _a === void 0 ? void 0 : _a.expression, onEzChange: (evt) => this.ezExpressionChange.emit(evt.detail) })));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
SnkFilterAdvancedMode.style = snkFilterAdvancedModeCss;
|
|
29
|
-
|
|
30
|
-
const snkFilterAssistentModeCss = ".sc-snk-filter-assistent-mode-h{display:flex;flex-direction:column;height:100%;--text-area--font-family:var(--font-pattern, Arial);--text-area__label--floating--top:var(--space--small, 6px);--snk-filter-assistent-mode__container--border-radius:var(--border--radius-medium, 12px);--snk-filter-assistent-mode__container--background:var(--background--medium, #f0f3f7);--snk-filter-assistent-mode__container--margin:var(--space--small, 6px) var(--space--medium, 12px)}.ez-box__container--external.sc-snk-filter-assistent-mode{height:100px;width:100%;overflow-y:auto;background-color:var(--snk-filter-assistent-mode__container--background);border-radius:var(--snk-filter-assistent-mode__container--border-radius)}.ez-box__container--internal.sc-snk-filter-assistent-mode{margin:var(--snk-filter-assistent-mode__container--margin)}.ez-box__container--title.sc-snk-filter-assistent-mode{display:block;user-select:none;font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--title--primary);top:var(--text-area__label--floating--top)}.ez-box__container--expression.sc-snk-filter-assistent-mode{display:block;font-family:var(--text-area--font-family);font-size:var(--text--medium);color:var(--title--primary);top:var(--text-area__label--floating--top)}.snk-personalized-filter__expression-input--line.sc-snk-filter-assistent-mode{width:100%;height:2px;background-color:var(--snk-personalized-filter--background-color-line);margin-top:var(--snk-personalized-filter--margin-line);margin-bottom:var(--snk-personalized-filter--margin-line)}";
|
|
31
|
-
|
|
32
|
-
const SnkFilterAssistentMode = class {
|
|
33
|
-
constructor(hostRef) {
|
|
34
|
-
index.registerInstance(this, hostRef);
|
|
35
|
-
this.ezChangeFilter = index.createEvent(this, "ezChangeFilter", 7);
|
|
36
|
-
this.filterAssistent = undefined;
|
|
37
|
-
this.messagesBuilder = undefined;
|
|
38
|
-
this.filterId = undefined;
|
|
39
|
-
this.entityUri = undefined;
|
|
40
|
-
this.application = undefined;
|
|
41
|
-
this.isDefaultFilter = false;
|
|
42
|
-
}
|
|
43
|
-
getMessage(key, params) {
|
|
44
|
-
return this.application.messagesBuilder.getMessage(key, params);
|
|
45
|
-
}
|
|
46
|
-
async handleFilterGroupChange() {
|
|
47
|
-
const assistent = await this._mainExpressionGroup.getExpressionGroup();
|
|
48
|
-
this.filterAssistent = Object.assign(Object.assign({}, this.filterAssistent), { assistent });
|
|
49
|
-
this.filterAssistent.parameters = PersonalizedFilterUtils.PersonalizedFilterUtils.buildVariableParameters(this.filterAssistent.assistent);
|
|
50
|
-
this.filterAssistent.expression = PersonalizedFilterUtils.PersonalizedFilterUtils.buildGroupExpression(this.filterAssistent.assistent);
|
|
51
|
-
this.ezChangeFilter.emit(this.filterAssistent);
|
|
52
|
-
}
|
|
53
|
-
render() {
|
|
54
|
-
var _a, _b;
|
|
55
|
-
return (index.h(index.Host, null, index.h("div", { class: "ez-padding-top--small snk-personalized-filter__group" }, index.h("snk-expression-group", { ref: (el) => this._mainExpressionGroup = el, group: (_a = this.filterAssistent) === null || _a === void 0 ? void 0 : _a.assistent, messagesBuilder: this.messagesBuilder, onEzFilterGroupChange: this.handleFilterGroupChange.bind(this), filterId: this.filterId, entityURI: this.entityUri, isDefaultFilter: this.isDefaultFilter })), index.h("div", { class: "ez-margin-top--auto" }, index.h("div", { class: "snk-personalized-filter__expression-input--line" }), index.h("ez-collapsible-box", { label: this.getMessage("snkPersonalizedFilter.info.titleCollapsible"), headerSize: "medium", value: true }, index.h("div", { class: "ez-box" }, index.h("div", { class: "ez-box__container--external" }, index.h("div", { class: "ez-box__container--internal" }, index.h("span", { class: "ez-box__container--title" }, this.getMessage("snkPersonalizedFilter.info.labelExpression")), index.h("span", { class: "ez-box__container--expression" }, (_b = this.filterAssistent) === null || _b === void 0 ? void 0 : _b.expression))))))));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
SnkFilterAssistentMode.style = snkFilterAssistentModeCss;
|
|
59
|
-
|
|
60
|
-
const snkSimpleBarCss = ".sc-snk-simple-bar-h{display:flex;height:100%;width:100%}.simple-bar__container.sc-snk-simple-bar{flex:1;display:flex;align-items:stretch;gap:var(--space--small)}.simple-bar__left-slot.sc-snk-simple-bar{min-width:280px;flex:1;display:flex;align-items:center}.simple-bar__right-slot.sc-snk-simple-bar{flex:1;display:flex;align-items:center;justify-content:flex-end}.simple-bar__column.sc-snk-simple-bar{flex:1;display:flex;flex-direction:column}";
|
|
61
|
-
|
|
62
|
-
const SnkSimpleBar = class {
|
|
63
|
-
constructor(hostRef) {
|
|
64
|
-
index.registerInstance(this, hostRef);
|
|
65
|
-
this.clickBreadcrumbItem = index.createEvent(this, "clickBreadcrumbItem", 3);
|
|
66
|
-
this.exit = index.createEvent(this, "exit", 3);
|
|
67
|
-
this.label = undefined;
|
|
68
|
-
this.breadcrumbItens = undefined;
|
|
69
|
-
this.messagesBuilder = undefined;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Permite customizar as mensagens dos blocos de construção
|
|
73
|
-
* através de um pequeno módulo na estrutura da aplicação:
|
|
74
|
-
* - Crie um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
75
|
-
* Para conhecer os detalhes do módulo, veja o arquivo neste projeto: "/src/lib/message/resources/snk-simple-bar.msg.ts"
|
|
76
|
-
*/
|
|
77
|
-
getMessage(key, params) {
|
|
78
|
-
var _a;
|
|
79
|
-
if (this.messagesBuilder)
|
|
80
|
-
return this.messagesBuilder.getMessage(key, params);
|
|
81
|
-
if ((_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder)
|
|
82
|
-
return this._application.messagesBuilder.getMessage(key, params);
|
|
83
|
-
}
|
|
84
|
-
componentDidLoad() {
|
|
85
|
-
if (!this._element)
|
|
86
|
-
return;
|
|
87
|
-
core.ElementIDUtils.addIDInfo(this._element);
|
|
88
|
-
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
89
|
-
}
|
|
90
|
-
render() {
|
|
91
|
-
return (index.h("div", { class: "simple-bar__container ez-margin-vertical--small ez-padding--extra-small" }, index.h("div", { class: "simple-bar__left-slot" }, index.h("ez-button", { class: "ez-padding-right--medium", title: this.getMessage('snkSimpleBar.backTitle'), mode: 'icon', iconName: "arrow_back", size: 'medium', onClick: () => this.exit.emit() }), index.h("div", { class: "simple-bar__column" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large" }, this.label), index.h("ez-breadcrumb", { items: this.breadcrumbItens, onSelectedItem: ({ detail }) => this.clickBreadcrumbItem.emit(detail) }))), index.h("div", { class: "simple-bar__right-slot" }, index.h("slot", { name: "rightSlot" }))));
|
|
92
|
-
}
|
|
93
|
-
get _element() { return index.getElement(this); }
|
|
94
|
-
};
|
|
95
|
-
SnkSimpleBar.style = snkSimpleBarCss;
|
|
96
|
-
|
|
97
|
-
exports.snk_filter_advanced_mode = SnkFilterAdvancedMode;
|
|
98
|
-
exports.snk_filter_assistent_mode = SnkFilterAssistentMode;
|
|
99
|
-
exports.snk_simple_bar = SnkSimpleBar;
|
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-1894343a.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
|
-
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-eccb267a.js');
|
|
9
|
-
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
10
|
-
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
|
-
require('./index-62760a9c.js');
|
|
12
|
-
|
|
13
|
-
const SnkFilterDetail = class {
|
|
14
|
-
constructor(hostRef) {
|
|
15
|
-
index.registerInstance(this, hostRef);
|
|
16
|
-
this.filterChange = index.createEvent(this, "filterChange", 7);
|
|
17
|
-
this.config = undefined;
|
|
18
|
-
this.getMessage = undefined;
|
|
19
|
-
this.showHardFixed = true;
|
|
20
|
-
this.removalBlocked = false;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Define o foco no campo do editor.
|
|
24
|
-
*/
|
|
25
|
-
async setFocusField() {
|
|
26
|
-
var _a, _b, _c, _d;
|
|
27
|
-
if (!this._editor) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (this._editor["setFocus"]) {
|
|
31
|
-
(_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["setFocus"]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
32
|
-
}
|
|
33
|
-
else if (this._editor["focus"]) {
|
|
34
|
-
(_d = (_c = this._editor) === null || _c === void 0 ? void 0 : _c["focus"]) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
async clearValue() {
|
|
38
|
-
if (!this._editor) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (this._editor["clearValue"]) {
|
|
42
|
-
await this._editor["clearValue"]();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
observeConfig(newValue) {
|
|
46
|
-
var _a, _b;
|
|
47
|
-
this._editor && (this._editor["config"] = newValue);
|
|
48
|
-
(_b = (_a = this._editor) === null || _a === void 0 ? void 0 : _a["reloadList"]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
49
|
-
this._customElementObject = this.getContentEditor();
|
|
50
|
-
}
|
|
51
|
-
componentDidLoad() {
|
|
52
|
-
if (this._element) {
|
|
53
|
-
core.ElementIDUtils.addIDInfo(this._element);
|
|
54
|
-
const dataElementIdDoFilterItem = this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
55
|
-
this._idContentEditor = `${dataElementIdDoFilterItem}_${this.config.id}`;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
changeConfig(newConfig) {
|
|
59
|
-
this.filterChange.emit(newConfig);
|
|
60
|
-
}
|
|
61
|
-
getContentEditor() {
|
|
62
|
-
switch (this.config.type) {
|
|
63
|
-
case filterItemType_enum.FilterItemType.BINARY_SELECT:
|
|
64
|
-
return { tag: "snk-filter-binary-select" };
|
|
65
|
-
case filterItemType_enum.FilterItemType.MULTI_SELECT:
|
|
66
|
-
return { tag: "snk-filter-multi-select" };
|
|
67
|
-
case filterItemType_enum.FilterItemType.PERIOD:
|
|
68
|
-
return { tag: "snk-filter-period" };
|
|
69
|
-
case filterItemType_enum.FilterItemType.SEARCH:
|
|
70
|
-
return { tag: "snk-filter-search" };
|
|
71
|
-
case filterItemType_enum.FilterItemType.NUMBER:
|
|
72
|
-
return { tag: "snk-filter-number" };
|
|
73
|
-
case filterItemType_enum.FilterItemType.PERSONALIZED:
|
|
74
|
-
const snkFilterPersonalizedProps = {
|
|
75
|
-
tag: "snk-personalized-filter-editor", props: {
|
|
76
|
-
presentationMode: presentationMode.EPresentationMode.CHIP,
|
|
77
|
-
onValueChanged: evt => this.handleValueChanged(evt),
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
return snkFilterPersonalizedProps;
|
|
81
|
-
case filterItemType_enum.FilterItemType.CHECK_BOX_LIST:
|
|
82
|
-
return {
|
|
83
|
-
tag: "snk-filter-checkbox-list",
|
|
84
|
-
props: {
|
|
85
|
-
onValueChanged: evt => this.config = Object.assign(Object.assign({}, this.config), { value: evt.detail })
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
case filterItemType_enum.FilterItemType.MULTI_LIST:
|
|
89
|
-
return {
|
|
90
|
-
tag: "snk-entity-list",
|
|
91
|
-
props: {
|
|
92
|
-
onValueChanged: evt => this.config = Object.assign(Object.assign({}, this.config), { value: evt.detail })
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
return { tag: "snk-filter-text" };
|
|
97
|
-
}
|
|
98
|
-
handleValueChanged({ detail }) {
|
|
99
|
-
const groupedItems = (detail === null || detail === void 0 ? void 0 : detail.items) || this.config.groupedItems;
|
|
100
|
-
this.config = Object.assign(Object.assign({}, this.config), { groupedItems, visible: (groupedItems || []).filter(item => item.visible).length > 0 });
|
|
101
|
-
}
|
|
102
|
-
removeItem() {
|
|
103
|
-
const hasMultiValues = this.config.type === filterItemType_enum.FilterItemType.MULTI_LIST && Array.isArray(this.config.value);
|
|
104
|
-
const newValue = hasMultiValues ? this.config.value.map((valueItem) => (Object.assign(Object.assign({}, valueItem), { check: false }))) : undefined;
|
|
105
|
-
const removedConfig = Object.assign(Object.assign({}, this.config), { visible: false, fixed: false, value: newValue });
|
|
106
|
-
if (removedConfig.groupedItems != undefined) {
|
|
107
|
-
removedConfig.groupedItems = removedConfig.groupedItems.map(item => (Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined })));
|
|
108
|
-
}
|
|
109
|
-
this.changeConfig(removedConfig);
|
|
110
|
-
}
|
|
111
|
-
removeItemFromGroup(item) {
|
|
112
|
-
return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
|
|
113
|
-
}
|
|
114
|
-
getPopUpHeaderButtons() {
|
|
115
|
-
return (index.h(index.Fragment, null, !this.removalBlocked && !this.config.removalBlocked &&
|
|
116
|
-
this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
|
|
117
|
-
this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
|
|
118
|
-
}
|
|
119
|
-
buildIcon(title, iconName, action) {
|
|
120
|
-
return (index.h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, index.h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
|
|
121
|
-
}
|
|
122
|
-
buildIdButton(buttonElement, title) {
|
|
123
|
-
if (!buttonElement)
|
|
124
|
-
return;
|
|
125
|
-
const dataElement = { id: title };
|
|
126
|
-
buttonElement.removeAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME);
|
|
127
|
-
core.ElementIDUtils.addIDInfoIfNotExists(buttonElement, "button", dataElement);
|
|
128
|
-
}
|
|
129
|
-
clearBinarySelectValues() {
|
|
130
|
-
var _a;
|
|
131
|
-
const editor = this._editor || {};
|
|
132
|
-
(_a = editor.resetValues) === null || _a === void 0 ? void 0 : _a.call(editor);
|
|
133
|
-
this.config = core.ObjectUtils.copy(this.originalConfig);
|
|
134
|
-
this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
|
|
135
|
-
}
|
|
136
|
-
apply() {
|
|
137
|
-
const isValid = PersonalizedFilterUtils.PersonalizedFilterUtils.validateVariableValues(this.config, this._editor["value"]);
|
|
138
|
-
if (!isValid) {
|
|
139
|
-
return utils.ApplicationUtils.alert(this.getMessage('snkFilterBar.filterModal.validations.notFullFilled.title'), this.getMessage('snkFilterBar.filterModal.validations.notFullFilled.message'));
|
|
140
|
-
}
|
|
141
|
-
const valuesArray = this._editor["value"] !== undefined ? this._editor["value"] : this.config.value;
|
|
142
|
-
this.changeConfig(Object.assign(Object.assign({}, this.config), { visible: this.isVisible(), value: valuesArray }));
|
|
143
|
-
}
|
|
144
|
-
isVisible() {
|
|
145
|
-
if (this.config.groupedItems && this.config.groupedItems.length > 0) {
|
|
146
|
-
return this.config.groupedItems.filter(item => item.visible).length > 0;
|
|
147
|
-
}
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
clear() {
|
|
151
|
-
var _a;
|
|
152
|
-
if (this.config.type === filterItemType_enum.FilterItemType.BINARY_SELECT) {
|
|
153
|
-
this.clearBinarySelectValues();
|
|
154
|
-
return;
|
|
155
|
-
}
|
|
156
|
-
if (filterItemType_enum.FilterItemType.MULTI_LIST === this.config.type) {
|
|
157
|
-
const configCopy = core.ObjectUtils.copy(this.config);
|
|
158
|
-
(_a = configCopy.value) === null || _a === void 0 ? void 0 : _a.forEach(value => !!value && (value.check = false));
|
|
159
|
-
this.config = core.ObjectUtils.copy(configCopy);
|
|
160
|
-
return;
|
|
161
|
-
}
|
|
162
|
-
this.changeConfig(Object.assign(Object.assign({}, this.config), { value: undefined }));
|
|
163
|
-
}
|
|
164
|
-
filterCanBeCleared() {
|
|
165
|
-
return this.config.type !== filterItemType_enum.FilterItemType.PERSONALIZED;
|
|
166
|
-
}
|
|
167
|
-
onKeyDonwListener(event) {
|
|
168
|
-
if (event.key === "Enter") {
|
|
169
|
-
this.apply();
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
buildRightSlot(item) {
|
|
173
|
-
return index.h("ez-icon", { iconName: "delete", onClick: () => this.removeValueFromConfig(item) });
|
|
174
|
-
}
|
|
175
|
-
removeValueFromConfig(item) {
|
|
176
|
-
var _a, _b;
|
|
177
|
-
if (this.config) {
|
|
178
|
-
const configCopy = core.ObjectUtils.copy(this.config);
|
|
179
|
-
const index = (_a = configCopy.value) === null || _a === void 0 ? void 0 : _a.findIndex(i => (i === null || i === void 0 ? void 0 : i.id) === item.id);
|
|
180
|
-
(_b = configCopy.value) === null || _b === void 0 ? void 0 : _b.splice(index, 1);
|
|
181
|
-
this.config = core.ObjectUtils.copy(configCopy);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
componentWillLoad() {
|
|
185
|
-
this.originalConfig = core.ObjectUtils.copy(this.config);
|
|
186
|
-
this._customElementObject = this.getContentEditor();
|
|
187
|
-
}
|
|
188
|
-
render() {
|
|
189
|
-
const { tag: CustomElement, props } = this._customElementObject;
|
|
190
|
-
return (index.h(index.Host, null, index.h("div", { class: "col ez-col--sd-12 ez-align--right ez-padding-medium ez-flex--align-items-center" }, index.h("div", { class: "ez-text ez-title ez-title--small ez-padding--small sc-snk-filter-bar snk-filter-item__editor-header" }, this.config.detailTitle), this.getPopUpHeaderButtons()), index.h(CustomElement, Object.assign({ maxHeightList: '240px', ref: ref => this._editor = ref, value: this.config.value, config: this.config, onKeyDown: evt => this.onKeyDonwListener(evt), "data-element-id": this._idContentEditor, getMessage: this.getMessage, rightListSlotBuilder: item => this.buildRightSlot(item) }, props)), index.h("hr", { class: "sc-snk-filter-bar snk-filter__popover-rule" }), index.h("div", { class: "ez-col ez-col--sd-12 ez-align--right" }, this.filterCanBeCleared() && (index.h("ez-button", { label: this.getMessage("snkFilterBar.cleanFilter"), onClick: () => this.clear(), size: "small" })), index.h("ez-button", { ref: ref => this._applyButton = ref, label: this.getMessage("snkFilterBar.applyFilter"), onClick: () => this.apply(), size: "small", class: "ez-button--primary ez-padding-left--medium" }))));
|
|
191
|
-
}
|
|
192
|
-
get _element() { return index.getElement(this); }
|
|
193
|
-
static get watchers() { return {
|
|
194
|
-
"config": ["observeConfig"]
|
|
195
|
-
}; }
|
|
196
|
-
};
|
|
197
|
-
|
|
198
|
-
exports.snk_filter_detail = SnkFilterDetail;
|