@sankhyalabs/sankhyablocks 10.1.0-dev.52 → 10.1.0-dev.54
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-d341dd02.js → SnkMultiSelectionListDataSource-3a13fd34.js} +4 -4
- package/dist/cjs/{auth-fetcher-6b134ec4.js → auth-fetcher-0ecc53ff.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-b9822794.js → dataunit-fetcher-c7e66f0d.js} +13 -4
- 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 -243
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -6
- package/dist/cjs/{snk-data-unit-4b6dc396.js → snk-data-unit-35f10e01.js} +11 -11
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
- 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-8e7a503b.js → snk-guides-viewer-3054d541.js} +1 -1
- 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-383c596e.js +231 -0
- package/dist/collection/collection-manifest.json +17 -0
- 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 +4 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +11 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
- package/dist/components/dataunit-fetcher.js +11 -1
- 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 -212
- 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-18abafb1.js → SnkMultiSelectionListDataSource-22b50dd6.js} +4 -4
- package/dist/esm/{auth-fetcher-1a31c1e4.js → auth-fetcher-5283045d.js} +1 -1
- package/dist/esm/{dataunit-fetcher-c176e002.js → dataunit-fetcher-2200fdd6.js} +12 -3
- 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 -218
- package/dist/esm/snk-data-exporter.entry.js +5 -6
- package/dist/esm/{snk-data-unit-d8cfa950.js → snk-data-unit-e8bd4143.js} +2 -2
- package/dist/esm/snk-data-unit.entry.js +3 -4
- package/dist/esm/snk-detail-view.entry.js +7 -8
- 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-adf39ea2.js → snk-guides-viewer-95fefcaa.js} +1 -1
- 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-682ca78c.js +225 -0
- package/dist/sankhyablocks/p-06b6c284.entry.js +1 -0
- package/dist/sankhyablocks/p-09e2255b.entry.js +1 -0
- package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
- package/dist/sankhyablocks/{p-5c250661.js → p-1a04f537.js} +1 -1
- package/dist/sankhyablocks/{p-ab5e12fa.js → p-1cc4cf61.js} +1 -1
- package/dist/sankhyablocks/{p-f5ad0720.js → p-2040953e.js} +1 -1
- package/dist/sankhyablocks/p-22ddc1a5.entry.js +1 -0
- package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
- package/dist/sankhyablocks/p-2b581179.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-51f1485c.entry.js +1 -0
- package/dist/sankhyablocks/p-58709cf9.js +1 -0
- package/dist/sankhyablocks/p-589016e2.entry.js +1 -0
- package/dist/sankhyablocks/p-5c6eede7.js +60 -0
- package/dist/sankhyablocks/p-5d02c032.js +1 -0
- package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
- package/dist/sankhyablocks/p-670c43e3.entry.js +1 -0
- package/dist/sankhyablocks/{p-b1bb4cf1.js → p-70c2ee5c.js} +1 -1
- package/dist/sankhyablocks/p-77c26de0.js +1 -0
- package/dist/sankhyablocks/p-92c71225.entry.js +1 -0
- package/dist/sankhyablocks/p-9c89a76a.entry.js +1 -0
- package/dist/sankhyablocks/{p-4f7adf97.js → p-b1bf9564.js} +1 -1
- package/dist/sankhyablocks/p-c538bd6c.entry.js +1 -0
- package/dist/sankhyablocks/p-ccd61eb8.entry.js +1 -0
- package/dist/sankhyablocks/{p-3704bf1b.js → p-d5810110.js} +1 -1
- package/dist/sankhyablocks/p-d88278f8.js +28 -0
- package/dist/sankhyablocks/p-dc45e9e5.entry.js +1 -0
- package/dist/sankhyablocks/{p-8fe740b7.entry.js → p-dc83c70f.entry.js} +2 -2
- package/dist/sankhyablocks/p-e5362a5c.js +1 -0
- package/dist/sankhyablocks/p-edd44079.entry.js +1 -0
- package/dist/sankhyablocks/p-eff38390.entry.js +1 -0
- package/dist/sankhyablocks/p-ff28e5e4.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- 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 +5 -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-0a4cdcde.entry.js +0 -1
- package/dist/sankhyablocks/p-0afc64df.entry.js +0 -1
- package/dist/sankhyablocks/p-10f27dc6.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-3870748a.js +0 -28
- package/dist/sankhyablocks/p-3d294185.entry.js +0 -1
- 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-57c184a2.entry.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-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-bd3c1aaa.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-dbdbb77a.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-f4184ce7.js +0 -1
package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js}
RENAMED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-1894343a.js');
|
|
6
|
-
const
|
|
6
|
+
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-263e4d24.js');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const core = require('@sankhyalabs/core');
|
|
9
|
-
const index$3 = require('./index-8d94b7e0.js');
|
|
10
9
|
const FieldBuilder = require('@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder');
|
|
11
|
-
const index$
|
|
10
|
+
const index$1 = require('./index-f0fe7e6e.js');
|
|
12
11
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
12
|
+
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
|
13
|
+
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
14
|
|
|
14
15
|
const snkExpressionGroupCss = ".sc-snk-expression-group-h{display:block;--snk-expression-group--container-condition--width:184px;--snk-expression-group--container-condition--height:38px;--snk-expression-group--container-condition--border-radius:var(--border--radius-medium, 12px);--snk-expression-group--container-option--width:85px;--snk-expression-group__container-condition--background-and:#66B6A0;--snk-expression-group__container-condition--background-or:#EBC65E;--snk-expression-group__container-expression--padding-left:26px;--snk-expression-group__background-color-dashed:var(--background--body, #fafcff);--ez-text-input__margin-bottom:0px}.snk-expression-group__container-condition.sc-snk-expression-group{width:var(--snk-expression-group--container-condition--width);height:var(--snk-expression-group--container-condition--height);border-radius:var(--snk-expression-group--container-condition--border-radius);z-index:var(--more-visible--2x, 3);padding:var(--space--nano, 2px)}.snk-expression-group__container-option.sc-snk-expression-group{width:var(--snk-expression-group--container-option--width)}.snk-expression-group__container-condition[data-condition=\"AND\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-and)}.snk-expression-group__container-condition[data-condition=\"OR\"].sc-snk-expression-group{background-color:var(--snk-expression-group__container-condition--background-or)}.snk-expression-group__container-expression.sc-snk-expression-group{padding-left:var(--snk-expression-group__container-expression--padding-left)}.dashes.sc-snk-expression-group{z-index:var(--visible, 1);background:var(--snk-expression-group__background-color-dashed);border-left:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:58px;margin-left:-15px;margin-top:-36.5px}.horizontal-dashes.sc-snk-expression-group{z-index:var(--more-visible, 2);border-bottom:2px dashed var(--text-secondary, #A2ABB9);position:absolute;width:15px;height:54px;margin-left:-15px;margin-top:-33.5px}.hidden.sc-snk-expression-group{display:none}";
|
|
15
16
|
|
|
@@ -22,7 +23,7 @@ const SnkExpressionGroup = class {
|
|
|
22
23
|
this.FIRST_LEVEL = "0";
|
|
23
24
|
this.LIMIT_GROUP_LEVEL = 4;
|
|
24
25
|
this.application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
25
|
-
this._conditionOperator =
|
|
26
|
+
this._conditionOperator = PersonalizedFilterUtils.FilterGroupCondition.AND;
|
|
26
27
|
this._group = undefined;
|
|
27
28
|
this._selfTop = 0;
|
|
28
29
|
this.canAddExpression = true;
|
|
@@ -77,7 +78,7 @@ const SnkExpressionGroup = class {
|
|
|
77
78
|
return this._selfTop - this.parentTop;
|
|
78
79
|
}
|
|
79
80
|
getOperand() {
|
|
80
|
-
return !this._group.operand ?
|
|
81
|
+
return !this._group.operand ? PersonalizedFilterUtils.FilterGroupCondition.AND : this._group.operand;
|
|
81
82
|
}
|
|
82
83
|
getMessage(key, params) {
|
|
83
84
|
return this.application.messagesBuilder.getMessage(key, params);
|
|
@@ -168,13 +169,13 @@ const SnkExpressionGroup = class {
|
|
|
168
169
|
}
|
|
169
170
|
],
|
|
170
171
|
childrenGroups: [],
|
|
171
|
-
operand:
|
|
172
|
+
operand: PersonalizedFilterUtils.FilterGroupCondition.AND
|
|
172
173
|
};
|
|
173
174
|
this._group.childrenGroups = (_a = this._group.childrenGroups) !== null && _a !== void 0 ? _a : [];
|
|
174
175
|
this._group.childrenGroups.push(newGroup);
|
|
175
176
|
index.forceUpdate(this);
|
|
176
177
|
if (!this.group.operand) {
|
|
177
|
-
this.group.operand =
|
|
178
|
+
this.group.operand = PersonalizedFilterUtils.FilterGroupCondition.AND;
|
|
178
179
|
}
|
|
179
180
|
this.ezFilterGroupChange.emit(this.group);
|
|
180
181
|
this.changeHandler();
|
|
@@ -187,7 +188,7 @@ const SnkExpressionGroup = class {
|
|
|
187
188
|
}
|
|
188
189
|
handleConditionOperatorChange(newOperator) {
|
|
189
190
|
this._conditionOperator = newOperator;
|
|
190
|
-
this._group.operand =
|
|
191
|
+
this._group.operand = PersonalizedFilterUtils.FilterGroupCondition[newOperator];
|
|
191
192
|
this.ezFilterGroupChange.emit(this._group);
|
|
192
193
|
}
|
|
193
194
|
confirmRemoveGroup(evt) {
|
|
@@ -204,10 +205,10 @@ const SnkExpressionGroup = class {
|
|
|
204
205
|
if (groupLevel === this.FIRST_LEVEL && this._group.items.length === 1) {
|
|
205
206
|
return this.getMessage("snkPersonalizedFilter.operador.firstLevel");
|
|
206
207
|
}
|
|
207
|
-
if (this._conditionOperator ===
|
|
208
|
+
if (this._conditionOperator === PersonalizedFilterUtils.FilterGroupCondition.AND) {
|
|
208
209
|
return this.getMessage("snkPersonalizedFilter.operador.and");
|
|
209
210
|
}
|
|
210
|
-
else if (this._conditionOperator ===
|
|
211
|
+
else if (this._conditionOperator === PersonalizedFilterUtils.FilterGroupCondition.OR) {
|
|
211
212
|
return this.getMessage("snkPersonalizedFilter.operador.or");
|
|
212
213
|
}
|
|
213
214
|
}
|
|
@@ -244,7 +245,7 @@ const SnkExpressionGroup = class {
|
|
|
244
245
|
}
|
|
245
246
|
render() {
|
|
246
247
|
const canAddGroup = this.canAddGroup();
|
|
247
|
-
return (index.h(index.Host, null, index.h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), index.h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), index.h("div", { class: 'ez-flex ez-flex--align-items-center' }, index.h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, index.h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), index.h("div", null, index.h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), index.h("option", { value:
|
|
248
|
+
return (index.h(index.Host, null, index.h("div", { class: !this.isFirstLevel() && this._showDashes ? 'dashes' : 'hidden', style: this.buildGroupStyle() }), index.h("div", { class: !this.isFirstLevel() && this._showDashes ? 'horizontal-dashes' : 'hidden' }), index.h("div", { class: 'ez-flex ez-flex--align-items-center' }, index.h("div", { class: 'snk-expression-group__container-condition ez-flex ez-flex-item--align-center ez-flex--align-items-center', "data-condition": this._conditionOperator, title: this.getTooltipMessageForOperator() }, index.h("label", { class: "ez-label ez-padding-right--medium ez-padding-left--medium ez-title--primary" }, this.getMessage("snkPersonalizedFilter.info.condition")), index.h("div", null, index.h("ez-combo-box", Object.assign({ class: "snk-expression-group__container-option", canShowError: false, mode: "slim", suppressEmptyOption: true, enabled: this.canChangeGroupCondition(), value: this._conditionOperator, onEzChange: (evt) => this.handleConditionOperatorChange(evt.detail.value) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `comboBoxConditions_level_${this.getDataGroupLevel()}` }), index.h("option", { value: PersonalizedFilterUtils.FilterGroupCondition.AND }, this.getMessage("snkPersonalizedFilter.info.conditionAnd")), index.h("option", { value: PersonalizedFilterUtils.FilterGroupCondition.OR }, this.getMessage("snkPersonalizedFilter.info.conditionOr"))))), index.h("ez-button", { class: "ez-padding-right--medium ez-padding-left--medium", mode: "icon", iconName: "plus", size: "small", enabled: this.canAddExpression, title: this.getMessageAddTooltip(), onClick: () => this.handleAddExpression() }), index.h("ez-button", { label: this.getMessage("snkPersonalizedFilter.info.addGroup"), size: "small", enabled: canAddGroup, title: !canAddGroup ? this.getMessage('snkPersonalizedFilter.info.labelDisabledAddGroupButton', { LIMIT_GROUP_LEVEL: this.LIMIT_GROUP_LEVEL + 1 }) : '', onClick: () => this.handleAddGroup() }, index.h("ez-icon", { class: "ez-padding-right--small", slot: "leftIcon", iconName: "plus" })), !this.isFirstLevel() && index.h("ez-button", { title: this.getMessage("snkPersonalizedFilter.info.labelDeleteExpression"), class: "ez-padding-left--medium", mode: "icon", iconName: "delete", size: "small", onClick: (evt) => this.confirmRemoveGroup(evt) })), index.h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, index.h("div", { class: "ez-padding-top--small" }, this.renderExpressionItems())), index.h("div", { class: "ez-padding-top--small snk-expression-group__container-expression" }, index.h("div", { class: "ez-padding-top--small" }, this.renderGroups()))));
|
|
248
249
|
}
|
|
249
250
|
get _element() { return index.getElement(this); }
|
|
250
251
|
static get watchers() { return {
|
|
@@ -253,6 +254,12 @@ const SnkExpressionGroup = class {
|
|
|
253
254
|
};
|
|
254
255
|
SnkExpressionGroup.style = snkExpressionGroupCss;
|
|
255
256
|
|
|
257
|
+
var SelectedItemType;
|
|
258
|
+
(function (SelectedItemType) {
|
|
259
|
+
SelectedItemType["LINK"] = "LINK";
|
|
260
|
+
SelectedItemType["FIELD"] = "FIELD";
|
|
261
|
+
})(SelectedItemType || (SelectedItemType = {}));
|
|
262
|
+
|
|
256
263
|
const defaultsOperand = [
|
|
257
264
|
{ label: "snkPersonalizedFilter.operands.equal", value: "EQUAL" },
|
|
258
265
|
{ label: "snkPersonalizedFilter.operands.different", value: "DIFFERENT" },
|
|
@@ -306,9 +313,9 @@ const SnkExpressionItem = class {
|
|
|
306
313
|
}
|
|
307
314
|
}
|
|
308
315
|
componentWillLoad() {
|
|
309
|
-
this._dataSourceFetcher = index$
|
|
310
|
-
index$
|
|
311
|
-
this._dataSourceFetcher = index$
|
|
316
|
+
this._dataSourceFetcher = index$1.store.get(`filterFieldsDataSource.${this.entityURI}`);
|
|
317
|
+
index$1.store.onChange(`filterFieldsDataSource.${this.entityURI}`, () => {
|
|
318
|
+
this._dataSourceFetcher = index$1.store.get(`filterFieldsDataSource.${this.entityURI}`);
|
|
312
319
|
});
|
|
313
320
|
if (this.expression) {
|
|
314
321
|
this.updateFieldSelected();
|
|
@@ -329,7 +336,7 @@ const SnkExpressionItem = class {
|
|
|
329
336
|
onlyDate: false,
|
|
330
337
|
path: this.expression.description,
|
|
331
338
|
properties: this.expressionPropsToFieldProps(this.expression.props),
|
|
332
|
-
type:
|
|
339
|
+
type: SelectedItemType.FIELD,
|
|
333
340
|
uri: "",
|
|
334
341
|
userInterface: this.expression.userInterface
|
|
335
342
|
};
|
|
@@ -395,7 +402,7 @@ const SnkExpressionItem = class {
|
|
|
395
402
|
this._elFilterInput.value = filterField.path;
|
|
396
403
|
return;
|
|
397
404
|
}
|
|
398
|
-
if (filterField.type ===
|
|
405
|
+
if (filterField.type === SelectedItemType.FIELD) {
|
|
399
406
|
const field = filterField;
|
|
400
407
|
this._fieldSelected = field;
|
|
401
408
|
this.setValueExpression("fieldName", field);
|
|
@@ -446,8 +453,8 @@ const SnkExpressionItem = class {
|
|
|
446
453
|
this.setValueExpression("operand", optionSelected);
|
|
447
454
|
}
|
|
448
455
|
checkOptionIsNull(optionSelected) {
|
|
449
|
-
const filterOperandValue =
|
|
450
|
-
if ([
|
|
456
|
+
const filterOperandValue = PersonalizedFilterUtils.FilterOperand[optionSelected];
|
|
457
|
+
if ([PersonalizedFilterUtils.FilterOperand.NULL, PersonalizedFilterUtils.FilterOperand.NOT_NULL].includes(filterOperandValue)) {
|
|
451
458
|
this._optionNotNull = true;
|
|
452
459
|
if (this._elFieldDynamic) {
|
|
453
460
|
this._elFieldDynamic.enabled = false;
|
|
@@ -544,5 +551,401 @@ const SnkExpressionItem = class {
|
|
|
544
551
|
};
|
|
545
552
|
SnkExpressionItem.style = snkExpressionItemCss;
|
|
546
553
|
|
|
554
|
+
const ICON_MODES = {
|
|
555
|
+
[core.UserInterface.SHORTTEXT]: 'text',
|
|
556
|
+
[core.UserInterface.LONGTEXT]: 'text',
|
|
557
|
+
[core.UserInterface.INTEGERNUMBER]: 'number',
|
|
558
|
+
[core.UserInterface.DECIMALNUMBER]: 'number',
|
|
559
|
+
[core.UserInterface.DATE]: 'calendar',
|
|
560
|
+
[core.UserInterface.DATETIME]: 'calendar',
|
|
561
|
+
[core.UserInterface.SWITCH]: 'boolean',
|
|
562
|
+
[core.UserInterface.CHECKBOX]: 'check-circle-inverted',
|
|
563
|
+
[core.UserInterface.OPTIONSELECTOR]: 'list',
|
|
564
|
+
[core.UserInterface.SEARCH]: 'search',
|
|
565
|
+
[core.UserInterface.HTML]: 'tag_code',
|
|
566
|
+
[core.UserInterface.IMAGE]: 'png',
|
|
567
|
+
[core.UserInterface.FILE]: 'edit-file',
|
|
568
|
+
[core.UserInterface.TIME]: 'timer-outline',
|
|
569
|
+
[core.UserInterface.ELAPSEDTIME]: 'timer',
|
|
570
|
+
[core.UserInterface.MASKEDTEXT]: 'text',
|
|
571
|
+
[core.UserInterface.PASSWORD]: 'email',
|
|
572
|
+
};
|
|
573
|
+
const ListItem = ({ userInterface, description }) => {
|
|
574
|
+
return (index.h("ez-icon", { iconName: ICON_MODES[userInterface], class: "ez-padding-left--small", title: description }));
|
|
575
|
+
};
|
|
576
|
+
|
|
577
|
+
const snkFilterFieldSearchCss = ".sc-snk-filter-field-search-h{--snk-filter-field-search--container-width:468px;--snk-filter-field-search--container-height:322px}.snk-filter-field-search__container.sc-snk-filter-field-search{display:flex;flex-direction:column;padding:var(--space--medium);width:var(--snk-filter-field-search--container-width);height:var(--snk-filter-field-search--container-height)}.snk-filter-field-search__section.sc-snk-filter-field-search{display:grid;grid-template-columns:1fr 1fr;place-items:flex-start;overflow:hidden;gap:var(--space--small)}.snk-filter-field-search__input.sc-snk-filter-field-search{margin-bottom:var(--space--medium)}.snk-filter-field-search__list_container.sc-snk-filter-field-search{display:flex;flex-direction:column}.snk-filter-field-search__list.sc-snk-filter-field-search{overflow-y:auto}";
|
|
578
|
+
|
|
579
|
+
const SNK_CONTEXT_KEY = "__SNK__APPLICATION__";
|
|
580
|
+
const ENTITY_NAME_PATTERN = /\w+:\/\/(\w+)/;
|
|
581
|
+
const SnkFilterFieldSearch = class {
|
|
582
|
+
constructor(hostRef) {
|
|
583
|
+
index.registerInstance(this, hostRef);
|
|
584
|
+
this.ezSelectFilterItem = index.createEvent(this, "ezSelectFilterItem", 7);
|
|
585
|
+
this._currentMetadata = null;
|
|
586
|
+
this._filterText = "";
|
|
587
|
+
this._isLoading = false;
|
|
588
|
+
this.searchable = true;
|
|
589
|
+
this.fieldsDataSource = undefined;
|
|
590
|
+
this.breadcrumbItems = [];
|
|
591
|
+
this.linkItems = [];
|
|
592
|
+
this.fieldItems = [];
|
|
593
|
+
this.searchEmpty = false;
|
|
594
|
+
this.groupEmpty = false;
|
|
595
|
+
}
|
|
596
|
+
/**
|
|
597
|
+
* /**
|
|
598
|
+
* Realiza a abertura do componente abaixo do elemento HTML informado
|
|
599
|
+
* e faz a primeira carga de dados.
|
|
600
|
+
*
|
|
601
|
+
* @param {HTMLElement} element - Elemento HTML onde o snk-filter-field-search irá se posicionar abaixo.
|
|
602
|
+
* @param {IEzPopoverAnchorOptions} options - opções para regular o posicionamento do componente.
|
|
603
|
+
*/
|
|
604
|
+
async show(element, options) {
|
|
605
|
+
var _a;
|
|
606
|
+
if (element) {
|
|
607
|
+
(_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.showUnder(element, options);
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
this._ezPopover.show();
|
|
611
|
+
}
|
|
612
|
+
return this.loadData();
|
|
613
|
+
}
|
|
614
|
+
/**
|
|
615
|
+
* Filtra a fonte de dados do componente.
|
|
616
|
+
* @param {string} filterText - Texto para filtrar a fonte de dados.
|
|
617
|
+
* @throws {Error} - Quando o componente estiver com a propriedade searchable como true.
|
|
618
|
+
*/
|
|
619
|
+
async applyFilter(filterText) {
|
|
620
|
+
if (this.searchable)
|
|
621
|
+
throw new Error('This method is not available when searchable is true');
|
|
622
|
+
this.handleFilterChange(filterText);
|
|
623
|
+
}
|
|
624
|
+
async loadData() {
|
|
625
|
+
var _a, _b;
|
|
626
|
+
this._isLoading = true;
|
|
627
|
+
let metadata = await this.fieldsDataSource.fetchData(this._currentLink);
|
|
628
|
+
this._currentLink = metadata.currentLink;
|
|
629
|
+
const { fields, links } = metadata || {};
|
|
630
|
+
if (!Array.isArray(fields) || !Array.isArray(links))
|
|
631
|
+
throw new Error('Invalid metadata');
|
|
632
|
+
this._currentMetadata = metadata;
|
|
633
|
+
this.mapDataSourceToLinkItems();
|
|
634
|
+
this.mapDataSourceToFieldItems();
|
|
635
|
+
this._isLoading = false;
|
|
636
|
+
(_a = this._ezFieldList) === null || _a === void 0 ? void 0 : _a.scrollToTop();
|
|
637
|
+
(_b = this._ezLinkList) === null || _b === void 0 ? void 0 : _b.scrollToTop();
|
|
638
|
+
}
|
|
639
|
+
mapDataSourceToLinkItems() {
|
|
640
|
+
var _a;
|
|
641
|
+
const { links } = this._currentMetadata;
|
|
642
|
+
const filterLinkLabelMessage = this.getMessage('snkFilterFieldSearch.linkLabel', { link: (_a = this._currentLink) === null || _a === void 0 ? void 0 : _a.description });
|
|
643
|
+
const items = links.map(link => (Object.assign({ label: link.description }, link)));
|
|
644
|
+
this.groupEmpty = Boolean(items.length === 0);
|
|
645
|
+
this.linkItems = [{
|
|
646
|
+
group: filterLinkLabelMessage,
|
|
647
|
+
items,
|
|
648
|
+
}];
|
|
649
|
+
if (this.breadcrumbItems.length === 0) {
|
|
650
|
+
this.breadcrumbItems = [Object.assign({ id: core.JSUtils.generateUUID(), label: this._currentLink.description }, this._currentLink)];
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
mapDataSourceToFieldItems() {
|
|
654
|
+
var _a;
|
|
655
|
+
const fields = this._currentMetadata.fields;
|
|
656
|
+
const filterFieldLabelMessage = this.getMessage('snkFilterFieldSearch.fieldLabel', { link: (_a = this._currentLink) === null || _a === void 0 ? void 0 : _a.description });
|
|
657
|
+
const filteredFields = fields.filter(field => {
|
|
658
|
+
if (!this._currentLink)
|
|
659
|
+
return true;
|
|
660
|
+
const searchableByDescription = field.description.toLowerCase().includes(this._filterText.toLowerCase());
|
|
661
|
+
const searchableByName = field.name.toLowerCase().includes(this._filterText.toLowerCase());
|
|
662
|
+
return searchableByDescription || searchableByName;
|
|
663
|
+
});
|
|
664
|
+
const items = filteredFields.map(field => (Object.assign({ label: field.description }, field)));
|
|
665
|
+
this.searchEmpty = Boolean(this._filterText && items.length === 0);
|
|
666
|
+
this.fieldItems = [{
|
|
667
|
+
group: filterFieldLabelMessage,
|
|
668
|
+
items
|
|
669
|
+
}];
|
|
670
|
+
}
|
|
671
|
+
handleFilterChange(filterText) {
|
|
672
|
+
if (this._isLoading)
|
|
673
|
+
return;
|
|
674
|
+
this._filterText = filterText;
|
|
675
|
+
this.mapDataSourceToFieldItems();
|
|
676
|
+
}
|
|
677
|
+
handleSelectLink({ detail: item }) {
|
|
678
|
+
if (this._isLoading)
|
|
679
|
+
return;
|
|
680
|
+
const breadcrumbByIndex = this.breadcrumbItems.findIndex(breadcrumbItem => breadcrumbItem.id === item.id);
|
|
681
|
+
if (breadcrumbByIndex > -1) {
|
|
682
|
+
this.breadcrumbItems = this.breadcrumbItems.slice(0, (breadcrumbByIndex + 1));
|
|
683
|
+
}
|
|
684
|
+
else {
|
|
685
|
+
this.breadcrumbItems = [...this.breadcrumbItems, Object.assign({ id: core.JSUtils.generateUUID(), label: item.description }, item)];
|
|
686
|
+
}
|
|
687
|
+
const selectedItem = Object.assign(Object.assign({}, item), { type: SelectedItemType.LINK });
|
|
688
|
+
this._currentLink = selectedItem;
|
|
689
|
+
this.ezSelectFilterItem.emit(selectedItem);
|
|
690
|
+
this.loadData();
|
|
691
|
+
}
|
|
692
|
+
getEntityFromBreadCrumbItem(item) {
|
|
693
|
+
const result = ENTITY_NAME_PATTERN.exec(item.uri);
|
|
694
|
+
if (!result) {
|
|
695
|
+
return undefined;
|
|
696
|
+
}
|
|
697
|
+
return result[1];
|
|
698
|
+
}
|
|
699
|
+
handleSelectField({ detail: item }) {
|
|
700
|
+
var _a;
|
|
701
|
+
const breadcrumbPath = this.breadcrumbItems.map(breadcrumbItem => breadcrumbItem.label).join('>>');
|
|
702
|
+
const selectedField = Object.assign(Object.assign({}, item), { type: SelectedItemType.FIELD, entityPath: this.breadcrumbItems.map(item => this.getEntityFromBreadCrumbItem(item)).filter(item => item != undefined), path: `${breadcrumbPath} >> ${item.description}` });
|
|
703
|
+
this.ezSelectFilterItem.emit(selectedField);
|
|
704
|
+
(_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.hide();
|
|
705
|
+
}
|
|
706
|
+
getElementID(sufix) {
|
|
707
|
+
return {
|
|
708
|
+
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(sufix)
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
713
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
714
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
715
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-field-search.msg.ts"
|
|
716
|
+
*/
|
|
717
|
+
getMessage(key, params) {
|
|
718
|
+
var _a, _b, _c;
|
|
719
|
+
if (!this._application)
|
|
720
|
+
this._application = core.ApplicationContext.getContextValue(SNK_CONTEXT_KEY);
|
|
721
|
+
return (_c = (_b = (_a = this._application) === null || _a === void 0 ? void 0 : _a.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage) === null || _c === void 0 ? void 0 : _c.call(_b, key, params);
|
|
722
|
+
}
|
|
723
|
+
;
|
|
724
|
+
componentWillLoad() {
|
|
725
|
+
this._application = core.ApplicationContext.getContextValue(SNK_CONTEXT_KEY);
|
|
726
|
+
}
|
|
727
|
+
componentDidLoad() {
|
|
728
|
+
core.ElementIDUtils.addIDInfoIfNotExists(this._ezPopover, 'popover');
|
|
729
|
+
}
|
|
730
|
+
disconnectedCallback() {
|
|
731
|
+
var _a;
|
|
732
|
+
(_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.hide();
|
|
733
|
+
}
|
|
734
|
+
render() {
|
|
735
|
+
var _a;
|
|
736
|
+
const searchLabelMessage = this.getMessage('snkFilterFieldSearch.searchLabel');
|
|
737
|
+
return (index.h("ez-popover", Object.assign({ ref: (el) => this._ezPopover = el, role: "dialog", overlayType: "none", "aria-hidden": !((_a = this._ezPopover) === null || _a === void 0 ? void 0 : _a.opened) }, this.getElementID('EzPopover')), index.h("div", { class: "snk-filter-field-search__container" }, index.h("header", { class: "snk-filter-field-search__header" }, this.searchable && !!searchLabelMessage && (index.h("ez-filter-input", Object.assign({ class: "snk-filter-field-search__input", label: searchLabelMessage, asyncSearch: true, canShowError: false, onEzSearching: (event) => this.handleFilterChange.bind(this)(event.detail), "aria-label": searchLabelMessage, "aria-required": "false", "aria-invalid": "false" }, this.getElementID('EzFilterInput')))), this.breadcrumbItems.length > 0 && (index.h("ez-breadcrumb", Object.assign({ items: this.breadcrumbItems, onSelectedItem: this.handleSelectLink.bind(this), role: "navigation", "aria-current": "step" }, this.getElementID('EzBreadcrumb')))), index.h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" })), index.h("section", { class: `snk-filter-field-search__section ${(this.groupEmpty && this.searchEmpty) && " ez-margin--auto"}` }, this.groupEmpty ?
|
|
738
|
+
index.h("div", { class: "ez-margin--auto" }, index.h("span", { class: "ez-text ez-text--secondary ez-text--medium" }, this.getMessage('snkFilterFieldSearch.groupEmpty')))
|
|
739
|
+
:
|
|
740
|
+
index.h("ez-list", Object.assign({ ref: (el) => this._ezLinkList = el, class: "snk-filter-field-search__list", id: "filterLinkList", useGroups: true, dataSource: this.linkItems, onEzSelectItem: this.handleSelectLink.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: listItem => index.h("ez-badge", { label: listItem.fieldCount }), "aria-describedby": "filterLinkLabel" }, this.getElementID('EzListLinks'))), this.searchEmpty ?
|
|
741
|
+
index.h("div", { class: "ez-margin--auto" }, index.h("span", { class: "ez-text ez-text--secondary ez-text--medium" }, this.getMessage('snkFilterFieldSearch.searchEmpty')))
|
|
742
|
+
:
|
|
743
|
+
index.h("ez-list", Object.assign({ ref: (el) => this._ezFieldList = el, class: "snk-filter-field-search__list", id: "filterFieldList", useGroups: true, dataSource: this.fieldItems, onEzSelectItem: this.handleSelectField.bind(this), hoverFeedback: true, ezSelectable: true, itemSlotBuilder: ListItem, "aria-describedby": "filterFieldLabel" }, this.getElementID('EzListFields')))))));
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
SnkFilterFieldSearch.style = snkFilterFieldSearchCss;
|
|
747
|
+
|
|
748
|
+
const snkFilterParamConfigCss = ":host{--snk-filter-param-config__expression--color:var(--title--primary, #2b3a54);display:flex;position:relative}.snk-filter-param-config__expression{--text-area__input--disabled--color:var(--snk-filter-param-config__expression--color)}";
|
|
749
|
+
|
|
750
|
+
const SnkFilterParamConfig = class {
|
|
751
|
+
constructor(hostRef) {
|
|
752
|
+
index.registerInstance(this, hostRef);
|
|
753
|
+
this._opened = false;
|
|
754
|
+
this._configType = PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG;
|
|
755
|
+
this._expressionItem = undefined;
|
|
756
|
+
this._informedInstance = false;
|
|
757
|
+
this._canSave = false;
|
|
758
|
+
this.messagesBuilder = undefined;
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* Abre o modal de configuração de valor variável
|
|
762
|
+
*/
|
|
763
|
+
open(expressionItem) {
|
|
764
|
+
this._opened = true;
|
|
765
|
+
this._expressionItem = expressionItem;
|
|
766
|
+
this.loadValues();
|
|
767
|
+
return new Promise(accept => {
|
|
768
|
+
this._promiseResolver = accept;
|
|
769
|
+
});
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* Fecha o modal de configuração de valor variável
|
|
773
|
+
*/
|
|
774
|
+
close() {
|
|
775
|
+
this._opened = false;
|
|
776
|
+
return new Promise(accept => {
|
|
777
|
+
this._promiseResolver = accept;
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
782
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
783
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
784
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-filter-param-config.msg.ts"
|
|
785
|
+
*/
|
|
786
|
+
getMessage(key, params) {
|
|
787
|
+
var _a;
|
|
788
|
+
return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage(key, params);
|
|
789
|
+
}
|
|
790
|
+
getConfigValue(configName, inputName, inputAlias = "") {
|
|
791
|
+
var _a, _b, _c;
|
|
792
|
+
return ((_b = (_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a[configName]) === null || _b === void 0 ? void 0 : _b[inputName])
|
|
793
|
+
|| ((_c = this._expressionItem) === null || _c === void 0 ? void 0 : _c[inputAlias || inputName]);
|
|
794
|
+
}
|
|
795
|
+
loadValues() {
|
|
796
|
+
var _a;
|
|
797
|
+
const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
|
|
798
|
+
const fieldName = this.getConfigValue("systemConfig", "fieldName");
|
|
799
|
+
const description = this.getConfigValue("userConfig", "description");
|
|
800
|
+
const type = this.getConfigValue("userConfig", "type");
|
|
801
|
+
if (((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.userConfig) != undefined) {
|
|
802
|
+
this._configType = PersonalizedFilterUtils.FilterConfigType.USER_CONFIG;
|
|
803
|
+
}
|
|
804
|
+
else {
|
|
805
|
+
this._configType = PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG;
|
|
806
|
+
}
|
|
807
|
+
if (!core.StringUtils.isEmpty(entityName) && !core.StringUtils.isEmpty(fieldName)) {
|
|
808
|
+
this._instanceElement.value = { value: entityName, label: "" };
|
|
809
|
+
this._fieldElement.value = { value: fieldName, label: "" };
|
|
810
|
+
}
|
|
811
|
+
if (!core.StringUtils.isEmpty(description) && !core.StringUtils.isEmpty(type)) {
|
|
812
|
+
this._descriptionElement.value = description;
|
|
813
|
+
this._typeElement.value = type;
|
|
814
|
+
}
|
|
815
|
+
this.buildFilterExpression();
|
|
816
|
+
}
|
|
817
|
+
changeDefinitionUsed(option) {
|
|
818
|
+
this._configType = option !== null && option !== void 0 ? option : PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG;
|
|
819
|
+
if (this._configType === PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG) {
|
|
820
|
+
const entityName = this.getConfigValue("systemConfig", "entity", "entityName");
|
|
821
|
+
const fieldName = this.getConfigValue("systemConfig", "fieldName");
|
|
822
|
+
this._instanceElement.value = this._instanceElement.value || { value: entityName, label: "" };
|
|
823
|
+
this._fieldElement.value = this._fieldElement.value || { value: fieldName, label: "" };
|
|
824
|
+
}
|
|
825
|
+
else if (this._configType === PersonalizedFilterUtils.FilterConfigType.USER_CONFIG) {
|
|
826
|
+
const description = this.getConfigValue("userConfig", "description");
|
|
827
|
+
const type = this.getConfigValue("userConfig", "type");
|
|
828
|
+
this._descriptionElement.value = this._descriptionElement.value || description;
|
|
829
|
+
this._typeElement.value = this._typeElement.value || type;
|
|
830
|
+
}
|
|
831
|
+
this.buildFilterExpression();
|
|
832
|
+
}
|
|
833
|
+
getTypeValue() {
|
|
834
|
+
var _a;
|
|
835
|
+
const value = (_a = this._typeElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
836
|
+
return ((value === null || value === void 0 ? void 0 : value.value) || value);
|
|
837
|
+
}
|
|
838
|
+
getExpressionValues() {
|
|
839
|
+
var _a, _b, _c, _d, _e;
|
|
840
|
+
let systemConfig;
|
|
841
|
+
let userConfig;
|
|
842
|
+
if (this._configType === PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG) {
|
|
843
|
+
const entity = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
|
|
844
|
+
const fieldName = (_d = (_c = this._fieldElement) === null || _c === void 0 ? void 0 : _c.value) === null || _d === void 0 ? void 0 : _d.value;
|
|
845
|
+
systemConfig = { entity, fieldName };
|
|
846
|
+
}
|
|
847
|
+
else if (this._configType === PersonalizedFilterUtils.FilterConfigType.USER_CONFIG) {
|
|
848
|
+
const description = (_e = this._descriptionElement) === null || _e === void 0 ? void 0 : _e.value;
|
|
849
|
+
const type = this.getTypeValue();
|
|
850
|
+
userConfig = { description, type };
|
|
851
|
+
}
|
|
852
|
+
return Object.assign(Object.assign(Object.assign({}, this._expressionItem), { systemConfig }), { userConfig });
|
|
853
|
+
}
|
|
854
|
+
isEnabled(value) {
|
|
855
|
+
return this._configType === value;
|
|
856
|
+
}
|
|
857
|
+
isInformedInstance() {
|
|
858
|
+
var _a, _b;
|
|
859
|
+
return !core.StringUtils.isEmpty((_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value);
|
|
860
|
+
}
|
|
861
|
+
save() {
|
|
862
|
+
var _a;
|
|
863
|
+
this._expressionItem = Object.assign(Object.assign({}, this.getExpressionValues()), { expression: (_a = this._expressionElement) === null || _a === void 0 ? void 0 : _a.value });
|
|
864
|
+
this._promiseResolver(this._expressionItem);
|
|
865
|
+
this._opened = false;
|
|
866
|
+
}
|
|
867
|
+
buildFilterExpression() {
|
|
868
|
+
var _a;
|
|
869
|
+
this._informedInstance = this.isInformedInstance();
|
|
870
|
+
const expression = PersonalizedFilterUtils.PersonalizedFilterUtils.buildFilterExpression(this.getExpressionValues());
|
|
871
|
+
this._expressionElement.value = expression || ((_a = this._expressionItem) === null || _a === void 0 ? void 0 : _a.expression);
|
|
872
|
+
this._canSave = this.getCanSave();
|
|
873
|
+
}
|
|
874
|
+
handleChangeInstance() {
|
|
875
|
+
this._informedInstance = this.isInformedInstance();
|
|
876
|
+
if (this._fieldElement != undefined && !core.StringUtils.isEmpty(this._fieldElement.value)) {
|
|
877
|
+
this._fieldElement.value = null;
|
|
878
|
+
}
|
|
879
|
+
this.buildFilterExpression();
|
|
880
|
+
}
|
|
881
|
+
getInstanceCriteria() {
|
|
882
|
+
var _a, _b;
|
|
883
|
+
const value = (_b = (_a = this._instanceElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.value;
|
|
884
|
+
return {
|
|
885
|
+
expression: "this.NOMETAB = (SELECT NOMETAB FROM TDDINS WHERE NOMEINSTANCIA = ?)",
|
|
886
|
+
params: [
|
|
887
|
+
{
|
|
888
|
+
name: "NOMEINSTANCIA",
|
|
889
|
+
dataType: core.DataType.TEXT,
|
|
890
|
+
value
|
|
891
|
+
}
|
|
892
|
+
]
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
onSearch({ mode, argument }, entity) {
|
|
896
|
+
if (this._application == undefined || !this._opened) {
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
const isField = entity === PersonalizedFilterUtils.FilterEntities.FIELD;
|
|
900
|
+
const criteria = isField ? this.getInstanceCriteria() : undefined;
|
|
901
|
+
const messageKey = `snkFilterParamConfig.label${isField ? "Field" : "Instance"}`;
|
|
902
|
+
const entityDescription = this.getMessage(messageKey);
|
|
903
|
+
const searchOptions = {
|
|
904
|
+
descriptionFieldName: isField ? "DESCRCAMPO" : "DESCRINSTANCIA",
|
|
905
|
+
codeFieldName: isField ? "NOMECAMPO" : "NOMEINSTANCIA",
|
|
906
|
+
showInactives: false
|
|
907
|
+
};
|
|
908
|
+
const options = {
|
|
909
|
+
entity,
|
|
910
|
+
entityDescription,
|
|
911
|
+
criteria,
|
|
912
|
+
searchOptions
|
|
913
|
+
};
|
|
914
|
+
return new Promise((resolve) => {
|
|
915
|
+
this._application.executePreparedSearch(mode, argument, options).then(res => resolve(res));
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
getElementID(sufix) {
|
|
919
|
+
return {
|
|
920
|
+
[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: core.ElementIDUtils.getInternalIDInfo(sufix)
|
|
921
|
+
};
|
|
922
|
+
}
|
|
923
|
+
getCanSave() {
|
|
924
|
+
var _a;
|
|
925
|
+
if (this._configType === PersonalizedFilterUtils.FilterConfigType.USER_CONFIG) {
|
|
926
|
+
const description = (_a = this._descriptionElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
927
|
+
const type = this.getTypeValue();
|
|
928
|
+
return !core.StringUtils.isEmpty(description) && !core.StringUtils.isEmpty(type);
|
|
929
|
+
}
|
|
930
|
+
return true;
|
|
931
|
+
}
|
|
932
|
+
componentWillLoad() {
|
|
933
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
934
|
+
}
|
|
935
|
+
render() {
|
|
936
|
+
core.ElementIDUtils.addIDInfoIfNotExists(this._element, 'snkFilterParamConfig');
|
|
937
|
+
return (index.h("ez-popup", Object.assign({ useHeader: false, size: "small", heightMode: "auto", opened: this._opened }, this.getElementID("popup")), index.h("ez-modal-container", Object.assign({ onEzModalAction: (evt) => {
|
|
938
|
+
if (evt.detail === ezModalContainer.ModalAction.CLOSE)
|
|
939
|
+
this.close();
|
|
940
|
+
}, modalTitle: this.getMessage("snkFilterParamConfig.modalTitle") }, this.getElementID("modalContainer")), index.h("div", { class: "ez-flex" }, index.h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, index.h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("systemConfigOption")), index.h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelSystemConfig"), value: PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG })), index.h("ez-search", Object.assign({ ref: (ref) => this._instanceElement = ref, label: this.getMessage("snkFilterParamConfig.labelInstance"), enabled: this.isEnabled(PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.handleChangeInstance(), optionLoader: (searchArgument) => this.onSearch(searchArgument, PersonalizedFilterUtils.FilterEntities.INSTANCE) }, this.getElementID("configFindEntity"))), index.h("ez-search", Object.assign({ ref: (ref) => this._fieldElement = ref, label: this.getMessage("snkFilterParamConfig.labelField"), enabled: this.isEnabled(PersonalizedFilterUtils.FilterConfigType.SYSTEM_CONFIG) && this._informedInstance, suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, onEzChange: () => this.buildFilterExpression(), optionLoader: (searchArgument) => this.onSearch(searchArgument, PersonalizedFilterUtils.FilterEntities.FIELD) }, this.getElementID("configFindField")))), index.h("div", { class: "ez-flex ez-padding--medium" }, index.h("hr", { class: "ez-divider-vertical" })), index.h("div", { class: "ez-col ez-col--sd-6 ez-flex--column" }, index.h("ez-radio-button", Object.assign({ value: this._configType, onEzChange: (evt) => this.changeDefinitionUsed(evt.detail) }, this.getElementID("userConfigOption")), index.h("ez-radio-button-option", { label: this.getMessage("snkFilterParamConfig.labelUserConfig"), value: PersonalizedFilterUtils.FilterConfigType.USER_CONFIG })), index.h("ez-text-input", Object.assign({ ref: (ref) => this._descriptionElement = ref, label: this.getMessage("snkFilterParamConfig.labelDescription"), enabled: this.isEnabled(PersonalizedFilterUtils.FilterConfigType.USER_CONFIG), onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamLabel"))), index.h("ez-combo-box", Object.assign({ ref: (ref) => this._typeElement = ref, label: this.getMessage("snkFilterParamConfig.labelType"), enabled: this.isEnabled(PersonalizedFilterUtils.FilterConfigType.USER_CONFIG), suppressEmptyOption: true, onEzChange: () => this.buildFilterExpression() }, this.getElementID("configParamType")), Object.keys(PersonalizedFilterUtils.FilterUserConfigTypes).map((configType) => {
|
|
941
|
+
return (index.h("option", { value: PersonalizedFilterUtils.FilterUserConfigTypes[configType] }, this.getMessage(`snkFilterParamConfig.labelTypeValues.${configType.toLowerCase()}`)));
|
|
942
|
+
})))), index.h("ez-text-area", Object.assign({ ref: (ref) => this._expressionElement = ref, class: "snk-filter-param-config__expression", label: this.getMessage("snkFilterParamConfig.labelExpression"), enabled: false }, this.getElementID("presentationExpression"))), index.h("div", { class: "ez-col ez-col--sd-12 ez-flex--justify-end ez-margin-vertical--small" }, index.h("ez-button", Object.assign({ class: "ez-padding-right--medium", label: this.getMessage("snkFilterParamConfig.labelCancel"), onClick: () => this.close() }, this.getElementID("cancelEditParam"))), index.h("ez-button", Object.assign({ class: "ez-button--primary", label: this.getMessage("snkFilterParamConfig.labelSave"), onClick: () => this.save(), enabled: this._canSave }, this.getElementID("saveEditParam")))))));
|
|
943
|
+
}
|
|
944
|
+
get _element() { return index.getElement(this); }
|
|
945
|
+
};
|
|
946
|
+
SnkFilterParamConfig.style = snkFilterParamConfigCss;
|
|
947
|
+
|
|
547
948
|
exports.snk_expression_group = SnkExpressionGroup;
|
|
548
949
|
exports.snk_expression_item = SnkExpressionItem;
|
|
950
|
+
exports.snk_filter_field_search = SnkFilterFieldSearch;
|
|
951
|
+
exports.snk_filter_param_config = SnkFilterParamConfig;
|