@sankhyalabs/sankhyablocks 10.1.0-dev.6 → 10.1.0-dev.61
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/LICENSE +4 -1
- package/dist/cjs/{ConfigStorage-72f34bd4.js → ConfigStorage-156bfcac.js} +19 -2
- package/dist/cjs/ContinuousInsertUtils-1ae0c6ac.js +41 -0
- package/dist/cjs/{DataFetcher-991b0349.js → DataFetcher-d13b4637.js} +121 -69
- package/dist/cjs/{FormConfigHelper-e253a418.js → FormConfigHelper-28fe4668.js} +3 -1
- package/dist/cjs/FormConfigHelper-c5f5473a.js +342 -0
- package/dist/cjs/{ISave-ebf6b4ed.js → ISave-55d9dcc3.js} +1 -1
- package/dist/cjs/ImageUtils-d6139911.js +144 -0
- package/dist/cjs/{PersonalizedFilterUtils-7259cf65.js → PersonalizedFilterUtils-263e4d24.js} +65 -5
- package/dist/cjs/{SnkFormConfigManager-cdbb29d4.js → SnkFormConfigManager-5cb9a39c.js} +5 -5
- package/dist/cjs/{SnkMultiSelectionListDataSource-011bec79.js → SnkMultiSelectionListDataSource-5c5badfc.js} +146 -74
- package/dist/cjs/{auth-fetcher-c3cac878.js → auth-fetcher-d1715459.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +1 -1
- package/dist/cjs/configs-button.cjs.entry.js +1 -1
- package/dist/cjs/css-shim-a27d231b.js +6 -0
- package/dist/cjs/{dataunit-fetcher-8bf469e7.js → dataunit-fetcher-fae710c5.js} +91 -110
- package/dist/cjs/dom-ff96a4bc.js +75 -0
- package/dist/cjs/field-config_2.cjs.entry.js +3 -3
- package/dist/cjs/fields-layout.cjs.entry.js +6 -6
- package/dist/cjs/fields-selector.cjs.entry.js +3 -3
- package/dist/cjs/{filter-type.enum-2bb46d2a.js → filter-type.enum-b3b388af.js} +7 -0
- package/dist/cjs/{form-config-fetcher-c7af90d8.js → form-config-fetcher-bbebdcb8.js} +41 -5
- package/dist/cjs/guides-configurator.cjs.entry.js +3 -3
- package/dist/cjs/{index-1cf293c1.js → index-1894343a.js} +1547 -207
- package/dist/cjs/{index-e3e39724.js → index-bc950921.js} +6 -0
- package/dist/cjs/{index-13d05f03.js → index-f0fe7e6e.js} +90 -21
- package/dist/cjs/loader.cjs.js +16 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +6 -6
- package/dist/cjs/sankhyablocks.cjs.js +132 -4
- package/dist/cjs/shadow-css-7e3e0ab1.js +389 -0
- package/dist/cjs/snk-actions-button_9.cjs.entry.js +169 -120
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +28 -9
- package/dist/cjs/snk-attach_11.cjs.entry.js +2971 -0
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +3 -1
- package/dist/cjs/snk-crud.cjs.entry.js +149 -102
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-custom-slot-guide.cjs.entry.js +40 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +62 -16
- package/dist/cjs/{snk-data-unit-7d587ad5.js → snk-data-unit-32237a2d.js} +12 -3
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +32 -20
- package/dist/cjs/snk-dynaform-config-header_5.cjs.entry.js +739 -0
- package/dist/cjs/snk-dynaform-detail-view_2.cjs.entry.js +961 -0
- package/dist/cjs/snk-dynaform-field-config_2.cjs.entry.js +327 -0
- package/dist/cjs/snk-dynaform-guides-view-2c7c6ce4.js +1094 -0
- package/dist/cjs/snk-dynaform-guides-view.cjs.entry.js +23 -0
- package/dist/cjs/snk-dynaform.cjs.entry.js +679 -0
- package/dist/cjs/snk-entity-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-entity-search.cjs.entry.js +211 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +2 -2
- package/dist/cjs/{snk-expression-group_2.cjs.entry.js → snk-expression-group_4.cjs.entry.js} +422 -19
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +175 -121
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +11 -7
- package/dist/cjs/snk-filter-period.cjs.entry.js +14 -7
- package/dist/cjs/snk-filter-search.cjs.entry.js +11 -1
- package/dist/cjs/snk-filter-text.cjs.entry.js +2 -2
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +70 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +21 -11
- package/dist/cjs/snk-grid.cjs.entry.js +91 -36
- package/dist/cjs/{snk-guides-viewer-366d5c32.js → snk-guides-viewer-67b9cca9.js} +78 -214
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +10 -18
- package/dist/cjs/snk-layout-form-config.cjs.entry.js +71 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +1 -1
- package/dist/cjs/snk-pesquisa.cjs.entry.js +6 -7
- package/dist/cjs/snk-print-selector.cjs.entry.js +1 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +184 -127
- package/dist/cjs/{sortable.esm-9a110bb7.js → sortable.esm-b87669ab.js} +76 -90
- package/dist/cjs/taskbar-elements-25f800b3.js +152 -0
- package/dist/cjs/taskbarUtils-99aaa01f.js +236 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +26 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +6 -3
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +30 -6
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +1 -0
- package/dist/collection/components/snk-application/snk-application.js +20 -2
- package/dist/collection/components/snk-attach/snk-attach.css +29 -7
- package/dist/collection/components/snk-attach/snk-attach.js +93 -18
- package/dist/collection/components/snk-configurator/snk-configurator.js +2 -0
- package/dist/collection/components/snk-crud/snk-crud.css +55 -0
- package/dist/collection/components/snk-crud/snk-crud.js +169 -98
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +1 -1
- 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 +21 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.css +17 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-entity-search.js +330 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +90 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +22 -8
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +89 -204
- package/dist/collection/components/snk-crud/utils/taskbarUtils.js +163 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.css +3 -0
- package/dist/collection/components/snk-custom-slot-guide/snk-custom-slot-guide.js +95 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +1 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +2 -2
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +78 -23
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +28 -5
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +43 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +9 -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 +69 -0
- package/dist/collection/components/snk-dynaform/snk-dynaform.js +1661 -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 +182 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-detail-view/snk-dynaform-detail-view.js +1015 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.css +98 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.js +590 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.css +321 -0
- package/dist/collection/components/snk-dynaform/subcomponents/snk-dynaform-guides-view/snk-dynaform-guides-view.js +1587 -0
- package/dist/collection/components/snk-dynaform-form-config/FormConfigHelper.js +325 -0
- package/dist/collection/components/snk-dynaform-form-config/SnkFormConfigManager.js +219 -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-filter-bar/filter-item/editors/snk-filter-number.js +12 -8
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +14 -7
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +30 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +10 -4
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.css +5 -1
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -2
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +7 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +27 -9
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +33 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +1 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +166 -78
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +3 -1
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +3 -3
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +1 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +16 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +4 -4
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +3 -4
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +2 -2
- package/dist/collection/components/snk-form-config/snk-form-config.js +15 -5
- package/dist/collection/components/snk-grid/snk-grid.css +33 -5
- package/dist/collection/components/snk-grid/snk-grid.js +199 -24
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +153 -51
- package/dist/collection/components/snk-image-input/snk-image-input.css +3 -0
- package/dist/collection/components/snk-image-input/snk-image-input.js +338 -0
- package/dist/collection/components/snk-image-input/utils/ImageUtils.js +135 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +1 -1
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +1 -1
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +1 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +13 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +0 -4
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +34 -22
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +8 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +38 -2
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +54 -37
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +27 -1
- package/dist/collection/components/snk-taskbar/processor/simple-taskbar-processor.js +55 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +44 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +248 -132
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.css +12 -0
- package/dist/collection/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.js +19 -0
- package/dist/collection/lib/@types/index.js +6 -0
- package/dist/collection/lib/configs/ConfigStorage.js +5 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +51 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +24 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +15 -104
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +22 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +12 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +18 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +11 -2
- package/dist/collection/lib/message/messageResourceEnUSUtils.js +2 -0
- package/dist/collection/lib/message/messageResourceEsESUtils.js +2 -0
- package/dist/collection/lib/message/messageResourcePtBRUtils.js +2 -0
- package/dist/collection/lib/message/resources/en-us/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/en-us/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/en-us/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/en-us/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/en-us/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/message/resources/es-es/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/es-es/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/es-es/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/es-es/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/es-es/snk-layout-form-config.msg.js +8 -0
- package/dist/collection/lib/message/resources/pt-br/dataUnitDataLoaderHelper.msg.js +0 -13
- package/dist/collection/lib/message/resources/pt-br/snk-configurator.msg.js +1 -1
- package/dist/collection/lib/message/resources/pt-br/snk-crud.msg.js +13 -1
- package/dist/collection/lib/message/resources/pt-br/snk-form.msg.js +1 -0
- package/dist/collection/lib/message/resources/pt-br/snk-image-input.msg.js +11 -0
- package/dist/collection/lib/message/resources/pt-br/snk-layout-form-config.msg.js +10 -2
- package/dist/collection/lib/utils/CrudUtils.js +7 -4
- package/dist/components/ConfigStorage.js +17 -0
- package/dist/components/ContinuousInsertUtils.js +86 -28
- package/dist/components/DataFetcher.js +3 -2731
- package/dist/components/ISave.js +6 -0
- package/dist/components/PersonalizedFilterUtils.js +13 -0
- package/dist/components/SnkFormConfigManager.js +3 -3
- package/dist/components/SnkMessageBuilder.js +2804 -0
- package/dist/components/dataunit-fetcher.js +91 -110
- package/dist/components/field-config2.js +4 -2
- package/dist/components/fields-layout2.js +4 -4
- package/dist/components/form-config-fetcher.js +40 -4
- package/dist/components/guides-configurator2.js +2 -2
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.js +16 -0
- package/dist/components/index2.js +90 -21
- package/dist/components/snk-actions-button2.js +15 -9
- package/dist/components/snk-application2.js +22 -2
- package/dist/components/snk-attach2.js +69 -27
- package/dist/components/snk-configurator2.js +2 -0
- package/dist/components/snk-crud.js +240 -176
- package/dist/components/snk-custom-slot-guide.d.ts +11 -0
- package/dist/components/snk-custom-slot-guide.js +55 -0
- package/dist/components/snk-data-exporter2.js +56 -9
- package/dist/components/snk-data-unit2.js +10 -1
- package/dist/components/snk-detail-view2.js +227 -318
- 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 +2213 -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 +272 -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 +1007 -0
- package/dist/components/snk-entity-search.d.ts +11 -0
- package/dist/components/snk-entity-search.js +6 -0
- package/dist/components/snk-entity-search2.js +231 -0
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +116 -80
- package/dist/components/snk-filter-detail2.js +10 -4
- package/dist/components/snk-filter-item2.js +9 -3
- package/dist/components/snk-filter-modal-item2.js +15 -1
- package/dist/components/snk-filter-modal2.js +27 -10
- package/dist/components/snk-filter-number.js +11 -7
- package/dist/components/snk-filter-period.js +13 -6
- package/dist/components/snk-filter-search.js +12 -1
- package/dist/components/snk-filter-text.js +1 -1
- package/dist/components/snk-form-config2.js +15 -5
- package/dist/components/snk-form-view2.js +79 -10
- package/dist/components/snk-grid-config2.js +109 -50
- package/dist/components/snk-grid2.js +132 -65
- package/dist/components/snk-image-input.d.ts +11 -0
- package/dist/components/snk-image-input.js +6 -0
- package/dist/components/snk-image-input2.js +316 -0
- package/dist/components/snk-layout-form-config2.js +1 -1
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-pesquisa2.js +0 -1
- package/dist/components/snk-simple-crud2.js +46 -45
- package/dist/components/snk-taskbar-skeleton.d.ts +11 -0
- package/dist/components/snk-taskbar-skeleton.js +6 -0
- package/dist/components/snk-taskbar-skeleton2.js +29 -0
- package/dist/components/snk-taskbar2.js +256 -176
- package/dist/components/snk-view-representation2.js +1 -1
- package/dist/components/sortable.esm.js +76 -90
- package/dist/components/taskbar-actions-button2.js +21 -2
- package/dist/components/taskbar-split-button2.js +10 -1
- package/dist/components/taskbarUtils.js +229 -0
- package/dist/esm/{ConfigStorage-22324b6b.js → ConfigStorage-0d1c0695.js} +19 -2
- package/dist/esm/ContinuousInsertUtils-bce77dc1.js +39 -0
- package/dist/esm/{DataFetcher-450828a0.js → DataFetcher-70de9419.js} +121 -49
- package/dist/esm/{FormConfigHelper-e89ca25c.js → FormConfigHelper-d09669f3.js} +3 -1
- package/dist/esm/FormConfigHelper-efc29480.js +328 -0
- package/dist/esm/{ISave-61153166.js → ISave-f5704813.js} +1 -1
- package/dist/esm/ImageUtils-efbea0e4.js +138 -0
- package/dist/esm/{PersonalizedFilterUtils-2db38ff2.js → PersonalizedFilterUtils-45b5803c.js} +62 -2
- package/dist/esm/{SnkFormConfigManager-b5a92e12.js → SnkFormConfigManager-e7f05f79.js} +5 -5
- package/dist/esm/{SnkMultiSelectionListDataSource-d7ce2e54.js → SnkMultiSelectionListDataSource-6ac291a9.js} +141 -69
- package/dist/esm/{auth-fetcher-eef9d01e.js → auth-fetcher-e34880e5.js} +1 -1
- package/dist/esm/config-header.entry.js +1 -1
- package/dist/esm/configs-button.entry.js +1 -1
- package/dist/esm/css-shim-9f2d321e.js +4 -0
- package/dist/esm/{dataunit-fetcher-da9596f6.js → dataunit-fetcher-d26e4a08.js} +91 -110
- package/dist/esm/dom-64053c71.js +73 -0
- package/dist/esm/field-config_2.entry.js +3 -3
- package/dist/esm/fields-layout.entry.js +6 -6
- package/dist/esm/fields-selector.entry.js +3 -3
- package/dist/esm/{filter-type.enum-f6a8fe23.js → filter-type.enum-62b7fe88.js} +8 -1
- package/dist/esm/{form-config-fetcher-8d0a5e1c.js → form-config-fetcher-98c42169.js} +41 -5
- package/dist/esm/guides-configurator.entry.js +3 -3
- package/dist/esm/{index-479e1293.js → index-04f73a26.js} +1539 -207
- package/dist/esm/{index-b40568ff.js → index-c6721886.js} +6 -0
- package/dist/esm/{index-446f9341.js → index-ea250be6.js} +90 -21
- package/dist/esm/loader.js +17 -3
- package/dist/esm/pesquisa-grid_2.entry.js +6 -6
- package/dist/esm/sankhyablocks.js +133 -5
- package/dist/esm/shadow-css-98135883.js +387 -0
- package/dist/esm/snk-actions-button_9.entry.js +170 -121
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +28 -9
- package/dist/esm/snk-attach_11.entry.js +2957 -0
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +3 -1
- package/dist/esm/snk-crud.entry.js +149 -102
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-custom-slot-guide.entry.js +36 -0
- package/dist/esm/snk-data-exporter.entry.js +62 -16
- package/dist/esm/{snk-data-unit-99616a07.js → snk-data-unit-ff57ac90.js} +12 -3
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +32 -20
- package/dist/esm/snk-dynaform-config-header_5.entry.js +731 -0
- package/dist/esm/snk-dynaform-detail-view_2.entry.js +956 -0
- package/dist/esm/snk-dynaform-field-config_2.entry.js +322 -0
- package/dist/esm/snk-dynaform-guides-view-0dfbefc1.js +1091 -0
- package/dist/esm/snk-dynaform-guides-view.entry.js +15 -0
- package/dist/esm/snk-dynaform.entry.js +675 -0
- package/dist/esm/snk-entity-list.entry.js +1 -1
- package/dist/esm/snk-entity-search.entry.js +207 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +2 -2
- package/dist/esm/{snk-expression-group_2.entry.js → snk-expression-group_4.entry.js} +407 -6
- package/dist/esm/snk-filter-bar_4.entry.js +153 -99
- package/dist/esm/snk-filter-binary-select.entry.js +1 -1
- package/dist/esm/snk-filter-checkbox-list.entry.js +1 -1
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +11 -7
- package/dist/esm/snk-filter-period.entry.js +14 -7
- package/dist/esm/snk-filter-search.entry.js +11 -1
- package/dist/esm/snk-filter-text.entry.js +2 -2
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +71 -9
- package/dist/esm/snk-form_2.entry.js +21 -11
- package/dist/esm/snk-grid.entry.js +89 -34
- package/dist/esm/{snk-guides-viewer-240de636.js → snk-guides-viewer-31a0a23d.js} +79 -215
- package/dist/esm/snk-guides-viewer.entry.js +10 -18
- package/dist/esm/snk-layout-form-config.entry.js +67 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js +1 -1
- package/dist/esm/snk-pesquisa.entry.js +6 -7
- package/dist/esm/snk-print-selector.entry.js +1 -1
- package/dist/esm/snk-taskbar.entry.js +185 -128
- package/dist/esm/{sortable.esm-842f85a3.js → sortable.esm-bc277c12.js} +76 -90
- package/dist/esm/taskbar-elements-ba9d6889.js +149 -0
- package/dist/esm/taskbarUtils-cb9db0d9.js +230 -0
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/{p-840fb68c.js → p-097d75b3.js} +2 -2
- package/dist/sankhyablocks/{p-7f7fe6c4.entry.js → p-0a160fb5.entry.js} +1 -1
- package/dist/sankhyablocks/p-0dbd53d9.js +1 -0
- package/dist/sankhyablocks/p-12579574.entry.js +1 -0
- package/dist/sankhyablocks/p-129a4906.entry.js +1 -0
- package/dist/sankhyablocks/{p-162bddae.entry.js → p-175c9576.entry.js} +1 -1
- package/dist/sankhyablocks/p-19351985.entry.js +1 -0
- package/dist/sankhyablocks/p-1d31aec3.entry.js +1 -0
- package/dist/sankhyablocks/{p-cb4343c4.entry.js → p-1d7d5814.entry.js} +1 -1
- package/dist/sankhyablocks/p-24b059ee.entry.js +1 -0
- package/dist/sankhyablocks/{p-f5e942b7.entry.js → p-250b273e.entry.js} +1 -1
- package/dist/sankhyablocks/p-26f1919e.entry.js +1 -0
- package/dist/sankhyablocks/p-2c4f7fdd.entry.js +1 -0
- package/dist/sankhyablocks/p-2c9d0870.js +2 -0
- package/dist/sankhyablocks/{p-75af335e.entry.js → p-2ebda226.entry.js} +1 -1
- package/dist/sankhyablocks/p-2ec98523.js +1 -0
- package/dist/sankhyablocks/p-3a35917e.entry.js +1 -0
- package/dist/sankhyablocks/p-449dfe55.entry.js +1 -0
- package/dist/sankhyablocks/p-46d7e2de.js +1 -0
- package/dist/sankhyablocks/p-4dd574d6.js +1 -0
- package/dist/sankhyablocks/p-541c72ec.entry.js +1 -0
- package/dist/sankhyablocks/p-58709cf9.js +1 -0
- package/dist/sankhyablocks/{p-27482793.entry.js → p-5aae5c74.entry.js} +1 -1
- package/dist/sankhyablocks/p-5aeae67f.js +1 -0
- package/dist/sankhyablocks/p-5d50f59a.entry.js +1 -0
- package/dist/sankhyablocks/p-5ef0e9a8.entry.js +1 -0
- package/dist/sankhyablocks/p-6e0ec0e4.entry.js +1 -0
- package/dist/sankhyablocks/p-6f60df43.js +1 -0
- package/dist/sankhyablocks/{p-825098c1.entry.js → p-752c57f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-e258de96.entry.js → p-76729994.entry.js} +1 -1
- package/dist/sankhyablocks/{p-62e9b9b8.entry.js → p-846d8f79.entry.js} +1 -1
- package/dist/sankhyablocks/p-855ccf64.entry.js +1 -0
- package/dist/sankhyablocks/p-885262ce.entry.js +1 -0
- package/dist/sankhyablocks/{p-118c221e.js → p-8b4d6719.js} +1 -1
- package/dist/sankhyablocks/p-8d1ef77a.js +60 -0
- package/dist/sankhyablocks/{p-7d6f1285.js → p-8d81c8d3.js} +2 -2
- package/dist/sankhyablocks/{p-3d41f5a8.entry.js → p-8d946600.entry.js} +1 -1
- package/dist/sankhyablocks/p-8f5dd87d.entry.js +1 -0
- package/dist/sankhyablocks/p-90037547.js +1 -0
- package/dist/sankhyablocks/{p-96d45943.entry.js → p-90ae6c2e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-0b9a42ad.entry.js → p-9742ea0e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e02a785.js +1 -0
- package/dist/sankhyablocks/{p-2fdac5e6.entry.js → p-9e109f5e.entry.js} +1 -1
- package/dist/sankhyablocks/p-9e7dc97d.entry.js +1 -0
- package/dist/sankhyablocks/p-a25ab2ff.entry.js +1 -0
- package/dist/sankhyablocks/p-a2a9f520.entry.js +1 -0
- package/dist/sankhyablocks/p-a46ac091.js +1 -0
- package/dist/sankhyablocks/p-a696bbcd.entry.js +1 -0
- package/dist/sankhyablocks/p-a73b6b00.js +1 -0
- package/dist/sankhyablocks/p-a9012341.entry.js +11 -0
- package/dist/sankhyablocks/p-abcb646d.js +1 -0
- package/dist/sankhyablocks/{p-180716b2.entry.js → p-ae326d06.entry.js} +1 -1
- package/dist/sankhyablocks/p-af673291.js +1 -0
- package/dist/sankhyablocks/p-b555ce38.entry.js +1 -0
- package/dist/sankhyablocks/p-bd2a845c.js +1 -0
- package/dist/sankhyablocks/p-c3ec6642.js +19 -0
- package/dist/sankhyablocks/p-c4b34e2b.entry.js +1 -0
- package/dist/sankhyablocks/{p-92cfc028.js → p-c9440c8a.js} +1 -1
- package/dist/sankhyablocks/p-ca3728c0.entry.js +1 -0
- package/dist/sankhyablocks/p-cbb8e351.js +7 -0
- package/dist/sankhyablocks/p-cd153f71.entry.js +1 -0
- package/dist/sankhyablocks/p-ce8ccd72.entry.js +1 -0
- package/dist/sankhyablocks/{p-4c763b10.entry.js → p-d657f71f.entry.js} +1 -1
- package/dist/sankhyablocks/p-da455c82.js +12 -0
- package/dist/sankhyablocks/p-e5a3711f.js +1 -0
- package/dist/sankhyablocks/{p-9a63f3f7.entry.js → p-e737fd5a.entry.js} +1 -1
- package/dist/sankhyablocks/p-eac48627.js +1 -0
- package/dist/sankhyablocks/p-ec7c87bb.js +28 -0
- package/dist/sankhyablocks/p-ee56dda6.entry.js +1 -0
- package/dist/sankhyablocks/{p-667cab42.entry.js → p-f152ef98.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e250432.entry.js → p-f7170e10.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7345782c.entry.js → p-f921270b.entry.js} +1 -1
- package/dist/sankhyablocks/p-fb6e3c65.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +4 -0
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +22 -4
- package/dist/types/components/snk-crud/snk-crud.d.ts +33 -11
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +3 -2
- package/dist/types/components/snk-crud/subcomponents/snk-entity-search.d.ts +62 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +12 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +13 -25
- package/dist/types/components/snk-crud/utils/taskbarUtils.d.ts +13 -0
- package/dist/types/components/snk-custom-slot-guide/snk-custom-slot-guide.d.ts +16 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +8 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +16 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +1 -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 +169 -0
- package/dist/types/components/snk-dynaform/subcomponents/snk-dynaform-form-view/snk-dynaform-form-view.d.ts +108 -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/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +1 -1
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +5 -1
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +1 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +33 -16
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +1 -1
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +2 -2
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +1 -1
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +2 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +37 -1
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +11 -0
- package/dist/types/components/snk-image-input/snk-image-input.d.ts +57 -0
- package/dist/types/components/snk-image-input/utils/ImageUtils.d.ts +15 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +1 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +0 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.d.ts +6 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +29 -2
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +5 -0
- package/dist/types/components/snk-taskbar/processor/simple-taskbar-processor.d.ts +31 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +32 -21
- package/dist/types/components/snk-taskbar/subcomponents/snk-taskbar-skeleton.d.ts +3 -0
- package/dist/types/components.d.ts +2640 -1183
- package/dist/types/lib/@types/index.d.ts +6 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +2 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.d.ts +3 -1
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +1 -0
- package/dist/types/lib/message/resources/en-us/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/es-es/snk-image-input.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/pt-br/snk-image-input.msg.d.ts +1 -0
- package/package.json +11 -8
- package/react/components.d.ts +16 -0
- package/react/components.js +16 -0
- package/react/components.js.map +1 -1
- 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 -910
- package/dist/cjs/snk-default-filter.cjs.entry.js +0 -77
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +0 -61
- 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 -108
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +0 -357
- package/dist/cjs/snk-simple-bar.cjs.entry.js +0 -45
- package/dist/cjs/snk-simple-crud.cjs.entry.js +0 -870
- package/dist/cjs/taskbar-elements-fb5d1e08.js +0 -132
- package/dist/cjs/taskbar-processor-2fba34a8.js +0 -53
- 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 -906
- package/dist/esm/snk-default-filter.entry.js +0 -73
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +0 -56
- 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 -104
- package/dist/esm/snk-personalized-filter.entry.js +0 -353
- package/dist/esm/snk-simple-bar.entry.js +0 -41
- package/dist/esm/snk-simple-crud.entry.js +0 -866
- package/dist/esm/taskbar-elements-faaf5d8f.js +0 -129
- package/dist/esm/taskbar-processor-3436124c.js +0 -51
- package/dist/sankhyablocks/p-002d4d2b.js +0 -1
- package/dist/sankhyablocks/p-093f58fa.entry.js +0 -1
- package/dist/sankhyablocks/p-0948dc0a.entry.js +0 -11
- package/dist/sankhyablocks/p-0f3698af.js +0 -1
- package/dist/sankhyablocks/p-1a0caadb.js +0 -1
- package/dist/sankhyablocks/p-1a9c5684.entry.js +0 -1
- package/dist/sankhyablocks/p-1d589380.entry.js +0 -1
- package/dist/sankhyablocks/p-21107f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-28f50632.js +0 -1
- package/dist/sankhyablocks/p-39be771c.js +0 -1
- package/dist/sankhyablocks/p-3ed04f0d.entry.js +0 -1
- package/dist/sankhyablocks/p-471b34f4.entry.js +0 -1
- package/dist/sankhyablocks/p-4963dd2a.entry.js +0 -1
- package/dist/sankhyablocks/p-49ddc27a.entry.js +0 -1
- package/dist/sankhyablocks/p-51833248.js +0 -7
- package/dist/sankhyablocks/p-55798617.js +0 -1
- package/dist/sankhyablocks/p-55f6fef2.entry.js +0 -1
- package/dist/sankhyablocks/p-56f16390.entry.js +0 -1
- package/dist/sankhyablocks/p-58683e28.js +0 -60
- package/dist/sankhyablocks/p-5ea893c5.entry.js +0 -1
- package/dist/sankhyablocks/p-60dd1d27.entry.js +0 -1
- package/dist/sankhyablocks/p-62aef37a.js +0 -1
- package/dist/sankhyablocks/p-669bb869.entry.js +0 -1
- package/dist/sankhyablocks/p-6a4b21dd.js +0 -1
- package/dist/sankhyablocks/p-6ee2ca7a.entry.js +0 -1
- package/dist/sankhyablocks/p-7cac3870.entry.js +0 -1
- package/dist/sankhyablocks/p-84345e7a.js +0 -1
- package/dist/sankhyablocks/p-86e54841.entry.js +0 -1
- package/dist/sankhyablocks/p-88b337fe.entry.js +0 -1
- package/dist/sankhyablocks/p-91005a00.entry.js +0 -1
- package/dist/sankhyablocks/p-91a9abb6.entry.js +0 -1
- package/dist/sankhyablocks/p-988afe78.js +0 -1
- package/dist/sankhyablocks/p-ada013c0.entry.js +0 -1
- package/dist/sankhyablocks/p-b568c1d4.js +0 -1
- package/dist/sankhyablocks/p-b7e891cc.entry.js +0 -1
- package/dist/sankhyablocks/p-b987e15d.js +0 -1
- package/dist/sankhyablocks/p-c35fc941.js +0 -26
- package/dist/sankhyablocks/p-c3dbf441.entry.js +0 -1
- package/dist/sankhyablocks/p-c4fcf1fb.entry.js +0 -1
- package/dist/sankhyablocks/p-c98c79c3.entry.js +0 -1
- package/dist/sankhyablocks/p-cadf4846.entry.js +0 -1
- package/dist/sankhyablocks/p-d8d8169b.js +0 -2
- package/dist/sankhyablocks/p-e91c3c57.entry.js +0 -1
- package/dist/sankhyablocks/p-ea729922.entry.js +0 -1
- package/dist/sankhyablocks/p-ec5fbad8.js +0 -1
- package/dist/sankhyablocks/p-f4184ce7.js +0 -1
|
@@ -0,0 +1,1587 @@
|
|
|
1
|
+
import { Action as DUAction, ElementIDUtils, KeyboardManager, ObjectUtils } from '@sankhyalabs/core';
|
|
2
|
+
import { buildFieldSearch, SHORTCUT_SEARCH_FIELD } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
3
|
+
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
4
|
+
import { Fragment, h } from '@stencil/core';
|
|
5
|
+
import { TAB_NAMES, VIEW_MODE } from '../../../../lib/utils/constants';
|
|
6
|
+
import { SnkFormConfigManager } from '../../../snk-dynaform-form-config/SnkFormConfigManager';
|
|
7
|
+
import { TaskbarElement } from '../../../snk-taskbar/elements/taskbar-elements';
|
|
8
|
+
/** Tamanho inicial (px) do painel master no split; ajustável arrastando o divisor. */
|
|
9
|
+
const MASTER_INITIAL_SIZE = "300px";
|
|
10
|
+
export class SnkDynaformGuidesViewer {
|
|
11
|
+
constructor() {
|
|
12
|
+
/** Refs das abas de detalhe já montadas, por id de guia. */
|
|
13
|
+
this._detailRefs = new Map();
|
|
14
|
+
this.dataUnit = undefined;
|
|
15
|
+
this.dataState = undefined;
|
|
16
|
+
this.configName = undefined;
|
|
17
|
+
this.entityPath = undefined;
|
|
18
|
+
this.actionsList = undefined;
|
|
19
|
+
this.recordsValidator = undefined;
|
|
20
|
+
this.masterFormConfig = undefined;
|
|
21
|
+
this.selectedGuide = undefined;
|
|
22
|
+
this.taskbarManager = undefined;
|
|
23
|
+
this.messagesBuilder = undefined;
|
|
24
|
+
this.canEdit = true;
|
|
25
|
+
this.presentationMode = undefined;
|
|
26
|
+
this.resourceID = undefined;
|
|
27
|
+
this.detailTaskbarCustomContainerId = undefined;
|
|
28
|
+
this.formLegacyConfigName = undefined;
|
|
29
|
+
this.enableGridInsert = false;
|
|
30
|
+
this.ignoreReadOnlyFormFields = undefined;
|
|
31
|
+
this.getCustomTitle = undefined;
|
|
32
|
+
this.customGuidesConfig = [];
|
|
33
|
+
this._guides = [];
|
|
34
|
+
this._formEditorConfigManager = undefined;
|
|
35
|
+
this._formEditorDataUnit = undefined;
|
|
36
|
+
this._fieldToGetFocus = undefined;
|
|
37
|
+
this._customEditors = {};
|
|
38
|
+
this._customRenders = {};
|
|
39
|
+
this._fieldsProps = {};
|
|
40
|
+
this._mainForm = undefined;
|
|
41
|
+
this._mainFormName = undefined;
|
|
42
|
+
this._errorTabs = new Set();
|
|
43
|
+
this._hasToCreateFieldSearch = true;
|
|
44
|
+
this.collapsibleMaster = true;
|
|
45
|
+
this.masterSummaryFieldCount = 12;
|
|
46
|
+
this.masterCollapseThreshold = 700;
|
|
47
|
+
this.maxOpenedGuides = 4;
|
|
48
|
+
this._masterCollapsed = false;
|
|
49
|
+
this._hostTight = false;
|
|
50
|
+
this._visibleSummaryCount = Number.MAX_SAFE_INTEGER;
|
|
51
|
+
this._openedGuideIds = [];
|
|
52
|
+
}
|
|
53
|
+
/** Aba de detalhe atualmente selecionada (derivada do mapa de refs). */
|
|
54
|
+
get _currentDetail() {
|
|
55
|
+
var _a;
|
|
56
|
+
const id = (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id;
|
|
57
|
+
return id ? this._detailRefs.get(id) : undefined;
|
|
58
|
+
}
|
|
59
|
+
observeDataUnit() {
|
|
60
|
+
this.loadGuides(true);
|
|
61
|
+
}
|
|
62
|
+
observeSelectedGuide(newGuide) {
|
|
63
|
+
const id = newGuide === null || newGuide === void 0 ? void 0 : newGuide.id;
|
|
64
|
+
if (!id) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (!this._openedGuideIds.includes(id)) {
|
|
68
|
+
this._openedGuideIds = [...this._openedGuideIds, id];
|
|
69
|
+
}
|
|
70
|
+
this.enforceOpenedGuidesCap(id);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Aplica o teto `maxOpenedGuides` mantendo a ordem de inserção (não reordena
|
|
74
|
+
* — reordenar moveria os nós no DOM e remontaria as abas sobreviventes,
|
|
75
|
+
* anulando o cache). Retém a aba ativa + as inseridas mais recentemente;
|
|
76
|
+
* desmonta as mais antigas e limpa seus refs. `<= 0` desliga o teto.
|
|
77
|
+
*/
|
|
78
|
+
enforceOpenedGuidesCap(activeId) {
|
|
79
|
+
const cap = this.maxOpenedGuides;
|
|
80
|
+
if (cap <= 0 || this._openedGuideIds.length <= cap) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Marca p/ manter: a ativa + as mais recentes (varrendo do fim), até o teto.
|
|
84
|
+
const keep = new Set([activeId]);
|
|
85
|
+
for (let i = this._openedGuideIds.length - 1; i >= 0 && keep.size < cap; i--) {
|
|
86
|
+
keep.add(this._openedGuideIds[i]);
|
|
87
|
+
}
|
|
88
|
+
this._openedGuideIds.forEach(gid => {
|
|
89
|
+
if (!keep.has(gid)) {
|
|
90
|
+
this._detailRefs.delete(gid);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
this._openedGuideIds = this._openedGuideIds.filter(gid => keep.has(gid));
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Ao recolher/expandir, o master permanece montado; só muda o tamanho do
|
|
97
|
+
* seu painel (auto quando recolhido, {@link MASTER_INITIAL_SIZE} quando
|
|
98
|
+
* expandido). Reconstrói o split para aplicar o novo template.
|
|
99
|
+
*/
|
|
100
|
+
observeMasterCollapsed() {
|
|
101
|
+
if (typeof requestAnimationFrame !== 'undefined') {
|
|
102
|
+
requestAnimationFrame(() => { var _a; return (_a = this._splitPanel) === null || _a === void 0 ? void 0 : _a.rebuildLayout(); });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
observeFormConfigManager(value) {
|
|
106
|
+
var _a;
|
|
107
|
+
(_a = this.formConfigVisibilityChanged) === null || _a === void 0 ? void 0 : _a.emit(!!value);
|
|
108
|
+
}
|
|
109
|
+
observeDataState(newValue, oldValue) {
|
|
110
|
+
var _a, _b, _c, _d, _e, _f;
|
|
111
|
+
const newRecordsIds = (_b = (_a = newValue === null || newValue === void 0 ? void 0 : newValue.selectionInfo) === null || _a === void 0 ? void 0 : _a.recordIds) !== null && _b !== void 0 ? _b : (_c = newValue === null || newValue === void 0 ? void 0 : newValue.selectedRecord) === null || _c === void 0 ? void 0 : _c['__record__id__'];
|
|
112
|
+
const oldRecordsIds = (_e = (_d = oldValue === null || oldValue === void 0 ? void 0 : oldValue.selectionInfo) === null || _d === void 0 ? void 0 : _d.recordIds) !== null && _e !== void 0 ? _e : (_f = oldValue === null || oldValue === void 0 ? void 0 : oldValue.selectedRecord) === null || _f === void 0 ? void 0 : _f['__record__id__'];
|
|
113
|
+
if (!ObjectUtils.equals(newRecordsIds, oldRecordsIds)) {
|
|
114
|
+
if ((newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode) && !(oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode)) {
|
|
115
|
+
this._manualOverride = undefined;
|
|
116
|
+
}
|
|
117
|
+
this.loadGuides((oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) != (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode));
|
|
118
|
+
}
|
|
119
|
+
else if ((oldValue === null || oldValue === void 0 ? void 0 : oldValue.insertionMode) !== (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode)) {
|
|
120
|
+
if (newValue === null || newValue === void 0 ? void 0 : newValue.insertionMode) {
|
|
121
|
+
this._manualOverride = undefined;
|
|
122
|
+
}
|
|
123
|
+
this.recomputeMasterCollapse();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
observeMasterFormConfig() {
|
|
127
|
+
var _a;
|
|
128
|
+
this.loadGuides(this.noGuideSelected());
|
|
129
|
+
(_a = this.snkMasterFormConfigChange) === null || _a === void 0 ? void 0 : _a.emit(this.masterFormConfig);
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Abre o configurador do formulário
|
|
133
|
+
* @param detail - Define se a configuração que está sendo carregada é
|
|
134
|
+
* referente a um form detail.
|
|
135
|
+
*/
|
|
136
|
+
async showFormConfig(detail = false) {
|
|
137
|
+
var _a, _b;
|
|
138
|
+
const masterConfig = !detail || this._currentDetail == undefined;
|
|
139
|
+
this._formEditorConfigManager = masterConfig ? this._configManager : (_a = this._currentDetail) === null || _a === void 0 ? void 0 : _a.formConfigManager;
|
|
140
|
+
this._formEditorDataUnit = masterConfig ? this.dataUnit : (_b = this._currentDetail) === null || _b === void 0 ? void 0 : _b.dataUnit;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Registra um editor customizado para campos da grade e formulário
|
|
144
|
+
*/
|
|
145
|
+
async addCustomEditor(fieldName, customEditor) {
|
|
146
|
+
this._customEditors = Object.assign(Object.assign({}, this._customEditors), { [fieldName]: customEditor });
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Registra um render customizado para colunas da grid.
|
|
150
|
+
*/
|
|
151
|
+
async addGridCustomRender(fieldName, customRender) {
|
|
152
|
+
this._customRenders = Object.assign(Object.assign({}, this._customRenders), { [fieldName]: customRender });
|
|
153
|
+
}
|
|
154
|
+
;
|
|
155
|
+
/**
|
|
156
|
+
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
157
|
+
*/
|
|
158
|
+
async setFieldProp(fieldName, propName, value) {
|
|
159
|
+
const newFieldsProps = {
|
|
160
|
+
[fieldName]: Object.assign(Object.assign({}, this._fieldsProps[fieldName]), { [propName]: value })
|
|
161
|
+
};
|
|
162
|
+
this._fieldsProps = Object.assign(Object.assign({}, this._fieldsProps), newFieldsProps);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Atribui o foco para o componente.
|
|
166
|
+
*/
|
|
167
|
+
async setFocus() {
|
|
168
|
+
var _a;
|
|
169
|
+
(_a = this._container) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true });
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Recarrega os guias baseada nos metadados atuais.
|
|
173
|
+
*/
|
|
174
|
+
async reloadGuides() {
|
|
175
|
+
this._manualOverride = undefined;
|
|
176
|
+
this.loadGuides(false);
|
|
177
|
+
}
|
|
178
|
+
exitViewer() {
|
|
179
|
+
var _a, _b;
|
|
180
|
+
if (!this.enableGridInsert && ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isDirty())) {
|
|
181
|
+
this.dataUnit.cancelEdition({ after: () => { var _a; return (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit(); } });
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
(_b = this.exit) === null || _b === void 0 ? void 0 : _b.emit();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
onActionClick(evt) {
|
|
188
|
+
var _a;
|
|
189
|
+
if (evt.detail === TaskbarElement.CONFIGURATOR) {
|
|
190
|
+
if (evt.target.dataset.taskbarOwner != "master") {
|
|
191
|
+
(_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.open();
|
|
192
|
+
evt.stopImmediatePropagation();
|
|
193
|
+
evt.stopPropagation();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
onContentCardChanged(evt) {
|
|
198
|
+
if (!this._configManager || !this.dataUnit) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
SnkDynaformGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
|
|
202
|
+
.then(() => { var _a; return this.masterFormConfig = (_a = this._configManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit); });
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
206
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
207
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
208
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-crud.msg.ts"
|
|
209
|
+
*/
|
|
210
|
+
getMessage(key) {
|
|
211
|
+
var _a, _b, _c, _d, _e, _f;
|
|
212
|
+
if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition) {
|
|
213
|
+
const selectedRecords = (_c = (_b = this.dataUnit.getSelectionInfo()) === null || _b === void 0 ? void 0 : _b.records) !== null && _c !== void 0 ? _c : [];
|
|
214
|
+
return (_d = this.messagesBuilder) === null || _d === void 0 ? void 0 : _d.getMessage("snkCrud.multipleEdition.editing", { COUNT: selectedRecords.length });
|
|
215
|
+
}
|
|
216
|
+
return (_e = this.messagesBuilder) === null || _e === void 0 ? void 0 : _e.getMessage(key, (_f = this.dataUnit) === null || _f === void 0 ? void 0 : _f.getSelectedRecord());
|
|
217
|
+
}
|
|
218
|
+
loadGuides(changeSelection) {
|
|
219
|
+
var _a;
|
|
220
|
+
if (!this.dataUnit || !this._configManager) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
if (!this._configManager.isLoaded) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
this._masterFormMetadata = buildFormMetadata(this.masterFormConfig, this.dataUnit, true, this.customGuidesConfig);
|
|
227
|
+
const allSheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
|
|
228
|
+
if (!allSheets) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
const currentRecord = this.dataUnit.getSelectedRecord();
|
|
232
|
+
const disableDetails = this.hasToDisableDetails(currentRecord);
|
|
233
|
+
const guides = [];
|
|
234
|
+
let mainFormName;
|
|
235
|
+
const listSheetsValues = Array.from(allSheets.values());
|
|
236
|
+
listSheetsValues.forEach((sheet) => {
|
|
237
|
+
if ((sheet === null || sheet === void 0 ? void 0 : sheet.name) === TAB_NAMES.main) {
|
|
238
|
+
mainFormName = sheet === null || sheet === void 0 ? void 0 : sheet.name;
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const item = { id: sheet === null || sheet === void 0 ? void 0 : sheet.name, label: sheet === null || sheet === void 0 ? void 0 : sheet.label };
|
|
242
|
+
if (this.isDetail(sheet === null || sheet === void 0 ? void 0 : sheet.name) && disableDetails) {
|
|
243
|
+
item.tooltip = this.getMessage("snkCrud.detail.tooltip.needSingleSelection");
|
|
244
|
+
item.disabled = true;
|
|
245
|
+
}
|
|
246
|
+
if (sheet.isCustom && sheet.ctxProps) {
|
|
247
|
+
Object.entries(sheet.ctxProps).forEach(([key, value]) => {
|
|
248
|
+
if (value !== undefined) {
|
|
249
|
+
item[key] = value;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
if (!item.props) {
|
|
254
|
+
item.props = {};
|
|
255
|
+
}
|
|
256
|
+
item.props.isAdditional = sheet.name.includes("AD_");
|
|
257
|
+
item.props.isCustom = !!sheet.isCustom;
|
|
258
|
+
guides.push(item);
|
|
259
|
+
});
|
|
260
|
+
this._mainFormName = mainFormName;
|
|
261
|
+
this._guides = guides;
|
|
262
|
+
this.pruneOpenedGuides();
|
|
263
|
+
const currentStillExists = this.selectedGuide
|
|
264
|
+
&& this._guides.some(g => g.id === this.selectedGuide.id);
|
|
265
|
+
if (changeSelection || !currentStillExists) {
|
|
266
|
+
this.selectedGuide = this._guides && this._guides.length > 0 ? this._guides[0] : undefined;
|
|
267
|
+
}
|
|
268
|
+
this.recomputeMasterCollapse();
|
|
269
|
+
}
|
|
270
|
+
/** Remove das guias abertas (e dos refs) ids que não existem mais. */
|
|
271
|
+
pruneOpenedGuides() {
|
|
272
|
+
const validIds = new Set(this._guides.map(g => g.id));
|
|
273
|
+
const filtered = this._openedGuideIds.filter(id => validIds.has(id));
|
|
274
|
+
if (filtered.length !== this._openedGuideIds.length) {
|
|
275
|
+
this._openedGuideIds = filtered;
|
|
276
|
+
}
|
|
277
|
+
Array.from(this._detailRefs.keys())
|
|
278
|
+
.filter(id => !validIds.has(id))
|
|
279
|
+
.forEach(id => this._detailRefs.delete(id));
|
|
280
|
+
}
|
|
281
|
+
hasToDisableDetails(currentRecord) {
|
|
282
|
+
return !currentRecord
|
|
283
|
+
|| !this.dataUnit
|
|
284
|
+
|| this.dataUnit.isNewRecord(currentRecord.__record__id__)
|
|
285
|
+
|| this.dataUnit.isMultipleEdition;
|
|
286
|
+
}
|
|
287
|
+
isDetail(formId) {
|
|
288
|
+
return FormMetadata.getDetailName(formId) != undefined;
|
|
289
|
+
}
|
|
290
|
+
buildTabItems() {
|
|
291
|
+
return this._guides.map((guide, index) => {
|
|
292
|
+
const hasError = this._errorTabs.has(guide.id);
|
|
293
|
+
return {
|
|
294
|
+
tabKey: guide.id,
|
|
295
|
+
label: guide.label,
|
|
296
|
+
index,
|
|
297
|
+
disabled: guide.disabled,
|
|
298
|
+
rightIcon: hasError ? 'alert-circle-inverted' : undefined,
|
|
299
|
+
rightIconError: hasError,
|
|
300
|
+
leftIcon: this.getTabLeftIcon(guide),
|
|
301
|
+
};
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
getTabLeftIcon(guide) {
|
|
305
|
+
var _a, _b;
|
|
306
|
+
if (guide.icon) {
|
|
307
|
+
return guide.icon;
|
|
308
|
+
}
|
|
309
|
+
if ((_a = guide.props) === null || _a === void 0 ? void 0 : _a.isCustom) {
|
|
310
|
+
return 'puzzle-piece';
|
|
311
|
+
}
|
|
312
|
+
if ((_b = guide.props) === null || _b === void 0 ? void 0 : _b.isAdditional) {
|
|
313
|
+
return 'puzzle-piece';
|
|
314
|
+
}
|
|
315
|
+
return undefined;
|
|
316
|
+
}
|
|
317
|
+
isCustomGuide(guideId) {
|
|
318
|
+
var _a;
|
|
319
|
+
if (!guideId) {
|
|
320
|
+
return false;
|
|
321
|
+
}
|
|
322
|
+
return !!((_a = this.customGuidesConfig) === null || _a === void 0 ? void 0 : _a.some(g => g.id === guideId));
|
|
323
|
+
}
|
|
324
|
+
onTabChange(tab) {
|
|
325
|
+
const targetGuide = this._guides.find(g => g.id === tab.tabKey);
|
|
326
|
+
if (!targetGuide || targetGuide.disabled) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
this.selectedGuide = targetGuide;
|
|
330
|
+
this.recomputeMasterCollapse();
|
|
331
|
+
}
|
|
332
|
+
static updateContentCard(formName, cardConfig, propertyChanged, configManager) {
|
|
333
|
+
return configManager.saveCardState(formName, cardConfig, propertyChanged);
|
|
334
|
+
}
|
|
335
|
+
static buildMainForm(params) {
|
|
336
|
+
if (params.formMetadata == undefined || params.mainFormName == undefined) {
|
|
337
|
+
return undefined;
|
|
338
|
+
}
|
|
339
|
+
const mainSheet = params.formMetadata.getSheet(params.mainFormName);
|
|
340
|
+
if (mainSheet == undefined) {
|
|
341
|
+
return undefined;
|
|
342
|
+
}
|
|
343
|
+
return (h("snk-dynaform-form-view", { ref: (ref) => { var _a; return (_a = params.onMainFormRef) === null || _a === void 0 ? void 0 : _a.call(params, ref); }, label: mainSheet.label, name: params.mainFormName, fields: mainSheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, fieldToFocus: params.fieldToFocus, key: params.mainFormName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps, entityPath: params.entityPath, fieldSearch: params.fieldSearch }));
|
|
344
|
+
}
|
|
345
|
+
static buildFixedForms(params) {
|
|
346
|
+
var _a;
|
|
347
|
+
const cardsState = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.cardsState;
|
|
348
|
+
if (cardsState == undefined || params.formMetadata == undefined) {
|
|
349
|
+
return undefined;
|
|
350
|
+
}
|
|
351
|
+
const fixedEntries = Array.from(cardsState.entries())
|
|
352
|
+
.filter(([formName, cardConfig]) => (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed) && formName != params.selectedForm && formName != params.mainFormName)
|
|
353
|
+
.sort(([, cardConfigA], [, cardConfigB]) => {
|
|
354
|
+
const indexA = (cardConfigA === null || cardConfigA === void 0 ? void 0 : cardConfigA.fixSequence) || 0;
|
|
355
|
+
const indexB = (cardConfigB === null || cardConfigB === void 0 ? void 0 : cardConfigB.fixSequence) || 0;
|
|
356
|
+
return indexA - indexB;
|
|
357
|
+
});
|
|
358
|
+
if (fixedEntries.length === 0) {
|
|
359
|
+
return undefined;
|
|
360
|
+
}
|
|
361
|
+
return (h(Fragment, null, fixedEntries.map(([formName]) => {
|
|
362
|
+
const sheet = params.formMetadata.getSheet(formName);
|
|
363
|
+
if (sheet == undefined) {
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
return h("snk-dynaform-form-view", { label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }, customEditors: params.propsCustomEditor, fieldsProps: params.fieldsProps, entityPath: params.entityPath });
|
|
367
|
+
})));
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Renderiza o conteúdo de TODAS as guias já abertas, mantendo-as montadas.
|
|
371
|
+
* Apenas a guia ativa fica visível (as demais recebem `--hidden` via CSS),
|
|
372
|
+
* então voltar a uma aba já visitada não a recarrega.
|
|
373
|
+
*/
|
|
374
|
+
buildGuidesContent() {
|
|
375
|
+
if (!this.selectedGuide) {
|
|
376
|
+
return undefined;
|
|
377
|
+
}
|
|
378
|
+
const activeId = this.selectedGuide.id;
|
|
379
|
+
// Garante que a aba ativa sempre renderiza, mesmo se o watch não a registrou ainda.
|
|
380
|
+
const ids = this._openedGuideIds.includes(activeId)
|
|
381
|
+
? this._openedGuideIds
|
|
382
|
+
: [...this._openedGuideIds, activeId];
|
|
383
|
+
return (h(Fragment, null, ids.map((guideId) => {
|
|
384
|
+
const guide = this._guides.find(g => g.id === guideId);
|
|
385
|
+
if (!guide) {
|
|
386
|
+
return undefined;
|
|
387
|
+
}
|
|
388
|
+
const content = this.renderGuideContent(guide);
|
|
389
|
+
if (content == undefined) {
|
|
390
|
+
return undefined;
|
|
391
|
+
}
|
|
392
|
+
return (h("div", { key: `guide_${guideId}`, class: {
|
|
393
|
+
"snk-guides-viewer__guide-content": true,
|
|
394
|
+
"snk-guides-viewer__guide-content--hidden": guideId !== activeId
|
|
395
|
+
} }, content));
|
|
396
|
+
})));
|
|
397
|
+
}
|
|
398
|
+
renderGuideContent(guide) {
|
|
399
|
+
var _a;
|
|
400
|
+
const guideId = guide.id;
|
|
401
|
+
if (this.isCustomGuide(guideId)) {
|
|
402
|
+
return h("slot", { name: guideId });
|
|
403
|
+
}
|
|
404
|
+
const childEntityName = FormMetadata.getDetailName(guideId);
|
|
405
|
+
if (childEntityName) {
|
|
406
|
+
return (h("snk-dynaform-detail-view", { ref: (ref) => {
|
|
407
|
+
if (ref)
|
|
408
|
+
this._detailRefs.set(guideId, ref);
|
|
409
|
+
}, dataUnitName: `${this.entityPath}/${childEntityName}`, entityName: childEntityName, label: guide.label, key: `detail_${guideId}`, canEdit: this.canEdit, resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId, customEditors: this._customEditors, customRenders: this._customRenders, presentationMode: this.presentationMode, messagesBuilder: this.messagesBuilder }));
|
|
410
|
+
}
|
|
411
|
+
if (guideId === this._mainFormName) {
|
|
412
|
+
return undefined;
|
|
413
|
+
}
|
|
414
|
+
const sheet = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getSheet(guideId);
|
|
415
|
+
if (!sheet) {
|
|
416
|
+
return undefined;
|
|
417
|
+
}
|
|
418
|
+
return (h("snk-dynaform-form-view", { name: guideId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler(), customEditors: this._customEditors, fieldsProps: this._fieldsProps, fieldSearch: this._fieldSearch, entityPath: this.entityPath }));
|
|
419
|
+
}
|
|
420
|
+
clearFieldToFocusHandler() {
|
|
421
|
+
this._fieldToGetFocus = undefined;
|
|
422
|
+
}
|
|
423
|
+
getConfigViewMode() {
|
|
424
|
+
return VIEW_MODE.GRID;
|
|
425
|
+
}
|
|
426
|
+
changeConfigViewMode(mode) {
|
|
427
|
+
var _a, _b;
|
|
428
|
+
if (this._currentDetail) {
|
|
429
|
+
(_b = (_a = this._currentDetail).changeViewMode) === null || _b === void 0 ? void 0 : _b.call(_a, mode);
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
openConfig(mode) {
|
|
433
|
+
var _a, _b, _c, _d;
|
|
434
|
+
(_b = (_a = this._snkConfigurator) === null || _a === void 0 ? void 0 : _a.close) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
435
|
+
if (this._currentDetail) {
|
|
436
|
+
if (mode === VIEW_MODE.FORM) {
|
|
437
|
+
this.showFormConfig(true);
|
|
438
|
+
}
|
|
439
|
+
else {
|
|
440
|
+
(_d = (_c = this._currentDetail).configGrid) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
noGuideSelected() {
|
|
445
|
+
var _a;
|
|
446
|
+
return this.selectedGuide === undefined || TAB_NAMES.main === ((_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Indica se a aba ativa disputa espaço vertical com o formulário principal.
|
|
450
|
+
* Vale para qualquer aba diferente da principal: detalhes E abas nomeadas
|
|
451
|
+
* (ex.: "Identificação"). Nesses casos o master pode ser recolhido.
|
|
452
|
+
*/
|
|
453
|
+
isCollapsibleGuideActive() {
|
|
454
|
+
var _a;
|
|
455
|
+
const id = (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id;
|
|
456
|
+
if (!id) {
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
return id !== this._mainFormName;
|
|
460
|
+
}
|
|
461
|
+
hasRecordToSummarize() {
|
|
462
|
+
var _a;
|
|
463
|
+
return ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecord()) != undefined;
|
|
464
|
+
}
|
|
465
|
+
hasMainFormFields() {
|
|
466
|
+
var _a, _b;
|
|
467
|
+
if (!this._masterFormMetadata || !this._mainFormName) {
|
|
468
|
+
return false;
|
|
469
|
+
}
|
|
470
|
+
const sheet = this._masterFormMetadata.getSheet(this._mainFormName);
|
|
471
|
+
return ((_b = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.fields) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
|
|
472
|
+
}
|
|
473
|
+
recomputeMasterCollapse() {
|
|
474
|
+
var _a;
|
|
475
|
+
if (!this.collapsibleMaster || !this.isCollapsibleGuideActive() || !this.hasRecordToSummarize()) {
|
|
476
|
+
this._masterCollapsed = false;
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
if (this._manualOverride != undefined) {
|
|
480
|
+
this._masterCollapsed = this._manualOverride;
|
|
481
|
+
return;
|
|
482
|
+
}
|
|
483
|
+
this._masterCollapsed = ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode) ? false : this._hostTight;
|
|
484
|
+
}
|
|
485
|
+
/** Pool de campos candidatos (todos do form principal, até o limite máximo). */
|
|
486
|
+
getSummaryFields() {
|
|
487
|
+
var _a;
|
|
488
|
+
if (!this._masterFormMetadata || !this._mainFormName) {
|
|
489
|
+
return [];
|
|
490
|
+
}
|
|
491
|
+
const sheet = this._masterFormMetadata.getSheet(this._mainFormName);
|
|
492
|
+
const fields = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.fields) !== null && _a !== void 0 ? _a : [];
|
|
493
|
+
return fields.slice(0, this.masterSummaryFieldCount);
|
|
494
|
+
}
|
|
495
|
+
/** Record atual (para consultar campos inválidos no DataUnit). */
|
|
496
|
+
getCurrentRecordId() {
|
|
497
|
+
var _a, _b;
|
|
498
|
+
return (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectedRecord()) === null || _b === void 0 ? void 0 : _b["__record__id__"];
|
|
499
|
+
}
|
|
500
|
+
/** Mensagem de invalidez do campo no registro atual, se houver. */
|
|
501
|
+
getFieldInvalidMessage(fieldName) {
|
|
502
|
+
var _a;
|
|
503
|
+
const recordId = this.getCurrentRecordId();
|
|
504
|
+
return recordId == undefined ? undefined : (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getInvalidMessage(recordId, fieldName);
|
|
505
|
+
}
|
|
506
|
+
renderSummaryItem(field) {
|
|
507
|
+
var _a;
|
|
508
|
+
const invalidMessage = this.getFieldInvalidMessage(field.name);
|
|
509
|
+
return (h("span", { class: {
|
|
510
|
+
"snk-guides-viewer__master-summary-item": true,
|
|
511
|
+
"snk-guides-viewer__master-summary-item--invalid": invalidMessage != undefined
|
|
512
|
+
}, key: field.name, title: invalidMessage }, h("span", { class: "snk-guides-viewer__master-summary-label" }, h("span", { class: "snk-guides-viewer__master-summary-label-text" }, (_a = field.label) !== null && _a !== void 0 ? _a : field.name), field.required &&
|
|
513
|
+
h("span", { class: "snk-guides-viewer__master-summary-required", "aria-hidden": "true" }, "*")), h("span", { class: "snk-guides-viewer__master-summary-value" }, this.formatSummaryValue(field.name))));
|
|
514
|
+
}
|
|
515
|
+
buildMasterSummary() {
|
|
516
|
+
var _a;
|
|
517
|
+
const fields = this.getSummaryFields();
|
|
518
|
+
const visible = fields.slice(0, this._visibleSummaryCount);
|
|
519
|
+
return (h("button", { type: "button", class: "snk-guides-viewer__master-summary", "aria-expanded": "false", "aria-label": (_a = this.getMessage("snkCrud.master.expand")) !== null && _a !== void 0 ? _a : "Expandir formulário principal", onClick: () => this.toggleMasterCollapse() }, h("div", { class: "snk-guides-viewer__master-summary-fields", ref: (el) => this.bindSummaryFields(el) }, visible.map((field) => this.renderSummaryItem(field))), h("div", { class: "snk-guides-viewer__master-summary-measure", "aria-hidden": "true", ref: (el) => { this._summaryMeasureEl = el; } }, fields.map((field) => this.renderSummaryItem(field))), h("ez-icon", { iconName: "chevron-down", class: "snk-guides-viewer__master-summary-chevron" })));
|
|
520
|
+
}
|
|
521
|
+
bindSummaryFields(el) {
|
|
522
|
+
var _a;
|
|
523
|
+
if (!el || el === this._summaryFieldsEl) {
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
this._summaryFieldsEl = el;
|
|
527
|
+
(_a = this._summaryResizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
528
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
this._summaryResizeObserver = new ResizeObserver(() => this.recomputeVisibleSummary());
|
|
532
|
+
this._summaryResizeObserver.observe(el);
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Mede as larguras naturais (via row-fantasma) e calcula quantos campos
|
|
536
|
+
* cabem na largura visível. Só grava no estado quando o número muda, então
|
|
537
|
+
* não há loop de renderização.
|
|
538
|
+
*/
|
|
539
|
+
recomputeVisibleSummary() {
|
|
540
|
+
const wrap = this._summaryFieldsEl;
|
|
541
|
+
const ghost = this._summaryMeasureEl;
|
|
542
|
+
if (!wrap || !ghost) {
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
const avail = wrap.clientWidth;
|
|
546
|
+
if (avail <= 0) {
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
const items = Array.from(ghost.children);
|
|
550
|
+
if (items.length === 0) {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
const gapStr = getComputedStyle(ghost).columnGap || getComputedStyle(ghost).gap || "0";
|
|
554
|
+
const gap = parseFloat(gapStr) || 0;
|
|
555
|
+
let used = 0;
|
|
556
|
+
let count = 0;
|
|
557
|
+
for (let i = 0; i < items.length; i++) {
|
|
558
|
+
const add = items[i].offsetWidth + (i > 0 ? gap : 0);
|
|
559
|
+
if (used + add > avail && count >= 1) {
|
|
560
|
+
break;
|
|
561
|
+
}
|
|
562
|
+
used += add;
|
|
563
|
+
count++;
|
|
564
|
+
}
|
|
565
|
+
count = Math.max(1, Math.min(count, items.length));
|
|
566
|
+
if (count !== this._visibleSummaryCount) {
|
|
567
|
+
this._visibleSummaryCount = count;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
formatSummaryValue(fieldName) {
|
|
571
|
+
var _a;
|
|
572
|
+
const formatted = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getFormattedValue(fieldName);
|
|
573
|
+
return (formatted == undefined || formatted === "") ? "-" : formatted;
|
|
574
|
+
}
|
|
575
|
+
toggleMasterCollapse() {
|
|
576
|
+
this._masterCollapsed = !this._masterCollapsed;
|
|
577
|
+
this._manualOverride = this._masterCollapsed;
|
|
578
|
+
}
|
|
579
|
+
buildCollapseControl() {
|
|
580
|
+
var _a;
|
|
581
|
+
const label = (_a = this.getMessage("snkCrud.master.collapse")) !== null && _a !== void 0 ? _a : "Recolher";
|
|
582
|
+
return (h("div", { class: "snk-guides-viewer__master-collapse-btn" }, h("ez-tooltip", { message: label }, h("ez-button", { mode: "icon", iconName: "chevron-up", size: "x-small", variant: "secondary", "aria-label": label, onClick: () => this.toggleMasterCollapse() }))));
|
|
583
|
+
}
|
|
584
|
+
/** Bloco master (resumo + form), sempre montado; recolhe só via CSS. */
|
|
585
|
+
renderMaster(params, canCollapseMaster) {
|
|
586
|
+
return (h("div", { class: {
|
|
587
|
+
"snk-guides-viewer__master": true,
|
|
588
|
+
"snk-guides-viewer__master--collapsed": canCollapseMaster && this._masterCollapsed
|
|
589
|
+
} }, canCollapseMaster && this.buildMasterSummary(), h("div", { class: "snk-guides-viewer__master-expanded" }, SnkDynaformGuidesViewer.buildMainForm(params), canCollapseMaster && this.buildCollapseControl())));
|
|
590
|
+
}
|
|
591
|
+
/** Abas (quando houver) + container de detalhe. */
|
|
592
|
+
renderTabsAndDetail(params, showTabs) {
|
|
593
|
+
var _a;
|
|
594
|
+
return (h("div", { class: "snk-guides-viewer__panel" }, showTabs &&
|
|
595
|
+
h("ez-tabselector", Object.assign({ class: "snk-guides-viewer__tabselector", tabs: this.buildTabItems(), selectedTab: (_a = this.selectedGuide) === null || _a === void 0 ? void 0 : _a.id, onEzChange: (evt) => this.onTabChange(evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("tabselector")}` })), h("div", { class: "snk-guides-viewer__detail-container" }, SnkDynaformGuidesViewer.buildFixedForms(params), this.buildGuidesContent())));
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Vincula o container e (re)inicia o observador de tamanho. Chamado pelo
|
|
599
|
+
* `ref` da section — o `componentDidLoad` não serve porque o config carrega
|
|
600
|
+
* de forma assíncrona e a section só monta depois de `isLoaded`.
|
|
601
|
+
*/
|
|
602
|
+
bindContainer(el) {
|
|
603
|
+
if (!el || el === this._container) {
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
606
|
+
this._container = el;
|
|
607
|
+
this.setupResizeObserver();
|
|
608
|
+
}
|
|
609
|
+
setupResizeObserver() {
|
|
610
|
+
var _a;
|
|
611
|
+
if (!this._container || typeof ResizeObserver === 'undefined') {
|
|
612
|
+
return;
|
|
613
|
+
}
|
|
614
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
615
|
+
this._resizeObserver = new ResizeObserver((entries) => {
|
|
616
|
+
var _a, _b, _c;
|
|
617
|
+
const height = (_c = (_b = (_a = entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect) === null || _b === void 0 ? void 0 : _b.height) !== null && _c !== void 0 ? _c : 0;
|
|
618
|
+
const tight = height > 0 && height < this.masterCollapseThreshold;
|
|
619
|
+
if (tight !== this._hostTight) {
|
|
620
|
+
this._hostTight = tight;
|
|
621
|
+
this.recomputeMasterCollapse();
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
this._resizeObserver.observe(this._container);
|
|
625
|
+
}
|
|
626
|
+
addFormLegacyConfigName() {
|
|
627
|
+
var _a;
|
|
628
|
+
if (this.formLegacyConfigName) {
|
|
629
|
+
(_a = this._configManager) === null || _a === void 0 ? void 0 : _a.addFormLegacyConfig(this.formLegacyConfigName);
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
setMasterFormConfig(config) {
|
|
633
|
+
this.masterFormConfig = config;
|
|
634
|
+
}
|
|
635
|
+
componentWillLoad() {
|
|
636
|
+
var _a;
|
|
637
|
+
if (this.resourceID == undefined) {
|
|
638
|
+
throw new Error((_a = this.getMessage("snkCrud.errors.resourceIDNotProvided")) !== null && _a !== void 0 ? _a : "");
|
|
639
|
+
}
|
|
640
|
+
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID, this.setMasterFormConfig.bind(this), this.dataUnit);
|
|
641
|
+
this.addFormLegacyConfigName();
|
|
642
|
+
this._configManager.loadConfig();
|
|
643
|
+
}
|
|
644
|
+
async dataUnitActionHandler(action) {
|
|
645
|
+
var _a;
|
|
646
|
+
switch (action.type) {
|
|
647
|
+
case DUAction.EDITION_CANCELED:
|
|
648
|
+
case DUAction.DATA_SAVED:
|
|
649
|
+
this.refreshValidationState();
|
|
650
|
+
if ((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition) {
|
|
651
|
+
this.exitViewer();
|
|
652
|
+
if (this.dataUnit) {
|
|
653
|
+
this.dataUnit.isMultipleEdition = false;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
break;
|
|
657
|
+
case DUAction.FIELD_INVALIDATED:
|
|
658
|
+
case DUAction.INVALIDATE_CLEAN:
|
|
659
|
+
case DUAction.SAVING_CANCELED:
|
|
660
|
+
this.refreshValidationState();
|
|
661
|
+
break;
|
|
662
|
+
case DUAction.METADATA_LOADED:
|
|
663
|
+
case DUAction.MULTIPLE_EDITION_CHANGED:
|
|
664
|
+
this.loadGuides(this.noGuideSelected());
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Reavalia abas com erro e o realce da tira-resumo a partir do estado atual
|
|
670
|
+
* de campos inválidos do DataUnit. Marca abas cujos campos ainda estão
|
|
671
|
+
* inválidos e DESMARCA as que foram preenchidas/limpas ou canceladas.
|
|
672
|
+
*/
|
|
673
|
+
refreshValidationState() {
|
|
674
|
+
var _a, _b, _c;
|
|
675
|
+
const recordId = this.getCurrentRecordId();
|
|
676
|
+
const sheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
|
|
677
|
+
const errored = new Set();
|
|
678
|
+
if (recordId != undefined && sheets) {
|
|
679
|
+
for (const sheet of sheets) {
|
|
680
|
+
const guideName = sheet[0];
|
|
681
|
+
const fields = (_b = sheet[1]) === null || _b === void 0 ? void 0 : _b.fields;
|
|
682
|
+
if (!fields) {
|
|
683
|
+
continue;
|
|
684
|
+
}
|
|
685
|
+
for (const field of fields) {
|
|
686
|
+
if (((_c = this.dataUnit) === null || _c === void 0 ? void 0 : _c.getInvalidMessage(recordId, field.name)) != undefined) {
|
|
687
|
+
errored.add(guideName);
|
|
688
|
+
break;
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
const prev = this._errorTabs;
|
|
694
|
+
if (prev.size === errored.size && [...errored].every(id => prev.has(id))) {
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
this._errorTabs = errored;
|
|
698
|
+
}
|
|
699
|
+
getGuideName(fieldName) {
|
|
700
|
+
var _a, _b;
|
|
701
|
+
const sheets = (_a = this._masterFormMetadata) === null || _a === void 0 ? void 0 : _a.getAllSheets();
|
|
702
|
+
if (!sheets) {
|
|
703
|
+
return "";
|
|
704
|
+
}
|
|
705
|
+
for (const sheet of sheets) {
|
|
706
|
+
const formFields = (_b = sheet[1]) === null || _b === void 0 ? void 0 : _b.fields;
|
|
707
|
+
if (!formFields)
|
|
708
|
+
continue;
|
|
709
|
+
for (const field of formFields) {
|
|
710
|
+
if (field.name === fieldName) {
|
|
711
|
+
return sheet[0];
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
return "";
|
|
716
|
+
}
|
|
717
|
+
getTitle() {
|
|
718
|
+
var _a, _b, _c;
|
|
719
|
+
return (_c = (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title")) !== null && _c !== void 0 ? _c : "";
|
|
720
|
+
}
|
|
721
|
+
getTitleTooltip() {
|
|
722
|
+
var _a;
|
|
723
|
+
if (!((_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.isMultipleEdition))
|
|
724
|
+
return undefined;
|
|
725
|
+
return this.buildRecordIdsArray();
|
|
726
|
+
}
|
|
727
|
+
buildRecordIdsArray() {
|
|
728
|
+
var _a, _b, _c;
|
|
729
|
+
const selectedRecords = (_c = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo()) === null || _b === void 0 ? void 0 : _b.records) !== null && _c !== void 0 ? _c : [];
|
|
730
|
+
if (selectedRecords.length === 0) {
|
|
731
|
+
return "[]";
|
|
732
|
+
}
|
|
733
|
+
const labels = selectedRecords.map(record => { var _a; return (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkCrud.title", record); });
|
|
734
|
+
return `[${labels.join(", ")}]`;
|
|
735
|
+
}
|
|
736
|
+
getFieldsSearch() {
|
|
737
|
+
var _a;
|
|
738
|
+
if (this._fieldSearch == undefined || this._hasToCreateFieldSearch) {
|
|
739
|
+
this._hasToCreateFieldSearch = false;
|
|
740
|
+
const item = {
|
|
741
|
+
label: (_a = this.getMessage("snkSimpleCrud.findFields")) !== null && _a !== void 0 ? _a : "Busca de campos",
|
|
742
|
+
value: "findFields",
|
|
743
|
+
};
|
|
744
|
+
this._fieldSearch = buildFieldSearch(item, ({ argument }) => this.fieldsOptionLoader(argument), (option) => this.onSelectField(option));
|
|
745
|
+
}
|
|
746
|
+
return this._fieldSearch;
|
|
747
|
+
}
|
|
748
|
+
fieldsOptionLoader(argument) {
|
|
749
|
+
var _a, _b;
|
|
750
|
+
return Promise.resolve((_b = (_a = this._configManager) === null || _a === void 0 ? void 0 : _a.getFieldsList(argument).map(field => ({ value: field.name, label: field.label }))) !== null && _b !== void 0 ? _b : []);
|
|
751
|
+
}
|
|
752
|
+
onSelectField(option) {
|
|
753
|
+
var _a, _b, _c;
|
|
754
|
+
if (option == undefined) {
|
|
755
|
+
return;
|
|
756
|
+
}
|
|
757
|
+
this._fieldToGetFocus = option.value;
|
|
758
|
+
const fieldGuideName = this.getGuideName(option.value);
|
|
759
|
+
if (!fieldGuideName) {
|
|
760
|
+
return;
|
|
761
|
+
}
|
|
762
|
+
if (fieldGuideName === this._mainFormName) {
|
|
763
|
+
(_b = (_a = this._mainForm) === null || _a === void 0 ? void 0 : _a.showUp) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
764
|
+
return;
|
|
765
|
+
}
|
|
766
|
+
if (fieldGuideName !== ((_c = this.selectedGuide) === null || _c === void 0 ? void 0 : _c.id)) {
|
|
767
|
+
const targetGuide = this._guides.find(g => g.id === fieldGuideName);
|
|
768
|
+
if (targetGuide && !targetGuide.disabled) {
|
|
769
|
+
this.selectedGuide = targetGuide;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
componentDidLoad() {
|
|
774
|
+
var _a;
|
|
775
|
+
(_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.subscribe(this.dataUnitActionHandler.bind(this));
|
|
776
|
+
this.initKeyboardManager();
|
|
777
|
+
this.getFieldsSearch();
|
|
778
|
+
}
|
|
779
|
+
componentDidRender() {
|
|
780
|
+
if (this._masterCollapsed) {
|
|
781
|
+
this.recomputeVisibleSummary();
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
disconnectedCallback() {
|
|
785
|
+
var _a, _b, _c;
|
|
786
|
+
(_a = this._keyboardManager) === null || _a === void 0 ? void 0 : _a.unbindAllShortcutKeys();
|
|
787
|
+
(_b = this._resizeObserver) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
788
|
+
this._resizeObserver = undefined;
|
|
789
|
+
(_c = this._summaryResizeObserver) === null || _c === void 0 ? void 0 : _c.disconnect();
|
|
790
|
+
this._summaryResizeObserver = undefined;
|
|
791
|
+
}
|
|
792
|
+
async initKeyboardManager() {
|
|
793
|
+
this._keyboardManager = new KeyboardManager({ propagate: false, element: this._element });
|
|
794
|
+
if (this._keyboardManager) {
|
|
795
|
+
this._keyboardManager.bind(SHORTCUT_SEARCH_FIELD, async () => {
|
|
796
|
+
var _a, _b;
|
|
797
|
+
if (!this._mainForm)
|
|
798
|
+
return;
|
|
799
|
+
await ((_b = (_a = this._mainForm).showSearchField) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
800
|
+
}, { description: this.getMessage("snkSimpleCrud.findFields"), element: this._element });
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
render() {
|
|
804
|
+
var _a, _b;
|
|
805
|
+
if (this._formEditorConfigManager != undefined) {
|
|
806
|
+
return (h("snk-dynaform-form-config", { ref: (ref) => {
|
|
807
|
+
if (ref)
|
|
808
|
+
this._container = ref;
|
|
809
|
+
}, tabindex: -1, dataUnit: this._formEditorDataUnit, messagesBuilder: this.messagesBuilder, configManager: this._formEditorConfigManager, onConfigClose: () => this._formEditorConfigManager = undefined }));
|
|
810
|
+
}
|
|
811
|
+
if (!this.dataUnit || !((_a = this._configManager) === null || _a === void 0 ? void 0 : _a.isLoaded)) {
|
|
812
|
+
return undefined;
|
|
813
|
+
}
|
|
814
|
+
const showTabs = this._guides && this._guides.length > 0;
|
|
815
|
+
const showMaster = this.hasMainFormFields();
|
|
816
|
+
const canCollapseMaster = showMaster && this.collapsibleMaster
|
|
817
|
+
&& this.isCollapsibleGuideActive()
|
|
818
|
+
&& this.hasRecordToSummarize();
|
|
819
|
+
const masterExpandedVisible = !(canCollapseMaster && this._masterCollapsed);
|
|
820
|
+
const fixedFormsParams = {
|
|
821
|
+
formConfig: this.masterFormConfig,
|
|
822
|
+
formMetadata: this._masterFormMetadata,
|
|
823
|
+
selectedForm: (_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.id,
|
|
824
|
+
mainFormName: this._mainFormName,
|
|
825
|
+
dataUnit: this.dataUnit,
|
|
826
|
+
recordsValidator: this.recordsValidator,
|
|
827
|
+
fieldToFocus: this._fieldToGetFocus,
|
|
828
|
+
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this),
|
|
829
|
+
propsCustomEditor: this._customEditors,
|
|
830
|
+
fieldsProps: this._fieldsProps,
|
|
831
|
+
entityPath: this.entityPath,
|
|
832
|
+
fieldSearch: this._fieldSearch,
|
|
833
|
+
onMainFormRef: (ref) => { this._mainForm = ref; }
|
|
834
|
+
};
|
|
835
|
+
return (h("section", { class: "snk-guides-viewer", ref: (ref) => this.bindContainer(ref), tabindex: -1 }, this.getTitle() && (h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center", key: "header" }, h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge", title: this.getTitleTooltip() }, this.getTitle()))))), h("div", { class: "snk-guides-viewer__container" }, showTabs && showMaster ? (
|
|
836
|
+
/* Master e abas: split redimensionável. Master alterna resumo/expandido via CSS
|
|
837
|
+
sem remontar o snk-dynaform-form-view (evita recarga/lentidão). */
|
|
838
|
+
h("ez-split-panel", { direction: "row", structural: true, showGutter: masterExpandedVisible, class: {
|
|
839
|
+
"snk-guides-viewer__split": true,
|
|
840
|
+
"snk-guides-viewer__split--collapsed": !masterExpandedVisible
|
|
841
|
+
}, ref: (ref) => {
|
|
842
|
+
if (ref)
|
|
843
|
+
this._splitPanel = ref;
|
|
844
|
+
} }, h("ez-split-item", { class: "snk-guides-viewer__split-master", structural: true, enableExpand: false, size: masterExpandedVisible ? MASTER_INITIAL_SIZE : "auto" }, this.renderMaster(fixedFormsParams, canCollapseMaster)), h("ez-split-item", { class: "snk-guides-viewer__split-content", structural: true, outline: true, enableExpand: false }, this.renderTabsAndDetail(fixedFormsParams, true)))) : showTabs ? (
|
|
845
|
+
/* Sem campos no master: abas ocupam toda a área. */
|
|
846
|
+
this.renderTabsAndDetail(fixedFormsParams, true)) : (
|
|
847
|
+
/* Sem abas: master ocupa toda a área. */
|
|
848
|
+
this.renderMaster(fixedFormsParams, canCollapseMaster))), h("snk-configurator", { ref: (ref) => {
|
|
849
|
+
if (ref)
|
|
850
|
+
this._snkConfigurator = ref;
|
|
851
|
+
}, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID, layoutFormConfig: false, showActionButtons: true })));
|
|
852
|
+
}
|
|
853
|
+
static get is() { return "snk-dynaform-guides-view"; }
|
|
854
|
+
static get encapsulation() { return "scoped"; }
|
|
855
|
+
static get originalStyleUrls() {
|
|
856
|
+
return {
|
|
857
|
+
"$": ["snk-dynaform-guides-view.css"]
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
static get styleUrls() {
|
|
861
|
+
return {
|
|
862
|
+
"$": ["snk-dynaform-guides-view.css"]
|
|
863
|
+
};
|
|
864
|
+
}
|
|
865
|
+
static get properties() {
|
|
866
|
+
return {
|
|
867
|
+
"dataUnit": {
|
|
868
|
+
"type": "unknown",
|
|
869
|
+
"mutable": false,
|
|
870
|
+
"complexType": {
|
|
871
|
+
"original": "DataUnit",
|
|
872
|
+
"resolved": "DataUnit",
|
|
873
|
+
"references": {
|
|
874
|
+
"DataUnit": {
|
|
875
|
+
"location": "import",
|
|
876
|
+
"path": "@sankhyalabs/core"
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
},
|
|
880
|
+
"required": false,
|
|
881
|
+
"optional": true,
|
|
882
|
+
"docs": {
|
|
883
|
+
"tags": [],
|
|
884
|
+
"text": "Inst\u00E2ncia do DataUnit master."
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
"dataState": {
|
|
888
|
+
"type": "unknown",
|
|
889
|
+
"mutable": false,
|
|
890
|
+
"complexType": {
|
|
891
|
+
"original": "DataState",
|
|
892
|
+
"resolved": "DataState",
|
|
893
|
+
"references": {
|
|
894
|
+
"DataState": {
|
|
895
|
+
"location": "import",
|
|
896
|
+
"path": "../../../snk-data-unit/snk-data-unit"
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
"required": false,
|
|
901
|
+
"optional": true,
|
|
902
|
+
"docs": {
|
|
903
|
+
"tags": [],
|
|
904
|
+
"text": "Representa o estado do dataUnit master."
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
"configName": {
|
|
908
|
+
"type": "string",
|
|
909
|
+
"mutable": false,
|
|
910
|
+
"complexType": {
|
|
911
|
+
"original": "string",
|
|
912
|
+
"resolved": "string",
|
|
913
|
+
"references": {}
|
|
914
|
+
},
|
|
915
|
+
"required": false,
|
|
916
|
+
"optional": true,
|
|
917
|
+
"docs": {
|
|
918
|
+
"tags": [],
|
|
919
|
+
"text": "Nome usado para guardar/recuperar as configura\u00E7\u00F5es do formul\u00E1rio."
|
|
920
|
+
},
|
|
921
|
+
"attribute": "config-name",
|
|
922
|
+
"reflect": false
|
|
923
|
+
},
|
|
924
|
+
"entityPath": {
|
|
925
|
+
"type": "string",
|
|
926
|
+
"mutable": false,
|
|
927
|
+
"complexType": {
|
|
928
|
+
"original": "string",
|
|
929
|
+
"resolved": "string",
|
|
930
|
+
"references": {}
|
|
931
|
+
},
|
|
932
|
+
"required": false,
|
|
933
|
+
"optional": true,
|
|
934
|
+
"docs": {
|
|
935
|
+
"tags": [],
|
|
936
|
+
"text": "Determina todo o caminho de entidades."
|
|
937
|
+
},
|
|
938
|
+
"attribute": "entity-path",
|
|
939
|
+
"reflect": false
|
|
940
|
+
},
|
|
941
|
+
"actionsList": {
|
|
942
|
+
"type": "unknown",
|
|
943
|
+
"mutable": false,
|
|
944
|
+
"complexType": {
|
|
945
|
+
"original": "Array<Action>",
|
|
946
|
+
"resolved": "Action[]",
|
|
947
|
+
"references": {
|
|
948
|
+
"Array": {
|
|
949
|
+
"location": "global"
|
|
950
|
+
},
|
|
951
|
+
"Action": {
|
|
952
|
+
"location": "import",
|
|
953
|
+
"path": "../../../snk-taskbar/snk-taskbar"
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
"required": false,
|
|
958
|
+
"optional": true,
|
|
959
|
+
"docs": {
|
|
960
|
+
"tags": [],
|
|
961
|
+
"text": "A\u00E7\u00F5es a serem colocadas no bot\u00E3o \"Mais op\u00E7\u00F5es\" do componente snk-taskbar."
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
"recordsValidator": {
|
|
965
|
+
"type": "unknown",
|
|
966
|
+
"mutable": false,
|
|
967
|
+
"complexType": {
|
|
968
|
+
"original": "IRecordValidator",
|
|
969
|
+
"resolved": "IRecordValidator",
|
|
970
|
+
"references": {
|
|
971
|
+
"IRecordValidator": {
|
|
972
|
+
"location": "import",
|
|
973
|
+
"path": "@sankhyalabs/ezui/dist/types/utils/form/interfaces"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
"required": false,
|
|
978
|
+
"optional": true,
|
|
979
|
+
"docs": {
|
|
980
|
+
"tags": [],
|
|
981
|
+
"text": "Validador respons\u00E1vel por checar a integridade das informa\u00E7\u00F5es do registro."
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
"masterFormConfig": {
|
|
985
|
+
"type": "unknown",
|
|
986
|
+
"mutable": true,
|
|
987
|
+
"complexType": {
|
|
988
|
+
"original": "IFormConfig",
|
|
989
|
+
"resolved": "IFormConfig",
|
|
990
|
+
"references": {
|
|
991
|
+
"IFormConfig": {
|
|
992
|
+
"location": "import",
|
|
993
|
+
"path": "@sankhyalabs/ezui/dist/types/utils/form/interfaces"
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"required": false,
|
|
998
|
+
"optional": true,
|
|
999
|
+
"docs": {
|
|
1000
|
+
"tags": [],
|
|
1001
|
+
"text": "Configura\u00E7\u00E3o do formul\u00E1rio master."
|
|
1002
|
+
}
|
|
1003
|
+
},
|
|
1004
|
+
"selectedGuide": {
|
|
1005
|
+
"type": "unknown",
|
|
1006
|
+
"mutable": true,
|
|
1007
|
+
"complexType": {
|
|
1008
|
+
"original": "IGuideItem",
|
|
1009
|
+
"resolved": "IGuideItem",
|
|
1010
|
+
"references": {
|
|
1011
|
+
"IGuideItem": {
|
|
1012
|
+
"location": "import",
|
|
1013
|
+
"path": "@sankhyalabs/ezui/dist/types/components/ez-guide-navigator/interfaces"
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
},
|
|
1017
|
+
"required": false,
|
|
1018
|
+
"optional": true,
|
|
1019
|
+
"docs": {
|
|
1020
|
+
"tags": [],
|
|
1021
|
+
"text": "Guia selecionada."
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"taskbarManager": {
|
|
1025
|
+
"type": "unknown",
|
|
1026
|
+
"mutable": false,
|
|
1027
|
+
"complexType": {
|
|
1028
|
+
"original": "TaskbarManager",
|
|
1029
|
+
"resolved": "TaskbarManager",
|
|
1030
|
+
"references": {
|
|
1031
|
+
"TaskbarManager": {
|
|
1032
|
+
"location": "import",
|
|
1033
|
+
"path": "../../../snk-taskbar/snk-taskbar"
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
},
|
|
1037
|
+
"required": false,
|
|
1038
|
+
"optional": true,
|
|
1039
|
+
"docs": {
|
|
1040
|
+
"tags": [],
|
|
1041
|
+
"text": "Gerenciador das barras de tarefas. \u00C9 poss\u00EDvel determinar bot\u00F5es espec\u00EDficos\nou mesmo gerenciar o estado dos bot\u00F5es."
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
"messagesBuilder": {
|
|
1045
|
+
"type": "unknown",
|
|
1046
|
+
"mutable": true,
|
|
1047
|
+
"complexType": {
|
|
1048
|
+
"original": "SnkMessageBuilder",
|
|
1049
|
+
"resolved": "SnkMessageBuilder",
|
|
1050
|
+
"references": {
|
|
1051
|
+
"SnkMessageBuilder": {
|
|
1052
|
+
"location": "import",
|
|
1053
|
+
"path": "../../../../lib/message/SnkMessageBuilder"
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"required": false,
|
|
1058
|
+
"optional": true,
|
|
1059
|
+
"docs": {
|
|
1060
|
+
"tags": [],
|
|
1061
|
+
"text": "Respons\u00E1vel por flexibilizar e padronizar o uso de mensagens nos blocos de constru\u00E7\u00E3o."
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
"canEdit": {
|
|
1065
|
+
"type": "boolean",
|
|
1066
|
+
"mutable": false,
|
|
1067
|
+
"complexType": {
|
|
1068
|
+
"original": "boolean",
|
|
1069
|
+
"resolved": "boolean",
|
|
1070
|
+
"references": {}
|
|
1071
|
+
},
|
|
1072
|
+
"required": false,
|
|
1073
|
+
"optional": false,
|
|
1074
|
+
"docs": {
|
|
1075
|
+
"tags": [],
|
|
1076
|
+
"text": "Define se a edi\u00E7\u00E3o est\u00E1 habilitada na grid."
|
|
1077
|
+
},
|
|
1078
|
+
"attribute": "can-edit",
|
|
1079
|
+
"reflect": false,
|
|
1080
|
+
"defaultValue": "true"
|
|
1081
|
+
},
|
|
1082
|
+
"presentationMode": {
|
|
1083
|
+
"type": "string",
|
|
1084
|
+
"mutable": false,
|
|
1085
|
+
"complexType": {
|
|
1086
|
+
"original": "PresentationMode",
|
|
1087
|
+
"resolved": "PresentationMode.PRIMARY | PresentationMode.SECONDARY | PresentationMode.SINGLE_TASKBAR",
|
|
1088
|
+
"references": {
|
|
1089
|
+
"PresentationMode": {
|
|
1090
|
+
"location": "import",
|
|
1091
|
+
"path": "../../../../lib"
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
"required": false,
|
|
1096
|
+
"optional": true,
|
|
1097
|
+
"docs": {
|
|
1098
|
+
"tags": [],
|
|
1099
|
+
"text": "Altera o modo de apresenta\u00E7\u00E3o dos bot\u00F5es do snk-taskbar."
|
|
1100
|
+
},
|
|
1101
|
+
"attribute": "presentation-mode",
|
|
1102
|
+
"reflect": false
|
|
1103
|
+
},
|
|
1104
|
+
"resourceID": {
|
|
1105
|
+
"type": "string",
|
|
1106
|
+
"mutable": false,
|
|
1107
|
+
"complexType": {
|
|
1108
|
+
"original": "string",
|
|
1109
|
+
"resolved": "string",
|
|
1110
|
+
"references": {}
|
|
1111
|
+
},
|
|
1112
|
+
"required": false,
|
|
1113
|
+
"optional": true,
|
|
1114
|
+
"docs": {
|
|
1115
|
+
"tags": [],
|
|
1116
|
+
"text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
|
|
1117
|
+
},
|
|
1118
|
+
"attribute": "resource-i-d",
|
|
1119
|
+
"reflect": false
|
|
1120
|
+
},
|
|
1121
|
+
"detailTaskbarCustomContainerId": {
|
|
1122
|
+
"type": "string",
|
|
1123
|
+
"mutable": false,
|
|
1124
|
+
"complexType": {
|
|
1125
|
+
"original": "string",
|
|
1126
|
+
"resolved": "string",
|
|
1127
|
+
"references": {}
|
|
1128
|
+
},
|
|
1129
|
+
"required": false,
|
|
1130
|
+
"optional": true,
|
|
1131
|
+
"docs": {
|
|
1132
|
+
"tags": [],
|
|
1133
|
+
"text": "Define o identificador do container de elementos customizados da Taskbar da aba de detalhes."
|
|
1134
|
+
},
|
|
1135
|
+
"attribute": "detail-taskbar-custom-container-id",
|
|
1136
|
+
"reflect": false
|
|
1137
|
+
},
|
|
1138
|
+
"formLegacyConfigName": {
|
|
1139
|
+
"type": "string",
|
|
1140
|
+
"mutable": false,
|
|
1141
|
+
"complexType": {
|
|
1142
|
+
"original": "string",
|
|
1143
|
+
"resolved": "string",
|
|
1144
|
+
"references": {}
|
|
1145
|
+
},
|
|
1146
|
+
"required": false,
|
|
1147
|
+
"optional": true,
|
|
1148
|
+
"docs": {
|
|
1149
|
+
"tags": [],
|
|
1150
|
+
"text": "Chave da configura\u00E7\u00E3o legado do formul\u00E1rio."
|
|
1151
|
+
},
|
|
1152
|
+
"attribute": "form-legacy-config-name",
|
|
1153
|
+
"reflect": false
|
|
1154
|
+
},
|
|
1155
|
+
"enableGridInsert": {
|
|
1156
|
+
"type": "boolean",
|
|
1157
|
+
"mutable": false,
|
|
1158
|
+
"complexType": {
|
|
1159
|
+
"original": "boolean",
|
|
1160
|
+
"resolved": "boolean",
|
|
1161
|
+
"references": {}
|
|
1162
|
+
},
|
|
1163
|
+
"required": false,
|
|
1164
|
+
"optional": true,
|
|
1165
|
+
"docs": {
|
|
1166
|
+
"tags": [],
|
|
1167
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
|
1168
|
+
},
|
|
1169
|
+
"attribute": "enable-grid-insert",
|
|
1170
|
+
"reflect": false,
|
|
1171
|
+
"defaultValue": "false"
|
|
1172
|
+
},
|
|
1173
|
+
"ignoreReadOnlyFormFields": {
|
|
1174
|
+
"type": "boolean",
|
|
1175
|
+
"mutable": false,
|
|
1176
|
+
"complexType": {
|
|
1177
|
+
"original": "boolean",
|
|
1178
|
+
"resolved": "boolean",
|
|
1179
|
+
"references": {}
|
|
1180
|
+
},
|
|
1181
|
+
"required": false,
|
|
1182
|
+
"optional": true,
|
|
1183
|
+
"docs": {
|
|
1184
|
+
"tags": [],
|
|
1185
|
+
"text": "Ignora os campos \"somente leitura\" no modo de inser\u00E7\u00E3o."
|
|
1186
|
+
},
|
|
1187
|
+
"attribute": "ignore-read-only-form-fields",
|
|
1188
|
+
"reflect": false
|
|
1189
|
+
},
|
|
1190
|
+
"getCustomTitle": {
|
|
1191
|
+
"type": "unknown",
|
|
1192
|
+
"mutable": false,
|
|
1193
|
+
"complexType": {
|
|
1194
|
+
"original": "() => string",
|
|
1195
|
+
"resolved": "() => string",
|
|
1196
|
+
"references": {}
|
|
1197
|
+
},
|
|
1198
|
+
"required": false,
|
|
1199
|
+
"optional": true,
|
|
1200
|
+
"docs": {
|
|
1201
|
+
"tags": [],
|
|
1202
|
+
"text": "Fornece uma fun\u00E7\u00E3o para obter um t\u00EDtulo customizado do formul\u00E1rio."
|
|
1203
|
+
}
|
|
1204
|
+
},
|
|
1205
|
+
"customGuidesConfig": {
|
|
1206
|
+
"type": "unknown",
|
|
1207
|
+
"mutable": false,
|
|
1208
|
+
"complexType": {
|
|
1209
|
+
"original": "Array<CustomGuideItem>",
|
|
1210
|
+
"resolved": "CustomGuideItem[]",
|
|
1211
|
+
"references": {
|
|
1212
|
+
"Array": {
|
|
1213
|
+
"location": "global"
|
|
1214
|
+
},
|
|
1215
|
+
"CustomGuideItem": {
|
|
1216
|
+
"location": "import",
|
|
1217
|
+
"path": "../../../snk-crud/subcomponents/snk-guides-viewer"
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
},
|
|
1221
|
+
"required": false,
|
|
1222
|
+
"optional": true,
|
|
1223
|
+
"docs": {
|
|
1224
|
+
"tags": [],
|
|
1225
|
+
"text": "Fornece as informa\u00E7\u00F5es das guias personalizadas. Cada guia personalizada\nser\u00E1 adicionada como uma aba do tabselector. O conte\u00FAdo de cada aba \u00E9\nrenderizado atrav\u00E9s de um slot cujo nome corresponde ao `id` da guia."
|
|
1226
|
+
},
|
|
1227
|
+
"defaultValue": "[]"
|
|
1228
|
+
},
|
|
1229
|
+
"collapsibleMaster": {
|
|
1230
|
+
"type": "boolean",
|
|
1231
|
+
"mutable": false,
|
|
1232
|
+
"complexType": {
|
|
1233
|
+
"original": "boolean",
|
|
1234
|
+
"resolved": "boolean",
|
|
1235
|
+
"references": {}
|
|
1236
|
+
},
|
|
1237
|
+
"required": false,
|
|
1238
|
+
"optional": false,
|
|
1239
|
+
"docs": {
|
|
1240
|
+
"tags": [],
|
|
1241
|
+
"text": "Habilita o recolhimento autom\u00E1tico do formul\u00E1rio master quando uma aba de\ndetalhe est\u00E1 ativa e o espa\u00E7o vertical est\u00E1 apertado (zoom alto)."
|
|
1242
|
+
},
|
|
1243
|
+
"attribute": "collapsible-master",
|
|
1244
|
+
"reflect": false,
|
|
1245
|
+
"defaultValue": "true"
|
|
1246
|
+
},
|
|
1247
|
+
"masterSummaryFieldCount": {
|
|
1248
|
+
"type": "number",
|
|
1249
|
+
"mutable": false,
|
|
1250
|
+
"complexType": {
|
|
1251
|
+
"original": "number",
|
|
1252
|
+
"resolved": "number",
|
|
1253
|
+
"references": {}
|
|
1254
|
+
},
|
|
1255
|
+
"required": false,
|
|
1256
|
+
"optional": false,
|
|
1257
|
+
"docs": {
|
|
1258
|
+
"tags": [],
|
|
1259
|
+
"text": "M\u00E1ximo de campos considerados para a tira-resumo do master recolhido.\nA quantidade realmente exibida \u00E9 din\u00E2mica: mostra quantos couberem na\nlargura dispon\u00EDvel, at\u00E9 este limite."
|
|
1260
|
+
},
|
|
1261
|
+
"attribute": "master-summary-field-count",
|
|
1262
|
+
"reflect": false,
|
|
1263
|
+
"defaultValue": "12"
|
|
1264
|
+
},
|
|
1265
|
+
"masterCollapseThreshold": {
|
|
1266
|
+
"type": "number",
|
|
1267
|
+
"mutable": false,
|
|
1268
|
+
"complexType": {
|
|
1269
|
+
"original": "number",
|
|
1270
|
+
"resolved": "number",
|
|
1271
|
+
"references": {}
|
|
1272
|
+
},
|
|
1273
|
+
"required": false,
|
|
1274
|
+
"optional": false,
|
|
1275
|
+
"docs": {
|
|
1276
|
+
"tags": [],
|
|
1277
|
+
"text": "Altura (px) do container abaixo da qual o espa\u00E7o \u00E9 considerado \"apertado\".\nEm zoom alto o viewport encolhe em px de CSS, disparando o recolhimento."
|
|
1278
|
+
},
|
|
1279
|
+
"attribute": "master-collapse-threshold",
|
|
1280
|
+
"reflect": false,
|
|
1281
|
+
"defaultValue": "700"
|
|
1282
|
+
},
|
|
1283
|
+
"maxOpenedGuides": {
|
|
1284
|
+
"type": "number",
|
|
1285
|
+
"mutable": false,
|
|
1286
|
+
"complexType": {
|
|
1287
|
+
"original": "number",
|
|
1288
|
+
"resolved": "number",
|
|
1289
|
+
"references": {}
|
|
1290
|
+
},
|
|
1291
|
+
"required": false,
|
|
1292
|
+
"optional": false,
|
|
1293
|
+
"docs": {
|
|
1294
|
+
"tags": [],
|
|
1295
|
+
"text": "M\u00E1ximo de abas mantidas montadas ao mesmo tempo.\nAbas ficam montadas p/ voltar sem recarregar, mas cada aba de detalhe\nmant\u00E9m um DataUnit vivo que recarrega ao navegar o registro master.\nSem limite, visitar N abas gera N recargas em segundo plano por navega\u00E7\u00E3o.\nEste teto ret\u00E9m a aba ativa + as inseridas mais recentemente (ordem de\ninser\u00E7\u00E3o, n\u00E3o de uso \u2014 a lista n\u00E3o \u00E9 reordenada ao reabrir uma aba); as\ndemais s\u00E3o desmontadas (voltar a elas recarrega). Use <= 0 para n\u00E3o limitar."
|
|
1296
|
+
},
|
|
1297
|
+
"attribute": "max-opened-guides",
|
|
1298
|
+
"reflect": false,
|
|
1299
|
+
"defaultValue": "4"
|
|
1300
|
+
}
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
static get states() {
|
|
1304
|
+
return {
|
|
1305
|
+
"_guides": {},
|
|
1306
|
+
"_formEditorConfigManager": {},
|
|
1307
|
+
"_formEditorDataUnit": {},
|
|
1308
|
+
"_fieldToGetFocus": {},
|
|
1309
|
+
"_customEditors": {},
|
|
1310
|
+
"_customRenders": {},
|
|
1311
|
+
"_fieldsProps": {},
|
|
1312
|
+
"_mainForm": {},
|
|
1313
|
+
"_mainFormName": {},
|
|
1314
|
+
"_errorTabs": {},
|
|
1315
|
+
"_hasToCreateFieldSearch": {},
|
|
1316
|
+
"_masterCollapsed": {},
|
|
1317
|
+
"_hostTight": {},
|
|
1318
|
+
"_visibleSummaryCount": {},
|
|
1319
|
+
"_openedGuideIds": {}
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
static get events() {
|
|
1323
|
+
return [{
|
|
1324
|
+
"method": "snkMasterFormConfigChange",
|
|
1325
|
+
"name": "snkMasterFormConfigChange",
|
|
1326
|
+
"bubbles": true,
|
|
1327
|
+
"cancelable": true,
|
|
1328
|
+
"composed": true,
|
|
1329
|
+
"docs": {
|
|
1330
|
+
"tags": [],
|
|
1331
|
+
"text": "Emitido quando a configura\u00E7\u00E3o do formul\u00E1rio master \u00E9 definida."
|
|
1332
|
+
},
|
|
1333
|
+
"complexType": {
|
|
1334
|
+
"original": "IFormConfig",
|
|
1335
|
+
"resolved": "IFormConfig",
|
|
1336
|
+
"references": {
|
|
1337
|
+
"IFormConfig": {
|
|
1338
|
+
"location": "import",
|
|
1339
|
+
"path": "@sankhyalabs/ezui/dist/types/utils/form/interfaces"
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
}, {
|
|
1344
|
+
"method": "formConfigVisibilityChanged",
|
|
1345
|
+
"name": "formConfigVisibilityChanged",
|
|
1346
|
+
"bubbles": true,
|
|
1347
|
+
"cancelable": true,
|
|
1348
|
+
"composed": true,
|
|
1349
|
+
"docs": {
|
|
1350
|
+
"tags": [],
|
|
1351
|
+
"text": "Emitido quando a visibilidade do configurador do formul\u00E1rio \u00E9 alterada."
|
|
1352
|
+
},
|
|
1353
|
+
"complexType": {
|
|
1354
|
+
"original": "boolean",
|
|
1355
|
+
"resolved": "boolean",
|
|
1356
|
+
"references": {}
|
|
1357
|
+
}
|
|
1358
|
+
}, {
|
|
1359
|
+
"method": "exit",
|
|
1360
|
+
"name": "exit",
|
|
1361
|
+
"bubbles": true,
|
|
1362
|
+
"cancelable": true,
|
|
1363
|
+
"composed": true,
|
|
1364
|
+
"docs": {
|
|
1365
|
+
"tags": [],
|
|
1366
|
+
"text": "Emitido quando o bot\u00E3o de voltar \u00E9 acionado."
|
|
1367
|
+
},
|
|
1368
|
+
"complexType": {
|
|
1369
|
+
"original": "void",
|
|
1370
|
+
"resolved": "void",
|
|
1371
|
+
"references": {}
|
|
1372
|
+
}
|
|
1373
|
+
}, {
|
|
1374
|
+
"method": "actionClick",
|
|
1375
|
+
"name": "actionClick",
|
|
1376
|
+
"bubbles": true,
|
|
1377
|
+
"cancelable": true,
|
|
1378
|
+
"composed": true,
|
|
1379
|
+
"docs": {
|
|
1380
|
+
"tags": [],
|
|
1381
|
+
"text": "Emitido sempre que houver click de bot\u00E3o ou a\u00E7\u00E3o."
|
|
1382
|
+
},
|
|
1383
|
+
"complexType": {
|
|
1384
|
+
"original": "string",
|
|
1385
|
+
"resolved": "string",
|
|
1386
|
+
"references": {}
|
|
1387
|
+
}
|
|
1388
|
+
}, {
|
|
1389
|
+
"method": "formItemsReady",
|
|
1390
|
+
"name": "formItemsReady",
|
|
1391
|
+
"bubbles": true,
|
|
1392
|
+
"cancelable": true,
|
|
1393
|
+
"composed": true,
|
|
1394
|
+
"docs": {
|
|
1395
|
+
"tags": [],
|
|
1396
|
+
"text": "Respons\u00E1vel por notificar quando ocorrer a renderiza\u00E7\u00E3o de itens do formul\u00E1rio."
|
|
1397
|
+
},
|
|
1398
|
+
"complexType": {
|
|
1399
|
+
"original": "Array<HTMLElement>",
|
|
1400
|
+
"resolved": "HTMLElement[]",
|
|
1401
|
+
"references": {
|
|
1402
|
+
"Array": {
|
|
1403
|
+
"location": "global"
|
|
1404
|
+
},
|
|
1405
|
+
"HTMLElement": {
|
|
1406
|
+
"location": "global"
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
}];
|
|
1411
|
+
}
|
|
1412
|
+
static get methods() {
|
|
1413
|
+
return {
|
|
1414
|
+
"showFormConfig": {
|
|
1415
|
+
"complexType": {
|
|
1416
|
+
"signature": "(detail?: boolean) => Promise<void>",
|
|
1417
|
+
"parameters": [{
|
|
1418
|
+
"tags": [{
|
|
1419
|
+
"name": "param",
|
|
1420
|
+
"text": "detail - Define se a configura\u00E7\u00E3o que est\u00E1 sendo carregada \u00E9\nreferente a um form detail."
|
|
1421
|
+
}],
|
|
1422
|
+
"text": "- Define se a configura\u00E7\u00E3o que est\u00E1 sendo carregada \u00E9\nreferente a um form detail."
|
|
1423
|
+
}],
|
|
1424
|
+
"references": {
|
|
1425
|
+
"Promise": {
|
|
1426
|
+
"location": "global"
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
"return": "Promise<void>"
|
|
1430
|
+
},
|
|
1431
|
+
"docs": {
|
|
1432
|
+
"text": "Abre o configurador do formul\u00E1rio",
|
|
1433
|
+
"tags": [{
|
|
1434
|
+
"name": "param",
|
|
1435
|
+
"text": "detail - Define se a configura\u00E7\u00E3o que est\u00E1 sendo carregada \u00E9\nreferente a um form detail."
|
|
1436
|
+
}]
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
"addCustomEditor": {
|
|
1440
|
+
"complexType": {
|
|
1441
|
+
"signature": "(fieldName: string, customEditor: ICustomEditor) => Promise<void>",
|
|
1442
|
+
"parameters": [{
|
|
1443
|
+
"tags": [],
|
|
1444
|
+
"text": ""
|
|
1445
|
+
}, {
|
|
1446
|
+
"tags": [],
|
|
1447
|
+
"text": ""
|
|
1448
|
+
}],
|
|
1449
|
+
"references": {
|
|
1450
|
+
"Promise": {
|
|
1451
|
+
"location": "global"
|
|
1452
|
+
},
|
|
1453
|
+
"ICustomEditor": {
|
|
1454
|
+
"location": "import",
|
|
1455
|
+
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
"return": "Promise<void>"
|
|
1459
|
+
},
|
|
1460
|
+
"docs": {
|
|
1461
|
+
"text": "Registra um editor customizado para campos da grade e formul\u00E1rio",
|
|
1462
|
+
"tags": []
|
|
1463
|
+
}
|
|
1464
|
+
},
|
|
1465
|
+
"addGridCustomRender": {
|
|
1466
|
+
"complexType": {
|
|
1467
|
+
"signature": "(fieldName: string, customRender: ICustomRender) => Promise<void>",
|
|
1468
|
+
"parameters": [{
|
|
1469
|
+
"tags": [],
|
|
1470
|
+
"text": ""
|
|
1471
|
+
}, {
|
|
1472
|
+
"tags": [],
|
|
1473
|
+
"text": ""
|
|
1474
|
+
}],
|
|
1475
|
+
"references": {
|
|
1476
|
+
"Promise": {
|
|
1477
|
+
"location": "global"
|
|
1478
|
+
},
|
|
1479
|
+
"ICustomRender": {
|
|
1480
|
+
"location": "import",
|
|
1481
|
+
"path": "@sankhyalabs/ezui/dist/types/utils"
|
|
1482
|
+
}
|
|
1483
|
+
},
|
|
1484
|
+
"return": "Promise<void>"
|
|
1485
|
+
},
|
|
1486
|
+
"docs": {
|
|
1487
|
+
"text": "Registra um render customizado para colunas da grid.",
|
|
1488
|
+
"tags": []
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"setFieldProp": {
|
|
1492
|
+
"complexType": {
|
|
1493
|
+
"signature": "(fieldName: string, propName: string, value: any) => Promise<void>",
|
|
1494
|
+
"parameters": [{
|
|
1495
|
+
"tags": [],
|
|
1496
|
+
"text": ""
|
|
1497
|
+
}, {
|
|
1498
|
+
"tags": [],
|
|
1499
|
+
"text": ""
|
|
1500
|
+
}, {
|
|
1501
|
+
"tags": [],
|
|
1502
|
+
"text": ""
|
|
1503
|
+
}],
|
|
1504
|
+
"references": {
|
|
1505
|
+
"Promise": {
|
|
1506
|
+
"location": "global"
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
"return": "Promise<void>"
|
|
1510
|
+
},
|
|
1511
|
+
"docs": {
|
|
1512
|
+
"text": "Altera/adiciona uma propriedade nos metadados do campo.",
|
|
1513
|
+
"tags": []
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"setFocus": {
|
|
1517
|
+
"complexType": {
|
|
1518
|
+
"signature": "() => Promise<void>",
|
|
1519
|
+
"parameters": [],
|
|
1520
|
+
"references": {
|
|
1521
|
+
"Promise": {
|
|
1522
|
+
"location": "global"
|
|
1523
|
+
}
|
|
1524
|
+
},
|
|
1525
|
+
"return": "Promise<void>"
|
|
1526
|
+
},
|
|
1527
|
+
"docs": {
|
|
1528
|
+
"text": "Atribui o foco para o componente.",
|
|
1529
|
+
"tags": []
|
|
1530
|
+
}
|
|
1531
|
+
},
|
|
1532
|
+
"reloadGuides": {
|
|
1533
|
+
"complexType": {
|
|
1534
|
+
"signature": "() => Promise<void>",
|
|
1535
|
+
"parameters": [],
|
|
1536
|
+
"references": {
|
|
1537
|
+
"Promise": {
|
|
1538
|
+
"location": "global"
|
|
1539
|
+
}
|
|
1540
|
+
},
|
|
1541
|
+
"return": "Promise<void>"
|
|
1542
|
+
},
|
|
1543
|
+
"docs": {
|
|
1544
|
+
"text": "Recarrega os guias baseada nos metadados atuais.",
|
|
1545
|
+
"tags": []
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
static get elementRef() { return "_element"; }
|
|
1551
|
+
static get watchers() {
|
|
1552
|
+
return [{
|
|
1553
|
+
"propName": "dataUnit",
|
|
1554
|
+
"methodName": "observeDataUnit"
|
|
1555
|
+
}, {
|
|
1556
|
+
"propName": "selectedGuide",
|
|
1557
|
+
"methodName": "observeSelectedGuide"
|
|
1558
|
+
}, {
|
|
1559
|
+
"propName": "_masterCollapsed",
|
|
1560
|
+
"methodName": "observeMasterCollapsed"
|
|
1561
|
+
}, {
|
|
1562
|
+
"propName": "_formEditorConfigManager",
|
|
1563
|
+
"methodName": "observeFormConfigManager"
|
|
1564
|
+
}, {
|
|
1565
|
+
"propName": "dataState",
|
|
1566
|
+
"methodName": "observeDataState"
|
|
1567
|
+
}, {
|
|
1568
|
+
"propName": "masterFormConfig",
|
|
1569
|
+
"methodName": "observeMasterFormConfig"
|
|
1570
|
+
}];
|
|
1571
|
+
}
|
|
1572
|
+
static get listeners() {
|
|
1573
|
+
return [{
|
|
1574
|
+
"name": "actionClick",
|
|
1575
|
+
"method": "onActionClick",
|
|
1576
|
+
"target": undefined,
|
|
1577
|
+
"capture": true,
|
|
1578
|
+
"passive": false
|
|
1579
|
+
}, {
|
|
1580
|
+
"name": "snkContentCardChanged",
|
|
1581
|
+
"method": "onContentCardChanged",
|
|
1582
|
+
"target": undefined,
|
|
1583
|
+
"capture": false,
|
|
1584
|
+
"passive": false
|
|
1585
|
+
}];
|
|
1586
|
+
}
|
|
1587
|
+
}
|