@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-66028.0 → 0.0.0-bugfix-dev-KB-67229.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/{IExporterProvider-c78cb1b8.js → IExporterProvider-9479f618.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-52f99b4d.js → SnkFormConfigManager-5f3c6051.js} +4 -3
- package/dist/cjs/{dataunit-fetcher-620b29a1.js → dataunit-fetcher-0c7106a0.js} +1 -0
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +7 -4
- package/dist/cjs/snk-attach.cjs.entry.js +1 -1
- package/dist/cjs/snk-crud.cjs.entry.js +1 -1
- package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -3
- package/dist/cjs/{snk-data-unit-56babf28.js → snk-data-unit-16791a2f.js} +6 -2
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -2
- package/dist/cjs/snk-detail-view.cjs.entry.js +3 -3
- package/dist/cjs/snk-form.cjs.entry.js +2 -2
- package/dist/cjs/snk-grid.cjs.entry.js +2 -2
- package/dist/cjs/{snk-guides-viewer-9867335b.js → snk-guides-viewer-20c27726.js} +2 -2
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +3 -3
- package/dist/collection/components/snk-application/snk-application.js +13 -4
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +1 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +5 -1
- package/dist/collection/components/snk-form/snk-form.js +1 -1
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +4 -3
- package/dist/collection/lib/dataUnit/InMemoryLoader.js +1 -0
- package/dist/components/SnkFormConfigManager.js +4 -3
- package/dist/components/dataunit-fetcher.js +1 -0
- package/dist/components/snk-application2.js +6 -3
- package/dist/components/snk-data-exporter2.js +1 -1
- package/dist/components/snk-data-unit2.js +5 -1
- package/dist/components/snk-form.js +1 -1
- package/dist/esm/{IExporterProvider-343272b3.js → IExporterProvider-5a858363.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-5b0d69cd.js → SnkFormConfigManager-23e9ec6e.js} +4 -3
- package/dist/esm/{dataunit-fetcher-3fbf9d12.js → dataunit-fetcher-f7e0ffc0.js} +1 -0
- package/dist/esm/snk-actions-button_4.entry.js +1 -1
- package/dist/esm/snk-application.entry.js +7 -4
- package/dist/esm/snk-attach.entry.js +1 -1
- package/dist/esm/snk-crud.entry.js +1 -1
- package/dist/esm/snk-data-exporter.entry.js +4 -3
- package/dist/esm/{snk-data-unit-56b5efc4.js → snk-data-unit-a327d22c.js} +6 -2
- package/dist/esm/snk-data-unit.entry.js +3 -2
- package/dist/esm/snk-detail-view.entry.js +3 -3
- package/dist/esm/snk-form.entry.js +2 -2
- package/dist/esm/snk-grid.entry.js +2 -2
- package/dist/esm/{snk-guides-viewer-daab6211.js → snk-guides-viewer-73b1007e.js} +2 -2
- package/dist/esm/snk-guides-viewer.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +3 -3
- package/dist/sankhyablocks/p-0e11ee18.entry.js +1 -0
- package/dist/sankhyablocks/{p-11865302.entry.js → p-4048ccb1.entry.js} +1 -1
- package/dist/sankhyablocks/p-60e46675.entry.js +11 -0
- package/dist/sankhyablocks/{p-672302c3.js → p-6d4f4614.js} +1 -1
- package/dist/sankhyablocks/{p-b1ee6b27.entry.js → p-7d9baaf4.entry.js} +1 -1
- package/dist/sankhyablocks/p-a754df81.entry.js +1 -0
- package/dist/sankhyablocks/{p-b2b1f1c5.entry.js → p-a8a64ca7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-66c223ac.entry.js → p-ab7cdd5f.entry.js} +1 -1
- package/dist/sankhyablocks/{p-4f72727a.entry.js → p-b7c4feeb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-8a5910a7.entry.js → p-b8cde0d8.entry.js} +1 -1
- package/dist/sankhyablocks/p-ba69c380.js +1 -0
- package/dist/sankhyablocks/p-c7cbad38.js +1 -0
- package/dist/sankhyablocks/{p-2d649237.entry.js → p-e0b9f59a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9e99a92a.js → p-e6210aec.js} +1 -1
- package/dist/sankhyablocks/{p-550fee49.entry.js → p-e9bbc3d5.entry.js} +1 -1
- package/dist/sankhyablocks/{p-63a04cfb.js → p-fa6cb6ee.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -1
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
- package/dist/sankhyablocks/p-060fdb6c.js +0 -1
- package/dist/sankhyablocks/p-0f4de966.entry.js +0 -11
- package/dist/sankhyablocks/p-32062be4.entry.js +0 -1
- package/dist/sankhyablocks/p-88a77075.js +0 -1
- package/dist/sankhyablocks/p-ec2ab37a.entry.js +0 -1
|
@@ -7,7 +7,7 @@ require('./index-1dfc7a6e.js');
|
|
|
7
7
|
require('./ISave-e91b70a7.js');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
9
9
|
const UnitMetadata = require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
|
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
12
12
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
13
13
|
const InMemoryFilterColumnDataSource = require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
@@ -74,11 +74,12 @@ class SnkFormConfigManager {
|
|
|
74
74
|
var _a;
|
|
75
75
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
76
76
|
if (fields != undefined && fields.length > 0) {
|
|
77
|
-
return fields.map(({ label, name, readOnly, visible }) => {
|
|
77
|
+
return fields.map(({ label, name, readOnly, visible, required }) => {
|
|
78
78
|
if (label == undefined) {
|
|
79
|
-
|
|
79
|
+
const currentField = dataUnit.getField(name);
|
|
80
|
+
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
|
|
80
81
|
}
|
|
81
|
-
return { name, label, readOnly, visible };
|
|
82
|
+
return { name, label, readOnly, visible, required };
|
|
82
83
|
})
|
|
83
84
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
84
85
|
}
|
|
@@ -267,6 +267,7 @@ class InMemoryLoader {
|
|
|
267
267
|
this.metadata = metadata;
|
|
268
268
|
this.records = records;
|
|
269
269
|
this._dataUnit = new core.DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
270
|
+
this._dataUnit.pageSize = 150;
|
|
270
271
|
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
|
271
272
|
this._dataUnit.dataLoader = (dataUnit, request) => this.inMemoryLoader(dataUnit, request, this.getRecordsToLoad());
|
|
272
273
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
|
@@ -11,7 +11,7 @@ require('./index-1dfc7a6e.js');
|
|
|
11
11
|
require('./ISave-e91b70a7.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-0c7106a0.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
16
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
17
17
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -8,7 +8,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
8
8
|
const ConfigStorage = require('./ConfigStorage-942ce74b.js');
|
|
9
9
|
const DataFetcher = require('./DataFetcher-313debd8.js');
|
|
10
10
|
const authFetcher = require('./auth-fetcher-54f5ff9d.js');
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
|
|
12
12
|
const pesquisaFetcher = require('./pesquisa-fetcher-680e198f.js');
|
|
13
13
|
const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
|
|
14
14
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
@@ -477,8 +477,11 @@ const SnkApplication = class {
|
|
|
477
477
|
/**
|
|
478
478
|
* Exibe o conteúdo passado em um Popup.
|
|
479
479
|
*/
|
|
480
|
-
async showPopUp(content, size = "full", useHeader = true) {
|
|
480
|
+
async showPopUp(content, size = "full", useHeader = true, onCloseCallback) {
|
|
481
481
|
this.clearContent(this._popUp);
|
|
482
|
+
this._popUp.addEventListener("ezClosePopup", () => {
|
|
483
|
+
onCloseCallback();
|
|
484
|
+
}, { once: true });
|
|
482
485
|
this._popUp.appendChild(content);
|
|
483
486
|
this._popUp.opened = true;
|
|
484
487
|
this._popUp.heightMode = size;
|
|
@@ -911,7 +914,7 @@ const SnkApplication = class {
|
|
|
911
914
|
const mdByName = {};
|
|
912
915
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
913
916
|
if (mode === "ADVANCED") {
|
|
914
|
-
return new Promise(accept => {
|
|
917
|
+
return new Promise((accept, reject) => {
|
|
915
918
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
916
919
|
pesquisaContent[core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
917
920
|
pesquisaContent.argument = argument;
|
|
@@ -922,7 +925,7 @@ const SnkApplication = class {
|
|
|
922
925
|
this.closePopUp();
|
|
923
926
|
};
|
|
924
927
|
this.setPopUpTitle(entityDescription);
|
|
925
|
-
this.showPopUp(pesquisaContent);
|
|
928
|
+
this.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
926
929
|
});
|
|
927
930
|
}
|
|
928
931
|
else {
|
|
@@ -8,7 +8,7 @@ const DataFetcher = require('./DataFetcher-313debd8.js');
|
|
|
8
8
|
require('./pesquisa-fetcher-680e198f.js');
|
|
9
9
|
require('./index-1dfc7a6e.js');
|
|
10
10
|
const ISave = require('./ISave-e91b70a7.js');
|
|
11
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
11
|
+
const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
13
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
14
14
|
const constants = require('./constants-35ddd366.js');
|
|
@@ -11,7 +11,7 @@ const index$1 = require('./index-1dfc7a6e.js');
|
|
|
11
11
|
require('./ISave-e91b70a7.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-0c7106a0.js');
|
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
16
16
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
17
17
|
const constants = require('./constants-35ddd366.js');
|
|
@@ -8,17 +8,18 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
|
8
8
|
const index = require('./index-1dfc7a6e.js');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
10
|
const DataFetcher = require('./DataFetcher-313debd8.js');
|
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
11
|
+
const snkDataUnit = require('./snk-data-unit-16791a2f.js');
|
|
12
12
|
require('./pesquisa-fetcher-680e198f.js');
|
|
13
13
|
require('./ISave-e91b70a7.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-0c7106a0.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
18
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
20
|
require('./SnkMessageBuilder-722b104e.js');
|
|
21
21
|
require('./RecordIDUtils-3735135c.js');
|
|
22
|
+
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
22
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
23
24
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
24
25
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -565,7 +566,7 @@ const SnkDataExporter = class {
|
|
|
565
566
|
type: this.getExportType(option),
|
|
566
567
|
};
|
|
567
568
|
await this.resolveExporter(params, (response) => {
|
|
568
|
-
if (response.canExport) {
|
|
569
|
+
if (response.canExport || fileType === index.DataExporterType.EXPORT_TO_PDF) {
|
|
569
570
|
fileViewer(Object.assign(Object.assign({}, response), { fileType,
|
|
570
571
|
isDownload }));
|
|
571
572
|
}
|
|
@@ -4,8 +4,9 @@ const index = require('./index-f9e81701.js');
|
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
6
|
const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
|
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
|
|
8
8
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
9
|
+
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
9
10
|
|
|
10
11
|
const SnkDataUnit = class {
|
|
11
12
|
constructor(hostRef) {
|
|
@@ -412,7 +413,10 @@ const SnkDataUnit = class {
|
|
|
412
413
|
}
|
|
413
414
|
buildRecordWithLinkedFields(record, links, parentSelectedRecord) {
|
|
414
415
|
const newRecord = Object.assign({}, record);
|
|
415
|
-
links.forEach(link =>
|
|
416
|
+
links.forEach(link => {
|
|
417
|
+
const convertedParentSelectedRecord = DataType.convertType(this.dataUnit.getField(link.target).dataType, parentSelectedRecord[link.source]);
|
|
418
|
+
newRecord[link.target] = convertedParentSelectedRecord;
|
|
419
|
+
});
|
|
416
420
|
return newRecord;
|
|
417
421
|
}
|
|
418
422
|
handleCleanOnCopy(records) {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
5
|
+
const snkDataUnit = require('./snk-data-unit-16791a2f.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
require('./SnkMessageBuilder-722b104e.js');
|
|
10
|
-
require('./dataunit-fetcher-
|
|
10
|
+
require('./dataunit-fetcher-0c7106a0.js');
|
|
11
11
|
require('./DataFetcher-313debd8.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
@@ -16,6 +16,7 @@ require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
|
16
16
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
17
17
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
18
18
|
require('./RecordIDUtils-3735135c.js');
|
|
19
|
+
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-5f3c6051.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
9
|
require('./DataFetcher-313debd8.js');
|
|
10
10
|
require('./pesquisa-fetcher-680e198f.js');
|
|
@@ -12,12 +12,12 @@ const index$1 = require('./index-1dfc7a6e.js');
|
|
|
12
12
|
require('./ISave-e91b70a7.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-0c7106a0.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
17
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
18
18
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
19
19
|
const constants = require('./constants-35ddd366.js');
|
|
20
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
|
20
|
+
const snkGuidesViewer = require('./snk-guides-viewer-20c27726.js');
|
|
21
21
|
const SnkMessageBuilder = require('./SnkMessageBuilder-722b104e.js');
|
|
22
22
|
require('./ConfigStorage-942ce74b.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-5f3c6051.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
9
9
|
require('./ConfigStorage-942ce74b.js');
|
|
10
10
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
@@ -106,7 +106,7 @@ const SnkForm = class {
|
|
|
106
106
|
}
|
|
107
107
|
this._configManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this.resourceID);
|
|
108
108
|
this.addFormLegacyConfig();
|
|
109
|
-
this._configManager.loadConfig();
|
|
109
|
+
await this._configManager.loadConfig();
|
|
110
110
|
}
|
|
111
111
|
async handleDataStateChange(evt) {
|
|
112
112
|
var _a;
|
|
@@ -9,14 +9,14 @@ const ConfigStorage = require('./ConfigStorage-942ce74b.js');
|
|
|
9
9
|
const index$1 = require('./index-1dfc7a6e.js');
|
|
10
10
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
|
12
|
-
const IExporterProvider = require('./IExporterProvider-
|
|
12
|
+
const IExporterProvider = require('./IExporterProvider-9479f618.js');
|
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
14
14
|
require('./DataFetcher-313debd8.js');
|
|
15
15
|
require('./pesquisa-fetcher-680e198f.js');
|
|
16
16
|
require('./ISave-e91b70a7.js');
|
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
|
-
require('./dataunit-fetcher-
|
|
19
|
+
require('./dataunit-fetcher-0c7106a0.js');
|
|
20
20
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
21
21
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
22
22
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-5f3c6051.js');
|
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
7
7
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
8
8
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
@@ -13,7 +13,7 @@ const index$1 = require('./index-1dfc7a6e.js');
|
|
|
13
13
|
require('./ISave-e91b70a7.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-0c7106a0.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
18
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
19
19
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
@@ -2,10 +2,10 @@
|
|
|
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-20c27726.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('./SnkFormConfigManager-
|
|
8
|
+
require('./SnkFormConfigManager-5f3c6051.js');
|
|
9
9
|
require('./ConfigStorage-942ce74b.js');
|
|
10
10
|
require('./form-config-fetcher-2dd00e5b.js');
|
|
11
11
|
require('./DataFetcher-313debd8.js');
|
|
@@ -21,7 +21,7 @@ require('./constants-35ddd366.js');
|
|
|
21
21
|
require('./pesquisa-fetcher-680e198f.js');
|
|
22
22
|
require('./ISave-e91b70a7.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
24
|
-
require('./dataunit-fetcher-
|
|
24
|
+
require('./dataunit-fetcher-0c7106a0.js');
|
|
25
25
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
26
26
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
27
27
|
require('./ResourceIDUtils-5ff86aa7.js');
|
|
@@ -9,17 +9,17 @@ const constants = require('./constants-35ddd366.js');
|
|
|
9
9
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
10
10
|
require('./DataFetcher-313debd8.js');
|
|
11
11
|
require('./pesquisa-fetcher-680e198f.js');
|
|
12
|
-
const IExporterProvider = require('./IExporterProvider-
|
|
12
|
+
const IExporterProvider = require('./IExporterProvider-9479f618.js');
|
|
13
13
|
const index = require('./index-1dfc7a6e.js');
|
|
14
14
|
require('./ISave-e91b70a7.js');
|
|
15
15
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
17
|
+
const dataunitFetcher = require('./dataunit-fetcher-0c7106a0.js');
|
|
18
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
19
19
|
const formConfigFetcher = require('./form-config-fetcher-2dd00e5b.js');
|
|
20
20
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
21
21
|
const ConfigStorage = require('./ConfigStorage-942ce74b.js');
|
|
22
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
22
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-5f3c6051.js');
|
|
23
23
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
24
24
|
const index$2 = require('./index-102ba62d.js');
|
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -207,8 +207,11 @@ export class SnkApplication {
|
|
|
207
207
|
/**
|
|
208
208
|
* Exibe o conteúdo passado em um Popup.
|
|
209
209
|
*/
|
|
210
|
-
async showPopUp(content, size = "full", useHeader = true) {
|
|
210
|
+
async showPopUp(content, size = "full", useHeader = true, onCloseCallback) {
|
|
211
211
|
this.clearContent(this._popUp);
|
|
212
|
+
this._popUp.addEventListener("ezClosePopup", () => {
|
|
213
|
+
onCloseCallback();
|
|
214
|
+
}, { once: true });
|
|
212
215
|
this._popUp.appendChild(content);
|
|
213
216
|
this._popUp.opened = true;
|
|
214
217
|
this._popUp.heightMode = size;
|
|
@@ -643,7 +646,7 @@ export class SnkApplication {
|
|
|
643
646
|
const mdByName = {};
|
|
644
647
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
645
648
|
if (mode === "ADVANCED") {
|
|
646
|
-
return new Promise(accept => {
|
|
649
|
+
return new Promise((accept, reject) => {
|
|
647
650
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
648
651
|
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
649
652
|
pesquisaContent.argument = argument;
|
|
@@ -654,7 +657,7 @@ export class SnkApplication {
|
|
|
654
657
|
this.closePopUp();
|
|
655
658
|
};
|
|
656
659
|
this.setPopUpTitle(entityDescription);
|
|
657
|
-
this.showPopUp(pesquisaContent);
|
|
660
|
+
this.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
658
661
|
});
|
|
659
662
|
}
|
|
660
663
|
else {
|
|
@@ -1434,7 +1437,7 @@ export class SnkApplication {
|
|
|
1434
1437
|
},
|
|
1435
1438
|
"showPopUp": {
|
|
1436
1439
|
"complexType": {
|
|
1437
|
-
"signature": "(content: HTMLElement, size?: \"auto\" | \"full\", useHeader?: boolean) => Promise<void>",
|
|
1440
|
+
"signature": "(content: HTMLElement, size?: \"auto\" | \"full\", useHeader?: boolean, onCloseCallback?: Function) => Promise<void>",
|
|
1438
1441
|
"parameters": [{
|
|
1439
1442
|
"tags": [],
|
|
1440
1443
|
"text": ""
|
|
@@ -1444,6 +1447,9 @@ export class SnkApplication {
|
|
|
1444
1447
|
}, {
|
|
1445
1448
|
"tags": [],
|
|
1446
1449
|
"text": ""
|
|
1450
|
+
}, {
|
|
1451
|
+
"tags": [],
|
|
1452
|
+
"text": ""
|
|
1447
1453
|
}],
|
|
1448
1454
|
"references": {
|
|
1449
1455
|
"Promise": {
|
|
@@ -1451,6 +1457,9 @@ export class SnkApplication {
|
|
|
1451
1457
|
},
|
|
1452
1458
|
"HTMLElement": {
|
|
1453
1459
|
"location": "global"
|
|
1460
|
+
},
|
|
1461
|
+
"Function": {
|
|
1462
|
+
"location": "global"
|
|
1454
1463
|
}
|
|
1455
1464
|
},
|
|
1456
1465
|
"return": "Promise<void>"
|
|
@@ -136,7 +136,7 @@ export class SnkDataExporter {
|
|
|
136
136
|
type: this.getExportType(option),
|
|
137
137
|
};
|
|
138
138
|
await this.resolveExporter(params, (response) => {
|
|
139
|
-
if (response.canExport) {
|
|
139
|
+
if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
|
|
140
140
|
fileViewer(Object.assign(Object.assign({}, response), { fileType,
|
|
141
141
|
isDownload }));
|
|
142
142
|
}
|
|
@@ -5,6 +5,7 @@ import { OperationMap, SnkMessageBuilder } from '../../lib/message/SnkMessageBui
|
|
|
5
5
|
import { DatasetStrategy } from '../../lib/http/data-fetcher/fetchers/data-unit/loadstrategy/DatasetStrategy';
|
|
6
6
|
import { getRecordValue } from '../../lib/dataUnit/ValueFormatter';
|
|
7
7
|
import { getSelectedIDs } from '../snk-data-exporter/utils/RecordIDUtils';
|
|
8
|
+
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
8
9
|
export class SnkDataUnit {
|
|
9
10
|
constructor() {
|
|
10
11
|
this._onDataUnitResolve = [];
|
|
@@ -405,7 +406,10 @@ export class SnkDataUnit {
|
|
|
405
406
|
}
|
|
406
407
|
buildRecordWithLinkedFields(record, links, parentSelectedRecord) {
|
|
407
408
|
const newRecord = Object.assign({}, record);
|
|
408
|
-
links.forEach(link =>
|
|
409
|
+
links.forEach(link => {
|
|
410
|
+
const convertedParentSelectedRecord = convertType(this.dataUnit.getField(link.target).dataType, parentSelectedRecord[link.source]);
|
|
411
|
+
newRecord[link.target] = convertedParentSelectedRecord;
|
|
412
|
+
});
|
|
409
413
|
return newRecord;
|
|
410
414
|
}
|
|
411
415
|
handleCleanOnCopy(records) {
|
|
@@ -89,7 +89,7 @@ export class SnkForm {
|
|
|
89
89
|
}
|
|
90
90
|
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
|
|
91
91
|
this.addFormLegacyConfig();
|
|
92
|
-
this._configManager.loadConfig();
|
|
92
|
+
await this._configManager.loadConfig();
|
|
93
93
|
}
|
|
94
94
|
async handleDataStateChange(evt) {
|
|
95
95
|
var _a;
|
|
@@ -71,11 +71,12 @@ export class SnkFormConfigManager {
|
|
|
71
71
|
var _a;
|
|
72
72
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
73
73
|
if (fields != undefined && fields.length > 0) {
|
|
74
|
-
return fields.map(({ label, name, readOnly, visible }) => {
|
|
74
|
+
return fields.map(({ label, name, readOnly, visible, required }) => {
|
|
75
75
|
if (label == undefined) {
|
|
76
|
-
|
|
76
|
+
const currentField = dataUnit.getField(name);
|
|
77
|
+
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
|
|
77
78
|
}
|
|
78
|
-
return { name, label, readOnly, visible };
|
|
79
|
+
return { name, label, readOnly, visible, required };
|
|
79
80
|
})
|
|
80
81
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
81
82
|
}
|
|
@@ -5,6 +5,7 @@ export default class InMemoryLoader {
|
|
|
5
5
|
this.metadata = metadata;
|
|
6
6
|
this.records = records;
|
|
7
7
|
this._dataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
8
|
+
this._dataUnit.pageSize = 150;
|
|
8
9
|
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
|
9
10
|
this._dataUnit.dataLoader = (dataUnit, request) => this.inMemoryLoader(dataUnit, request, this.getRecordsToLoad());
|
|
10
11
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
|
@@ -72,11 +72,12 @@ class SnkFormConfigManager {
|
|
|
72
72
|
var _a;
|
|
73
73
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
74
74
|
if (fields != undefined && fields.length > 0) {
|
|
75
|
-
return fields.map(({ label, name, readOnly, visible }) => {
|
|
75
|
+
return fields.map(({ label, name, readOnly, visible, required }) => {
|
|
76
76
|
if (label == undefined) {
|
|
77
|
-
|
|
77
|
+
const currentField = dataUnit.getField(name);
|
|
78
|
+
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
|
|
78
79
|
}
|
|
79
|
-
return { name, label, readOnly, visible };
|
|
80
|
+
return { name, label, readOnly, visible, required };
|
|
80
81
|
})
|
|
81
82
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
82
83
|
}
|
|
@@ -261,6 +261,7 @@ class InMemoryLoader {
|
|
|
261
261
|
this.metadata = metadata;
|
|
262
262
|
this.records = records;
|
|
263
263
|
this._dataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
264
|
+
this._dataUnit.pageSize = 150;
|
|
264
265
|
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
|
265
266
|
this._dataUnit.dataLoader = (dataUnit, request) => this.inMemoryLoader(dataUnit, request, this.getRecordsToLoad());
|
|
266
267
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
|
@@ -467,8 +467,11 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
467
467
|
/**
|
|
468
468
|
* Exibe o conteúdo passado em um Popup.
|
|
469
469
|
*/
|
|
470
|
-
async showPopUp(content, size = "full", useHeader = true) {
|
|
470
|
+
async showPopUp(content, size = "full", useHeader = true, onCloseCallback) {
|
|
471
471
|
this.clearContent(this._popUp);
|
|
472
|
+
this._popUp.addEventListener("ezClosePopup", () => {
|
|
473
|
+
onCloseCallback();
|
|
474
|
+
}, { once: true });
|
|
472
475
|
this._popUp.appendChild(content);
|
|
473
476
|
this._popUp.opened = true;
|
|
474
477
|
this._popUp.heightMode = size;
|
|
@@ -901,7 +904,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
901
904
|
const mdByName = {};
|
|
902
905
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
903
906
|
if (mode === "ADVANCED") {
|
|
904
|
-
return new Promise(accept => {
|
|
907
|
+
return new Promise((accept, reject) => {
|
|
905
908
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
906
909
|
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
907
910
|
pesquisaContent.argument = argument;
|
|
@@ -912,7 +915,7 @@ const SnkApplication = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
912
915
|
this.closePopUp();
|
|
913
916
|
};
|
|
914
917
|
this.setPopUpTitle(entityDescription);
|
|
915
|
-
this.showPopUp(pesquisaContent);
|
|
918
|
+
this.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
916
919
|
});
|
|
917
920
|
}
|
|
918
921
|
else {
|
|
@@ -556,7 +556,7 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
556
556
|
type: this.getExportType(option),
|
|
557
557
|
};
|
|
558
558
|
await this.resolveExporter(params, (response) => {
|
|
559
|
-
if (response.canExport) {
|
|
559
|
+
if (response.canExport || fileType === DataExporterType.EXPORT_TO_PDF) {
|
|
560
560
|
fileViewer(Object.assign(Object.assign({}, response), { fileType,
|
|
561
561
|
isDownload }));
|
|
562
562
|
}
|
|
@@ -3,6 +3,7 @@ import { JSUtils, DataType, Action, ObjectUtils, DataUnitAction, StringUtils, Ap
|
|
|
3
3
|
import { ApplicationUtils, DialogType } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
4
4
|
import { O as OperationMap, S as SnkMessageBuilder } from './SnkMessageBuilder.js';
|
|
5
5
|
import { g as getRecordValue, d as DatasetStrategy } from './dataunit-fetcher.js';
|
|
6
|
+
import { convertType } from '@sankhyalabs/core/dist/dataunit/metadata/DataType';
|
|
6
7
|
|
|
7
8
|
const getSelectedIDs = (dataUnit) => {
|
|
8
9
|
const selectionInfo = dataUnit.getSelectionInfo();
|
|
@@ -448,7 +449,10 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
448
449
|
}
|
|
449
450
|
buildRecordWithLinkedFields(record, links, parentSelectedRecord) {
|
|
450
451
|
const newRecord = Object.assign({}, record);
|
|
451
|
-
links.forEach(link =>
|
|
452
|
+
links.forEach(link => {
|
|
453
|
+
const convertedParentSelectedRecord = convertType(this.dataUnit.getField(link.target).dataType, parentSelectedRecord[link.source]);
|
|
454
|
+
newRecord[link.target] = convertedParentSelectedRecord;
|
|
455
|
+
});
|
|
452
456
|
return newRecord;
|
|
453
457
|
}
|
|
454
458
|
handleCleanOnCopy(records) {
|
|
@@ -101,7 +101,7 @@ const SnkForm$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
101
101
|
}
|
|
102
102
|
this._configManager = new SnkFormConfigManager(this.configName, this.resourceID);
|
|
103
103
|
this.addFormLegacyConfig();
|
|
104
|
-
this._configManager.loadConfig();
|
|
104
|
+
await this._configManager.loadConfig();
|
|
105
105
|
}
|
|
106
106
|
async handleDataStateChange(evt) {
|
|
107
107
|
var _a;
|
|
@@ -5,7 +5,7 @@ import './index-3aa4977a.js';
|
|
|
5
5
|
import './ISave-d8c8bc59.js';
|
|
6
6
|
import '@sankhyalabs/ezui/dist/collection/utils/constants';
|
|
7
7
|
import { UserInterface as UserInterface$1 } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
|
8
|
-
import { P as PreloadManager } from './dataunit-fetcher-
|
|
8
|
+
import { P as PreloadManager } from './dataunit-fetcher-f7e0ffc0.js';
|
|
9
9
|
import './filter-item-type.enum-d45e026f.js';
|
|
10
10
|
import './form-config-fetcher-30fb808f.js';
|
|
11
11
|
import InMemoryFilterColumnDataSource from '@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource';
|
|
@@ -72,11 +72,12 @@ class SnkFormConfigManager {
|
|
|
72
72
|
var _a;
|
|
73
73
|
const fields = (_a = this._config) === null || _a === void 0 ? void 0 : _a.fields;
|
|
74
74
|
if (fields != undefined && fields.length > 0) {
|
|
75
|
-
return fields.map(({ label, name, readOnly, visible }) => {
|
|
75
|
+
return fields.map(({ label, name, readOnly, visible, required }) => {
|
|
76
76
|
if (label == undefined) {
|
|
77
|
-
|
|
77
|
+
const currentField = dataUnit.getField(name);
|
|
78
|
+
return Object.assign(Object.assign({}, currentField), { name: name !== null && name !== void 0 ? name : currentField.name, readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : currentField.readOnly, visible: visible !== null && visible !== void 0 ? visible : currentField.visible, required: required !== null && required !== void 0 ? required : currentField.required });
|
|
78
79
|
}
|
|
79
|
-
return { name, label, readOnly, visible };
|
|
80
|
+
return { name, label, readOnly, visible, required };
|
|
80
81
|
})
|
|
81
82
|
.filter(field => this.isFieldVisible(field, descriptionFilter));
|
|
82
83
|
}
|
|
@@ -261,6 +261,7 @@ class InMemoryLoader {
|
|
|
261
261
|
this.metadata = metadata;
|
|
262
262
|
this.records = records;
|
|
263
263
|
this._dataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
|
264
|
+
this._dataUnit.pageSize = 150;
|
|
264
265
|
this._dataUnit.metadataLoader = () => this.metadaLoader();
|
|
265
266
|
this._dataUnit.dataLoader = (dataUnit, request) => this.inMemoryLoader(dataUnit, request, this.getRecordsToLoad());
|
|
266
267
|
this._dataUnit.saveLoader = (_dataUnit, changes) => this.saveLoader(_dataUnit, changes);
|
|
@@ -7,7 +7,7 @@ import './index-3aa4977a.js';
|
|
|
7
7
|
import './ISave-d8c8bc59.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-f7e0ffc0.js';
|
|
11
11
|
import './filter-item-type.enum-d45e026f.js';
|
|
12
12
|
import './form-config-fetcher-30fb808f.js';
|
|
13
13
|
import { R as ResourceIDUtils } from './ResourceIDUtils-a114189a.js';
|
|
@@ -4,7 +4,7 @@ import { ApplicationUtils } from '@sankhyalabs/ezui/dist/collection/utils';
|
|
|
4
4
|
import { C as ConfigStorage } from './ConfigStorage-86187da3.js';
|
|
5
5
|
import { d as dist, D as DataFetcher, U as UrlUtils } from './DataFetcher-c1baf61d.js';
|
|
6
6
|
import { A as AutorizationType, a as AuthFetcher } from './auth-fetcher-039abba3.js';
|
|
7
|
-
import { D as DataUnitFetcher } from './dataunit-fetcher-
|
|
7
|
+
import { D as DataUnitFetcher } from './dataunit-fetcher-f7e0ffc0.js';
|
|
8
8
|
import { P as PesquisaFetcher } from './pesquisa-fetcher-03c8f919.js';
|
|
9
9
|
import { S as SnkMessageBuilder } from './SnkMessageBuilder-89925609.js';
|
|
10
10
|
import './form-config-fetcher-30fb808f.js';
|
|
@@ -473,8 +473,11 @@ const SnkApplication = class {
|
|
|
473
473
|
/**
|
|
474
474
|
* Exibe o conteúdo passado em um Popup.
|
|
475
475
|
*/
|
|
476
|
-
async showPopUp(content, size = "full", useHeader = true) {
|
|
476
|
+
async showPopUp(content, size = "full", useHeader = true, onCloseCallback) {
|
|
477
477
|
this.clearContent(this._popUp);
|
|
478
|
+
this._popUp.addEventListener("ezClosePopup", () => {
|
|
479
|
+
onCloseCallback();
|
|
480
|
+
}, { once: true });
|
|
478
481
|
this._popUp.appendChild(content);
|
|
479
482
|
this._popUp.opened = true;
|
|
480
483
|
this._popUp.heightMode = size;
|
|
@@ -907,7 +910,7 @@ const SnkApplication = class {
|
|
|
907
910
|
const mdByName = {};
|
|
908
911
|
const { entity, entityDescription, criteria, searchOptions } = options;
|
|
909
912
|
if (mode === "ADVANCED") {
|
|
910
|
-
return new Promise(accept => {
|
|
913
|
+
return new Promise((accept, reject) => {
|
|
911
914
|
const pesquisaContent = document.createElement("snk-pesquisa");
|
|
912
915
|
pesquisaContent[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME] = `entity_${entity}`;
|
|
913
916
|
pesquisaContent.argument = argument;
|
|
@@ -918,7 +921,7 @@ const SnkApplication = class {
|
|
|
918
921
|
this.closePopUp();
|
|
919
922
|
};
|
|
920
923
|
this.setPopUpTitle(entityDescription);
|
|
921
|
-
this.showPopUp(pesquisaContent);
|
|
924
|
+
this.showPopUp(pesquisaContent, undefined, undefined, reject);
|
|
922
925
|
});
|
|
923
926
|
}
|
|
924
927
|
else {
|