@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,992 @@
|
|
|
1
|
+
import { Action as DUAction, KeyboardManager, StringUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { Host, forceUpdate, h } from '@stencil/core';
|
|
3
|
+
import { SnkFormConfigManager } from '../../../snk-dynaform-form-config/SnkFormConfigManager';
|
|
4
|
+
import { FormMetadata, buildFormMetadata } from "@sankhyalabs/ezui/dist/collection/utils/form";
|
|
5
|
+
import { PresentationMode } from '../../../../lib';
|
|
6
|
+
import { TaskbarElement } from '../../../snk-taskbar/elements/taskbar-elements';
|
|
7
|
+
import { VIEW_MODE } from '../../../../lib/utils/constants';
|
|
8
|
+
import { SnkDynaformGuidesViewer } from '../snk-dynaform-guides-view/snk-dynaform-guides-view';
|
|
9
|
+
import { SnkMessageBuilder } from '../../../../lib/message/SnkMessageBuilder';
|
|
10
|
+
import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
11
|
+
import SimpleTaskbarProcessor from '../../../snk-taskbar/processor/simple-taskbar-processor';
|
|
12
|
+
import { DEFAULT_TASKBAR_BUTTONS, getTopTaskBarId } from '../../../snk-crud/utils/taskbarUtils';
|
|
13
|
+
export class SnkDynaformDetailView {
|
|
14
|
+
constructor() {
|
|
15
|
+
this._taskbarProcessor = new SimpleTaskbarProcessor(DEFAULT_TASKBAR_BUTTONS);
|
|
16
|
+
this._currentView = 0;
|
|
17
|
+
this.attachmentRegisterKey = undefined;
|
|
18
|
+
this._fieldToGetFocus = undefined;
|
|
19
|
+
this._hasToCreateFieldSearch = true;
|
|
20
|
+
this._selectedSheet = undefined;
|
|
21
|
+
this._internalErrorTabs = new Set();
|
|
22
|
+
this._selectedRecordPKDisplay = undefined;
|
|
23
|
+
this.formConfigManager = undefined;
|
|
24
|
+
this.dataUnitName = undefined;
|
|
25
|
+
this.resourceID = undefined;
|
|
26
|
+
this.entityName = undefined;
|
|
27
|
+
this.label = undefined;
|
|
28
|
+
this.dataUnit = undefined;
|
|
29
|
+
this.selectedForm = undefined;
|
|
30
|
+
this.dataState = undefined;
|
|
31
|
+
this.messagesBuilder = undefined;
|
|
32
|
+
this.canEdit = true;
|
|
33
|
+
this.taskbarCustomContainerId = undefined;
|
|
34
|
+
this.customEditors = undefined;
|
|
35
|
+
this.customRenders = undefined;
|
|
36
|
+
this.presentationMode = PresentationMode.SECONDARY;
|
|
37
|
+
}
|
|
38
|
+
observeDataUnit(newDataUnit, oldDataUnit) {
|
|
39
|
+
newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
40
|
+
oldDataUnit === null || oldDataUnit === void 0 ? void 0 : oldDataUnit.unsubscribe(this.dataUnitActionHandler);
|
|
41
|
+
}
|
|
42
|
+
observerDataState(newValue, oldValue) {
|
|
43
|
+
const openInsertion = !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
|
|
44
|
+
const closeInsertion = (oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) && !(newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode);
|
|
45
|
+
if (openInsertion || closeInsertion) {
|
|
46
|
+
this.loadMetadata();
|
|
47
|
+
}
|
|
48
|
+
if (this._formMetadata == undefined) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (!this.selectedSheetIsDetail()) {
|
|
52
|
+
if (openInsertion) {
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
this.changeViewMode(VIEW_MODE.FORM);
|
|
55
|
+
}, 0);
|
|
56
|
+
}
|
|
57
|
+
if (closeInsertion) {
|
|
58
|
+
this.changeViewMode(VIEW_MODE.GRID);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Muda o modo de visualização do componente entre VIEW_MODE.GRID e VIEW_MODE.FORM
|
|
64
|
+
* @param mode - Novo modo que o componente deve ser apresentado.
|
|
65
|
+
*/
|
|
66
|
+
async changeViewMode(mode) {
|
|
67
|
+
if (!this._viewStack) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this._viewStack.show(mode);
|
|
71
|
+
this._currentView = mode;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Abre o configurador de grid.
|
|
75
|
+
*/
|
|
76
|
+
async configGrid() {
|
|
77
|
+
if (this._snkGrid) {
|
|
78
|
+
this._snkGrid.showConfig();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
async showUp() {
|
|
82
|
+
if (this._snkFormView) {
|
|
83
|
+
this._snkFormView.showUp();
|
|
84
|
+
}
|
|
85
|
+
if (this._snkGrid) {
|
|
86
|
+
this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Registra um editor customizado para campos da grade e formulário.
|
|
91
|
+
*/
|
|
92
|
+
async addCustomEditor(fieldName, customEditor) {
|
|
93
|
+
var _a, _b;
|
|
94
|
+
const detailContext = this.normalizeDataUnitName();
|
|
95
|
+
(_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.addCustomEditor(fieldName, customEditor, detailContext);
|
|
96
|
+
(_b = this._snkFormView) === null || _b === void 0 ? void 0 : _b.addCustomEditor(fieldName, customEditor, detailContext);
|
|
97
|
+
}
|
|
98
|
+
async observerPropsCustomEditor(newValue) {
|
|
99
|
+
for (const fieldName in newValue) {
|
|
100
|
+
await this.addCustomEditor(fieldName, newValue[fieldName]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Registra um render customizado para colunas da grid.
|
|
105
|
+
*/
|
|
106
|
+
async addGridCustomRender(fieldName, customRender) {
|
|
107
|
+
var _a;
|
|
108
|
+
const detailContext = this.normalizeDataUnitName();
|
|
109
|
+
await ((_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.addGridCustomRender(fieldName, customRender, detailContext));
|
|
110
|
+
}
|
|
111
|
+
onContentCardChanged(evt) {
|
|
112
|
+
SnkDynaformGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
|
|
113
|
+
evt.stopPropagation();
|
|
114
|
+
}
|
|
115
|
+
async observeCustomRenders(newValue) {
|
|
116
|
+
for (const field in newValue) {
|
|
117
|
+
const customRender = newValue[field];
|
|
118
|
+
await this.addGridCustomRender(field, customRender);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
loadMetadata() {
|
|
122
|
+
if (!this.dataUnit || !this.formConfigManager) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (!this.formConfigManager.isLoaded) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const formConfig = this.formConfigManager.getConfig(this.dataUnit);
|
|
129
|
+
this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
|
130
|
+
this.initSelectedSheet();
|
|
131
|
+
}
|
|
132
|
+
initSelectedSheet() {
|
|
133
|
+
if (!this._formMetadata) {
|
|
134
|
+
this._selectedSheet = undefined;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const sheets = this._formMetadata.getAllSheets();
|
|
138
|
+
if (!sheets || sheets.size === 0) {
|
|
139
|
+
this._selectedSheet = undefined;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
// Mantém a aba atual caso ela ainda exista e não seja a área principal.
|
|
143
|
+
if (this._selectedSheet && this._selectedSheet.name !== SnkDynaformDetailView.MAIN_TAB) {
|
|
144
|
+
const current = sheets.get(this._selectedSheet.name);
|
|
145
|
+
if (current) {
|
|
146
|
+
this._selectedSheet = current;
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// Caso contrário, seleciona o primeiro sheet que não seja a área principal (primeira aba).
|
|
151
|
+
this._selectedSheet = this.getFirstNonMainSheet(sheets);
|
|
152
|
+
}
|
|
153
|
+
getFirstNonMainSheet(sheets) {
|
|
154
|
+
for (const [name, sheet] of sheets) {
|
|
155
|
+
if (name !== SnkDynaformDetailView.MAIN_TAB) {
|
|
156
|
+
return sheet;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return undefined;
|
|
160
|
+
}
|
|
161
|
+
dataUnitReadyHandler(evt) {
|
|
162
|
+
this.dataUnit = evt.detail;
|
|
163
|
+
this.loadMetadata();
|
|
164
|
+
}
|
|
165
|
+
getFormFields() {
|
|
166
|
+
var _a, _b, _c;
|
|
167
|
+
const mainSheet = (_b = (_a = this._formMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets()) === null || _b === void 0 ? void 0 : _b.get(SnkDynaformDetailView.MAIN_TAB);
|
|
168
|
+
return (_c = mainSheet === null || mainSheet === void 0 ? void 0 : mainSheet.fields) !== null && _c !== void 0 ? _c : [];
|
|
169
|
+
}
|
|
170
|
+
hasNonMainSheets() {
|
|
171
|
+
if (!this._formMetadata) {
|
|
172
|
+
return false;
|
|
173
|
+
}
|
|
174
|
+
for (const name of this._formMetadata.getAllSheets().keys()) {
|
|
175
|
+
if (name !== SnkDynaformDetailView.MAIN_TAB) {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
selectedSheetIsDetail() {
|
|
182
|
+
return !!this._selectedSheet && FormMetadata.getDetailName(this._selectedSheet.name) != undefined;
|
|
183
|
+
}
|
|
184
|
+
isSheetDisabled(sheet) {
|
|
185
|
+
var _a;
|
|
186
|
+
if (FormMetadata.getDetailName(sheet.name) == undefined) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
const currentRecord = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecord();
|
|
190
|
+
if (!currentRecord || !this.dataUnit) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
return this.dataUnit.isNewRecord(currentRecord.__record__id__) || this.dataUnit.isMultipleEdition;
|
|
194
|
+
}
|
|
195
|
+
buildInternalTabItems() {
|
|
196
|
+
if (!this._formMetadata) {
|
|
197
|
+
return [];
|
|
198
|
+
}
|
|
199
|
+
const sheets = Array.from(this._formMetadata.getAllSheets().values());
|
|
200
|
+
const nonMainSheets = sheets.filter((sheet) => sheet.name !== SnkDynaformDetailView.MAIN_TAB);
|
|
201
|
+
return nonMainSheets.map((sheet, index) => ({
|
|
202
|
+
tabKey: sheet.name,
|
|
203
|
+
label: sheet.label,
|
|
204
|
+
index,
|
|
205
|
+
disabled: this.isSheetDisabled(sheet),
|
|
206
|
+
rightIcon: this._internalErrorTabs.has(sheet.name) ? 'alert-circle-inverted' : undefined,
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
onInternalTabChange(tab) {
|
|
210
|
+
var _a, _b;
|
|
211
|
+
// A área principal (__main) é sempre visível e não é uma aba selecionável.
|
|
212
|
+
if (tab.tabKey === SnkDynaformDetailView.MAIN_TAB) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const matchedSheet = (_b = (_a = this._formMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets()) === null || _b === void 0 ? void 0 : _b.get(tab.tabKey);
|
|
216
|
+
if (!matchedSheet || this.isSheetDisabled(matchedSheet)) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
this._selectedSheet = matchedSheet;
|
|
220
|
+
}
|
|
221
|
+
executeActionHandler(evt) {
|
|
222
|
+
var _a;
|
|
223
|
+
if (evt.detail === TaskbarElement.GRID_MODE) {
|
|
224
|
+
this.changeViewMode(VIEW_MODE.GRID);
|
|
225
|
+
evt.stopPropagation();
|
|
226
|
+
}
|
|
227
|
+
if (evt.detail === TaskbarElement.UPDATE_MULTIPLE && this.dataUnit) {
|
|
228
|
+
this.dataUnit.isMultipleEdition = true;
|
|
229
|
+
this.changeViewMode(VIEW_MODE.FORM);
|
|
230
|
+
evt.stopPropagation();
|
|
231
|
+
}
|
|
232
|
+
if (evt.detail === TaskbarElement.FORM_MODE || evt.detail === TaskbarElement.UPDATE || evt.detail === TaskbarElement.INSERT) {
|
|
233
|
+
this.changeViewMode(VIEW_MODE.FORM);
|
|
234
|
+
evt.stopPropagation();
|
|
235
|
+
}
|
|
236
|
+
if (evt.detail === TaskbarElement.ATTACH) {
|
|
237
|
+
(_a = this._snkAttach) === null || _a === void 0 ? void 0 : _a.open();
|
|
238
|
+
evt.stopPropagation();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
async getAttachmentRegisterKey() {
|
|
242
|
+
if (!this._snkDataUnit) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
const recordCriteria = await this._snkDataUnit.getSelectedRecordsIDsInfo();
|
|
246
|
+
const joinedPrimaryKeys = recordCriteria.map(({ value }) => value).join('_');
|
|
247
|
+
return joinedPrimaryKeys;
|
|
248
|
+
}
|
|
249
|
+
async handleDataStateChange({ detail: dataState }) {
|
|
250
|
+
var _a;
|
|
251
|
+
this.dataState = dataState;
|
|
252
|
+
if (dataState.selectedRecord !== undefined && this._snkDataUnit) {
|
|
253
|
+
this.attachmentRegisterKey = (_a = await this.getAttachmentRegisterKey()) !== null && _a !== void 0 ? _a : undefined;
|
|
254
|
+
}
|
|
255
|
+
this._selectedRecordPKDisplay = this.buildSelectedRecordPKDisplay();
|
|
256
|
+
}
|
|
257
|
+
buildSelectedRecordPKDisplay() {
|
|
258
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
259
|
+
if (!this.dataUnit) {
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
if ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) {
|
|
263
|
+
const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkCrud.newRecord");
|
|
264
|
+
return message ? { message } : undefined;
|
|
265
|
+
}
|
|
266
|
+
const selectedRecord = this.dataUnit.getSelectedRecord();
|
|
267
|
+
if (!selectedRecord) {
|
|
268
|
+
return undefined;
|
|
269
|
+
}
|
|
270
|
+
const items = [];
|
|
271
|
+
const fields = (_d = (_c = this.dataUnit.metadata) === null || _c === void 0 ? void 0 : _c.fields) !== null && _d !== void 0 ? _d : [];
|
|
272
|
+
for (const field of fields) {
|
|
273
|
+
if (((_e = field.properties) === null || _e === void 0 ? void 0 : _e.isPrimaryKey) !== "true") {
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
const rawValue = selectedRecord[field.name];
|
|
277
|
+
const value = (_f = rawValue === null || rawValue === void 0 ? void 0 : rawValue.value) !== null && _f !== void 0 ? _f : rawValue;
|
|
278
|
+
if (value === undefined || value === null || value === "") {
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
items.push({ label: (_g = field.label) !== null && _g !== void 0 ? _g : field.name, value: String(value) });
|
|
282
|
+
}
|
|
283
|
+
return items.length ? { items } : undefined;
|
|
284
|
+
}
|
|
285
|
+
renderSelectedRecordHeader() {
|
|
286
|
+
var _a;
|
|
287
|
+
if (!this.label && !this._selectedRecordPKDisplay) {
|
|
288
|
+
return undefined;
|
|
289
|
+
}
|
|
290
|
+
const display = this._selectedRecordPKDisplay;
|
|
291
|
+
if (!display) {
|
|
292
|
+
return undefined;
|
|
293
|
+
}
|
|
294
|
+
if (display.message) {
|
|
295
|
+
return (h("div", { class: "selected-record-header selected-record-header--message" }, h("span", { class: "selected-record-header__message" }, display.message)));
|
|
296
|
+
}
|
|
297
|
+
if (!((_a = display.items) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
298
|
+
return undefined;
|
|
299
|
+
}
|
|
300
|
+
return (h("div", { class: "selected-record-header", role: "group" }, display.items.map((item, index) => [
|
|
301
|
+
index > 0 && h("span", { class: "selected-record-header__separator", "aria-hidden": "true" }),
|
|
302
|
+
h("div", { class: "selected-record-header__chip" }, h("span", { class: "selected-record-header__label" }, item.label, ":"), h("span", { class: "selected-record-header__value" }, item.value))
|
|
303
|
+
])));
|
|
304
|
+
}
|
|
305
|
+
componentWillLoad() {
|
|
306
|
+
var _a;
|
|
307
|
+
this._configName = `dynaform.${this.entityName}`;
|
|
308
|
+
this.formConfigManager = new SnkFormConfigManager(this._configName, (_a = this.resourceID) !== null && _a !== void 0 ? _a : '', () => this.loadMetadata(), this.dataUnit);
|
|
309
|
+
this.formConfigManager.loadConfig();
|
|
310
|
+
if (this.messagesBuilder == undefined) {
|
|
311
|
+
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
componentWillRender() {
|
|
315
|
+
this.initializeTaskbarProcessor();
|
|
316
|
+
}
|
|
317
|
+
initializeTaskbarProcessor() {
|
|
318
|
+
if (!this.dataState) {
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
const detailTaskbarManager = this.buildDetailTaskbarManager();
|
|
322
|
+
const topTaskbarId = getTopTaskBarId(this.dataState, this.presentationMode);
|
|
323
|
+
this._taskbarProcessor.process(topTaskbarId, detailTaskbarManager, this.dataState, [], []);
|
|
324
|
+
}
|
|
325
|
+
buildDetailTaskbarManager() {
|
|
326
|
+
const EDITION_MODE_BUTTONS = [
|
|
327
|
+
TaskbarElement.CANCEL,
|
|
328
|
+
TaskbarElement.SAVE,
|
|
329
|
+
];
|
|
330
|
+
const currentView = this._currentView;
|
|
331
|
+
return {
|
|
332
|
+
getButtons: (taskbarID, dataState, defaultButtons) => {
|
|
333
|
+
var _a, _b, _c;
|
|
334
|
+
if (!taskbarID) {
|
|
335
|
+
return [];
|
|
336
|
+
}
|
|
337
|
+
const isInEditionMode = (dataState === null || dataState === void 0 ? void 0 : dataState.insertionMode) || (dataState === null || dataState === void 0 ? void 0 : dataState.isDirty);
|
|
338
|
+
if (isInEditionMode) {
|
|
339
|
+
return EDITION_MODE_BUTTONS;
|
|
340
|
+
}
|
|
341
|
+
let buttons = [...defaultButtons];
|
|
342
|
+
if (currentView === VIEW_MODE.FORM) {
|
|
343
|
+
const indexFormMode = buttons.indexOf(TaskbarElement.FORM_MODE);
|
|
344
|
+
if (indexFormMode > -1) {
|
|
345
|
+
buttons = [
|
|
346
|
+
...buttons.slice(0, indexFormMode),
|
|
347
|
+
TaskbarElement.GRID_MODE,
|
|
348
|
+
...buttons.slice(indexFormMode + 1),
|
|
349
|
+
];
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (((_c = (_b = (_a = dataState === null || dataState === void 0 ? void 0 : dataState.selectionInfo) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0) > 1) {
|
|
353
|
+
const indexUpdate = buttons.indexOf(TaskbarElement.UPDATE);
|
|
354
|
+
if (indexUpdate > -1) {
|
|
355
|
+
buttons = [
|
|
356
|
+
...buttons.slice(0, indexUpdate),
|
|
357
|
+
TaskbarElement.UPDATE_MULTIPLE,
|
|
358
|
+
...buttons.slice(indexUpdate + 1),
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return buttons;
|
|
363
|
+
},
|
|
364
|
+
isEnabled: (_, dataState, buttonName, originalValue) => {
|
|
365
|
+
if (!dataState) {
|
|
366
|
+
return originalValue;
|
|
367
|
+
}
|
|
368
|
+
const hasSelectedRecord = dataState.selectedRecord !== undefined;
|
|
369
|
+
const buttonsRequiringSelection = [
|
|
370
|
+
TaskbarElement.UPDATE,
|
|
371
|
+
TaskbarElement.REMOVE,
|
|
372
|
+
TaskbarElement.ATTACH,
|
|
373
|
+
TaskbarElement.CLONE,
|
|
374
|
+
];
|
|
375
|
+
if (!hasSelectedRecord && buttonsRequiringSelection.includes(buttonName)) {
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
if (buttonName === TaskbarElement.PREVIOUS && !dataState.hasPrevious) {
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
if (buttonName === TaskbarElement.NEXT && !dataState.hasNext) {
|
|
382
|
+
return false;
|
|
383
|
+
}
|
|
384
|
+
if (buttonName === TaskbarElement.INSERT && dataState.insertionMode) {
|
|
385
|
+
return false;
|
|
386
|
+
}
|
|
387
|
+
return originalValue;
|
|
388
|
+
},
|
|
389
|
+
};
|
|
390
|
+
}
|
|
391
|
+
async componentDidLoad() {
|
|
392
|
+
if (this.customEditors) {
|
|
393
|
+
await this.observerPropsCustomEditor(this.customEditors);
|
|
394
|
+
}
|
|
395
|
+
if (this.customRenders) {
|
|
396
|
+
await this.observeCustomRenders(this.customRenders);
|
|
397
|
+
}
|
|
398
|
+
this.initKeyboardManager();
|
|
399
|
+
}
|
|
400
|
+
disconnectedCallback() {
|
|
401
|
+
var _a;
|
|
402
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
403
|
+
}
|
|
404
|
+
async dataUnitActionHandler(action) {
|
|
405
|
+
var _a;
|
|
406
|
+
if (action.type === DUAction.FIELD_INVALIDATED) {
|
|
407
|
+
const sheetName = this.findSheetOfField((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fieldName);
|
|
408
|
+
if (sheetName) {
|
|
409
|
+
this._internalErrorTabs = new Set([...this._internalErrorTabs, sheetName]);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
findSheetOfField(fieldName) {
|
|
414
|
+
var _a;
|
|
415
|
+
if (!fieldName || !this._formMetadata) {
|
|
416
|
+
return undefined;
|
|
417
|
+
}
|
|
418
|
+
const sheets = this._formMetadata.getAllSheets();
|
|
419
|
+
for (const [sheetName, sheet] of sheets) {
|
|
420
|
+
if ((_a = sheet.fields) === null || _a === void 0 ? void 0 : _a.some((f) => f.name === fieldName)) {
|
|
421
|
+
return sheetName;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
return undefined;
|
|
425
|
+
}
|
|
426
|
+
normalizeDataUnitName() {
|
|
427
|
+
var _a, _b;
|
|
428
|
+
return (_b = (_a = this.dataUnitName) === null || _a === void 0 ? void 0 : _a.replace(/\//g, '>')) !== null && _b !== void 0 ? _b : '';
|
|
429
|
+
}
|
|
430
|
+
getSettingsListForm() {
|
|
431
|
+
var _a, _b;
|
|
432
|
+
const hardList = [{
|
|
433
|
+
value: StringUtils.generateUUID(),
|
|
434
|
+
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkCrud.findColumn", undefined)) !== null && _b !== void 0 ? _b : "",
|
|
435
|
+
disableCloseOnSelect: true,
|
|
436
|
+
eagerInitialize: true,
|
|
437
|
+
itemBuilder: (_, item) => this.getFieldsSearch(item)
|
|
438
|
+
}];
|
|
439
|
+
return hardList;
|
|
440
|
+
}
|
|
441
|
+
getFieldsSearch(item) {
|
|
442
|
+
var _a;
|
|
443
|
+
if (this._fieldSearch === undefined || this._hasToCreateFieldSearch) {
|
|
444
|
+
this._hasToCreateFieldSearch = false;
|
|
445
|
+
this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
|
|
446
|
+
}
|
|
447
|
+
return (_a = this._fieldSearch) !== null && _a !== void 0 ? _a : document.createElement('div');
|
|
448
|
+
}
|
|
449
|
+
fieldsOptionLoader(argument) {
|
|
450
|
+
const searchTerm = argument === null || argument === void 0 ? void 0 : argument.toLowerCase();
|
|
451
|
+
const allFields = this.getFormFields().map(field => { var _a; return (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getField(field.name); });
|
|
452
|
+
const filteredFields = allFields.filter(field => {
|
|
453
|
+
var _a, _b;
|
|
454
|
+
if (!field) {
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
457
|
+
return ((_a = field.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm)) ||
|
|
458
|
+
((_b = field.label) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(searchTerm));
|
|
459
|
+
});
|
|
460
|
+
const options = filteredFields.map((field) => {
|
|
461
|
+
if (!field) {
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
return ({ value: field.name, label: field.label });
|
|
465
|
+
});
|
|
466
|
+
return Promise.resolve(options);
|
|
467
|
+
}
|
|
468
|
+
onSelectField(option) {
|
|
469
|
+
if (option == undefined) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
this._fieldToGetFocus = option.value;
|
|
473
|
+
}
|
|
474
|
+
clearFieldToFocusHandler() {
|
|
475
|
+
this._fieldToGetFocus = undefined;
|
|
476
|
+
}
|
|
477
|
+
getColumnSearch(item) {
|
|
478
|
+
var _a;
|
|
479
|
+
if (this._columnSearch !== undefined) {
|
|
480
|
+
return this._columnSearch;
|
|
481
|
+
}
|
|
482
|
+
this._columnSearch = buildFieldSearch(item, ({ argument }) => new Promise(accept => {
|
|
483
|
+
var _a;
|
|
484
|
+
(_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.filterColumns(argument).then((columns) => {
|
|
485
|
+
accept(columns
|
|
486
|
+
.filter(column => !column.hidden)
|
|
487
|
+
.map(column => ({ label: column.label, value: column.name })));
|
|
488
|
+
});
|
|
489
|
+
}), (option) => {
|
|
490
|
+
var _a;
|
|
491
|
+
if (option != undefined) {
|
|
492
|
+
(_a = this._snkGrid) === null || _a === void 0 ? void 0 : _a.locateColumn(option.value);
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
return (_a = this._columnSearch) !== null && _a !== void 0 ? _a : document.createElement('div');
|
|
496
|
+
}
|
|
497
|
+
buildTaskbarCustomActionsList() {
|
|
498
|
+
return [this.buildSearchColumnTaskbarAction()];
|
|
499
|
+
}
|
|
500
|
+
buildSearchColumnTaskbarAction() {
|
|
501
|
+
var _a, _b;
|
|
502
|
+
return {
|
|
503
|
+
value: StringUtils.generateUUID(),
|
|
504
|
+
label: (_b = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage('snkGrid.findColumn', {})) !== null && _b !== void 0 ? _b : "",
|
|
505
|
+
disableCloseOnSelect: true,
|
|
506
|
+
eagerInitialize: true,
|
|
507
|
+
itemBuilder: (_, item) => { var _a; return (_a = this.getColumnSearch(item)) !== null && _a !== void 0 ? _a : document.createElement('div'); },
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
async initKeyboardManager() {
|
|
511
|
+
var _a;
|
|
512
|
+
this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
|
|
513
|
+
this._keyboardManager.bind(SHORTCUT_SEARCH_FIELD, async () => {
|
|
514
|
+
var _a;
|
|
515
|
+
await ((_a = this._snkFormView) === null || _a === void 0 ? void 0 : _a.showSearchField());
|
|
516
|
+
}, { description: (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
517
|
+
}
|
|
518
|
+
renderTabSelector() {
|
|
519
|
+
if (!this.hasNonMainSheets()) {
|
|
520
|
+
return undefined;
|
|
521
|
+
}
|
|
522
|
+
const selectedKey = this._selectedSheet && this._selectedSheet.name !== SnkDynaformDetailView.MAIN_TAB
|
|
523
|
+
? this._selectedSheet.name
|
|
524
|
+
: undefined;
|
|
525
|
+
return (h("ez-tabselector", { class: "ez-tabselector-internal", tabs: this.buildInternalTabItems(), selectedTab: selectedKey, onEzChange: (evt) => this.onInternalTabChange(evt.detail) }));
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Renderiza o conteúdo da aba selecionada, seguindo as mesmas regras do
|
|
529
|
+
* formulário master (snk-dynaform-guides-view.getContent):
|
|
530
|
+
* - Sheet de detalhe (child[...]) → snk-dynaform-detail-view aninhado.
|
|
531
|
+
* - Sheet de formulário (ex.: "Geral") → snk-dynaform-form-view com os campos do sheet.
|
|
532
|
+
*/
|
|
533
|
+
renderSelectedSheetContent() {
|
|
534
|
+
if (!this._selectedSheet || this._selectedSheet.name === SnkDynaformDetailView.MAIN_TAB) {
|
|
535
|
+
return undefined;
|
|
536
|
+
}
|
|
537
|
+
const childEntityName = FormMetadata.getDetailName(this._selectedSheet.name);
|
|
538
|
+
if (childEntityName) {
|
|
539
|
+
return (h("snk-dynaform-detail-view", { key: `sub_${this.dataUnitName}_${this._selectedSheet.name}`, dataUnitName: `${this.dataUnitName}/${childEntityName}`, entityName: childEntityName, label: this._selectedSheet.label, resourceID: this.resourceID, canEdit: this.canEdit, messagesBuilder: this.messagesBuilder, customEditors: this.customEditors, customRenders: this.customRenders, presentationMode: this.presentationMode, taskbarCustomContainerId: this.taskbarCustomContainerId }));
|
|
540
|
+
}
|
|
541
|
+
return (h("snk-dynaform-form-view", { key: `sheet_${this._selectedSheet.name}`, name: this._selectedSheet.name, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this._selectedSheet.fields, fieldToFocus: this._fieldToGetFocus, label: this._selectedSheet.label, onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch }));
|
|
542
|
+
}
|
|
543
|
+
renderViewStack() {
|
|
544
|
+
var _a, _b;
|
|
545
|
+
return (h("ez-view-stack", { ref: (ref) => this._viewStack = ref }, h("stack-item", { class: "ez-size-width--full ez-size-height--full" }, h("snk-grid", { class: "ez-size-width--full ez-size-height--full", ref: (ref) => {
|
|
546
|
+
if (ref)
|
|
547
|
+
this._snkGrid = ref;
|
|
548
|
+
}, configName: this._configName, messagesBuilder: this.messagesBuilder, onGridDoubleClick: () => this.changeViewMode(VIEW_MODE.FORM), onActionClick: (evt) => this.executeActionHandler(evt), presentationMode: this.presentationMode, canEdit: this.canEdit, isDetail: true, taskbarCustomContainerId: this.taskbarCustomContainerId, gridHeaderCustomSlotId: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS", topTaskbarCustomSlotId: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS", outlineMode: true, enableGridInsert: true, autoLoad: true, multipleEditionEnabled: true, multipleSelection: true, hideHeader: true, hideGridTaskbar: true })), h("stack-item", { class: "ez-size-width--full ez-size-height--full grid-container" }, h("div", { class: "form-and-detail-container" }, h("snk-dynaform-form-view", { ref: (ref) => {
|
|
549
|
+
if (ref)
|
|
550
|
+
this._snkFormView = ref;
|
|
551
|
+
}, name: SnkDynaformDetailView.MAIN_TAB, formMetadata: this._formMetadata, dataUnit: this.dataUnit, fields: this.getFormFields(), fieldToFocus: this._fieldToGetFocus, label: this.label, onSnkRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this), fieldSearch: this._fieldSearch }, this.renderSelectedRecordHeader()), this.renderTabSelector(), this.renderSelectedSheetContent())), h("snk-attach", { ref: (ref) => this._snkAttach = ref, registerKey: (_a = this.attachmentRegisterKey) !== null && _a !== void 0 ? _a : '', messagesBuilder: this.messagesBuilder, entityName: (_b = this.entityName) !== null && _b !== void 0 ? _b : '' })));
|
|
552
|
+
}
|
|
553
|
+
render() {
|
|
554
|
+
return (h(Host, null, h("snk-data-unit", { ref: (el) => {
|
|
555
|
+
if (el)
|
|
556
|
+
this._snkDataUnit = el;
|
|
557
|
+
}, dataUnitName: `${this.dataUnitName}`, onDataUnitReady: evt => this.dataUnitReadyHandler(evt), entityName: this.entityName, onDataStateChange: this.handleDataStateChange.bind(this), ignoreSaveMessage: this._currentView === VIEW_MODE.GRID, messagesBuilder: this.messagesBuilder, configName: this._configName }, h("snk-taskbar", { key: "detailViewTaskbar", class: "form-taskbar", "data-element-id": "detail_top", configName: this._configName, messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, primaryButton: "INSERT", overflowStrategy: "hiddenItems", alignRigth: true, sizeButtons: 'small', presentationMode: this.presentationMode, onActionClick: evt => this.executeActionHandler(evt), dataUnit: this.dataUnit, resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: "DETAIL_TASKBAR_CUSTOM_ELEMENTS", actionsSettingsList: this.getSettingsListForm(), customActionsList: this.buildTaskbarCustomActionsList() }, h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" })), this.renderViewStack())));
|
|
558
|
+
}
|
|
559
|
+
static get is() { return "snk-dynaform-detail-view"; }
|
|
560
|
+
static get encapsulation() { return "scoped"; }
|
|
561
|
+
static get originalStyleUrls() {
|
|
562
|
+
return {
|
|
563
|
+
"$": ["snk-dynaform-detail-view.css"]
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
static get styleUrls() {
|
|
567
|
+
return {
|
|
568
|
+
"$": ["snk-dynaform-detail-view.css"]
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
static get properties() {
|
|
572
|
+
return {
|
|
573
|
+
"formConfigManager": {
|
|
574
|
+
"type": "unknown",
|
|
575
|
+
"mutable": true,
|
|
576
|
+
"complexType": {
|
|
577
|
+
"original": "SnkFormConfigManager",
|
|
578
|
+
"resolved": "SnkFormConfigManager",
|
|
579
|
+
"references": {
|
|
580
|
+
"SnkFormConfigManager": {
|
|
581
|
+
"location": "import",
|
|
582
|
+
"path": "../../../snk-dynaform-form-config/SnkFormConfigManager"
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"required": false,
|
|
587
|
+
"optional": true,
|
|
588
|
+
"docs": {
|
|
589
|
+
"tags": [],
|
|
590
|
+
"text": "Gerenciador de configura\u00E7\u00E3o do formul\u00E1rio."
|
|
591
|
+
}
|
|
592
|
+
},
|
|
593
|
+
"dataUnitName": {
|
|
594
|
+
"type": "string",
|
|
595
|
+
"mutable": false,
|
|
596
|
+
"complexType": {
|
|
597
|
+
"original": "string",
|
|
598
|
+
"resolved": "string",
|
|
599
|
+
"references": {}
|
|
600
|
+
},
|
|
601
|
+
"required": false,
|
|
602
|
+
"optional": true,
|
|
603
|
+
"docs": {
|
|
604
|
+
"tags": [],
|
|
605
|
+
"text": "Determina todo o caminho desde o pai at\u00E9 chegar neste n\u00EDvel"
|
|
606
|
+
},
|
|
607
|
+
"attribute": "data-unit-name",
|
|
608
|
+
"reflect": false
|
|
609
|
+
},
|
|
610
|
+
"resourceID": {
|
|
611
|
+
"type": "string",
|
|
612
|
+
"mutable": false,
|
|
613
|
+
"complexType": {
|
|
614
|
+
"original": "string",
|
|
615
|
+
"resolved": "string",
|
|
616
|
+
"references": {}
|
|
617
|
+
},
|
|
618
|
+
"required": false,
|
|
619
|
+
"optional": true,
|
|
620
|
+
"docs": {
|
|
621
|
+
"tags": [],
|
|
622
|
+
"text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
|
|
623
|
+
},
|
|
624
|
+
"attribute": "resource-i-d",
|
|
625
|
+
"reflect": false
|
|
626
|
+
},
|
|
627
|
+
"entityName": {
|
|
628
|
+
"type": "string",
|
|
629
|
+
"mutable": false,
|
|
630
|
+
"complexType": {
|
|
631
|
+
"original": "string",
|
|
632
|
+
"resolved": "string",
|
|
633
|
+
"references": {}
|
|
634
|
+
},
|
|
635
|
+
"required": false,
|
|
636
|
+
"optional": true,
|
|
637
|
+
"docs": {
|
|
638
|
+
"tags": [],
|
|
639
|
+
"text": "Nome da entidade detail."
|
|
640
|
+
},
|
|
641
|
+
"attribute": "entity-name",
|
|
642
|
+
"reflect": false
|
|
643
|
+
},
|
|
644
|
+
"label": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"mutable": false,
|
|
647
|
+
"complexType": {
|
|
648
|
+
"original": "string",
|
|
649
|
+
"resolved": "string",
|
|
650
|
+
"references": {}
|
|
651
|
+
},
|
|
652
|
+
"required": false,
|
|
653
|
+
"optional": true,
|
|
654
|
+
"docs": {
|
|
655
|
+
"tags": [],
|
|
656
|
+
"text": "Descri\u00E7\u00E3o amig\u00E1vel do cadastro detalhe."
|
|
657
|
+
},
|
|
658
|
+
"attribute": "label",
|
|
659
|
+
"reflect": false
|
|
660
|
+
},
|
|
661
|
+
"dataUnit": {
|
|
662
|
+
"type": "unknown",
|
|
663
|
+
"mutable": true,
|
|
664
|
+
"complexType": {
|
|
665
|
+
"original": "DataUnit",
|
|
666
|
+
"resolved": "DataUnit",
|
|
667
|
+
"references": {
|
|
668
|
+
"DataUnit": {
|
|
669
|
+
"location": "import",
|
|
670
|
+
"path": "@sankhyalabs/core"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
},
|
|
674
|
+
"required": false,
|
|
675
|
+
"optional": true,
|
|
676
|
+
"docs": {
|
|
677
|
+
"tags": [],
|
|
678
|
+
"text": "Inst\u00E2ncia do DataUnit detail."
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
"selectedForm": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"mutable": true,
|
|
684
|
+
"complexType": {
|
|
685
|
+
"original": "string",
|
|
686
|
+
"resolved": "string",
|
|
687
|
+
"references": {}
|
|
688
|
+
},
|
|
689
|
+
"required": false,
|
|
690
|
+
"optional": true,
|
|
691
|
+
"docs": {
|
|
692
|
+
"tags": [],
|
|
693
|
+
"text": "Representa o formul\u00E1rio selecionado na inicializa\u00E7\u00E3o.\nAp\u00F3s o primeiro render, o estado interno _selectedSheet assume o controle."
|
|
694
|
+
},
|
|
695
|
+
"attribute": "selected-form",
|
|
696
|
+
"reflect": false
|
|
697
|
+
},
|
|
698
|
+
"dataState": {
|
|
699
|
+
"type": "unknown",
|
|
700
|
+
"mutable": true,
|
|
701
|
+
"complexType": {
|
|
702
|
+
"original": "DataState",
|
|
703
|
+
"resolved": "DataState",
|
|
704
|
+
"references": {
|
|
705
|
+
"DataState": {
|
|
706
|
+
"location": "import",
|
|
707
|
+
"path": "../../../snk-data-unit/snk-data-unit"
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
},
|
|
711
|
+
"required": false,
|
|
712
|
+
"optional": true,
|
|
713
|
+
"docs": {
|
|
714
|
+
"tags": [],
|
|
715
|
+
"text": "Representa o estado do dataUnit detail."
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
"messagesBuilder": {
|
|
719
|
+
"type": "unknown",
|
|
720
|
+
"mutable": true,
|
|
721
|
+
"complexType": {
|
|
722
|
+
"original": "SnkMessageBuilder",
|
|
723
|
+
"resolved": "SnkMessageBuilder",
|
|
724
|
+
"references": {
|
|
725
|
+
"SnkMessageBuilder": {
|
|
726
|
+
"location": "import",
|
|
727
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
"required": false,
|
|
732
|
+
"optional": true,
|
|
733
|
+
"docs": {
|
|
734
|
+
"tags": [],
|
|
735
|
+
"text": ""
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
"canEdit": {
|
|
739
|
+
"type": "boolean",
|
|
740
|
+
"mutable": false,
|
|
741
|
+
"complexType": {
|
|
742
|
+
"original": "boolean",
|
|
743
|
+
"resolved": "boolean",
|
|
744
|
+
"references": {}
|
|
745
|
+
},
|
|
746
|
+
"required": false,
|
|
747
|
+
"optional": false,
|
|
748
|
+
"docs": {
|
|
749
|
+
"tags": [],
|
|
750
|
+
"text": "Define se a edi\u00E7\u00E3o est\u00E1 habilitada na grid."
|
|
751
|
+
},
|
|
752
|
+
"attribute": "can-edit",
|
|
753
|
+
"reflect": false,
|
|
754
|
+
"defaultValue": "true"
|
|
755
|
+
},
|
|
756
|
+
"taskbarCustomContainerId": {
|
|
757
|
+
"type": "string",
|
|
758
|
+
"mutable": false,
|
|
759
|
+
"complexType": {
|
|
760
|
+
"original": "string",
|
|
761
|
+
"resolved": "string",
|
|
762
|
+
"references": {}
|
|
763
|
+
},
|
|
764
|
+
"required": false,
|
|
765
|
+
"optional": true,
|
|
766
|
+
"docs": {
|
|
767
|
+
"tags": [],
|
|
768
|
+
"text": "Define o identificador do container de elementos customizados da Taskbar."
|
|
769
|
+
},
|
|
770
|
+
"attribute": "taskbar-custom-container-id",
|
|
771
|
+
"reflect": false
|
|
772
|
+
},
|
|
773
|
+
"customEditors": {
|
|
774
|
+
"type": "unknown",
|
|
775
|
+
"mutable": false,
|
|
776
|
+
"complexType": {
|
|
777
|
+
"original": "PropsCustomEditor",
|
|
778
|
+
"resolved": "PropsCustomEditor",
|
|
779
|
+
"references": {
|
|
780
|
+
"PropsCustomEditor": {
|
|
781
|
+
"location": "import",
|
|
782
|
+
"path": "../../interfaces/PropsCustomEditor"
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
"required": false,
|
|
787
|
+
"optional": true,
|
|
788
|
+
"docs": {
|
|
789
|
+
"tags": [],
|
|
790
|
+
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio."
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
"customRenders": {
|
|
794
|
+
"type": "unknown",
|
|
795
|
+
"mutable": false,
|
|
796
|
+
"complexType": {
|
|
797
|
+
"original": "PropsCustomRender",
|
|
798
|
+
"resolved": "PropsCustomRender",
|
|
799
|
+
"references": {
|
|
800
|
+
"PropsCustomRender": {
|
|
801
|
+
"location": "import",
|
|
802
|
+
"path": "../../interfaces/PropsCustomRender"
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
"required": false,
|
|
807
|
+
"optional": true,
|
|
808
|
+
"docs": {
|
|
809
|
+
"tags": [],
|
|
810
|
+
"text": "Render customizados da grade."
|
|
811
|
+
}
|
|
812
|
+
},
|
|
813
|
+
"presentationMode": {
|
|
814
|
+
"type": "string",
|
|
815
|
+
"mutable": false,
|
|
816
|
+
"complexType": {
|
|
817
|
+
"original": "PresentationMode",
|
|
818
|
+
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
|
|
819
|
+
"references": {
|
|
820
|
+
"PresentationMode": {
|
|
821
|
+
"location": "import",
|
|
822
|
+
"path": "../../../../lib"
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
"required": false,
|
|
827
|
+
"optional": false,
|
|
828
|
+
"docs": {
|
|
829
|
+
"tags": [],
|
|
830
|
+
"text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
|
|
831
|
+
},
|
|
832
|
+
"attribute": "presentation-mode",
|
|
833
|
+
"reflect": false,
|
|
834
|
+
"defaultValue": "PresentationMode.SECONDARY"
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
}
|
|
838
|
+
static get states() {
|
|
839
|
+
return {
|
|
840
|
+
"_currentView": {},
|
|
841
|
+
"attachmentRegisterKey": {},
|
|
842
|
+
"_fieldToGetFocus": {},
|
|
843
|
+
"_hasToCreateFieldSearch": {},
|
|
844
|
+
"_selectedSheet": {},
|
|
845
|
+
"_internalErrorTabs": {},
|
|
846
|
+
"_selectedRecordPKDisplay": {}
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
static get methods() {
|
|
850
|
+
return {
|
|
851
|
+
"changeViewMode": {
|
|
852
|
+
"complexType": {
|
|
853
|
+
"signature": "(mode: VIEW_MODE) => Promise<void>",
|
|
854
|
+
"parameters": [{
|
|
855
|
+
"tags": [{
|
|
856
|
+
"name": "param",
|
|
857
|
+
"text": "mode - Novo modo que o componente deve ser apresentado."
|
|
858
|
+
}],
|
|
859
|
+
"text": "- Novo modo que o componente deve ser apresentado."
|
|
860
|
+
}],
|
|
861
|
+
"references": {
|
|
862
|
+
"Promise": {
|
|
863
|
+
"location": "global"
|
|
864
|
+
},
|
|
865
|
+
"VIEW_MODE": {
|
|
866
|
+
"location": "import",
|
|
867
|
+
"path": "../../../../lib/utils/constants"
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
"return": "Promise<void>"
|
|
871
|
+
},
|
|
872
|
+
"docs": {
|
|
873
|
+
"text": "Muda o modo de visualiza\u00E7\u00E3o do componente entre VIEW_MODE.GRID e VIEW_MODE.FORM",
|
|
874
|
+
"tags": [{
|
|
875
|
+
"name": "param",
|
|
876
|
+
"text": "mode - Novo modo que o componente deve ser apresentado."
|
|
877
|
+
}]
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
"configGrid": {
|
|
881
|
+
"complexType": {
|
|
882
|
+
"signature": "() => Promise<void>",
|
|
883
|
+
"parameters": [],
|
|
884
|
+
"references": {
|
|
885
|
+
"Promise": {
|
|
886
|
+
"location": "global"
|
|
887
|
+
}
|
|
888
|
+
},
|
|
889
|
+
"return": "Promise<void>"
|
|
890
|
+
},
|
|
891
|
+
"docs": {
|
|
892
|
+
"text": "Abre o configurador de grid.",
|
|
893
|
+
"tags": []
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
"showUp": {
|
|
897
|
+
"complexType": {
|
|
898
|
+
"signature": "() => Promise<void>",
|
|
899
|
+
"parameters": [],
|
|
900
|
+
"references": {
|
|
901
|
+
"Promise": {
|
|
902
|
+
"location": "global"
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
"return": "Promise<void>"
|
|
906
|
+
},
|
|
907
|
+
"docs": {
|
|
908
|
+
"text": "",
|
|
909
|
+
"tags": []
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
"addCustomEditor": {
|
|
913
|
+
"complexType": {
|
|
914
|
+
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
|
915
|
+
"parameters": [{
|
|
916
|
+
"tags": [],
|
|
917
|
+
"text": ""
|
|
918
|
+
}, {
|
|
919
|
+
"tags": [],
|
|
920
|
+
"text": ""
|
|
921
|
+
}],
|
|
922
|
+
"references": {
|
|
923
|
+
"Promise": {
|
|
924
|
+
"location": "global"
|
|
925
|
+
},
|
|
926
|
+
"ICustomEditor": {
|
|
927
|
+
"location": "import",
|
|
928
|
+
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
929
|
+
}
|
|
930
|
+
},
|
|
931
|
+
"return": "Promise<void>"
|
|
932
|
+
},
|
|
933
|
+
"docs": {
|
|
934
|
+
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio.",
|
|
935
|
+
"tags": []
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
"addGridCustomRender": {
|
|
939
|
+
"complexType": {
|
|
940
|
+
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
|
941
|
+
"parameters": [{
|
|
942
|
+
"tags": [],
|
|
943
|
+
"text": ""
|
|
944
|
+
}, {
|
|
945
|
+
"tags": [],
|
|
946
|
+
"text": ""
|
|
947
|
+
}],
|
|
948
|
+
"references": {
|
|
949
|
+
"Promise": {
|
|
950
|
+
"location": "global"
|
|
951
|
+
},
|
|
952
|
+
"ICustomRender": {
|
|
953
|
+
"location": "import",
|
|
954
|
+
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
"return": "Promise<void>"
|
|
958
|
+
},
|
|
959
|
+
"docs": {
|
|
960
|
+
"text": "Registra um render customizado para colunas da grid.",
|
|
961
|
+
"tags": []
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
static get elementRef() { return "_element"; }
|
|
967
|
+
static get watchers() {
|
|
968
|
+
return [{
|
|
969
|
+
"propName": "dataUnit",
|
|
970
|
+
"methodName": "observeDataUnit"
|
|
971
|
+
}, {
|
|
972
|
+
"propName": "dataState",
|
|
973
|
+
"methodName": "observerDataState"
|
|
974
|
+
}, {
|
|
975
|
+
"propName": "customEditors",
|
|
976
|
+
"methodName": "observerPropsCustomEditor"
|
|
977
|
+
}, {
|
|
978
|
+
"propName": "customRenders",
|
|
979
|
+
"methodName": "observeCustomRenders"
|
|
980
|
+
}];
|
|
981
|
+
}
|
|
982
|
+
static get listeners() {
|
|
983
|
+
return [{
|
|
984
|
+
"name": "snkContentCardChanged",
|
|
985
|
+
"method": "onContentCardChanged",
|
|
986
|
+
"target": undefined,
|
|
987
|
+
"capture": false,
|
|
988
|
+
"passive": false
|
|
989
|
+
}];
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
SnkDynaformDetailView.MAIN_TAB = "__main";
|