@sankhyalabs/sankhyablocks 8.15.0-dev.61 → 8.15.0-dev.62
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-7df9d3bb.js → ConfigStorage-9a53a42c.js} +12 -11
- package/dist/cjs/{form-config-fetcher-3c4daeb5.js → DataFetcher-515bda03.js} +0 -251
- package/dist/cjs/{IExporterProvider-c307e2b1.js → IExporterProvider-d3a3ccd1.js} +55 -12
- package/dist/cjs/{SnkFormConfigManager-4259edbe.js → SnkFormConfigManager-dda10d75.js} +2 -2
- package/dist/cjs/{SnkMessageBuilder-66aa2557.js → SnkMessageBuilder-4a95fe86.js} +6 -12
- package/dist/cjs/{auth-fetcher-e6112be7.js → auth-fetcher-5acb0335.js} +1 -1
- package/dist/cjs/{pesquisa-fetcher-cbdaba63.js → dataunit-fetcher-e2109392.js} +68 -173
- package/dist/cjs/form-config-fetcher-3f430aee.js +256 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-fetcher-916a935c.js +166 -0
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +10 -8
- package/dist/cjs/snk-application.cjs.entry.js +49 -39
- package/dist/cjs/snk-attach.cjs.entry.js +19 -17
- package/dist/cjs/snk-crud.cjs.entry.js +43 -9
- package/dist/cjs/snk-data-exporter.cjs.entry.js +9 -7
- package/dist/cjs/snk-data-unit-dee38ccd.js +614 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +10 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +8 -6
- package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -2
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -2
- package/dist/cjs/snk-form-config.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-view.cjs.entry.js +36 -0
- package/dist/cjs/snk-form.cjs.entry.js +28 -7
- package/dist/cjs/snk-grid.cjs.entry.js +55 -10
- package/dist/cjs/{snk-guides-viewer-b0c44e0c.js → snk-guides-viewer-af4a6ae5.js} +19 -6
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +8 -6
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +96 -14
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/snk-application/snk-application.js +37 -17
- package/dist/collection/components/snk-crud/snk-crud.js +109 -6
- package/dist/collection/components/snk-crud/subcomponents/snk-form-view.js +79 -0
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +41 -4
- package/dist/collection/components/snk-data-exporter/interfaces/IExporterProvider.js +14 -8
- package/dist/collection/components/snk-data-exporter/providers/ClientSideExporterProvider.js +5 -0
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +413 -165
- package/dist/collection/components/snk-data-unit/test/resources/metadataMock.js +24 -0
- package/dist/collection/components/snk-form/snk-form.js +50 -4
- package/dist/collection/components/snk-grid/snk-grid.js +96 -7
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +156 -8
- package/dist/collection/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.js +35 -0
- package/dist/collection/lib/dataUnit/ValueFormatter.js +4 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.js +1 -0
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +51 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.js +22 -0
- package/dist/collection/lib/message/SnkMessageBuilder.js +25 -32
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -0
- package/dist/components/ConfigStorage.js +2 -1
- package/dist/components/DataFetcher.js +7024 -0
- package/dist/components/IExporterProvider.js +54 -12
- package/dist/components/SnkMessageBuilder.js +6 -12
- package/dist/components/dataunit-fetcher.js +58 -164
- package/dist/components/form-config-fetcher.js +3 -7023
- package/dist/components/pesquisa-fetcher.js +164 -0
- package/dist/components/snk-actions-button2.js +4 -2
- package/dist/components/snk-application2.js +26 -17
- package/dist/components/snk-attach2.js +4 -2
- package/dist/components/snk-crud.js +46 -9
- package/dist/components/snk-data-exporter2.js +4 -2
- package/dist/components/snk-data-unit2.js +356 -166
- package/dist/components/snk-detail-view2.js +21 -6
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-form-view2.js +39 -1
- package/dist/components/snk-form.js +26 -5
- package/dist/components/snk-grid2.js +58 -11
- package/dist/components/snk-simple-crud2.js +96 -10
- package/dist/esm/{ConfigStorage-928c3bf4.js → ConfigStorage-174101b9.js} +2 -1
- package/dist/esm/{form-config-fetcher-e3094014.js → DataFetcher-4b4b7beb.js} +1 -250
- package/dist/esm/{IExporterProvider-e2a1195d.js → IExporterProvider-640e1f6b.js} +54 -12
- package/dist/esm/{SnkFormConfigManager-a87ade7a.js → SnkFormConfigManager-87bd8082.js} +2 -2
- package/dist/esm/{SnkMessageBuilder-0a4becdd.js → SnkMessageBuilder-3a767111.js} +6 -12
- package/dist/esm/{auth-fetcher-e1cb288f.js → auth-fetcher-9f86c346.js} +1 -1
- package/dist/esm/{pesquisa-fetcher-6d8e50bb.js → dataunit-fetcher-87ecba4a.js} +57 -163
- package/dist/esm/form-config-fetcher-5d72aaf1.js +253 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-fetcher-9cfab836.js +164 -0
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +5 -3
- package/dist/esm/snk-application.entry.js +30 -20
- package/dist/esm/snk-attach.entry.js +5 -3
- package/dist/esm/snk-crud.entry.js +43 -9
- package/dist/esm/snk-data-exporter.entry.js +6 -4
- package/dist/esm/snk-data-unit-1132e40b.js +612 -0
- package/dist/esm/snk-data-unit.entry.js +10 -2
- package/dist/esm/snk-detail-view.entry.js +8 -6
- package/dist/esm/snk-filter-bar.entry.js +3 -2
- package/dist/esm/snk-filter-modal-item.entry.js +3 -2
- package/dist/esm/snk-form-config.entry.js +2 -1
- package/dist/esm/snk-form-view.entry.js +36 -0
- package/dist/esm/snk-form.entry.js +28 -7
- package/dist/esm/snk-grid.entry.js +56 -11
- package/dist/esm/{snk-guides-viewer-1fd41a25.js → snk-guides-viewer-359e39a7.js} +19 -6
- package/dist/esm/snk-guides-viewer.entry.js +8 -6
- package/dist/esm/snk-personalized-filter.entry.js +3 -2
- package/dist/esm/snk-simple-crud.entry.js +95 -13
- package/dist/sankhyablocks/p-010d475f.js +1 -0
- package/dist/sankhyablocks/p-08fee6e8.js +60 -0
- package/dist/sankhyablocks/p-0bcc6e83.js +1 -0
- package/dist/sankhyablocks/p-2a84e45b.entry.js +1 -0
- package/dist/sankhyablocks/{p-0e8702f0.js → p-2eb90860.js} +1 -1
- package/dist/sankhyablocks/p-33f695d6.entry.js +1 -0
- package/dist/sankhyablocks/p-3519a984.entry.js +1 -0
- package/dist/sankhyablocks/p-4ce73e88.js +1 -0
- package/dist/sankhyablocks/{p-e27496ed.js → p-566f5f50.js} +6 -6
- package/dist/sankhyablocks/p-59dccb7a.entry.js +1 -0
- package/dist/sankhyablocks/p-5c8a9e27.entry.js +1 -0
- package/dist/sankhyablocks/p-66a31d30.entry.js +11 -0
- package/dist/sankhyablocks/p-6b2be902.js +6 -0
- package/dist/sankhyablocks/p-7ecaaea2.entry.js +1 -0
- package/dist/sankhyablocks/p-83950924.entry.js +1 -0
- package/dist/sankhyablocks/p-873d2e6a.entry.js +1 -0
- package/dist/sankhyablocks/p-931343a1.entry.js +1 -0
- package/dist/sankhyablocks/p-a6dfa396.js +1 -0
- package/dist/sankhyablocks/p-aa854fa8.entry.js +1 -0
- package/dist/sankhyablocks/p-b11921ca.entry.js +1 -0
- package/dist/sankhyablocks/p-cb91634d.js +1 -0
- package/dist/sankhyablocks/p-cf9d2d1e.entry.js +1 -0
- package/dist/sankhyablocks/p-d29a252c.js +1 -0
- package/dist/sankhyablocks/p-d799aa7f.entry.js +1 -0
- package/dist/sankhyablocks/p-da6e3dcf.entry.js +1 -0
- package/dist/sankhyablocks/p-e0c27486.js +26 -0
- package/dist/sankhyablocks/p-f72e8835.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +6 -2
- package/dist/types/components/snk-crud/snk-crud.d.ts +14 -1
- package/dist/types/components/snk-crud/subcomponents/snk-form-view.d.ts +13 -1
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +6 -0
- package/dist/types/components/snk-data-exporter/interfaces/IExporterProvider.d.ts +3 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +45 -1
- package/dist/types/components/snk-data-unit/test/resources/metadataMock.d.ts +3 -0
- package/dist/types/components/snk-form/snk-form.d.ts +6 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +19 -3
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +22 -0
- package/dist/types/components.d.ts +68 -4
- package/dist/types/lib/DefaultCustomFormatters/RmPrecisionCustomValueFormatter.d.ts +11 -0
- package/dist/types/lib/dataUnit/ValueFormatter.d.ts +2 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IBuildRequestBodyLoadRowMetadata.d.ts +10 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/interfaces/IRowMetadata.d.ts +7 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.d.ts +6 -0
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/test/resources/metadataMock.d.ts +20 -0
- package/dist/types/lib/http/data-fetcher/fetchers/fetchDataExporter/interfaces/IExporterColumnMetadata.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/snk-data-unit-abd2113f.js +0 -427
- package/dist/esm/snk-data-unit-29eba11a.js +0 -425
- package/dist/sankhyablocks/p-029bfc09.js +0 -1
- package/dist/sankhyablocks/p-03dcc5ff.entry.js +0 -1
- package/dist/sankhyablocks/p-07825198.js +0 -1
- package/dist/sankhyablocks/p-13ea113d.entry.js +0 -1
- package/dist/sankhyablocks/p-314e2d1a.entry.js +0 -1
- package/dist/sankhyablocks/p-32556aa6.js +0 -1
- package/dist/sankhyablocks/p-3357af48.js +0 -1
- package/dist/sankhyablocks/p-3c2a1f4d.js +0 -65
- package/dist/sankhyablocks/p-3e7167dd.js +0 -1
- package/dist/sankhyablocks/p-536eeb16.js +0 -26
- package/dist/sankhyablocks/p-587f9dcf.entry.js +0 -1
- package/dist/sankhyablocks/p-61984566.entry.js +0 -1
- package/dist/sankhyablocks/p-65b6dba3.entry.js +0 -1
- package/dist/sankhyablocks/p-6a7bc5c8.entry.js +0 -1
- package/dist/sankhyablocks/p-6c9edfd8.entry.js +0 -1
- package/dist/sankhyablocks/p-89bde7d3.entry.js +0 -1
- package/dist/sankhyablocks/p-91dceecf.entry.js +0 -1
- package/dist/sankhyablocks/p-a40cbad8.entry.js +0 -1
- package/dist/sankhyablocks/p-b86ea293.entry.js +0 -1
- package/dist/sankhyablocks/p-d8ddb2a4.entry.js +0 -11
- package/dist/sankhyablocks/p-df73ac00.entry.js +0 -1
- package/dist/sankhyablocks/p-f92f1f5f.entry.js +0 -1
- package/dist/sankhyablocks/p-fa84e72f.entry.js +0 -1
@@ -0,0 +1,612 @@
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement, H as Host } from './index-a7d3d3f1.js';
|
2
|
+
import { Action, ObjectUtils, DataUnitAction, ApplicationContext } from '@sankhyalabs/core';
|
3
|
+
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
4
|
+
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder-3a767111.js';
|
5
|
+
import { g as getRecordValue, a as DatasetStrategy } from './dataunit-fetcher-87ecba4a.js';
|
6
|
+
import { g as getSelectedIDs } from './RecordIDUtils-87d02110.js';
|
7
|
+
|
8
|
+
const SnkDataUnit = class {
|
9
|
+
constructor(hostRef) {
|
10
|
+
registerInstance(this, hostRef);
|
11
|
+
this.dataStateChange = createEvent(this, "dataStateChange", 3);
|
12
|
+
this.dataUnitReady = createEvent(this, "dataUnitReady", 3);
|
13
|
+
this.messagesBuilderUpdated = createEvent(this, "messagesBuilderUpdated", 3);
|
14
|
+
this.insertionMode = createEvent(this, "insertionMode", 3);
|
15
|
+
this.cancelEdition = createEvent(this, "cancelEdition", 3);
|
16
|
+
this._onDataUnitResolve = [];
|
17
|
+
this._openedAlert = false;
|
18
|
+
this._fieldsWithRmp = [];
|
19
|
+
this._fieldsWithRmPrecision = [];
|
20
|
+
this._metadataByRow = new Map();
|
21
|
+
this._rowMetadataCache = new Map();
|
22
|
+
this._dataUnitObserver = async (action) => {
|
23
|
+
const duState = this.buildDataState(action.type);
|
24
|
+
this.dataState = duState;
|
25
|
+
this.messagesBuilder.currentOperation = this.getMessageOperation();
|
26
|
+
switch (action.type) {
|
27
|
+
case Action.DATA_SAVED:
|
28
|
+
await this.handleDataSaved(action);
|
29
|
+
break;
|
30
|
+
case Action.RECORDS_ADDED:
|
31
|
+
case Action.RECORDS_COPIED:
|
32
|
+
this.insertionMode.emit();
|
33
|
+
break;
|
34
|
+
case Action.EDITION_CANCELED:
|
35
|
+
this.cancelEdition.emit();
|
36
|
+
break;
|
37
|
+
case Action.RECORDS_REMOVED:
|
38
|
+
this.handleRecordsRemoved(action);
|
39
|
+
break;
|
40
|
+
}
|
41
|
+
};
|
42
|
+
this.dataState = undefined;
|
43
|
+
this.messagesBuilder = undefined;
|
44
|
+
this.dataUnitName = undefined;
|
45
|
+
this.entityName = undefined;
|
46
|
+
this.pageSize = 150;
|
47
|
+
this.dataUnit = undefined;
|
48
|
+
this.beforeSave = undefined;
|
49
|
+
this.afterSave = undefined;
|
50
|
+
this.useCancelConfirm = true;
|
51
|
+
this.ignoreSaveMessage = undefined;
|
52
|
+
this.configName = undefined;
|
53
|
+
this.resourceID = undefined;
|
54
|
+
}
|
55
|
+
observePageSize() {
|
56
|
+
if (this.dataUnit) {
|
57
|
+
this.dataUnit.pageSize = this.pageSize;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
observeDataUnitName(newValue, oldValue) {
|
61
|
+
if (oldValue != newValue) {
|
62
|
+
if (this.dataUnit) {
|
63
|
+
this._application.updateDataunitCache(oldValue, this.dataUnitName, this.dataUnit);
|
64
|
+
}
|
65
|
+
else {
|
66
|
+
this.loadDataUnit();
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
observeEntityName(newValue, oldValue) {
|
71
|
+
if (oldValue != newValue) {
|
72
|
+
this.dataUnit = undefined;
|
73
|
+
this.entityName = newValue;
|
74
|
+
this.loadDataUnit();
|
75
|
+
}
|
76
|
+
}
|
77
|
+
observeDataState(newValue, oldValue) {
|
78
|
+
if (ObjectUtils.objectToString(oldValue) != ObjectUtils.objectToString(newValue)) {
|
79
|
+
this.dataStateChange.emit(newValue);
|
80
|
+
}
|
81
|
+
}
|
82
|
+
observeDataUnit() {
|
83
|
+
this.handlerLinkFields();
|
84
|
+
this.dataUnitReady.emit(this.dataUnit);
|
85
|
+
}
|
86
|
+
observeMessagesBuilder(newValue) {
|
87
|
+
if (newValue) {
|
88
|
+
this.messagesBuilderUpdated.emit(newValue);
|
89
|
+
}
|
90
|
+
}
|
91
|
+
/**
|
92
|
+
* Obtém o dataUnit.
|
93
|
+
*/
|
94
|
+
async getDataUnit() {
|
95
|
+
return new Promise((resolve) => {
|
96
|
+
if (this.dataUnit) {
|
97
|
+
resolve(this.dataUnit);
|
98
|
+
}
|
99
|
+
else {
|
100
|
+
this._onDataUnitResolve.push(resolve);
|
101
|
+
}
|
102
|
+
});
|
103
|
+
}
|
104
|
+
/**
|
105
|
+
* Método que retorna a lista de IDs dos registros selecionados.
|
106
|
+
* @returns Retorna a lista de IDs dos registros selecionados.
|
107
|
+
*/
|
108
|
+
async getSelectedRecordsIDsInfo() {
|
109
|
+
return Promise.resolve(getSelectedIDs(this.dataUnit));
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* Retorna os campos que possuem a propriedade "rmp" (Row Metadata Provider).
|
113
|
+
*/
|
114
|
+
async getFieldsWithRmp() {
|
115
|
+
return this._fieldsWithRmp;
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Retorna os campos que possuem a propriedade "rm_precision" (Row Metadata Precision).
|
119
|
+
*/
|
120
|
+
async getFieldsWithRmPrecision() {
|
121
|
+
return this._fieldsWithRmPrecision;
|
122
|
+
}
|
123
|
+
/**
|
124
|
+
* Busca os metadados da linha selecionada.
|
125
|
+
*/
|
126
|
+
async getRowMetadata(record) {
|
127
|
+
return this.doGetRowMetadata(record);
|
128
|
+
}
|
129
|
+
doGetRowMetadata(record) {
|
130
|
+
const selectedRecord = this.dataUnit.getSelectedRecord();
|
131
|
+
if (!record && !selectedRecord) {
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
const currentRecord = record || selectedRecord;
|
135
|
+
const recordId = typeof currentRecord === 'string' ? currentRecord : currentRecord.__record__id__;
|
136
|
+
const rowMetadata = this._metadataByRow.get(recordId);
|
137
|
+
if (!rowMetadata) {
|
138
|
+
return;
|
139
|
+
}
|
140
|
+
rowMetadata.getProp = this.buildGetPropRowMetadata(rowMetadata);
|
141
|
+
return Object.assign({}, rowMetadata);
|
142
|
+
}
|
143
|
+
buildGetPropRowMetadata(rowMetadata) {
|
144
|
+
return (propPath, fieldName) => {
|
145
|
+
if (propPath === "rm_precision") {
|
146
|
+
propPath = this.resolvePrecisionFromMetadata(fieldName);
|
147
|
+
}
|
148
|
+
return ObjectUtils.getProp(rowMetadata, propPath);
|
149
|
+
};
|
150
|
+
}
|
151
|
+
resolvePrecisionFromMetadata(fieldName) {
|
152
|
+
var _a, _b;
|
153
|
+
if (!fieldName) {
|
154
|
+
ApplicationUtils.error(this.getMessage("snkDataUnit.fieldNameRequired"));
|
155
|
+
return;
|
156
|
+
}
|
157
|
+
const rmPrecision = (_b = (_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.rm_precision;
|
158
|
+
if (!rmPrecision) {
|
159
|
+
return '';
|
160
|
+
}
|
161
|
+
let rmPrecisionPath = rmPrecision.split('.').filter((_, index) => index !== 1).join('.');
|
162
|
+
return rmPrecisionPath;
|
163
|
+
}
|
164
|
+
getCleanOnCopyFields() {
|
165
|
+
var _a;
|
166
|
+
return (_a = this.dataUnit.metadata) === null || _a === void 0 ? void 0 : _a.fields.filter(field => { var _a; return (_a = field.properties) === null || _a === void 0 ? void 0 : _a.cleanOnCopy; }).map(field => field.name);
|
167
|
+
}
|
168
|
+
fillFieldsWithRmp(payload) {
|
169
|
+
payload.fields.forEach((field) => {
|
170
|
+
var _a;
|
171
|
+
if (((_a = field.properties) === null || _a === void 0 ? void 0 : _a.rmp) && !this._fieldsWithRmp.includes(field.name)) {
|
172
|
+
this._fieldsWithRmp.push(field.name);
|
173
|
+
}
|
174
|
+
});
|
175
|
+
}
|
176
|
+
fillFieldsWithRmPrecision(payload) {
|
177
|
+
payload.fields.forEach((field) => {
|
178
|
+
var _a;
|
179
|
+
if (((_a = field.properties) === null || _a === void 0 ? void 0 : _a.rm_precision) && !this._fieldsWithRmPrecision.includes(field.name)) {
|
180
|
+
this._fieldsWithRmPrecision.push(field.name);
|
181
|
+
}
|
182
|
+
});
|
183
|
+
}
|
184
|
+
getCacheName(fieldName, metadataName, fieldValue) {
|
185
|
+
const cacheName = [fieldName, metadataName, fieldValue].join("_");
|
186
|
+
return cacheName;
|
187
|
+
}
|
188
|
+
updateDataStateRmp(newValue) {
|
189
|
+
Object.assign(this.dataState.rowMetadata || {}, newValue);
|
190
|
+
}
|
191
|
+
saveCacheRmd(record) {
|
192
|
+
const rmd = record.__record__metadata__;
|
193
|
+
const keysRmd = Object.keys(rmd);
|
194
|
+
keysRmd.shift();
|
195
|
+
keysRmd.forEach((fieldName) => {
|
196
|
+
const fieldValue = getRecordValue(record, fieldName);
|
197
|
+
const cacheName = this.getCacheName(fieldName, rmd.provider, fieldValue);
|
198
|
+
this._rowMetadataCache.set(cacheName, Object.assign({}, rmd));
|
199
|
+
});
|
200
|
+
}
|
201
|
+
getMetadataByRow(payload) {
|
202
|
+
var _a;
|
203
|
+
if (!((_a = payload.records) === null || _a === void 0 ? void 0 : _a.length)) {
|
204
|
+
return payload;
|
205
|
+
}
|
206
|
+
if (!this._fieldsWithRmp.length) {
|
207
|
+
const records = payload.records.map((record) => {
|
208
|
+
delete record.__record__metadata__;
|
209
|
+
return record;
|
210
|
+
});
|
211
|
+
return Object.assign(Object.assign({}, payload), { records });
|
212
|
+
}
|
213
|
+
const records = payload.records.map((record) => {
|
214
|
+
if (!record.__record__metadata__) {
|
215
|
+
return record;
|
216
|
+
}
|
217
|
+
this.saveCacheRmd(record);
|
218
|
+
const rowMetadata = Object.assign({}, record.__record__metadata__);
|
219
|
+
rowMetadata.getProp = this.buildGetPropRowMetadata(rowMetadata);
|
220
|
+
this._metadataByRow.set(record.__record__id__, rowMetadata);
|
221
|
+
delete record.__record__metadata__;
|
222
|
+
return record;
|
223
|
+
});
|
224
|
+
return Object.assign(Object.assign({}, payload), { records });
|
225
|
+
}
|
226
|
+
interceptRecordsAdded(action) {
|
227
|
+
if (!this.isAllowed("INSERT")) {
|
228
|
+
ApplicationUtils.info(this.getMessage("snkDataUnit.forbiddenInsert"));
|
229
|
+
return;
|
230
|
+
}
|
231
|
+
return action;
|
232
|
+
}
|
233
|
+
interceptRecordsCopied(action) {
|
234
|
+
if (!this.isAllowed("CLONE")) {
|
235
|
+
ApplicationUtils.info(this.getMessage("snkDataUnit.forbiddenClone"));
|
236
|
+
return;
|
237
|
+
}
|
238
|
+
const cleanFields = this.getCleanOnCopyFields();
|
239
|
+
if (cleanFields.length > 0) {
|
240
|
+
const records = action.payload;
|
241
|
+
action = new DataUnitAction(Action.RECORDS_COPIED, records.map(record => {
|
242
|
+
const newRecord = Object.assign({}, record);
|
243
|
+
cleanFields.forEach(fieldName => delete newRecord[fieldName]);
|
244
|
+
return newRecord;
|
245
|
+
}));
|
246
|
+
}
|
247
|
+
return action;
|
248
|
+
}
|
249
|
+
async interceptDataChange(action) {
|
250
|
+
if (this.isAllowed("UPDATE")) {
|
251
|
+
return action;
|
252
|
+
}
|
253
|
+
if (this._openedAlert) {
|
254
|
+
await this.dataUnit.cancelEdition();
|
255
|
+
return;
|
256
|
+
}
|
257
|
+
this._openedAlert = true;
|
258
|
+
await this.dataUnit.cancelEdition();
|
259
|
+
await ApplicationUtils.alert(this.getMessage("snkDataUnit.forbidden"), this.getMessage("snkDataUnit.forbiddenUpdate"));
|
260
|
+
this._openedAlert = false;
|
261
|
+
}
|
262
|
+
async interceptSavingData(action) {
|
263
|
+
if (!this.beforeSave) {
|
264
|
+
return action;
|
265
|
+
}
|
266
|
+
const continueAction = this.beforeSave(this.dataUnit);
|
267
|
+
if (continueAction instanceof Promise) {
|
268
|
+
const result = await continueAction;
|
269
|
+
return result ? action : undefined;
|
270
|
+
}
|
271
|
+
return continueAction ? action : undefined;
|
272
|
+
}
|
273
|
+
interceptDataSaved(action) {
|
274
|
+
if (this.afterSave) {
|
275
|
+
this.afterSave(this.dataUnit);
|
276
|
+
return;
|
277
|
+
}
|
278
|
+
return action;
|
279
|
+
}
|
280
|
+
async interceptEditionCanceled(action) {
|
281
|
+
var _a, _b;
|
282
|
+
if (!this.useCancelConfirm || !this.dataState.hasDirtyRecords || ((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fromParent) || ((_b = action.payload) === null || _b === void 0 ? void 0 : _b.silent)) {
|
283
|
+
return action;
|
284
|
+
}
|
285
|
+
const cancelConfirmation = this.getMessage("snkDataUnit.cancelConfirmation");
|
286
|
+
if (cancelConfirmation == undefined) {
|
287
|
+
this.showSuccessMessage(this.getMessage("snkDataUnit.cancelInfo"));
|
288
|
+
return action;
|
289
|
+
}
|
290
|
+
const cancelConfirmationTitle = this.getMessage("snkDataUnit.cancelConfirmationTitle");
|
291
|
+
const confirm = await ApplicationUtils.confirm(cancelConfirmationTitle, cancelConfirmation);
|
292
|
+
confirm && this.showSuccessMessage(this.getMessage("snkDataUnit.cancelInfo"));
|
293
|
+
return confirm ? action : undefined;
|
294
|
+
}
|
295
|
+
async interceptRemovingRecords(action) {
|
296
|
+
var _a, _b, _c;
|
297
|
+
if (!this.isAllowed("REMOVE")) {
|
298
|
+
ApplicationUtils.info(this.getMessage("snkDataUnit.forbiddenRemove"));
|
299
|
+
return;
|
300
|
+
}
|
301
|
+
let multipleSelection = false;
|
302
|
+
let removeConfirmation = !((_a = action.payload) === null || _a === void 0 ? void 0 : _a.silent) && this.getMessage("snkDataUnit.removeConfirmation");
|
303
|
+
const selection = (_b = this.dataUnit) === null || _b === void 0 ? void 0 : _b.getSelectionInfo();
|
304
|
+
if (!((_c = action.payload) === null || _c === void 0 ? void 0 : _c.silent) && (selection === null || selection === void 0 ? void 0 : selection.length) > 1) {
|
305
|
+
removeConfirmation = this.getMessage("snkDataUnit.removeAllConfirmation", { size: selection.length });
|
306
|
+
multipleSelection = true;
|
307
|
+
}
|
308
|
+
if (!removeConfirmation) {
|
309
|
+
return action;
|
310
|
+
}
|
311
|
+
const options = {
|
312
|
+
canClose: false,
|
313
|
+
labelCancel: this.getMessage(`snkDataUnit.confirm.${multipleSelection ? "no" : "cancel"}`),
|
314
|
+
labelConfirm: this.getMessage(`snkDataUnit.confirm.${multipleSelection ? "yes" : "delete"}`),
|
315
|
+
btnConfirmDanger: false
|
316
|
+
};
|
317
|
+
const removeConfirmationTitle = this.getMessage("snkDataUnit.removeConfirmationTitle");
|
318
|
+
const confirm = await ApplicationUtils.confirm(removeConfirmationTitle, removeConfirmation, null, DialogType.WARN, options);
|
319
|
+
return confirm ? action : undefined;
|
320
|
+
}
|
321
|
+
interceptDataLoaded(action) {
|
322
|
+
const newPayload = this.getMetadataByRow(action.payload);
|
323
|
+
action = new DataUnitAction(Action.DATA_LOADED, newPayload);
|
324
|
+
return action;
|
325
|
+
}
|
326
|
+
interceptMetadataLoaded(action) {
|
327
|
+
this.fillFieldsWithRmp(action.payload);
|
328
|
+
this.fillFieldsWithRmPrecision(action.payload);
|
329
|
+
return action;
|
330
|
+
}
|
331
|
+
async interceptAction(action) {
|
332
|
+
switch (action.type) {
|
333
|
+
case Action.RECORDS_ADDED:
|
334
|
+
return this.interceptRecordsAdded(action);
|
335
|
+
case Action.RECORDS_COPIED:
|
336
|
+
return this.interceptRecordsCopied(action);
|
337
|
+
case Action.DATA_CHANGED:
|
338
|
+
await this.handleLoadRowMetadata(action);
|
339
|
+
return await this.interceptDataChange(action);
|
340
|
+
case Action.CHANGING_DATA:
|
341
|
+
return await this.interceptDataChange(action);
|
342
|
+
case Action.SAVING_DATA:
|
343
|
+
return await this.interceptSavingData(action);
|
344
|
+
case Action.DATA_SAVED:
|
345
|
+
return this.interceptDataSaved(action);
|
346
|
+
case Action.EDITION_CANCELED:
|
347
|
+
return await this.interceptEditionCanceled(action);
|
348
|
+
case Action.REMOVING_RECORDS:
|
349
|
+
return await this.interceptRemovingRecords(action);
|
350
|
+
case Action.DATA_LOADED:
|
351
|
+
return this.interceptDataLoaded(action);
|
352
|
+
case Action.METADATA_LOADED:
|
353
|
+
return this.interceptMetadataLoaded(action);
|
354
|
+
default:
|
355
|
+
return action;
|
356
|
+
}
|
357
|
+
}
|
358
|
+
async handleLoadRowMetadata(action) {
|
359
|
+
const record = action.type === Action.DATA_CHANGED ? action.payload : action.payload.changes[0].record;
|
360
|
+
const keysPayload = Object.keys(record);
|
361
|
+
const rmpField = keysPayload.find((field) => this._fieldsWithRmp.includes(field));
|
362
|
+
if (rmpField) {
|
363
|
+
const metadataName = this.dataUnit.getField(rmpField).properties.rmp;
|
364
|
+
const fieldValue = getRecordValue(record, rmpField);
|
365
|
+
return await this.updateRowMetadata({
|
366
|
+
fieldName: rmpField,
|
367
|
+
fieldValue,
|
368
|
+
metadataName,
|
369
|
+
updatedFields: record,
|
370
|
+
});
|
371
|
+
}
|
372
|
+
}
|
373
|
+
async updateRowMetadata({ fieldName, fieldValue, metadataName, updatedFields }) {
|
374
|
+
const cacheName = this.getCacheName(fieldName, metadataName, fieldValue);
|
375
|
+
const cacheValue = this._rowMetadataCache.get(cacheName);
|
376
|
+
if (cacheValue) {
|
377
|
+
this.updateDataStateRmp(cacheValue);
|
378
|
+
return cacheValue;
|
379
|
+
}
|
380
|
+
else {
|
381
|
+
const datasetStrategy = new DatasetStrategy();
|
382
|
+
const response = await datasetStrategy.loadRowMetadata(this, fieldName, metadataName, updatedFields);
|
383
|
+
this.updateDataStateRmp(response._rmd);
|
384
|
+
this._rowMetadataCache.set(cacheName, Object.assign({}, response._rmd));
|
385
|
+
return Object.assign({}, response._rmd);
|
386
|
+
}
|
387
|
+
}
|
388
|
+
showSuccessMessage(message) {
|
389
|
+
ApplicationUtils.info(message, { iconName: "check" });
|
390
|
+
}
|
391
|
+
isAllowed(flag) {
|
392
|
+
return this._permissions ? this._permissions.isSup || this._permissions[flag] : false;
|
393
|
+
}
|
394
|
+
buildDataState(actionType) {
|
395
|
+
var _a;
|
396
|
+
const selectionInfo = this.dataUnit.getSelectionInfo();
|
397
|
+
const isStartingInsertionMode = (this.dataUnit.hasDirtyRecords() || this.dataUnit.hasWaitingChanges()) && (selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.isEmpty());
|
398
|
+
const selectedRecord = this.dataUnit.getSelectedRecord();
|
399
|
+
let rowMetadata = (_a = this.dataState) === null || _a === void 0 ? void 0 : _a.rowMetadata;
|
400
|
+
const allowedOverwrite = [Action.SELECTION_CHANGED, Action.EDITION_CANCELED, Action.NEXT_SELECTED, Action.PREVIOUS_SELECTED];
|
401
|
+
if (selectedRecord && (!rowMetadata || allowedOverwrite.includes(actionType))) {
|
402
|
+
rowMetadata = this.doGetRowMetadata(selectedRecord);
|
403
|
+
}
|
404
|
+
else if (rowMetadata) {
|
405
|
+
rowMetadata.getProp = this.buildGetPropRowMetadata(rowMetadata);
|
406
|
+
}
|
407
|
+
return new DataStateImpl({
|
408
|
+
insertionMode: this.dataUnit.hasNewRecord(),
|
409
|
+
isStartingInsertionMode,
|
410
|
+
hasNext: this.dataUnit.hasNext(),
|
411
|
+
hasPrevious: this.dataUnit.hasPrevious(),
|
412
|
+
copyMode: this.dataUnit.hasCopiedRecord(),
|
413
|
+
isDirty: this.dataUnit.isDirty(),
|
414
|
+
hasDirtyRecords: this.dataUnit.hasDirtyRecords(),
|
415
|
+
selectedRecords: undefined,
|
416
|
+
selectionInfo,
|
417
|
+
selectedRecord,
|
418
|
+
recordsIsEmpty: this.dataUnit.records.length === 0,
|
419
|
+
metadataByRow: this._metadataByRow,
|
420
|
+
rowMetadata
|
421
|
+
});
|
422
|
+
}
|
423
|
+
async handleDataSaved(action) {
|
424
|
+
const newRowMetadata = await this.handleLoadRowMetadata(action);
|
425
|
+
if (newRowMetadata) {
|
426
|
+
newRowMetadata.getProp = this.buildGetPropRowMetadata(newRowMetadata);
|
427
|
+
}
|
428
|
+
const recordId = action.payload.records[0].__record__id__;
|
429
|
+
this._metadataByRow.set(recordId, newRowMetadata);
|
430
|
+
this.dataState = this.buildDataState();
|
431
|
+
if (this.ignoreSaveMessage) {
|
432
|
+
return;
|
433
|
+
}
|
434
|
+
const msg = this.getMessage("snkDataUnit.saveInfo", action.payload.records[0]);
|
435
|
+
if (msg != undefined) {
|
436
|
+
this.showSuccessMessage(msg);
|
437
|
+
}
|
438
|
+
}
|
439
|
+
handleRecordsRemoved(action) {
|
440
|
+
var _a, _b;
|
441
|
+
const cachedRecords = action.payload.cachedRecords;
|
442
|
+
let removeFinishMsg;
|
443
|
+
if ((cachedRecords === null || cachedRecords === void 0 ? void 0 : cachedRecords.length) > 1) {
|
444
|
+
removeFinishMsg = this.getMessage("snkDataUnit.removeAllInfo", { size: cachedRecords.length });
|
445
|
+
}
|
446
|
+
else {
|
447
|
+
removeFinishMsg = this.getMessage("snkDataUnit.removeInfo", action.payload.cachedRecords[0]);
|
448
|
+
}
|
449
|
+
if (removeFinishMsg != undefined) {
|
450
|
+
this.showSuccessMessage(removeFinishMsg);
|
451
|
+
}
|
452
|
+
const recordsCount = (_b = (_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
453
|
+
const paginationInfo = this.dataUnit.getPaginationInfo();
|
454
|
+
if (paginationInfo) {
|
455
|
+
const page = recordsCount > 0 || paginationInfo.hasMore ? paginationInfo.currentPage : 0;
|
456
|
+
this.dataUnit.gotoPage(page);
|
457
|
+
}
|
458
|
+
}
|
459
|
+
/**
|
460
|
+
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
461
|
+
* através de um pequeno modulo na estrutura da aplicação:
|
462
|
+
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
463
|
+
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-data-unit.msg.ts"
|
464
|
+
*/
|
465
|
+
getMessage(key, params = undefined) {
|
466
|
+
if (!params) {
|
467
|
+
params = this.getMessageParams();
|
468
|
+
}
|
469
|
+
return this.messagesBuilder.getMessage(key, params);
|
470
|
+
}
|
471
|
+
getMessageParams() {
|
472
|
+
//FIXME: Devido ao recurso de multiseleção do dataunit, precisaremos criar um mecanismo para
|
473
|
+
//oferecer todos os registros selecionados para a mensagem, pois mensagens podem ficar incorretas.
|
474
|
+
return this.dataState.selectedRecord;
|
475
|
+
}
|
476
|
+
getMessageOperation() {
|
477
|
+
if (this.dataState.copyMode) {
|
478
|
+
return OperationMap.CLONE;
|
479
|
+
}
|
480
|
+
if (this.dataState.insertionMode || this.dataState.isStartingInsertionMode) {
|
481
|
+
return OperationMap.INSERT;
|
482
|
+
}
|
483
|
+
if (this.dataState.isDirty) {
|
484
|
+
return OperationMap.UPDATE;
|
485
|
+
}
|
486
|
+
return OperationMap.CLEAN;
|
487
|
+
}
|
488
|
+
async getDataUnitParentOrChild() {
|
489
|
+
var _a;
|
490
|
+
const cacheName = this.dataUnitName ? this.dataUnitName : this.entityName;
|
491
|
+
if (this._parentSnkDataUnit) {
|
492
|
+
this._parentDataUnit = await ((_a = this._parentSnkDataUnit) === null || _a === void 0 ? void 0 : _a.getDataUnit());
|
493
|
+
return await this._application.getDataUnit(this.entityName, cacheName, this._parentDataUnit, this.configName, this.resourceID, { skipLoadMetadata: true });
|
494
|
+
}
|
495
|
+
else {
|
496
|
+
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID, { skipLoadMetadata: true });
|
497
|
+
}
|
498
|
+
}
|
499
|
+
async loadDataUnit() {
|
500
|
+
var _a;
|
501
|
+
if (this.dataUnit == null && this._application && this.entityName) {
|
502
|
+
this.dataUnit = await this.getDataUnitParentOrChild();
|
503
|
+
}
|
504
|
+
if (this.dataUnit) {
|
505
|
+
this.dataUnit.pageSize = this.pageSize;
|
506
|
+
this.dataUnit.unsubscribe(this._dataUnitObserver);
|
507
|
+
this.dataUnit.addInterceptor(this);
|
508
|
+
this.dataUnit.subscribe(this._dataUnitObserver);
|
509
|
+
await this.dataUnit.loadMetadata();
|
510
|
+
if ((_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) {
|
511
|
+
this.getMetadataByRow(this.dataUnit);
|
512
|
+
}
|
513
|
+
this.dataState = this.buildDataState();
|
514
|
+
let resolver;
|
515
|
+
while (resolver = this._onDataUnitResolve.pop()) {
|
516
|
+
resolver(this.dataUnit);
|
517
|
+
}
|
518
|
+
}
|
519
|
+
}
|
520
|
+
getParentSnkDataUnit() {
|
521
|
+
let currentElement = this.element;
|
522
|
+
while (currentElement.parentNode) {
|
523
|
+
if (currentElement.parentNode.nodeName === 'SNK-DATA-UNIT') {
|
524
|
+
return currentElement.parentNode;
|
525
|
+
}
|
526
|
+
currentElement = currentElement.parentNode;
|
527
|
+
}
|
528
|
+
return;
|
529
|
+
}
|
530
|
+
handlerLinkFields() {
|
531
|
+
var _a, _b;
|
532
|
+
const metadata = Object.assign({}, this.dataUnit.metadata);
|
533
|
+
if (!this._parentDataUnit)
|
534
|
+
return;
|
535
|
+
const child = this._parentDataUnit.getChildInfo(this.entityName);
|
536
|
+
if (!child)
|
537
|
+
return;
|
538
|
+
const fieldsLink = (_a = child === null || child === void 0 ? void 0 : child.links) === null || _a === void 0 ? void 0 : _a.map(link => link.target);
|
539
|
+
(_b = metadata === null || metadata === void 0 ? void 0 : metadata.fields) === null || _b === void 0 ? void 0 : _b.forEach(field => {
|
540
|
+
if (fieldsLink === null || fieldsLink === void 0 ? void 0 : fieldsLink.includes(field.name)) {
|
541
|
+
field.visible = false;
|
542
|
+
}
|
543
|
+
});
|
544
|
+
this.dataUnit.metadata = metadata;
|
545
|
+
}
|
546
|
+
static getNearestInstance(element) {
|
547
|
+
let parent = element.parentElement;
|
548
|
+
while (parent) {
|
549
|
+
if (parent.tagName.toUpperCase() === "SNK-DATA-UNIT") {
|
550
|
+
return parent;
|
551
|
+
}
|
552
|
+
parent = parent.parentElement;
|
553
|
+
}
|
554
|
+
}
|
555
|
+
//---------------------------------------------
|
556
|
+
// Lifecycle web component
|
557
|
+
//---------------------------------------------
|
558
|
+
componentWillLoad() {
|
559
|
+
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
560
|
+
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
561
|
+
this._parentSnkDataUnit = this.getParentSnkDataUnit();
|
562
|
+
if (this.messagesBuilder == undefined) {
|
563
|
+
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
564
|
+
}
|
565
|
+
}
|
566
|
+
disconnectedCallback() {
|
567
|
+
if (this.dataUnit) {
|
568
|
+
this.dataUnit.releaseCallbacks();
|
569
|
+
}
|
570
|
+
}
|
571
|
+
componentDidLoad() {
|
572
|
+
this.loadDataUnit();
|
573
|
+
}
|
574
|
+
render() {
|
575
|
+
return (h(Host, null));
|
576
|
+
}
|
577
|
+
get element() { return getElement(this); }
|
578
|
+
static get watchers() { return {
|
579
|
+
"pageSize": ["observePageSize"],
|
580
|
+
"dataUnitName": ["observeDataUnitName"],
|
581
|
+
"entityName": ["observeEntityName"],
|
582
|
+
"dataState": ["observeDataState"],
|
583
|
+
"dataUnit": ["observeDataUnit"],
|
584
|
+
"messagesBuilder": ["observeMessagesBuilder"]
|
585
|
+
}; }
|
586
|
+
};
|
587
|
+
class DataStateImpl {
|
588
|
+
constructor(datastate) {
|
589
|
+
this.copyMode = datastate.copyMode;
|
590
|
+
this.insertionMode = datastate.insertionMode;
|
591
|
+
this.isStartingInsertionMode = datastate.isStartingInsertionMode;
|
592
|
+
this.isDirty = datastate.isDirty;
|
593
|
+
this.hasDirtyRecords = datastate.hasDirtyRecords;
|
594
|
+
this.hasNext = datastate.hasNext;
|
595
|
+
this.hasPrevious = datastate.hasPrevious;
|
596
|
+
this.selectionInfo = datastate.selectionInfo;
|
597
|
+
this.selectedRecord = datastate.selectedRecord;
|
598
|
+
this.recordsIsEmpty = datastate.recordsIsEmpty;
|
599
|
+
this.metadataByRow = datastate.metadataByRow;
|
600
|
+
this.rowMetadata = datastate.rowMetadata;
|
601
|
+
}
|
602
|
+
get selectedRecords() {
|
603
|
+
var _a;
|
604
|
+
console.warn("SnkDataUnit: O método `selectedRecords` foi descontinuado. Use o método `selectionInfo`.");
|
605
|
+
if ((_a = this.selectionInfo) === null || _a === void 0 ? void 0 : _a.isAllRecords()) {
|
606
|
+
throw new Error("Erro interno: Impossível obter os registros selecionados. A seleção atual é virtual. Use o atributo `selectionInfo`.");
|
607
|
+
}
|
608
|
+
return this.selectionInfo.records;
|
609
|
+
}
|
610
|
+
}
|
611
|
+
|
612
|
+
export { SnkDataUnit as S };
|
@@ -1,6 +1,14 @@
|
|
1
|
-
export { S as snk_data_unit } from './snk-data-unit-
|
1
|
+
export { S as snk_data_unit } from './snk-data-unit-1132e40b.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import '@sankhyalabs/ezui/dist/collection/utils';
|
5
|
-
import './SnkMessageBuilder-
|
5
|
+
import './SnkMessageBuilder-3a767111.js';
|
6
|
+
import './dataunit-fetcher-87ecba4a.js';
|
7
|
+
import './DataFetcher-4b4b7beb.js';
|
8
|
+
import './PrintUtils-3e4ff0f5.js';
|
9
|
+
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
+
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
11
|
+
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
12
|
+
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
13
|
+
import './ResourceIDUtils-a114189a.js';
|
6
14
|
import './RecordIDUtils-87d02110.js';
|
@@ -1,19 +1,21 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host } from './index-a7d3d3f1.js';
|
2
2
|
import { Action } from '@sankhyalabs/core';
|
3
|
-
import { S as SnkFormConfigManager } from './SnkFormConfigManager-
|
3
|
+
import { S as SnkFormConfigManager } from './SnkFormConfigManager-87bd8082.js';
|
4
4
|
import { FormMetadata, buildFormMetadata } from '@sankhyalabs/ezui/dist/collection/utils/form';
|
5
|
-
import './
|
6
|
-
import './pesquisa-fetcher-
|
5
|
+
import './DataFetcher-4b4b7beb.js';
|
6
|
+
import './pesquisa-fetcher-9cfab836.js';
|
7
7
|
import { P as PresentationMode } from './index-0ece87a6.js';
|
8
8
|
import './ISave-d8c8bc59.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
+
import './dataunit-fetcher-87ecba4a.js';
|
11
12
|
import './filter-item-type.enum-d45e026f.js';
|
13
|
+
import './form-config-fetcher-5d72aaf1.js';
|
12
14
|
import { T as TaskbarElement } from './taskbar-elements-ad766858.js';
|
13
15
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
14
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
15
|
-
import { S as SnkMessageBuilder } from './SnkMessageBuilder-
|
16
|
-
import './ConfigStorage-
|
16
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-359e39a7.js';
|
17
|
+
import { S as SnkMessageBuilder } from './SnkMessageBuilder-3a767111.js';
|
18
|
+
import './ConfigStorage-174101b9.js';
|
17
19
|
import './PrintUtils-3e4ff0f5.js';
|
18
20
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
19
21
|
import '@sankhyalabs/core/dist/utils/SortingUtils';
|
@@ -1,14 +1,15 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-a7d3d3f1.js';
|
2
2
|
import { DataType, StringUtils, ObjectUtils, ElementIDUtils, ErrorException, ApplicationContext } from '@sankhyalabs/core';
|
3
3
|
import { EzScrollDirection } from '@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection';
|
4
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
4
|
+
import { C as ConfigStorage } from './ConfigStorage-174101b9.js';
|
5
5
|
import { toString } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
6
6
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
7
7
|
import { F as FilterOperand } from './index-ae591a44.js';
|
8
8
|
import { F as FilterNumberVariation } from './filterNumberVariation-8cee02ea.js';
|
9
9
|
import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
10
10
|
import { P as PersonalizedFilterUtils } from './PersonalizedFilterUtils-e2b38ef7.js';
|
11
|
-
import './form-config-fetcher-
|
11
|
+
import './form-config-fetcher-5d72aaf1.js';
|
12
|
+
import './DataFetcher-4b4b7beb.js';
|
12
13
|
import './PrintUtils-3e4ff0f5.js';
|
13
14
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
14
15
|
|
@@ -2,9 +2,10 @@ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement
|
|
2
2
|
import { ElementIDUtils, ObjectUtils } from '@sankhyalabs/core';
|
3
3
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
4
4
|
import { E as EPresentationMode } from './presentationMode-783bbf9d.js';
|
5
|
-
import { C as ConfigStorage } from './ConfigStorage-
|
5
|
+
import { C as ConfigStorage } from './ConfigStorage-174101b9.js';
|
6
6
|
import { F as FilterType } from './filter-type.enum-a80c1b6b.js';
|
7
|
-
import './form-config-fetcher-
|
7
|
+
import './form-config-fetcher-5d72aaf1.js';
|
8
|
+
import './DataFetcher-4b4b7beb.js';
|
8
9
|
import './PrintUtils-3e4ff0f5.js';
|
9
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
11
|
|