@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-38445.1 → 0.0.0-bugfix-dev-KB-65214.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ConfigStorage-942ce74b.js → ConfigStorage-e49214c6.js} +3 -2
- package/dist/cjs/{DataFetcher-313debd8.js → DataFetcher-77729a93.js} +7 -2
- package/dist/cjs/{IExporterProvider-597949f9.js → IExporterProvider-10b7fed5.js} +4 -4
- package/dist/cjs/{SnkFormConfigManager-1b13bacd.js → SnkFormConfigManager-beebf47a.js} +7 -9
- package/dist/cjs/{SnkMessageBuilder-722b104e.js → SnkMessageBuilder-cceebbae.js} +2 -2
- package/dist/cjs/{auth-fetcher-54f5ff9d.js → auth-fetcher-29bb791c.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-688d3f05.js → dataunit-fetcher-d4873076.js} +1 -1
- package/dist/cjs/{form-config-fetcher-2dd00e5b.js → form-config-fetcher-feb08214.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{pesquisa-fetcher-680e198f.js → pesquisa-fetcher-a1d0353f.js} +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_4.cjs.entry.js +5 -5
- package/dist/cjs/snk-application.cjs.entry.js +7 -7
- package/dist/cjs/snk-attach.cjs.entry.js +5 -5
- package/dist/cjs/snk-crud.cjs.entry.js +11 -6
- package/dist/cjs/snk-data-exporter.cjs.entry.js +8 -8
- package/dist/cjs/{snk-data-unit-685272e7.js → snk-data-unit-f0221097.js} +21 -10
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +9 -10
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form-config.cjs.entry.js +3 -3
- package/dist/cjs/snk-form.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-67605336.js → snk-guides-viewer-aafc3073.js} +12 -7
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +7 -7
- package/dist/cjs/snk-personalized-filter.cjs.entry.js +3 -3
- package/dist/cjs/snk-simple-crud.cjs.entry.js +11 -10
- package/dist/collection/components/snk-crud/snk-crud.js +57 -1
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js +1 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +22 -2
- package/dist/collection/components/snk-data-exporter/exporter-email-sender/options-step.js +1 -1
- package/dist/collection/components/snk-data-exporter/structure/ItemBuilder.js +2 -2
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +36 -8
- package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +5 -7
- package/dist/collection/components/snk-form-config/snk-form-config.js +1 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +21 -3
- package/dist/collection/lib/configs/ConfigStorage.js +1 -0
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +8 -3
- package/dist/collection/lib/message/resources/snk-data-unit.msg.js +1 -1
- package/dist/collection/lib/message/resources/snk-exporter.msg.js +1 -1
- package/dist/components/ConfigStorage.js +1 -0
- package/dist/components/DataFetcher.js +8 -3
- package/dist/components/SnkFormConfigManager.js +5 -7
- package/dist/components/SnkMessageBuilder.js +2 -2
- package/dist/components/snk-crud.js +8 -1
- package/dist/components/snk-data-exporter2.js +2 -2
- package/dist/components/snk-data-unit2.js +20 -8
- package/dist/components/snk-detail-view2.js +9 -4
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-simple-crud2.js +5 -3
- package/dist/esm/{ConfigStorage-86187da3.js → ConfigStorage-e476378d.js} +3 -2
- package/dist/esm/{DataFetcher-c1baf61d.js → DataFetcher-773a3e4b.js} +8 -3
- package/dist/esm/{IExporterProvider-63a188b6.js → IExporterProvider-d597f27d.js} +4 -4
- package/dist/esm/{SnkFormConfigManager-d4554df9.js → SnkFormConfigManager-298cd647.js} +7 -9
- package/dist/esm/{SnkMessageBuilder-89925609.js → SnkMessageBuilder-ae87b754.js} +2 -2
- package/dist/esm/{auth-fetcher-039abba3.js → auth-fetcher-a411f73c.js} +1 -1
- package/dist/esm/{dataunit-fetcher-264191b2.js → dataunit-fetcher-3d2ec959.js} +1 -1
- package/dist/esm/{form-config-fetcher-30fb808f.js → form-config-fetcher-e0382e5a.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{pesquisa-fetcher-03c8f919.js → pesquisa-fetcher-a87445a0.js} +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_4.entry.js +5 -5
- package/dist/esm/snk-application.entry.js +7 -7
- package/dist/esm/snk-attach.entry.js +5 -5
- package/dist/esm/snk-crud.entry.js +11 -6
- package/dist/esm/snk-data-exporter.entry.js +8 -8
- package/dist/esm/{snk-data-unit-63f83504.js → snk-data-unit-1ef94aef.js} +21 -10
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +9 -10
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-filter-bar.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form-config.entry.js +3 -3
- package/dist/esm/snk-form.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-151f6091.js → snk-guides-viewer-62124f3d.js} +12 -7
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-simple-crud.entry.js +11 -10
- package/dist/sankhyablocks/{p-fe79f83a.js → p-091ce761.js} +1 -1
- package/dist/sankhyablocks/p-0c68f40f.entry.js +1 -0
- package/dist/sankhyablocks/{p-913a9979.js → p-0cd3c0a9.js} +1 -1
- package/dist/sankhyablocks/{p-82a0bfb0.entry.js → p-162b9a59.entry.js} +2 -2
- package/dist/sankhyablocks/p-16a1dd18.entry.js +1 -0
- package/dist/sankhyablocks/{p-df5451c7.js → p-181975f1.js} +1 -1
- package/dist/sankhyablocks/{p-af8efd95.js → p-25f1fc39.js} +1 -1
- package/dist/sankhyablocks/{p-8fc470e5.entry.js → p-2e9c764c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-aff76a53.js → p-3287a6cc.js} +2 -2
- package/dist/sankhyablocks/{p-bad55caa.entry.js → p-421bec84.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7505da04.entry.js → p-42f7b05d.entry.js} +1 -1
- package/dist/sankhyablocks/p-51999ab5.entry.js +1 -0
- package/dist/sankhyablocks/{p-19c18d06.entry.js → p-52a6a293.entry.js} +1 -1
- package/dist/sankhyablocks/p-594bc21d.js +1 -0
- package/dist/sankhyablocks/p-5f016aed.js +1 -0
- package/dist/sankhyablocks/{p-47b60deb.entry.js → p-62f34e6f.entry.js} +1 -1
- package/dist/sankhyablocks/p-684a2590.entry.js +1 -0
- package/dist/sankhyablocks/p-70001ac1.js +1 -0
- package/dist/sankhyablocks/p-74c665d5.entry.js +1 -0
- package/dist/sankhyablocks/{p-3a212712.js → p-76a65660.js} +1 -1
- package/dist/sankhyablocks/p-7c4aabe2.js +1 -0
- package/dist/sankhyablocks/{p-c5268346.entry.js → p-8c1ff936.entry.js} +1 -1
- package/dist/sankhyablocks/p-939e15d3.entry.js +1 -0
- package/dist/sankhyablocks/{p-a1d72395.entry.js → p-9dfda04a.entry.js} +1 -1
- package/dist/sankhyablocks/{p-eae7a817.entry.js → p-bd008859.entry.js} +1 -1
- package/dist/sankhyablocks/p-c273d6ee.js +1 -0
- package/dist/sankhyablocks/p-d65d98ed.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-crud/snk-crud.d.ts +9 -0
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +5 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +6 -1
- package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +2 -2
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +4 -0
- package/dist/types/components.d.ts +41 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
- package/dist/sankhyablocks/p-14b9f964.entry.js +0 -1
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-75f83d1d.entry.js +0 -1
- package/dist/sankhyablocks/p-7a337364.js +0 -1
- package/dist/sankhyablocks/p-829d4045.js +0 -1
- package/dist/sankhyablocks/p-941bf3ef.entry.js +0 -1
- package/dist/sankhyablocks/p-b4b21558.entry.js +0 -1
- package/dist/sankhyablocks/p-c053256c.entry.js +0 -1
- package/dist/sankhyablocks/p-cefba299.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-fcac4dfc.js +0 -1
|
@@ -7,17 +7,17 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
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
|
-
const DataFetcher = require('./DataFetcher-
|
|
11
|
-
const snkDataUnit = require('./snk-data-unit-
|
|
12
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
const DataFetcher = require('./DataFetcher-77729a93.js');
|
|
11
|
+
const snkDataUnit = require('./snk-data-unit-f0221097.js');
|
|
12
|
+
require('./pesquisa-fetcher-a1d0353f.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-d4873076.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-feb08214.js');
|
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
|
20
|
-
require('./SnkMessageBuilder-
|
|
20
|
+
require('./SnkMessageBuilder-cceebbae.js');
|
|
21
21
|
require('./RecordIDUtils-3735135c.js');
|
|
22
22
|
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
@@ -135,7 +135,7 @@ class ItemBuilder {
|
|
|
135
135
|
getExportToXLS(groupName) {
|
|
136
136
|
return {
|
|
137
137
|
id: index.DataExporterOption.EXPORT_TO_XLS,
|
|
138
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
|
138
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,
|
|
139
139
|
group: groupName
|
|
140
140
|
};
|
|
141
141
|
}
|
|
@@ -178,7 +178,7 @@ class ItemBuilder {
|
|
|
178
178
|
getExportPageToXLS() {
|
|
179
179
|
return {
|
|
180
180
|
id: index.DataExporterOption.EXPORT_PAGE_TO_XLS,
|
|
181
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
|
181
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`
|
|
182
182
|
};
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const index = require('./index-f9e81701.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
6
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
|
6
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
|
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-d4873076.js');
|
|
8
8
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
|
|
@@ -61,6 +61,7 @@ const SnkDataUnit = class {
|
|
|
61
61
|
this.ignoreSaveMessage = undefined;
|
|
62
62
|
this.configName = undefined;
|
|
63
63
|
this.resourceID = undefined;
|
|
64
|
+
this.domainMessagesBuilder = undefined;
|
|
64
65
|
}
|
|
65
66
|
observePageSize() {
|
|
66
67
|
if (this.dataUnit) {
|
|
@@ -477,7 +478,8 @@ const SnkDataUnit = class {
|
|
|
477
478
|
if (this.ignoreSaveMessage) {
|
|
478
479
|
return;
|
|
479
480
|
}
|
|
480
|
-
const
|
|
481
|
+
const saveOperation = action.payload.changes[0]._operation.toLowerCase();
|
|
482
|
+
const msg = this.getMessage("snkDataUnit.saveInfo", action.payload.records[0], saveOperation);
|
|
481
483
|
if (msg != undefined) {
|
|
482
484
|
this.showSuccessMessage(msg);
|
|
483
485
|
}
|
|
@@ -508,10 +510,13 @@ const SnkDataUnit = class {
|
|
|
508
510
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
509
511
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-data-unit.msg.ts"
|
|
510
512
|
*/
|
|
511
|
-
getMessage(key, params = undefined) {
|
|
513
|
+
getMessage(key, params = undefined, customOperation) {
|
|
512
514
|
if (!params) {
|
|
513
515
|
params = this.getMessageParams();
|
|
514
516
|
}
|
|
517
|
+
if (customOperation) {
|
|
518
|
+
this.messagesBuilder.currentOperation = customOperation;
|
|
519
|
+
}
|
|
515
520
|
return this.messagesBuilder.getMessage(key, params);
|
|
516
521
|
}
|
|
517
522
|
getMessageParams() {
|
|
@@ -542,7 +547,7 @@ const SnkDataUnit = class {
|
|
|
542
547
|
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
|
|
543
548
|
}
|
|
544
549
|
}
|
|
545
|
-
async loadDataUnit() {
|
|
550
|
+
async loadDataUnit(forceMetadataLoad = true) {
|
|
546
551
|
var _a;
|
|
547
552
|
if (this.dataUnit == null && this._application && this.entityName) {
|
|
548
553
|
this.dataUnit = await this.getDataUnitParentOrChild();
|
|
@@ -552,7 +557,8 @@ const SnkDataUnit = class {
|
|
|
552
557
|
this.dataUnit.unsubscribe(this._dataUnitObserver);
|
|
553
558
|
this.dataUnit.addInterceptor(this);
|
|
554
559
|
this.dataUnit.subscribe(this._dataUnitObserver);
|
|
555
|
-
|
|
560
|
+
if (forceMetadataLoad || !this.dataUnit.metadata)
|
|
561
|
+
await this.dataUnit.loadMetadata();
|
|
556
562
|
if ((_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) {
|
|
557
563
|
this.getMetadataByRow(this.dataUnit);
|
|
558
564
|
}
|
|
@@ -618,6 +624,13 @@ const SnkDataUnit = class {
|
|
|
618
624
|
parent = parent.parentElement;
|
|
619
625
|
}
|
|
620
626
|
}
|
|
627
|
+
instanceMessagesBuilder() {
|
|
628
|
+
var _a;
|
|
629
|
+
if (this.messagesBuilder) {
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder((_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName);
|
|
633
|
+
}
|
|
621
634
|
//---------------------------------------------
|
|
622
635
|
// Lifecycle web component
|
|
623
636
|
//---------------------------------------------
|
|
@@ -625,9 +638,7 @@ const SnkDataUnit = class {
|
|
|
625
638
|
this._application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
626
639
|
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
|
627
640
|
this._parentSnkDataUnit = this.getParentSnkDataUnit();
|
|
628
|
-
|
|
629
|
-
this.messagesBuilder = new SnkMessageBuilder.SnkMessageBuilder(this.entityName);
|
|
630
|
-
}
|
|
641
|
+
this.instanceMessagesBuilder();
|
|
631
642
|
}
|
|
632
643
|
disconnectedCallback() {
|
|
633
644
|
if (this.dataUnit) {
|
|
@@ -635,7 +646,7 @@ const SnkDataUnit = class {
|
|
|
635
646
|
}
|
|
636
647
|
}
|
|
637
648
|
async componentDidLoad() {
|
|
638
|
-
await this.loadDataUnit();
|
|
649
|
+
await this.loadDataUnit(false);
|
|
639
650
|
this.handlerLinkFields();
|
|
640
651
|
}
|
|
641
652
|
render() {
|
|
@@ -2,13 +2,13 @@
|
|
|
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-f0221097.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
|
-
require('./SnkMessageBuilder-
|
|
10
|
-
require('./dataunit-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
9
|
+
require('./SnkMessageBuilder-cceebbae.js');
|
|
10
|
+
require('./dataunit-fetcher-d4873076.js');
|
|
11
|
+
require('./DataFetcher-77729a93.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
@@ -4,22 +4,22 @@ 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-beebf47a.js');
|
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
9
|
-
require('./DataFetcher-
|
|
10
|
-
require('./pesquisa-fetcher-
|
|
9
|
+
require('./DataFetcher-77729a93.js');
|
|
10
|
+
require('./pesquisa-fetcher-a1d0353f.js');
|
|
11
11
|
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-d4873076.js');
|
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
17
|
-
require('./form-config-fetcher-
|
|
17
|
+
require('./form-config-fetcher-feb08214.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-
|
|
21
|
-
const SnkMessageBuilder = require('./SnkMessageBuilder-
|
|
22
|
-
require('./ConfigStorage-
|
|
20
|
+
const snkGuidesViewer = require('./snk-guides-viewer-aafc3073.js');
|
|
21
|
+
const SnkMessageBuilder = require('./SnkMessageBuilder-cceebbae.js');
|
|
22
|
+
require('./ConfigStorage-e49214c6.js');
|
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
|
25
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
|
@@ -227,14 +227,13 @@ const SnkDetailView = class {
|
|
|
227
227
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
|
228
228
|
}
|
|
229
229
|
loadMetadata() {
|
|
230
|
-
var _a;
|
|
231
230
|
if (!this.dataUnit) {
|
|
232
231
|
return;
|
|
233
232
|
}
|
|
234
233
|
if (!this.formConfigManager.isLoaded) {
|
|
235
234
|
return;
|
|
236
235
|
}
|
|
237
|
-
const formConfig = this.formConfigManager.getConfig(
|
|
236
|
+
const formConfig = this.formConfigManager.getConfig(this.dataUnit);
|
|
238
237
|
//this._cardsState = formConfig?.cardsState;
|
|
239
238
|
this._formMetadata = form.buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
|
240
239
|
}
|
|
@@ -20,7 +20,7 @@ const OptionsStep = ({ getMessage, changeInfo, data }) => {
|
|
|
20
20
|
const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
|
|
21
21
|
const formatOptions = [
|
|
22
22
|
{ label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
|
|
23
|
-
{ label: getMessage("snkExporter.
|
|
23
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
|
|
24
24
|
];
|
|
25
25
|
const typeOptions = [
|
|
26
26
|
{ label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
|
|
@@ -5,15 +5,15 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index$1 = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const EzScrollDirection = require('@sankhyalabs/ezui/dist/collection/components/ez-scroller/EzScrollDirection');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-e49214c6.js');
|
|
9
9
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
|
10
10
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
11
11
|
const index = require('./index-c5771aba.js');
|
|
12
12
|
const filterNumberVariation = require('./filterNumberVariation-d65332da.js');
|
|
13
13
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
14
14
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
15
|
-
require('./form-config-fetcher-
|
|
16
|
-
require('./DataFetcher-
|
|
15
|
+
require('./form-config-fetcher-feb08214.js');
|
|
16
|
+
require('./DataFetcher-77729a93.js');
|
|
17
17
|
require('./PrintUtils-bcaeb82f.js');
|
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
19
19
|
|
|
@@ -6,10 +6,10 @@ const index = require('./index-f9e81701.js');
|
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const filterItemType_enum = require('./filter-item-type.enum-a7ffdaa6.js');
|
|
8
8
|
const presentationMode = require('./presentationMode-52ec3bdd.js');
|
|
9
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
9
|
+
const ConfigStorage = require('./ConfigStorage-e49214c6.js');
|
|
10
10
|
const filterType_enum = require('./filter-type.enum-b14ce507.js');
|
|
11
|
-
require('./form-config-fetcher-
|
|
12
|
-
require('./DataFetcher-
|
|
11
|
+
require('./form-config-fetcher-feb08214.js');
|
|
12
|
+
require('./DataFetcher-77729a93.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -7,9 +7,9 @@ const Sortable = require('./Sortable-fb1c4cbb.js');
|
|
|
7
7
|
const core = require('@sankhyalabs/core');
|
|
8
8
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
10
|
+
const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
|
|
11
11
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
|
12
|
-
require('./DataFetcher-
|
|
12
|
+
require('./DataFetcher-77729a93.js');
|
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
15
15
|
|
|
@@ -80,7 +80,7 @@ const SnkFormConfig = class {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
getConfig() {
|
|
83
|
-
let config = this.configManager.getConfig(
|
|
83
|
+
let config = this.configManager.getConfig(this.dataUnit);
|
|
84
84
|
if (config.fields && config.fields.length === 0) {
|
|
85
85
|
config = undefined;
|
|
86
86
|
}
|
|
@@ -4,11 +4,11 @@ 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-beebf47a.js');
|
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
|
9
|
-
require('./ConfigStorage-
|
|
10
|
-
require('./form-config-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
9
|
+
require('./ConfigStorage-e49214c6.js');
|
|
10
|
+
require('./form-config-fetcher-feb08214.js');
|
|
11
|
+
require('./DataFetcher-77729a93.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-e49214c6.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-10b7fed5.js');
|
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
14
|
-
require('./DataFetcher-
|
|
15
|
-
require('./pesquisa-fetcher-
|
|
14
|
+
require('./DataFetcher-77729a93.js');
|
|
15
|
+
require('./pesquisa-fetcher-a1d0353f.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-d4873076.js');
|
|
20
20
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
21
|
-
require('./form-config-fetcher-
|
|
21
|
+
require('./form-config-fetcher-feb08214.js');
|
|
22
22
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
|
24
24
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -2,20 +2,20 @@
|
|
|
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-beebf47a.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');
|
|
9
9
|
const constants = require('./constants-35ddd366.js');
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
10
|
+
require('./DataFetcher-77729a93.js');
|
|
11
|
+
require('./pesquisa-fetcher-a1d0353f.js');
|
|
12
12
|
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-d4873076.js');
|
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
18
|
-
require('./form-config-fetcher-
|
|
18
|
+
require('./form-config-fetcher-feb08214.js');
|
|
19
19
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
|
20
20
|
|
|
21
21
|
const snkGuidesViewerCss = ".sc-snk-guides-viewer-h{--snk-guides-viewer--space-large:var(--space--large, 24px);--snk-guides-viewer--space-medium:var(--space--medium, 12px);--snk-guides-viewer__header--min-height:94px;--snk-guides-viewer__header--z-index:var(--more-visible, 2);--snk-guides-viewer__header--background-color:var(--background--body, #fafcff);--snk-guides-viewer__guide-navigator--width:340px;display:block}snk-form-view.sc-snk-guides-viewer{width:100%}.snk-guides-viewer.sc-snk-guides-viewer{position:relative;padding-left:0px;padding-top:0px;padding-right:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__detail-container.sc-snk-guides-viewer{display:flex;row-gap:24px;flex-direction:column}.snk-guides-viewer__header.sc-snk-guides-viewer{position:sticky;align-items:center;top:0;z-index:var(--snk-guides-viewer__header--z-index);background-color:var(--snk-guides-viewer__header--background-color);min-height:var(--snk-guides-viewer__header--min-height);width:calc(100% + (var(--snk-guides-viewer--space-large) * 2));padding-left:var(--snk-guides-viewer--space-large);padding-right:var(--snk-guides-viewer--space-large);padding-top:var(--snk-guides-viewer--space-large);padding-bottom:var(--snk-guides-viewer--space-medium);margin-left:calc(var(--snk-guides-viewer--space-large) * -1);margin-right:calc(var(--snk-guides-viewer--space-large) * -1);margin-bottom:var(--snk-guides-viewer--space-medium)}.snk-guides-viewer__header-breadcrumb.sc-snk-guides-viewer{width:25%;display:flex}.snk-guides-viewer__header-taskbar.sc-snk-guides-viewer{width:75%}.snk-guides-viewer__container.sc-snk-guides-viewer{display:grid;grid-template-columns:minmax(0, auto) minmax(0, 100%);height:100%;column-gap:var(--snk-guides-viewer--space-large)}.snk-guides-viewer__guide-navigator.sc-snk-guides-viewer{position:sticky;top:calc(var(--snk-guides-viewer__header--min-height) + var(--snk-guides-viewer--space-medium));height:calc(100vh - var(--snk-guides-viewer__header--min-height) - var(--snk-guides-viewer--space-large) - var(--snk-guides-viewer--space-medium))}.snk-guides-viewer__guide-navigator[open].sc-snk-guides-viewer{width:var(--snk-guides-viewer__guide-navigator--width);max-width:var(--snk-guides-viewer__guide-navigator--width);min-width:var(--snk-guides-viewer__guide-navigator--width)}.snk-guides-viewer__detail-content.sc-snk-guides-viewer{min-height:100%;align-items:flex-start;align-content:flex-start}";
|
|
@@ -43,6 +43,7 @@ const SnkGuidesViewer = class {
|
|
|
43
43
|
this.resourceID = undefined;
|
|
44
44
|
this.detailTaskbarCustomContainerId = undefined;
|
|
45
45
|
this.formLegacyConfigName = undefined;
|
|
46
|
+
this.getCustomTitle = undefined;
|
|
46
47
|
this._hasToCreateFieldSearch = true;
|
|
47
48
|
this._breadcrumbItems = [];
|
|
48
49
|
this._guides = undefined;
|
|
@@ -129,7 +130,7 @@ const SnkGuidesViewer = class {
|
|
|
129
130
|
}
|
|
130
131
|
onContentCardChanged(evt) {
|
|
131
132
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
|
|
132
|
-
.then(() => this.masterFormConfig = this._configManager.getConfig(this.
|
|
133
|
+
.then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
|
|
133
134
|
}
|
|
134
135
|
/**
|
|
135
136
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
@@ -480,6 +481,10 @@ const SnkGuidesViewer = class {
|
|
|
480
481
|
}
|
|
481
482
|
return "";
|
|
482
483
|
}
|
|
484
|
+
getTitle() {
|
|
485
|
+
var _a, _b;
|
|
486
|
+
return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
|
|
487
|
+
}
|
|
483
488
|
componentDidLoad() {
|
|
484
489
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
485
490
|
}
|
|
@@ -493,7 +498,7 @@ const SnkGuidesViewer = class {
|
|
|
493
498
|
}
|
|
494
499
|
this.loadTaskbarProcessor();
|
|
495
500
|
const showGuides = this._guides && (this._guides.length > 1);
|
|
496
|
-
return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, index.h("div", { class: "ez-row snk-guides-viewer__header" }, index.h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, index.h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.
|
|
501
|
+
return (index.h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, index.h("div", { class: "ez-row snk-guides-viewer__header" }, index.h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, index.h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), index.h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, index.h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
497
502
|
index.h("div", { class: "ez-margin-top--extra-small" }, index.h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${core.ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != index$1.PresentationMode.SECONDARY && this.buildTaskBar()), index.h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
498
503
|
index.h("ez-guide-navigator", { ref: (ref) => this._guideNavigator = ref, class: "snk-guides-viewer__guide-navigator", items: this._guides, selectedId: this.selectedGuide ? this.selectedGuide.id : undefined, onEzSelectionChange: evt => this.updateSelectedGuideHandler(evt.detail) })
|
|
499
504
|
:
|
|
@@ -2,13 +2,13 @@
|
|
|
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-aafc3073.js');
|
|
6
6
|
require('./index-f9e81701.js');
|
|
7
7
|
require('@sankhyalabs/core');
|
|
8
|
-
require('./SnkFormConfigManager-
|
|
9
|
-
require('./ConfigStorage-
|
|
10
|
-
require('./form-config-fetcher-
|
|
11
|
-
require('./DataFetcher-
|
|
8
|
+
require('./SnkFormConfigManager-beebf47a.js');
|
|
9
|
+
require('./ConfigStorage-e49214c6.js');
|
|
10
|
+
require('./form-config-fetcher-feb08214.js');
|
|
11
|
+
require('./DataFetcher-77729a93.js');
|
|
12
12
|
require('./PrintUtils-bcaeb82f.js');
|
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
@@ -18,10 +18,10 @@ require('./taskbar-elements-9ad1f9c0.js');
|
|
|
18
18
|
require('./index-1dfc7a6e.js');
|
|
19
19
|
require('./index-102ba62d.js');
|
|
20
20
|
require('./constants-35ddd366.js');
|
|
21
|
-
require('./pesquisa-fetcher-
|
|
21
|
+
require('./pesquisa-fetcher-a1d0353f.js');
|
|
22
22
|
require('./ISave-e91b70a7.js');
|
|
23
23
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
|
24
|
-
require('./dataunit-fetcher-
|
|
24
|
+
require('./dataunit-fetcher-d4873076.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');
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-f9e81701.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-0184ffbb.js');
|
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
8
|
+
const ConfigStorage = require('./ConfigStorage-e49214c6.js');
|
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
10
10
|
const index$1 = require('./index-c5771aba.js');
|
|
11
11
|
const index$2 = require('./index-102ba62d.js');
|
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
13
|
-
require('./form-config-fetcher-
|
|
14
|
-
require('./DataFetcher-
|
|
13
|
+
require('./form-config-fetcher-feb08214.js');
|
|
14
|
+
require('./DataFetcher-77729a93.js');
|
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
|
17
17
|
|
|
@@ -7,19 +7,19 @@ const core = require('@sankhyalabs/core');
|
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const constants = require('./constants-35ddd366.js');
|
|
9
9
|
const taskbarElements = require('./taskbar-elements-9ad1f9c0.js');
|
|
10
|
-
require('./DataFetcher-
|
|
11
|
-
require('./pesquisa-fetcher-
|
|
12
|
-
const IExporterProvider = require('./IExporterProvider-
|
|
10
|
+
require('./DataFetcher-77729a93.js');
|
|
11
|
+
require('./pesquisa-fetcher-a1d0353f.js');
|
|
12
|
+
const IExporterProvider = require('./IExporterProvider-10b7fed5.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-d4873076.js');
|
|
18
18
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
|
19
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
|
19
|
+
const formConfigFetcher = require('./form-config-fetcher-feb08214.js');
|
|
20
20
|
const fieldSearch = require('./field-search-f56aa7d6.js');
|
|
21
|
-
const ConfigStorage = require('./ConfigStorage-
|
|
22
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
|
21
|
+
const ConfigStorage = require('./ConfigStorage-e49214c6.js');
|
|
22
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-beebf47a.js');
|
|
23
23
|
const RecordIDUtils = require('./RecordIDUtils-3735135c.js');
|
|
24
24
|
const index$2 = require('./index-102ba62d.js');
|
|
25
25
|
require('./PrintUtils-bcaeb82f.js');
|
|
@@ -137,6 +137,7 @@ const SnkSimpleCrud = class {
|
|
|
137
137
|
this.formLegacyConfigName = undefined;
|
|
138
138
|
this.ignoreReadOnlyFormFields = false;
|
|
139
139
|
this.autoFocus = true;
|
|
140
|
+
this.domainMessagesBuilder = undefined;
|
|
140
141
|
this.autoLoad = undefined;
|
|
141
142
|
}
|
|
142
143
|
/**
|
|
@@ -752,8 +753,8 @@ const SnkSimpleCrud = class {
|
|
|
752
753
|
return core.StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
|
|
753
754
|
}
|
|
754
755
|
getFormConfig() {
|
|
755
|
-
var _a
|
|
756
|
-
const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(
|
|
756
|
+
var _a;
|
|
757
|
+
const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
|
|
757
758
|
if (!this.configName && !configFromManager) {
|
|
758
759
|
return this.formConfig;
|
|
759
760
|
}
|
|
@@ -773,7 +774,7 @@ const SnkSimpleCrud = class {
|
|
|
773
774
|
if (this.dataUnit == undefined) {
|
|
774
775
|
return;
|
|
775
776
|
}
|
|
776
|
-
return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this) }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index$1.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
777
|
+
return (index$1.h("snk-data-unit", { ref: ref => this._snkDataUnit = ref, class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), pageSize: this.getPageSize(), onInsertionMode: () => this.goToView(constants.VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === constants.VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, index$1.h("header", null, index$1.h("slot", { name: "snkSimpleCrudHeader" })), index$1.h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, index$1.h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, "data-exporter-store-key": this.getDataExporterStoreKey(), slot: "leftButtons", presentationMode: index.PresentationMode.SECONDARY }, index$1.h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), index$1.h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, index$1.h("stack-item", null, index$1.h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(constants.VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
777
778
|
? undefined
|
|
778
779
|
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, index$1.h("div", { slot: "footer" }, index$1.h("slot", { name: "snkSimpleCrudFooter" })))), index$1.h("stack-item", null, index$1.h("ez-form", { ref: (ref) => this._form = ref, class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: this.getFormConfig(), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && index$1.h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && index$1.h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), index$1.h("div", { id: `${this._customContainerId}` }, index$1.h("slot", { name: "SnkConfigContainerSlot" }))), index$1.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index$1.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
779
780
|
}
|
|
@@ -39,6 +39,8 @@ export class SnkCrud {
|
|
|
39
39
|
this.disablePersonalizedFilter = undefined;
|
|
40
40
|
this.autoLoad = undefined;
|
|
41
41
|
this.autoFocus = true;
|
|
42
|
+
this.domainMessagesBuilder = undefined;
|
|
43
|
+
this.setCustomFormTitle = undefined;
|
|
42
44
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
|
43
45
|
}
|
|
44
46
|
/**
|
|
@@ -147,6 +149,7 @@ export class SnkCrud {
|
|
|
147
149
|
else if (viewMode === VIEW_MODE.FORM) {
|
|
148
150
|
this._guidesViewer.setFocus();
|
|
149
151
|
}
|
|
152
|
+
this.viewModeChanged.emit(viewMode);
|
|
150
153
|
}
|
|
151
154
|
openConfig(viewMode) {
|
|
152
155
|
this._snkConfigurator.close();
|
|
@@ -210,6 +213,7 @@ export class SnkCrud {
|
|
|
210
213
|
this._snkDataUnit = parent;
|
|
211
214
|
this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
|
|
212
215
|
this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
|
|
216
|
+
this._snkDataUnit.domainMessagesBuilder = this.domainMessagesBuilder;
|
|
213
217
|
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
214
218
|
this._dataState = this._snkDataUnit.dataState;
|
|
215
219
|
if (!this._dataUnit) {
|
|
@@ -376,7 +380,7 @@ export class SnkCrud {
|
|
|
376
380
|
return;
|
|
377
381
|
}
|
|
378
382
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
|
379
|
-
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, filterBarTitle: this.filterBarTitle, "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, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus }, 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, formLegacyConfigName: this.formLegacyConfigName }, 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" }))));
|
|
383
|
+
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, filterBarTitle: this.filterBarTitle, "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, disablePersonalizedFilter: this.disablePersonalizedFilter, gridLegacyConfigName: this.gridLegacyConfigName, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad, autoFocus: this.autoFocus }, 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, formLegacyConfigName: this.formLegacyConfigName, getCustomTitle: this.setCustomFormTitle }, 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" }))));
|
|
380
384
|
}
|
|
381
385
|
static get is() { return "snk-crud"; }
|
|
382
386
|
static get encapsulation() { return "scoped"; }
|
|
@@ -732,6 +736,38 @@ export class SnkCrud {
|
|
|
732
736
|
"attribute": "auto-focus",
|
|
733
737
|
"reflect": false,
|
|
734
738
|
"defaultValue": "true"
|
|
739
|
+
},
|
|
740
|
+
"domainMessagesBuilder": {
|
|
741
|
+
"type": "string",
|
|
742
|
+
"mutable": false,
|
|
743
|
+
"complexType": {
|
|
744
|
+
"original": "string",
|
|
745
|
+
"resolved": "string",
|
|
746
|
+
"references": {}
|
|
747
|
+
},
|
|
748
|
+
"required": false,
|
|
749
|
+
"optional": false,
|
|
750
|
+
"docs": {
|
|
751
|
+
"tags": [],
|
|
752
|
+
"text": "Define a chave customizada para sobrescrever as mensagens (N\u00E3o pegando pela entidade)"
|
|
753
|
+
},
|
|
754
|
+
"attribute": "domain-messages-builder",
|
|
755
|
+
"reflect": false
|
|
756
|
+
},
|
|
757
|
+
"setCustomFormTitle": {
|
|
758
|
+
"type": "unknown",
|
|
759
|
+
"mutable": false,
|
|
760
|
+
"complexType": {
|
|
761
|
+
"original": "() => string",
|
|
762
|
+
"resolved": "() => string",
|
|
763
|
+
"references": {}
|
|
764
|
+
},
|
|
765
|
+
"required": false,
|
|
766
|
+
"optional": false,
|
|
767
|
+
"docs": {
|
|
768
|
+
"tags": [],
|
|
769
|
+
"text": "Define uma fun\u00E7\u00E3o para configurar um t\u00EDtulo cusotmizado no modo formul\u00E1rio."
|
|
770
|
+
}
|
|
735
771
|
}
|
|
736
772
|
};
|
|
737
773
|
}
|
|
@@ -814,6 +850,26 @@ export class SnkCrud {
|
|
|
814
850
|
}
|
|
815
851
|
}
|
|
816
852
|
}
|
|
853
|
+
}, {
|
|
854
|
+
"method": "viewModeChanged",
|
|
855
|
+
"name": "viewModeChanged",
|
|
856
|
+
"bubbles": true,
|
|
857
|
+
"cancelable": true,
|
|
858
|
+
"composed": true,
|
|
859
|
+
"docs": {
|
|
860
|
+
"tags": [],
|
|
861
|
+
"text": ""
|
|
862
|
+
},
|
|
863
|
+
"complexType": {
|
|
864
|
+
"original": "VIEW_MODE",
|
|
865
|
+
"resolved": "VIEW_MODE.ATTACHMENT | VIEW_MODE.FORM | VIEW_MODE.GRID",
|
|
866
|
+
"references": {
|
|
867
|
+
"VIEW_MODE": {
|
|
868
|
+
"location": "import",
|
|
869
|
+
"path": "../../lib/utils/constants"
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
}
|
|
817
873
|
}];
|
|
818
874
|
}
|
|
819
875
|
static get methods() {
|
package/dist/collection/components/snk-crud/subcomponents/snk-detail-view/snk-detail-view.js
CHANGED
|
@@ -158,14 +158,13 @@ export class SnkDetailView {
|
|
|
158
158
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
|
159
159
|
}
|
|
160
160
|
loadMetadata() {
|
|
161
|
-
var _a;
|
|
162
161
|
if (!this.dataUnit) {
|
|
163
162
|
return;
|
|
164
163
|
}
|
|
165
164
|
if (!this.formConfigManager.isLoaded) {
|
|
166
165
|
return;
|
|
167
166
|
}
|
|
168
|
-
const formConfig = this.formConfigManager.getConfig(
|
|
167
|
+
const formConfig = this.formConfigManager.getConfig(this.dataUnit);
|
|
169
168
|
//this._cardsState = formConfig?.cardsState;
|
|
170
169
|
this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
|
171
170
|
}
|