@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-65214.0 → 0.0.0-bugfix-dev-kb-67792.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-e49214c6.js → ConfigStorage-0a690675.js} +0 -1
- package/dist/cjs/{SnkFormConfigManager-beebf47a.js → SnkFormConfigManager-d6d5db6d.js} +7 -8
- package/dist/cjs/{SnkMessageBuilder-cceebbae.js → SnkMessageBuilder-96b0f549.js} +13 -9
- package/dist/cjs/{IExporterProvider-10b7fed5.js → SnkMultiSelectionListDataSource-f79d220c.js} +4 -94
- package/dist/cjs/{index-1dfc7a6e.js → index-0922807b.js} +0 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{dataunit-fetcher-d4873076.js → pesquisa-fetcher-cba1b3d0.js} +180 -87
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +3 -5
- package/dist/cjs/snk-application.cjs.entry.js +12 -35
- package/dist/cjs/snk-attach.cjs.entry.js +46 -71
- package/dist/cjs/snk-crud.cjs.entry.js +10 -101
- package/dist/cjs/snk-data-exporter.cjs.entry.js +85 -315
- package/dist/cjs/snk-data-unit-559ac55c.js +462 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +2 -12
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -50
- package/dist/cjs/snk-filter-bar.cjs.entry.js +12 -7
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +0 -67
- package/dist/cjs/snk-form.cjs.entry.js +7 -52
- package/dist/cjs/snk-grid.cjs.entry.js +110 -167
- package/dist/cjs/{snk-guides-viewer-aafc3073.js → snk-guides-viewer-bfcad2d6.js} +10 -43
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -9
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +40 -268
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -4
- package/dist/cjs/{taskbar-elements-9ad1f9c0.js → taskbar-elements-3ecd1278.js} +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/snk-application/snk-application.js +11 -35
- package/dist/collection/components/snk-attach/snk-attach.js +44 -67
- package/dist/collection/components/snk-crud/snk-crud.js +7 -305
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +2 -136
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +0 -161
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +7 -134
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +1 -54
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +52 -59
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +0 -62
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +219 -540
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +11 -23
- package/dist/collection/components/snk-form/snk-form.js +5 -102
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +6 -7
- package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
- package/dist/collection/components/snk-grid/snk-grid.css +0 -2
- package/dist/collection/components/snk-grid/snk-grid.js +102 -241
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +20 -406
- package/dist/collection/components/snk-taskbar/elements/taskbar-elements.js +2 -2
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +1 -2
- package/dist/collection/lib/@types/index.js +0 -5
- package/dist/collection/lib/configs/ConfigStorage.js +0 -1
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +3 -7
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.js +0 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.js +0 -4
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.js +13 -11
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +4 -53
- package/dist/collection/lib/http/data-fetcher/fetchers/fetchDataExporter/index.js +34 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +4 -4
- package/dist/collection/lib/message/SnkMessageBuilder.js +12 -5
- package/dist/collection/lib/message/resources/snk-data-exporter.msg.js +0 -2
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -2
- package/dist/components/ConfigStorage.js +0 -1
- package/dist/components/SnkFormConfigManager.js +6 -7
- package/dist/components/SnkMessageBuilder.js +13 -9
- package/dist/components/dataunit-fetcher.js +182 -84
- package/dist/components/{IExporterProvider.js → field-search.js} +6 -93
- package/dist/components/index2.js +33 -198
- package/dist/components/index3.js +199 -0
- package/dist/components/snk-actions-button2.js +11 -4
- package/dist/components/snk-application2.js +9 -31
- package/dist/components/snk-attach2.js +41 -65
- package/dist/components/snk-crud.js +11 -110
- package/dist/components/snk-data-exporter2.js +85 -309
- package/dist/components/snk-data-unit2.js +217 -487
- package/dist/components/snk-detail-view2.js +14 -96
- package/dist/components/snk-expression-item2.js +1 -1
- package/dist/components/snk-filter-bar2.js +11 -7
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-form-view2.js +1 -72
- package/dist/components/snk-form.js +6 -53
- package/dist/components/snk-grid2.js +108 -170
- package/dist/components/snk-personalized-filter2.js +1 -1
- package/dist/components/snk-simple-crud2.js +25 -263
- package/dist/components/snk-taskbar2.js +5 -6
- package/dist/esm/{ConfigStorage-e476378d.js → ConfigStorage-8c2ddac8.js} +0 -1
- package/dist/esm/{SnkFormConfigManager-298cd647.js → SnkFormConfigManager-c01b9d9d.js} +7 -8
- package/dist/esm/{SnkMessageBuilder-ae87b754.js → SnkMessageBuilder-72423074.js} +13 -9
- package/dist/esm/{IExporterProvider-d597f27d.js → SnkMultiSelectionListDataSource-a4805051.js} +5 -93
- package/dist/esm/{index-3aa4977a.js → index-0ece87a6.js} +1 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{dataunit-fetcher-3d2ec959.js → pesquisa-fetcher-34a8b8be.js} +181 -83
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +3 -5
- package/dist/esm/snk-application.entry.js +11 -34
- package/dist/esm/snk-attach.entry.js +41 -66
- package/dist/esm/snk-crud.entry.js +10 -101
- package/dist/esm/snk-data-exporter.entry.js +86 -316
- package/dist/esm/snk-data-unit-44215df7.js +460 -0
- package/dist/esm/snk-data-unit.entry.js +2 -12
- package/dist/esm/snk-detail-view.entry.js +10 -50
- package/dist/esm/snk-filter-bar.entry.js +12 -7
- package/dist/esm/snk-filter-modal-item.entry.js +1 -1
- package/dist/esm/snk-form-config.entry.js +1 -1
- package/dist/esm/snk-form-view.entry.js +0 -67
- package/dist/esm/snk-form.entry.js +7 -52
- package/dist/esm/snk-grid.entry.js +108 -165
- package/dist/esm/{snk-guides-viewer-62124f3d.js → snk-guides-viewer-edeac29f.js} +10 -43
- package/dist/esm/snk-guides-viewer.entry.js +7 -9
- package/dist/esm/snk-personalized-filter.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +28 -256
- package/dist/esm/snk-taskbar.entry.js +3 -4
- package/dist/esm/{taskbar-elements-d59867f1.js → taskbar-elements-2473c8ac.js} +3 -3
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +1 -0
- package/dist/sankhyablocks/p-176c3491.entry.js +1 -0
- package/dist/sankhyablocks/p-37e5d563.js +65 -0
- package/dist/sankhyablocks/p-38289a55.js +1 -0
- package/dist/sankhyablocks/{p-9dfda04a.entry.js → p-41c2c191.entry.js} +1 -1
- package/dist/sankhyablocks/p-46e55a95.entry.js +1 -0
- package/dist/sankhyablocks/p-4e728357.entry.js +1 -0
- package/dist/sankhyablocks/p-5571bdfe.js +1 -0
- package/dist/sankhyablocks/p-5630574e.js +1 -0
- package/dist/sankhyablocks/p-5f8c0426.entry.js +1 -0
- package/dist/sankhyablocks/p-80c64add.entry.js +1 -0
- package/dist/sankhyablocks/p-86af4cc2.js +1 -0
- package/dist/sankhyablocks/p-8b690717.js +1 -0
- package/dist/sankhyablocks/{p-3287a6cc.js → p-96621231.js} +1 -1
- package/dist/sankhyablocks/p-a1832166.entry.js +1 -0
- package/dist/sankhyablocks/p-a809d944.entry.js +1 -0
- package/dist/sankhyablocks/p-a97226f6.entry.js +1 -0
- package/dist/sankhyablocks/p-add17f6a.entry.js +1 -0
- package/dist/sankhyablocks/{p-7e7a7473.js → p-ae4fc9a9.js} +1 -1
- package/dist/sankhyablocks/{p-bd008859.entry.js → p-c2ae0fab.entry.js} +1 -1
- package/dist/sankhyablocks/p-c5a9a5d9.entry.js +1 -0
- package/dist/sankhyablocks/p-c5aa7d70.entry.js +11 -0
- package/dist/sankhyablocks/p-cb0147ab.entry.js +1 -0
- package/dist/sankhyablocks/p-f0145e3b.js +1 -0
- package/dist/sankhyablocks/p-f03e4199.entry.js +1 -0
- package/dist/sankhyablocks/p-f607db63.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +3 -7
- package/dist/types/components/snk-attach/snk-attach.d.ts +9 -11
- package/dist/types/components/snk-crud/snk-crud.d.ts +1 -45
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.d.ts +0 -23
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +3 -28
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +0 -24
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +4 -24
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +1 -4
- package/dist/types/components/snk-data-exporter/structure/ItemBuilder.d.ts +0 -21
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +3 -67
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +1 -4
- package/dist/types/components/snk-form/snk-form.d.ts +0 -14
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
- package/dist/types/components/snk-grid/snk-grid.d.ts +6 -46
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -62
- package/dist/types/components/snk-taskbar/elements/taskbar-elements.d.ts +1 -1
- package/dist/types/components.d.ts +4 -261
- package/dist/types/lib/@types/index.d.ts +0 -5
- package/dist/types/lib/dataUnit/InMemoryLoader.d.ts +1 -2
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/DataUnitDataLoader.d.ts +1 -2
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/ArrayRepository.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/cache/PreloadManager.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/index.d.ts +3 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +0 -3
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IFetchDataExporterParams.d.ts +1 -2
- package/dist/types/lib/http/data-fetcher/fetchers/pesquisa-fetcher.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/RecordIDUtils-3735135c.js +0 -43
- package/dist/cjs/pesquisa-fetcher-a1d0353f.js +0 -166
- package/dist/cjs/snk-data-unit-f0221097.js +0 -690
- package/dist/collection/components/snk-crud/interfaces/PropsCustomEditor.js +0 -1
- package/dist/collection/components/snk-crud/interfaces/PropsCustomRender.js +0 -1
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.js +0 -97
- package/dist/collection/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.js +0 -74
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterStrategy.js +0 -1
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +0 -58
- package/dist/collection/components/snk-data-exporter/providers/ServerSideExporterProvider.js +0 -55
- package/dist/collection/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.js +0 -88
- package/dist/collection/components/snk-data-exporter/utils/ParserExport.js +0 -20
- package/dist/collection/components/snk-data-exporter/utils/RecordIDUtils.js +0 -38
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +0 -24
- package/dist/collection/components/snk-data-unit/test/resources/parentMetadataMock.js +0 -18
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +0 -35
- package/dist/collection/lib/dataUnit/ValueFormatter.js +0 -4
- package/dist/collection/lib/dataUnit/interfaces/InMemoryLoaderConfig.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +0 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +0 -22
- package/dist/components/ISave.js +0 -47
- package/dist/components/pesquisa-fetcher.js +0 -164
- package/dist/esm/RecordIDUtils-87d02110.js +0 -41
- package/dist/esm/pesquisa-fetcher-a87445a0.js +0 -164
- package/dist/esm/snk-data-unit-1ef94aef.js +0 -688
- package/dist/sankhyablocks/p-091ce761.js +0 -60
- package/dist/sankhyablocks/p-0c68f40f.entry.js +0 -1
- package/dist/sankhyablocks/p-162b9a59.entry.js +0 -11
- package/dist/sankhyablocks/p-1db45d26.entry.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-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-52a6a293.entry.js +0 -1
- package/dist/sankhyablocks/p-5f016aed.js +0 -1
- package/dist/sankhyablocks/p-62f34e6f.entry.js +0 -1
- package/dist/sankhyablocks/p-684a2590.entry.js +0 -1
- package/dist/sankhyablocks/p-70001ac1.js +0 -1
- package/dist/sankhyablocks/p-74c665d5.entry.js +0 -1
- package/dist/sankhyablocks/p-76a65660.js +0 -1
- package/dist/sankhyablocks/p-7c4aabe2.js +0 -1
- package/dist/sankhyablocks/p-8c1ff936.entry.js +0 -1
- package/dist/sankhyablocks/p-939e15d3.entry.js +0 -1
- package/dist/sankhyablocks/p-9863d682.js +0 -1
- package/dist/sankhyablocks/p-c273d6ee.js +0 -1
- package/dist/sankhyablocks/p-d65d98ed.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
- package/dist/types/components/snk-crud/interfaces/PropsCustomEditor.d.ts +0 -4
- package/dist/types/components/snk-crud/interfaces/PropsCustomRender.d.ts +0 -4
- package/dist/types/components/snk-data-exporter/exporter-strategy/ClientSideExporterStrategy.d.ts +0 -14
- package/dist/types/components/snk-data-exporter/exporter-strategy/ServerSideExporterStrategy.d.ts +0 -12
- package/dist/types/components/snk-data-exporter/interfaces/IExporterStrategy.d.ts +0 -5
- package/dist/types/components/snk-data-exporter/providers/ClientSideExporterProvider.d.ts +0 -17
- package/dist/types/components/snk-data-exporter/providers/ServerSideExporterProvider.d.ts +0 -17
- package/dist/types/components/snk-data-exporter/test/resources/ClientSideExporterStrategyResources.d.ts +0 -77
- package/dist/types/components/snk-data-exporter/utils/ParserExport.d.ts +0 -4
- package/dist/types/components/snk-data-exporter/utils/RecordIDUtils.d.ts +0 -3
- package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +0 -3
- package/dist/types/components/snk-data-unit/test/resources/parentMetadataMock.d.ts +0 -3
- package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +0 -11
- package/dist/types/lib/dataUnit/ValueFormatter.d.ts +0 -2
- package/dist/types/lib/dataUnit/interfaces/InMemoryLoaderConfig.d.ts +0 -3
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +0 -10
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +0 -7
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +0 -20
|
@@ -3,18 +3,17 @@ import { Action, ElementIDUtils } from '@sankhyalabs/core';
|
|
|
3
3
|
import { S as SnkFormConfigManager } from './SnkFormConfigManager.js';
|
|
4
4
|
import { buildFormMetadata, FormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
|
5
5
|
import './DataFetcher.js';
|
|
6
|
-
import './
|
|
7
|
-
import { P as PresentationMode } from './
|
|
6
|
+
import './dataunit-fetcher.js';
|
|
7
|
+
import { P as PresentationMode } from './index2.js';
|
|
8
|
+
import { d as defineCustomElement$u } from './snk-actions-button2.js';
|
|
8
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
9
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
10
|
-
import './dataunit-fetcher.js';
|
|
11
11
|
import './filter-item-type.enum.js';
|
|
12
12
|
import './form-config-fetcher.js';
|
|
13
13
|
import { T as TaskbarElement, d as defineCustomElement$3 } from './snk-taskbar2.js';
|
|
14
14
|
import { V as VIEW_MODE } from './constants.js';
|
|
15
|
-
import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './
|
|
15
|
+
import { o as openFieldSearch, T as TaskbarProcessor, b as buildFieldSearch } from './field-search.js';
|
|
16
16
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
17
|
-
import { d as defineCustomElement$u } from './snk-actions-button2.js';
|
|
18
17
|
import { d as defineCustomElement$t } from './snk-attach2.js';
|
|
19
18
|
import { d as defineCustomElement$s } from './snk-config-options2.js';
|
|
20
19
|
import { d as defineCustomElement$r } from './snk-configurator2.js';
|
|
@@ -70,16 +69,12 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
70
69
|
this.resourceID = undefined;
|
|
71
70
|
this.detailTaskbarCustomContainerId = undefined;
|
|
72
71
|
this.formLegacyConfigName = undefined;
|
|
73
|
-
this.getCustomTitle = undefined;
|
|
74
72
|
this._hasToCreateFieldSearch = true;
|
|
75
73
|
this._breadcrumbItems = [];
|
|
76
74
|
this._guides = undefined;
|
|
77
75
|
this._formEditorConfigManager = undefined;
|
|
78
76
|
this._formEditorDataUnit = undefined;
|
|
79
77
|
this._fieldToGetFocus = undefined;
|
|
80
|
-
this._customEditors = undefined;
|
|
81
|
-
this._customRenders = undefined;
|
|
82
|
-
this._fieldsProps = {};
|
|
83
78
|
}
|
|
84
79
|
observeDataUnit() {
|
|
85
80
|
this.loadGuides(true);
|
|
@@ -110,28 +105,6 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
110
105
|
async findField() {
|
|
111
106
|
await openFieldSearch(this._moreOptions, this._fieldSearch);
|
|
112
107
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
115
|
-
*/
|
|
116
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
117
|
-
this._customEditors = Object.assign(Object.assign({}, this._customEditors), { [fieldName]: customEditor });
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Registra um render customizado para colunas da grid.
|
|
121
|
-
*/
|
|
122
|
-
async addGridCustomRender(fieldName, customRender) {
|
|
123
|
-
this._customRenders = Object.assign(Object.assign({}, this._customRenders), { [fieldName]: customRender });
|
|
124
|
-
}
|
|
125
|
-
;
|
|
126
|
-
/**
|
|
127
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
128
|
-
*/
|
|
129
|
-
async setFieldProp(fieldName, propName, value) {
|
|
130
|
-
const newFieldsProps = {
|
|
131
|
-
[fieldName]: Object.assign(Object.assign({}, this._fieldsProps[fieldName]), { [propName]: value })
|
|
132
|
-
};
|
|
133
|
-
this._fieldsProps = Object.assign(Object.assign({}, this._fieldsProps), newFieldsProps);
|
|
134
|
-
}
|
|
135
108
|
/**
|
|
136
109
|
* Atribui o foco para o componente.
|
|
137
110
|
*/
|
|
@@ -157,7 +130,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
157
130
|
}
|
|
158
131
|
onContentCardChanged(evt) {
|
|
159
132
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
|
|
160
|
-
.then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
|
|
133
|
+
.then(() => this.masterFormConfig = this._configManager.getConfig(this.dataState.insertionMode, this.dataUnit));
|
|
161
134
|
}
|
|
162
135
|
/**
|
|
163
136
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
@@ -280,7 +253,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
280
253
|
if (sheet == undefined) {
|
|
281
254
|
return;
|
|
282
255
|
}
|
|
283
|
-
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); }
|
|
256
|
+
return h("snk-form-view", { levelPath: params.levelPath, label: sheet.label, name: formName, fields: sheet.fields, formMetadata: params.formMetadata, dataUnit: params.dataUnit, recordsValidator: params.recordsValidator, contracted: (cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.presentation) === "CONTRACTED", fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_b = (_a = params.formConfig) === null || _a === void 0 ? void 0 : _a.summary) === null || _b === void 0 ? void 0 : _b.get(formName), fieldToFocus: params.fieldToFocus, key: formName, onSnkRequestClearFieldToFocus: _ => { var _a; return (_a = params.onRequestClearFieldToFocus) === null || _a === void 0 ? void 0 : _a.call(params); } });
|
|
284
257
|
})));
|
|
285
258
|
}
|
|
286
259
|
wrapDetail(levels, content) {
|
|
@@ -322,14 +295,14 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
322
295
|
else {
|
|
323
296
|
detailBranch = this.selectedGuide;
|
|
324
297
|
}
|
|
325
|
-
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId
|
|
298
|
+
content = this.wrapDetail(levels, h("snk-detail-view", { ref: (ref) => this._currentDetail = ref, dataUnitName: this.getDataUnitName(levels, childEntityName), onSnkDetailGuidesChange: (evt) => this.updateGuide(evt.detail), entityName: childEntityName, selectedForm: formName, branchGuide: detailBranch, guideItemPath: this._breadcrumbItems, key: `detail${detailId}`, canEdit: this.canEdit, onSnkSwitchGuide: evt => this._guideNavigator.selectGuide(evt.detail), resourceID: this.resourceID, taskbarCustomContainerId: this.detailTaskbarCustomContainerId }));
|
|
326
299
|
}
|
|
327
300
|
else {
|
|
328
301
|
const cardId = this.selectedGuide.id;
|
|
329
302
|
const sheet = this._masterFormMetadata.getSheet(cardId);
|
|
330
303
|
if (sheet) {
|
|
331
304
|
const cardConfig = (_c = (_b = this.masterFormConfig) === null || _b === void 0 ? void 0 : _b.cardsState) === null || _c === void 0 ? void 0 : _c.get(cardId);
|
|
332
|
-
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler()
|
|
305
|
+
content = h("snk-form-view", { ref: ref => this._mainForm = ref, fixed: cardConfig === null || cardConfig === void 0 ? void 0 : cardConfig.fixed, summaryFields: (_e = (_d = this.masterFormConfig) === null || _d === void 0 ? void 0 : _d.summary) === null || _e === void 0 ? void 0 : _e.get(cardId), name: cardId, label: sheet.label, fields: sheet.fields, dataUnit: this.dataUnit, formMetadata: this._masterFormMetadata, recordsValidator: this.recordsValidator, fieldToFocus: this._fieldToGetFocus, key: guideId, onSnkRequestClearFieldToFocus: _ => this.clearFieldToFocusHandler() }, this.presentationMode == PresentationMode.SECONDARY && this.buildTaskBar());
|
|
333
306
|
}
|
|
334
307
|
}
|
|
335
308
|
return content;
|
|
@@ -508,10 +481,6 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
508
481
|
}
|
|
509
482
|
return "";
|
|
510
483
|
}
|
|
511
|
-
getTitle() {
|
|
512
|
-
var _a, _b;
|
|
513
|
-
return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
|
|
514
|
-
}
|
|
515
484
|
componentDidLoad() {
|
|
516
485
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
517
486
|
}
|
|
@@ -525,7 +494,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
525
494
|
}
|
|
526
495
|
this.loadTaskbarProcessor();
|
|
527
496
|
const showGuides = this._guides && (this._guides.length > 1);
|
|
528
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.
|
|
497
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getMessage("snkCrud.title")), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
529
498
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
530
499
|
h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
|
531
500
|
:
|
|
@@ -536,9 +505,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
536
505
|
dataUnit: this.dataUnit,
|
|
537
506
|
recordsValidator: this.recordsValidator,
|
|
538
507
|
fieldToFocus: this._fieldToGetFocus,
|
|
539
|
-
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
540
|
-
propsCustomEditor: this._customEditors,
|
|
541
|
-
fieldsProps: this._fieldsProps
|
|
508
|
+
onRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this)
|
|
542
509
|
}), this.getContent())), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this.getConfigViewMode(), onConfigSelected: (evt) => this.changeConfigViewMode(evt.detail), messagesBuilder: this.messagesBuilder, onOpenConfig: (evt) => this.openConfig(evt.detail), resourceID: this.resourceID })));
|
|
543
510
|
}
|
|
544
511
|
static get watchers() { return {
|
|
@@ -563,21 +530,14 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
563
530
|
"resourceID": [1, "resource-i-d"],
|
|
564
531
|
"detailTaskbarCustomContainerId": [1, "detail-taskbar-custom-container-id"],
|
|
565
532
|
"formLegacyConfigName": [1, "form-legacy-config-name"],
|
|
566
|
-
"getCustomTitle": [16],
|
|
567
533
|
"_hasToCreateFieldSearch": [32],
|
|
568
534
|
"_breadcrumbItems": [32],
|
|
569
535
|
"_guides": [32],
|
|
570
536
|
"_formEditorConfigManager": [32],
|
|
571
537
|
"_formEditorDataUnit": [32],
|
|
572
538
|
"_fieldToGetFocus": [32],
|
|
573
|
-
"_customEditors": [32],
|
|
574
|
-
"_customRenders": [32],
|
|
575
|
-
"_fieldsProps": [32],
|
|
576
539
|
"showFormConfig": [64],
|
|
577
540
|
"findField": [64],
|
|
578
|
-
"addCustomEditor": [64],
|
|
579
|
-
"addGridCustomRender": [64],
|
|
580
|
-
"setFieldProp": [64],
|
|
581
541
|
"setFocus": [64]
|
|
582
542
|
}, [[2, "actionClick", "onActionClick"], [0, "snkContentCardChanged", "onContentCardChanged"]]]);
|
|
583
543
|
function defineCustomElement$1() {
|
|
@@ -812,8 +772,6 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
812
772
|
this.branchGuide = undefined;
|
|
813
773
|
this.canEdit = true;
|
|
814
774
|
this.taskbarCustomContainerId = undefined;
|
|
815
|
-
this.customEditors = undefined;
|
|
816
|
-
this.customRenders = undefined;
|
|
817
775
|
}
|
|
818
776
|
observeDataUnit(newDataUnit, oldDataUnit) {
|
|
819
777
|
newDataUnit === null || newDataUnit === void 0 ? void 0 : newDataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
@@ -881,38 +839,10 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
881
839
|
this._snkGrid.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
882
840
|
}
|
|
883
841
|
}
|
|
884
|
-
/**
|
|
885
|
-
* Registra um editor customizado para campos da grade e formulário.
|
|
886
|
-
*/
|
|
887
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
888
|
-
var _a;
|
|
889
|
-
const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
|
|
890
|
-
this._snkGrid.addCustomEditor(fieldName, customEditor, detailContext);
|
|
891
|
-
this._snkFormView.addCustomEditor(fieldName, customEditor, detailContext);
|
|
892
|
-
}
|
|
893
|
-
async observerPropsCustomEditor(newValue) {
|
|
894
|
-
for (const fieldName in newValue) {
|
|
895
|
-
await this.addCustomEditor(fieldName, newValue[fieldName]);
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* Registra um render customizado para colunas da grid.
|
|
900
|
-
*/
|
|
901
|
-
async addGridCustomRender(fieldName, customRender) {
|
|
902
|
-
var _a;
|
|
903
|
-
const detailContext = this.normalizeBranchGuideId((_a = this.branchGuide) === null || _a === void 0 ? void 0 : _a.id);
|
|
904
|
-
await this._snkGrid.addGridCustomRender(fieldName, customRender, detailContext);
|
|
905
|
-
}
|
|
906
842
|
onContentCardChanged(evt) {
|
|
907
843
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this.formConfigManager).then(() => forceUpdate(this));
|
|
908
844
|
evt.stopPropagation();
|
|
909
845
|
}
|
|
910
|
-
async observeCustomRenders(newValue) {
|
|
911
|
-
for (const field in newValue) {
|
|
912
|
-
const customRender = newValue[field];
|
|
913
|
-
await this.addGridCustomRender(field, customRender);
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
846
|
updateLabel() {
|
|
917
847
|
const guideItemPathSize = this.guideItemPath ? this.guideItemPath.length : 0;
|
|
918
848
|
if (guideItemPathSize > 0) {
|
|
@@ -944,13 +874,14 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
944
874
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
|
945
875
|
}
|
|
946
876
|
loadMetadata() {
|
|
877
|
+
var _a;
|
|
947
878
|
if (!this.dataUnit) {
|
|
948
879
|
return;
|
|
949
880
|
}
|
|
950
881
|
if (!this.formConfigManager.isLoaded) {
|
|
951
882
|
return;
|
|
952
883
|
}
|
|
953
|
-
const formConfig = this.formConfigManager.getConfig(this.dataUnit);
|
|
884
|
+
const formConfig = this.formConfigManager.getConfig((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.insertionMode, this.dataUnit);
|
|
954
885
|
//this._cardsState = formConfig?.cardsState;
|
|
955
886
|
this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
|
956
887
|
}
|
|
@@ -1014,10 +945,6 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
1014
945
|
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
|
1015
946
|
}
|
|
1016
947
|
}
|
|
1017
|
-
async componentDidLoad() {
|
|
1018
|
-
await this.observerPropsCustomEditor(this.customEditors);
|
|
1019
|
-
await this.observeCustomRenders(this.customRenders);
|
|
1020
|
-
}
|
|
1021
948
|
async dataUnitActionHandler(action) {
|
|
1022
949
|
if (action.type === Action.FIELD_INVALIDATED) {
|
|
1023
950
|
this.addErrorBadgeToBranchGuide();
|
|
@@ -1027,9 +954,6 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
1027
954
|
this.branchGuide = Object.assign(Object.assign({}, this.branchGuide), { badge: 'error' });
|
|
1028
955
|
this.snkDetailGuidesChange.emit(new GuideBuilder(this.branchGuide, this._formMetadata, this.dataUnit));
|
|
1029
956
|
}
|
|
1030
|
-
normalizeBranchGuideId(id) {
|
|
1031
|
-
return id === null || id === void 0 ? void 0 : id.replace(/child\[(.*?)\]/g, '$1').replace(/::/g, '>');
|
|
1032
|
-
}
|
|
1033
957
|
render() {
|
|
1034
958
|
this.updateLabel();
|
|
1035
959
|
//const cardConfig: IFormCardConfig = this._cardsState?.get(this.selectedForm);
|
|
@@ -1037,9 +961,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
1037
961
|
}
|
|
1038
962
|
static get watchers() { return {
|
|
1039
963
|
"dataUnit": ["observeDataUnit"],
|
|
1040
|
-
"dataState": ["observerDataState"]
|
|
1041
|
-
"customEditors": ["observerPropsCustomEditor"],
|
|
1042
|
-
"customRenders": ["observeCustomRenders"]
|
|
964
|
+
"dataState": ["observerDataState"]
|
|
1043
965
|
}; }
|
|
1044
966
|
static get style() { return snkDetailViewCss; }
|
|
1045
967
|
}, [6, "snk-detail-view", {
|
|
@@ -1056,16 +978,12 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
1056
978
|
"branchGuide": [1040],
|
|
1057
979
|
"canEdit": [4, "can-edit"],
|
|
1058
980
|
"taskbarCustomContainerId": [1, "taskbar-custom-container-id"],
|
|
1059
|
-
"customEditors": [16],
|
|
1060
|
-
"customRenders": [16],
|
|
1061
981
|
"_disabledButtons": [32],
|
|
1062
982
|
"_currentView": [32],
|
|
1063
983
|
"attachmentRegisterKey": [32],
|
|
1064
984
|
"changeViewMode": [64],
|
|
1065
985
|
"configGrid": [64],
|
|
1066
|
-
"showUp": [64]
|
|
1067
|
-
"addCustomEditor": [64],
|
|
1068
|
-
"addGridCustomRender": [64]
|
|
986
|
+
"showUp": [64]
|
|
1069
987
|
}, [[0, "snkContentCardChanged", "onContentCardChanged"]]]);
|
|
1070
988
|
SnkDetailView.REGEX_FORM_ID = /__FORM:[^:]+/g;
|
|
1071
989
|
function defineCustomElement() {
|
|
@@ -4,7 +4,7 @@ import { a as SelectedItemType, d as defineCustomElement$2 } from './snk-filter-
|
|
|
4
4
|
import { ApplicationUtils, CheckMode } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
5
5
|
import { fieldBuilder } from '@sankhyalabs/ezui/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder';
|
|
6
6
|
import { a as FilterOperand } from './PersonalizedFilterUtils.js';
|
|
7
|
-
import { s as store } from './
|
|
7
|
+
import { s as store } from './index3.js';
|
|
8
8
|
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
9
9
|
import { d as defineCustomElement$1 } from './snk-filter-param-config2.js';
|
|
10
10
|
|
|
@@ -271,7 +271,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
271
271
|
//campos Hard Fixed não variam a ordem
|
|
272
272
|
if (!item.hardFixed) {
|
|
273
273
|
index += item.fixed ? 100000 : 0;
|
|
274
|
-
index
|
|
274
|
+
index = this.handleValueSortIndex(item, index);
|
|
275
275
|
index += this._updateSequence.lastIndexOf(item.id) + 1;
|
|
276
276
|
}
|
|
277
277
|
return index;
|
|
@@ -288,12 +288,19 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
288
288
|
this.messagesBuilder = undefined;
|
|
289
289
|
this.disablePersonalizedFilter = undefined;
|
|
290
290
|
this.filterBarLegacyConfigName = undefined;
|
|
291
|
-
this.autoLoad = undefined;
|
|
292
291
|
this.allowDefault = undefined;
|
|
293
292
|
this.scrollerLocked = false;
|
|
294
293
|
this.showPersonalizedFilter = false;
|
|
295
294
|
this.personalizedFilterId = undefined;
|
|
296
295
|
}
|
|
296
|
+
handleValueSortIndex(item, index) {
|
|
297
|
+
if (item.value != undefined)
|
|
298
|
+
return (index + 10000);
|
|
299
|
+
if (item.type === FilterItemType.PERSONALIZED && item.visible) {
|
|
300
|
+
index += 10000;
|
|
301
|
+
}
|
|
302
|
+
return index;
|
|
303
|
+
}
|
|
297
304
|
observeFilterConfig(newValue, oldValue) {
|
|
298
305
|
if (ObjectUtils.equals(newValue, oldValue))
|
|
299
306
|
return;
|
|
@@ -435,10 +442,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
435
442
|
}
|
|
436
443
|
async doLoadData(forceReload = false) {
|
|
437
444
|
try {
|
|
438
|
-
if (this._firstLoad &&
|
|
439
|
-
return;
|
|
440
|
-
}
|
|
441
|
-
if (this._firstLoad && !forceReload && this.autoLoad === undefined) {
|
|
445
|
+
if (this._firstLoad && !forceReload) {
|
|
442
446
|
let autoLoad = await this._application.getBooleanParam("global.carregar.registros.iniciar.tela");
|
|
443
447
|
if (!autoLoad) {
|
|
444
448
|
return;
|
|
@@ -589,6 +593,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
589
593
|
.then((filters) => {
|
|
590
594
|
accept();
|
|
591
595
|
this.filterConfig = filters.map(item => this.normalizeItem(item));
|
|
596
|
+
this.filterConfig.sort((a, b) => this._filtersComparator(a, b));
|
|
592
597
|
})
|
|
593
598
|
.catch(reason => {
|
|
594
599
|
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
|
@@ -721,7 +726,6 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
721
726
|
"messagesBuilder": [1040],
|
|
722
727
|
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
|
723
728
|
"filterBarLegacyConfigName": [1, "filter-bar-legacy-config-name"],
|
|
724
|
-
"autoLoad": [4, "auto-load"],
|
|
725
729
|
"allowDefault": [32],
|
|
726
730
|
"scrollerLocked": [32],
|
|
727
731
|
"showPersonalizedFilter": [32],
|
|
@@ -76,7 +76,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
getConfig() {
|
|
79
|
-
let config = this.configManager.getConfig(this.dataUnit);
|
|
79
|
+
let config = this.configManager.getConfig(false, this.dataUnit);
|
|
80
80
|
if (config.fields && config.fields.length === 0) {
|
|
81
81
|
config = undefined;
|
|
82
82
|
}
|
|
@@ -12,8 +12,6 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
12
12
|
this.snkContentCardChanged = createEvent(this, "snkContentCardChanged", 7);
|
|
13
13
|
this.snkRequestClearFieldToFocus = createEvent(this, "snkRequestClearFieldToFocus", 7);
|
|
14
14
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
15
|
-
this._customEditors = new Map();
|
|
16
|
-
this._fieldProps = new Map();
|
|
17
15
|
this.levelPath = undefined;
|
|
18
16
|
this.label = undefined;
|
|
19
17
|
this.name = undefined;
|
|
@@ -27,47 +25,12 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
27
25
|
this.canFix = true;
|
|
28
26
|
this.recordsValidator = undefined;
|
|
29
27
|
this.fieldToFocus = undefined;
|
|
30
|
-
this.customEditors = undefined;
|
|
31
|
-
this.fieldsProps = undefined;
|
|
32
28
|
}
|
|
33
29
|
async showUp() {
|
|
34
30
|
if (this._formView) {
|
|
35
31
|
this._formView.showUp();
|
|
36
32
|
}
|
|
37
33
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Registra um editor customizado para campos da grade e formulário
|
|
40
|
-
*/
|
|
41
|
-
async addCustomEditor(fieldName, customEditor, detailContext) {
|
|
42
|
-
if (this._formView) {
|
|
43
|
-
this._formView.addCustomEditor(fieldName, customEditor, detailContext);
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
47
|
-
newCustomEditors.set(fieldName, { customEditor, detailContext });
|
|
48
|
-
this._customEditors = newCustomEditors;
|
|
49
|
-
}
|
|
50
|
-
observePropsCustomEditor(newValue) {
|
|
51
|
-
for (const fieldName in newValue) {
|
|
52
|
-
this.addCustomEditor(fieldName, newValue[fieldName]);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
57
|
-
*/
|
|
58
|
-
async setFieldProp(fieldName, propName, value) {
|
|
59
|
-
const props = this._fieldProps.get(fieldName) || [];
|
|
60
|
-
this._fieldProps.set(fieldName, [...props, { propName, value }]);
|
|
61
|
-
}
|
|
62
|
-
async observeFieldsProps(newValue) {
|
|
63
|
-
for (const field in newValue) {
|
|
64
|
-
const fieldProps = newValue[field];
|
|
65
|
-
const propNames = Object.keys(fieldProps);
|
|
66
|
-
for (const propName of propNames) {
|
|
67
|
-
await this.setFieldProp(field, propName, fieldProps[propName]);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
34
|
changeFix() {
|
|
72
35
|
this.fixed = !this.fixed;
|
|
73
36
|
this.emitEvent("fixed");
|
|
@@ -126,13 +89,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
126
89
|
this._dataBinder.onDisconnectedCallback();
|
|
127
90
|
}
|
|
128
91
|
}
|
|
129
|
-
componentDidLoad() {
|
|
130
|
-
this.observePropsCustomEditor(this.customEditors);
|
|
131
|
-
this.observeFieldsProps(this.fieldsProps);
|
|
132
|
-
}
|
|
133
92
|
componentDidRender() {
|
|
134
|
-
this.setCustomEditors();
|
|
135
|
-
this.setFieldProps();
|
|
136
93
|
if (this.fieldToFocus == undefined) {
|
|
137
94
|
return;
|
|
138
95
|
}
|
|
@@ -144,26 +101,6 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
144
101
|
this.snkRequestClearFieldToFocus.emit();
|
|
145
102
|
});
|
|
146
103
|
}
|
|
147
|
-
setCustomEditors() {
|
|
148
|
-
if (!this._formView) {
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
for (const [fieldName, customEditorProps] of this._customEditors) {
|
|
152
|
-
this._formView.addCustomEditor(fieldName, customEditorProps.customEditor, customEditorProps.detailContext);
|
|
153
|
-
this._customEditors.delete(fieldName);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
setFieldProps() {
|
|
157
|
-
if (!this._formView) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
for (const [fieldName, propsToChange] of this._fieldProps) {
|
|
161
|
-
propsToChange.forEach(prop => {
|
|
162
|
-
this._formView.setFieldProp(fieldName, prop.propName, prop.value);
|
|
163
|
-
this._fieldProps.delete(fieldName);
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
104
|
render() {
|
|
168
105
|
return (h(Host, { class: "ez-box__container" }, h("div", { class: "summary-header ez-flex ez-size-width--full" }, h("div", { class: "ez-flex ez-text ez-title--primary ez-text--bold ez-flex--justify-start ez-flex--align-items-center ez-col--sd-9" }, this.levelPath ? h("span", { class: "level-path" }, this.levelPath + " /") : undefined, this.label), h("div", { class: "ez-flex ez-flex--justify-end ez-col--sd-3" }, this.canFix &&
|
|
169
106
|
h("ez-button", { class: "ez-padding-left--medium", mode: "icon", size: "small", iconName: this.fixed ? "un-pin" : "push-pin", "data-element-id": ElementIDUtils.getInternalIDInfo("toggleFixed_ezFormCard"), onClick: () => this.changeFix(), title: this.fixed ? "Desafixar" : "Fixar" }), this.canExpand &&
|
|
@@ -173,10 +110,6 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
173
110
|
:
|
|
174
111
|
h("ez-form-view", { ref: ref => this._formView = ref, fields: this.fields, onEzContentReady: evt => this.bindFields(evt.detail), onFormItemsReady: (event) => this.handleFormItemsReady(event) })));
|
|
175
112
|
}
|
|
176
|
-
static get watchers() { return {
|
|
177
|
-
"customEditors": ["observePropsCustomEditor"],
|
|
178
|
-
"fieldsProps": ["observeFieldsProps"]
|
|
179
|
-
}; }
|
|
180
113
|
static get style() { return snkFormViewCss; }
|
|
181
114
|
}, [6, "snk-form-view", {
|
|
182
115
|
"levelPath": [1, "level-path"],
|
|
@@ -192,11 +125,7 @@ const SnkFormView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
192
125
|
"canFix": [4, "can-fix"],
|
|
193
126
|
"recordsValidator": [16],
|
|
194
127
|
"fieldToFocus": [1, "field-to-focus"],
|
|
195
|
-
"
|
|
196
|
-
"fieldsProps": [16],
|
|
197
|
-
"showUp": [64],
|
|
198
|
-
"addCustomEditor": [64],
|
|
199
|
-
"setFieldProp": [64]
|
|
128
|
+
"showUp": [64]
|
|
200
129
|
}]);
|
|
201
130
|
function defineCustomElement() {
|
|
202
131
|
if (typeof customElements === "undefined") {
|
|
@@ -16,7 +16,6 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
16
16
|
this.exit = createEvent(this, "exit", 7);
|
|
17
17
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
18
18
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
19
|
-
this._customEditors = new Map();
|
|
20
19
|
this._dataUnit = undefined;
|
|
21
20
|
this._dataState = undefined;
|
|
22
21
|
this._showFormConfig = false;
|
|
@@ -39,24 +38,6 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
39
38
|
async hideConfig() {
|
|
40
39
|
this._showFormConfig = false;
|
|
41
40
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Registra um editor customizado para campos da grade e formulário.
|
|
44
|
-
*/
|
|
45
|
-
async addCustomEditor(fieldName, customEditor) {
|
|
46
|
-
if (this._form) {
|
|
47
|
-
this._form.addCustomEditor(fieldName, customEditor);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
const newCustomEditors = new Map(this._customEditors);
|
|
51
|
-
newCustomEditors.set(fieldName, customEditor);
|
|
52
|
-
this._customEditors = newCustomEditors;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Altera/adiciona uma propriedade nos metadados do campo.
|
|
56
|
-
*/
|
|
57
|
-
async setFieldProp(fieldName, propName, value) {
|
|
58
|
-
await this._form.setFieldProp(fieldName, propName, value);
|
|
59
|
-
}
|
|
60
41
|
closeConfig() {
|
|
61
42
|
this.hideConfig();
|
|
62
43
|
}
|
|
@@ -64,18 +45,6 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
64
45
|
const dataInfo = { dataUnit: this._dataUnit };
|
|
65
46
|
ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
66
47
|
}
|
|
67
|
-
setCustomEditors() {
|
|
68
|
-
if (!this._form) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
for (const [fieldName, customEditor] of this._customEditors) {
|
|
72
|
-
this._form.addCustomEditor(fieldName, customEditor);
|
|
73
|
-
this._customEditors.delete(fieldName);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
async componentDidRender() {
|
|
77
|
-
this.setCustomEditors();
|
|
78
|
-
}
|
|
79
48
|
async componentWillLoad() {
|
|
80
49
|
let parent = this._element.parentElement;
|
|
81
50
|
while (parent) {
|
|
@@ -91,7 +60,9 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
91
60
|
this._dataUnit = evt.detail;
|
|
92
61
|
});
|
|
93
62
|
}
|
|
94
|
-
this._snkDataUnit.addEventListener("dataStateChange",
|
|
63
|
+
this._snkDataUnit.addEventListener("dataStateChange", (evt) => {
|
|
64
|
+
this._dataState = evt.detail;
|
|
65
|
+
});
|
|
95
66
|
break;
|
|
96
67
|
}
|
|
97
68
|
parent = parent.parentElement;
|
|
@@ -101,23 +72,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
101
72
|
}
|
|
102
73
|
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
|
|
103
74
|
this.addFormLegacyConfig();
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
async handleDataStateChange(evt) {
|
|
107
|
-
var _a;
|
|
108
|
-
this._dataState = evt.detail;
|
|
109
|
-
const fieldsWithRmPrecision = await this._snkDataUnit.getFieldsWithRmPrecision();
|
|
110
|
-
for (const field of fieldsWithRmPrecision || []) {
|
|
111
|
-
if (!field) {
|
|
112
|
-
continue;
|
|
113
|
-
}
|
|
114
|
-
const rmPrecision = (_a = this._dataState.rowMetadata) === null || _a === void 0 ? void 0 : _a.getProp('rm_precision', field);
|
|
115
|
-
if (!rmPrecision && rmPrecision !== 0) {
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
await this.setFieldProp(field, 'precision', rmPrecision);
|
|
119
|
-
await this.setFieldProp(field, 'prettyPrecision', rmPrecision);
|
|
120
|
-
}
|
|
75
|
+
this._configManager.loadConfig();
|
|
121
76
|
}
|
|
122
77
|
addFormLegacyConfig() {
|
|
123
78
|
if (this.formLegacyConfigName) {
|
|
@@ -128,7 +83,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
128
83
|
if (!this._dataUnit || !this._dataState) {
|
|
129
84
|
return undefined;
|
|
130
85
|
}
|
|
131
|
-
return (h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", {
|
|
86
|
+
return (h("section", null, h("div", { class: "ez-row" }, h("div", { class: "ez-col ez-col--sd-12" }, h("ez-form", { key: "ezForm" + this._snkDataUnit.entityName, "data-element-id": "embedded", dataUnit: this._dataUnit, config: this._configManager.getConfig(this._dataState.insertionMode, this._dataUnit), recordsValidator: this.recordsValidator, class: this._showFormConfig ? 'snk-form__form--hidden' : '' }), this._showFormConfig &&
|
|
132
87
|
h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this._dataUnit, configManager: this._configManager, onConfigClose: () => this.closeConfig() })))));
|
|
133
88
|
}
|
|
134
89
|
get _element() { return this; }
|
|
@@ -144,9 +99,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
144
99
|
"_showFormConfig": [32],
|
|
145
100
|
"_configManager": [32],
|
|
146
101
|
"showConfig": [64],
|
|
147
|
-
"hideConfig": [64]
|
|
148
|
-
"addCustomEditor": [64],
|
|
149
|
-
"setFieldProp": [64]
|
|
102
|
+
"hideConfig": [64]
|
|
150
103
|
}]);
|
|
151
104
|
function defineCustomElement$1() {
|
|
152
105
|
if (typeof customElements === "undefined") {
|