@sankhyalabs/sankhyablocks 0.0.0-feat-dev-kb-4158.0
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 +21 -0
- package/README.md +75 -0
- package/dist/cjs/AuthorizationConfig-79ffae4b.js +7 -0
- package/dist/cjs/ConfigStorage-73e7afff.js +310 -0
- package/dist/cjs/DataFetcher-004811c6.js +7087 -0
- package/dist/cjs/ParamType-90b440a0.js +13 -0
- package/dist/cjs/PersonalizedFilterUtils-1aeb625d.js +220 -0
- package/dist/cjs/SnkFormConfigManager-d1f1a222.js +136 -0
- package/dist/cjs/SnkMessageBuilder-d0abb63d.js +651 -0
- package/dist/cjs/SnkMultiSelectionListDataSource-804ff4c7.js +34 -0
- package/dist/cjs/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/auth-fetcher-58237931.js +34 -0
- package/dist/cjs/constants-d187e03e.js +101 -0
- package/dist/cjs/dataunit-fetcher-029eafbd.js +356 -0
- package/dist/cjs/draggable.bundle-82a25c06.js +6886 -0
- package/dist/cjs/filter-bar-config-fetcher-2b8ed9d0.js +155 -0
- package/dist/cjs/filter-item-type.enum-aa823a00.js +17 -0
- package/dist/cjs/filter-type.enum-b14ce507.js +11 -0
- package/dist/cjs/form-config-fetcher-181767c9.js +181 -0
- package/dist/cjs/index-0e663819.js +33 -0
- package/dist/cjs/index-102ba62d.js +201 -0
- package/dist/cjs/index-8d94b7e0.js +7 -0
- package/dist/cjs/index-c5771aba.js +44 -0
- package/dist/cjs/index-f9e81701.js +2328 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +22 -0
- package/dist/cjs/pesquisa-fetcher-9a97994a.js +167 -0
- package/dist/cjs/presentationMode-52ec3bdd.js +7 -0
- package/dist/cjs/resource-fetcher-c0332609.js +68 -0
- package/dist/cjs/sankhyablocks.cjs.js +23 -0
- package/dist/cjs/snk-actions-button.cjs.entry.js +705 -0
- package/dist/cjs/snk-actions-form.cjs.entry.js +200 -0
- package/dist/cjs/snk-application.cjs.entry.js +931 -0
- package/dist/cjs/snk-attach.cjs.entry.js +452 -0
- package/dist/cjs/snk-client-confirm.cjs.entry.js +52 -0
- package/dist/cjs/snk-config-options.cjs.entry.js +239 -0
- package/dist/cjs/snk-configurator.cjs.entry.js +99 -0
- package/dist/cjs/snk-crud.cjs.entry.js +183 -0
- package/dist/cjs/snk-data-exporter.cjs.entry.js +520 -0
- package/dist/cjs/snk-data-unit-cc7a7ed0.js +453 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +13 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +269 -0
- package/dist/cjs/snk-entity-list.cjs.entry.js +118 -0
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +132 -0
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +545 -0
- package/dist/cjs/snk-field-config.cjs.entry.js +60 -0
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +60 -0
- package/dist/cjs/snk-filter-bar.cjs.entry.js +510 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +91 -0
- package/dist/cjs/snk-filter-detail.cjs.entry.js +178 -0
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +408 -0
- package/dist/cjs/snk-filter-item.cjs.entry.js +281 -0
- package/dist/cjs/snk-filter-list.cjs.entry.js +152 -0
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +126 -0
- package/dist/cjs/snk-filter-modal.cjs.entry.js +217 -0
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +43 -0
- package/dist/cjs/snk-filter-number.cjs.entry.js +44 -0
- package/dist/cjs/snk-filter-period.cjs.entry.js +73 -0
- package/dist/cjs/snk-filter-search.cjs.entry.js +54 -0
- package/dist/cjs/snk-filter-text.cjs.entry.js +36 -0
- package/dist/cjs/snk-form-config.cjs.entry.js +991 -0
- package/dist/cjs/snk-form-summary.cjs.entry.js +61 -0
- package/dist/cjs/snk-form-view.cjs.entry.js +99 -0
- package/dist/cjs/snk-form.cjs.entry.js +87 -0
- package/dist/cjs/snk-grid-config.cjs.entry.js +484 -0
- package/dist/cjs/snk-grid.cjs.entry.js +332 -0
- package/dist/cjs/snk-guides-viewer-27f87d90.js +334 -0
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +28 -0
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +210 -0
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +305 -0
- package/dist/cjs/snk-pesquisa.cjs.entry.js +324 -0
- package/dist/cjs/snk-print-selector.cjs.entry.js +169 -0
- package/dist/cjs/snk-select-box.cjs.entry.js +25 -0
- package/dist/cjs/snk-simple-bar.cjs.entry.js +45 -0
- package/dist/cjs/snk-simple-crud.cjs.entry.js +338 -0
- package/dist/cjs/snk-tab-config.cjs.entry.js +331 -0
- package/dist/cjs/snk-taskbar.cjs.entry.js +221 -0
- package/dist/cjs/taskbar-elements-b98dd6e9.js +121 -0
- package/dist/cjs/taskbar-processor-bce3f499.js +49 -0
- package/dist/cjs/teste-pesquisa.cjs.entry.js +37 -0
- package/dist/collection/collection-manifest.json +171 -0
- package/dist/collection/components/snk-actions-button/actions/enum/ActionsType.js +8 -0
- package/dist/collection/components/snk-actions-button/actions/enum/ParamType.js +11 -0
- package/dist/collection/components/snk-actions-button/actions/enum/RefreshType.js +7 -0
- package/dist/collection/components/snk-actions-button/actions/executor/java.executor.js +22 -0
- package/dist/collection/components/snk-actions-button/actions/executor/javascript.executor.js +20 -0
- package/dist/collection/components/snk-actions-button/actions/executor/launch-screen.executor.js +42 -0
- package/dist/collection/components/snk-actions-button/actions/executor/procedure.executor.js +26 -0
- package/dist/collection/components/snk-actions-button/actions/factory/executor.factory.js +26 -0
- package/dist/collection/components/snk-actions-button/actions/index.js +343 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IAction.js +7 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecSource.js +1 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActions.js +1 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.js +1 -0
- package/dist/collection/components/snk-actions-button/actions/interfaces/IResultParam.js +1 -0
- package/dist/collection/components/snk-actions-button/clientEvent/index.js +87 -0
- package/dist/collection/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.js +1 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.css +38 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +139 -0
- package/dist/collection/components/snk-actions-button/subcomponents/snk-actions-form.js +263 -0
- package/dist/collection/components/snk-actions-button/subcomponents/snk-client-confirm.js +134 -0
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +60 -0
- package/dist/collection/components/snk-application/snk-application.css +5 -0
- package/dist/collection/components/snk-application/snk-application.js +2000 -0
- package/dist/collection/components/snk-attach/interfaces/index.js +1 -0
- package/dist/collection/components/snk-attach/snk-attach.css +8 -0
- package/dist/collection/components/snk-attach/snk-attach.js +203 -0
- package/dist/collection/components/snk-attach/structure/crud-config-builder.js +37 -0
- package/dist/collection/components/snk-attach/structure/data-unit-builder.js +105 -0
- package/dist/collection/components/snk-attach/structure/index.js +3 -0
- package/dist/collection/components/snk-attach/structure/taskbar-builder.js +47 -0
- package/dist/collection/components/snk-configurator/AuthorizationConfig.js +5 -0
- package/dist/collection/components/snk-configurator/snk-configurator.css +159 -0
- package/dist/collection/components/snk-configurator/snk-configurator.js +293 -0
- package/dist/collection/components/snk-crud/snk-crud.css +6 -0
- package/dist/collection/components/snk-crud/snk-crud.js +536 -0
- package/dist/collection/components/snk-crud/subcomponents/CardFormResizeObserver.js +26 -0
- package/dist/collection/components/snk-crud/subcomponents/GuideBuilder.js +43 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +26 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +548 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.css +37 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-summary.js +91 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.css +52 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +376 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +91 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +690 -0
- package/dist/collection/components/snk-data-exporter/data/attachment.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/email.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/export-config.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/export-result.js +1 -0
- package/dist/collection/components/snk-data-exporter/data/report.js +1 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/email-info-step.js +7 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +21 -0
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.js +172 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -0
- package/dist/collection/components/snk-data-exporter/interfaces/IRecordID.js +1 -0
- package/dist/collection/components/snk-data-exporter/interfaces/ISelectedID.js +1 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.css +38 -0
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +375 -0
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +140 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.css +6 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +838 -0
- package/dist/collection/components/snk-entity-list/snk-entity-list.css +35 -0
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +257 -0
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +128 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/enum/presentationMode.js +5 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +197 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.js +123 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +124 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-period.js +191 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +137 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +96 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css +66 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +396 -0
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type.enum.js +13 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +250 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +415 -0
- package/dist/collection/components/snk-filter-bar/filter-list/snk-filter-list.js +323 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +35 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +345 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.css +8 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.js +214 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +184 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +463 -0
- package/dist/collection/components/snk-filter-bar/types/custom-element-filter.js +1 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +7 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +42 -0
- package/dist/collection/components/snk-filter-bar/utils/filters-mock.js +411 -0
- package/dist/collection/components/snk-filter-field-search/interfaces/index.js +5 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.css +41 -0
- package/dist/collection/components/snk-filter-field-search/snk-filter-field-search.js +335 -0
- package/dist/collection/components/snk-filter-field-search/subcomponents/index.js +1 -0
- package/dist/collection/components/snk-filter-field-search/subcomponents/list-item.js +24 -0
- package/dist/collection/components/snk-form/SnkFormConfigManager.js +131 -0
- package/dist/collection/components/snk-form/snk-form.css +11 -0
- package/dist/collection/components/snk-form/snk-form.js +216 -0
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.css +16 -0
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +344 -0
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.css +219 -0
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +184 -0
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.css +237 -0
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +1107 -0
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.css +323 -0
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +525 -0
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +29 -0
- package/dist/collection/components/snk-grid/snk-grid.css +28 -0
- package/dist/collection/components/snk-grid/snk-grid.js +682 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.css +181 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.js +616 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.css +9 -0
- package/dist/collection/components/snk-grid/subcomponents/snk-select-box/snk-select-box.js +70 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionGroup.js +0 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IExpressionItem.js +5 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IParameter.js +1 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IPersonalizedFilter.js +1 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/ISystemFilterConfig.js +1 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/IUserFilterConfig.js +1 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js +39 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.css +45 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +440 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +73 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +448 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.js +26 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.css +111 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +412 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.css +10 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.js +88 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.css +66 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +158 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.css +12 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +291 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.js +215 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +151 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +394 -0
- package/dist/collection/components/snk-print-selector/snk-print-selector.css +35 -0
- package/dist/collection/components/snk-print-selector/snk-print-selector.js +203 -0
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.css +32 -0
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +146 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +22 -0
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +575 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +114 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +45 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.css +3 -0
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +427 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.css +3 -0
- package/dist/collection/components/teste-pesquisa/teste-pesquisa.js +36 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/lib/@types/index.js +31 -0
- package/dist/collection/lib/applet-caller/applet-caller.js +6 -0
- package/dist/collection/lib/auth/mgeauthorization.module.js +1 -0
- package/dist/collection/lib/configs/ConfigStorage.js +95 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +134 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +408 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +23 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/attach-fetcher.js +136 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/auth-fetcher.js +29 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +353 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.js +6 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.js +3 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +33 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/permission-export-pdf.js +7 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.js +18 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.js +151 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +177 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +40 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +66 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +169 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +163 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +64 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/totals-fetcher.js +63 -0
- package/dist/collection/lib/http/data-fetcher/interfaces/IClientEventResponse.js +1 -0
- package/dist/collection/lib/http/data-fetcher/recaller/GraphQLRecaller.js +28 -0
- package/dist/collection/lib/http/data-fetcher/recaller/IDataFetcherRecaller.js +1 -0
- package/dist/collection/lib/http/data-fetcher/recaller/ServiceBrokerRecaller.js +15 -0
- package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +66 -0
- package/dist/collection/lib/index.js +4 -0
- package/dist/collection/lib/licenses/sankhyalicense.module.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +163 -0
- package/dist/collection/lib/message/resources/crud-utils.msg.js +4 -0
- package/dist/collection/lib/message/resources/file-viewer.msg.js +10 -0
- package/dist/collection/lib/message/resources/snk-actions-button.msg.js +27 -0
- package/dist/collection/lib/message/resources/snk-attach.msg.js +27 -0
- package/dist/collection/lib/message/resources/snk-configurator.msg.js +8 -0
- package/dist/collection/lib/message/resources/snk-crud.msg.js +10 -0
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +32 -0
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +31 -0
- package/dist/collection/lib/message/resources/snk-entity-list.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-exporter.msg.js +21 -0
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +58 -0
- package/dist/collection/lib/message/resources/snk-filter-field-search.msg.js +7 -0
- package/dist/collection/lib/message/resources/snk-filter-param-config.msg.js +18 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +62 -0
- package/dist/collection/lib/message/resources/snk-grid.msg.js +26 -0
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +83 -0
- package/dist/collection/lib/message/resources/snk-print-selector.msg.js +23 -0
- package/dist/collection/lib/message/resources/snk-simple-bar.msg.js +3 -0
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +18 -0
- package/dist/collection/lib/store/index.js +6 -0
- package/dist/collection/lib/utils/CrudUtils.js +73 -0
- package/dist/collection/lib/utils/PrintUtils.js +201 -0
- package/dist/collection/lib/utils/constants.js +102 -0
- package/dist/collection/lib/utils/fileViewer/index.js +11 -0
- package/dist/collection/lib/utils/fileViewer/interfaces/IFileViewerParams.js +1 -0
- package/dist/collection/lib/utils/pesquisa.js +16 -0
- package/dist/collection/lib/utils/urlutils.js +25 -0
- package/dist/collection/lib/workspace/workspace.js +19 -0
- package/dist/components/AuthorizationConfig.js +7 -0
- package/dist/components/ConfigStorage.js +306 -0
- package/dist/components/DataFetcher.js +7082 -0
- package/dist/components/ParamType.js +13 -0
- package/dist/components/PersonalizedFilterUtils.js +260 -0
- package/dist/components/SnkFormConfigManager.js +134 -0
- package/dist/components/SnkMessageBuilder.js +629 -0
- package/dist/components/SnkMultiSelectionListDataSource.js +78 -0
- package/dist/components/_commonjsHelpers.js +17 -0
- package/dist/components/auth-fetcher.js +32 -0
- package/dist/components/constants.js +90 -0
- package/dist/components/dataunit-fetcher.js +354 -0
- package/dist/components/filter-bar-config-fetcher.js +153 -0
- package/dist/components/filter-item-type.enum.js +15 -0
- package/dist/components/form-config-fetcher.js +179 -0
- package/dist/components/index.d.ts +79 -0
- package/dist/components/index.js +50 -0
- package/dist/components/index2.js +33 -0
- package/dist/components/index3.js +199 -0
- package/dist/components/pesquisa-fetcher.js +165 -0
- package/dist/components/presentationMode.js +7 -0
- package/dist/components/resource-fetcher.js +66 -0
- package/dist/components/snk-actions-button.d.ts +11 -0
- package/dist/components/snk-actions-button.js +6 -0
- package/dist/components/snk-actions-button2.js +718 -0
- package/dist/components/snk-actions-form.d.ts +11 -0
- package/dist/components/snk-actions-form.js +218 -0
- package/dist/components/snk-application.d.ts +11 -0
- package/dist/components/snk-application.js +6 -0
- package/dist/components/snk-application2.js +988 -0
- package/dist/components/snk-attach.d.ts +11 -0
- package/dist/components/snk-attach.js +6 -0
- package/dist/components/snk-attach2.js +504 -0
- package/dist/components/snk-client-confirm.d.ts +11 -0
- package/dist/components/snk-client-confirm.js +71 -0
- package/dist/components/snk-config-options.d.ts +11 -0
- package/dist/components/snk-config-options.js +6 -0
- package/dist/components/snk-config-options2.js +255 -0
- package/dist/components/snk-configurator.d.ts +11 -0
- package/dist/components/snk-configurator.js +6 -0
- package/dist/components/snk-configurator2.js +118 -0
- package/dist/components/snk-crud.d.ts +11 -0
- package/dist/components/snk-crud.js +391 -0
- package/dist/components/snk-data-exporter.d.ts +11 -0
- package/dist/components/snk-data-exporter.js +6 -0
- package/dist/components/snk-data-exporter2.js +539 -0
- package/dist/components/snk-data-unit.d.ts +11 -0
- package/dist/components/snk-data-unit.js +6 -0
- package/dist/components/snk-data-unit2.js +479 -0
- package/dist/components/snk-detail-view.d.ts +11 -0
- package/dist/components/snk-detail-view.js +6 -0
- package/dist/components/snk-detail-view2.js +927 -0
- package/dist/components/snk-entity-list.d.ts +11 -0
- package/dist/components/snk-entity-list.js +138 -0
- package/dist/components/snk-exporter-email-sender.d.ts +11 -0
- package/dist/components/snk-exporter-email-sender.js +6 -0
- package/dist/components/snk-exporter-email-sender2.js +149 -0
- package/dist/components/snk-expression-group.d.ts +11 -0
- package/dist/components/snk-expression-group.js +6 -0
- package/dist/components/snk-expression-group2.js +296 -0
- package/dist/components/snk-expression-item.d.ts +11 -0
- package/dist/components/snk-expression-item.js +6 -0
- package/dist/components/snk-expression-item2.js +332 -0
- package/dist/components/snk-field-config.d.ts +11 -0
- package/dist/components/snk-field-config.js +6 -0
- package/dist/components/snk-field-config2.js +76 -0
- package/dist/components/snk-filter-advanced-mode.d.ts +11 -0
- package/dist/components/snk-filter-advanced-mode.js +6 -0
- package/dist/components/snk-filter-advanced-mode2.js +39 -0
- package/dist/components/snk-filter-assistent-mode.d.ts +11 -0
- package/dist/components/snk-filter-assistent-mode.js +6 -0
- package/dist/components/snk-filter-assistent-mode2.js +77 -0
- package/dist/components/snk-filter-bar.d.ts +11 -0
- package/dist/components/snk-filter-bar.js +6 -0
- package/dist/components/snk-filter-bar2.js +583 -0
- package/dist/components/snk-filter-binary-select.d.ts +11 -0
- package/dist/components/snk-filter-binary-select.js +109 -0
- package/dist/components/snk-filter-detail.d.ts +11 -0
- package/dist/components/snk-filter-detail.js +6 -0
- package/dist/components/snk-filter-detail2.js +187 -0
- package/dist/components/snk-filter-field-search.d.ts +11 -0
- package/dist/components/snk-filter-field-search.js +6 -0
- package/dist/components/snk-filter-field-search2.js +228 -0
- package/dist/components/snk-filter-item.d.ts +11 -0
- package/dist/components/snk-filter-item.js +6 -0
- package/dist/components/snk-filter-item2.js +303 -0
- package/dist/components/snk-filter-list.d.ts +11 -0
- package/dist/components/snk-filter-list.js +176 -0
- package/dist/components/snk-filter-modal-item.d.ts +11 -0
- package/dist/components/snk-filter-modal-item.js +6 -0
- package/dist/components/snk-filter-modal-item2.js +140 -0
- package/dist/components/snk-filter-modal.d.ts +11 -0
- package/dist/components/snk-filter-modal.js +242 -0
- package/dist/components/snk-filter-multi-select.d.ts +11 -0
- package/dist/components/snk-filter-multi-select.js +60 -0
- package/dist/components/snk-filter-number.d.ts +11 -0
- package/dist/components/snk-filter-number.js +61 -0
- package/dist/components/snk-filter-param-config.d.ts +11 -0
- package/dist/components/snk-filter-param-config.js +6 -0
- package/dist/components/snk-filter-param-config2.js +229 -0
- package/dist/components/snk-filter-period.d.ts +11 -0
- package/dist/components/snk-filter-period.js +92 -0
- package/dist/components/snk-filter-search.d.ts +11 -0
- package/dist/components/snk-filter-search.js +71 -0
- package/dist/components/snk-filter-text.d.ts +11 -0
- package/dist/components/snk-filter-text.js +52 -0
- package/dist/components/snk-form-config.d.ts +11 -0
- package/dist/components/snk-form-config.js +6 -0
- package/dist/components/snk-form-config2.js +1027 -0
- package/dist/components/snk-form-summary.d.ts +11 -0
- package/dist/components/snk-form-summary.js +6 -0
- package/dist/components/snk-form-summary2.js +75 -0
- package/dist/components/snk-form-view.d.ts +11 -0
- package/dist/components/snk-form-view.js +6 -0
- package/dist/components/snk-form-view2.js +129 -0
- package/dist/components/snk-form.d.ts +11 -0
- package/dist/components/snk-form.js +126 -0
- package/dist/components/snk-grid-config.d.ts +11 -0
- package/dist/components/snk-grid-config.js +6 -0
- package/dist/components/snk-grid-config2.js +499 -0
- package/dist/components/snk-grid.d.ts +11 -0
- package/dist/components/snk-grid.js +6 -0
- package/dist/components/snk-grid2.js +457 -0
- package/dist/components/snk-guides-viewer.d.ts +11 -0
- package/dist/components/snk-guides-viewer.js +6 -0
- package/dist/components/snk-personalized-filter-editor.d.ts +11 -0
- package/dist/components/snk-personalized-filter-editor.js +230 -0
- package/dist/components/snk-personalized-filter.d.ts +11 -0
- package/dist/components/snk-personalized-filter.js +6 -0
- package/dist/components/snk-personalized-filter2.js +357 -0
- package/dist/components/snk-pesquisa.d.ts +11 -0
- package/dist/components/snk-pesquisa.js +6 -0
- package/dist/components/snk-pesquisa2.js +340 -0
- package/dist/components/snk-print-selector.d.ts +11 -0
- package/dist/components/snk-print-selector.js +183 -0
- package/dist/components/snk-select-box.d.ts +11 -0
- package/dist/components/snk-select-box.js +6 -0
- package/dist/components/snk-select-box2.js +38 -0
- package/dist/components/snk-simple-bar.d.ts +11 -0
- package/dist/components/snk-simple-bar.js +6 -0
- package/dist/components/snk-simple-bar2.js +59 -0
- package/dist/components/snk-simple-crud.d.ts +11 -0
- package/dist/components/snk-simple-crud.js +6 -0
- package/dist/components/snk-simple-crud2.js +390 -0
- package/dist/components/snk-tab-config.d.ts +11 -0
- package/dist/components/snk-tab-config.js +6 -0
- package/dist/components/snk-tab-config2.js +7232 -0
- package/dist/components/snk-taskbar.d.ts +11 -0
- package/dist/components/snk-taskbar.js +6 -0
- package/dist/components/snk-taskbar2.js +372 -0
- package/dist/components/teste-pesquisa.d.ts +11 -0
- package/dist/components/teste-pesquisa.js +63 -0
- package/dist/esm/AuthorizationConfig-dcbd207a.js +7 -0
- package/dist/esm/ConfigStorage-19a7260b.js +306 -0
- package/dist/esm/DataFetcher-e0fc5549.js +7082 -0
- package/dist/esm/ParamType-d5152b06.js +13 -0
- package/dist/esm/PersonalizedFilterUtils-75fb0106.js +218 -0
- package/dist/esm/SnkFormConfigManager-1a42eb02.js +134 -0
- package/dist/esm/SnkMessageBuilder-68c1c25a.js +629 -0
- package/dist/esm/SnkMultiSelectionListDataSource-892f37f9.js +32 -0
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/auth-fetcher-83a946f8.js +32 -0
- package/dist/esm/constants-3644f1b6.js +90 -0
- package/dist/esm/dataunit-fetcher-6a695723.js +354 -0
- package/dist/esm/draggable.bundle-41d56f06.js +6884 -0
- package/dist/esm/filter-bar-config-fetcher-06e02851.js +153 -0
- package/dist/esm/filter-item-type.enum-5028ed3f.js +15 -0
- package/dist/esm/filter-type.enum-a80c1b6b.js +9 -0
- package/dist/esm/form-config-fetcher-9e167008.js +179 -0
- package/dist/esm/index-1564817d.js +33 -0
- package/dist/esm/index-620ac460.js +7 -0
- package/dist/esm/index-a7d3d3f1.js +2296 -0
- package/dist/esm/index-ae591a44.js +44 -0
- package/dist/esm/index-bdf75557.js +199 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +18 -0
- package/dist/esm/pesquisa-fetcher-9118eb7a.js +165 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/presentationMode-783bbf9d.js +7 -0
- package/dist/esm/resource-fetcher-768d5556.js +66 -0
- package/dist/esm/sankhyablocks.js +18 -0
- package/dist/esm/snk-actions-button.entry.js +701 -0
- package/dist/esm/snk-actions-form.entry.js +196 -0
- package/dist/esm/snk-application.entry.js +927 -0
- package/dist/esm/snk-attach.entry.js +448 -0
- package/dist/esm/snk-client-confirm.entry.js +48 -0
- package/dist/esm/snk-config-options.entry.js +235 -0
- package/dist/esm/snk-configurator.entry.js +95 -0
- package/dist/esm/snk-crud.entry.js +179 -0
- package/dist/esm/snk-data-exporter.entry.js +516 -0
- package/dist/esm/snk-data-unit-77508763.js +451 -0
- package/dist/esm/snk-data-unit.entry.js +5 -0
- package/dist/esm/snk-detail-view.entry.js +265 -0
- package/dist/esm/snk-entity-list.entry.js +114 -0
- package/dist/esm/snk-exporter-email-sender.entry.js +128 -0
- package/dist/esm/snk-expression-group_2.entry.js +540 -0
- package/dist/esm/snk-field-config.entry.js +56 -0
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +55 -0
- package/dist/esm/snk-filter-bar.entry.js +506 -0
- package/dist/esm/snk-filter-binary-select.entry.js +87 -0
- package/dist/esm/snk-filter-detail.entry.js +174 -0
- package/dist/esm/snk-filter-field-search_2.entry.js +403 -0
- package/dist/esm/snk-filter-item.entry.js +277 -0
- package/dist/esm/snk-filter-list.entry.js +148 -0
- package/dist/esm/snk-filter-modal-item.entry.js +122 -0
- package/dist/esm/snk-filter-modal.entry.js +213 -0
- package/dist/esm/snk-filter-multi-select.entry.js +39 -0
- package/dist/esm/snk-filter-number.entry.js +40 -0
- package/dist/esm/snk-filter-period.entry.js +69 -0
- package/dist/esm/snk-filter-search.entry.js +50 -0
- package/dist/esm/snk-filter-text.entry.js +32 -0
- package/dist/esm/snk-form-config.entry.js +987 -0
- package/dist/esm/snk-form-summary.entry.js +57 -0
- package/dist/esm/snk-form-view.entry.js +95 -0
- package/dist/esm/snk-form.entry.js +83 -0
- package/dist/esm/snk-grid-config.entry.js +480 -0
- package/dist/esm/snk-grid.entry.js +328 -0
- package/dist/esm/snk-guides-viewer-c47cd45e.js +332 -0
- package/dist/esm/snk-guides-viewer.entry.js +20 -0
- package/dist/esm/snk-personalized-filter-editor.entry.js +206 -0
- package/dist/esm/snk-personalized-filter.entry.js +301 -0
- package/dist/esm/snk-pesquisa.entry.js +320 -0
- package/dist/esm/snk-print-selector.entry.js +161 -0
- package/dist/esm/snk-select-box.entry.js +21 -0
- package/dist/esm/snk-simple-bar.entry.js +41 -0
- package/dist/esm/snk-simple-crud.entry.js +334 -0
- package/dist/esm/snk-tab-config.entry.js +327 -0
- package/dist/esm/snk-taskbar.entry.js +217 -0
- package/dist/esm/taskbar-elements-2c761819.js +118 -0
- package/dist/esm/taskbar-processor-94402e6e.js +47 -0
- package/dist/esm/teste-pesquisa.entry.js +33 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/sankhyablocks/index.esm.js +0 -0
- package/dist/sankhyablocks/p-0885ed3c.entry.js +1 -0
- package/dist/sankhyablocks/p-0a4c753d.js +6 -0
- package/dist/sankhyablocks/p-0ed0fc02.entry.js +1 -0
- package/dist/sankhyablocks/p-112455b1.js +1 -0
- package/dist/sankhyablocks/p-118e769b.entry.js +1 -0
- package/dist/sankhyablocks/p-1a68fb59.js +1 -0
- package/dist/sankhyablocks/p-216f081a.entry.js +1 -0
- package/dist/sankhyablocks/p-219f888d.entry.js +1 -0
- package/dist/sankhyablocks/p-22c6fe1a.entry.js +1 -0
- package/dist/sankhyablocks/p-247a8b36.entry.js +1 -0
- package/dist/sankhyablocks/p-25c5428f.entry.js +1 -0
- package/dist/sankhyablocks/p-26ad62b9.entry.js +1 -0
- package/dist/sankhyablocks/p-26b0ce3e.entry.js +1 -0
- package/dist/sankhyablocks/p-2ac9c585.js +76 -0
- package/dist/sankhyablocks/p-34085ced.entry.js +1 -0
- package/dist/sankhyablocks/p-34a1357a.entry.js +1 -0
- package/dist/sankhyablocks/p-4721c3db.js +1 -0
- package/dist/sankhyablocks/p-4a78e118.js +1 -0
- package/dist/sankhyablocks/p-5534e08c.js +1 -0
- package/dist/sankhyablocks/p-584d7212.js +1 -0
- package/dist/sankhyablocks/p-5c1aacc7.js +1 -0
- package/dist/sankhyablocks/p-5d04ae42.entry.js +1 -0
- package/dist/sankhyablocks/p-6759adae.entry.js +1 -0
- package/dist/sankhyablocks/p-6dc031de.js +1 -0
- package/dist/sankhyablocks/p-7b8b8ae9.js +10 -0
- package/dist/sankhyablocks/p-7e285d6c.entry.js +11 -0
- package/dist/sankhyablocks/p-815a42c0.entry.js +1 -0
- package/dist/sankhyablocks/p-838f8234.entry.js +1 -0
- package/dist/sankhyablocks/p-88aa931b.entry.js +1 -0
- package/dist/sankhyablocks/p-8a41172a.entry.js +1 -0
- package/dist/sankhyablocks/p-8f8184ff.js +56 -0
- package/dist/sankhyablocks/p-933c0c0b.js +1 -0
- package/dist/sankhyablocks/p-9531fd46.entry.js +1 -0
- package/dist/sankhyablocks/p-959e0835.entry.js +1 -0
- package/dist/sankhyablocks/p-968741cc.js +1 -0
- package/dist/sankhyablocks/p-96a89d58.entry.js +1 -0
- package/dist/sankhyablocks/p-976e56e9.js +1 -0
- package/dist/sankhyablocks/p-98f9d076.js +17 -0
- package/dist/sankhyablocks/p-9d3a025a.entry.js +1 -0
- package/dist/sankhyablocks/p-a1e1b305.entry.js +1 -0
- package/dist/sankhyablocks/p-a2493d11.js +1 -0
- package/dist/sankhyablocks/p-ac8d1cd6.entry.js +1 -0
- package/dist/sankhyablocks/p-ae6aff81.js +1 -0
- package/dist/sankhyablocks/p-b6d6b172.js +1 -0
- package/dist/sankhyablocks/p-bc735728.entry.js +1 -0
- package/dist/sankhyablocks/p-bd628455.entry.js +1 -0
- package/dist/sankhyablocks/p-be684b38.entry.js +1 -0
- package/dist/sankhyablocks/p-befbc9ee.entry.js +1 -0
- package/dist/sankhyablocks/p-c0f656af.entry.js +1 -0
- package/dist/sankhyablocks/p-c2beb95c.js +1 -0
- package/dist/sankhyablocks/p-c44f6aaf.entry.js +1 -0
- package/dist/sankhyablocks/p-c57bd935.entry.js +1 -0
- package/dist/sankhyablocks/p-c6380ea2.entry.js +1 -0
- package/dist/sankhyablocks/p-cb37982f.entry.js +1 -0
- package/dist/sankhyablocks/p-cfd7da4a.entry.js +1 -0
- package/dist/sankhyablocks/p-d1b89765.js +1 -0
- package/dist/sankhyablocks/p-d2d301a6.js +2 -0
- package/dist/sankhyablocks/p-d3ec3586.entry.js +1 -0
- package/dist/sankhyablocks/p-d9804798.js +1 -0
- package/dist/sankhyablocks/p-dc36cfbf.js +1 -0
- package/dist/sankhyablocks/p-de69b4b0.entry.js +1 -0
- package/dist/sankhyablocks/p-df8621b4.js +1 -0
- package/dist/sankhyablocks/p-e28129aa.entry.js +1 -0
- package/dist/sankhyablocks/p-e3a82e1c.entry.js +1 -0
- package/dist/sankhyablocks/p-e7e54737.entry.js +1 -0
- package/dist/sankhyablocks/p-eaad0aa8.js +1 -0
- package/dist/sankhyablocks/p-eb636e15.entry.js +1 -0
- package/dist/sankhyablocks/p-f30526a7.entry.js +1 -0
- package/dist/sankhyablocks/p-f31bfdee.entry.js +1 -0
- package/dist/sankhyablocks/p-f4184ce7.js +1 -0
- package/dist/sankhyablocks/p-f88c45bf.js +1 -0
- package/dist/sankhyablocks/p-f9395c20.entry.js +1 -0
- package/dist/sankhyablocks/p-fa9d3f73.js +1 -0
- package/dist/sankhyablocks/p-fe010e54.entry.js +1 -0
- package/dist/sankhyablocks/p-fe49067d.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -0
- package/dist/types/components/snk-actions-button/actions/enum/ActionsType.d.ts +7 -0
- package/dist/types/components/snk-actions-button/actions/enum/ParamType.d.ts +10 -0
- package/dist/types/components/snk-actions-button/actions/enum/RefreshType.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/executor/java.executor.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/executor/javascript.executor.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/executor/launch-screen.executor.d.ts +10 -0
- package/dist/types/components/snk-actions-button/actions/executor/procedure.executor.d.ts +6 -0
- package/dist/types/components/snk-actions-button/actions/factory/executor.factory.d.ts +7 -0
- package/dist/types/components/snk-actions-button/actions/index.d.ts +27 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IAction.d.ts +55 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IExecSource.d.ts +17 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IExecuteActions.d.ts +4 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IExecuteActionsProps.d.ts +4 -0
- package/dist/types/components/snk-actions-button/actions/interfaces/IResultParam.d.ts +14 -0
- package/dist/types/components/snk-actions-button/clientEvent/index.d.ts +4 -0
- package/dist/types/components/snk-actions-button/clientEvent/interfaces/IClientEventConfirm.d.ts +35 -0
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +27 -0
- package/dist/types/components/snk-actions-button/subcomponents/snk-actions-form.d.ts +41 -0
- package/dist/types/components/snk-actions-button/subcomponents/snk-client-confirm.d.ts +31 -0
- package/dist/types/components/snk-application/errorhandler/snk-error-handler.d.ts +9 -0
- package/dist/types/components/snk-application/snk-application.d.ts +288 -0
- package/dist/types/components/snk-attach/interfaces/index.d.ts +10 -0
- package/dist/types/components/snk-attach/snk-attach.d.ts +45 -0
- package/dist/types/components/snk-attach/structure/crud-config-builder.d.ts +7 -0
- package/dist/types/components/snk-attach/structure/data-unit-builder.d.ts +15 -0
- package/dist/types/components/snk-attach/structure/index.d.ts +3 -0
- package/dist/types/components/snk-attach/structure/taskbar-builder.d.ts +8 -0
- package/dist/types/components/snk-configurator/AuthorizationConfig.d.ts +4 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +68 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +114 -0
- package/dist/types/components/snk-crud/subcomponents/CardFormResizeObserver.d.ts +1 -0
- package/dist/types/components/snk-crud/subcomponents/GuideBuilder.d.ts +11 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +98 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-summary.d.ts +22 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +76 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +127 -0
- package/dist/types/components/snk-data-exporter/data/attachment.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/data/email.d.ts +7 -0
- package/dist/types/components/snk-data-exporter/data/export-config.d.ts +10 -0
- package/dist/types/components/snk-data-exporter/data/export-result.d.ts +8 -0
- package/dist/types/components/snk-data-exporter/data/report.d.ts +4 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/email-info-step.d.ts +9 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/options-step.d.ts +9 -0
- package/dist/types/components/snk-data-exporter/exporter-email-sender/snk-exporter-email-sender.d.ts +40 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +15 -0
- package/dist/types/components/snk-data-exporter/interfaces/IRecordID.d.ts +6 -0
- package/dist/types/components/snk-data-exporter/interfaces/ISelectedID.d.ts +13 -0
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +52 -0
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +61 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +141 -0
- package/dist/types/components/snk-entity-list/snk-entity-list.d.ts +46 -0
- package/dist/types/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/enum/presentationMode.d.ts +4 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.d.ts +43 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-multi-select.d.ts +28 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-number.d.ts +28 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-period.d.ts +47 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +30 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-text.d.ts +24 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.d.ts +68 -0
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type.enum.d.ts +12 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +49 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +80 -0
- package/dist/types/components/snk-filter-bar/filter-list/snk-filter-list.d.ts +74 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +56 -0
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-filter-modal-item.d.ts +33 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +79 -0
- package/dist/types/components/snk-filter-bar/types/custom-element-filter.d.ts +6 -0
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +6 -0
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +28 -0
- package/dist/types/components/snk-filter-bar/utils/filters-mock.d.ts +263 -0
- package/dist/types/components/snk-filter-field-search/interfaces/index.d.ts +39 -0
- package/dist/types/components/snk-filter-field-search/snk-filter-field-search.d.ts +68 -0
- package/dist/types/components/snk-filter-field-search/subcomponents/index.d.ts +1 -0
- package/dist/types/components/snk-filter-field-search/subcomponents/list-item.d.ts +2 -0
- package/dist/types/components/snk-form/SnkFormConfigManager.d.ts +23 -0
- package/dist/types/components/snk-form/snk-form.d.ts +46 -0
- package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +57 -0
- package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +43 -0
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +148 -0
- package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +105 -0
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +12 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +123 -0
- package/dist/types/components/snk-grid/subcomponents/snk-grid-config/snk-grid-config.d.ts +74 -0
- package/dist/types/components/snk-grid/subcomponents/snk-select-box/snk-select-box.d.ts +13 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IExpressionGroup.d.ts +0 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IExpressionItem.d.ts +35 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IParameter.d.ts +37 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IPersonalizedFilter.d.ts +15 -0
- package/dist/types/components/snk-personalized-filter/interfaces/ISystemFilterConfig.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/interfaces/IUserFilterConfig.d.ts +5 -0
- package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +35 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +66 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +85 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/filter-operands/filter-operands.d.ts +9 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +68 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-advanced-mode/snk-filter-advanced-mode.d.ts +19 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +31 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.d.ts +52 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/utils/PersonalizedFilterUtils.d.ts +27 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +61 -0
- package/dist/types/components/snk-print-selector/snk-print-selector.d.ts +46 -0
- package/dist/types/components/snk-simple-bar/snk-simple-bar.d.ts +37 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +80 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +33 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +12 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +106 -0
- package/dist/types/components/teste-pesquisa/teste-pesquisa.d.ts +6 -0
- package/dist/types/components.d.ts +3076 -0
- package/dist/types/global.d.ts +9 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/@types/index.d.ts +27 -0
- package/dist/types/lib/applet-caller/applet-caller.d.ts +9 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +27 -0
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +24 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +73 -0
- package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/attach-fetcher.d.ts +14 -0
- package/dist/types/lib/http/data-fetcher/fetchers/auth-fetcher.d.ts +17 -0
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +16 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDelete.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/IDownloadKey.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/ISave.d.ts +26 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fecthAttach/interfaces/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +29 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterResponse.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IPersonalizedReport.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/permission-export-pdf.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/personalized-reports-fetcher.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/filter-bar-config-fetcher.d.ts +11 -0
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +26 -0
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +13 -0
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +42 -0
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +12 -0
- package/dist/types/lib/http/data-fetcher/fetchers/totals-fetcher.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/interfaces/IClientEventResponse.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/recaller/GraphQLRecaller.d.ts +10 -0
- package/dist/types/lib/http/data-fetcher/recaller/IDataFetcherRecaller.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/recaller/ServiceBrokerRecaller.d.ts +9 -0
- package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +23 -0
- package/dist/types/lib/index.d.ts +4 -0
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +45 -0
- package/dist/types/lib/message/resources/crud-utils.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/file-viewer.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-actions-button.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-attach.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-configurator.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-crud.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-data-exporter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-data-unit.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-entity-list.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-exporter.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-filter-bar.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-filter-field-search.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-filter-param-config.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-form.msg.d.ts +4 -0
- package/dist/types/lib/message/resources/snk-grid.msg.d.ts +2 -0
- package/dist/types/lib/message/resources/snk-personalized-filter.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-print-selector.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-simple-bar.msg.d.ts +1 -0
- package/dist/types/lib/message/resources/snk-taskbar.msg.d.ts +2 -0
- package/dist/types/lib/store/index.d.ts +5 -0
- package/dist/types/lib/utils/CrudUtils.d.ts +6 -0
- package/dist/types/lib/utils/PrintUtils.d.ts +54 -0
- package/dist/types/lib/utils/constants.d.ts +103 -0
- package/dist/types/lib/utils/fileViewer/index.d.ts +2 -0
- package/dist/types/lib/utils/fileViewer/interfaces/IFileViewerParams.d.ts +4 -0
- package/dist/types/lib/utils/pesquisa.d.ts +3 -0
- package/dist/types/lib/utils/urlutils.d.ts +4 -0
- package/dist/types/lib/workspace/workspace.d.ts +5 -0
- package/dist/types/stencil-public-runtime.d.ts +1637 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +11 -0
- package/package.json +71 -0
- package/react/.keepfolder +1 -0
- package/react/components.d.ts +51 -0
- package/react/components.js +54 -0
- package/react/components.js.map +1 -0
- package/react/react-component-lib/createComponent.d.ts +10 -0
- package/react/react-component-lib/createComponent.js +59 -0
- package/react/react-component-lib/createComponent.js.map +1 -0
- package/react/react-component-lib/createOverlayComponent.d.ts +20 -0
- package/react/react-component-lib/createOverlayComponent.js +89 -0
- package/react/react-component-lib/createOverlayComponent.js.map +1 -0
- package/react/react-component-lib/index.d.ts +2 -0
- package/react/react-component-lib/index.js +3 -0
- package/react/react-component-lib/index.js.map +1 -0
- package/react/react-component-lib/interfaces.d.ts +29 -0
- package/react/react-component-lib/interfaces.js +2 -0
- package/react/react-component-lib/interfaces.js.map +1 -0
- package/react/react-component-lib/utils/attachProps.d.ts +12 -0
- package/react/react-component-lib/utils/attachProps.js +96 -0
- package/react/react-component-lib/utils/attachProps.js.map +1 -0
- package/react/react-component-lib/utils/case.d.ts +2 -0
- package/react/react-component-lib/utils/case.js +7 -0
- package/react/react-component-lib/utils/case.js.map +1 -0
- package/react/react-component-lib/utils/dev.d.ts +2 -0
- package/react/react-component-lib/utils/dev.js +13 -0
- package/react/react-component-lib/utils/dev.js.map +1 -0
- package/react/react-component-lib/utils/index.d.ts +7 -0
- package/react/react-component-lib/utils/index.js +21 -0
- package/react/react-component-lib/utils/index.js.map +1 -0
|
@@ -0,0 +1,991 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-f9e81701.js');
|
|
6
|
+
const draggable_bundle = require('./draggable.bundle-82a25c06.js');
|
|
7
|
+
const core = require('@sankhyalabs/core');
|
|
8
|
+
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
+
const constants = require('./constants-d187e03e.js');
|
|
10
|
+
const formConfigFetcher = require('./form-config-fetcher-181767c9.js');
|
|
11
|
+
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
12
|
+
require('./_commonjsHelpers-537d719a.js');
|
|
13
|
+
require('./DataFetcher-004811c6.js');
|
|
14
|
+
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
|
+
require('./resource-fetcher-c0332609.js');
|
|
16
|
+
|
|
17
|
+
const snkFormConfigCss = ".sc-snk-form-config-h{--snk-form-config--z-index:var(--more-visible, 2);--snk-form-config--background-color:var(--background--xlight, #fff);--snk-form-config__icon--color:var(--text--disable, #AFB6C0);--snk-form-config__label-counter--font-weight:var(--text-weight--extra-small, 200);--snk-form-config__add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__add-group-container--background-color:var(--background--medium, #d2dce9);--snk-form-config__add-group-container--padding:var(--space--small, 6px);--snk-form-config__add-group-content--border:2px dashed var(--color-strokes, #DCE0E8);--snk-form-config__add-group-content--border-radius:var(--border--radius-small, 6px);--snk-form-config__add-group-label--padding:var(--space--large, 24px);--snk-form-config__btn-add-group--padding:var(--space--large, 24px) var(--space--medium, 12px) 0;--snk-form-config__btn-add-group-container--padding:var(--space--medium, 12px);--snk-form-config__btn-add-group-container--border-radius:var(--border--radius-medium, 12px);--snk-form-config__btn-add-group-container--border:2px solid var(--color-strokes, #DCE0E8);--snk-form-config__btn-add-group-container--background-color:var(--background--body, #fafcff);display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--snk-form-config--z-index);background-color:var(--snk-form-config--background-color)}.form-config__header-container.sc-snk-form-config{display:flex}.form-config__field-container.sc-snk-form-config{width:32%;padding:6px}.form-config__hide-content.sc-snk-form-config{display:none}ez-icon.sc-snk-form-config .left-icon.sc-snk-form-config{--ez-icon--color:var(--snk-form-config__icon--color)}.ez-box__label-counter.sc-snk-form-config{margin-top:-7px;font-weight:var(--snk-form-config__label-counter--font-weight)}.form-config__btn-options.sc-snk-form-config{--ez-button--min-width:300px;--ez-button--background-color:var(--snk-form-config--background-color)}[data-draggable-parent].sc-snk-form-config{position:relative}.form-config__field-config--selected.sc-snk-form-config{position:static}.form-config__field-config--dragged.sc-snk-form-config .draggable-mirror.sc-snk-form-config{z-index:var(--snk-form-config--z-index)}.form-config__config-options.sc-snk-form-config{position:relative;margin-top:-3px;min-width:100%;z-index:1}.form-config__tab-container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config{position:relative;height:100%;max-height:calc(100vh - 92px)}.form-config__tab-container.sc-snk-form-config .ez-box__container.sc-snk-form-config,.form-config__fields-available.sc-snk-form-config .ez-box__container.sc-snk-form-config{align-content:flex-start;height:100%}.form-config__fields-available.sc-snk-form-config [data-draggable-parent].sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:100%;max-height:calc(100% - 122px)}.form-config__tab-content.sc-snk-form-config{align-content:flex-start;overflow-y:auto;height:auto;max-height:calc(100% - 128px)}[data-draggable-element].sc-snk-form-config{cursor:grab}.form-config__actions-button.sc-snk-form-config{--ez-actions-button__btn-action--min-width:235px}.form-config__add-group.sc-snk-form-config{position:relative;min-height:120px;margin-bottom:10px}.form-config__add-group-container.sc-snk-form-config{position:absolute;display:flex;flex-wrap:wrap;width:100%;box-sizing:border-box;border-radius:var(--snk-form-config__add-group-container--border-radius);background-color:var(--snk-form-config__add-group-container--background-color);padding:var(--snk-form-config__add-group-container--padding)}.form-config__add-group-content.sc-snk-form-config{width:100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;box-sizing:border-box;border:var(--snk-form-config__add-group-content--border);border-radius:var(--snk-form-config__add-group-content--border-radius)}.form-config__add-group-label.sc-snk-form-config{display:flex;justify-content:center;box-sizing:border-box;padding:var(--snk-form-config__add-group-label--padding)}.form-config__btn-add-group.sc-snk-form-config{position:relative;padding:var(--snk-form-config__btn-add-group--padding)}.form-config__btn-add-group-container.sc-snk-form-config{padding:var(--snk-form-config__btn-add-group-container--padding);border-radius:var(--snk-form-config__btn-add-group-container--border-radius);border:var(--snk-form-config__btn-add-group-container--border);background-color:var(--snk-form-config__btn-add-group-container--background-color)}ez-collapsible-box.draggable-mirror.sc-snk-form-config{display:table;background-color:var(--snk-form-config--background-color)}ez-collapsible-box.sc-snk-form-config{margin-bottom:10px}@media screen and (min-width: 480px){.form-config__field-config--selected.sc-snk-form-config .ez-flex.form-config__config-options.sc-snk-form-config{min-width:calc(300% + 12px)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+2) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -1)}.form-config__field-config--selected.sc-snk-form-config:nth-child(3n+3) .ez-flex.form-config__config-options.sc-snk-form-config{left:calc(100% / 1 * -2)}}";
|
|
18
|
+
|
|
19
|
+
const CONTAINER_ID = {
|
|
20
|
+
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
|
21
|
+
withoutGroup: "fieldsWithoutGroupContainer",
|
|
22
|
+
fieldsAvailable: "fieldsAvailableContainer",
|
|
23
|
+
addNewGroup: "addNewGroupContainer"
|
|
24
|
+
};
|
|
25
|
+
const SnkFormConfig = class {
|
|
26
|
+
constructor(hostRef) {
|
|
27
|
+
index.registerInstance(this, hostRef);
|
|
28
|
+
this.configChange = index.createEvent(this, "configChange", 7);
|
|
29
|
+
this.configClose = index.createEvent(this, "configClose", 7);
|
|
30
|
+
this._listEnabledFields = [];
|
|
31
|
+
this._renderTimer = 500;
|
|
32
|
+
this._tabSelected = 1;
|
|
33
|
+
this._labelNewGroup = "Novo grupo";
|
|
34
|
+
this._mouseOnFieldConfig = false;
|
|
35
|
+
this._mouseOnConfigOptions = false;
|
|
36
|
+
this._editingTitleGroup = false;
|
|
37
|
+
this._newGroupBoxes = [];
|
|
38
|
+
this._currentGroupBoxes = [];
|
|
39
|
+
this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
|
|
40
|
+
this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
|
|
41
|
+
this._fieldFloatingStyle = "form-config__field-config--dragged";
|
|
42
|
+
this._formConfigOptions = [];
|
|
43
|
+
this._fieldConfigSelected = undefined;
|
|
44
|
+
this._layoutFormConfig = undefined;
|
|
45
|
+
this._fieldsAvailable = undefined;
|
|
46
|
+
this._formConfig = {};
|
|
47
|
+
this._formConfigChanged = false;
|
|
48
|
+
this._optionFormConfigSelected = undefined;
|
|
49
|
+
this._optionFormConfigChanged = false;
|
|
50
|
+
this._tempGroups = [];
|
|
51
|
+
this.dataUnit = undefined;
|
|
52
|
+
this.configManager = undefined;
|
|
53
|
+
this.messagesBuilder = undefined;
|
|
54
|
+
}
|
|
55
|
+
observeConfigManager() {
|
|
56
|
+
this.loadConfig();
|
|
57
|
+
}
|
|
58
|
+
loadFields() {
|
|
59
|
+
this._layoutFormConfig = [];
|
|
60
|
+
this.buildFields();
|
|
61
|
+
}
|
|
62
|
+
buildFields() {
|
|
63
|
+
this.buildFormConfig();
|
|
64
|
+
this.buildAvailableFields();
|
|
65
|
+
}
|
|
66
|
+
loadFormConfig() {
|
|
67
|
+
var _a;
|
|
68
|
+
this._formConfig = this.getConfig();
|
|
69
|
+
this.loadFields();
|
|
70
|
+
this.controlFieldConfig();
|
|
71
|
+
if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
|
72
|
+
this._filterFieldsAvailable.value = "";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
getConfig() {
|
|
76
|
+
let config = this.configManager.getConfig(false, this.dataUnit);
|
|
77
|
+
if (config.fields && config.fields.length === 0) {
|
|
78
|
+
config = undefined;
|
|
79
|
+
}
|
|
80
|
+
if (config == undefined) {
|
|
81
|
+
config = form.buildFormConfigFromDataUnit(this.dataUnit);
|
|
82
|
+
}
|
|
83
|
+
return core.ObjectUtils.copy(config);
|
|
84
|
+
}
|
|
85
|
+
cancelChangeConfig() {
|
|
86
|
+
if (this._formConfigChanged === true) {
|
|
87
|
+
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.cancel")).then((canCancel) => {
|
|
88
|
+
if (canCancel) {
|
|
89
|
+
this._formConfigChanged = false;
|
|
90
|
+
this.resetChangeConfig();
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.resetChangeConfig();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
cancelChangeOptionConfig() {
|
|
99
|
+
if (this._optionFormConfigChanged === true) {
|
|
100
|
+
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.cancel")).then((canCancel) => {
|
|
101
|
+
if (canCancel) {
|
|
102
|
+
this._optionFormConfigChanged = false;
|
|
103
|
+
this.resetChangeOptionConfig();
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.resetChangeOptionConfig();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
resetChangeConfig() {
|
|
112
|
+
this.loadFormConfig();
|
|
113
|
+
this.clearTempGroups();
|
|
114
|
+
}
|
|
115
|
+
resetChangeOptionConfig() {
|
|
116
|
+
this._formConfigChanged = false;
|
|
117
|
+
this.loadConfig();
|
|
118
|
+
this.clearTempGroups();
|
|
119
|
+
}
|
|
120
|
+
getTabsToSave() {
|
|
121
|
+
return this._layoutFormConfig
|
|
122
|
+
.map((layoutConfig, index) => {
|
|
123
|
+
return {
|
|
124
|
+
label: layoutConfig.tab,
|
|
125
|
+
order: index,
|
|
126
|
+
visible: layoutConfig.visible
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
getFieldsToSave() {
|
|
131
|
+
const fields = [];
|
|
132
|
+
const snkFieldConfigs = this._formContainer.querySelectorAll('snk-field-config');
|
|
133
|
+
snkFieldConfigs.forEach((snkField) => {
|
|
134
|
+
const fieldConfig = snkField.fieldConfig;
|
|
135
|
+
if (fieldConfig == undefined) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const fieldToSave = {
|
|
139
|
+
cleanOnCopy: fieldConfig.cleanOnCopy || false,
|
|
140
|
+
group: fieldConfig.group,
|
|
141
|
+
label: fieldConfig.label,
|
|
142
|
+
name: fieldConfig.name,
|
|
143
|
+
required: fieldConfig.required,
|
|
144
|
+
readOnly: fieldConfig.readOnly,
|
|
145
|
+
tab: fieldConfig.tab
|
|
146
|
+
};
|
|
147
|
+
if (fieldConfig.defaultValue != undefined) {
|
|
148
|
+
if (fieldConfig.defaultValue.type == undefined) {
|
|
149
|
+
fieldToSave.defaultValue = {
|
|
150
|
+
type: constants.DEFAULT_TYPE.fixed,
|
|
151
|
+
value: fieldConfig.defaultValue
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
fieldToSave.defaultValue = fieldConfig.defaultValue;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
fields.push(fieldToSave);
|
|
159
|
+
});
|
|
160
|
+
return fields;
|
|
161
|
+
}
|
|
162
|
+
isDefaultConfiguration() {
|
|
163
|
+
var _a;
|
|
164
|
+
const optionSelected = (_a = this._optionFormConfigSelected) === null || _a === void 0 ? void 0 : _a.origin;
|
|
165
|
+
return optionSelected === formConfigFetcher.UserConfigType.DEFAULT
|
|
166
|
+
&& this._optionFormConfigChanged === true
|
|
167
|
+
&& this._formConfigChanged === false;
|
|
168
|
+
}
|
|
169
|
+
buildConfigToSave() {
|
|
170
|
+
let formConfig = {};
|
|
171
|
+
const isDefault = this.isDefaultConfiguration();
|
|
172
|
+
if (isDefault) {
|
|
173
|
+
formConfig = this.getConfig();
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
formConfig = core.ObjectUtils.copy(this._formConfig);
|
|
177
|
+
}
|
|
178
|
+
if (isDefault === false) {
|
|
179
|
+
const tabs = this.getTabsToSave();
|
|
180
|
+
if ((tabs === null || tabs === void 0 ? void 0 : tabs.length) > 0) {
|
|
181
|
+
formConfig.tabs = tabs;
|
|
182
|
+
}
|
|
183
|
+
const fields = this.getFieldsToSave();
|
|
184
|
+
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
|
185
|
+
formConfig.fields = fields;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
formConfig.defaultConfiguration = isDefault;
|
|
189
|
+
return formConfig;
|
|
190
|
+
}
|
|
191
|
+
saveConfig() {
|
|
192
|
+
var _a;
|
|
193
|
+
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
194
|
+
utils.ApplicationUtils.alert(this.getMessage("snkFormConfig.confirm.title"), this.getMessage("snkFormConfig.confirm.group"));
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this._formConfigChanged = false;
|
|
198
|
+
this._optionFormConfigChanged = false;
|
|
199
|
+
this.configManager.saveConfig(this.buildConfigToSave())
|
|
200
|
+
.then(savedConfig => {
|
|
201
|
+
utils.ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
|
202
|
+
this.configChange.emit(savedConfig);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
applyOptionConfig() {
|
|
206
|
+
if (this._optionFormConfigChanged === true && this._optionFormConfigSelected != undefined) {
|
|
207
|
+
const name = this._optionFormConfigSelected.name || "configuração selecionada";
|
|
208
|
+
const origin = this._optionFormConfigSelected.origin === formConfigFetcher.UserConfigType.DEFAULT ? "pessoal" : "padrão";
|
|
209
|
+
const msg = this.getMessage("snkFormConfig.confirm.apply").replace('{0}', name).replace('{1}', origin);
|
|
210
|
+
this.openConfirmDialog(msg).then((canCancel) => {
|
|
211
|
+
if (canCancel) {
|
|
212
|
+
this.saveConfig();
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
this.saveConfig();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
controlFieldConfig(fieldConfig = undefined) {
|
|
221
|
+
var _a;
|
|
222
|
+
if (fieldConfig == undefined) {
|
|
223
|
+
this._fieldConfigSelected = undefined;
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === (fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.name)) {
|
|
227
|
+
this._fieldConfigSelected = undefined;
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
this._fieldConfigSelected = fieldConfig;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
getFieldConfigStyle(fieldConfig) {
|
|
234
|
+
var _a;
|
|
235
|
+
return this._formFieldsStyle +
|
|
236
|
+
(((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === fieldConfig.name ? " form-config__field-config--selected" : "");
|
|
237
|
+
}
|
|
238
|
+
getFieldsByGroup(group) {
|
|
239
|
+
var _a;
|
|
240
|
+
return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
|
|
241
|
+
var _a, _b;
|
|
242
|
+
return index.h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.h("snk-field-config", { messagesBuilder: this.messagesBuilder, onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, modeInsertion: false, fieldConfig: field, dataUnit: this.dataUnit, isConfigActive: ((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === field.name, id: field.name, key: field.name }), ((_b = this._fieldConfigSelected) === null || _b === void 0 ? void 0 : _b.name) === field.name &&
|
|
243
|
+
index.h("div", { class: "ez-flex form-config__config-options" }, index.h("snk-config-options", { idConfig: field.name, messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
|
244
|
+
}) : index.h("div", { class: "form-config__add-group-container" }, index.h("div", { class: "form-config__add-group-content" }, index.h("div", { class: "form-config__add-group-label" }, index.h("label", { class: "ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold" }, this.getMessage("snkFormConfig.form.labelDropField")))));
|
|
245
|
+
}
|
|
246
|
+
handleconfigOptionsChanged(fieldEdited) {
|
|
247
|
+
var _a;
|
|
248
|
+
(_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
249
|
+
});
|
|
250
|
+
this._formConfigChanged = true;
|
|
251
|
+
}
|
|
252
|
+
closeFormConfig() {
|
|
253
|
+
if (this._formConfigChanged === true || this._optionFormConfigChanged === true) {
|
|
254
|
+
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.exit")).then((canClose) => {
|
|
255
|
+
if (canClose) {
|
|
256
|
+
this._formConfigChanged = false;
|
|
257
|
+
this.configClose.emit();
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
this.configClose.emit();
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
openConfirmDialog(msg = "", title = this.getMessage("snkFormConfig.confirm.title")) {
|
|
266
|
+
return utils.ApplicationUtils.confirm(title, msg);
|
|
267
|
+
}
|
|
268
|
+
controlMoveField(evt) {
|
|
269
|
+
const element = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
270
|
+
if ((element === null || element === void 0 ? void 0 : element.closest('[data-draggable-element="field"]')) != undefined) {
|
|
271
|
+
this._mouseOnFieldConfig = true;
|
|
272
|
+
if ((element === null || element === void 0 ? void 0 : element.closest(".form-config__config-options")) != undefined || (element === null || element === void 0 ? void 0 : element.closest('.field-config__options')) != undefined) {
|
|
273
|
+
this._mouseOnConfigOptions = true;
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
const iconList = ['minus', 'settings-inverted', 'chevron-up'];
|
|
277
|
+
const iconName = element === null || element === void 0 ? void 0 : element.iconName;
|
|
278
|
+
if (iconList.includes(iconName) === false) {
|
|
279
|
+
this.controlFieldConfig();
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
controlStartDraggingField(evt) {
|
|
285
|
+
var _a, _b, _c;
|
|
286
|
+
if (this._mouseOnConfigOptions) {
|
|
287
|
+
evt === null || evt === void 0 ? void 0 : evt.cancel();
|
|
288
|
+
this._mouseOnConfigOptions = false;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
const sourceContainer = (_c = (_b = (_a = evt === null || evt === void 0 ? void 0 : evt.data) === null || _a === void 0 ? void 0 : _a.dragEvent) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.sourceContainer;
|
|
292
|
+
if (sourceContainer != undefined) {
|
|
293
|
+
sourceContainer.classList.add(this._fieldFloatingStyle);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
controlSortedDraggingField(evt) {
|
|
298
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
299
|
+
const oldContainer = (_a = evt === null || evt === void 0 ? void 0 : evt.data) === null || _a === void 0 ? void 0 : _a.oldContainer;
|
|
300
|
+
const newContainer = (_b = evt === null || evt === void 0 ? void 0 : evt.data) === null || _b === void 0 ? void 0 : _b.newContainer;
|
|
301
|
+
const draggingElement = (_e = (_d = (_c = evt === null || evt === void 0 ? void 0 : evt.data) === null || _c === void 0 ? void 0 : _c.dragEvent) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.source;
|
|
302
|
+
const originalElement = (_h = (_g = (_f = evt === null || evt === void 0 ? void 0 : evt.data) === null || _f === void 0 ? void 0 : _f.dragEvent) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h.originalSource;
|
|
303
|
+
if (oldContainer != undefined && newContainer != undefined && draggingElement != undefined && originalElement != undefined) {
|
|
304
|
+
if ((newContainer.tagName === CONTAINER_ID.collapsibleBox
|
|
305
|
+
|| newContainer.id === CONTAINER_ID.withoutGroup)
|
|
306
|
+
&& oldContainer.id === CONTAINER_ID.fieldsAvailable) {
|
|
307
|
+
draggingElement.className = this._formFieldsStyle;
|
|
308
|
+
draggingElement.querySelector('snk-field-config').modeInsertion = false;
|
|
309
|
+
originalElement.className = this._formFieldsStyle;
|
|
310
|
+
originalElement.querySelector('snk-field-config').modeInsertion = false;
|
|
311
|
+
}
|
|
312
|
+
else if ((oldContainer.tagName === CONTAINER_ID.collapsibleBox
|
|
313
|
+
|| oldContainer.id === CONTAINER_ID.withoutGroup)
|
|
314
|
+
&& newContainer.id === CONTAINER_ID.fieldsAvailable) {
|
|
315
|
+
draggingElement.className = this._fieldsAvailableStyle;
|
|
316
|
+
draggingElement.querySelector('snk-field-config').modeInsertion = true;
|
|
317
|
+
originalElement.className = this._fieldsAvailableStyle;
|
|
318
|
+
originalElement.querySelector('snk-field-config').modeInsertion = true;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
isCancelDragAvailableField(newContainer, oldContainer, evt) {
|
|
323
|
+
var _a, _b;
|
|
324
|
+
if (newContainer == undefined || oldContainer == undefined || evt == undefined) {
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
if (((_a = evt.data) === null || _a === void 0 ? void 0 : _a.newIndex) !== ((_b = evt.data) === null || _b === void 0 ? void 0 : _b.oldIndex)
|
|
328
|
+
&& newContainer.id === CONTAINER_ID.fieldsAvailable
|
|
329
|
+
&& oldContainer.id === newContainer.id) {
|
|
330
|
+
evt.cancel();
|
|
331
|
+
this._fieldsAvailable = [];
|
|
332
|
+
this.buildAvailableFields();
|
|
333
|
+
return true;
|
|
334
|
+
}
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
isRemoveField(newContainer, oldContainer, fieldConfig) {
|
|
338
|
+
if (newContainer == undefined || oldContainer == undefined || fieldConfig == undefined) {
|
|
339
|
+
return false;
|
|
340
|
+
}
|
|
341
|
+
if ((oldContainer.tagName === CONTAINER_ID.collapsibleBox
|
|
342
|
+
|| oldContainer.id === CONTAINER_ID.withoutGroup)
|
|
343
|
+
&& newContainer.id === CONTAINER_ID.fieldsAvailable) {
|
|
344
|
+
const eventDetail = {
|
|
345
|
+
detail: {
|
|
346
|
+
field: fieldConfig,
|
|
347
|
+
type: constants.ACTION_CONFIG.remove
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
setTimeout(() => {
|
|
351
|
+
this.handleFieldConfigChange(eventDetail);
|
|
352
|
+
}, this._renderTimer);
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
isAddOrMoveField(newContainer, oldContainer, fieldConfig, data) {
|
|
358
|
+
var _a;
|
|
359
|
+
if (newContainer == undefined || oldContainer == undefined || fieldConfig == undefined || data == undefined) {
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
if (data.newIndex !== data.oldIndex
|
|
363
|
+
|| oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
|
364
|
+
|| (newContainer.id === CONTAINER_ID.withoutGroup
|
|
365
|
+
&& oldContainer.id === CONTAINER_ID.fieldsAvailable)) {
|
|
366
|
+
if (this.isFieldAvailable(newContainer, oldContainer)) {
|
|
367
|
+
fieldConfig.tab = (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab;
|
|
368
|
+
}
|
|
369
|
+
fieldConfig.group = newContainer.dataset.groupName;
|
|
370
|
+
setTimeout(() => {
|
|
371
|
+
const isNewGroup = newContainer.id.includes(CONTAINER_ID.addNewGroup);
|
|
372
|
+
if (isNewGroup) {
|
|
373
|
+
this.clearTempGroups(true);
|
|
374
|
+
}
|
|
375
|
+
this.updateFieldsToSave();
|
|
376
|
+
}, this._renderTimer);
|
|
377
|
+
return true;
|
|
378
|
+
}
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
381
|
+
isFieldAvailable(newContainer, oldContainer) {
|
|
382
|
+
if (newContainer == undefined || oldContainer == undefined) {
|
|
383
|
+
return false;
|
|
384
|
+
}
|
|
385
|
+
return (newContainer.tagName === CONTAINER_ID.collapsibleBox
|
|
386
|
+
|| newContainer.id === CONTAINER_ID.withoutGroup)
|
|
387
|
+
&& oldContainer.id === CONTAINER_ID.fieldsAvailable;
|
|
388
|
+
}
|
|
389
|
+
controlStopDraggingField(evt) {
|
|
390
|
+
var _a, _b, _c, _d, _e, _f;
|
|
391
|
+
const oldContainer = (_a = evt === null || evt === void 0 ? void 0 : evt.data) === null || _a === void 0 ? void 0 : _a.oldContainer;
|
|
392
|
+
const newContainer = (_b = evt === null || evt === void 0 ? void 0 : evt.data) === null || _b === void 0 ? void 0 : _b.newContainer;
|
|
393
|
+
if (this.isCancelDragAvailableField(newContainer, oldContainer, evt)) {
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
const originalElement = (_e = (_d = (_c = evt === null || evt === void 0 ? void 0 : evt.data) === null || _c === void 0 ? void 0 : _c.dragEvent) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.originalSource;
|
|
397
|
+
const fieldConfig = (_f = originalElement === null || originalElement === void 0 ? void 0 : originalElement.querySelector('snk-field-config')) === null || _f === void 0 ? void 0 : _f.fieldConfig;
|
|
398
|
+
if (this.isRemoveField(newContainer, oldContainer, fieldConfig)) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (this.isAddOrMoveField(newContainer, oldContainer, fieldConfig, evt === null || evt === void 0 ? void 0 : evt.data)) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
updateFieldsToSave() {
|
|
406
|
+
const fields = this.getFieldsToSave();
|
|
407
|
+
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
|
408
|
+
this._formConfig.fields = fields;
|
|
409
|
+
}
|
|
410
|
+
this.loadFields();
|
|
411
|
+
this._formConfigChanged = true;
|
|
412
|
+
}
|
|
413
|
+
controlSortableField() {
|
|
414
|
+
if (this._sortableContainer == undefined) {
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
if (this._sortableField) {
|
|
418
|
+
this._sortableField.destroy();
|
|
419
|
+
}
|
|
420
|
+
this._sortableField = new draggable_bundle.draggable_bundle.Sortable(this._sortableContainer.querySelectorAll('[data-draggable-parent="field"]'), {
|
|
421
|
+
draggable: '[data-draggable-element="field"]',
|
|
422
|
+
mirror: {
|
|
423
|
+
constrainDimensions: true
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
this._sortableField.on(constants.CONFIG_EVENTS.dragStart, (evt) => this.controlStartDraggingField(evt));
|
|
427
|
+
this._sortableField.on(constants.CONFIG_EVENTS.dragSorted, (evt) => this.controlSortedDraggingField(evt));
|
|
428
|
+
this._sortableField.on(constants.CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingField(evt));
|
|
429
|
+
}
|
|
430
|
+
controlStartDraggingGroup(evt) {
|
|
431
|
+
if (this._mouseOnFieldConfig || this._editingTitleGroup) {
|
|
432
|
+
evt === null || evt === void 0 ? void 0 : evt.cancel();
|
|
433
|
+
this._mouseOnFieldConfig = false;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
controlStopDraggingGroup(evt) {
|
|
437
|
+
if (evt.data.newIndex !== evt.data.oldIndex) {
|
|
438
|
+
setTimeout(() => {
|
|
439
|
+
this.updateFieldsToSave();
|
|
440
|
+
}, this._renderTimer);
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
controlSortableGroup() {
|
|
444
|
+
if (this._sortableContainer == undefined) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
if (this._sortableGroup) {
|
|
448
|
+
this._sortableGroup.destroy();
|
|
449
|
+
}
|
|
450
|
+
this._sortableGroup = new draggable_bundle.draggable_bundle.Sortable(this._sortableContainer.querySelectorAll('[data-draggable-parent="group"]'), {
|
|
451
|
+
draggable: '[data-draggable-element="group"]',
|
|
452
|
+
mirror: {
|
|
453
|
+
constrainDimensions: true
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
this._sortableGroup.on(constants.CONFIG_EVENTS.dragStart, (evt) => this.controlStartDraggingGroup(evt));
|
|
457
|
+
this._sortableGroup.on(constants.CONFIG_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
|
458
|
+
}
|
|
459
|
+
loadUserConfig() {
|
|
460
|
+
if (this._applicationResourceID == undefined) {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
463
|
+
if (this.configManager == undefined) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
this.configManager.fetchUserAvailableConfigs(this._applicationResourceID)
|
|
467
|
+
.then((userConfig) => {
|
|
468
|
+
this._formConfigOptions = userConfig;
|
|
469
|
+
if (this._formConfigOptions == undefined) {
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
let isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
|
473
|
+
const selectedOption = userConfig
|
|
474
|
+
.find((config) => {
|
|
475
|
+
return config.origin === (isDefault ? formConfigFetcher.UserConfigType.DEFAULT : formConfigFetcher.UserConfigType.USER);
|
|
476
|
+
});
|
|
477
|
+
this.setFormConfig(selectedOption);
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
setFormConfig(config) {
|
|
481
|
+
this._optionFormConfigSelected = config;
|
|
482
|
+
}
|
|
483
|
+
controlSelectFormConfig(evt) {
|
|
484
|
+
const action = evt === null || evt === void 0 ? void 0 : evt.detail;
|
|
485
|
+
const selectedOption = this._formConfigOptions
|
|
486
|
+
.find((config) => {
|
|
487
|
+
return config.origin === (action === null || action === void 0 ? void 0 : action.value);
|
|
488
|
+
});
|
|
489
|
+
this.setFormConfig(selectedOption);
|
|
490
|
+
this._optionFormConfigChanged = true;
|
|
491
|
+
this.loadConfigByUser();
|
|
492
|
+
}
|
|
493
|
+
changeTabOrder(newIndex) {
|
|
494
|
+
const tabs = [];
|
|
495
|
+
const tabConfigs = this._tabConfig.querySelectorAll('.tab-config__tab');
|
|
496
|
+
this._tabSelected = newIndex;
|
|
497
|
+
tabConfigs.forEach((tabConfig, index) => {
|
|
498
|
+
var _a;
|
|
499
|
+
if (index) {
|
|
500
|
+
const label = (_a = tabConfig.querySelector('.tab-config__tab-label')) === null || _a === void 0 ? void 0 : _a.getAttribute('title');
|
|
501
|
+
tabs.push({
|
|
502
|
+
label,
|
|
503
|
+
order: (index - 1)
|
|
504
|
+
});
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
this._layoutFormConfig.map((tabLayout) => {
|
|
508
|
+
tabs.forEach((tab) => {
|
|
509
|
+
tab.label === tabLayout.tab && (tab.visible = tabLayout.visible);
|
|
510
|
+
});
|
|
511
|
+
});
|
|
512
|
+
if (tabs.length > 0) {
|
|
513
|
+
this._formConfig.tabs = tabs;
|
|
514
|
+
this.loadFields();
|
|
515
|
+
this.controlFieldConfig();
|
|
516
|
+
this._formConfigChanged = true;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
async loadConfigByUser() {
|
|
520
|
+
if (this._applicationResourceID == undefined) {
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
if (this.configManager == undefined) {
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
if (this._optionFormConfigSelected == undefined) {
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
let config;
|
|
530
|
+
switch (this._optionFormConfigSelected.origin) {
|
|
531
|
+
case formConfigFetcher.UserConfigType.DEFAULT:
|
|
532
|
+
config = await this.configManager.fetchDefaultConfig(this._applicationResourceID);
|
|
533
|
+
break;
|
|
534
|
+
case formConfigFetcher.UserConfigType.DEFAULT:
|
|
535
|
+
config = await this.configManager.fetchDefaultConfig(this._applicationResourceID);
|
|
536
|
+
break;
|
|
537
|
+
}
|
|
538
|
+
if (config != undefined) {
|
|
539
|
+
this._formConfig = config;
|
|
540
|
+
this._tabSelected = 1;
|
|
541
|
+
this.loadFields();
|
|
542
|
+
this.controlFieldConfig();
|
|
543
|
+
this.clearTempGroups();
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
loadConfig() {
|
|
547
|
+
this.loadFormConfig();
|
|
548
|
+
this.loadUserConfig();
|
|
549
|
+
}
|
|
550
|
+
addNewGroup() {
|
|
551
|
+
var _a, _b;
|
|
552
|
+
const tab = (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab;
|
|
553
|
+
const hasGroup = (_b = this._tempGroups) === null || _b === void 0 ? void 0 : _b.find((tempGroup) => {
|
|
554
|
+
return tempGroup.tab === tab && tempGroup.group.includes(this._labelNewGroup);
|
|
555
|
+
});
|
|
556
|
+
if (hasGroup == undefined) {
|
|
557
|
+
this._tempGroups.push({
|
|
558
|
+
tab,
|
|
559
|
+
group: this.handleDuplicateGroups(this._labelNewGroup, this._tabConfig.selectedTab)
|
|
560
|
+
});
|
|
561
|
+
this.loadFields();
|
|
562
|
+
this.controlFieldConfig();
|
|
563
|
+
this._formConfigChanged = true;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
clearTempGroups(clearInTab = false) {
|
|
567
|
+
var _a;
|
|
568
|
+
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
569
|
+
if (clearInTab) {
|
|
570
|
+
this._tempGroups = this._tempGroups.filter((tempGroup) => {
|
|
571
|
+
return tempGroup.tab !== this._tabConfig.selectedTab;
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
else {
|
|
575
|
+
this._tempGroups = [];
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
removeGroup(indexTempGroup = undefined) {
|
|
580
|
+
if (indexTempGroup != undefined) {
|
|
581
|
+
this._tempGroups = this._tempGroups.filter((tempGroup, index) => {
|
|
582
|
+
return (index !== indexTempGroup
|
|
583
|
+
&& tempGroup.tab === this._tabConfig.selectedTab)
|
|
584
|
+
|| tempGroup.tab !== this._tabConfig.selectedTab;
|
|
585
|
+
});
|
|
586
|
+
}
|
|
587
|
+
else {
|
|
588
|
+
this.updateFieldsToSave();
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
|
|
592
|
+
var _a, _b, _c;
|
|
593
|
+
const tabName = (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab;
|
|
594
|
+
const currentTab = (_b = this._layoutFormConfig) === null || _b === void 0 ? void 0 : _b.find(tab => tab.tab === tabName);
|
|
595
|
+
const tabGroupsNames = (_c = currentTab === null || currentTab === void 0 ? void 0 : currentTab.groups) === null || _c === void 0 ? void 0 : _c.map(tab => { var _a; return (_a = tab.group) === null || _a === void 0 ? void 0 : _a.toLowerCase(); });
|
|
596
|
+
if (tabGroupsNames === null || tabGroupsNames === void 0 ? void 0 : tabGroupsNames.includes(newLabel === null || newLabel === void 0 ? void 0 : newLabel.toLowerCase())) {
|
|
597
|
+
const title = this.getMessage("snkFormConfig.confirm.title");
|
|
598
|
+
const message = `
|
|
599
|
+
${this.getMessage("snkFormConfig.alert.titleGroupExists")}
|
|
600
|
+
<b>${newLabel}</b>
|
|
601
|
+
${this.getMessage("snkFormConfig.alert.inTab")}
|
|
602
|
+
<b>${tabName === constants.TAB_NAMES.main ? this.getMessage("snkFormConfig.form.mainArea") : tabName}</b>.
|
|
603
|
+
<br/><br/>
|
|
604
|
+
${this.getMessage("snkFormConfig.alert.infoValidTitle")}
|
|
605
|
+
`;
|
|
606
|
+
utils.ApplicationUtils.alert(title, message)
|
|
607
|
+
.then(() => {
|
|
608
|
+
var _a, _b;
|
|
609
|
+
if (isTempGroup) {
|
|
610
|
+
(_a = this._newGroupBoxes[indexGroup]) === null || _a === void 0 ? void 0 : _a.applyFocusTextEdit();
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
(_b = this._currentGroupBoxes[tabName][indexGroup]) === null || _b === void 0 ? void 0 : _b.applyFocusTextEdit();
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
return false;
|
|
617
|
+
}
|
|
618
|
+
return true;
|
|
619
|
+
}
|
|
620
|
+
saveEditLabelTempGroup(editDetails, index) {
|
|
621
|
+
const { newValue: newLabel } = editDetails.detail;
|
|
622
|
+
if (this._newGroupBoxes != undefined && this._newGroupBoxes[index] != undefined) {
|
|
623
|
+
this._newGroupBoxes[index].dataset.groupName = newLabel;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
saveEditLabelGroup(editDetails) {
|
|
627
|
+
var _a;
|
|
628
|
+
const { value: oldLabel, newValue: newLabel } = editDetails.detail;
|
|
629
|
+
(_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
|
630
|
+
if (field.group === oldLabel) {
|
|
631
|
+
field.group = newLabel;
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
this.loadFields();
|
|
635
|
+
this.controlFieldConfig();
|
|
636
|
+
this._formConfigChanged = true;
|
|
637
|
+
}
|
|
638
|
+
renderTempGroupByTab(tabName) {
|
|
639
|
+
return this._tempGroups.map((tempGroup, indexGroup) => {
|
|
640
|
+
if (tempGroup.tab === tabName) {
|
|
641
|
+
return index.h("ez-collapsible-box", { ref: ref => this._newGroupBoxes[indexGroup] = ref, id: `${CONTAINER_ID.addNewGroup}-${indexGroup}`, editable: true, removable: true, "header-size": "large", label: tempGroup.group, "icon-placement": "left", "data-group-name": tempGroup.group, "data-draggable-parent": "field", class: "form-config__add-group", onEzRemove: () => this.removeGroup(indexGroup), onEzSaveEditLabel: (evt) => this.saveEditLabelTempGroup(evt, indexGroup), onEzEditLabelMode: (evt) => this._editingTitleGroup = evt.detail, conditionalSave: (newLabel) => this.checkGroupExists(newLabel, indexGroup, true) }, this.getFieldsByGroup(tempGroup));
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
handleDuplicateGroups(titleNewGroup, currentTab) {
|
|
646
|
+
var _a;
|
|
647
|
+
const selectedTabGroups = this._layoutFormConfig[this._tabConfig.selectedIndex].groups.map(tab => tab.group);
|
|
648
|
+
if (selectedTabGroups != undefined) {
|
|
649
|
+
(_a = this._layoutFormConfig) === null || _a === void 0 ? void 0 : _a.map(tab => {
|
|
650
|
+
if (tab.tab === currentTab) {
|
|
651
|
+
if (tab.groups.some(groups => groups.group === titleNewGroup)) {
|
|
652
|
+
titleNewGroup += `${this.captureHighestValueTitle(selectedTabGroups)}`;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
});
|
|
656
|
+
}
|
|
657
|
+
return titleNewGroup;
|
|
658
|
+
}
|
|
659
|
+
captureHighestValueTitle(groupsTemp) {
|
|
660
|
+
let valuesNumericTitle = [];
|
|
661
|
+
groupsTemp === null || groupsTemp === void 0 ? void 0 : groupsTemp.map(group => {
|
|
662
|
+
if (group != undefined) {
|
|
663
|
+
valuesNumericTitle.push(group.replace(/[^0-9]/g, ''));
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
if (Math.max.apply(null, valuesNumericTitle) > 0) {
|
|
667
|
+
return ` (${Math.max.apply(null, valuesNumericTitle) + 1})`;
|
|
668
|
+
}
|
|
669
|
+
else {
|
|
670
|
+
return ' (1)';
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
getLayoutFormConfig() {
|
|
674
|
+
var _a, _b;
|
|
675
|
+
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined) {
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
let layoutFormConfig = [];
|
|
679
|
+
let fields = [];
|
|
680
|
+
for (const field of this._formConfig.fields) {
|
|
681
|
+
const hasField = fields.find((fieldTemp) => {
|
|
682
|
+
return field.name === fieldTemp.name && field.tab === fieldTemp.tab;
|
|
683
|
+
});
|
|
684
|
+
if (hasField == undefined) {
|
|
685
|
+
fields.push(field);
|
|
686
|
+
const fieldMD = this.dataUnit.getField(field.name);
|
|
687
|
+
if (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.visible) {
|
|
688
|
+
if (field.label == undefined || field.label === "") {
|
|
689
|
+
field.label = fieldMD.label;
|
|
690
|
+
}
|
|
691
|
+
if (field.tab == undefined || field.tab === "") {
|
|
692
|
+
field.tab = this.getMessage("snkFormConfig.form.tabGeneral");
|
|
693
|
+
}
|
|
694
|
+
let tab = layoutFormConfig.find(value => value.tab === field.tab);
|
|
695
|
+
if (tab == undefined) {
|
|
696
|
+
let visible = null;
|
|
697
|
+
if (this._formConfig.tabs != undefined) {
|
|
698
|
+
const configTabs = this._formConfig.tabs.filter(configTab => configTab.label === field.tab);
|
|
699
|
+
if (configTabs.length > 0) {
|
|
700
|
+
visible = configTabs[0].visible;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
const tabLabel = ((_b = field.tab) === null || _b === void 0 ? void 0 : _b.label) || field.tab;
|
|
704
|
+
if (visible !== null) {
|
|
705
|
+
tab = { tab: tabLabel, groups: [], visible };
|
|
706
|
+
}
|
|
707
|
+
else {
|
|
708
|
+
tab = { tab: tabLabel, groups: [], visible: true };
|
|
709
|
+
}
|
|
710
|
+
layoutFormConfig.push(tab);
|
|
711
|
+
}
|
|
712
|
+
const group = tab.groups.find(value => value.group === field.group);
|
|
713
|
+
if (group) {
|
|
714
|
+
group.fields.push(field);
|
|
715
|
+
}
|
|
716
|
+
else {
|
|
717
|
+
const newGroup = { group: field.group, fields: [field] };
|
|
718
|
+
if (field.group === undefined) {
|
|
719
|
+
tab.groups.unshift(newGroup);
|
|
720
|
+
}
|
|
721
|
+
else {
|
|
722
|
+
tab.groups.push(newGroup);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
return layoutFormConfig;
|
|
729
|
+
}
|
|
730
|
+
configureTabs(layoutFormConfig) {
|
|
731
|
+
var _a;
|
|
732
|
+
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.tabs) == undefined) {
|
|
733
|
+
return layoutFormConfig;
|
|
734
|
+
}
|
|
735
|
+
if (layoutFormConfig == undefined) {
|
|
736
|
+
layoutFormConfig = [];
|
|
737
|
+
}
|
|
738
|
+
return this._formConfig.tabs.map((tab) => {
|
|
739
|
+
return layoutFormConfig.find(config => { var _a, _b; return ((_a = tab.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = config.tab) === null || _b === void 0 ? void 0 : _b.toLowerCase()); })
|
|
740
|
+
|| { tab: tab.label, groups: [], visible: tab.visible };
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
configureTabMain(layoutFormConfig) {
|
|
744
|
+
if (layoutFormConfig == undefined) {
|
|
745
|
+
layoutFormConfig = [];
|
|
746
|
+
}
|
|
747
|
+
const hasTabMain = layoutFormConfig.find((layoutTab) => {
|
|
748
|
+
return layoutTab.tab === constants.TAB_NAMES.main;
|
|
749
|
+
});
|
|
750
|
+
if (hasTabMain == undefined) {
|
|
751
|
+
layoutFormConfig.unshift({ tab: constants.TAB_NAMES.main, groups: [], visible: true });
|
|
752
|
+
}
|
|
753
|
+
return layoutFormConfig;
|
|
754
|
+
}
|
|
755
|
+
updateTabs() {
|
|
756
|
+
const tabs = this.getTabsToSave();
|
|
757
|
+
if ((tabs === null || tabs === void 0 ? void 0 : tabs.length) > 0) {
|
|
758
|
+
this._formConfig.tabs = tabs;
|
|
759
|
+
if (tabs.length === 1) {
|
|
760
|
+
this._tabSelected = 0;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
buildFormConfig() {
|
|
765
|
+
var _a;
|
|
766
|
+
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined) {
|
|
767
|
+
return;
|
|
768
|
+
}
|
|
769
|
+
let layoutFormConfig = this.getLayoutFormConfig();
|
|
770
|
+
layoutFormConfig = this.configureTabs(layoutFormConfig);
|
|
771
|
+
layoutFormConfig = this.configureTabMain(layoutFormConfig);
|
|
772
|
+
this._layoutFormConfig = layoutFormConfig;
|
|
773
|
+
this.updateTabs();
|
|
774
|
+
}
|
|
775
|
+
buildAvailableFields() {
|
|
776
|
+
var _a, _b;
|
|
777
|
+
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined) {
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
let fieldsFormConfig = [];
|
|
781
|
+
let fieldsMetadata = this.dataUnit.metadata.fields;
|
|
782
|
+
for (const field of this._formConfig.fields) {
|
|
783
|
+
fieldsFormConfig.push(field);
|
|
784
|
+
}
|
|
785
|
+
const listFieldsAvailable = fieldsMetadata.filter(({ name: _nameFieldMetadado, visible: _visibleMetadado }) => _visibleMetadado === true
|
|
786
|
+
&& fieldsFormConfig.some(({ name: _nameFieldForm }) => _nameFieldForm === _nameFieldMetadado) === false);
|
|
787
|
+
this._fieldsAvailable = listFieldsAvailable;
|
|
788
|
+
this._listEnabledFields = listFieldsAvailable;
|
|
789
|
+
if (((_b = this._filterFieldsAvailable) === null || _b === void 0 ? void 0 : _b.value) != undefined) {
|
|
790
|
+
const filterValue = this._filterFieldsAvailable.value;
|
|
791
|
+
this.onFilterChange(filterValue);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
changeTabSelected(tabSelected) {
|
|
795
|
+
this._tabSelected = tabSelected.index;
|
|
796
|
+
const selectorTab = this._formContainer.querySelector("div#tab" + tabSelected.index);
|
|
797
|
+
this._formContainer.querySelectorAll(".form-config__tab-content").forEach(container => container.className = "form-config__hide-content sc-snk-form-config");
|
|
798
|
+
if (selectorTab) {
|
|
799
|
+
selectorTab.className = "form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium sc-snk-form-config";
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
onFilterChange(value) {
|
|
803
|
+
this._fieldsAvailable = core.ArrayUtils.applyStringFilter(value, this._listEnabledFields, true, "label");
|
|
804
|
+
}
|
|
805
|
+
orderFieldsAvailable(fields) {
|
|
806
|
+
return core.ArrayUtils.sortAlphabetically(fields);
|
|
807
|
+
}
|
|
808
|
+
handleLabelCounter(sizeList) {
|
|
809
|
+
const labels = [this.getMessage("snkFormConfig.availableFields.labelNoFields"), this.getMessage("snkFormConfig.availableFields.labelOneField")];
|
|
810
|
+
return sizeList > 1 ? `${sizeList} ${this.getMessage("snkFormConfig.availableFields.labelAvailableFields")}` : labels[sizeList];
|
|
811
|
+
}
|
|
812
|
+
controlAddFieldConfig(fieldConfig) {
|
|
813
|
+
var _a;
|
|
814
|
+
this._formConfigChanged = false;
|
|
815
|
+
if (fieldConfig == undefined) {
|
|
816
|
+
return;
|
|
817
|
+
}
|
|
818
|
+
if (this._formConfig.fields == undefined) {
|
|
819
|
+
this._formConfig.fields = [];
|
|
820
|
+
}
|
|
821
|
+
const fieldFinded = this._formConfig.fields.filter((field) => {
|
|
822
|
+
return field.name === fieldConfig.name && field.tab && fieldConfig.tab;
|
|
823
|
+
});
|
|
824
|
+
if (fieldFinded.length > 0) {
|
|
825
|
+
fieldFinded.forEach((field) => {
|
|
826
|
+
field.name = fieldConfig.name;
|
|
827
|
+
field.label = fieldConfig.label;
|
|
828
|
+
field.required = fieldConfig.required;
|
|
829
|
+
field.readOnly = fieldConfig.readOnly;
|
|
830
|
+
field.group = fieldConfig.group;
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
else {
|
|
834
|
+
this._formConfig.fields.push({
|
|
835
|
+
name: fieldConfig.name,
|
|
836
|
+
label: fieldConfig.label,
|
|
837
|
+
required: fieldConfig.required,
|
|
838
|
+
readOnly: fieldConfig.readOnly,
|
|
839
|
+
group: fieldConfig.group,
|
|
840
|
+
tab: (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
this.loadFields();
|
|
844
|
+
this.controlFieldConfig();
|
|
845
|
+
this._formConfigChanged = true;
|
|
846
|
+
this.resetSortables();
|
|
847
|
+
}
|
|
848
|
+
controlRemoveFieldConfig(fieldConfig) {
|
|
849
|
+
var _a;
|
|
850
|
+
this._formConfigChanged = false;
|
|
851
|
+
if (fieldConfig == undefined) {
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
this._formConfig.fields = (_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.filter((field) => field.name !== fieldConfig.name);
|
|
855
|
+
this.loadFields();
|
|
856
|
+
this.controlFieldConfig();
|
|
857
|
+
this._formConfigChanged = true;
|
|
858
|
+
this.resetSortables();
|
|
859
|
+
}
|
|
860
|
+
resetSortables() {
|
|
861
|
+
this.controlSortableField();
|
|
862
|
+
this.controlSortableGroup();
|
|
863
|
+
}
|
|
864
|
+
handleFieldConfigChange(evt) {
|
|
865
|
+
const { field: fieldConfig, type: actionType } = evt.detail;
|
|
866
|
+
if (actionType === constants.ACTION_CONFIG.configuration) {
|
|
867
|
+
this.controlFieldConfig(fieldConfig);
|
|
868
|
+
return;
|
|
869
|
+
}
|
|
870
|
+
if (actionType === constants.ACTION_CONFIG.remove) {
|
|
871
|
+
this.controlRemoveFieldConfig(fieldConfig);
|
|
872
|
+
return;
|
|
873
|
+
}
|
|
874
|
+
if (actionType === constants.ACTION_CONFIG.add) {
|
|
875
|
+
this.controlAddFieldConfig(fieldConfig);
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
changeTabLabel(editDetails) {
|
|
880
|
+
var _a, _b;
|
|
881
|
+
const { value: oldLabel, newValue: newLabel } = editDetails.detail.detail;
|
|
882
|
+
(_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
|
883
|
+
if (field.tab === oldLabel) {
|
|
884
|
+
field.tab = newLabel;
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
(_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.forEach((tab) => {
|
|
888
|
+
if (tab.label === oldLabel) {
|
|
889
|
+
tab.label = newLabel;
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
this.loadFields();
|
|
893
|
+
this.controlFieldConfig();
|
|
894
|
+
this._formConfigChanged = true;
|
|
895
|
+
}
|
|
896
|
+
handleDeleteTab(tabSelected) {
|
|
897
|
+
let options = {
|
|
898
|
+
canClose: false,
|
|
899
|
+
labelCancel: this.getMessage("snkFormConfig.confirm.labelCancel"),
|
|
900
|
+
labelConfirm: this.getMessage("snkFormConfig.confirm.labelDelete"),
|
|
901
|
+
btnConfirmDanger: false
|
|
902
|
+
};
|
|
903
|
+
const title = this.getMessage("snkFormConfig.confirm.title");
|
|
904
|
+
const deleteTab = this.getMessage("snkFormConfig.confirm.deleteTab") + ` <b>${tabSelected.detail.label}</b>?`;
|
|
905
|
+
utils.ApplicationUtils.confirm(title, deleteTab, null, utils.DialogType.WARN, options)
|
|
906
|
+
.then(response => {
|
|
907
|
+
var _a;
|
|
908
|
+
if (response) {
|
|
909
|
+
this._formConfig.tabs = (_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.filter((tab) => {
|
|
910
|
+
return tab.label !== tabSelected.detail.label;
|
|
911
|
+
});
|
|
912
|
+
this.loadFields();
|
|
913
|
+
this.controlFieldConfig();
|
|
914
|
+
this._formConfigChanged = true;
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
}
|
|
918
|
+
changeHideTab(tabSelected) {
|
|
919
|
+
var _a;
|
|
920
|
+
(_a = this._formConfig.tabs) === null || _a === void 0 ? void 0 : _a.forEach((tab) => {
|
|
921
|
+
if (tab.label === tabSelected.detail.label) {
|
|
922
|
+
tab.visible = !tab.visible;
|
|
923
|
+
}
|
|
924
|
+
});
|
|
925
|
+
this.loadFields();
|
|
926
|
+
this.controlFieldConfig();
|
|
927
|
+
this._formConfigChanged = true;
|
|
928
|
+
}
|
|
929
|
+
handleCanStartDragTab() {
|
|
930
|
+
var _a, _b;
|
|
931
|
+
const tabs = this._layoutFormConfig.map(tab => tab.tab);
|
|
932
|
+
for (const tab of tabs) {
|
|
933
|
+
(_a = this._currentGroupBoxes[tab]) === null || _a === void 0 ? void 0 : _a.map(collapsibleBox => collapsibleBox === null || collapsibleBox === void 0 ? void 0 : collapsibleBox.cancelEdition());
|
|
934
|
+
}
|
|
935
|
+
(_b = this._newGroupBoxes) === null || _b === void 0 ? void 0 : _b.map(collapsibleBox => collapsibleBox === null || collapsibleBox === void 0 ? void 0 : collapsibleBox.cancelEdition());
|
|
936
|
+
}
|
|
937
|
+
/**
|
|
938
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
939
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
|
940
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
941
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
|
|
942
|
+
*/
|
|
943
|
+
getMessage(key, params) {
|
|
944
|
+
return this.messagesBuilder.getMessage(key, params);
|
|
945
|
+
}
|
|
946
|
+
componentDidRender() {
|
|
947
|
+
this.controlSortableField();
|
|
948
|
+
this.controlSortableGroup();
|
|
949
|
+
}
|
|
950
|
+
componentWillLoad() {
|
|
951
|
+
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
952
|
+
this._application.getResourceID().then(resourceID => {
|
|
953
|
+
this._applicationResourceID = resourceID;
|
|
954
|
+
this.loadConfig();
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
componentDidLoad() {
|
|
958
|
+
const dataInfo = { dataUnit: this.dataUnit };
|
|
959
|
+
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
960
|
+
}
|
|
961
|
+
render() {
|
|
962
|
+
var _a, _b, _c, _d;
|
|
963
|
+
return (index.h(index.Host, null, index.h("div", { class: "ez-row ez-padding--medium" }, index.h("div", { class: "ez-col ez-col--sd-7 ez-col--tb-9 ez-align--middle" }, index.h("ez-button", { mode: "icon", title: this.getMessage("snkFormConfig.goBackTitle"), iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: () => this.closeFormConfig(), id: "formConfigToBack" }), index.h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage("snkFormConfig.title")), this._formConfigOptions &&
|
|
964
|
+
index.h("ez-actions-button", { class: "form-config__actions-button ez-margin-left--medium", value: (_a = this._optionFormConfigSelected) === null || _a === void 0 ? void 0 : _a.origin, showLabel: true, displayIcon: "chevron-down", checkOption: true, size: "small", actions: this._formConfigOptions.map((option) => {
|
|
965
|
+
return { value: option.origin, label: option.name };
|
|
966
|
+
}), onEzAction: (evt) => this.controlSelectFormConfig(evt), id: "selectConfig" })), index.h("div", { class: "ez-col ez-col--sd-5 ez-col--tb-3 ez-align--middle ez-align--right" }, this._formConfigChanged === true && this._optionFormConfigChanged === false &&
|
|
967
|
+
index.h("div", { class: "ez-row ez-align--middle ez-align--right" }, index.h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeConfig() }), index.h("ez-button", { label: "Salvar", class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.saveConfig() }, index.h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "save" }))), this._optionFormConfigChanged === true &&
|
|
968
|
+
index.h("div", { class: "ez-row ez-align--middle ez-align--right" }, index.h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeOptionConfig() }), index.h("ez-button", { label: this.getMessage("snkFormConfig.applyConfig"), class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.applyOptionConfig() })))), index.h("div", { class: "ez-row ez-padding--medium", ref: ref => this._sortableContainer = ref }, index.h("div", { class: "form-config__tab-container ez-col ez-col--sd-9 ez-col--tb-9 ez-padding-right--medium" }, ((_b = this._layoutFormConfig) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
|
|
969
|
+
index.h("section", { class: "ez-box__container", ref: ref => this._formContainer = ref }, index.h("snk-tab-config", { ref: ref => this._tabConfig = ref, selectedIndex: this._tabSelected, messagesBuilder: this.messagesBuilder, onEzTabChange: (ev) => this.changeTabSelected(ev.detail), onEzOrderChange: (ev) => this.changeTabOrder(ev.detail), onEditionTitleTab: (ev) => this.changeTabLabel(ev), onDeleteTab: (ev) => this.handleDeleteTab(ev), onHideTab: (ev) => this.changeHideTab(ev), onCanStartDrag: () => this.handleCanStartDragTab(), tabItems: this._layoutFormConfig.map((tab) => { return { tabKey: tab.tab, label: tab.tab, visible: tab.visible }; }) }), this._layoutFormConfig.map((tab, indexTab) => index.h("div", { id: "tab" + indexTab, "data-draggable-parent": "group", class: this._tabSelected === indexTab
|
|
970
|
+
? "form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium"
|
|
971
|
+
: "form-config__hide-content" }, tab.groups.map((group, indexGroup) => {
|
|
972
|
+
if (group.group) {
|
|
973
|
+
if (this._currentGroupBoxes[tab.tab] == undefined) {
|
|
974
|
+
this._currentGroupBoxes[tab.tab] = [];
|
|
975
|
+
}
|
|
976
|
+
return index.h("ez-collapsible-box", { ref: ref => this._currentGroupBoxes[tab.tab][indexGroup] = ref, editable: true, removable: true, "header-size": "large", label: group.group, "icon-placement": "left", "data-group-name": group.group, "data-draggable-parent": "field", "data-draggable-element": "group", onEzRemove: () => this.removeGroup(), onEzSaveEditLabel: (evt) => this.saveEditLabelGroup(evt), onEzEditLabelMode: (evt) => this._editingTitleGroup = evt.detail, conditionalSave: (newLabel) => this.checkGroupExists(newLabel, indexGroup) }, this.getFieldsByGroup(group));
|
|
977
|
+
}
|
|
978
|
+
else {
|
|
979
|
+
return index.h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, index.h("label", { class: "ez-text ez-text--secondary ez-margin-vertical--small" }, this.getMessage("snkFormConfig.form.subTitleInfo")), index.h("div", { id: CONTAINER_ID.withoutGroup, class: "ez-row", "data-draggable-parent": "field" }, this.getFieldsByGroup(group)), index.h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" }));
|
|
980
|
+
}
|
|
981
|
+
}), this.renderTempGroupByTab(tab.tab))), index.h("div", { class: "form-config__btn-add-group ez-row" }, index.h("div", { class: "form-config__btn-add-group-container ez-col ez-col--sd-12 ez-col--tb-12 ez-align--center" }, index.h("ez-button", { label: this.getMessage("snkFormConfig.form.labelNewGroup"), class: "ez-padding-horizontal--small ez-button--primary", size: "small", onClick: () => this.addNewGroup() }, index.h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "plus" })))))), index.h("div", { class: "form-config__fields-available ez-col ez-col--sd-3 ez-col--tb-3" }, index.h("section", { class: "ez-box__container ez-col ez-col--pn-12" }, index.h("h1", { class: "ez-title ez-title--large ez-title--primary ez-padding-bottom--medium" }, this.getMessage("snkFormConfig.availableFields.title")), index.h("ez-filter-input", { id: "searchFields", ref: ref => this._filterFieldsAvailable = ref, label: this.getMessage("snkFormConfig.availableFields.labelSearchField"), onEzChange: evt => this.onFilterChange(evt.detail) }), index.h("span", { class: "ez-box__label-counter ez-text ez-text--medium ez-text--primary ez-margin-bottom--medium" }, this.handleLabelCounter((_c = this._fieldsAvailable) === null || _c === void 0 ? void 0 : _c.length)), ((_d = this._layoutFormConfig) === null || _d === void 0 ? void 0 : _d.length) > 0 &&
|
|
982
|
+
index.h("div", { id: CONTAINER_ID.fieldsAvailable, class: "ez-row", "data-draggable-parent": "field" }, this.orderFieldsAvailable(this._fieldsAvailable).map((field) => index.h("div", { key: field.name, class: this._fieldsAvailableStyle, "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, index.h("snk-field-config", { messagesBuilder: this.messagesBuilder, onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, dataUnit: this.dataUnit, fieldConfig: field, id: field.name })))))))));
|
|
983
|
+
}
|
|
984
|
+
get _element() { return index.getElement(this); }
|
|
985
|
+
static get watchers() { return {
|
|
986
|
+
"configManager": ["observeConfigManager"]
|
|
987
|
+
}; }
|
|
988
|
+
};
|
|
989
|
+
SnkFormConfig.style = snkFormConfigCss;
|
|
990
|
+
|
|
991
|
+
exports.snk_form_config = SnkFormConfig;
|