@sankhyalabs/sankhyablocks 8.16.0-dev.12 → 8.16.0-dev.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ClientSideExporterProvider-0ce2bcd9.js +378 -0
- package/dist/cjs/{ConfigStorage-e49214c6.js → ConfigStorage-48ba265b.js} +47 -19
- package/dist/cjs/{DataFetcher-77729a93.js → DataFetcher-1afdb18e.js} +231 -84
- package/dist/cjs/FormConfigHelper-c664dbae.js +260 -0
- package/dist/cjs/{RecordIDUtils-3735135c.js → GetSelectedRecordsIDsInfo-bd50caf1.js} +10 -10
- package/dist/cjs/IFetchDataExporterParams-e78ec415.js +8 -0
- package/dist/cjs/ISave-c76e2c51.js +397 -0
- package/dist/cjs/{PersonalizedFilterUtils-0184ffbb.js → PersonalizedFilterUtils-7259cf65.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-aa4631bd.js} +74 -17
- package/dist/cjs/{SnkMessageBuilder-cceebbae.js → SnkMessageBuilder-e3b7850b.js} +67 -30
- package/dist/cjs/{auth-fetcher-29bb791c.js → auth-fetcher-1687ac0a.js} +1 -1
- package/dist/cjs/config-header.cjs.entry.js +79 -0
- package/dist/cjs/configs-button.cjs.entry.js +61 -0
- package/dist/cjs/{constants-35ddd366.js → constants-6d82e405.js} +18 -38
- package/dist/cjs/{dataunit-fetcher-d4873076.js → dataunit-fetcher-a723f0dc.js} +225 -175
- package/dist/cjs/default-filters-a09bf82b.js +8 -0
- package/dist/cjs/field-config_2.cjs.entry.js +324 -0
- package/dist/cjs/fields-layout.cjs.entry.js +341 -0
- package/dist/cjs/fields-selector.cjs.entry.js +74 -0
- package/dist/cjs/{filter-type.enum-b14ce507.js → filter-type.enum-2bb46d2a.js} +1 -0
- package/dist/cjs/{form-config-fetcher-feb08214.js → form-config-fetcher-40d3f752.js} +56 -2
- package/dist/cjs/guides-configurator.cjs.entry.js +164 -0
- package/dist/cjs/{index-102ba62d.js → index-0ad2baeb.js} +4 -5
- package/dist/cjs/{index-f9e81701.js → index-1cf293c1.js} +46 -40
- package/dist/cjs/{index-c5771aba.js → index-62760a9c.js} +5 -0
- package/dist/cjs/{index-1dfc7a6e.js → index-e3e39724.js} +5 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +155 -0
- package/dist/cjs/sankhyablocks.cjs.js +2 -2
- package/dist/cjs/{snk-actions-button_4.cjs.entry.js → snk-actions-button_8.cjs.entry.js} +265 -47
- package/dist/cjs/snk-actions-form.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +472 -80
- package/dist/cjs/snk-attach.cjs.entry.js +93 -52
- package/dist/cjs/snk-client-confirm.cjs.entry.js +1 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +11 -4
- package/dist/cjs/snk-crud.cjs.entry.js +60 -86
- package/dist/cjs/snk-custom-slot-elements.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +37 -29
- package/dist/cjs/{snk-data-unit-8af43aa3.js → snk-data-unit-3684c96e.js} +276 -38
- package/dist/cjs/snk-data-unit.cjs.entry.js +6 -6
- package/dist/cjs/snk-default-filter.cjs.entry.js +77 -0
- package/dist/cjs/snk-detail-view.cjs.entry.js +71 -19
- package/dist/cjs/snk-entity-list.cjs.entry.js +3 -8
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-expression-group_2.cjs.entry.js +10 -8
- package/dist/cjs/snk-filter-advanced-mode_2.cjs.entry.js +5 -4
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +1492 -0
- package/dist/cjs/snk-filter-binary-select.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-checkbox-list.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-detail.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-field-search_2.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +5 -5
- package/dist/cjs/snk-filter-multi-select.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-number.cjs.entry.js +2 -2
- package/dist/cjs/snk-filter-period.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-search.cjs.entry.js +19 -6
- package/dist/cjs/snk-filter-text.cjs.entry.js +3 -2
- package/dist/cjs/snk-form-summary.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +20 -8
- package/dist/cjs/snk-form_2.cjs.entry.js +433 -0
- package/dist/cjs/snk-grid.cjs.entry.js +136 -53
- package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-edc0a00a.js} +151 -74
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +14 -14
- package/dist/cjs/snk-personalized-filter-editor.cjs.entry.js +5 -5
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +55 -20
- package/dist/cjs/snk-pesquisa.cjs.entry.js +117 -32
- package/dist/cjs/snk-print-selector.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-bar.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +239 -201
- package/dist/cjs/snk-taskbar.cjs.entry.js +85 -45
- package/dist/cjs/sortable.esm-9a110bb7.js +2668 -0
- package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-3b74cd21.js} +14 -3
- package/dist/cjs/{field-search-f56aa7d6.js → taskbar-processor-2fba34a8.js} +5 -36
- package/dist/cjs/teste-pesquisa.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +23 -43
- package/dist/collection/components/snk-actions-button/actions/index.js +16 -13
- package/dist/collection/components/snk-actions-button/interfaces/index.js +1 -0
- package/dist/collection/components/snk-actions-button/snk-actions-button.js +27 -26
- package/dist/collection/components/snk-application/errorhandler/snk-error-handler.js +5 -2
- package/dist/collection/components/snk-application/request-listener/DebouncedRequestListener.js +29 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerFactory.js +16 -0
- package/dist/collection/components/snk-application/request-listener/RequestListenerLoadingBar.js +52 -0
- package/dist/collection/components/snk-application/search-strategy/exec-prepared-search-plus.js +107 -0
- package/dist/collection/components/snk-application/snk-application.css +36 -0
- package/dist/collection/components/snk-application/snk-application.js +450 -72
- package/dist/collection/components/snk-attach/snk-attach.js +51 -16
- package/dist/collection/components/snk-attach/structure/builder/taskbar-builder.js +8 -4
- package/dist/collection/components/snk-attach/structure/fetcher/factory/attach-fetcher-data-unit.factory.js +19 -18
- package/dist/collection/components/snk-configurator/snk-configurator.css +1 -1
- package/dist/collection/components/snk-configurator/snk-configurator.js +26 -1
- package/dist/collection/components/snk-crud/snk-crud.js +200 -76
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.css +10 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +84 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +54 -7
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.css +6 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +197 -81
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +8 -8
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +9 -2
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +41 -10
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +18 -6
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +10 -9
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +4 -4
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +1 -1
- package/dist/collection/components/snk-data-unit/MultipleUpdateHelper.js +128 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +156 -37
- package/dist/collection/components/snk-entity-list/snk-entity-list.js +2 -7
- package/dist/collection/components/snk-filter-bar/filter-item/dataunitfilter/data-unit-filter-builder.js +4 -4
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-binary-select.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-checkbox-list.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-number.js +1 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-search.js +18 -5
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-filter-text.js +2 -1
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.css +13 -0
- package/dist/collection/components/snk-filter-bar/filter-item/editors/snk-personalized-filter-editor/snk-personalized-filter-editor.js +3 -3
- package/dist/collection/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.js +8 -0
- package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +10 -4
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.css +1 -1
- package/dist/collection/components/snk-filter-bar/filter-modal/snk-filter-modal.js +83 -13
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.css +34 -0
- package/dist/collection/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.js +142 -0
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +3 -6
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +144 -45
- package/dist/collection/components/snk-filter-bar/types/default-filters.js +6 -0
- package/dist/collection/components/snk-filter-bar/types/filter-type.enum.js +1 -0
- package/dist/collection/components/snk-filter-bar/utils/SnkFilterModalFactory.js +4 -4
- package/dist/collection/components/snk-form/snk-form.js +2 -2
- package/dist/collection/components/snk-form-config/FormConfigHelper.js +245 -0
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +74 -17
- package/dist/collection/components/snk-form-config/config-header/config-header.css +18 -0
- package/dist/collection/components/snk-form-config/config-header/config-header.js +236 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.css +41 -0
- package/dist/collection/components/snk-form-config/config-header/configs-button/configs-button.js +170 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.css +21 -0
- package/dist/collection/components/snk-form-config/field-item/field-config/field-config.js +408 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.css +108 -0
- package/dist/collection/components/snk-form-config/field-item/field-item.js +206 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.css +133 -0
- package/dist/collection/components/snk-form-config/fields-layout/fields-layout.js +578 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.css +38 -0
- package/dist/collection/components/snk-form-config/fields-selector/fields-selector.js +146 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.css +132 -0
- package/dist/collection/components/snk-form-config/guides-configurator/guides-configurator.js +317 -0
- package/dist/collection/components/snk-form-config/snk-form-config.css +17 -225
- package/dist/collection/components/snk-form-config/snk-form-config.js +288 -939
- package/dist/collection/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.js +2 -2
- package/dist/collection/components/snk-grid/snk-grid.css +9 -0
- package/dist/collection/components/snk-grid/snk-grid.js +307 -51
- package/dist/collection/components/snk-grid-config/snk-grid-config.css +1 -1
- package/dist/collection/components/snk-grid-config/snk-grid-config.js +2 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.css +3 -0
- package/dist/collection/components/snk-layout-form-config/snk-layout-form-config.js +73 -0
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.css +78 -0
- package/dist/collection/components/snk-layout-form-config/snk-view-representation/snk-view-representation.js +57 -0
- package/dist/collection/components/snk-personalized-filter/interfaces/index.js +5 -0
- package/dist/collection/components/snk-personalized-filter/snk-personalized-filter.js +67 -13
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.css +3 -0
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.js +20 -1
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.js +22 -3
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.js +20 -1
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.css +9 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.js +226 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.css +28 -0
- package/dist/collection/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.js +208 -0
- package/dist/collection/components/snk-pesquisa/pesquisaHelper.js +99 -0
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.css +35 -6
- package/dist/collection/components/snk-pesquisa/snk-pesquisa.js +181 -32
- package/dist/collection/components/snk-print-selector/snk-print-selector.js +1 -1
- package/dist/collection/components/snk-simple-bar/snk-simple-bar.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +361 -123
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.css +22 -0
- package/dist/collection/components/snk-simple-form-config/snk-simple-form-config.js +181 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.css +13 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-actions-button/taskbar-actions-button.js +1 -1
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +11 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.css +0 -0
- package/dist/collection/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.js +220 -0
- package/dist/collection/components/snk-taskbar/processor/taskbar-processor.js +5 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +145 -42
- package/dist/collection/lib/@types/index.js +5 -0
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +11 -5
- package/dist/collection/lib/configs/ConfigStorage.js +16 -8
- package/dist/collection/lib/configs/LayoutFormConfig.js +25 -0
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +12 -103
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +11 -32
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +44 -29
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +59 -14
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +21 -7
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +5 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.js +108 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +23 -14
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.js +6 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +59 -5
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +7 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.js +29 -9
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +133 -9
- package/dist/collection/lib/index.js +1 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +1 -0
- package/dist/collection/lib/message/resources/snk-crud.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +28 -23
- package/dist/collection/lib/message/resources/snk-filter-bar.msg.js +6 -0
- package/dist/collection/lib/message/resources/snk-form.msg.js +16 -2
- package/dist/collection/lib/message/resources/snk-grid.msg.js +5 -1
- package/dist/collection/lib/message/resources/snk-personalized-filter.msg.js +6 -1
- package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +2 -1
- package/dist/collection/lib/message/resources/snk-taskbar.msg.js +1 -0
- package/dist/collection/lib/utils/ContinuousInsertUtils.js +31 -0
- package/dist/collection/lib/utils/CrudUtils.js +25 -16
- package/dist/collection/{components/snk-data-exporter/utils/RecordIDUtils.js → lib/utils/GetSelectedRecordsIDsInfo.js} +9 -9
- package/dist/collection/lib/utils/constants.js +17 -1
- package/dist/collection/sw.js +46 -0
- package/dist/components/ConfigStorage.js +45 -17
- package/dist/components/ContinuousInsertUtils.js +416 -0
- package/dist/components/DataFetcher.js +231 -84
- package/dist/{esm/RecordIDUtils-87d02110.js → components/GetSelectedRecordsIDsInfo.js} +10 -10
- package/dist/components/ISave.js +391 -1
- package/dist/components/PersonalizedFilterUtils.js +6 -1
- package/dist/components/SnkFormConfigManager.js +72 -15
- package/dist/components/SnkMessageBuilder.js +67 -30
- package/dist/components/{snk-tab-config.d.ts → config-header.d.ts} +4 -4
- package/dist/components/config-header.js +6 -0
- package/dist/components/config-header2.js +103 -0
- package/dist/components/configs-button.d.ts +11 -0
- package/dist/components/configs-button.js +6 -0
- package/dist/components/configs-button2.js +76 -0
- package/dist/components/constants.js +18 -34
- package/dist/components/dataunit-fetcher.js +243 -190
- package/dist/components/field-config.d.ts +11 -0
- package/dist/components/field-config.js +6 -0
- package/dist/components/field-config2.js +525 -0
- package/dist/components/field-item.d.ts +11 -0
- package/dist/components/field-item.js +6 -0
- package/dist/components/field-item2.js +93 -0
- package/dist/components/fields-layout.d.ts +11 -0
- package/dist/components/fields-layout.js +6 -0
- package/dist/components/fields-layout2.js +370 -0
- package/dist/components/{snk-field-config.d.ts → fields-selector.d.ts} +4 -4
- package/dist/components/fields-selector.js +6 -0
- package/dist/components/fields-selector2.js +98 -0
- package/dist/components/form-config-fetcher.js +55 -1
- package/dist/components/guides-configurator.d.ts +11 -0
- package/dist/components/guides-configurator.js +6 -0
- package/dist/components/guides-configurator2.js +182 -0
- package/dist/components/index.d.ts +14 -3
- package/dist/components/index.js +14 -3
- package/dist/components/index2.js +3 -4
- package/dist/components/pesquisa-grid.d.ts +11 -0
- package/dist/components/pesquisa-grid.js +6 -0
- package/dist/components/pesquisa-grid2.js +102 -0
- package/dist/components/pesquisa-tree.d.ts +11 -0
- package/dist/components/pesquisa-tree.js +6 -0
- package/dist/components/pesquisa-tree2.js +91 -0
- package/dist/components/snk-actions-button2.js +44 -40
- package/dist/components/snk-application2.js +494 -77
- package/dist/components/snk-attach2.js +114 -73
- package/dist/components/snk-configurator2.js +23 -3
- package/dist/components/snk-crud.js +169 -139
- package/dist/components/snk-data-exporter2.js +35 -21
- package/dist/components/snk-data-unit2.js +275 -74
- package/dist/components/{snk-config-options.d.ts → snk-default-filter.d.ts} +4 -4
- package/dist/components/snk-default-filter.js +6 -0
- package/dist/components/snk-default-filter2.js +97 -0
- package/dist/components/snk-detail-view2.js +347 -165
- package/dist/components/snk-entity-list.js +2 -7
- package/dist/components/snk-expression-group2.js +4 -2
- package/dist/components/snk-expression-item2.js +5 -3
- package/dist/components/snk-filter-assistent-mode2.js +4 -2
- package/dist/components/snk-filter-bar2.js +97 -54
- package/dist/components/snk-filter-binary-select.js +1 -1
- package/dist/components/snk-filter-checkbox-list.js +1 -1
- package/dist/components/snk-filter-item2.js +10 -4
- package/dist/components/snk-filter-modal-item2.js +1 -0
- package/dist/components/snk-filter-modal.js +63 -10
- package/dist/components/snk-filter-number.js +1 -1
- package/dist/components/snk-filter-search.js +18 -5
- package/dist/components/snk-filter-text.js +2 -1
- package/dist/components/snk-form-config2.js +253 -928
- package/dist/components/snk-form-view2.js +22 -8
- package/dist/components/snk-form.js +35 -11
- package/dist/components/snk-grid-config2.js +3 -1
- package/dist/components/snk-grid2.js +173 -75
- package/dist/components/snk-layout-form-config.d.ts +11 -0
- package/dist/components/snk-layout-form-config.js +6 -0
- package/dist/components/snk-layout-form-config2.js +73 -0
- package/dist/components/snk-personalized-filter-editor.js +4 -4
- package/dist/components/snk-personalized-filter2.js +50 -14
- package/dist/components/snk-pesquisa2.js +132 -33
- package/dist/components/snk-print-selector.js +1 -1
- package/dist/components/snk-simple-bar2.js +1 -1
- package/dist/components/snk-simple-crud2.js +248 -203
- package/dist/components/snk-simple-form-config.d.ts +11 -0
- package/dist/components/snk-simple-form-config.js +6 -0
- package/dist/components/snk-simple-form-config2.js +121 -0
- package/dist/components/snk-taskbar2.js +109 -51
- package/dist/components/snk-view-representation.d.ts +11 -0
- package/dist/components/snk-view-representation.js +6 -0
- package/dist/components/snk-view-representation2.js +41 -0
- package/dist/components/sortable.esm.js +2666 -0
- package/dist/components/taskbar-actions-button2.js +2 -2
- package/dist/components/taskbar-split-button.d.ts +11 -0
- package/dist/components/taskbar-split-button.js +6 -0
- package/dist/components/taskbar-split-button2.js +87 -0
- package/dist/components/teste-pesquisa.js +13 -1
- package/dist/esm/ClientSideExporterProvider-3ed744fd.js +367 -0
- package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-79b9e180.js} +47 -19
- package/dist/esm/{DataFetcher-773a3e4b.js → DataFetcher-88e56266.js} +231 -84
- package/dist/esm/FormConfigHelper-49fe72ca.js +248 -0
- package/dist/esm/GetSelectedRecordsIDsInfo-9fa41508.js +41 -0
- package/dist/esm/IFetchDataExporterParams-d73bed3d.js +8 -0
- package/dist/esm/ISave-5efafc97.js +394 -0
- package/dist/esm/{PersonalizedFilterUtils-e2b38ef7.js → PersonalizedFilterUtils-2db38ff2.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-b4b93298.js} +74 -17
- package/dist/esm/{SnkMessageBuilder-ae87b754.js → SnkMessageBuilder-9c269caf.js} +67 -30
- package/dist/esm/{auth-fetcher-a411f73c.js → auth-fetcher-3510520e.js} +1 -1
- package/dist/esm/config-header.entry.js +75 -0
- package/dist/esm/configs-button.entry.js +57 -0
- package/dist/esm/{constants-8457af36.js → constants-7b422de0.js} +18 -34
- package/dist/esm/{dataunit-fetcher-3d2ec959.js → dataunit-fetcher-0e025732.js} +227 -174
- package/dist/esm/default-filters-50105e43.js +8 -0
- package/dist/esm/field-config_2.entry.js +319 -0
- package/dist/esm/fields-layout.entry.js +337 -0
- package/dist/esm/fields-selector.entry.js +70 -0
- package/dist/esm/{filter-type.enum-a80c1b6b.js → filter-type.enum-f6a8fe23.js} +1 -0
- package/dist/esm/{form-config-fetcher-e0382e5a.js → form-config-fetcher-fa208a6c.js} +56 -2
- package/dist/esm/guides-configurator.entry.js +160 -0
- package/dist/esm/{index-a7d3d3f1.js → index-479e1293.js} +46 -40
- package/dist/esm/{index-ae591a44.js → index-8acbae97.js} +6 -1
- package/dist/esm/{index-3aa4977a.js → index-b40568ff.js} +6 -1
- package/dist/esm/{index-bdf75557.js → index-b72af127.js} +4 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pesquisa-grid_2.entry.js +150 -0
- package/dist/esm/sankhyablocks.js +3 -3
- package/dist/esm/{snk-actions-button_4.entry.js → snk-actions-button_8.entry.js} +264 -50
- package/dist/esm/snk-actions-form.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +472 -80
- package/dist/esm/snk-attach.entry.js +94 -53
- package/dist/esm/snk-client-confirm.entry.js +1 -1
- package/dist/esm/snk-configurator.entry.js +11 -4
- package/dist/esm/snk-crud.entry.js +61 -87
- package/dist/esm/snk-custom-slot-elements.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +37 -29
- package/dist/esm/{snk-data-unit-008cb9aa.js → snk-data-unit-027bca56.js} +276 -38
- package/dist/esm/snk-data-unit.entry.js +6 -6
- package/dist/esm/snk-default-filter.entry.js +73 -0
- package/dist/esm/snk-detail-view.entry.js +72 -20
- package/dist/esm/snk-entity-list.entry.js +3 -8
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-expression-group_2.entry.js +10 -8
- package/dist/esm/snk-filter-advanced-mode_2.entry.js +5 -4
- package/dist/esm/snk-filter-bar_4.entry.js +1485 -0
- package/dist/esm/snk-filter-binary-select.entry.js +2 -2
- package/dist/esm/snk-filter-checkbox-list.entry.js +2 -2
- package/dist/esm/snk-filter-detail.entry.js +3 -3
- package/dist/esm/snk-filter-field-search_2.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +5 -5
- package/dist/esm/snk-filter-multi-select.entry.js +1 -1
- package/dist/esm/snk-filter-number.entry.js +2 -2
- package/dist/esm/snk-filter-period.entry.js +1 -1
- package/dist/esm/snk-filter-search.entry.js +19 -6
- package/dist/esm/snk-filter-text.entry.js +3 -2
- package/dist/esm/snk-form-summary.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +20 -8
- package/dist/esm/snk-form_2.entry.js +428 -0
- package/dist/esm/snk-grid.entry.js +129 -46
- package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-32f3d3ab.js} +152 -75
- package/dist/esm/snk-guides-viewer.entry.js +14 -14
- package/dist/esm/snk-personalized-filter-editor.entry.js +5 -5
- package/dist/esm/snk-personalized-filter.entry.js +55 -20
- package/dist/esm/snk-pesquisa.entry.js +117 -32
- package/dist/esm/snk-print-selector.entry.js +2 -2
- package/dist/esm/snk-simple-bar.entry.js +2 -2
- package/dist/esm/snk-simple-crud.entry.js +227 -189
- package/dist/esm/snk-taskbar.entry.js +86 -46
- package/dist/esm/sortable.esm-842f85a3.js +2666 -0
- package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-171476d4.js} +14 -3
- package/dist/esm/{field-search-efbe307f.js → taskbar-processor-3436124c.js} +6 -35
- package/dist/esm/teste-pesquisa.entry.js +1 -1
- package/dist/sankhyablocks/p-0024d3fd.entry.js +1 -0
- package/dist/sankhyablocks/p-09e60995.entry.js +11 -0
- package/dist/sankhyablocks/p-0cb295c1.entry.js +1 -0
- package/dist/sankhyablocks/p-0f3698af.js +1 -0
- package/dist/sankhyablocks/p-1456d7cb.entry.js +1 -0
- package/dist/sankhyablocks/{p-9531fd46.entry.js → p-180716b2.entry.js} +1 -1
- package/dist/sankhyablocks/p-19156e59.entry.js +1 -0
- package/dist/sankhyablocks/p-1a0caadb.js +1 -0
- package/dist/sankhyablocks/p-21107f0d.entry.js +1 -0
- package/dist/sankhyablocks/{p-118e769b.entry.js → p-27482793.entry.js} +1 -1
- package/dist/sankhyablocks/p-2bde486e.js +1 -0
- package/dist/sankhyablocks/{p-26b0ce3e.entry.js → p-2fdac5e6.entry.js} +1 -1
- package/dist/sankhyablocks/p-349d1968.entry.js +1 -0
- package/dist/sankhyablocks/p-35e73c5d.js +1 -0
- package/dist/sankhyablocks/p-398cdd67.entry.js +1 -0
- package/dist/sankhyablocks/p-3a48bff3.entry.js +1 -0
- package/dist/sankhyablocks/{p-72fc257b.entry.js → p-3d41f5a8.entry.js} +1 -1
- package/dist/sankhyablocks/p-3f24c9b2.js +1 -0
- package/dist/sankhyablocks/{p-8002dcd0.entry.js → p-471b34f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7e2ded86.entry.js → p-49d968e2.entry.js} +1 -1
- package/dist/sankhyablocks/p-4d2ff2fb.entry.js +1 -0
- package/dist/sankhyablocks/p-51833248.js +7 -0
- package/dist/sankhyablocks/p-601b252b.js +26 -0
- package/dist/sankhyablocks/p-60dd1d27.entry.js +1 -0
- package/dist/sankhyablocks/p-6416975c.js +56 -0
- package/dist/sankhyablocks/p-65c5d430.entry.js +1 -0
- package/dist/sankhyablocks/{p-21a81901.entry.js → p-667cab42.entry.js} +1 -1
- package/dist/sankhyablocks/p-67d6d0c8.entry.js +1 -0
- package/dist/sankhyablocks/p-6a4b21dd.js +1 -0
- package/dist/sankhyablocks/p-6dd38d7b.js +6 -0
- package/dist/sankhyablocks/p-71a05822.entry.js +1 -0
- package/dist/sankhyablocks/p-72c8c847.entry.js +1 -0
- package/dist/sankhyablocks/{p-0cd3c0a9.js → p-73285a8a.js} +1 -1
- package/dist/sankhyablocks/{p-ac8d1cd6.entry.js → p-7345782c.entry.js} +1 -1
- package/dist/sankhyablocks/p-763b04fa.js +1 -0
- package/dist/sankhyablocks/p-7993b2e3.js +60 -0
- package/dist/sankhyablocks/p-7dd49d15.js +1 -0
- package/dist/sankhyablocks/p-7de79adf.js +1 -0
- package/dist/sankhyablocks/p-7e250432.entry.js +1 -0
- package/dist/sankhyablocks/p-83c100f2.entry.js +1 -0
- package/dist/sankhyablocks/p-84345e7a.js +1 -0
- package/dist/sankhyablocks/p-86bd4478.entry.js +1 -0
- package/dist/sankhyablocks/p-8f3f2306.js +1 -0
- package/dist/sankhyablocks/p-9019a32f.js +1 -0
- package/dist/sankhyablocks/{p-54a5d52a.entry.js → p-90805683.entry.js} +1 -1
- package/dist/sankhyablocks/p-91a9abb6.entry.js +1 -0
- package/dist/sankhyablocks/p-9751c42f.entry.js +1 -0
- package/dist/sankhyablocks/{p-057fad05.js → p-988afe78.js} +1 -1
- package/dist/sankhyablocks/{p-16a1dd18.entry.js → p-9a63f3f7.entry.js} +1 -1
- package/dist/sankhyablocks/p-9ad3557c.entry.js +1 -0
- package/dist/sankhyablocks/p-9fd87bfd.entry.js +1 -0
- package/dist/sankhyablocks/p-a06bf7b9.entry.js +1 -0
- package/dist/sankhyablocks/p-a349689a.js +1 -0
- package/dist/sankhyablocks/p-a5bb2f93.entry.js +1 -0
- package/dist/sankhyablocks/p-a6513fcb.js +1 -0
- package/dist/sankhyablocks/{p-41f8bfa3.entry.js → p-a76e6d51.entry.js} +1 -1
- package/dist/sankhyablocks/p-b568c1d4.js +1 -0
- package/dist/sankhyablocks/p-bd665460.entry.js +1 -0
- package/dist/sankhyablocks/p-c3324d79.entry.js +1 -0
- package/dist/sankhyablocks/{p-bf2acf72.entry.js → p-c6a8a8bc.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9dfda04a.entry.js → p-c926cf6b.entry.js} +1 -1
- package/dist/sankhyablocks/p-cfd0a4c6.entry.js +1 -0
- package/dist/sankhyablocks/p-d67526b6.entry.js +1 -0
- package/dist/sankhyablocks/{p-d2d301a6.js → p-d8d8169b.js} +1 -1
- package/dist/sankhyablocks/p-d9491f6f.entry.js +1 -0
- package/dist/sankhyablocks/p-dff65083.entry.js +1 -0
- package/dist/sankhyablocks/p-e3521eae.entry.js +1 -0
- package/dist/sankhyablocks/p-e7cccc45.entry.js +1 -0
- package/dist/sankhyablocks/{p-33718dfc.entry.js → p-e824d565.entry.js} +1 -1
- package/dist/sankhyablocks/p-fbba7e3d.js +1 -0
- package/dist/sankhyablocks/p-fc0b609e.js +1 -0
- package/dist/sankhyablocks/p-ff7060bc.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-actions-button/actions/index.d.ts +1 -0
- package/dist/types/components/snk-actions-button/interfaces/index.d.ts +3 -0
- package/dist/types/components/snk-actions-button/snk-actions-button.d.ts +3 -2
- package/dist/types/components/snk-application/request-listener/DebouncedRequestListener.d.ts +11 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerFactory.d.ts +12 -0
- package/dist/types/components/snk-application/request-listener/RequestListenerLoadingBar.d.ts +13 -0
- package/dist/types/components/snk-application/search-strategy/exec-prepared-search-plus.d.ts +5 -0
- package/dist/types/components/snk-application/snk-application.d.ts +55 -16
- package/dist/types/components/snk-attach/snk-attach.d.ts +2 -0
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +6 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +34 -3
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +17 -0
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +11 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +26 -7
- package/dist/types/components/snk-data-exporter/data/export-result.d.ts +2 -1
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +9 -1
- package/dist/types/components/snk-data-exporter/interfaces/IRecordID.d.ts +1 -0
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +3 -1
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +3 -3
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +1 -1
- package/dist/types/components/snk-data-unit/MultipleUpdateHelper.d.ts +9 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +19 -0
- package/dist/types/components/snk-filter-bar/filter-item/editors/snk-filter-search.d.ts +5 -3
- package/dist/types/components/snk-filter-bar/filter-item/filter-item-type-mask.enum.d.ts +7 -0
- package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +2 -0
- package/dist/types/components/snk-filter-bar/filter-modal/snk-filter-modal.d.ts +16 -4
- package/dist/types/components/snk-filter-bar/filter-modal/subcomponents/snk-default-filter/snk-default-filter.d.ts +27 -0
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +19 -4
- package/dist/types/components/snk-filter-bar/types/default-filters.d.ts +5 -0
- package/dist/types/components/snk-filter-bar/types/filter-type.enum.d.ts +2 -1
- package/dist/types/components/snk-filter-bar/utils/SnkFilterModalFactory.d.ts +3 -3
- package/dist/types/components/snk-form-config/FormConfigHelper.d.ts +31 -0
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +10 -5
- package/dist/types/components/snk-form-config/config-header/config-header.d.ts +23 -0
- package/dist/types/components/snk-form-config/config-header/configs-button/configs-button.d.ts +19 -0
- package/dist/types/components/snk-form-config/field-item/field-config/field-config.d.ts +56 -0
- package/dist/types/components/snk-form-config/fields-layout/fields-layout.d.ts +63 -0
- package/dist/types/components/snk-form-config/fields-selector/fields-selector.d.ts +18 -0
- package/dist/types/components/snk-form-config/guides-configurator/guides-configurator.d.ts +42 -0
- package/dist/types/components/snk-form-config/snk-form-config.d.ts +53 -118
- package/dist/types/components/snk-grid/filtercolumn/SnkMultiSelectionListDataSource.d.ts +2 -1
- package/dist/types/components/snk-grid/snk-grid.d.ts +53 -5
- package/dist/types/components/snk-grid-config/snk-grid-config.d.ts +1 -0
- package/dist/types/components/snk-layout-form-config/snk-layout-form-config.d.ts +15 -0
- package/dist/types/components/snk-layout-form-config/snk-view-representation/snk-view-representation.d.ts +10 -0
- package/dist/types/components/snk-personalized-filter/interfaces/index.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/snk-personalized-filter.d.ts +7 -1
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-group/snk-expression-group.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-expression-item/snk-expression-item.d.ts +4 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-assistent-mode/snk-filter-assistent-mode.d.ts +4 -0
- package/dist/types/components/snk-pesquisa/pesquisa-grid/pesquisa-grid.d.ts +44 -0
- package/dist/types/components/snk-pesquisa/pesquisa-tree/pesquisa-tree.d.ts +33 -0
- package/dist/types/components/snk-pesquisa/pesquisaHelper.d.ts +24 -0
- package/dist/types/components/snk-pesquisa/snk-pesquisa.d.ts +36 -1
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +55 -15
- package/dist/types/components/snk-simple-form-config/snk-simple-form-config.d.ts +34 -0
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +2 -1
- package/dist/types/components/snk-taskbar/elements/taskbar-split-button/taskbar-split-button.d.ts +44 -0
- package/dist/types/components/snk-taskbar/processor/taskbar-processor.d.ts +1 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +18 -0
- package/dist/types/components.d.ts +902 -213
- package/dist/types/lib/@types/index.d.ts +4 -0
- package/dist/types/lib/configs/ConfigStorage.d.ts +4 -2
- package/dist/types/lib/configs/LayoutFormConfig.d.ts +11 -0
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +4 -11
- package/dist/types/lib/dataUnit/dataUnitInMemoryUtils.d.ts +9 -2
- package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +2 -2
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +9 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/helpers/DataUnitDataLoaderHelper.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/ILoadingInfo.d.ts +4 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +3 -3
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +6 -2
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +14 -2
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +1 -0
- package/dist/types/lib/http/data-fetcher/fetchers/personalized-filter-fetcher.d.ts +8 -4
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +21 -2
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +2 -1
- package/dist/types/lib/utils/ContinuousInsertUtils.d.ts +10 -0
- package/dist/types/lib/utils/CrudUtils.d.ts +1 -0
- package/dist/types/lib/utils/GetSelectedRecordsIDsInfo.d.ts +3 -0
- package/dist/types/lib/utils/constants.d.ts +14 -0
- package/package.json +10 -7
- package/react/components.d.ts +14 -3
- package/react/components.js +14 -3
- package/react/components.js.map +1 -1
- package/dist/cjs/IExporterProvider-10b7fed5.js +0 -230
- package/dist/cjs/ISave-e91b70a7.js +0 -9
- package/dist/cjs/Sortable-fb1c4cbb.js +0 -2853
- package/dist/cjs/pesquisa-fetcher-a1d0353f.js +0 -166
- package/dist/cjs/snk-config-options.cjs.entry.js +0 -239
- package/dist/cjs/snk-field-config.cjs.entry.js +0 -60
- package/dist/cjs/snk-filter-bar.cjs.entry.js +0 -714
- package/dist/cjs/snk-filter-item.cjs.entry.js +0 -312
- package/dist/cjs/snk-filter-list.cjs.entry.js +0 -152
- package/dist/cjs/snk-filter-modal.cjs.entry.js +0 -249
- package/dist/cjs/snk-form-config.cjs.entry.js +0 -1002
- package/dist/cjs/snk-form.cjs.entry.js +0 -143
- package/dist/cjs/snk-tab-config.cjs.entry.js +0 -332
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.css +0 -16
- package/dist/collection/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.js +0 -344
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.css +0 -219
- package/dist/collection/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.js +0 -184
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.css +0 -323
- package/dist/collection/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.js +0 -527
- package/dist/collection/components/snk-taskbar/subcomponents/field-search.js +0 -31
- package/dist/components/IExporterProvider.js +0 -298
- package/dist/components/pesquisa-fetcher.js +0 -164
- package/dist/components/snk-config-options.js +0 -6
- package/dist/components/snk-config-options2.js +0 -255
- package/dist/components/snk-field-config.js +0 -6
- package/dist/components/snk-field-config2.js +0 -76
- package/dist/components/snk-tab-config.js +0 -6
- package/dist/components/snk-tab-config2.js +0 -3202
- package/dist/esm/IExporterProvider-d597f27d.js +0 -221
- package/dist/esm/ISave-d8c8bc59.js +0 -9
- package/dist/esm/Sortable-83960219.js +0 -2851
- package/dist/esm/pesquisa-fetcher-a87445a0.js +0 -164
- package/dist/esm/snk-config-options.entry.js +0 -235
- package/dist/esm/snk-field-config.entry.js +0 -56
- package/dist/esm/snk-filter-bar.entry.js +0 -710
- package/dist/esm/snk-filter-item.entry.js +0 -308
- package/dist/esm/snk-filter-list.entry.js +0 -148
- package/dist/esm/snk-filter-modal.entry.js +0 -245
- package/dist/esm/snk-form-config.entry.js +0 -998
- package/dist/esm/snk-form.entry.js +0 -139
- package/dist/esm/snk-tab-config.entry.js +0 -328
- package/dist/sankhyablocks/p-01ba23cd.entry.js +0 -1
- package/dist/sankhyablocks/p-091ce761.js +0 -60
- package/dist/sankhyablocks/p-162b9a59.entry.js +0 -11
- package/dist/sankhyablocks/p-181975f1.js +0 -26
- package/dist/sankhyablocks/p-1db45d26.entry.js +0 -1
- package/dist/sankhyablocks/p-21749402.js +0 -1
- package/dist/sankhyablocks/p-25f1fc39.js +0 -6
- package/dist/sankhyablocks/p-2e9c764c.entry.js +0 -1
- package/dist/sankhyablocks/p-30cf616e.js +0 -1
- package/dist/sankhyablocks/p-3287a6cc.js +0 -56
- package/dist/sankhyablocks/p-3ab6df3d.entry.js +0 -1
- package/dist/sankhyablocks/p-3b60db06.entry.js +0 -1
- package/dist/sankhyablocks/p-3c50e9d4.entry.js +0 -1
- package/dist/sankhyablocks/p-421bec84.entry.js +0 -1
- package/dist/sankhyablocks/p-42f7b05d.entry.js +0 -1
- package/dist/sankhyablocks/p-51999ab5.entry.js +0 -1
- package/dist/sankhyablocks/p-594bc21d.js +0 -1
- package/dist/sankhyablocks/p-5f016aed.js +0 -1
- package/dist/sankhyablocks/p-62f34e6f.entry.js +0 -1
- package/dist/sankhyablocks/p-65f8c11c.entry.js +0 -1
- package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
- package/dist/sankhyablocks/p-6dc031de.js +0 -1
- package/dist/sankhyablocks/p-70001ac1.js +0 -1
- package/dist/sankhyablocks/p-70a4af56.entry.js +0 -1
- package/dist/sankhyablocks/p-74c665d5.entry.js +0 -1
- package/dist/sankhyablocks/p-7663f597.entry.js +0 -1
- package/dist/sankhyablocks/p-76a65660.js +0 -1
- package/dist/sankhyablocks/p-7c4aabe2.js +0 -1
- package/dist/sankhyablocks/p-7e7a7473.js +0 -1
- package/dist/sankhyablocks/p-88aa931b.entry.js +0 -1
- package/dist/sankhyablocks/p-89451692.entry.js +0 -1
- package/dist/sankhyablocks/p-8eb67fa4.entry.js +0 -1
- package/dist/sankhyablocks/p-933c0c0b.js +0 -1
- package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
- package/dist/sankhyablocks/p-95df461f.entry.js +0 -1
- package/dist/sankhyablocks/p-96a89d58.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-9d3a025a.entry.js +0 -1
- package/dist/sankhyablocks/p-aaa3ee68.entry.js +0 -1
- package/dist/sankhyablocks/p-b0ef4383.js +0 -1
- package/dist/sankhyablocks/p-b11aa1e0.entry.js +0 -1
- package/dist/sankhyablocks/p-bd008859.entry.js +0 -1
- package/dist/sankhyablocks/p-c2495304.js +0 -1
- package/dist/sankhyablocks/p-c8622597.entry.js +0 -1
- package/dist/sankhyablocks/p-cc935517.js +0 -1
- package/dist/sankhyablocks/p-d1791da2.entry.js +0 -1
- package/dist/sankhyablocks/p-d3f53df2.entry.js +0 -1
- package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
- package/dist/sankhyablocks/p-d9804798.js +0 -1
- package/dist/sankhyablocks/p-e8763234.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- package/dist/sankhyablocks/p-fa816fb2.js +0 -1
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
- package/dist/types/components/snk-form-config/subcomponents/snk-config-options/snk-config-options.d.ts +0 -57
- package/dist/types/components/snk-form-config/subcomponents/snk-field-config/snk-field-config.d.ts +0 -43
- package/dist/types/components/snk-form-config/subcomponents/snk-tab-config/snk-tab-config.d.ts +0 -105
- package/dist/types/components/snk-taskbar/subcomponents/field-search.d.ts +0 -4
@@ -1,986 +1,282 @@
|
|
1
|
-
import { h, Host } from
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
const CONTAINER_ID = {
|
9
|
-
collapsibleBox: "EZ-COLLAPSIBLE-BOX",
|
10
|
-
withoutGroup: "fieldsWithoutGroupContainer",
|
11
|
-
fieldsAvailable: "fieldsAvailableContainer",
|
12
|
-
addNewGroup: "addNewGroupContainer"
|
13
|
-
};
|
1
|
+
import { h, Host } from '@stencil/core';
|
2
|
+
import { ApplicationContext, ObjectUtils } from '@sankhyalabs/core';
|
3
|
+
import { buildFormConfigFromDataUnit } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
4
|
+
import { updateTabInFieldsFromGroupList, buildGuides, buildGuidesMap, buildNewGuideName, getFieldsToSave, } from './FormConfigHelper';
|
5
|
+
import { GROUP_NAMES, TAB_NAMES } from '../../lib/utils/constants';
|
6
|
+
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
7
|
+
import { UserConfigType } from '../../lib/http/data-fetcher/fetchers/form-config-fetcher';
|
14
8
|
export class SnkFormConfig {
|
15
9
|
constructor() {
|
16
|
-
this.
|
17
|
-
this.
|
18
|
-
this.
|
19
|
-
this.
|
20
|
-
this.
|
21
|
-
this._mouseOnConfigOptions = false;
|
22
|
-
this._editingTitleGroup = false;
|
23
|
-
this._newGroupBoxes = [];
|
24
|
-
this._currentGroupBoxes = [];
|
25
|
-
this._formFieldsStyle = "ez-col ez-col--sd-12 ez-col--tb-4 ez-padding-right--small ez-padding-bottom--medium sc-snk-form-config";
|
26
|
-
this._fieldsAvailableStyle = "ez-col ez-col--sd-12 ez-col--tb-12 ez-margin-bottom--medium ez-margin-right--medium sc-snk-form-config";
|
27
|
-
this._fieldFloatingStyle = "form-config__field-config--dragged";
|
28
|
-
this._sortableTimer = 100;
|
29
|
-
this._formConfigOptions = [];
|
30
|
-
this._fieldConfigSelected = undefined;
|
31
|
-
this._layoutFormConfig = undefined;
|
32
|
-
this._fieldsAvailable = undefined;
|
10
|
+
this.guidesMap = new Map();
|
11
|
+
this.availableFields = [];
|
12
|
+
this.guidesList = [];
|
13
|
+
this.groupsList = [];
|
14
|
+
this.selectedGuide = undefined;
|
33
15
|
this._formConfig = {};
|
34
|
-
this.
|
35
|
-
this.
|
36
|
-
this.
|
37
|
-
this.
|
16
|
+
this.configOptions = [];
|
17
|
+
this.originalConfigSelected = undefined;
|
18
|
+
this.configSelected = undefined;
|
19
|
+
this.hasChanges = false;
|
20
|
+
this.optionConfigChanged = false;
|
38
21
|
this.dataUnit = undefined;
|
39
22
|
this.configManager = undefined;
|
23
|
+
this.ignoreReadOnlyFormFields = undefined;
|
40
24
|
this.messagesBuilder = undefined;
|
41
25
|
}
|
42
|
-
|
43
|
-
this.
|
44
|
-
}
|
45
|
-
loadFields(updateTimer = 0) {
|
46
|
-
this._layoutFormConfig = [];
|
47
|
-
if (updateTimer > 0) {
|
48
|
-
setTimeout(() => {
|
49
|
-
this.buildFields();
|
50
|
-
}, updateTimer);
|
51
|
-
}
|
52
|
-
else {
|
53
|
-
this.buildFields();
|
54
|
-
}
|
55
|
-
}
|
56
|
-
buildFields() {
|
57
|
-
this.buildFormConfig();
|
58
|
-
this.buildAvailableFields();
|
59
|
-
}
|
60
|
-
loadFormConfig(updateTimer) {
|
61
|
-
var _a;
|
62
|
-
this._formConfig = this.getConfig();
|
63
|
-
this.loadFields(updateTimer);
|
64
|
-
this.controlFieldConfig();
|
65
|
-
if (((_a = this._filterFieldsAvailable) === null || _a === void 0 ? void 0 : _a.value) != undefined) {
|
66
|
-
this._filterFieldsAvailable.value = "";
|
67
|
-
}
|
68
|
-
}
|
69
|
-
getConfig() {
|
70
|
-
let config = this.configManager.getConfig(this.dataUnit);
|
71
|
-
if (config.fields && config.fields.length === 0) {
|
72
|
-
config = undefined;
|
73
|
-
}
|
74
|
-
if (config == undefined) {
|
75
|
-
config = buildFormConfigFromDataUnit(this.dataUnit);
|
76
|
-
}
|
77
|
-
return ObjectUtils.copy(config);
|
78
|
-
}
|
79
|
-
cancelChangeConfig() {
|
80
|
-
if (this._formConfigChanged === true) {
|
81
|
-
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.cancel")).then((canCancel) => {
|
82
|
-
if (canCancel) {
|
83
|
-
this._formConfigChanged = false;
|
84
|
-
this.resetChangeConfig();
|
85
|
-
}
|
86
|
-
});
|
87
|
-
}
|
88
|
-
else {
|
89
|
-
this.resetChangeConfig();
|
90
|
-
}
|
26
|
+
handleFieldConfigChanged() {
|
27
|
+
this.hasChanges = true;
|
91
28
|
}
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
});
|
100
|
-
}
|
101
|
-
else {
|
102
|
-
this.resetChangeOptionConfig();
|
29
|
+
async handleFormConfigOptionSelected({ detail }) {
|
30
|
+
this.configSelected = detail;
|
31
|
+
await this.loadConfigByUser();
|
32
|
+
this.selectedGuide = undefined;
|
33
|
+
this.optionConfigChanged = !ObjectUtils.equals(this.configSelected, this.originalConfigSelected);
|
34
|
+
if (this.configSelected.origin === UserConfigType.DEFAULT) {
|
35
|
+
this.hasChanges = false;
|
103
36
|
}
|
104
37
|
}
|
105
|
-
|
106
|
-
this.loadFormConfig(this._sortableTimer);
|
107
|
-
this.clearTempGroups();
|
108
|
-
}
|
109
|
-
resetChangeOptionConfig() {
|
110
|
-
this._formConfigChanged = false;
|
111
|
-
this.loadConfig(this._sortableTimer);
|
112
|
-
this.clearTempGroups();
|
113
|
-
}
|
114
|
-
getTabsToSave() {
|
115
|
-
return this._layoutFormConfig
|
116
|
-
.map((layoutConfig, index) => {
|
117
|
-
return {
|
118
|
-
label: layoutConfig.tab,
|
119
|
-
order: index,
|
120
|
-
visible: layoutConfig.visible
|
121
|
-
};
|
122
|
-
});
|
123
|
-
}
|
124
|
-
getFieldsToSave() {
|
125
|
-
const fields = [];
|
126
|
-
const snkFieldConfigs = this._formContainer.querySelectorAll('snk-field-config');
|
127
|
-
snkFieldConfigs.forEach((snkField) => {
|
128
|
-
const fieldConfig = snkField.fieldConfig;
|
129
|
-
if (fieldConfig == undefined) {
|
130
|
-
return;
|
131
|
-
}
|
132
|
-
const fieldToSave = {
|
133
|
-
cleanOnCopy: fieldConfig.cleanOnCopy || false,
|
134
|
-
group: fieldConfig.group,
|
135
|
-
label: fieldConfig.label,
|
136
|
-
name: fieldConfig.name,
|
137
|
-
required: fieldConfig.required,
|
138
|
-
readOnly: fieldConfig.readOnly,
|
139
|
-
tab: fieldConfig.tab
|
140
|
-
};
|
141
|
-
if (fieldConfig.defaultValue != undefined) {
|
142
|
-
if (fieldConfig.defaultValue.type == undefined) {
|
143
|
-
fieldToSave.defaultValue = {
|
144
|
-
type: DEFAULT_TYPE.fixed,
|
145
|
-
value: fieldConfig.defaultValue
|
146
|
-
};
|
147
|
-
}
|
148
|
-
else {
|
149
|
-
fieldToSave.defaultValue = fieldConfig.defaultValue;
|
150
|
-
}
|
151
|
-
}
|
152
|
-
fields.push(fieldToSave);
|
153
|
-
});
|
154
|
-
return fields;
|
155
|
-
}
|
156
|
-
isDefaultConfiguration() {
|
38
|
+
async handleAddFieldToGuide({ detail: fieldItem }) {
|
157
39
|
var _a;
|
158
|
-
|
159
|
-
|
160
|
-
&& this._optionFormConfigChanged === true
|
161
|
-
&& this._formConfigChanged === false;
|
162
|
-
}
|
163
|
-
buildConfigToSave() {
|
164
|
-
let formConfig = {};
|
165
|
-
const isDefault = this.isDefaultConfiguration();
|
166
|
-
if (isDefault) {
|
167
|
-
formConfig = this.getConfig();
|
168
|
-
}
|
169
|
-
else {
|
170
|
-
formConfig = ObjectUtils.copy(this._formConfig);
|
171
|
-
}
|
172
|
-
if (isDefault === false) {
|
173
|
-
const tabs = this.getTabsToSave();
|
174
|
-
if ((tabs === null || tabs === void 0 ? void 0 : tabs.length) > 0) {
|
175
|
-
formConfig.tabs = tabs;
|
176
|
-
}
|
177
|
-
const fields = this.getFieldsToSave();
|
178
|
-
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
179
|
-
formConfig.fields = fields;
|
180
|
-
}
|
181
|
-
}
|
182
|
-
formConfig.defaultConfiguration = isDefault;
|
183
|
-
return formConfig;
|
184
|
-
}
|
185
|
-
saveConfig() {
|
186
|
-
var _a;
|
187
|
-
if (((_a = this._tempGroups) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
188
|
-
ApplicationUtils.alert(this.getMessage("snkFormConfig.confirm.title"), this.getMessage("snkFormConfig.confirm.group"));
|
40
|
+
if (!this.selectedGuide) {
|
41
|
+
this.showNoGuideSelectedDialog();
|
189
42
|
return;
|
190
43
|
}
|
191
|
-
this.
|
192
|
-
this.
|
193
|
-
this.configManager.saveConfig(this.buildConfigToSave())
|
194
|
-
.then(savedConfig => {
|
195
|
-
ApplicationUtils.info(this.getMessage("snkFormConfig.info.successfullyConfigSaved"), { iconName: "check" });
|
196
|
-
this.configChange.emit(savedConfig);
|
197
|
-
});
|
198
|
-
}
|
199
|
-
applyOptionConfig() {
|
200
|
-
if (this._optionFormConfigChanged === true && this._optionFormConfigSelected != undefined) {
|
201
|
-
const name = this._optionFormConfigSelected.name || "configuração selecionada";
|
202
|
-
const origin = this._optionFormConfigSelected.origin === UserConfigType.DEFAULT ? "pessoal" : "padrão";
|
203
|
-
const msg = this.getMessage("snkFormConfig.confirm.apply").replace('{0}', name).replace('{1}', origin);
|
204
|
-
this.openConfirmDialog(msg).then((canCancel) => {
|
205
|
-
if (canCancel) {
|
206
|
-
this.saveConfig();
|
207
|
-
}
|
208
|
-
});
|
209
|
-
}
|
210
|
-
else {
|
211
|
-
this.saveConfig();
|
212
|
-
}
|
44
|
+
this.availableFields = [...this.availableFields.filter(f => f.name !== fieldItem.name)];
|
45
|
+
await ((_a = this.refFieldsLayout) === null || _a === void 0 ? void 0 : _a.addFieldToLayout(fieldItem));
|
213
46
|
}
|
214
|
-
|
215
|
-
|
216
|
-
if (
|
217
|
-
this._fieldConfigSelected = undefined;
|
47
|
+
async handleSetFieldAsAvailable({ detail }) {
|
48
|
+
const hasField = this.availableFields.some(f => f.name === detail.name);
|
49
|
+
if (hasField)
|
218
50
|
return;
|
219
|
-
|
220
|
-
if (((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === (fieldConfig === null || fieldConfig === void 0 ? void 0 : fieldConfig.name)) {
|
221
|
-
this._fieldConfigSelected = undefined;
|
222
|
-
}
|
223
|
-
else {
|
224
|
-
this._fieldConfigSelected = fieldConfig;
|
225
|
-
}
|
226
|
-
}
|
227
|
-
getFieldConfigStyle(fieldConfig) {
|
228
|
-
var _a;
|
229
|
-
return this._formFieldsStyle +
|
230
|
-
(((_a = this._fieldConfigSelected) === null || _a === void 0 ? void 0 : _a.name) === fieldConfig.name ? " form-config__field-config--selected" : "");
|
51
|
+
this.availableFields = [...this.availableFields, detail];
|
231
52
|
}
|
232
|
-
|
233
|
-
|
234
|
-
return ((_a = group.fields) === null || _a === void 0 ? void 0 : _a.length) ? group.fields.map((field) => {
|
235
|
-
var _a, _b;
|
236
|
-
return h("div", { key: field.name, class: this.getFieldConfigStyle(field), "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, 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 &&
|
237
|
-
h("div", { class: "ez-flex form-config__config-options" }, h("snk-config-options", { idConfig: field.name, messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, fieldConfig: this._fieldConfigSelected, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), onConfigOptionsChanged: (evt) => this.handleconfigOptionsChanged(evt.detail) })));
|
238
|
-
}) : h("div", { class: "form-config__add-group-container" }, h("div", { class: "form-config__add-group-content" }, h("div", { class: "form-config__add-group-label" }, h("label", { class: "ez-text ez-text--center ez-text--medium ez-text--primary ez-text--bold" }, this.getMessage("snkFormConfig.form.labelDropField")))));
|
53
|
+
async handleRemoveFieldFromAvailable({ detail }) {
|
54
|
+
this.availableFields = this.availableFields.filter(f => f.name !== detail.name);
|
239
55
|
}
|
240
|
-
|
56
|
+
observeSelectedGuide(guide) {
|
241
57
|
var _a;
|
242
|
-
(_a = this.
|
243
|
-
|
244
|
-
field = fieldEdited;
|
245
|
-
}
|
246
|
-
});
|
247
|
-
this._formConfigChanged = true;
|
248
|
-
}
|
249
|
-
closeFormConfig() {
|
250
|
-
if (this._formConfigChanged === true || this._optionFormConfigChanged === true) {
|
251
|
-
this.openConfirmDialog(this.getMessage("snkFormConfig.confirm.exit")).then((canClose) => {
|
252
|
-
if (canClose) {
|
253
|
-
this._formConfigChanged = false;
|
254
|
-
this.configClose.emit();
|
255
|
-
}
|
256
|
-
});
|
257
|
-
}
|
258
|
-
else {
|
259
|
-
this.configClose.emit();
|
260
|
-
}
|
261
|
-
}
|
262
|
-
openConfirmDialog(msg = "", title = this.getMessage("snkFormConfig.confirm.title")) {
|
263
|
-
return ApplicationUtils.confirm(title, msg);
|
264
|
-
}
|
265
|
-
controlMoveField(evt) {
|
266
|
-
const element = evt === null || evt === void 0 ? void 0 : evt.target;
|
267
|
-
if ((element === null || element === void 0 ? void 0 : element.closest('[data-draggable-element="field"]')) != undefined) {
|
268
|
-
this._mouseOnFieldConfig = true;
|
269
|
-
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) {
|
270
|
-
this._mouseOnConfigOptions = true;
|
271
|
-
}
|
272
|
-
else {
|
273
|
-
const iconList = ['minus', 'settings-inverted', 'chevron-up'];
|
274
|
-
const iconName = element === null || element === void 0 ? void 0 : element.iconName;
|
275
|
-
if (iconList.includes(iconName) === false) {
|
276
|
-
this.controlFieldConfig();
|
277
|
-
}
|
278
|
-
}
|
279
|
-
}
|
58
|
+
const guideGroups = (_a = this.guidesMap.get(guide === null || guide === void 0 ? void 0 : guide.name)) !== null && _a !== void 0 ? _a : [];
|
59
|
+
this.groupsList = [...guideGroups];
|
280
60
|
}
|
281
|
-
|
282
|
-
|
283
|
-
if (this._mouseOnConfigOptions) {
|
284
|
-
evt === null || evt === void 0 ? void 0 : evt.cancel();
|
285
|
-
this._mouseOnConfigOptions = false;
|
286
|
-
}
|
287
|
-
else {
|
288
|
-
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;
|
289
|
-
if (sourceContainer != undefined) {
|
290
|
-
sourceContainer.classList.add(this._fieldFloatingStyle);
|
291
|
-
}
|
292
|
-
}
|
293
|
-
}
|
294
|
-
controlSortedDraggingField(evt) {
|
295
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
296
|
-
const oldContainer = (_a = evt === null || evt === void 0 ? void 0 : evt.data) === null || _a === void 0 ? void 0 : _a.oldContainer;
|
297
|
-
const newContainer = (_b = evt === null || evt === void 0 ? void 0 : evt.data) === null || _b === void 0 ? void 0 : _b.newContainer;
|
298
|
-
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;
|
299
|
-
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;
|
300
|
-
if (oldContainer != undefined && newContainer != undefined && draggingElement != undefined && originalElement != undefined) {
|
301
|
-
if ((newContainer.tagName === CONTAINER_ID.collapsibleBox
|
302
|
-
|| newContainer.id === CONTAINER_ID.withoutGroup)
|
303
|
-
&& oldContainer.id === CONTAINER_ID.fieldsAvailable) {
|
304
|
-
draggingElement.className = this._formFieldsStyle;
|
305
|
-
draggingElement.querySelector('snk-field-config').modeInsertion = false;
|
306
|
-
originalElement.className = this._formFieldsStyle;
|
307
|
-
originalElement.querySelector('snk-field-config').modeInsertion = false;
|
308
|
-
}
|
309
|
-
else if ((oldContainer.tagName === CONTAINER_ID.collapsibleBox
|
310
|
-
|| oldContainer.id === CONTAINER_ID.withoutGroup)
|
311
|
-
&& newContainer.id === CONTAINER_ID.fieldsAvailable) {
|
312
|
-
draggingElement.className = this._fieldsAvailableStyle;
|
313
|
-
draggingElement.querySelector('snk-field-config').modeInsertion = true;
|
314
|
-
originalElement.className = this._fieldsAvailableStyle;
|
315
|
-
originalElement.querySelector('snk-field-config').modeInsertion = true;
|
316
|
-
}
|
317
|
-
}
|
318
|
-
}
|
319
|
-
isCancelDragAvailableField(newContainer, oldContainer, evt) {
|
320
|
-
var _a, _b;
|
321
|
-
if (newContainer == undefined || oldContainer == undefined || evt == undefined) {
|
322
|
-
return false;
|
323
|
-
}
|
324
|
-
if (((_a = evt.data) === null || _a === void 0 ? void 0 : _a.newIndex) !== ((_b = evt.data) === null || _b === void 0 ? void 0 : _b.oldIndex)
|
325
|
-
&& newContainer.id === CONTAINER_ID.fieldsAvailable
|
326
|
-
&& oldContainer.id === newContainer.id) {
|
327
|
-
evt.cancel();
|
328
|
-
this._fieldsAvailable = [];
|
329
|
-
setTimeout(() => {
|
330
|
-
this.buildAvailableFields();
|
331
|
-
}, this._sortableTimer);
|
332
|
-
return true;
|
333
|
-
}
|
334
|
-
return false;
|
335
|
-
}
|
336
|
-
isRemoveField(newContainer, oldContainer, fieldConfig) {
|
337
|
-
if (newContainer == undefined || oldContainer == undefined || fieldConfig == undefined) {
|
338
|
-
return false;
|
339
|
-
}
|
340
|
-
if ((oldContainer.tagName === CONTAINER_ID.collapsibleBox
|
341
|
-
|| oldContainer.id === CONTAINER_ID.withoutGroup)
|
342
|
-
&& newContainer.id === CONTAINER_ID.fieldsAvailable) {
|
343
|
-
const eventDetail = {
|
344
|
-
detail: {
|
345
|
-
field: fieldConfig,
|
346
|
-
type: ACTION_CONFIG.remove
|
347
|
-
}
|
348
|
-
};
|
349
|
-
setTimeout(() => {
|
350
|
-
this.handleFieldConfigChange(eventDetail);
|
351
|
-
}, this._renderTimer);
|
352
|
-
return true;
|
353
|
-
}
|
354
|
-
return false;
|
61
|
+
observeConfigManager() {
|
62
|
+
this.loadFormConfig();
|
355
63
|
}
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
}
|
361
|
-
if (data.newIndex !== data.oldIndex
|
362
|
-
|| oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
363
|
-
|| (newContainer.id === CONTAINER_ID.withoutGroup
|
364
|
-
&& oldContainer.id === CONTAINER_ID.fieldsAvailable)) {
|
365
|
-
if (this.isFieldAvailable(newContainer, oldContainer)) {
|
366
|
-
fieldConfig.tab = (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab;
|
367
|
-
}
|
368
|
-
fieldConfig.group = newContainer.dataset.groupName;
|
369
|
-
setTimeout(() => {
|
370
|
-
const isNewGroup = newContainer.id.includes(CONTAINER_ID.addNewGroup);
|
371
|
-
if (isNewGroup) {
|
372
|
-
this.clearTempGroups(true);
|
373
|
-
}
|
374
|
-
const sortableTimer = oldContainer.dataset.groupName !== newContainer.dataset.groupName
|
375
|
-
|| (newContainer.id === CONTAINER_ID.withoutGroup && oldContainer.id === CONTAINER_ID.fieldsAvailable)
|
376
|
-
? this._sortableTimer
|
377
|
-
: 0;
|
378
|
-
this.updateFieldsToSave(sortableTimer);
|
379
|
-
}, this._renderTimer);
|
380
|
-
return true;
|
381
|
-
}
|
382
|
-
return false;
|
64
|
+
showNoGuideSelectedDialog() {
|
65
|
+
const title = this.getMessage('snkFormConfig.noGuideSelected.title');
|
66
|
+
const message = this.getMessage('snkFormConfig.noGuideSelected.message');
|
67
|
+
ApplicationUtils.alert(title, message);
|
383
68
|
}
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
69
|
+
/**
|
70
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
71
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
72
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
73
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
|
74
|
+
*/
|
75
|
+
getMessage(key, params) {
|
76
|
+
return this.messagesBuilder.getMessage(key, params);
|
391
77
|
}
|
392
|
-
|
393
|
-
|
394
|
-
const oldContainer = (_a = evt === null || evt === void 0 ? void 0 : evt.data) === null || _a === void 0 ? void 0 : _a.oldContainer;
|
395
|
-
const newContainer = (_b = evt === null || evt === void 0 ? void 0 : evt.data) === null || _b === void 0 ? void 0 : _b.newContainer;
|
396
|
-
if (this.isCancelDragAvailableField(newContainer, oldContainer, evt)) {
|
397
|
-
return;
|
398
|
-
}
|
399
|
-
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;
|
400
|
-
const fieldConfig = (_f = originalElement === null || originalElement === void 0 ? void 0 : originalElement.querySelector('snk-field-config')) === null || _f === void 0 ? void 0 : _f.fieldConfig;
|
401
|
-
if (this.isRemoveField(newContainer, oldContainer, fieldConfig)) {
|
402
|
-
return;
|
403
|
-
}
|
404
|
-
if (this.isAddOrMoveField(newContainer, oldContainer, fieldConfig, evt === null || evt === void 0 ? void 0 : evt.data)) {
|
78
|
+
async initializeUserConfig() {
|
79
|
+
if (this.configManager == undefined)
|
405
80
|
return;
|
81
|
+
try {
|
82
|
+
const userConfig = await this.configManager.fetchUserAvailableConfigs();
|
83
|
+
this.configOptions = userConfig;
|
84
|
+
const isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
85
|
+
const origin = (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
|
86
|
+
this.configSelected = userConfig.find((config) => config.origin === origin);
|
87
|
+
this.originalConfigSelected = userConfig.find((config) => config.origin === origin);
|
406
88
|
}
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
if ((fields === null || fields === void 0 ? void 0 : fields.length) > 0) {
|
411
|
-
this._formConfig.fields = fields;
|
89
|
+
catch (error) {
|
90
|
+
console.error('Falha ao buscar configurações de formulário definida pelo usuário.');
|
91
|
+
console.error(error);
|
412
92
|
}
|
413
|
-
this.loadFields(updateTimer);
|
414
|
-
this._formConfigChanged = true;
|
415
93
|
}
|
416
|
-
|
417
|
-
if (this.
|
94
|
+
async loadConfigByUser() {
|
95
|
+
if (!this.configManager || !this.configSelected)
|
418
96
|
return;
|
97
|
+
if (this.isConfigDefaultSelected()) {
|
98
|
+
await this.handleLoadDefaultConfig();
|
419
99
|
}
|
420
|
-
|
421
|
-
this.
|
422
|
-
}
|
423
|
-
this._sortableField = new Sortable(this._sortableContainer.querySelectorAll('[data-draggable-parent="field"]'), {
|
424
|
-
draggable: '[data-draggable-element="field"]',
|
425
|
-
mirror: {
|
426
|
-
constrainDimensions: true
|
427
|
-
},
|
428
|
-
distance: CONFIG_EVENTS.dragStartDistance
|
429
|
-
});
|
430
|
-
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingField(evt));
|
431
|
-
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragSorted, (evt) => this.controlSortedDraggingField(evt));
|
432
|
-
this._sortableField.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingField(evt));
|
433
|
-
}
|
434
|
-
controlStartDraggingGroup(evt) {
|
435
|
-
if (this._mouseOnFieldConfig || this._editingTitleGroup) {
|
436
|
-
evt === null || evt === void 0 ? void 0 : evt.cancel();
|
437
|
-
this._mouseOnFieldConfig = false;
|
438
|
-
}
|
439
|
-
}
|
440
|
-
controlStopDraggingGroup(evt) {
|
441
|
-
if (evt.data.newIndex !== evt.data.oldIndex) {
|
442
|
-
setTimeout(() => {
|
443
|
-
this.updateFieldsToSave(this._sortableTimer);
|
444
|
-
}, this._renderTimer);
|
100
|
+
else {
|
101
|
+
this.loadFormConfig();
|
445
102
|
}
|
446
103
|
}
|
447
|
-
|
448
|
-
|
104
|
+
async handleLoadDefaultConfig() {
|
105
|
+
const defaultConfig = await this.configManager.fetchDefaultConfig();
|
106
|
+
if (defaultConfig) {
|
107
|
+
this.loadFormConfig(defaultConfig);
|
449
108
|
return;
|
450
109
|
}
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
this._sortableGroup = new Sortable(this._sortableContainer.querySelectorAll('[data-draggable-parent="group"]'), {
|
455
|
-
draggable: '[data-draggable-element="group"]',
|
456
|
-
mirror: {
|
457
|
-
constrainDimensions: true
|
458
|
-
},
|
459
|
-
distance: CONFIG_EVENTS.dragStartDistance
|
460
|
-
});
|
461
|
-
this._sortableGroup.on(CONFIG_SORTABLE_EVENTS.dragStart, (evt) => this.controlStartDraggingGroup(evt));
|
462
|
-
this._sortableGroup.on(CONFIG_SORTABLE_EVENTS.dragStop, (evt) => this.controlStopDraggingGroup(evt));
|
463
|
-
}
|
464
|
-
loadUserConfig() {
|
465
|
-
if (this.configManager == undefined) {
|
466
|
-
return;
|
110
|
+
const emptyConfig = this.configManager.getEmptyConfig();
|
111
|
+
if (emptyConfig) {
|
112
|
+
this.loadFormConfig(emptyConfig);
|
467
113
|
}
|
468
|
-
this.configManager.fetchUserAvailableConfigs()
|
469
|
-
.then((userConfig) => {
|
470
|
-
this._formConfigOptions = userConfig;
|
471
|
-
if (this._formConfigOptions == undefined) {
|
472
|
-
return;
|
473
|
-
}
|
474
|
-
let isDefault = this._formConfig != undefined ? this._formConfig.defaultConfiguration : true;
|
475
|
-
const selectedOption = userConfig
|
476
|
-
.find((config) => {
|
477
|
-
return config.origin === (isDefault ? UserConfigType.DEFAULT : UserConfigType.USER);
|
478
|
-
});
|
479
|
-
this.setFormConfig(selectedOption);
|
480
|
-
});
|
481
114
|
}
|
482
|
-
|
483
|
-
this.
|
115
|
+
isConfigDefaultSelected() {
|
116
|
+
return this.configSelected.origin === UserConfigType.DEFAULT;
|
484
117
|
}
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
return config.origin === (action === null || action === void 0 ? void 0 : action.value);
|
490
|
-
});
|
491
|
-
this.setFormConfig(selectedOption);
|
492
|
-
this._optionFormConfigChanged = true;
|
493
|
-
this.loadConfigByUser();
|
494
|
-
}
|
495
|
-
changeTabOrder(newIndex) {
|
496
|
-
const tabs = [];
|
497
|
-
const tabConfigs = this._tabConfig.querySelectorAll('.tab-config__tab');
|
498
|
-
this._tabSelected = newIndex;
|
499
|
-
tabConfigs.forEach((tabConfig, index) => {
|
500
|
-
var _a;
|
501
|
-
if (index) {
|
502
|
-
const label = (_a = tabConfig.querySelector('.tab-config__tab-label')) === null || _a === void 0 ? void 0 : _a.getAttribute('title');
|
503
|
-
tabs.push({
|
504
|
-
label,
|
505
|
-
order: (index - 1)
|
506
|
-
});
|
507
|
-
}
|
508
|
-
});
|
509
|
-
this._layoutFormConfig.map((tabLayout) => {
|
510
|
-
tabs.forEach((tab) => {
|
511
|
-
tab.label === tabLayout.tab && (tab.visible = tabLayout.visible);
|
512
|
-
});
|
513
|
-
});
|
514
|
-
if (tabs.length > 0) {
|
515
|
-
this._formConfig.tabs = tabs;
|
516
|
-
this.loadFields(this._sortableTimer);
|
517
|
-
this.controlFieldConfig();
|
518
|
-
this._formConfigChanged = true;
|
519
|
-
}
|
118
|
+
loadFormConfig(config) {
|
119
|
+
this._formConfig = config ? config : this.getConfig();
|
120
|
+
this.loadGuides();
|
121
|
+
this.initializeAvailableFields();
|
520
122
|
}
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
}
|
525
|
-
if (this._optionFormConfigSelected == undefined) {
|
123
|
+
initializeAvailableFields() {
|
124
|
+
var _a;
|
125
|
+
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined)
|
526
126
|
return;
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
this._formConfig = config;
|
539
|
-
this._tabSelected = 1;
|
540
|
-
this.loadFields(this._sortableTimer);
|
541
|
-
this.controlFieldConfig();
|
542
|
-
this.clearTempGroups();
|
543
|
-
}
|
544
|
-
}
|
545
|
-
loadConfig(updateTimer = 0) {
|
546
|
-
this.loadFormConfig(updateTimer);
|
547
|
-
this.loadUserConfig();
|
548
|
-
}
|
549
|
-
addNewGroup() {
|
550
|
-
var _a, _b;
|
551
|
-
const tab = (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab;
|
552
|
-
const hasGroup = (_b = this._tempGroups) === null || _b === void 0 ? void 0 : _b.find((tempGroup) => {
|
553
|
-
return tempGroup.tab === tab && tempGroup.group.includes(this._labelNewGroup);
|
127
|
+
const fieldsFormConfig = [...this._formConfig.fields];
|
128
|
+
const fieldsMetadata = this.dataUnit.metadata.fields;
|
129
|
+
this.availableFields = fieldsMetadata.filter(({ name: fieldName, visible: fieldVisible, properties }) => {
|
130
|
+
const hasCfg = fieldsFormConfig.some(({ name: fieldFormName }) => fieldFormName === fieldName);
|
131
|
+
/**
|
132
|
+
* Quando a visibilidade de um campo é alterada pelo dataunit, mas o desenvolvedor deseja que o mesmo continue
|
133
|
+
* sendo apresentado no configurador, precisamos fazer essa tratativa, verificando se o campo não tem configuração
|
134
|
+
*/
|
135
|
+
if (!hasCfg && properties.visibleOnConfig === true && !fieldVisible)
|
136
|
+
return properties.visibleOnConfig;
|
137
|
+
return fieldVisible === true && hasCfg === false;
|
554
138
|
});
|
555
|
-
if (hasGroup == undefined) {
|
556
|
-
this._tempGroups.push({
|
557
|
-
tab,
|
558
|
-
group: this.handleDuplicateGroups(this._labelNewGroup, this._tabConfig.selectedTab)
|
559
|
-
});
|
560
|
-
this.loadFields();
|
561
|
-
this.controlFieldConfig();
|
562
|
-
this._formConfigChanged = true;
|
563
|
-
}
|
564
139
|
}
|
565
|
-
|
140
|
+
loadGuides() {
|
566
141
|
var _a;
|
567
|
-
|
568
|
-
|
569
|
-
this._tempGroups = this._tempGroups.filter((tempGroup) => {
|
570
|
-
return tempGroup.tab !== this._tabConfig.selectedTab;
|
571
|
-
});
|
572
|
-
}
|
573
|
-
else {
|
574
|
-
this._tempGroups = [];
|
575
|
-
}
|
576
|
-
}
|
142
|
+
this.guidesList = [...buildGuides(this._formConfig, this.getMessage('snkFormConfig.form.mainArea'))];
|
143
|
+
this.guidesMap = buildGuidesMap((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields, this.guidesList, this.dataUnit, this.getMessage('snkFormConfig.form.tabGeneral'));
|
577
144
|
}
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
&& tempGroup.tab === this._tabConfig.selectedTab)
|
583
|
-
|| tempGroup.tab !== this._tabConfig.selectedTab;
|
584
|
-
});
|
585
|
-
}
|
586
|
-
else {
|
587
|
-
this.updateFieldsToSave(this._sortableTimer);
|
588
|
-
}
|
589
|
-
}
|
590
|
-
checkGroupExists(newLabel, indexGroup, isTempGroup = false) {
|
591
|
-
var _a, _b, _c;
|
592
|
-
const tabName = (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab;
|
593
|
-
const currentTab = (_b = this._layoutFormConfig) === null || _b === void 0 ? void 0 : _b.find(tab => tab.tab === tabName);
|
594
|
-
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(); });
|
595
|
-
if (tabGroupsNames === null || tabGroupsNames === void 0 ? void 0 : tabGroupsNames.includes(newLabel === null || newLabel === void 0 ? void 0 : newLabel.toLowerCase())) {
|
596
|
-
const title = this.getMessage("snkFormConfig.confirm.title");
|
597
|
-
const message = `
|
598
|
-
${this.getMessage("snkFormConfig.alert.titleGroupExists")}
|
599
|
-
<b>${newLabel}</b>
|
600
|
-
${this.getMessage("snkFormConfig.alert.inTab")}
|
601
|
-
<b>${tabName === TAB_NAMES.main ? this.getMessage("snkFormConfig.form.mainArea") : tabName}</b>.
|
602
|
-
<br/><br/>
|
603
|
-
${this.getMessage("snkFormConfig.alert.infoValidTitle")}
|
604
|
-
`;
|
605
|
-
ApplicationUtils.alert(title, message)
|
606
|
-
.then(() => {
|
607
|
-
var _a, _b;
|
608
|
-
if (isTempGroup) {
|
609
|
-
(_a = this._newGroupBoxes[indexGroup]) === null || _a === void 0 ? void 0 : _a.applyFocusTextEdit();
|
610
|
-
}
|
611
|
-
else {
|
612
|
-
(_b = this._currentGroupBoxes[tabName][indexGroup]) === null || _b === void 0 ? void 0 : _b.applyFocusTextEdit();
|
613
|
-
}
|
614
|
-
});
|
615
|
-
return false;
|
145
|
+
getConfig() {
|
146
|
+
let config = this.configManager.getConfig(this.dataUnit, false);
|
147
|
+
if (config.fields && config.fields.length === 0) {
|
148
|
+
config = undefined;
|
616
149
|
}
|
617
|
-
|
618
|
-
|
619
|
-
saveEditLabelTempGroup(editDetails, index) {
|
620
|
-
const { newValue: newLabel } = editDetails.detail;
|
621
|
-
if (this._newGroupBoxes != undefined && this._newGroupBoxes[index] != undefined) {
|
622
|
-
this._newGroupBoxes[index].dataset.groupName = newLabel;
|
150
|
+
if (config == undefined) {
|
151
|
+
config = buildFormConfigFromDataUnit(this.dataUnit);
|
623
152
|
}
|
153
|
+
return ObjectUtils.copy(config);
|
624
154
|
}
|
625
|
-
|
626
|
-
|
627
|
-
const { value: oldLabel, newValue: newLabel } = editDetails.detail;
|
628
|
-
(_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
629
|
-
if (field.group === oldLabel) {
|
630
|
-
field.group = newLabel;
|
631
|
-
}
|
632
|
-
});
|
633
|
-
this.loadFields(this._sortableTimer);
|
634
|
-
this.controlFieldConfig();
|
635
|
-
this._formConfigChanged = true;
|
155
|
+
handleSelectGuide({ detail: selectedGuide }) {
|
156
|
+
this.selectedGuide = selectedGuide;
|
636
157
|
}
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
}
|
642
|
-
});
|
158
|
+
handleLayoutChanged({ detail: newGroupList }) {
|
159
|
+
this.hasChanges = true;
|
160
|
+
this.groupsList = [...newGroupList];
|
161
|
+
this.guidesMap.set(this.selectedGuide.name, [...newGroupList]);
|
643
162
|
}
|
644
|
-
|
163
|
+
getIsDefaultConfig() {
|
645
164
|
var _a;
|
646
|
-
const
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
if (tab.groups.some(groups => groups.group === titleNewGroup)) {
|
651
|
-
titleNewGroup += `${this.captureHighestValueTitle(selectedTabGroups)}`;
|
652
|
-
}
|
653
|
-
}
|
654
|
-
});
|
655
|
-
}
|
656
|
-
return titleNewGroup;
|
165
|
+
const optionSelected = (_a = this.configSelected) === null || _a === void 0 ? void 0 : _a.origin;
|
166
|
+
return optionSelected === UserConfigType.DEFAULT
|
167
|
+
&& this.optionConfigChanged === true
|
168
|
+
&& this.hasChanges === false;
|
657
169
|
}
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
170
|
+
getTabsToSave() {
|
171
|
+
return this.guidesList.map(tab => {
|
172
|
+
return {
|
173
|
+
name: tab.name,
|
174
|
+
label: tab.name === TAB_NAMES.main ? tab.name : tab.label,
|
175
|
+
order: tab.name === TAB_NAMES.main ? 0 : tab.order,
|
176
|
+
visible: tab.visible,
|
177
|
+
};
|
664
178
|
});
|
665
|
-
if (Math.max.apply(null, valuesNumericTitle) > 0) {
|
666
|
-
return ` (${Math.max.apply(null, valuesNumericTitle) + 1})`;
|
667
|
-
}
|
668
|
-
else {
|
669
|
-
return ' (1)';
|
670
|
-
}
|
671
|
-
}
|
672
|
-
getLayoutFormConfig() {
|
673
|
-
var _a, _b;
|
674
|
-
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined) {
|
675
|
-
return;
|
676
|
-
}
|
677
|
-
let layoutFormConfig = [];
|
678
|
-
let fields = [];
|
679
|
-
for (const field of this._formConfig.fields) {
|
680
|
-
const hasField = fields.find((fieldTemp) => {
|
681
|
-
return field.name === fieldTemp.name && field.tab === fieldTemp.tab;
|
682
|
-
});
|
683
|
-
if (hasField == undefined) {
|
684
|
-
fields.push(field);
|
685
|
-
const fieldMD = this.dataUnit.getField(field.name);
|
686
|
-
if (fieldMD === null || fieldMD === void 0 ? void 0 : fieldMD.visible) {
|
687
|
-
if (field.label == undefined || field.label === "") {
|
688
|
-
field.label = fieldMD.label;
|
689
|
-
}
|
690
|
-
if (field.tab == undefined || field.tab === "") {
|
691
|
-
field.tab = this.getMessage("snkFormConfig.form.tabGeneral");
|
692
|
-
}
|
693
|
-
let tab = layoutFormConfig.find(value => value.tab === field.tab);
|
694
|
-
if (tab == undefined) {
|
695
|
-
let visible = null;
|
696
|
-
if (this._formConfig.tabs != undefined) {
|
697
|
-
const configTabs = this._formConfig.tabs.filter(configTab => configTab.label === field.tab);
|
698
|
-
if (configTabs.length > 0) {
|
699
|
-
visible = configTabs[0].visible;
|
700
|
-
}
|
701
|
-
}
|
702
|
-
const tabLabel = ((_b = field.tab) === null || _b === void 0 ? void 0 : _b.label) || field.tab;
|
703
|
-
if (visible !== null) {
|
704
|
-
tab = { tab: tabLabel, groups: [], visible };
|
705
|
-
}
|
706
|
-
else {
|
707
|
-
tab = { tab: tabLabel, groups: [], visible: true };
|
708
|
-
}
|
709
|
-
layoutFormConfig.push(tab);
|
710
|
-
}
|
711
|
-
const group = tab.groups.find(value => value.group === field.group);
|
712
|
-
if (group) {
|
713
|
-
group.fields.push(field);
|
714
|
-
}
|
715
|
-
else {
|
716
|
-
const newGroup = { group: field.group, fields: [field] };
|
717
|
-
if (field.group === undefined) {
|
718
|
-
tab.groups.unshift(newGroup);
|
719
|
-
}
|
720
|
-
else {
|
721
|
-
tab.groups.push(newGroup);
|
722
|
-
}
|
723
|
-
}
|
724
|
-
}
|
725
|
-
}
|
726
|
-
}
|
727
|
-
return layoutFormConfig;
|
728
179
|
}
|
729
|
-
|
180
|
+
async handleSaveConfig() {
|
730
181
|
var _a;
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
if (layoutFormConfig == undefined) {
|
735
|
-
layoutFormConfig = [];
|
736
|
-
}
|
737
|
-
return this._formConfig.tabs.map((tab) => {
|
738
|
-
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()); })
|
739
|
-
|| { tab: tab.label, groups: [], visible: tab.visible };
|
182
|
+
const savedConfig = await this.configManager.saveConfig(this.buildConfigToSave());
|
183
|
+
this.configSelected = (_a = this.configOptions) === null || _a === void 0 ? void 0 : _a.find((config) => {
|
184
|
+
return config.origin === (this.hasChanges ? UserConfigType.USER : UserConfigType.DEFAULT);
|
740
185
|
});
|
186
|
+
this.originalConfigSelected = this.configSelected;
|
187
|
+
this.hasChanges = false;
|
188
|
+
this.optionConfigChanged = false;
|
189
|
+
ApplicationUtils.info(this.getMessage('snkFormConfig.info.successfullyConfigSaved'), { iconName: 'check' });
|
190
|
+
this.configChange.emit(savedConfig);
|
741
191
|
}
|
742
|
-
|
743
|
-
if (
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
return
|
192
|
+
buildConfigToSave() {
|
193
|
+
if (this.getIsDefaultConfig()) {
|
194
|
+
const formConfig = this._formConfig;
|
195
|
+
formConfig.defaultConfiguration = true;
|
196
|
+
return formConfig;
|
197
|
+
}
|
198
|
+
const formConfig = ObjectUtils.copy(this._formConfig);
|
199
|
+
formConfig.tabs = this.getTabsToSave();
|
200
|
+
formConfig.fields = getFieldsToSave(this.guidesMap);
|
201
|
+
formConfig.defaultConfiguration = false;
|
202
|
+
return formConfig;
|
753
203
|
}
|
754
|
-
|
755
|
-
|
756
|
-
if ((tabs === null || tabs === void 0 ? void 0 : tabs.length) > 0) {
|
757
|
-
this._formConfig.tabs = tabs;
|
758
|
-
if (tabs.length === 1) {
|
759
|
-
this._tabSelected = 0;
|
760
|
-
}
|
761
|
-
}
|
204
|
+
handleAvailableFieldListChanged({ detail: updatedList }) {
|
205
|
+
this.availableFields = [...updatedList];
|
762
206
|
}
|
763
|
-
|
764
|
-
|
765
|
-
if (((_a = this._formConfig) === null || _a === void 0 ? void 0 : _a.fields) == undefined) {
|
766
|
-
return;
|
767
|
-
}
|
768
|
-
let layoutFormConfig = this.getLayoutFormConfig();
|
769
|
-
layoutFormConfig = this.configureTabs(layoutFormConfig);
|
770
|
-
layoutFormConfig = this.configureTabMain(layoutFormConfig);
|
771
|
-
this._layoutFormConfig = layoutFormConfig;
|
772
|
-
this.updateTabs();
|
207
|
+
handleSetFieldListAsAvailable({ detail: updatedList }) {
|
208
|
+
this.availableFields = [...this.availableFields, ...updatedList];
|
773
209
|
}
|
774
|
-
|
210
|
+
handleGuideDeleted({ detail: guide }) {
|
775
211
|
var _a, _b;
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
this.
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
}
|
793
|
-
changeTabSelected(tabSelected) {
|
794
|
-
this._tabSelected = tabSelected.index;
|
795
|
-
const selectorTab = this._formContainer.querySelector("div#tab" + tabSelected.index);
|
796
|
-
this._formContainer.querySelectorAll(".form-config__tab-content").forEach(container => container.className = "form-config__hide-content sc-snk-form-config");
|
797
|
-
if (selectorTab) {
|
798
|
-
selectorTab.className = "form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium sc-snk-form-config";
|
799
|
-
}
|
800
|
-
}
|
801
|
-
onFilterChange(value) {
|
802
|
-
this._fieldsAvailable = ArrayUtils.applyStringFilter(value, this._listEnabledFields, true, "label");
|
803
|
-
}
|
804
|
-
orderFieldsAvailable(fields) {
|
805
|
-
return ArrayUtils.sortAlphabetically(fields);
|
806
|
-
}
|
807
|
-
handleLabelCounter(sizeList) {
|
808
|
-
const labels = [this.getMessage("snkFormConfig.availableFields.labelNoFields"), this.getMessage("snkFormConfig.availableFields.labelOneField")];
|
809
|
-
return sizeList > 1 ? `${sizeList} ${this.getMessage("snkFormConfig.availableFields.labelAvailableFields")}` : labels[sizeList];
|
810
|
-
}
|
811
|
-
controlAddFieldConfig(fieldConfig) {
|
812
|
-
var _a;
|
813
|
-
this._formConfigChanged = false;
|
814
|
-
if (fieldConfig == undefined) {
|
815
|
-
return;
|
816
|
-
}
|
817
|
-
if (this._formConfig.fields == undefined) {
|
818
|
-
this._formConfig.fields = [];
|
819
|
-
}
|
820
|
-
const fieldFinded = this._formConfig.fields.filter((field) => {
|
821
|
-
return field.name === fieldConfig.name && field.tab && fieldConfig.tab;
|
822
|
-
});
|
823
|
-
if (fieldFinded.length > 0) {
|
824
|
-
fieldFinded.forEach((field) => {
|
825
|
-
field.name = fieldConfig.name;
|
826
|
-
field.label = fieldConfig.label;
|
827
|
-
field.required = fieldConfig.required;
|
828
|
-
field.readOnly = fieldConfig.readOnly;
|
829
|
-
field.group = fieldConfig.group;
|
830
|
-
});
|
831
|
-
}
|
832
|
-
else {
|
833
|
-
this._formConfig.fields.push({
|
834
|
-
name: fieldConfig.name,
|
835
|
-
label: fieldConfig.label,
|
836
|
-
required: fieldConfig.required,
|
837
|
-
readOnly: fieldConfig.readOnly,
|
838
|
-
group: fieldConfig.group,
|
839
|
-
tab: (_a = this._tabConfig) === null || _a === void 0 ? void 0 : _a.selectedTab
|
840
|
-
});
|
841
|
-
}
|
842
|
-
this.loadFields();
|
843
|
-
this.controlFieldConfig();
|
844
|
-
this._formConfigChanged = true;
|
845
|
-
this.resetSortables();
|
846
|
-
}
|
847
|
-
controlRemoveFieldConfig(fieldConfig, updateTimer) {
|
212
|
+
const guideName = guide.name;
|
213
|
+
const guideGroups = (_a = this.guidesMap.get(guideName)) !== null && _a !== void 0 ? _a : [];
|
214
|
+
const fieldsToAvailable = [];
|
215
|
+
guideGroups.forEach(group => fieldsToAvailable.push(...group.fields));
|
216
|
+
this.availableFields = [...this.availableFields, ...fieldsToAvailable];
|
217
|
+
this.guidesList = [...this.guidesList.filter(g => g.name !== guideName)];
|
218
|
+
this.guidesMap.delete(guideName);
|
219
|
+
if (((_b = this.selectedGuide) === null || _b === void 0 ? void 0 : _b.name) === guideName) {
|
220
|
+
this.selectedGuide = undefined;
|
221
|
+
}
|
222
|
+
this.hasChanges = true;
|
223
|
+
}
|
224
|
+
handleGuideListChanged({ detail: updatedList }) {
|
225
|
+
this.hasChanges = true;
|
226
|
+
this.guidesList = [...updatedList];
|
227
|
+
}
|
228
|
+
handleGuideRenamed({ detail: updatedName }) {
|
848
229
|
var _a;
|
849
|
-
this.
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
}
|
859
|
-
resetSortables() {
|
860
|
-
this.controlSortableField();
|
861
|
-
this.controlSortableGroup();
|
862
|
-
}
|
863
|
-
handleFieldConfigChange(evt, updateTimer = 0) {
|
864
|
-
const { field: fieldConfig, type: actionType } = evt.detail;
|
865
|
-
if (actionType === ACTION_CONFIG.configuration) {
|
866
|
-
this.controlFieldConfig(fieldConfig);
|
867
|
-
return;
|
868
|
-
}
|
869
|
-
if (actionType === ACTION_CONFIG.remove) {
|
870
|
-
this.controlRemoveFieldConfig(fieldConfig, updateTimer);
|
871
|
-
return;
|
872
|
-
}
|
873
|
-
if (actionType === ACTION_CONFIG.add) {
|
874
|
-
this.controlAddFieldConfig(fieldConfig);
|
875
|
-
return;
|
876
|
-
}
|
877
|
-
}
|
878
|
-
changeTabLabel(editDetails) {
|
879
|
-
var _a, _b;
|
880
|
-
const { value: oldLabel, newValue: newLabel } = editDetails.detail.detail;
|
881
|
-
(_a = this._formConfig.fields) === null || _a === void 0 ? void 0 : _a.forEach((field) => {
|
882
|
-
if (field.tab === oldLabel) {
|
883
|
-
field.tab = newLabel;
|
884
|
-
}
|
885
|
-
});
|
886
|
-
(_b = this._formConfig.tabs) === null || _b === void 0 ? void 0 : _b.forEach((tab) => {
|
887
|
-
if (tab.label === oldLabel) {
|
888
|
-
tab.label = newLabel;
|
889
|
-
}
|
890
|
-
});
|
891
|
-
this.loadFields(this._sortableTimer);
|
892
|
-
this.controlFieldConfig();
|
893
|
-
this._formConfigChanged = true;
|
894
|
-
}
|
895
|
-
handleDeleteTab(tabSelected) {
|
896
|
-
let options = {
|
897
|
-
canClose: false,
|
898
|
-
labelCancel: this.getMessage("snkFormConfig.confirm.labelCancel"),
|
899
|
-
labelConfirm: this.getMessage("snkFormConfig.confirm.labelDelete"),
|
900
|
-
btnConfirmDanger: false
|
230
|
+
const guideGroups = (_a = this.guidesMap.get(this.selectedGuide.name)) !== null && _a !== void 0 ? _a : [];
|
231
|
+
const updatedGroups = updateTabInFieldsFromGroupList(guideGroups, updatedName);
|
232
|
+
this.guidesMap.delete(this.selectedGuide.name);
|
233
|
+
this.guidesMap.set(updatedName, updatedGroups);
|
234
|
+
const updatedGuide = {
|
235
|
+
name: updatedName,
|
236
|
+
label: updatedName,
|
237
|
+
visible: this.selectedGuide.visible,
|
238
|
+
order: this.selectedGuide.order,
|
901
239
|
};
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
});
|
924
|
-
this.loadFields(this._sortableTimer);
|
925
|
-
this.controlFieldConfig();
|
926
|
-
this._formConfigChanged = true;
|
927
|
-
}
|
928
|
-
handleCanStartDragTab() {
|
929
|
-
var _a, _b;
|
930
|
-
const tabs = this._layoutFormConfig.map(tab => tab.tab);
|
931
|
-
for (const tab of tabs) {
|
932
|
-
(_a = this._currentGroupBoxes[tab]) === null || _a === void 0 ? void 0 : _a.map(collapsibleBox => collapsibleBox === null || collapsibleBox === void 0 ? void 0 : collapsibleBox.cancelEdition());
|
933
|
-
}
|
934
|
-
(_b = this._newGroupBoxes) === null || _b === void 0 ? void 0 : _b.map(collapsibleBox => collapsibleBox === null || collapsibleBox === void 0 ? void 0 : collapsibleBox.cancelEdition());
|
935
|
-
}
|
936
|
-
/**
|
937
|
-
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
938
|
-
* através de um pequeno modulo na estrutura da aplicação:
|
939
|
-
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
940
|
-
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-form.msg.ts"
|
941
|
-
*/
|
942
|
-
getMessage(key, params) {
|
943
|
-
return this.messagesBuilder.getMessage(key, params);
|
240
|
+
this.guidesList = [...this.guidesList.map(guide => (guide.name === this.selectedGuide.name) ? updatedGuide : guide)];
|
241
|
+
this.groupsList = [...updatedGroups];
|
242
|
+
this.selectedGuide = updatedGuide;
|
243
|
+
this.hasChanges = true;
|
244
|
+
}
|
245
|
+
handleCreateNewGuide() {
|
246
|
+
const newGuideName = buildNewGuideName(this.guidesList);
|
247
|
+
const newGuide = {
|
248
|
+
name: newGuideName,
|
249
|
+
label: newGuideName,
|
250
|
+
visible: true,
|
251
|
+
order: this.guidesList.length + 1,
|
252
|
+
};
|
253
|
+
const newGuideFixedGroup = {
|
254
|
+
name: GROUP_NAMES.noGroup,
|
255
|
+
fields: [],
|
256
|
+
};
|
257
|
+
this.guidesList = [...this.guidesList, newGuide];
|
258
|
+
this.guidesMap.set(newGuideName, [newGuideFixedGroup]);
|
259
|
+
this.selectedGuide = newGuide;
|
260
|
+
this.hasChanges = true;
|
944
261
|
}
|
945
|
-
|
946
|
-
|
947
|
-
|
262
|
+
getGuideNames() {
|
263
|
+
return [
|
264
|
+
...this.guidesList.map(g => g.name.toLowerCase()),
|
265
|
+
this.getMessage('snkFormConfig.form.mainArea').toLowerCase(),
|
266
|
+
];
|
948
267
|
}
|
949
268
|
async componentWillRender() {
|
950
269
|
if (this.messagesBuilder == undefined) {
|
951
|
-
const application = ApplicationContext.getContextValue(
|
270
|
+
const application = ApplicationContext.getContextValue('__SNK__APPLICATION__');
|
952
271
|
this.messagesBuilder = application.messagesBuilder;
|
953
272
|
}
|
954
273
|
}
|
955
|
-
componentWillLoad() {
|
956
|
-
this.
|
957
|
-
|
958
|
-
componentDidLoad() {
|
959
|
-
const dataInfo = { dataUnit: this.dataUnit };
|
960
|
-
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
274
|
+
async componentWillLoad() {
|
275
|
+
this.loadFormConfig();
|
276
|
+
await this.initializeUserConfig();
|
961
277
|
}
|
962
278
|
render() {
|
963
|
-
|
964
|
-
return (h(Host, null, h("div", { class: "ez-row ez-padding--medium" }, h("div", { class: "ez-col ez-col--sd-7 ez-col--tb-9 ez-align--middle" }, h("ez-button", { mode: "icon", title: this.getMessage("snkFormConfig.goBackTitle"), iconName: "arrow_back", class: "ez-padding--small", size: "small", onClick: () => this.closeFormConfig(), id: "formConfigToBack" }), h("h1", { class: "ez-title ez-title--primary ez-title--extra-large ez-padding--small" }, this.getMessage("snkFormConfig.title")), this._formConfigOptions &&
|
965
|
-
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) => {
|
966
|
-
return { value: option.origin, label: option.name };
|
967
|
-
}), onEzAction: (evt) => this.controlSelectFormConfig(evt), id: "selectConfig" })), 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 &&
|
968
|
-
h("div", { class: "ez-row ez-align--middle ez-align--right" }, h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeConfig() }), h("ez-button", { label: "Salvar", class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.saveConfig() }, h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "save" }))), this._optionFormConfigChanged === true &&
|
969
|
-
h("div", { class: "ez-row ez-align--middle ez-align--right" }, h("ez-button", { label: "Cancelar", class: "ez-padding-left--medium", size: "small", onClick: () => this.cancelChangeOptionConfig() }), h("ez-button", { label: this.getMessage("snkFormConfig.applyConfig"), class: "ez-button--primary ez-padding-left--medium", size: "small", onClick: () => this.applyOptionConfig() })))), h("div", { class: "ez-row ez-padding--medium", ref: ref => this._sortableContainer = ref }, 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 &&
|
970
|
-
h("section", { class: "ez-box__container", ref: ref => this._formContainer = ref }, 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) => h("div", { id: "tab" + indexTab, "data-draggable-parent": "group", class: this._tabSelected === indexTab
|
971
|
-
? "form-config__tab-content ez-flex ez-flex--column ez-size-width--full ez-padding--medium"
|
972
|
-
: "form-config__hide-content" }, tab.groups.map((group, indexGroup) => {
|
973
|
-
if (group.group) {
|
974
|
-
if (this._currentGroupBoxes[tab.tab] == undefined) {
|
975
|
-
this._currentGroupBoxes[tab.tab] = [];
|
976
|
-
}
|
977
|
-
return 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));
|
978
|
-
}
|
979
|
-
else {
|
980
|
-
return h("div", { class: "ez-flex ez-flex--column ez-size-width--full" }, h("label", { class: "ez-text ez-text--secondary ez-margin-vertical--small" }, this.getMessage("snkFormConfig.form.subTitleInfo")), h("div", { id: CONTAINER_ID.withoutGroup, class: "ez-row", "data-draggable-parent": "field" }, this.getFieldsByGroup(group)), h("hr", { class: "ez-divider-horizontal ez-margin-vertical--medium" }));
|
981
|
-
}
|
982
|
-
}), this.renderTempGroupByTab(tab.tab))), h("div", { class: "form-config__btn-add-group ez-row" }, h("div", { class: "form-config__btn-add-group-container ez-col ez-col--sd-12 ez-col--tb-12 ez-align--center" }, h("ez-button", { label: this.getMessage("snkFormConfig.form.labelNewGroup"), class: "ez-padding-horizontal--small ez-button--primary", size: "small", onClick: () => this.addNewGroup() }, h("ez-icon", { class: "ez-margin-right--small", slot: "leftIcon", iconName: "plus" })))))), h("div", { class: "form-config__fields-available ez-col ez-col--sd-3 ez-col--tb-3" }, h("section", { class: "ez-box__container ez-col ez-col--pn-12" }, h("h1", { class: "ez-title ez-title--large ez-title--primary ez-padding-bottom--medium" }, this.getMessage("snkFormConfig.availableFields.title")), h("ez-filter-input", { id: "searchFields", ref: ref => this._filterFieldsAvailable = ref, label: this.getMessage("snkFormConfig.availableFields.labelSearchField"), onEzChange: evt => this.onFilterChange(evt.detail) }), 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 &&
|
983
|
-
h("div", { id: CONTAINER_ID.fieldsAvailable, class: "ez-row", "data-draggable-parent": "field" }, this.orderFieldsAvailable(this._fieldsAvailable).map((field) => h("div", { key: field.name, class: this._fieldsAvailableStyle, "data-draggable-element": "field", onMouseDown: (evt) => this.controlMoveField(evt) }, h("snk-field-config", { messagesBuilder: this.messagesBuilder, onEzClickIcon: (evt) => { this.handleFieldConfigChange(evt); }, dataUnit: this.dataUnit, fieldConfig: field, id: field.name })))))))));
|
279
|
+
return (h(Host, null, h("config-header", { configOptions: this.configOptions, selectedConfig: this.configSelected, messagesBuilder: this.messagesBuilder, hasChanges: this.hasChanges, optionConfigChanged: this.optionConfigChanged, onConfigClose: () => this.configClose.emit(), onSaveConfig: async () => await this.handleSaveConfig() }), h("div", { class: "ez-padding--medium" }, h("div", { class: "ez-flex sidebarNavigator__container" }, h("guides-configurator", { messagesBuilder: this.messagesBuilder, guidesList: this.guidesList, selectedGuide: this.selectedGuide, onGuideSelected: this.handleSelectGuide.bind(this), onGuideListChanged: this.handleGuideListChanged.bind(this), onCreateNewGuide: this.handleCreateNewGuide.bind(this), onGuideDeleted: this.handleGuideDeleted.bind(this) }), h("fields-layout", { ref: ref => this.refFieldsLayout = ref, selectedGuide: this.selectedGuide, guideNames: this.getGuideNames(), groupsList: this.groupsList, messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, onGuideRenamed: this.handleGuideRenamed.bind(this), onLayoutChanged: this.handleLayoutChanged.bind(this), onSetFieldListAsAvailable: this.handleSetFieldListAsAvailable.bind(this) }), h("fields-selector", { dataUnit: this.dataUnit, availableFields: this.availableFields, onFieldListChanged: this.handleAvailableFieldListChanged.bind(this) })))));
|
984
280
|
}
|
985
281
|
static get is() { return "snk-form-config"; }
|
986
282
|
static get encapsulation() { return "scoped"; }
|
@@ -1036,6 +332,23 @@ export class SnkFormConfig {
|
|
1036
332
|
"text": "Campos de configura\u00E7\u00E3o de formul\u00E1rio."
|
1037
333
|
}
|
1038
334
|
},
|
335
|
+
"ignoreReadOnlyFormFields": {
|
336
|
+
"type": "boolean",
|
337
|
+
"mutable": false,
|
338
|
+
"complexType": {
|
339
|
+
"original": "boolean",
|
340
|
+
"resolved": "boolean",
|
341
|
+
"references": {}
|
342
|
+
},
|
343
|
+
"required": false,
|
344
|
+
"optional": true,
|
345
|
+
"docs": {
|
346
|
+
"tags": [],
|
347
|
+
"text": "Ignora os campos \"somente leitura\" no modo de inser\u00E7\u00E3o."
|
348
|
+
},
|
349
|
+
"attribute": "ignore-read-only-form-fields",
|
350
|
+
"reflect": false
|
351
|
+
},
|
1039
352
|
"messagesBuilder": {
|
1040
353
|
"type": "unknown",
|
1041
354
|
"mutable": true,
|
@@ -1060,19 +373,35 @@ export class SnkFormConfig {
|
|
1060
373
|
}
|
1061
374
|
static get states() {
|
1062
375
|
return {
|
1063
|
-
"
|
1064
|
-
"
|
1065
|
-
"
|
1066
|
-
"
|
376
|
+
"availableFields": {},
|
377
|
+
"guidesList": {},
|
378
|
+
"groupsList": {},
|
379
|
+
"selectedGuide": {},
|
1067
380
|
"_formConfig": {},
|
1068
|
-
"
|
1069
|
-
"
|
1070
|
-
"
|
1071
|
-
"
|
381
|
+
"configOptions": {},
|
382
|
+
"originalConfigSelected": {},
|
383
|
+
"configSelected": {},
|
384
|
+
"hasChanges": {},
|
385
|
+
"optionConfigChanged": {}
|
1072
386
|
};
|
1073
387
|
}
|
1074
388
|
static get events() {
|
1075
389
|
return [{
|
390
|
+
"method": "configClose",
|
391
|
+
"name": "configClose",
|
392
|
+
"bubbles": true,
|
393
|
+
"cancelable": true,
|
394
|
+
"composed": true,
|
395
|
+
"docs": {
|
396
|
+
"tags": [],
|
397
|
+
"text": "Emitido ao fechar as configura\u00E7\u00F5es."
|
398
|
+
},
|
399
|
+
"complexType": {
|
400
|
+
"original": "void",
|
401
|
+
"resolved": "void",
|
402
|
+
"references": {}
|
403
|
+
}
|
404
|
+
}, {
|
1076
405
|
"method": "configChange",
|
1077
406
|
"name": "configChange",
|
1078
407
|
"bubbles": true,
|
@@ -1092,28 +421,48 @@ export class SnkFormConfig {
|
|
1092
421
|
}
|
1093
422
|
}
|
1094
423
|
}
|
1095
|
-
}, {
|
1096
|
-
"method": "configClose",
|
1097
|
-
"name": "configClose",
|
1098
|
-
"bubbles": true,
|
1099
|
-
"cancelable": true,
|
1100
|
-
"composed": true,
|
1101
|
-
"docs": {
|
1102
|
-
"tags": [],
|
1103
|
-
"text": "Emitido ao fechar as configura\u00E7\u00F5es."
|
1104
|
-
},
|
1105
|
-
"complexType": {
|
1106
|
-
"original": "void",
|
1107
|
-
"resolved": "void",
|
1108
|
-
"references": {}
|
1109
|
-
}
|
1110
424
|
}];
|
1111
425
|
}
|
1112
|
-
static get elementRef() { return "_element"; }
|
1113
426
|
static get watchers() {
|
1114
427
|
return [{
|
428
|
+
"propName": "selectedGuide",
|
429
|
+
"methodName": "observeSelectedGuide"
|
430
|
+
}, {
|
1115
431
|
"propName": "configManager",
|
1116
432
|
"methodName": "observeConfigManager"
|
1117
433
|
}];
|
1118
434
|
}
|
435
|
+
static get listeners() {
|
436
|
+
return [{
|
437
|
+
"name": "fieldConfigChanged",
|
438
|
+
"method": "handleFieldConfigChanged",
|
439
|
+
"target": "body",
|
440
|
+
"capture": false,
|
441
|
+
"passive": false
|
442
|
+
}, {
|
443
|
+
"name": "formConfigOptionSelected",
|
444
|
+
"method": "handleFormConfigOptionSelected",
|
445
|
+
"target": "body",
|
446
|
+
"capture": false,
|
447
|
+
"passive": false
|
448
|
+
}, {
|
449
|
+
"name": "addFieldToGuide",
|
450
|
+
"method": "handleAddFieldToGuide",
|
451
|
+
"target": "body",
|
452
|
+
"capture": false,
|
453
|
+
"passive": false
|
454
|
+
}, {
|
455
|
+
"name": "setFieldAsAvailable",
|
456
|
+
"method": "handleSetFieldAsAvailable",
|
457
|
+
"target": "body",
|
458
|
+
"capture": false,
|
459
|
+
"passive": false
|
460
|
+
}, {
|
461
|
+
"name": "removeFieldFromAvailable",
|
462
|
+
"method": "handleRemoveFieldFromAvailable",
|
463
|
+
"target": "body",
|
464
|
+
"capture": false,
|
465
|
+
"passive": false
|
466
|
+
}];
|
467
|
+
}
|
1119
468
|
}
|