@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
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { ObjectUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { h } from '@stencil/core';
|
|
4
|
+
export class SnkDynaformGuidesConfigurator {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.sortLogic = (a, b) => {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const orderA = (_a = a.order) !== null && _a !== void 0 ? _a : Number.MAX_VALUE;
|
|
9
|
+
const orderB = (_b = b.order) !== null && _b !== void 0 ? _b : Number.MAX_VALUE;
|
|
10
|
+
return orderA - orderB;
|
|
11
|
+
};
|
|
12
|
+
this.handleAddGuide = () => {
|
|
13
|
+
this.createNewGuide.emit();
|
|
14
|
+
};
|
|
15
|
+
this.mainGuide = undefined;
|
|
16
|
+
this.visibleGuides = [];
|
|
17
|
+
this.hiddenGuides = [];
|
|
18
|
+
this.guidesList = [];
|
|
19
|
+
this.selectedGuide = undefined;
|
|
20
|
+
this.mainGuideName = undefined;
|
|
21
|
+
this.messagesBuilder = undefined;
|
|
22
|
+
}
|
|
23
|
+
observeGuidesList(newGuides) {
|
|
24
|
+
this.initGuidesConfig(newGuides);
|
|
25
|
+
}
|
|
26
|
+
observeMainGuideName() {
|
|
27
|
+
this.initGuidesConfig(this.guidesList);
|
|
28
|
+
}
|
|
29
|
+
observeSelectedGuide(newGuide) {
|
|
30
|
+
this.guideSelected.emit(newGuide);
|
|
31
|
+
}
|
|
32
|
+
componentWillLoad() {
|
|
33
|
+
this.initGuidesConfig(this.guidesList);
|
|
34
|
+
}
|
|
35
|
+
getMessage(key, params) {
|
|
36
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
37
|
+
}
|
|
38
|
+
initGuidesConfig(newGuides) {
|
|
39
|
+
const mainName = this.mainGuideName;
|
|
40
|
+
const isMain = (guide) => !!mainName && guide.name === mainName;
|
|
41
|
+
const visibleAux = newGuides.filter(guide => guide.visible && !isMain(guide));
|
|
42
|
+
const hiddenAux = newGuides.filter(guide => !guide.visible && !isMain(guide));
|
|
43
|
+
this.visibleGuides = [...visibleAux].sort(this.sortLogic);
|
|
44
|
+
this.hiddenGuides = [...hiddenAux].sort(this.sortLogic);
|
|
45
|
+
this.mainGuide = newGuides.find(g => isMain(g));
|
|
46
|
+
}
|
|
47
|
+
handleSelectGuide(guide, evt) {
|
|
48
|
+
evt.stopPropagation();
|
|
49
|
+
this.selectedGuide = guide;
|
|
50
|
+
}
|
|
51
|
+
toggleGuideVisibility(guide, evt) {
|
|
52
|
+
evt.stopPropagation();
|
|
53
|
+
const updatedGuide = Object.assign(Object.assign({}, guide), { visible: !guide.visible });
|
|
54
|
+
let visibleAux;
|
|
55
|
+
let hiddenAux;
|
|
56
|
+
if (guide.visible) {
|
|
57
|
+
visibleAux = this.visibleGuides.filter(g => g.name !== guide.name);
|
|
58
|
+
hiddenAux = [...this.hiddenGuides, updatedGuide];
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
visibleAux = [...this.visibleGuides, updatedGuide];
|
|
62
|
+
hiddenAux = this.hiddenGuides.filter(g => g.name !== guide.name);
|
|
63
|
+
}
|
|
64
|
+
this.applyGuidesUpdate([...visibleAux, ...hiddenAux]);
|
|
65
|
+
}
|
|
66
|
+
adjustListOrder(guideList) {
|
|
67
|
+
return guideList.map((g, index) => (Object.assign(Object.assign({}, g), { order: index })));
|
|
68
|
+
}
|
|
69
|
+
applyGuidesUpdate(updatedGuideList) {
|
|
70
|
+
let newGuidesList = this.adjustListOrder(updatedGuideList);
|
|
71
|
+
if (this.mainGuide) {
|
|
72
|
+
newGuidesList = [this.mainGuide, ...newGuidesList];
|
|
73
|
+
}
|
|
74
|
+
if (!ObjectUtils.equals(newGuidesList, this.guidesList)) {
|
|
75
|
+
this.guideListChanged.emit(newGuidesList);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
async handleDeleteGuide(guide, e) {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
const title = this.getMessage('snkFormConfig.confirm.title');
|
|
81
|
+
const message = this.getMessage('snkFormConfig.confirm.deleteGuide').replace('{0}', guide.label);
|
|
82
|
+
const canRemove = await ApplicationUtils.confirm(title, message);
|
|
83
|
+
if (!canRemove)
|
|
84
|
+
return;
|
|
85
|
+
this.guideDeleted.emit(guide);
|
|
86
|
+
const deletedMessage = this.getMessage('snkFormConfig.info.successfullyGuideDeleted').replace('{0}', guide.label);
|
|
87
|
+
ApplicationUtils.info(deletedMessage);
|
|
88
|
+
}
|
|
89
|
+
buildTabs() {
|
|
90
|
+
return this.visibleGuides.map((guide, i) => ({
|
|
91
|
+
tabKey: guide.name,
|
|
92
|
+
label: guide.label,
|
|
93
|
+
index: i,
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
handleTabChange(tab) {
|
|
97
|
+
var _a;
|
|
98
|
+
if (!tab)
|
|
99
|
+
return;
|
|
100
|
+
const guide = this.guidesList.find(g => g.name === tab.tabKey);
|
|
101
|
+
if (guide && guide.name !== ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.name)) {
|
|
102
|
+
this.selectedGuide = guide;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
handleReorder(reorderedTabs) {
|
|
106
|
+
const visibleReordered = reorderedTabs
|
|
107
|
+
.map(t => this.visibleGuides.find(g => g.name === t.tabKey))
|
|
108
|
+
.filter(Boolean);
|
|
109
|
+
this.applyGuidesUpdate([...visibleReordered, ...this.hiddenGuides]);
|
|
110
|
+
}
|
|
111
|
+
renderTabActions() {
|
|
112
|
+
return this.visibleGuides.map((guide, i) => {
|
|
113
|
+
const slotIndex = i;
|
|
114
|
+
const isProtected = guide.isCustom || guide.isDetail;
|
|
115
|
+
return (h("div", { key: guide.name, slot: `tab${slotIndex}`, class: "tab-actions", onClick: (e) => e.stopPropagation() }, h("ez-button", { mode: "icon", class: "ez-button--tertiary tab-action-btn", size: "small", iconName: "eye-off", title: this.getMessage('snkFormConfig.guidesConfigurator.actions.hide'), onClick: (e) => this.toggleGuideVisibility(guide, e) }), h("ez-button", { mode: "icon", class: "ez-button--tertiary tab-action-btn", size: "small", iconName: "delete", isDisabled: isProtected, title: isProtected
|
|
116
|
+
? this.getMessage('snkFormConfig.guidesConfigurator.canNotDeleteCustomGuide')
|
|
117
|
+
: this.getMessage('snkFormConfig.guidesConfigurator.actions.delete'), onClick: (e) => this.handleDeleteGuide(guide, e) })));
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
renderHiddenGuidesBar() {
|
|
121
|
+
if (this.hiddenGuides.length === 0)
|
|
122
|
+
return null;
|
|
123
|
+
return (h("div", { class: "hidden-guides-bar" }, h("span", { class: "hidden-guides-label" }, this.getMessage('snkFormConfig.guidesConfigurator.hiddenGuides'), ":"), this.hiddenGuides.map(guide => {
|
|
124
|
+
const isProtected = guide.isCustom || guide.isDetail;
|
|
125
|
+
return (h("div", { key: guide.name, class: "hidden-guide-chip", title: guide.label }, h("span", { class: "chip-label", onClick: (e) => this.handleSelectGuide(guide, e) }, guide.label), h("ez-button", { mode: "icon", class: "ez-button--tertiary", size: "small", iconName: "eye", title: this.getMessage('snkFormConfig.guidesConfigurator.actions.show'), onClick: (e) => this.toggleGuideVisibility(guide, e) }), h("ez-button", { mode: "icon", class: "ez-button--tertiary", size: "small", iconName: "delete", isDisabled: isProtected, title: isProtected
|
|
126
|
+
? this.getMessage('snkFormConfig.guidesConfigurator.canNotDeleteCustomGuide')
|
|
127
|
+
: this.getMessage('snkFormConfig.guidesConfigurator.actions.delete'), onClick: (e) => this.handleDeleteGuide(guide, e) })));
|
|
128
|
+
})));
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
var _a;
|
|
132
|
+
const tabs = this.buildTabs();
|
|
133
|
+
return (h("div", { class: "guides-tab-configurator" }, h("div", { class: "tab-bar-row" }, h("ez-tabselector", { class: "guides-tabselector", tabs: tabs, selectedTab: (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.name, reorderable: true, onEzChange: (evt) => this.handleTabChange(evt.detail), onEzReorder: (evt) => this.handleReorder(evt.detail) }, this.renderTabActions()), h("ez-button", { label: this.getMessage('snkFormConfig.guidesConfigurator.createNewGuide'), variant: "secondary", size: "medium", leftIconName: "plus", onClick: this.handleAddGuide })), this.renderHiddenGuidesBar()));
|
|
134
|
+
}
|
|
135
|
+
static get is() { return "snk-dynaform-guides-configurator"; }
|
|
136
|
+
static get encapsulation() { return "scoped"; }
|
|
137
|
+
static get originalStyleUrls() {
|
|
138
|
+
return {
|
|
139
|
+
"$": ["snk-dynaform-guides-configurator.css"]
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
static get styleUrls() {
|
|
143
|
+
return {
|
|
144
|
+
"$": ["snk-dynaform-guides-configurator.css"]
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
static get properties() {
|
|
148
|
+
return {
|
|
149
|
+
"guidesList": {
|
|
150
|
+
"type": "unknown",
|
|
151
|
+
"mutable": false,
|
|
152
|
+
"complexType": {
|
|
153
|
+
"original": "IGuideConfig[]",
|
|
154
|
+
"resolved": "IGuideConfig[]",
|
|
155
|
+
"references": {
|
|
156
|
+
"IGuideConfig": {
|
|
157
|
+
"location": "import",
|
|
158
|
+
"path": "../FormConfigHelper"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"required": false,
|
|
163
|
+
"optional": false,
|
|
164
|
+
"docs": {
|
|
165
|
+
"tags": [],
|
|
166
|
+
"text": ""
|
|
167
|
+
},
|
|
168
|
+
"defaultValue": "[]"
|
|
169
|
+
},
|
|
170
|
+
"selectedGuide": {
|
|
171
|
+
"type": "unknown",
|
|
172
|
+
"mutable": false,
|
|
173
|
+
"complexType": {
|
|
174
|
+
"original": "IGuideConfig",
|
|
175
|
+
"resolved": "IGuideConfig",
|
|
176
|
+
"references": {
|
|
177
|
+
"IGuideConfig": {
|
|
178
|
+
"location": "import",
|
|
179
|
+
"path": "../FormConfigHelper"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"mainGuideName": {
|
|
191
|
+
"type": "string",
|
|
192
|
+
"mutable": false,
|
|
193
|
+
"complexType": {
|
|
194
|
+
"original": "string",
|
|
195
|
+
"resolved": "string",
|
|
196
|
+
"references": {}
|
|
197
|
+
},
|
|
198
|
+
"required": false,
|
|
199
|
+
"optional": true,
|
|
200
|
+
"docs": {
|
|
201
|
+
"tags": [],
|
|
202
|
+
"text": ""
|
|
203
|
+
},
|
|
204
|
+
"attribute": "main-guide-name",
|
|
205
|
+
"reflect": false
|
|
206
|
+
},
|
|
207
|
+
"messagesBuilder": {
|
|
208
|
+
"type": "unknown",
|
|
209
|
+
"mutable": true,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "SnkMessageBuilder",
|
|
212
|
+
"resolved": "SnkMessageBuilder",
|
|
213
|
+
"references": {
|
|
214
|
+
"SnkMessageBuilder": {
|
|
215
|
+
"location": "import",
|
|
216
|
+
"path": "../../../lib/message/SnkMessageBuilder"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": ""
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
static get states() {
|
|
230
|
+
return {
|
|
231
|
+
"mainGuide": {},
|
|
232
|
+
"visibleGuides": {},
|
|
233
|
+
"hiddenGuides": {}
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
static get events() {
|
|
237
|
+
return [{
|
|
238
|
+
"method": "guideSelected",
|
|
239
|
+
"name": "guideSelected",
|
|
240
|
+
"bubbles": true,
|
|
241
|
+
"cancelable": true,
|
|
242
|
+
"composed": true,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": ""
|
|
246
|
+
},
|
|
247
|
+
"complexType": {
|
|
248
|
+
"original": "IGuideConfig",
|
|
249
|
+
"resolved": "IGuideConfig",
|
|
250
|
+
"references": {
|
|
251
|
+
"IGuideConfig": {
|
|
252
|
+
"location": "import",
|
|
253
|
+
"path": "../FormConfigHelper"
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
"method": "guideListChanged",
|
|
259
|
+
"name": "guideListChanged",
|
|
260
|
+
"bubbles": true,
|
|
261
|
+
"cancelable": true,
|
|
262
|
+
"composed": true,
|
|
263
|
+
"docs": {
|
|
264
|
+
"tags": [],
|
|
265
|
+
"text": ""
|
|
266
|
+
},
|
|
267
|
+
"complexType": {
|
|
268
|
+
"original": "IGuideConfig[]",
|
|
269
|
+
"resolved": "IGuideConfig[]",
|
|
270
|
+
"references": {
|
|
271
|
+
"IGuideConfig": {
|
|
272
|
+
"location": "import",
|
|
273
|
+
"path": "../FormConfigHelper"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}, {
|
|
278
|
+
"method": "guideDeleted",
|
|
279
|
+
"name": "guideDeleted",
|
|
280
|
+
"bubbles": true,
|
|
281
|
+
"cancelable": true,
|
|
282
|
+
"composed": true,
|
|
283
|
+
"docs": {
|
|
284
|
+
"tags": [],
|
|
285
|
+
"text": ""
|
|
286
|
+
},
|
|
287
|
+
"complexType": {
|
|
288
|
+
"original": "IGuideConfig",
|
|
289
|
+
"resolved": "IGuideConfig",
|
|
290
|
+
"references": {
|
|
291
|
+
"IGuideConfig": {
|
|
292
|
+
"location": "import",
|
|
293
|
+
"path": "../FormConfigHelper"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}, {
|
|
298
|
+
"method": "createNewGuide",
|
|
299
|
+
"name": "createNewGuide",
|
|
300
|
+
"bubbles": true,
|
|
301
|
+
"cancelable": true,
|
|
302
|
+
"composed": true,
|
|
303
|
+
"docs": {
|
|
304
|
+
"tags": [],
|
|
305
|
+
"text": ""
|
|
306
|
+
},
|
|
307
|
+
"complexType": {
|
|
308
|
+
"original": "void",
|
|
309
|
+
"resolved": "void",
|
|
310
|
+
"references": {}
|
|
311
|
+
}
|
|
312
|
+
}];
|
|
313
|
+
}
|
|
314
|
+
static get watchers() {
|
|
315
|
+
return [{
|
|
316
|
+
"propName": "guidesList",
|
|
317
|
+
"methodName": "observeGuidesList"
|
|
318
|
+
}, {
|
|
319
|
+
"propName": "mainGuideName",
|
|
320
|
+
"methodName": "observeMainGuideName"
|
|
321
|
+
}, {
|
|
322
|
+
"propName": "selectedGuide",
|
|
323
|
+
"methodName": "observeSelectedGuide"
|
|
324
|
+
}];
|
|
325
|
+
}
|
|
326
|
+
}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
.snk-grid__container {
|
|
10
10
|
display: flex;
|
|
11
11
|
height: 100%;
|
|
12
|
-
width: calc(100% - var(--space--12, 12px));
|
|
13
12
|
margin: var(--snk-grid-margin);
|
|
14
13
|
outline: none;
|
|
15
14
|
border: 1px solid var(--color--strokes, #E1E2E5);
|
|
@@ -63,6 +62,9 @@
|
|
|
63
62
|
|
|
64
63
|
.snk-grid-container__footer {
|
|
65
64
|
background-color: var(--background--xlight, #FFF);
|
|
66
|
-
border-top: 1px solid var(--color--strokes, #E1E2E5);
|
|
67
65
|
border-radius: 0 0 var(--border--radius-medium) var(--border--radius-medium);
|
|
68
66
|
}
|
|
67
|
+
|
|
68
|
+
.snk-grid-container__footer:has(*) {
|
|
69
|
+
border-top: 1px solid var(--color--strokes, #E1E2E5);
|
|
70
|
+
}
|
|
@@ -170,7 +170,17 @@ export default class PreloadManager {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
static getCachedRecords(dataUnit) {
|
|
173
|
-
|
|
173
|
+
const records = PreloadManager.getRepository(dataUnit).getFromCache();
|
|
174
|
+
const request = dataUnit.getLastLoadRequest();
|
|
175
|
+
if (request == undefined) {
|
|
176
|
+
return records;
|
|
177
|
+
}
|
|
178
|
+
const columnFilters = ColumnFilterManager.getColumnFilters(request.filters, "");
|
|
179
|
+
const filterFunction = ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
|
180
|
+
if (filterFunction == undefined) {
|
|
181
|
+
return records;
|
|
182
|
+
}
|
|
183
|
+
return records.filter(filterFunction);
|
|
174
184
|
}
|
|
175
185
|
}
|
|
176
186
|
PreloadManager._repositories = new Map();
|
|
@@ -29,6 +29,22 @@ export class FormConfigFetcher extends ResourceFetcher {
|
|
|
29
29
|
}
|
|
30
30
|
}`);
|
|
31
31
|
}
|
|
32
|
+
getDistinctTabs(config) {
|
|
33
|
+
const fieldTabs = config.fields.map((field, index) => ({
|
|
34
|
+
label: field.tab,
|
|
35
|
+
name: field.tab,
|
|
36
|
+
order: index,
|
|
37
|
+
visible: true,
|
|
38
|
+
isDetail: false,
|
|
39
|
+
isCustom: false,
|
|
40
|
+
}));
|
|
41
|
+
return fieldTabs.reduce((total, item) => {
|
|
42
|
+
if (!total.some((tab) => tab.name === item.name)) {
|
|
43
|
+
return [...total, item];
|
|
44
|
+
}
|
|
45
|
+
return total;
|
|
46
|
+
}, []);
|
|
47
|
+
}
|
|
32
48
|
loadFormConfig(formName, resourceID) {
|
|
33
49
|
return new Promise((accept, reject) => {
|
|
34
50
|
Promise.all([
|
|
@@ -38,14 +54,16 @@ export class FormConfigFetcher extends ResourceFetcher {
|
|
|
38
54
|
this.loadResource(this.getPath(resourceID, formName, "defaultValues"))
|
|
39
55
|
])
|
|
40
56
|
.then(([configAsString, formCardState, summary, defaultValues]) => {
|
|
57
|
+
var _a;
|
|
41
58
|
let config;
|
|
42
59
|
if (configAsString != undefined) {
|
|
43
60
|
config = Object.assign(Object.assign({}, JSON.parse(configAsString)), { emptyConfig: false });
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const allTabs = new Map(tabs.map(t => [t.label, t]));
|
|
47
|
-
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)); });
|
|
61
|
+
if (!config.tabs) {
|
|
62
|
+
config.tabs = (_a = this.getDistinctTabs(config)) !== null && _a !== void 0 ? _a : [];
|
|
48
63
|
}
|
|
64
|
+
const { tabs, fields } = config;
|
|
65
|
+
const allTabs = new Map(tabs.map(t => [t.label, t]));
|
|
66
|
+
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)); });
|
|
49
67
|
config.fields = fields === null || fields === void 0 ? void 0 : fields.map((field) => {
|
|
50
68
|
if ("readonly" in field) {
|
|
51
69
|
const readOnly = field['readonly'] === true;
|
|
@@ -301,7 +301,17 @@ class PreloadManager {
|
|
|
301
301
|
});
|
|
302
302
|
}
|
|
303
303
|
static getCachedRecords(dataUnit) {
|
|
304
|
-
|
|
304
|
+
const records = PreloadManager.getRepository(dataUnit).getFromCache();
|
|
305
|
+
const request = dataUnit.getLastLoadRequest();
|
|
306
|
+
if (request == undefined) {
|
|
307
|
+
return records;
|
|
308
|
+
}
|
|
309
|
+
const columnFilters = ColumnFilterManager.getColumnFilters(request.filters, "");
|
|
310
|
+
const filterFunction = ColumnFilterManager.getFilterFunction(dataUnit, Array.from(columnFilters.values()));
|
|
311
|
+
if (filterFunction == undefined) {
|
|
312
|
+
return records;
|
|
313
|
+
}
|
|
314
|
+
return records.filter(filterFunction);
|
|
305
315
|
}
|
|
306
316
|
}
|
|
307
317
|
PreloadManager._repositories = new Map();
|
|
@@ -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;
|
|
@@ -21,6 +21,18 @@ export { SnkDataExporter as SnkDataExporter } from '../types/components/snk-data
|
|
|
21
21
|
export { SnkDataUnit as SnkDataUnit } from '../types/components/snk-data-unit/snk-data-unit';
|
|
22
22
|
export { SnkDefaultFilter as SnkDefaultFilter } from '../types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter';
|
|
23
23
|
export { SnkDetailView as SnkDetailView } from '../types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view';
|
|
24
|
+
export { SnkDynaform as SnkDynaform } from '../types/components/snk-dynaform/snk-dynaform';
|
|
25
|
+
export { SnkDynaformConfigHeader as SnkDynaformConfigHeader } from '../types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-config-header';
|
|
26
|
+
export { SnkDynaformConfigsButton as SnkDynaformConfigsButton } from '../types/components/snk-dynaform-form-config/snk-dynaform-config-header/snk-dynaform-configs-button/snk-dynaform-configs-button';
|
|
27
|
+
export { SnkDynaformDetailView as SnkDynaformDetailView } from '../types/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view';
|
|
28
|
+
export { SnkDynaformFieldConfig as SnkDynaformFieldConfig } from '../types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-config/snk-dynaform-field-config';
|
|
29
|
+
export { SnkDynaformFieldItem as SnkDynaformFieldItem } from '../types/components/snk-dynaform-form-config/snk-dynaform-field-item/snk-dynaform-field-item';
|
|
30
|
+
export { SnkDynaformFieldsLayout as SnkDynaformFieldsLayout } from '../types/components/snk-dynaform-form-config/snk-dynaform-fields-layout/snk-dynaform-fields-layout';
|
|
31
|
+
export { SnkDynaformFieldsSelector as SnkDynaformFieldsSelector } from '../types/components/snk-dynaform-form-config/snk-dynaform-fields-selector/snk-dynaform-fields-selector';
|
|
32
|
+
export { SnkDynaformFormConfig as SnkDynaformFormConfig } from '../types/components/snk-dynaform-form-config/snk-dynaform-form-config';
|
|
33
|
+
export { SnkDynaformFormView as SnkDynaformFormView } from '../types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view';
|
|
34
|
+
export { SnkDynaformGuidesConfigurator as SnkDynaformGuidesConfigurator } from '../types/components/snk-dynaform-form-config/snk-dynaform-guides-configurator/snk-dynaform-guides-configurator';
|
|
35
|
+
export { SnkDynaformGuidesViewer as SnkDynaformGuidesView } from '../types/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view';
|
|
24
36
|
export { SnkEntityList as SnkEntityList } from '../types/components/snk-entity-list/snk-entity-list';
|
|
25
37
|
export { SnkEntitySearch as SnkEntitySearch } from '../types/components/snk-crud/subcomponents/snk-entity-search';
|
|
26
38
|
export { SnkExporterEmailSender as SnkExporterEmailSender } from '../types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender';
|
package/dist/components/index.js
CHANGED
|
@@ -21,6 +21,18 @@ export { SnkDataExporter, defineCustomElement as defineCustomElementSnkDataExpor
|
|
|
21
21
|
export { SnkDataUnit, defineCustomElement as defineCustomElementSnkDataUnit } from './snk-data-unit.js';
|
|
22
22
|
export { SnkDefaultFilter, defineCustomElement as defineCustomElementSnkDefaultFilter } from './snk-default-filter.js';
|
|
23
23
|
export { SnkDetailView, defineCustomElement as defineCustomElementSnkDetailView } from './snk-detail-view.js';
|
|
24
|
+
export { SnkDynaform, defineCustomElement as defineCustomElementSnkDynaform } from './snk-dynaform.js';
|
|
25
|
+
export { SnkDynaformConfigHeader, defineCustomElement as defineCustomElementSnkDynaformConfigHeader } from './snk-dynaform-config-header.js';
|
|
26
|
+
export { SnkDynaformConfigsButton, defineCustomElement as defineCustomElementSnkDynaformConfigsButton } from './snk-dynaform-configs-button.js';
|
|
27
|
+
export { SnkDynaformDetailView, defineCustomElement as defineCustomElementSnkDynaformDetailView } from './snk-dynaform-detail-view.js';
|
|
28
|
+
export { SnkDynaformFieldConfig, defineCustomElement as defineCustomElementSnkDynaformFieldConfig } from './snk-dynaform-field-config.js';
|
|
29
|
+
export { SnkDynaformFieldItem, defineCustomElement as defineCustomElementSnkDynaformFieldItem } from './snk-dynaform-field-item.js';
|
|
30
|
+
export { SnkDynaformFieldsLayout, defineCustomElement as defineCustomElementSnkDynaformFieldsLayout } from './snk-dynaform-fields-layout.js';
|
|
31
|
+
export { SnkDynaformFieldsSelector, defineCustomElement as defineCustomElementSnkDynaformFieldsSelector } from './snk-dynaform-fields-selector.js';
|
|
32
|
+
export { SnkDynaformFormConfig, defineCustomElement as defineCustomElementSnkDynaformFormConfig } from './snk-dynaform-form-config.js';
|
|
33
|
+
export { SnkDynaformFormView, defineCustomElement as defineCustomElementSnkDynaformFormView } from './snk-dynaform-form-view.js';
|
|
34
|
+
export { SnkDynaformGuidesConfigurator, defineCustomElement as defineCustomElementSnkDynaformGuidesConfigurator } from './snk-dynaform-guides-configurator.js';
|
|
35
|
+
export { SnkDynaformGuidesView, defineCustomElement as defineCustomElementSnkDynaformGuidesView } from './snk-dynaform-guides-view.js';
|
|
24
36
|
export { SnkEntityList, defineCustomElement as defineCustomElementSnkEntityList } from './snk-entity-list.js';
|
|
25
37
|
export { SnkEntitySearch, defineCustomElement as defineCustomElementSnkEntitySearch } from './snk-entity-search.js';
|
|
26
38
|
export { SnkExporterEmailSender, defineCustomElement as defineCustomElementSnkExporterEmailSender } from './snk-exporter-email-sender.js';
|