@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
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { UserInterface, DataType } from '@sankhyalabs/core';
|
|
2
|
+
import { a as TAB_NAMES, G as GROUP_NAMES, D as DEFAULT_TYPE } from './constants-7b422de0.js';
|
|
3
|
+
|
|
4
|
+
const iconMap = new Map([
|
|
5
|
+
[UserInterface.DATE, 'calendar'],
|
|
6
|
+
[UserInterface.DATETIME, 'calendar-clock'],
|
|
7
|
+
[UserInterface.ELAPSEDTIME, 'timer-outline'],
|
|
8
|
+
[UserInterface.TIME, 'timer-outline'],
|
|
9
|
+
[UserInterface.DECIMALNUMBER, 'number'],
|
|
10
|
+
[UserInterface.INTEGERNUMBER, 'number'],
|
|
11
|
+
[UserInterface.FILE, 'zip'],
|
|
12
|
+
[UserInterface.IMAGE, 'pdf'],
|
|
13
|
+
[UserInterface.HTML, 'tag_code'],
|
|
14
|
+
[UserInterface.SEARCH, 'search'],
|
|
15
|
+
[UserInterface.SEARCHPLUS, 'search'],
|
|
16
|
+
[UserInterface.OPTIONSELECTOR, 'list'],
|
|
17
|
+
[UserInterface.CHECKBOX, 'list'],
|
|
18
|
+
[UserInterface.SWITCH, 'boolean'],
|
|
19
|
+
[UserInterface.PASSWORD, 'eye-off'],
|
|
20
|
+
]);
|
|
21
|
+
const ID_AVAILABLE_FIELDS = 'container-available-fields';
|
|
22
|
+
var SORTABLE_PATH;
|
|
23
|
+
(function (SORTABLE_PATH) {
|
|
24
|
+
SORTABLE_PATH["FROM"] = "from";
|
|
25
|
+
SORTABLE_PATH["TO"] = "to";
|
|
26
|
+
})(SORTABLE_PATH || (SORTABLE_PATH = {}));
|
|
27
|
+
function getFieldsStructure(evt, path, group, tab) {
|
|
28
|
+
var _a;
|
|
29
|
+
const htmlStructure = (_a = evt === null || evt === void 0 ? void 0 : evt[path]) === null || _a === void 0 ? void 0 : _a.children;
|
|
30
|
+
if (!htmlStructure)
|
|
31
|
+
return [];
|
|
32
|
+
return Array.from(htmlStructure).map(({ fieldConfig }) => {
|
|
33
|
+
return Object.assign(Object.assign({}, fieldConfig), { group, tab });
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function updateTabInFieldsFromGroupList(guideGroups, updatedName) {
|
|
37
|
+
return guideGroups.map(group => {
|
|
38
|
+
return Object.assign(Object.assign({}, group), { fields: group.fields.map(field => (Object.assign(Object.assign({}, field), { tab: updatedName }))) });
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function getValidatedFieldValue(fieldValue, dataUnit, fieldName) {
|
|
42
|
+
var _a;
|
|
43
|
+
if (fieldValue == undefined || !dataUnit || !fieldName)
|
|
44
|
+
return;
|
|
45
|
+
const dataType = (_a = dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType;
|
|
46
|
+
if (dataType == undefined)
|
|
47
|
+
return;
|
|
48
|
+
if ((fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.waitmessage) !== undefined)
|
|
49
|
+
return undefined;
|
|
50
|
+
const isNonObjectValue = dataType !== DataType.OBJECT &&
|
|
51
|
+
dataType !== DataType.DATE &&
|
|
52
|
+
typeof fieldValue === 'object';
|
|
53
|
+
const processedValue = isNonObjectValue ? fieldValue.value : fieldValue;
|
|
54
|
+
return dataType === DataType.OBJECT
|
|
55
|
+
? JSON.stringify(processedValue)
|
|
56
|
+
: processedValue;
|
|
57
|
+
}
|
|
58
|
+
function getEnabledByProperty(attribName, propertyName, fieldDescriptor) {
|
|
59
|
+
if (!fieldDescriptor)
|
|
60
|
+
return true;
|
|
61
|
+
const fieldProperties = fieldDescriptor.properties || {};
|
|
62
|
+
const fromAttribName = fieldDescriptor[attribName] !== true;
|
|
63
|
+
return fieldProperties.hasOwnProperty(propertyName)
|
|
64
|
+
? fieldProperties[propertyName] !== 'S'
|
|
65
|
+
: fromAttribName;
|
|
66
|
+
}
|
|
67
|
+
function getValueByProperty(property, fieldDescriptor, defaultValue) {
|
|
68
|
+
if (fieldDescriptor && fieldDescriptor[property] === true) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
return defaultValue;
|
|
72
|
+
}
|
|
73
|
+
function getIconName(userInterface) {
|
|
74
|
+
return iconMap.get(userInterface) || 'text';
|
|
75
|
+
}
|
|
76
|
+
function buildNewGuideName(guidesList, getMessage) {
|
|
77
|
+
var _a, _b;
|
|
78
|
+
const newGuideText = getMessage('snkFormConfig.form.newGuide');
|
|
79
|
+
const qtdWithNewGuideName = (_b = (_a = guidesList.filter(g => g.name.includes(newGuideText))) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
80
|
+
return qtdWithNewGuideName === 0 ? newGuideText : `${newGuideText} (${qtdWithNewGuideName})`;
|
|
81
|
+
}
|
|
82
|
+
function getFieldsToSave(guidesMap) {
|
|
83
|
+
const fieldsToSave = [];
|
|
84
|
+
guidesMap.forEach((groups, guideName) => {
|
|
85
|
+
groups.forEach(({ fields }) => {
|
|
86
|
+
fields === null || fields === void 0 ? void 0 : fields.forEach((fieldConfig) => {
|
|
87
|
+
fieldsToSave.push(buildFieldToSave(Object.assign(Object.assign({}, fieldConfig), { tab: guideName })));
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
return fieldsToSave;
|
|
92
|
+
}
|
|
93
|
+
function buildGuidesMap(rawFields, tabs, dataUnit, generalTab) {
|
|
94
|
+
const fields = handleFieldsTabNames(rawFields, dataUnit, generalTab);
|
|
95
|
+
const guidesMap = initGuidesMap(tabs);
|
|
96
|
+
if (!(fields === null || fields === void 0 ? void 0 : fields.length))
|
|
97
|
+
return guidesMap;
|
|
98
|
+
for (let guideName of guidesMap.keys()) {
|
|
99
|
+
const fieldsFromGuide = getFieldsFromGuide(fields, guideName, generalTab);
|
|
100
|
+
const fieldsByGroupMap = getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTab);
|
|
101
|
+
const groupsList = parserGroupMapIntoList(fieldsByGroupMap);
|
|
102
|
+
guidesMap.set(guideName, groupsList);
|
|
103
|
+
}
|
|
104
|
+
return guidesMap;
|
|
105
|
+
}
|
|
106
|
+
function buildGuides(config, mainArea, dataUnit, generalTabName = TAB_NAMES.general) {
|
|
107
|
+
const normalizedFields = handleFieldsTabNames(config === null || config === void 0 ? void 0 : config.fields, dataUnit, generalTabName);
|
|
108
|
+
let tabs = config.tabs ? [...config.tabs] : buildTabsFromFields(normalizedFields);
|
|
109
|
+
tabs = getPossibleGuides(tabs);
|
|
110
|
+
tabs = initializeTabsNames(tabs);
|
|
111
|
+
const guides = handleMainTab(tabs, mainArea);
|
|
112
|
+
return ensureFieldResolvedGuides(guides, normalizedFields);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Garante que exista uma guia para cada aba referenciada pelos campos (após a resolução feita
|
|
116
|
+
* em resolveFieldTab). É necessário porque a "Geral" não é uma UITabName e, portanto, pode não
|
|
117
|
+
* estar presente em config.tabs (que pode inclusive vir como array vazio); sem esta garantia os
|
|
118
|
+
* campos "Geral" seriam descartados. A área principal (__main) é tratada por handleMainTab e
|
|
119
|
+
* ignorada aqui. Guias já existentes (por nome ou rótulo) não são duplicadas.
|
|
120
|
+
*/
|
|
121
|
+
function ensureFieldResolvedGuides(tabs, normalizedFields) {
|
|
122
|
+
const result = [...tabs];
|
|
123
|
+
let nextOrder = result.length;
|
|
124
|
+
const seen = new Set();
|
|
125
|
+
(normalizedFields !== null && normalizedFields !== void 0 ? normalizedFields : []).forEach(field => {
|
|
126
|
+
const tabName = field.tab;
|
|
127
|
+
if (!tabName || tabName === TAB_NAMES.main || seen.has(tabName)) {
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
seen.add(tabName);
|
|
131
|
+
const alreadyExists = result.some(guide => guide.name === tabName || guide.label === tabName);
|
|
132
|
+
if (alreadyExists) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
result.push({ name: tabName, label: tabName, visible: true, order: nextOrder++ });
|
|
136
|
+
});
|
|
137
|
+
return result;
|
|
138
|
+
}
|
|
139
|
+
function buildChildrenGuides(dataUnit, initialOrderIndex = 0, guidesList) {
|
|
140
|
+
var _a;
|
|
141
|
+
if (!dataUnit || !dataUnit.metadata) {
|
|
142
|
+
return [];
|
|
143
|
+
}
|
|
144
|
+
const children = ((_a = dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.children) || [];
|
|
145
|
+
const childrenWithNoGuide = [];
|
|
146
|
+
for (const child of children) {
|
|
147
|
+
const guideOnConfig = guidesList.find(guide => child.label === guide.label);
|
|
148
|
+
if (guideOnConfig) {
|
|
149
|
+
guideOnConfig.isCustom = true;
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
childrenWithNoGuide.push({
|
|
153
|
+
label: child.label,
|
|
154
|
+
name: child.name,
|
|
155
|
+
visible: true,
|
|
156
|
+
isCustom: true,
|
|
157
|
+
order: initialOrderIndex++
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return childrenWithNoGuide;
|
|
161
|
+
}
|
|
162
|
+
function buildCustomGuides(customGuidesList, guidesList) {
|
|
163
|
+
let initialOrderIndex = guidesList.length;
|
|
164
|
+
const customGuidesToAdd = getCustomGuidesNotIncludedInList(customGuidesList, guidesList);
|
|
165
|
+
return customGuidesToAdd.map(guide => {
|
|
166
|
+
return {
|
|
167
|
+
name: guide.id,
|
|
168
|
+
label: guide.label,
|
|
169
|
+
visible: true,
|
|
170
|
+
isCustom: true,
|
|
171
|
+
order: initialOrderIndex++
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
function isCustomGuideIncludedInList(guidesList, guide) {
|
|
176
|
+
return guidesList.some(fromList => fromList.name === guide.id || fromList.label === guide.label);
|
|
177
|
+
}
|
|
178
|
+
function getCustomGuidesNotIncludedInList(customGuidesList, guidesList) {
|
|
179
|
+
return customGuidesList.filter(guide => !isCustomGuideIncludedInList(guidesList, guide));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Define a aba efetiva de um campo seguindo as MESMAS regras do formulário renderizado
|
|
183
|
+
* (ezui buildFormMetadata/handleFields):
|
|
184
|
+
* - Campo com aba explícita mantém a aba.
|
|
185
|
+
* - Campo sem aba que seja chave primária vai para a área principal (__main).
|
|
186
|
+
* - Demais campos sem aba vão para a aba "Geral" (aba secundária), e não para a área principal.
|
|
187
|
+
*
|
|
188
|
+
* Usa-se o literal TAB_NAMES.general ("Geral"), e não a mensagem traduzida, para manter o
|
|
189
|
+
* configurador em sintonia com o ezui (que utiliza o literal "Geral") em qualquer idioma.
|
|
190
|
+
*/
|
|
191
|
+
function resolveFieldTab(field, dataUnit, generalTabName) {
|
|
192
|
+
var _a, _b;
|
|
193
|
+
if (field.tab) {
|
|
194
|
+
return getTabName(field.tab, generalTabName);
|
|
195
|
+
}
|
|
196
|
+
const isPrimaryKey = !!((_b = (_a = dataUnit === null || dataUnit === void 0 ? void 0 : dataUnit.getField(field.name)) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.isPrimaryKey);
|
|
197
|
+
return isPrimaryKey ? TAB_NAMES.main : generalTabName;
|
|
198
|
+
}
|
|
199
|
+
function handleFieldsTabNames(allFields, dataUnit, generalTabName = TAB_NAMES.general) {
|
|
200
|
+
return (allFields !== null && allFields !== void 0 ? allFields : []).map(field => (Object.assign(Object.assign({}, field), { tab: resolveFieldTab(field, dataUnit, generalTabName) })));
|
|
201
|
+
}
|
|
202
|
+
function initializeTabsNames(tabs) {
|
|
203
|
+
return tabs.map((tab) => {
|
|
204
|
+
return Object.assign(Object.assign({}, tab), { name: tab.name ? tab.name : tab.label });
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
function handleMainTab(tabs, mainTabName) {
|
|
208
|
+
const mainTab = { name: TAB_NAMES.main, label: mainTabName, visible: true };
|
|
209
|
+
const hasTabMain = tabs.some((tab) => tab.name === TAB_NAMES.main);
|
|
210
|
+
if (hasTabMain) {
|
|
211
|
+
tabs = tabs.map(tab => tab.name === TAB_NAMES.main ? mainTab : tab);
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
tabs.unshift(mainTab);
|
|
215
|
+
}
|
|
216
|
+
return tabs;
|
|
217
|
+
}
|
|
218
|
+
function getPossibleGuides(tabs) {
|
|
219
|
+
return [...tabs];
|
|
220
|
+
}
|
|
221
|
+
function initGuidesMap(tabs) {
|
|
222
|
+
const map = new Map();
|
|
223
|
+
let possibleGuides = getPossibleGuides(tabs);
|
|
224
|
+
possibleGuides.forEach(tab => {
|
|
225
|
+
map.set(tab.name, []);
|
|
226
|
+
});
|
|
227
|
+
return map;
|
|
228
|
+
}
|
|
229
|
+
function handleFieldLabel(field, fieldDescriptor) {
|
|
230
|
+
if (!field.label) {
|
|
231
|
+
field.label = fieldDescriptor.label;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
function handleFieldTab(field, generalTabName) {
|
|
235
|
+
if (!field.tab) {
|
|
236
|
+
field.tab = generalTabName;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function handleFieldGroup(field) {
|
|
240
|
+
if (!field.group) {
|
|
241
|
+
field.group = GROUP_NAMES.noGroup;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function isVisibleOnConfig(fieldDescriptor) {
|
|
245
|
+
var _a;
|
|
246
|
+
/**
|
|
247
|
+
* Quando um campo é ocultado pelo dev, mas queremos manter ele na config precisamos fazer essa tratativa.
|
|
248
|
+
*/
|
|
249
|
+
return ((_a = fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.properties) === null || _a === void 0 ? void 0 : _a.visibleOnConfig) === true && (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) === false;
|
|
250
|
+
}
|
|
251
|
+
function getGroupsFromGuide(fieldsFromGuide, dataUnit, generalTabName) {
|
|
252
|
+
const groupsMap = new Map();
|
|
253
|
+
groupsMap.set(GROUP_NAMES.noGroup, []);
|
|
254
|
+
for (let field of fieldsFromGuide) {
|
|
255
|
+
const fieldDescriptor = dataUnit.getField(field.name);
|
|
256
|
+
if (!(fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.visible) && !isVisibleOnConfig(fieldDescriptor))
|
|
257
|
+
continue;
|
|
258
|
+
handleFieldLabel(field, fieldDescriptor);
|
|
259
|
+
handleFieldTab(field, generalTabName);
|
|
260
|
+
handleFieldGroup(field);
|
|
261
|
+
if (groupsMap.has(field.group)) {
|
|
262
|
+
groupsMap.get(field.group).push(field);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
groupsMap.set(field.group, [field]);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
return groupsMap;
|
|
269
|
+
}
|
|
270
|
+
function getFieldsFromGuide(fields, guideName, generalTabName) {
|
|
271
|
+
return fields.filter(field => {
|
|
272
|
+
const fieldTab = getTabName(field.tab, generalTabName);
|
|
273
|
+
return fieldTab === guideName;
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
function getTabName(tab, generalTabName) {
|
|
277
|
+
var _a;
|
|
278
|
+
if (typeof tab === 'string')
|
|
279
|
+
return tab;
|
|
280
|
+
return (_a = tab === null || tab === void 0 ? void 0 : tab.label) !== null && _a !== void 0 ? _a : generalTabName;
|
|
281
|
+
}
|
|
282
|
+
function parserGroupMapIntoList(groupsMap) {
|
|
283
|
+
const groupsList = [];
|
|
284
|
+
for (let groupName of groupsMap.keys()) {
|
|
285
|
+
groupsList.push({ name: groupName, fields: groupsMap.get(groupName) });
|
|
286
|
+
}
|
|
287
|
+
return groupsList;
|
|
288
|
+
}
|
|
289
|
+
function canAddTab(tab, guideList) {
|
|
290
|
+
return tab && !(guideList.map(g => g.name).includes(tab));
|
|
291
|
+
}
|
|
292
|
+
function buildTabsFromFields(fields) {
|
|
293
|
+
const guideList = [];
|
|
294
|
+
let order = 1;
|
|
295
|
+
fields === null || fields === void 0 ? void 0 : fields.forEach((field) => {
|
|
296
|
+
const tab = field.tab;
|
|
297
|
+
if (canAddTab(tab, guideList)) {
|
|
298
|
+
guideList.push({ name: tab, label: tab, visible: true, order });
|
|
299
|
+
order = order + 1;
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
return guideList;
|
|
303
|
+
}
|
|
304
|
+
function buildFieldToSave(fieldConfig) {
|
|
305
|
+
const fieldToSave = {
|
|
306
|
+
cleanOnCopy: fieldConfig.cleanOnCopy || false,
|
|
307
|
+
group: fieldConfig.group === GROUP_NAMES.noGroup ? undefined : fieldConfig.group,
|
|
308
|
+
label: fieldConfig.label,
|
|
309
|
+
name: fieldConfig.name,
|
|
310
|
+
required: fieldConfig.required,
|
|
311
|
+
readOnly: fieldConfig.readOnly,
|
|
312
|
+
tab: fieldConfig.tab,
|
|
313
|
+
};
|
|
314
|
+
if (fieldConfig.defaultValue != undefined) {
|
|
315
|
+
if (fieldConfig.defaultValue.type == undefined) {
|
|
316
|
+
fieldToSave.defaultValue = {
|
|
317
|
+
type: DEFAULT_TYPE.fixed,
|
|
318
|
+
value: fieldConfig.defaultValue,
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
fieldToSave.defaultValue = fieldConfig.defaultValue;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return fieldToSave;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export { ID_AVAILABLE_FIELDS as I, SORTABLE_PATH as S, buildChildrenGuides as a, buildGuides as b, buildCustomGuides as c, buildGuidesMap as d, buildNewGuideName as e, getFieldsStructure as f, getFieldsToSave as g, getValidatedFieldValue as h, getEnabledByProperty as i, getValueByProperty as j, getIconName as k, updateTabInFieldsFromGroupList as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserInterface, DataType, ApplicationContext, ErrorException } from '@sankhyalabs/core';
|
|
2
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
|
2
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-5ed0a377.js';
|
|
3
3
|
|
|
4
4
|
function buildGridMetadata(rawValue) {
|
|
5
5
|
const fieldsMetadata = buildFieldsMetadata(rawValue.fieldsMetadata);
|
package/dist/esm/{PersonalizedFilterUtils-d2439a9a.js → PersonalizedFilterUtils-45b5803c.js}
RENAMED
|
@@ -1,6 +1,53 @@
|
|
|
1
1
|
import { DataType, NumberUtils, DateUtils, UserInterface } from '@sankhyalabs/core';
|
|
2
2
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
var FilterGroupCondition;
|
|
5
|
+
(function (FilterGroupCondition) {
|
|
6
|
+
FilterGroupCondition["AND"] = "AND";
|
|
7
|
+
FilterGroupCondition["OR"] = "OR";
|
|
8
|
+
})(FilterGroupCondition || (FilterGroupCondition = {}));
|
|
9
|
+
|
|
10
|
+
var FilterConfigType;
|
|
11
|
+
(function (FilterConfigType) {
|
|
12
|
+
FilterConfigType["SYSTEM_CONFIG"] = "S";
|
|
13
|
+
FilterConfigType["USER_CONFIG"] = "E";
|
|
14
|
+
})(FilterConfigType || (FilterConfigType = {}));
|
|
15
|
+
var FilterUserConfigTypes;
|
|
16
|
+
(function (FilterUserConfigTypes) {
|
|
17
|
+
FilterUserConfigTypes["DATE"] = "D";
|
|
18
|
+
FilterUserConfigTypes["HORA"] = "H";
|
|
19
|
+
FilterUserConfigTypes["TEXT"] = "S";
|
|
20
|
+
FilterUserConfigTypes["INTEGER"] = "I";
|
|
21
|
+
FilterUserConfigTypes["DECIMAL"] = "F";
|
|
22
|
+
FilterUserConfigTypes["NUMBER"] = "NUMBER";
|
|
23
|
+
})(FilterUserConfigTypes || (FilterUserConfigTypes = {}));
|
|
24
|
+
var FilterOperand;
|
|
25
|
+
(function (FilterOperand) {
|
|
26
|
+
FilterOperand["AND"] = "AND";
|
|
27
|
+
FilterOperand["OR"] = "OR";
|
|
28
|
+
FilterOperand["IN"] = "IN";
|
|
29
|
+
FilterOperand["DIFFERENT"] = "<>";
|
|
30
|
+
FilterOperand["LIKE"] = "LIKE";
|
|
31
|
+
FilterOperand["START_WITH"] = "LIKE_START";
|
|
32
|
+
FilterOperand["FINISHED_WITH"] = "LIKE_END";
|
|
33
|
+
FilterOperand["NULL"] = "NULL";
|
|
34
|
+
FilterOperand["NOT_NULL"] = "NOT NULL";
|
|
35
|
+
FilterOperand["EQUAL"] = "=";
|
|
36
|
+
FilterOperand["LARGER"] = ">";
|
|
37
|
+
FilterOperand["LARGER_EQUAL"] = ">=";
|
|
38
|
+
FilterOperand["SMALLER"] = "<";
|
|
39
|
+
FilterOperand["SMALLER_EQUAL"] = "<=";
|
|
40
|
+
})(FilterOperand || (FilterOperand = {}));
|
|
41
|
+
var FilterEntities;
|
|
42
|
+
(function (FilterEntities) {
|
|
43
|
+
FilterEntities["FIELD"] = "Campo";
|
|
44
|
+
FilterEntities["INSTANCE"] = "Instancia";
|
|
45
|
+
})(FilterEntities || (FilterEntities = {}));
|
|
46
|
+
var DefaultFilter;
|
|
47
|
+
(function (DefaultFilter) {
|
|
48
|
+
DefaultFilter["name"] = "Filtro padr\u00E3o";
|
|
49
|
+
DefaultFilter["id"] = "DEFAULT_FILTER";
|
|
50
|
+
})(DefaultFilter || (DefaultFilter = {}));
|
|
4
51
|
|
|
5
52
|
class PersonalizedFilterUtils {
|
|
6
53
|
/**
|
|
@@ -235,4 +282,4 @@ class PersonalizedFilterUtils {
|
|
|
235
282
|
}
|
|
236
283
|
}
|
|
237
284
|
|
|
238
|
-
export { PersonalizedFilterUtils as P };
|
|
285
|
+
export { DefaultFilter as D, FilterOperand as F, PersonalizedFilterUtils as P, FilterGroupCondition as a, FilterConfigType as b, FilterEntities as c, FilterUserConfigTypes as d };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ObjectUtils, StringUtils } from '@sankhyalabs/core';
|
|
2
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
|
3
|
-
import { F as FormConfigFetcher } from './form-config-fetcher-
|
|
2
|
+
import { C as ConfigStorage } from './ConfigStorage-e834d1ea.js';
|
|
3
|
+
import { F as FormConfigFetcher } from './form-config-fetcher-db1bf140.js';
|
|
4
4
|
import { a as TAB_NAMES } from './constants-7b422de0.js';
|
|
5
5
|
|
|
6
6
|
class SnkFormConfigManager {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { D as DataFetcher } from './DataFetcher-
|
|
2
|
-
import './ISave-
|
|
1
|
+
import { D as DataFetcher } from './DataFetcher-5ed0a377.js';
|
|
2
|
+
import './ISave-5b46d691.js';
|
|
3
3
|
import { SortMode, ApplicationContext, ObjectUtils, StringUtils, NumberUtils, DataType, UserInterface as UserInterface$1, DateUtils } from '@sankhyalabs/core';
|
|
4
4
|
import { D as DataExporterOption } from './index-b40568ff.js';
|
|
5
5
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
6
6
|
import { UserInterface } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
7
|
-
import { P as PreloadManager } from './dataunit-fetcher-
|
|
7
|
+
import { P as PreloadManager } from './dataunit-fetcher-3b1ca96e.js';
|
|
8
8
|
import './filter-item-type.enum-d45e026f.js';
|
|
9
|
-
import './form-config-fetcher-
|
|
9
|
+
import './form-config-fetcher-db1bf140.js';
|
|
10
10
|
import './constants-7b422de0.js';
|
|
11
11
|
import { g as getSelectedRecordsIDsInfo } from './GetSelectedRecordsIDsInfo-9fa41508.js';
|
|
12
12
|
import { I as IExportType } from './IFetchDataExporterParams-d73bed3d.js';
|
|
@@ -162,41 +162,35 @@ class CommonsExporter {
|
|
|
162
162
|
return this.columnsState;
|
|
163
163
|
}
|
|
164
164
|
async buildColumnsMetadata(gridColumns) {
|
|
165
|
-
var _a
|
|
165
|
+
var _a;
|
|
166
166
|
const columnsMetadata = [];
|
|
167
|
+
const searchPlusDescriptionIds = this.collectSearchPlusDescriptionIds(gridColumns);
|
|
167
168
|
for (const column of gridColumns) {
|
|
169
|
+
if (this.isHiddenColumn(column)) {
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
168
172
|
/**
|
|
169
|
-
*
|
|
173
|
+
* A grid adiciona uma coluna auxiliar para a descrição de campos SEARCHPLUS
|
|
174
|
+
* (ex.: "ENTITYNAME.DESCRIPTIONFIELD"). A descrição já é emitida ao processar
|
|
175
|
+
* o próprio SEARCHPLUS, então pulamos a auxiliar para evitar duplicar a coluna.
|
|
170
176
|
*/
|
|
171
|
-
if (
|
|
177
|
+
if (searchPlusDescriptionIds.has(column.name)) {
|
|
172
178
|
continue;
|
|
173
179
|
}
|
|
174
180
|
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
175
181
|
const customFormatter = await this.grid.getCustomValueFormatter(column.name);
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
const labelColumn = isUserInterfaceSEARCH ? "Cód. " : column.label;
|
|
179
|
-
let descriptionColumn = undefined;
|
|
182
|
+
const isSearchField = this.isSearchUserInterface(fieldData);
|
|
183
|
+
const labelColumn = isSearchField ? "Cód. " : column.label;
|
|
180
184
|
let columnData = {
|
|
181
185
|
id: column.name,
|
|
182
186
|
label: labelColumn,
|
|
183
|
-
width:
|
|
187
|
+
width: isSearchField ? (labelColumn.length * this.DEFAULT_FONT_SIZE) : column.width,
|
|
184
188
|
type: fieldData === null || fieldData === void 0 ? void 0 : fieldData.dataType,
|
|
185
189
|
userInterface: fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface,
|
|
186
190
|
customFormatter
|
|
187
191
|
};
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
const mergedFrom = fieldData.properties.mergedFrom;
|
|
191
|
-
const descriptionField = `${fieldData.properties.ENTITYNAME}.${fieldData.properties.DESCRIPTIONFIELD}`;
|
|
192
|
-
descriptionColumn = {
|
|
193
|
-
id: `${mergedFrom ? (mergedFrom + ".") : ""}${descriptionField}`,
|
|
194
|
-
label: labelDescription,
|
|
195
|
-
width: isUserInterfaceSEARCH && labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
|
|
196
|
-
type: DataType.TEXT,
|
|
197
|
-
userInterface: UserInterface.LONGTEXT,
|
|
198
|
-
descriptionFrom: fieldData.name
|
|
199
|
-
};
|
|
192
|
+
let descriptionColumn = isSearchField ? this.buildDescriptionColumn(fieldData, column) : undefined;
|
|
193
|
+
if (descriptionColumn) {
|
|
200
194
|
const newWidth = this.getWidthByMetaData(column === null || column === void 0 ? void 0 : column.width, columnData === null || columnData === void 0 ? void 0 : columnData.width, descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.width);
|
|
201
195
|
columnData = Object.assign(Object.assign({}, columnData), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.codWidth });
|
|
202
196
|
descriptionColumn = Object.assign(Object.assign({}, descriptionColumn), { width: newWidth === null || newWidth === void 0 ? void 0 : newWidth.descWidth, label: (descriptionColumn === null || descriptionColumn === void 0 ? void 0 : descriptionColumn.label) || (column === null || column === void 0 ? void 0 : column.label) });
|
|
@@ -207,6 +201,59 @@ class CommonsExporter {
|
|
|
207
201
|
}
|
|
208
202
|
return columnsMetadata || [];
|
|
209
203
|
}
|
|
204
|
+
collectSearchPlusDescriptionIds(gridColumns) {
|
|
205
|
+
var _a;
|
|
206
|
+
const descriptionIds = new Set();
|
|
207
|
+
for (const column of gridColumns) {
|
|
208
|
+
if (this.isHiddenColumn(column)) {
|
|
209
|
+
continue;
|
|
210
|
+
}
|
|
211
|
+
const fieldData = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(column.name);
|
|
212
|
+
if (!this.isSearchUserInterface(fieldData)) {
|
|
213
|
+
continue;
|
|
214
|
+
}
|
|
215
|
+
const descriptionId = this.buildDescriptionColumnId(fieldData);
|
|
216
|
+
if (descriptionId) {
|
|
217
|
+
descriptionIds.add(descriptionId);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return descriptionIds;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* TODO: Analisar e criar uma melhor forma de tratar essa validação do "RECDESP".
|
|
224
|
+
*/
|
|
225
|
+
isHiddenColumn(column) {
|
|
226
|
+
return column.hidden && column.name !== "RECDESP";
|
|
227
|
+
}
|
|
228
|
+
isSearchUserInterface(fieldData) {
|
|
229
|
+
return (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface.SEARCH
|
|
230
|
+
|| (fieldData === null || fieldData === void 0 ? void 0 : fieldData.userInterface) === UserInterface.SEARCHPLUS;
|
|
231
|
+
}
|
|
232
|
+
buildDescriptionColumnId(fieldData) {
|
|
233
|
+
const properties = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties;
|
|
234
|
+
if ((properties === null || properties === void 0 ? void 0 : properties.DESCRIPTIONFIELD) == undefined) {
|
|
235
|
+
return undefined;
|
|
236
|
+
}
|
|
237
|
+
const descriptionField = `${properties.ENTITYNAME}.${properties.DESCRIPTIONFIELD}`;
|
|
238
|
+
return properties.mergedFrom ? `${properties.mergedFrom}.${descriptionField}` : descriptionField;
|
|
239
|
+
}
|
|
240
|
+
buildDescriptionColumn(fieldData, column) {
|
|
241
|
+
var _a;
|
|
242
|
+
const id = this.buildDescriptionColumnId(fieldData);
|
|
243
|
+
if (!id) {
|
|
244
|
+
return undefined;
|
|
245
|
+
}
|
|
246
|
+
const labelDescription = (_a = fieldData === null || fieldData === void 0 ? void 0 : fieldData.properties) === null || _a === void 0 ? void 0 : _a.DESCRIPTIONENTITY;
|
|
247
|
+
const widthColumnDefault = 60;
|
|
248
|
+
return {
|
|
249
|
+
id,
|
|
250
|
+
label: labelDescription,
|
|
251
|
+
width: labelDescription ? (labelDescription.length * this.DEFAULT_FONT_SIZE - widthColumnDefault) : column.width,
|
|
252
|
+
type: DataType.TEXT,
|
|
253
|
+
userInterface: UserInterface.LONGTEXT,
|
|
254
|
+
descriptionFrom: fieldData.name
|
|
255
|
+
};
|
|
256
|
+
}
|
|
210
257
|
getWidthByMetaData(maxWidth, widthCod, widthDescription) {
|
|
211
258
|
const totalCurrentWidth = widthCod + widthDescription;
|
|
212
259
|
const codPercentage = widthCod / totalCurrentWidth;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
2
|
-
import { R as ResourceFetcher } from './form-config-fetcher-
|
|
2
|
+
import { R as ResourceFetcher } from './form-config-fetcher-db1bf140.js';
|
|
3
3
|
|
|
4
4
|
class AuthFetcher extends ResourceFetcher {
|
|
5
5
|
getData(resourceID) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ObjectUtils, DataUnit, DataUnitInMemoryLoader, ApplicationContext, StringUtils, UserInterface, DataUnitStorage, DataType, ChangeOperation } from '@sankhyalabs/core';
|
|
2
|
-
import { D as DataFetcher, d as dist } from './DataFetcher-
|
|
2
|
+
import { D as DataFetcher, S as SnkMessageBuilder, d as dist } from './DataFetcher-5ed0a377.js';
|
|
3
3
|
import { DISTINCT_FILTER_NAME_PREFIX } from '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
4
4
|
import { DataUnitTransient } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
5
5
|
import { ColumnFilterManager } from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
|
6
6
|
import SortingUtils from '@sankhyalabs/core/dist/utils/SortingUtils';
|
|
7
7
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
8
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-1eb7a1af.js';
|
|
9
8
|
|
|
10
9
|
class ArrayRepository {
|
|
11
10
|
constructor(equalsFunction) {
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
var ActionDefaultFilter;
|
|
2
|
+
(function (ActionDefaultFilter) {
|
|
3
|
+
ActionDefaultFilter["EDIT"] = "edit";
|
|
4
|
+
ActionDefaultFilter["REMOVE"] = "remove";
|
|
5
|
+
ActionDefaultFilter["CREATE"] = "create";
|
|
6
|
+
})(ActionDefaultFilter || (ActionDefaultFilter = {}));
|
|
7
|
+
|
|
1
8
|
var FilterType;
|
|
2
9
|
(function (FilterType) {
|
|
3
10
|
FilterType["QUICK_FILTER"] = "QUICK_FILTER";
|
|
@@ -7,4 +14,4 @@ var FilterType;
|
|
|
7
14
|
})(FilterType || (FilterType = {}));
|
|
8
15
|
const FilterType$1 = FilterType;
|
|
9
16
|
|
|
10
|
-
export { FilterType$1 as F };
|
|
17
|
+
export { ActionDefaultFilter as A, FilterType$1 as F };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
|
1
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-5ed0a377.js';
|
|
2
2
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
class ResourceFetcher {
|
|
@@ -109,6 +109,22 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
|
109
109
|
}
|
|
110
110
|
}`);
|
|
111
111
|
}
|
|
112
|
+
getDistinctTabs(config) {
|
|
113
|
+
const fieldTabs = config.fields.map((field, index) => ({
|
|
114
|
+
label: field.tab,
|
|
115
|
+
name: field.tab,
|
|
116
|
+
order: index,
|
|
117
|
+
visible: true,
|
|
118
|
+
isDetail: false,
|
|
119
|
+
isCustom: false,
|
|
120
|
+
}));
|
|
121
|
+
return fieldTabs.reduce((total, item) => {
|
|
122
|
+
if (!total.some((tab) => tab.name === item.name)) {
|
|
123
|
+
return [...total, item];
|
|
124
|
+
}
|
|
125
|
+
return total;
|
|
126
|
+
}, []);
|
|
127
|
+
}
|
|
112
128
|
loadFormConfig(formName, resourceID) {
|
|
113
129
|
return new Promise((accept, reject) => {
|
|
114
130
|
Promise.all([
|
|
@@ -118,14 +134,16 @@ class FormConfigFetcher extends ResourceFetcher {
|
|
|
118
134
|
this.loadResource(this.getPath(resourceID, formName, "defaultValues"))
|
|
119
135
|
])
|
|
120
136
|
.then(([configAsString, formCardState, summary, defaultValues]) => {
|
|
137
|
+
var _a;
|
|
121
138
|
let config;
|
|
122
139
|
if (configAsString != undefined) {
|
|
123
140
|
config = Object.assign(Object.assign({}, JSON.parse(configAsString)), { emptyConfig: false });
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const allTabs = new Map(tabs.map(t => [t.label, t]));
|
|
127
|
-
fields === null || fields === void 0 ? void 0 : fields.forEach(f => { var _a; return f.tab = ((_a = allTabs.get(this.getTabName(f.tab))) === null || _a === void 0 ? void 0 : _a.label) || allTabs.get(this.getTabName(f.tab)); });
|
|
141
|
+
if (!config.tabs) {
|
|
142
|
+
config.tabs = (_a = this.getDistinctTabs(config)) !== null && _a !== void 0 ? _a : [];
|
|
128
143
|
}
|
|
144
|
+
const { tabs, fields } = config;
|
|
145
|
+
const allTabs = new Map(tabs.map(t => [t.label, t]));
|
|
146
|
+
fields === null || fields === void 0 ? void 0 : fields.forEach(f => { var _a; return f.tab = ((_a = allTabs.get(this.getTabName(f.tab))) === null || _a === void 0 ? void 0 : _a.label) || allTabs.get(this.getTabName(f.tab)); });
|
|
129
147
|
config.fields = fields === null || fields === void 0 ? void 0 : fields.map((field) => {
|
|
130
148
|
if ("readonly" in field) {
|
|
131
149
|
const readOnly = field['readonly'] === true;
|