@sankhyalabs/sankhyablocks 8.14.9 → 8.14.11-rc.1
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/{dataunit-fetcher-1b46e106.js → dataunit-fetcher-d839c5d7.js} +24 -4
- package/dist/cjs/snk-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-attach.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +2 -2
- package/dist/cjs/snk-data-exporter.cjs.entry.js +1 -1
- package/dist/cjs/snk-detail-view.cjs.entry.js +2 -2
- package/dist/cjs/{snk-guides-viewer-894da8ad.js → snk-guides-viewer-88a7f880.js} +1 -1
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
- package/dist/cjs/snk-simple-crud.cjs.entry.js +1 -1
- package/dist/collection/components/snk-crud/snk-crud.js +1 -1
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.js +14 -1
- package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js +10 -3
- package/dist/components/dataunit-fetcher.js +24 -4
- package/dist/components/snk-crud.js +1 -1
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/esm/{dataunit-fetcher-7a82866b.js → dataunit-fetcher-cf01a8f4.js} +24 -4
- package/dist/esm/snk-actions-button.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-attach.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +2 -2
- package/dist/esm/snk-data-exporter.entry.js +1 -1
- package/dist/esm/snk-detail-view.entry.js +2 -2
- package/dist/esm/{snk-guides-viewer-32122fb6.js → snk-guides-viewer-fde509bf.js} +1 -1
- package/dist/esm/snk-guides-viewer.entry.js +2 -2
- package/dist/esm/snk-simple-crud.entry.js +1 -1
- package/dist/sankhyablocks/{p-999d89cd.entry.js → p-08ced1fd.entry.js} +1 -1
- package/dist/sankhyablocks/p-3160fa64.js +60 -0
- package/dist/sankhyablocks/{p-2600b8c7.entry.js → p-34774923.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8043fb84.entry.js → p-3ab540cc.entry.js} +2 -2
- package/dist/sankhyablocks/{p-1771bc15.entry.js → p-6ea96bb1.entry.js} +1 -1
- package/dist/sankhyablocks/{p-f3628f71.js → p-936addf1.js} +1 -1
- package/dist/sankhyablocks/{p-b6567ade.entry.js → p-c53926eb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-c4349760.entry.js → p-cfbebb49.entry.js} +1 -1
- package/dist/sankhyablocks/{p-ad6d2805.entry.js → p-d2923a2a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-35fe6e61.entry.js → p-dbc750a9.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/lib/http/data-fetcher/fetchers/data-unit/dataunit-fetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-0648947b.js +0 -60
@@ -236,7 +236,7 @@ class DatasetStrategy {
|
|
236
236
|
tryJoinedFields: true,
|
237
237
|
parallelLoader: useParallelLoader,
|
238
238
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
239
|
-
txProperties: this.getTxProperties(
|
239
|
+
txProperties: this.getTxProperties(dataUnit, request, sorting),
|
240
240
|
useDefaultRowsLimit: false
|
241
241
|
}
|
242
242
|
};
|
@@ -247,10 +247,10 @@ class DatasetStrategy {
|
|
247
247
|
const moduleName = app.getModuleName();
|
248
248
|
return moduleName.replace("-bff", "");
|
249
249
|
}
|
250
|
-
getTxProperties(
|
250
|
+
getTxProperties(dataUnit, request, sorting) {
|
251
251
|
var _a, _b;
|
252
252
|
const txProperties = {
|
253
|
-
"__DATA_UNIT_ADAPTER__[dataUnitName]":
|
253
|
+
"__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
|
254
254
|
};
|
255
255
|
const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
|
256
256
|
if (serverSideFilters.length !== 0) {
|
@@ -262,6 +262,13 @@ class DatasetStrategy {
|
|
262
262
|
if (request.parentRecordId != undefined) {
|
263
263
|
txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
|
264
264
|
}
|
265
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
266
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
267
|
+
return txProperties;
|
268
|
+
}
|
269
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
270
|
+
txProperties[name] = value;
|
271
|
+
});
|
265
272
|
return txProperties;
|
266
273
|
}
|
267
274
|
processRecords(dataUnit, fields, responseRecords) {
|
@@ -591,6 +598,19 @@ class DataUnitFetcher {
|
|
591
598
|
});
|
592
599
|
});
|
593
600
|
}
|
601
|
+
addTransientProperties(dataUnit, updatingFields) {
|
602
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
603
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
604
|
+
return updatingFields;
|
605
|
+
}
|
606
|
+
if (updatingFields == undefined) {
|
607
|
+
updatingFields = {};
|
608
|
+
}
|
609
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
610
|
+
updatingFields[`transient.${name}`] = value;
|
611
|
+
});
|
612
|
+
return updatingFields;
|
613
|
+
}
|
594
614
|
saveData(dataUnit, duChanges) {
|
595
615
|
const updatedRecordsIds = [];
|
596
616
|
const addedRecordsIds = [];
|
@@ -599,7 +619,7 @@ class DataUnitFetcher {
|
|
599
619
|
const dataUnitInstance = core.DataUnitStorage.get(changeDU);
|
600
620
|
let parsedUpdatingFields;
|
601
621
|
if (updatingFields) {
|
602
|
-
parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
|
622
|
+
parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
|
603
623
|
const descriptor = dataUnitInstance.getField(fieldName);
|
604
624
|
const dataType = descriptor ? descriptor.dataType : core.DataType.TEXT;
|
605
625
|
return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
|
@@ -11,7 +11,7 @@ require('./index-0e663819.js');
|
|
11
11
|
require('./ISave-d68ce3cd.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-d839c5d7.js');
|
15
15
|
require('./PreloadManager-84466da6.js');
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
17
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -8,7 +8,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-8009ecb2.js');
|
9
9
|
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
10
10
|
const authFetcher = require('./auth-fetcher-c8467c07.js');
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-d839c5d7.js');
|
12
12
|
const pesquisaFetcher = require('./pesquisa-fetcher-ef050a47.js');
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
|
14
14
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const DataFetcher = require('./DataFetcher-ba94ed5b.js');
|
8
8
|
const ISave = require('./ISave-d68ce3cd.js');
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-d839c5d7.js');
|
11
11
|
const PreloadManager = require('./PreloadManager-84466da6.js');
|
12
12
|
const taskbarElements = require('./taskbar-elements-39949c7a.js');
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
@@ -11,7 +11,7 @@ const index$1 = require('./index-0e663819.js');
|
|
11
11
|
require('./ISave-d68ce3cd.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-d839c5d7.js');
|
15
15
|
require('./PreloadManager-84466da6.js');
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
17
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -298,7 +298,7 @@ const SnkCrud = class {
|
|
298
298
|
return;
|
299
299
|
}
|
300
300
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === constants.VIEW_MODE.GRID;
|
301
|
-
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
301
|
+
return (index.h(index.Host, null, index.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, index.h("stack-item", null, index.h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, index.h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkGridHeader" }), index.h("slot", { name: "SnkGridFooter" }), index.h("slot", { name: "SnkGridTaskBar" }))), index.h("stack-item", null, index.h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(constants.VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, index.h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "SnkFormTaskBar" }))), index.h("stack-item", null, index.h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), index.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), index.h("div", { id: `${this.customContainerId}` }, index.h("slot", { name: "SnkConfigContainerSlot" }), index.h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), index.h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
302
302
|
}
|
303
303
|
get _element() { return index.getElement(this); }
|
304
304
|
static get watchers() { return {
|
@@ -447,7 +447,7 @@ const SnkDataExporter = class {
|
|
447
447
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
448
448
|
pkObject['pks'] = [];
|
449
449
|
}
|
450
|
-
const dataFields = { nome: name, tipo: type, valor: value };
|
450
|
+
const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
|
451
451
|
fields['fields'].push(dataFields);
|
452
452
|
pkObject['pks'].push(fields);
|
453
453
|
});
|
@@ -12,13 +12,13 @@ const index$1 = require('./index-0e663819.js');
|
|
12
12
|
require('./ISave-d68ce3cd.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
-
require('./dataunit-fetcher-
|
15
|
+
require('./dataunit-fetcher-d839c5d7.js');
|
16
16
|
require('./PreloadManager-84466da6.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
18
|
require('./form-config-fetcher-df043d3d.js');
|
19
19
|
const taskbarElements = require('./taskbar-elements-39949c7a.js');
|
20
20
|
const constants = require('./constants-35ddd366.js');
|
21
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
21
|
+
const snkGuidesViewer = require('./snk-guides-viewer-88a7f880.js');
|
22
22
|
const SnkMessageBuilder = require('./SnkMessageBuilder-7293d0ad.js');
|
23
23
|
require('./ConfigStorage-8009ecb2.js');
|
24
24
|
require('./PrintUtils-bcaeb82f.js');
|
@@ -13,7 +13,7 @@ const index$1 = require('./index-0e663819.js');
|
|
13
13
|
require('./ISave-d68ce3cd.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
-
require('./dataunit-fetcher-
|
16
|
+
require('./dataunit-fetcher-d839c5d7.js');
|
17
17
|
require('./PreloadManager-84466da6.js');
|
18
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
19
19
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
4
4
|
|
5
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
5
|
+
const snkGuidesViewer = require('./snk-guides-viewer-88a7f880.js');
|
6
6
|
require('./index-f9e81701.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
8
|
require('./SnkFormConfigManager-7d850fbc.js');
|
@@ -21,7 +21,7 @@ require('./constants-35ddd366.js');
|
|
21
21
|
require('./pesquisa-fetcher-ef050a47.js');
|
22
22
|
require('./ISave-d68ce3cd.js');
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
24
|
-
require('./dataunit-fetcher-
|
24
|
+
require('./dataunit-fetcher-d839c5d7.js');
|
25
25
|
require('./PreloadManager-84466da6.js');
|
26
26
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
27
27
|
require('./ResourceIDUtils-5ff86aa7.js');
|
@@ -12,7 +12,7 @@ const index$1 = require('./index-0e663819.js');
|
|
12
12
|
require('./ISave-d68ce3cd.js');
|
13
13
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
15
|
+
const dataunitFetcher = require('./dataunit-fetcher-d839c5d7.js');
|
16
16
|
require('./PreloadManager-84466da6.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
18
|
require('./form-config-fetcher-df043d3d.js');
|
@@ -278,7 +278,7 @@ export class SnkCrud {
|
|
278
278
|
return;
|
279
279
|
}
|
280
280
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
281
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
281
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
282
282
|
}
|
283
283
|
static get is() { return "snk-crud"; }
|
284
284
|
static get encapsulation() { return "scoped"; }
|
@@ -239,7 +239,7 @@ export class SnkDataExporter {
|
|
239
239
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
240
240
|
pkObject['pks'] = [];
|
241
241
|
}
|
242
|
-
const dataFields = { nome: name, tipo: type, valor: value };
|
242
|
+
const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
|
243
243
|
fields['fields'].push(dataFields);
|
244
244
|
pkObject['pks'].push(fields);
|
245
245
|
});
|
@@ -171,6 +171,19 @@ export default class DataUnitFetcher {
|
|
171
171
|
});
|
172
172
|
});
|
173
173
|
}
|
174
|
+
addTransientProperties(dataUnit, updatingFields) {
|
175
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
176
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
177
|
+
return updatingFields;
|
178
|
+
}
|
179
|
+
if (updatingFields == undefined) {
|
180
|
+
updatingFields = {};
|
181
|
+
}
|
182
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
183
|
+
updatingFields[`transient.${name}`] = value;
|
184
|
+
});
|
185
|
+
return updatingFields;
|
186
|
+
}
|
174
187
|
saveData(dataUnit, duChanges) {
|
175
188
|
const updatedRecordsIds = [];
|
176
189
|
const addedRecordsIds = [];
|
@@ -179,7 +192,7 @@ export default class DataUnitFetcher {
|
|
179
192
|
const dataUnitInstance = DataUnitStorage.get(changeDU);
|
180
193
|
let parsedUpdatingFields;
|
181
194
|
if (updatingFields) {
|
182
|
-
parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
|
195
|
+
parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
|
183
196
|
const descriptor = dataUnitInstance.getField(fieldName);
|
184
197
|
const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
|
185
198
|
return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
|
package/dist/collection/lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy.js
CHANGED
@@ -87,7 +87,7 @@ export class DatasetStrategy {
|
|
87
87
|
tryJoinedFields: true,
|
88
88
|
parallelLoader: useParallelLoader,
|
89
89
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
90
|
-
txProperties: this.getTxProperties(
|
90
|
+
txProperties: this.getTxProperties(dataUnit, request, sorting),
|
91
91
|
useDefaultRowsLimit: false
|
92
92
|
}
|
93
93
|
};
|
@@ -98,10 +98,10 @@ export class DatasetStrategy {
|
|
98
98
|
const moduleName = app.getModuleName();
|
99
99
|
return moduleName.replace("-bff", "");
|
100
100
|
}
|
101
|
-
getTxProperties(
|
101
|
+
getTxProperties(dataUnit, request, sorting) {
|
102
102
|
var _a, _b;
|
103
103
|
const txProperties = {
|
104
|
-
"__DATA_UNIT_ADAPTER__[dataUnitName]":
|
104
|
+
"__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
|
105
105
|
};
|
106
106
|
const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
|
107
107
|
if (serverSideFilters.length !== 0) {
|
@@ -113,6 +113,13 @@ export class DatasetStrategy {
|
|
113
113
|
if (request.parentRecordId != undefined) {
|
114
114
|
txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
|
115
115
|
}
|
116
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
117
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
118
|
+
return txProperties;
|
119
|
+
}
|
120
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
121
|
+
txProperties[name] = value;
|
122
|
+
});
|
116
123
|
return txProperties;
|
117
124
|
}
|
118
125
|
processRecords(dataUnit, fields, responseRecords) {
|
@@ -612,7 +612,7 @@ class DatasetStrategy {
|
|
612
612
|
tryJoinedFields: true,
|
613
613
|
parallelLoader: useParallelLoader,
|
614
614
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
615
|
-
txProperties: this.getTxProperties(
|
615
|
+
txProperties: this.getTxProperties(dataUnit, request, sorting),
|
616
616
|
useDefaultRowsLimit: false
|
617
617
|
}
|
618
618
|
};
|
@@ -623,10 +623,10 @@ class DatasetStrategy {
|
|
623
623
|
const moduleName = app.getModuleName();
|
624
624
|
return moduleName.replace("-bff", "");
|
625
625
|
}
|
626
|
-
getTxProperties(
|
626
|
+
getTxProperties(dataUnit, request, sorting) {
|
627
627
|
var _a, _b;
|
628
628
|
const txProperties = {
|
629
|
-
"__DATA_UNIT_ADAPTER__[dataUnitName]":
|
629
|
+
"__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
|
630
630
|
};
|
631
631
|
const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
|
632
632
|
if (serverSideFilters.length !== 0) {
|
@@ -638,6 +638,13 @@ class DatasetStrategy {
|
|
638
638
|
if (request.parentRecordId != undefined) {
|
639
639
|
txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
|
640
640
|
}
|
641
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
642
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
643
|
+
return txProperties;
|
644
|
+
}
|
645
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
646
|
+
txProperties[name] = value;
|
647
|
+
});
|
641
648
|
return txProperties;
|
642
649
|
}
|
643
650
|
processRecords(dataUnit, fields, responseRecords) {
|
@@ -967,6 +974,19 @@ class DataUnitFetcher {
|
|
967
974
|
});
|
968
975
|
});
|
969
976
|
}
|
977
|
+
addTransientProperties(dataUnit, updatingFields) {
|
978
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
979
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
980
|
+
return updatingFields;
|
981
|
+
}
|
982
|
+
if (updatingFields == undefined) {
|
983
|
+
updatingFields = {};
|
984
|
+
}
|
985
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
986
|
+
updatingFields[`transient.${name}`] = value;
|
987
|
+
});
|
988
|
+
return updatingFields;
|
989
|
+
}
|
970
990
|
saveData(dataUnit, duChanges) {
|
971
991
|
const updatedRecordsIds = [];
|
972
992
|
const addedRecordsIds = [];
|
@@ -975,7 +995,7 @@ class DataUnitFetcher {
|
|
975
995
|
const dataUnitInstance = DataUnitStorage.get(changeDU);
|
976
996
|
let parsedUpdatingFields;
|
977
997
|
if (updatingFields) {
|
978
|
-
parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
|
998
|
+
parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
|
979
999
|
const descriptor = dataUnitInstance.getField(fieldName);
|
980
1000
|
const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
|
981
1001
|
return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
|
@@ -316,7 +316,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
316
316
|
return;
|
317
317
|
}
|
318
318
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
319
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
319
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
320
320
|
}
|
321
321
|
get _element() { return this; }
|
322
322
|
static get watchers() { return {
|
@@ -442,7 +442,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
442
442
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
443
443
|
pkObject['pks'] = [];
|
444
444
|
}
|
445
|
-
const dataFields = { nome: name, tipo: type, valor: value };
|
445
|
+
const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
|
446
446
|
fields['fields'].push(dataFields);
|
447
447
|
pkObject['pks'].push(fields);
|
448
448
|
});
|
@@ -234,7 +234,7 @@ class DatasetStrategy {
|
|
234
234
|
tryJoinedFields: true,
|
235
235
|
parallelLoader: useParallelLoader,
|
236
236
|
crudListener: `br.com.sankhya.bff.${this.getModuleName()}.BFFDataUnitDatasetAdapter`,
|
237
|
-
txProperties: this.getTxProperties(
|
237
|
+
txProperties: this.getTxProperties(dataUnit, request, sorting),
|
238
238
|
useDefaultRowsLimit: false
|
239
239
|
}
|
240
240
|
};
|
@@ -245,10 +245,10 @@ class DatasetStrategy {
|
|
245
245
|
const moduleName = app.getModuleName();
|
246
246
|
return moduleName.replace("-bff", "");
|
247
247
|
}
|
248
|
-
getTxProperties(
|
248
|
+
getTxProperties(dataUnit, request, sorting) {
|
249
249
|
var _a, _b;
|
250
250
|
const txProperties = {
|
251
|
-
"__DATA_UNIT_ADAPTER__[dataUnitName]":
|
251
|
+
"__DATA_UNIT_ADAPTER__[dataUnitName]": dataUnit.name
|
252
252
|
};
|
253
253
|
const serverSideFilters = (_b = (_a = request.filters) === null || _a === void 0 ? void 0 : _a.filter(filter => !filter.name.startsWith("FILTRO_COLUNA_"))) !== null && _b !== void 0 ? _b : [];
|
254
254
|
if (serverSideFilters.length !== 0) {
|
@@ -260,6 +260,13 @@ class DatasetStrategy {
|
|
260
260
|
if (request.parentRecordId != undefined) {
|
261
261
|
txProperties["__DATA_UNIT_ADAPTER__[parentRecordId]"] = request.parentRecordId;
|
262
262
|
}
|
263
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
264
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
265
|
+
return txProperties;
|
266
|
+
}
|
267
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
268
|
+
txProperties[name] = value;
|
269
|
+
});
|
263
270
|
return txProperties;
|
264
271
|
}
|
265
272
|
processRecords(dataUnit, fields, responseRecords) {
|
@@ -589,6 +596,19 @@ class DataUnitFetcher {
|
|
589
596
|
});
|
590
597
|
});
|
591
598
|
}
|
599
|
+
addTransientProperties(dataUnit, updatingFields) {
|
600
|
+
const loaderProps = dataUnit.getGlobalLoaderProps();
|
601
|
+
if (loaderProps == undefined || loaderProps.size === 0) {
|
602
|
+
return updatingFields;
|
603
|
+
}
|
604
|
+
if (updatingFields == undefined) {
|
605
|
+
updatingFields = {};
|
606
|
+
}
|
607
|
+
Array.from(loaderProps.entries()).forEach(([name, value]) => {
|
608
|
+
updatingFields[`transient.${name}`] = value;
|
609
|
+
});
|
610
|
+
return updatingFields;
|
611
|
+
}
|
592
612
|
saveData(dataUnit, duChanges) {
|
593
613
|
const updatedRecordsIds = [];
|
594
614
|
const addedRecordsIds = [];
|
@@ -597,7 +617,7 @@ class DataUnitFetcher {
|
|
597
617
|
const dataUnitInstance = DataUnitStorage.get(changeDU);
|
598
618
|
let parsedUpdatingFields;
|
599
619
|
if (updatingFields) {
|
600
|
-
parsedUpdatingFields = Object.entries(updatingFields).map(([fieldName, value]) => {
|
620
|
+
parsedUpdatingFields = Object.entries(this.addTransientProperties(dataUnit, updatingFields)).map(([fieldName, value]) => {
|
601
621
|
const descriptor = dataUnitInstance.getField(fieldName);
|
602
622
|
const dataType = descriptor ? descriptor.dataType : DataType.TEXT;
|
603
623
|
return { fieldName, dataType, value: dataUnitInstance.valueToString(fieldName, value) };
|
@@ -7,7 +7,7 @@ import './index-1564817d.js';
|
|
7
7
|
import './ISave-4412b20c.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './dataunit-fetcher-
|
10
|
+
import './dataunit-fetcher-cf01a8f4.js';
|
11
11
|
import './PreloadManager-c1c2f2b4.js';
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
13
13
|
import './form-config-fetcher-36219cd3.js';
|
@@ -4,7 +4,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-1244b8b0.js';
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-aa159c5a.js';
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-c05dc474.js';
|
7
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
7
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-cf01a8f4.js';
|
8
8
|
import { P as PesquisaFetcher } from './pesquisa-fetcher-dd3ca0a5.js';
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
|
10
10
|
import './form-config-fetcher-36219cd3.js';
|
@@ -3,7 +3,7 @@ import { ApplicationContext, DataType, Action } from '@sankhyalabs/core';
|
|
3
3
|
import { D as DataFetcher } from './DataFetcher-aa159c5a.js';
|
4
4
|
import { S as SaveErrorsEnum } from './ISave-4412b20c.js';
|
5
5
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
6
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
6
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-cf01a8f4.js';
|
7
7
|
import { P as PreloadManager } from './PreloadManager-c1c2f2b4.js';
|
8
8
|
import { T as TaskbarElement } from './taskbar-elements-0a6b8b95.js';
|
9
9
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -7,7 +7,7 @@ import { P as PresentationMode } from './index-1564817d.js';
|
|
7
7
|
import './ISave-4412b20c.js';
|
8
8
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
9
9
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
10
|
-
import './dataunit-fetcher-
|
10
|
+
import './dataunit-fetcher-cf01a8f4.js';
|
11
11
|
import './PreloadManager-c1c2f2b4.js';
|
12
12
|
import './filter-item-type.enum-d45e026f.js';
|
13
13
|
import './form-config-fetcher-36219cd3.js';
|
@@ -294,7 +294,7 @@ const SnkCrud = class {
|
|
294
294
|
return;
|
295
295
|
}
|
296
296
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
297
|
-
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
297
|
+
return (h(Host, null, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "crud" }, h("stack-item", null, h("snk-grid", { ref: (ref) => this._snkGrid = ref, "data-element-id": "crud_grid", configName: this.configName, onGridDoubleClick: () => this.gridToForm(true), taskbarManager: this.taskbarManager, onActionClick: evt => this.executeAction(evt.detail), messagesBuilder: this.messagesBuilder, actionsList: this.actionsList, statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, presentationMode: this.presentationMode, recordsValidator: this.recordsValidator, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, canEdit: this._canEdit, resourceID: this._resourceID }, h("slot", { name: "GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkGridHeader" }), h("slot", { name: "SnkGridFooter" }), h("slot", { name: "SnkGridTaskBar" }))), h("stack-item", null, h("snk-guides-viewer", { ref: ref => this._guidesViewer = ref, entityPath: this._snkDataUnit.entityName, messagesBuilder: this.messagesBuilder, onExit: () => this.setViewMode(VIEW_MODE.GRID), dataState: this._dataState, dataUnit: this._dataUnit, actionsList: this.actionsList, taskbarManager: this.taskbarManager, configName: this.configName, onActionClick: evt => this.executeAction(evt.detail), presentationMode: this.presentationMode, "data-element-id": "crud_form", canEdit: this._canEdit, recordsValidator: this.recordsValidator, resourceID: this._resourceID, detailTaskbarCustomContainerId: this.customContainerId }, h("slot", { name: "GUIDES_VIEWER_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "SnkFormTaskBar" }))), h("stack-item", null, h("snk-attach", { registerKey: this.attachmentRegisterKey, messagesBuilder: this.messagesBuilder, entityName: this._snkDataUnit.entityName, onBack: this.backView.bind(this) })), h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.setViewMode(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showActionButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this.customContainerId })), h("div", { id: `${this.customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }), h("slot", { name: "DETAIL_GRID_HEADER_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_GRID_TASKBAR_CUSTOM_ELEMENTS" }), h("slot", { name: "DETAIL_TASKBAR_CUSTOM_ELEMENTS" }))));
|
298
298
|
}
|
299
299
|
get _element() { return getElement(this); }
|
300
300
|
static get watchers() { return {
|
@@ -443,7 +443,7 @@ const SnkDataExporter = class {
|
|
443
443
|
pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
|
444
444
|
pkObject['pks'] = [];
|
445
445
|
}
|
446
|
-
const dataFields = { nome: name, tipo: type, valor: value };
|
446
|
+
const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
|
447
447
|
fields['fields'].push(dataFields);
|
448
448
|
pkObject['pks'].push(fields);
|
449
449
|
});
|
@@ -8,13 +8,13 @@ import { P as PresentationMode } from './index-1564817d.js';
|
|
8
8
|
import './ISave-4412b20c.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import './dataunit-fetcher-
|
11
|
+
import './dataunit-fetcher-cf01a8f4.js';
|
12
12
|
import './PreloadManager-c1c2f2b4.js';
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
14
14
|
import './form-config-fetcher-36219cd3.js';
|
15
15
|
import { T as TaskbarElement } from './taskbar-elements-0a6b8b95.js';
|
16
16
|
import { d as VIEW_MODE } from './constants-8457af36.js';
|
17
|
-
import { S as SnkGuidesViewer } from './snk-guides-viewer-
|
17
|
+
import { S as SnkGuidesViewer } from './snk-guides-viewer-fde509bf.js';
|
18
18
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-ca843d1b.js';
|
19
19
|
import './ConfigStorage-1244b8b0.js';
|
20
20
|
import './PrintUtils-3e4ff0f5.js';
|
@@ -11,7 +11,7 @@ import { P as PresentationMode } from './index-1564817d.js';
|
|
11
11
|
import './ISave-4412b20c.js';
|
12
12
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
13
13
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
14
|
-
import './dataunit-fetcher-
|
14
|
+
import './dataunit-fetcher-cf01a8f4.js';
|
15
15
|
import './PreloadManager-c1c2f2b4.js';
|
16
16
|
import './filter-item-type.enum-d45e026f.js';
|
17
17
|
import './form-config-fetcher-36219cd3.js';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { S as snk_guides_viewer } from './snk-guides-viewer-
|
1
|
+
export { S as snk_guides_viewer } from './snk-guides-viewer-fde509bf.js';
|
2
2
|
import './index-a7d3d3f1.js';
|
3
3
|
import '@sankhyalabs/core';
|
4
4
|
import './SnkFormConfigManager-9be0e7d4.js';
|
@@ -17,7 +17,7 @@ import './constants-8457af36.js';
|
|
17
17
|
import './pesquisa-fetcher-dd3ca0a5.js';
|
18
18
|
import './ISave-4412b20c.js';
|
19
19
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
20
|
-
import './dataunit-fetcher-
|
20
|
+
import './dataunit-fetcher-cf01a8f4.js';
|
21
21
|
import './PreloadManager-c1c2f2b4.js';
|
22
22
|
import '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils';
|
23
23
|
import './ResourceIDUtils-a114189a.js';
|
@@ -8,7 +8,7 @@ import { P as PresentationMode } from './index-1564817d.js';
|
|
8
8
|
import './ISave-4412b20c.js';
|
9
9
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
10
10
|
import '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
11
|
-
import { I as InMemoryLoader } from './dataunit-fetcher-
|
11
|
+
import { I as InMemoryLoader } from './dataunit-fetcher-cf01a8f4.js';
|
12
12
|
import './PreloadManager-c1c2f2b4.js';
|
13
13
|
import './filter-item-type.enum-d45e026f.js';
|
14
14
|
import './form-config-fetcher-36219cd3.js';
|