@sankhyalabs/sankhyablocks 8.16.0-dev.2 → 8.16.0-dev.20
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-9479f618.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-0c7106a0.js → dataunit-fetcher-d4873076.js} +8 -4
- 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 +36 -25
- 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-16791a2f.js → snk-data-unit-11e31d8d.js} +23 -11
- package/dist/cjs/snk-data-unit.cjs.entry.js +4 -4
- package/dist/cjs/snk-detail-view.cjs.entry.js +10 -11
- package/dist/cjs/snk-exporter-email-sender.cjs.entry.js +1 -1
- package/dist/cjs/snk-filter-bar.cjs.entry.js +19 -11
- 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 +9 -9
- package/dist/cjs/{snk-guides-viewer-d82746e8.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 +13 -11
- package/dist/cjs/snk-taskbar.cjs.entry.js +23 -1
- package/dist/collection/components/snk-attach/snk-attach.js +24 -15
- 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 +2 -3
- 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 +38 -9
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +16 -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-grid/snk-grid.css +2 -0
- package/dist/collection/components/snk-grid/snk-grid.js +2 -2
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +23 -4
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +64 -0
- package/dist/collection/lib/configs/ConfigStorage.js +1 -0
- package/dist/collection/lib/dataUnit/dataUnitInMemoryUtils.js +7 -3
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +8 -3
- package/dist/collection/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.js +7 -5
- 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/dataunit-fetcher.js +7 -3
- package/dist/components/snk-attach2.js +31 -20
- package/dist/components/snk-crud.js +8 -1
- package/dist/components/snk-data-exporter2.js +2 -2
- package/dist/components/snk-data-unit2.js +22 -9
- package/dist/components/snk-detail-view2.js +10 -5
- package/dist/components/snk-exporter-email-sender2.js +1 -1
- package/dist/components/snk-filter-bar2.js +16 -8
- package/dist/components/snk-form-config2.js +1 -1
- package/dist/components/snk-grid2.js +3 -3
- package/dist/components/snk-simple-crud2.js +7 -4
- package/dist/components/snk-taskbar2.js +24 -2
- 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-5a858363.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-f7e0ffc0.js → dataunit-fetcher-3d2ec959.js} +8 -4
- 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 +36 -25
- 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-a327d22c.js → snk-data-unit-29de836f.js} +23 -11
- package/dist/esm/snk-data-unit.entry.js +4 -4
- package/dist/esm/snk-detail-view.entry.js +10 -11
- package/dist/esm/snk-exporter-email-sender.entry.js +1 -1
- package/dist/esm/snk-filter-bar.entry.js +19 -11
- 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 +9 -9
- package/dist/esm/{snk-guides-viewer-874da66f.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 +13 -11
- package/dist/esm/snk-taskbar.entry.js +23 -1
- package/dist/sankhyablocks/p-08c28ddd.entry.js +1 -0
- package/dist/sankhyablocks/{p-6d4f4614.js → p-091ce761.js} +1 -1
- package/dist/sankhyablocks/{p-b8cde0d8.entry.js → p-094eebf6.entry.js} +1 -1
- package/dist/sankhyablocks/{p-913a9979.js → p-0cd3c0a9.js} +1 -1
- package/dist/sankhyablocks/p-12f45f86.entry.js +1 -0
- package/dist/sankhyablocks/{p-60e46675.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-18ed15f4.entry.js +1 -0
- 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-b7c4feeb.entry.js → p-421bec84.entry.js} +1 -1
- package/dist/sankhyablocks/p-51999ab5.entry.js +1 -0
- package/dist/sankhyablocks/p-53949130.entry.js +1 -0
- package/dist/sankhyablocks/p-594bc21d.js +1 -0
- package/dist/sankhyablocks/p-5b26cc7c.entry.js +1 -0
- package/dist/sankhyablocks/p-5b9160c6.entry.js +1 -0
- package/dist/sankhyablocks/{p-7d9baaf4.entry.js → p-5e384af4.entry.js} +1 -1
- package/dist/sankhyablocks/p-5f016aed.js +1 -0
- package/dist/sankhyablocks/p-70001ac1.js +1 -0
- package/dist/sankhyablocks/{p-e6210aec.js → p-76a65660.js} +1 -1
- package/dist/sankhyablocks/p-7c4aabe2.js +1 -0
- package/dist/sankhyablocks/p-8f4e743f.js +1 -0
- 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-d65d98ed.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +1 -0
- 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-filter-bar/snk-filter-bar.d.ts +1 -0
- 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/snk-taskbar/snk-taskbar.d.ts +11 -0
- package/dist/types/components.d.ts +49 -0
- package/dist/types/lib/http/data-fetcher/fetchers/AttachFetcher/anexo-sistema-fetcher.d.ts +3 -2
- package/package.json +2 -2
- package/dist/sankhyablocks/p-0046959e.entry.js +0 -1
- package/dist/sankhyablocks/p-0e11ee18.entry.js +0 -1
- package/dist/sankhyablocks/p-14a08904.entry.js +0 -1
- package/dist/sankhyablocks/p-219f888d.entry.js +0 -1
- package/dist/sankhyablocks/p-47b60deb.entry.js +0 -1
- package/dist/sankhyablocks/p-6ded2076.entry.js +0 -1
- package/dist/sankhyablocks/p-7a337364.js +0 -1
- package/dist/sankhyablocks/p-829d4045.js +0 -1
- package/dist/sankhyablocks/p-8c6b44ea.entry.js +0 -1
- package/dist/sankhyablocks/p-a4b1f1eb.js +0 -1
- package/dist/sankhyablocks/p-c7cbad38.js +0 -1
- package/dist/sankhyablocks/p-dc7c9047.js +0 -1
- package/dist/sankhyablocks/p-e0b9f59a.entry.js +0 -1
- package/dist/sankhyablocks/p-e9bbc3d5.entry.js +0 -1
- package/dist/sankhyablocks/p-f2809746.entry.js +0 -1
|
@@ -119,21 +119,23 @@ const SERVICE = {
|
|
|
119
119
|
download: "AnexoSistemaSP.baixar",
|
|
120
120
|
};
|
|
121
121
|
class AnexoSistemaFetcher {
|
|
122
|
-
constructor(entityName,
|
|
122
|
+
constructor(entityName, dataUnitName) {
|
|
123
123
|
var _a;
|
|
124
124
|
this.entityName = entityName;
|
|
125
|
-
this.registerKey = registerKey;
|
|
126
125
|
this.dataUnitName = dataUnitName;
|
|
127
126
|
this.validateFields = (fields) => {
|
|
128
127
|
if (!!fields.LINK && !!fields.NOMEARQUIVO)
|
|
129
128
|
throw new Error(SaveErrorsEnum.LINK_AND_FILE_AT_THE_SAME_TIME);
|
|
130
129
|
if (!fields.LINK && !fields.NOMEARQUIVO)
|
|
131
130
|
throw new Error(SaveErrorsEnum.ANY_LINK_OR_FILE_FILLED);
|
|
132
|
-
if (!this.
|
|
131
|
+
if (!this._registerKey)
|
|
133
132
|
throw new Error('Register key can not be null');
|
|
134
133
|
};
|
|
135
134
|
this.resourceID = (window["resourceID"] || ((_a = window["workspace"]) === null || _a === void 0 ? void 0 : _a.resourceID));
|
|
136
135
|
}
|
|
136
|
+
set registerKey(registerKey) {
|
|
137
|
+
this._registerKey = registerKey;
|
|
138
|
+
}
|
|
137
139
|
async save(change) {
|
|
138
140
|
var _a, _b;
|
|
139
141
|
let { updatingFields: fields } = change;
|
|
@@ -152,7 +154,7 @@ class AnexoSistemaFetcher {
|
|
|
152
154
|
nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
|
|
153
155
|
link: fields.LINK,
|
|
154
156
|
nameEntity: this.entityName,
|
|
155
|
-
pkEntity: this.
|
|
157
|
+
pkEntity: this._registerKey,
|
|
156
158
|
typeAcess: fields.TIPOACESSO,
|
|
157
159
|
typeApres: fields.TIPOAPRES,
|
|
158
160
|
}
|
|
@@ -192,7 +194,7 @@ class AnexoSistemaFetcher {
|
|
|
192
194
|
nameAttach: fileInfo === null || fileInfo === void 0 ? void 0 : fileInfo.name,
|
|
193
195
|
link: fields.LINK,
|
|
194
196
|
nameEntity: this.entityName,
|
|
195
|
-
pkEntity: this.
|
|
197
|
+
pkEntity: this._registerKey,
|
|
196
198
|
typeAcess: fields.TIPOACESSO,
|
|
197
199
|
typeApres: fields.TIPOAPRES,
|
|
198
200
|
}
|
|
@@ -663,11 +665,20 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
663
665
|
this.loadAttachmentDataUnit();
|
|
664
666
|
}
|
|
665
667
|
if (oldRegisterKey !== newRegisterKey) {
|
|
668
|
+
if (this._currentFetcher instanceof AnexoSistemaFetcher) {
|
|
669
|
+
this._currentFetcher.registerKey = newRegisterKey;
|
|
670
|
+
}
|
|
666
671
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadData());
|
|
667
672
|
}
|
|
668
673
|
}
|
|
674
|
+
getAnexoSistemaFetcherInstance() {
|
|
675
|
+
var _a;
|
|
676
|
+
const anexoSistemaFetcher = new AnexoSistemaFetcher(this.entityName, (_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.name);
|
|
677
|
+
anexoSistemaFetcher.registerKey = this.registerKey;
|
|
678
|
+
return anexoSistemaFetcher;
|
|
679
|
+
}
|
|
669
680
|
async initAttach() {
|
|
670
|
-
var _a, _b, _c, _d, _e
|
|
681
|
+
var _a, _b, _c, _d, _e;
|
|
671
682
|
if (!this.fetcherType && !this.registerKey)
|
|
672
683
|
return;
|
|
673
684
|
if (!this.fetcherType) {
|
|
@@ -675,18 +686,18 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
675
686
|
}
|
|
676
687
|
this.returnToGridMode();
|
|
677
688
|
if (this.fetcherType === "AnexoSistema") {
|
|
678
|
-
this._currentFetcher =
|
|
679
|
-
(
|
|
680
|
-
await ((
|
|
689
|
+
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
|
690
|
+
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
|
691
|
+
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
|
681
692
|
return;
|
|
682
693
|
}
|
|
683
694
|
if (this.fetcherType === "Attach") {
|
|
684
|
-
const hasMoreOneItem = ((
|
|
695
|
+
const hasMoreOneItem = ((_c = this.registerKey) === null || _c === void 0 ? void 0 : _c.split("_").length) > 1;
|
|
685
696
|
if (hasMoreOneItem)
|
|
686
697
|
return;
|
|
687
698
|
}
|
|
688
|
-
await ((
|
|
689
|
-
await ((
|
|
699
|
+
await ((_d = this._currentDataUnit) === null || _d === void 0 ? void 0 : _d.loadMetadata());
|
|
700
|
+
await ((_e = this._currentDataUnit) === null || _e === void 0 ? void 0 : _e.loadData(undefined, undefined, true, this.registerKey));
|
|
690
701
|
}
|
|
691
702
|
/**
|
|
692
703
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
@@ -745,11 +756,11 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
745
756
|
}
|
|
746
757
|
}
|
|
747
758
|
async loadAnexoSistema() {
|
|
748
|
-
var _a, _b
|
|
759
|
+
var _a, _b;
|
|
749
760
|
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
|
750
|
-
this._currentFetcher =
|
|
761
|
+
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
|
751
762
|
if (!this._currentDataUnit.metadata) {
|
|
752
|
-
await ((
|
|
763
|
+
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
|
753
764
|
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
|
754
765
|
}
|
|
755
766
|
this.initDataUnitLoaders();
|
|
@@ -759,7 +770,7 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
759
770
|
this._currentDataUnit.addInterceptor({
|
|
760
771
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
|
761
772
|
});
|
|
762
|
-
await ((
|
|
773
|
+
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
|
763
774
|
this.disableEditFieldsNotInForm();
|
|
764
775
|
}
|
|
765
776
|
async loadAttach() {
|
|
@@ -785,16 +796,16 @@ const SnkAttach = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
785
796
|
}
|
|
786
797
|
}
|
|
787
798
|
initDataUnitLoaders() {
|
|
788
|
-
var _a, _b
|
|
799
|
+
var _a, _b;
|
|
789
800
|
if (this.fetcherType === "AnexoSistema") {
|
|
790
|
-
this._currentFetcher =
|
|
801
|
+
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
|
791
802
|
this._currentDataUnitBuilder = new AnexoSistemaDataUnitFactory(this.entityName, this.getMessage.bind(this));
|
|
792
|
-
(
|
|
803
|
+
(_a = this._currentDataUnitBuilder) === null || _a === void 0 ? void 0 : _a.initLoaders(this._currentDataUnit, this._currentFetcher, this.returnToGridMode.bind(this));
|
|
793
804
|
}
|
|
794
805
|
if (this.fetcherType === "Attach") {
|
|
795
806
|
this._currentFetcher = new AttachFetcher();
|
|
796
807
|
this._currentDataUnitBuilder = new AttachFetcherDataUnitFactory(this.getMessage.bind(this));
|
|
797
|
-
(
|
|
808
|
+
(_b = this._currentDataUnitBuilder) === null || _b === void 0 ? void 0 : _b.initLoaders(this._currentDataUnit, this._currentFetcher, async () => {
|
|
798
809
|
this.returnToGridMode();
|
|
799
810
|
await this._currentDataUnit.loadData(undefined, undefined, true, this.registerKey);
|
|
800
811
|
});
|
|
@@ -51,6 +51,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
51
51
|
this.configuratorSave = createEvent(this, "configuratorSave", 7);
|
|
52
52
|
this.configuratorCancel = createEvent(this, "configuratorCancel", 7);
|
|
53
53
|
this.formItemsReady = createEvent(this, "formItemsReady", 7);
|
|
54
|
+
this.viewModeChanged = createEvent(this, "viewModeChanged", 7);
|
|
54
55
|
this._keyDownHandler = async (event) => this.keyDownListener(event);
|
|
55
56
|
this._viewHistory = [];
|
|
56
57
|
this._customEditors = new Map();
|
|
@@ -79,6 +80,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
79
80
|
this.disablePersonalizedFilter = undefined;
|
|
80
81
|
this.autoLoad = undefined;
|
|
81
82
|
this.autoFocus = true;
|
|
83
|
+
this.domainMessagesBuilder = undefined;
|
|
84
|
+
this.setCustomFormTitle = undefined;
|
|
82
85
|
this.customContainerId = `SNK-CRUD-CUSTOM-CONTAINER-${StringUtils.generateUUID()}`;
|
|
83
86
|
}
|
|
84
87
|
/**
|
|
@@ -187,6 +190,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
187
190
|
else if (viewMode === VIEW_MODE.FORM) {
|
|
188
191
|
this._guidesViewer.setFocus();
|
|
189
192
|
}
|
|
193
|
+
this.viewModeChanged.emit(viewMode);
|
|
190
194
|
}
|
|
191
195
|
openConfig(viewMode) {
|
|
192
196
|
this._snkConfigurator.close();
|
|
@@ -250,6 +254,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
250
254
|
this._snkDataUnit = parent;
|
|
251
255
|
this._snkDataUnit.addEventListener("insertionMode", () => this.insertionModeHandler());
|
|
252
256
|
this._snkDataUnit.addEventListener("cancelEdition", () => this.cancelHandler());
|
|
257
|
+
this._snkDataUnit.domainMessagesBuilder = this.domainMessagesBuilder;
|
|
253
258
|
this._dataUnit = this._snkDataUnit.dataUnit;
|
|
254
259
|
this._dataState = this._snkDataUnit.dataState;
|
|
255
260
|
if (!this._dataUnit) {
|
|
@@ -415,7 +420,7 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
415
420
|
return;
|
|
416
421
|
}
|
|
417
422
|
this._snkDataUnit.ignoreSaveMessage = this._currentViewMode === VIEW_MODE.GRID;
|
|
418
|
-
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" }))));
|
|
423
|
+
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" }))));
|
|
419
424
|
}
|
|
420
425
|
get _element() { return this; }
|
|
421
426
|
static get watchers() { return {
|
|
@@ -441,6 +446,8 @@ const SnkCrud$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
441
446
|
"disablePersonalizedFilter": [4, "disable-personalized-filter"],
|
|
442
447
|
"autoLoad": [4, "auto-load"],
|
|
443
448
|
"autoFocus": [4, "auto-focus"],
|
|
449
|
+
"domainMessagesBuilder": [1, "domain-messages-builder"],
|
|
450
|
+
"setCustomFormTitle": [16],
|
|
444
451
|
"_dataUnit": [32],
|
|
445
452
|
"_dataState": [32],
|
|
446
453
|
"attachmentRegisterKey": [32],
|
|
@@ -124,7 +124,7 @@ class ItemBuilder {
|
|
|
124
124
|
getExportToXLS(groupName) {
|
|
125
125
|
return {
|
|
126
126
|
id: DataExporterOption.EXPORT_TO_XLS,
|
|
127
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
|
127
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`,
|
|
128
128
|
group: groupName
|
|
129
129
|
};
|
|
130
130
|
}
|
|
@@ -167,7 +167,7 @@ class ItemBuilder {
|
|
|
167
167
|
getExportPageToXLS() {
|
|
168
168
|
return {
|
|
169
169
|
id: DataExporterOption.EXPORT_PAGE_TO_XLS,
|
|
170
|
-
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.
|
|
170
|
+
label: `${this._getMessage("snkDataExporter.label.spreadsheet")} (.xls)`
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
/**
|
|
@@ -97,6 +97,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
97
97
|
this.ignoreSaveMessage = undefined;
|
|
98
98
|
this.configName = undefined;
|
|
99
99
|
this.resourceID = undefined;
|
|
100
|
+
this.domainMessagesBuilder = undefined;
|
|
100
101
|
}
|
|
101
102
|
observePageSize() {
|
|
102
103
|
if (this.dataUnit) {
|
|
@@ -513,7 +514,8 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
513
514
|
if (this.ignoreSaveMessage) {
|
|
514
515
|
return;
|
|
515
516
|
}
|
|
516
|
-
const
|
|
517
|
+
const saveOperation = action.payload.changes[0]._operation.toLowerCase();
|
|
518
|
+
const msg = this.getMessage("snkDataUnit.saveInfo", action.payload.records[0], saveOperation);
|
|
517
519
|
if (msg != undefined) {
|
|
518
520
|
this.showSuccessMessage(msg);
|
|
519
521
|
}
|
|
@@ -544,10 +546,13 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
544
546
|
* - Criar um arquivo no seguinte caminho: /messages/appmessages.msg.js.
|
|
545
547
|
* Para conhecer os detalhes do módulo, vide o arquivo neste projeto "/src/lib/message/resources/snk-data-unit.msg.ts"
|
|
546
548
|
*/
|
|
547
|
-
getMessage(key, params = undefined) {
|
|
549
|
+
getMessage(key, params = undefined, customOperation) {
|
|
548
550
|
if (!params) {
|
|
549
551
|
params = this.getMessageParams();
|
|
550
552
|
}
|
|
553
|
+
if (customOperation) {
|
|
554
|
+
this.messagesBuilder.currentOperation = customOperation;
|
|
555
|
+
}
|
|
551
556
|
return this.messagesBuilder.getMessage(key, params);
|
|
552
557
|
}
|
|
553
558
|
getMessageParams() {
|
|
@@ -578,7 +583,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
578
583
|
return await this._application.getDataUnit(this.entityName, cacheName, null, this.configName, this.resourceID);
|
|
579
584
|
}
|
|
580
585
|
}
|
|
581
|
-
async loadDataUnit() {
|
|
586
|
+
async loadDataUnit(forceMetadataLoad = true) {
|
|
582
587
|
var _a;
|
|
583
588
|
if (this.dataUnit == null && this._application && this.entityName) {
|
|
584
589
|
this.dataUnit = await this.getDataUnitParentOrChild();
|
|
@@ -588,9 +593,11 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
588
593
|
this.dataUnit.unsubscribe(this._dataUnitObserver);
|
|
589
594
|
this.dataUnit.addInterceptor(this);
|
|
590
595
|
this.dataUnit.subscribe(this._dataUnitObserver);
|
|
591
|
-
|
|
596
|
+
if (forceMetadataLoad || !this.dataUnit.metadata)
|
|
597
|
+
await this.dataUnit.loadMetadata();
|
|
592
598
|
if ((_a = this.dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) {
|
|
593
|
-
this.getMetadataByRow(this.dataUnit);
|
|
599
|
+
const { records } = this.getMetadataByRow(this.dataUnit);
|
|
600
|
+
this.dataUnit.records = records;
|
|
594
601
|
}
|
|
595
602
|
this.dataState = this.buildDataState();
|
|
596
603
|
let resolver;
|
|
@@ -654,6 +661,13 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
654
661
|
parent = parent.parentElement;
|
|
655
662
|
}
|
|
656
663
|
}
|
|
664
|
+
instanceMessagesBuilder() {
|
|
665
|
+
var _a;
|
|
666
|
+
if (this.messagesBuilder) {
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
this.messagesBuilder = new SnkMessageBuilder((_a = this.domainMessagesBuilder) !== null && _a !== void 0 ? _a : this.entityName);
|
|
670
|
+
}
|
|
657
671
|
//---------------------------------------------
|
|
658
672
|
// Lifecycle web component
|
|
659
673
|
//---------------------------------------------
|
|
@@ -661,9 +675,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
661
675
|
this._application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
|
|
662
676
|
this._application.getAllAccess(this.resourceID).then(access => this._permissions = access);
|
|
663
677
|
this._parentSnkDataUnit = this.getParentSnkDataUnit();
|
|
664
|
-
|
|
665
|
-
this.messagesBuilder = new SnkMessageBuilder(this.entityName);
|
|
666
|
-
}
|
|
678
|
+
this.instanceMessagesBuilder();
|
|
667
679
|
}
|
|
668
680
|
disconnectedCallback() {
|
|
669
681
|
if (this.dataUnit) {
|
|
@@ -671,7 +683,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
671
683
|
}
|
|
672
684
|
}
|
|
673
685
|
async componentDidLoad() {
|
|
674
|
-
await this.loadDataUnit();
|
|
686
|
+
await this.loadDataUnit(false);
|
|
675
687
|
this.handlerLinkFields();
|
|
676
688
|
}
|
|
677
689
|
render() {
|
|
@@ -699,6 +711,7 @@ const SnkDataUnit = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
699
711
|
"ignoreSaveMessage": [4, "ignore-save-message"],
|
|
700
712
|
"configName": [1, "config-name"],
|
|
701
713
|
"resourceID": [1, "resource-i-d"],
|
|
714
|
+
"domainMessagesBuilder": [1, "domain-messages-builder"],
|
|
702
715
|
"fieldsToLink": [32],
|
|
703
716
|
"getDataUnit": [64],
|
|
704
717
|
"getSelectedRecordsIDsInfo": [64],
|
|
@@ -70,6 +70,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
70
70
|
this.resourceID = undefined;
|
|
71
71
|
this.detailTaskbarCustomContainerId = undefined;
|
|
72
72
|
this.formLegacyConfigName = undefined;
|
|
73
|
+
this.getCustomTitle = undefined;
|
|
73
74
|
this._hasToCreateFieldSearch = true;
|
|
74
75
|
this._breadcrumbItems = [];
|
|
75
76
|
this._guides = undefined;
|
|
@@ -156,7 +157,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
156
157
|
}
|
|
157
158
|
onContentCardChanged(evt) {
|
|
158
159
|
SnkGuidesViewer.updateContentCard(evt.detail.formName, evt.detail.cardConfig, evt.detail.propertyChanged, this._configManager)
|
|
159
|
-
.then(() => this.masterFormConfig = this._configManager.getConfig(this.
|
|
160
|
+
.then(() => this.masterFormConfig = this._configManager.getConfig(this.dataUnit));
|
|
160
161
|
}
|
|
161
162
|
/**
|
|
162
163
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
|
@@ -507,6 +508,10 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
507
508
|
}
|
|
508
509
|
return "";
|
|
509
510
|
}
|
|
511
|
+
getTitle() {
|
|
512
|
+
var _a, _b;
|
|
513
|
+
return (_b = (_a = this.getCustomTitle) === null || _a === void 0 ? void 0 : _a.call(this)) !== null && _b !== void 0 ? _b : this.getMessage("snkCrud.title");
|
|
514
|
+
}
|
|
510
515
|
componentDidLoad() {
|
|
511
516
|
this.dataUnit.subscribe(this.dataUnitActionHandler.bind(this));
|
|
512
517
|
}
|
|
@@ -520,7 +525,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
520
525
|
}
|
|
521
526
|
this.loadTaskbarProcessor();
|
|
522
527
|
const showGuides = this._guides && (this._guides.length > 1);
|
|
523
|
-
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.
|
|
528
|
+
return (h("section", { class: "snk-guides-viewer", ref: ref => this._container = ref, tabindex: -1 }, h("div", { class: "ez-row snk-guides-viewer__header" }, h("div", { class: "snk-guides-viewer__header-breadcrumb ez-flex--align-items-center ez-flex-item--align-center ez-padding-left--large", key: "header" }, h("ez-button", { onClick: () => this.exitViewer(), title: this.getMessage("snkCrud.goBackTitle"), mode: "icon", iconName: "arrow_back", class: "ez-padding-right--medium", size: "small" }), h("div", { class: "ez-flex ez-flex--column ez-flex-item--auto" }, h("h1", { class: "ez-title ez-title--primary ez-title--xlarge" }, this.getTitle()), ((_a = this._breadcrumbItems) === null || _a === void 0 ? void 0 : _a.length) > 1 &&
|
|
524
529
|
h("div", { class: "ez-margin-top--extra-small" }, h("ez-breadcrumb", Object.assign({ items: this._breadcrumbItems, onSelectedItem: (evt) => this.onBreadcrumbClickHandler(evt === null || evt === void 0 ? void 0 : evt.detail) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("breadcrumb")}` }))))), this.presentationMode != PresentationMode.SECONDARY && this.buildTaskBar()), h("div", { class: "snk-guides-viewer__container" }, showGuides ?
|
|
525
530
|
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) })
|
|
526
531
|
:
|
|
@@ -558,6 +563,7 @@ const SnkGuidesViewer = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
558
563
|
"resourceID": [1, "resource-i-d"],
|
|
559
564
|
"detailTaskbarCustomContainerId": [1, "detail-taskbar-custom-container-id"],
|
|
560
565
|
"formLegacyConfigName": [1, "form-legacy-config-name"],
|
|
566
|
+
"getCustomTitle": [16],
|
|
561
567
|
"_hasToCreateFieldSearch": [32],
|
|
562
568
|
"_breadcrumbItems": [32],
|
|
563
569
|
"_guides": [32],
|
|
@@ -938,14 +944,13 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
938
944
|
return guideId.replace(SnkDetailView.REGEX_FORM_ID, "");
|
|
939
945
|
}
|
|
940
946
|
loadMetadata() {
|
|
941
|
-
var _a;
|
|
942
947
|
if (!this.dataUnit) {
|
|
943
948
|
return;
|
|
944
949
|
}
|
|
945
950
|
if (!this.formConfigManager.isLoaded) {
|
|
946
951
|
return;
|
|
947
952
|
}
|
|
948
|
-
const formConfig = this.formConfigManager.getConfig(
|
|
953
|
+
const formConfig = this.formConfigManager.getConfig(this.dataUnit);
|
|
949
954
|
//this._cardsState = formConfig?.cardsState;
|
|
950
955
|
this._formMetadata = buildFormMetadata(formConfig == undefined || formConfig.fields.length === 0 ? undefined : formConfig, this.dataUnit, true);
|
|
951
956
|
}
|
|
@@ -979,7 +984,7 @@ const SnkDetailView = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
979
984
|
this.emitSwitchEvent(VIEW_MODE.GRID);
|
|
980
985
|
evt.stopPropagation();
|
|
981
986
|
}
|
|
982
|
-
if (evt.detail === TaskbarElement.FORM_MODE) {
|
|
987
|
+
if (evt.detail === TaskbarElement.FORM_MODE || evt.detail === TaskbarElement.UPDATE) {
|
|
983
988
|
this.emitSwitchEvent(VIEW_MODE.FORM);
|
|
984
989
|
evt.stopPropagation();
|
|
985
990
|
}
|
|
@@ -16,7 +16,7 @@ const OptionsStep = ({ getMessage, changeInfo, data }) => {
|
|
|
16
16
|
const selectionCount = (data === null || data === void 0 ? void 0 : data.selectedRows) || 0;
|
|
17
17
|
const formatOptions = [
|
|
18
18
|
{ label: getMessage("snkExporter.emailSenderOptStep_formatPDF"), value: "pdf" },
|
|
19
|
-
{ label: getMessage("snkExporter.
|
|
19
|
+
{ label: getMessage("snkExporter.emailSenderOptStep_formatXLS"), value: "xls" }
|
|
20
20
|
];
|
|
21
21
|
const typeOptions = [
|
|
22
22
|
{ label: getMessage("snkExporter.emailSenderOptStep_allData"), value: "all" },
|
|
@@ -267,13 +267,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
267
267
|
this._pendingVariables = false;
|
|
268
268
|
this._customfiltersToBeUpdated = [];
|
|
269
269
|
this._calculateSortIndex = (item) => {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
if (
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
270
|
+
if (!item.visible)
|
|
271
|
+
return 0;
|
|
272
|
+
if (item.hardFixed)
|
|
273
|
+
return 1000000; //campos Hard Fixed não variam a ordem
|
|
274
|
+
let index = item.fixed ? 100000 : 0;
|
|
275
|
+
index += this.hasValidValue(item) ? 10000 : 0;
|
|
276
|
+
index += this._updateSequence.lastIndexOf(item.id) + 1;
|
|
277
277
|
return index;
|
|
278
278
|
};
|
|
279
279
|
this._filtersComparator = (a, b) => {
|
|
@@ -294,6 +294,13 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
294
294
|
this.showPersonalizedFilter = false;
|
|
295
295
|
this.personalizedFilterId = undefined;
|
|
296
296
|
}
|
|
297
|
+
hasValidValue(item) {
|
|
298
|
+
if (item.value === undefined || item.value === null)
|
|
299
|
+
return false;
|
|
300
|
+
if (!Array.isArray(item.value))
|
|
301
|
+
return true;
|
|
302
|
+
return item.value.some(filterItem => filterItem.check === true);
|
|
303
|
+
}
|
|
297
304
|
observeFilterConfig(newValue, oldValue) {
|
|
298
305
|
if (ObjectUtils.equals(newValue, oldValue))
|
|
299
306
|
return;
|
|
@@ -519,7 +526,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
519
526
|
getFilterItems() {
|
|
520
527
|
const pinnedItems = [];
|
|
521
528
|
const unpinnedItems = [];
|
|
522
|
-
this.filterConfig
|
|
529
|
+
this.filterConfig.sort((a, b) => this._filtersComparator(a, b))
|
|
523
530
|
.filter(this.filterActiveFilter)
|
|
524
531
|
.forEach((item, index) => {
|
|
525
532
|
item = ObjectUtils.copy(item);
|
|
@@ -589,6 +596,7 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
589
596
|
.then((filters) => {
|
|
590
597
|
accept();
|
|
591
598
|
this.filterConfig = filters.map(item => this.normalizeItem(item));
|
|
599
|
+
this.filterConfig.sort((a, b) => this._filtersComparator(a, b));
|
|
592
600
|
})
|
|
593
601
|
.catch(reason => {
|
|
594
602
|
throw new ErrorException(this.getMessage("snkFilterBar.failToLoadConfig"), reason);
|
|
@@ -76,7 +76,7 @@ const SnkFormConfig = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
getConfig() {
|
|
79
|
-
let config = this.configManager.getConfig(
|
|
79
|
+
let config = this.configManager.getConfig(this.dataUnit);
|
|
80
80
|
if (config.fields && config.fields.length === 0) {
|
|
81
81
|
config = undefined;
|
|
82
82
|
}
|
|
@@ -86,7 +86,7 @@ class ServerSideExporterProvider extends CommonsExporter {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100
|
|
89
|
+
const snkGridCss = ".sc-snk-grid-h{--snk-grid-min-height:300px;--snk-grid-padding:var(--space--lg)}.snk-grid__container.sc-snk-grid{display:flex;height:100%;width:100%;padding:var(--snk-grid-padding)}.snk-grid__header.sc-snk-grid{width:100%;display:flex;flex-wrap:nowrap;justify-content:flex-end}.snk-grid__filter-bar.sc-snk-grid{width:100%}.snk-grid__header-divider.sc-snk-grid{margin-bottom:var(--space--medium)}.snk-grid__table.sc-snk-grid{min-height:var(--snk-grid-min-height)}.snk-grid-container__without-shadow.sc-snk-grid{--ezgrid__container--shadow:unset}";
|
|
90
90
|
|
|
91
91
|
const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
92
92
|
constructor() {
|
|
@@ -390,7 +390,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
390
390
|
const disabledButtons = [];
|
|
391
391
|
if ((_a = this._dataState) === null || _a === void 0 ? void 0 : _a.selectionInfo) {
|
|
392
392
|
if (this._dataState.selectionInfo.length > 1) {
|
|
393
|
-
disabledButtons.push(TaskbarElement.CLONE, "ATTACH");
|
|
393
|
+
disabledButtons.push(TaskbarElement.CLONE, "ATTACH", TaskbarElement.UPDATE);
|
|
394
394
|
}
|
|
395
395
|
if (this._dataState.selectionInfo.isAllRecords()) {
|
|
396
396
|
disabledButtons.push("REMOVE");
|
|
@@ -496,7 +496,7 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
496
496
|
if (!this._dataUnit) {
|
|
497
497
|
return undefined;
|
|
498
498
|
}
|
|
499
|
-
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto
|
|
499
|
+
return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
|
|
500
500
|
h(Fragment, null, h("snk-filter-bar", { ref: (ref) => this._snkFilterBar = ref, title: this.filterBarTitle, dataUnit: this._dataUnit, "data-element-id": "gridFilter", class: "snk-grid__filter-bar ez-align--top", configName: this.configName, messagesBuilder: this.messagesBuilder, resourceID: this.resourceID, onConfigUpdated: evt => this.handleFilterConfigUpdated(evt.detail), disablePersonalizedFilter: this.disablePersonalizedFilter, filterBarLegacyConfigName: this.filterBarLegacyConfigName, autoLoad: this.autoLoad }), h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), h("snk-taskbar", { class: "ez-padding-left--medium", "data-element-id": "grid_top", key: "topTaskbar", configName: this.configName, dataUnit: this._dataUnit, messagesBuilder: this.messagesBuilder, buttons: this._topTaskbarProcessor.buttons, disabledButtons: this._topTaskbarProcessor.disabledButtons, customButtons: this._topTaskbarProcessor.customButtons, primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.topTaskbarCustomSlotId, overflowStrategy: 'none' }, h("slot", { name: this.topTaskbarCustomSlotId }))), h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this._gridConfig, onConfigChange: (evt) => { this.gridConfigChangeHandler(evt); }, onEzDoubleClick: (evt) => this.gridDoubleClick.emit(evt.detail), statusResolver: this.statusResolver, multipleSelection: this.multipleSelection, columnfilterDataSource: this.columnFilterDataSource, selectionToastConfig: this.selectionToastConfig, useEnterLikeTab: this.useEnterLikeTab, recordsValidator: this.recordsValidator, canEdit: this.canEdit, autoFocus: this.autoFocus }, h("snk-taskbar", { id: 'teste', dataUnit: this._dataUnit, configName: this.configName, messagesBuilder: this.messagesBuilder, "data-element-id": "grid_left", buttons: this._headerTaskbarProcessor.buttons, presentationMode: this.presentationMode, disabledButtons: this._headerTaskbarProcessor.disabledButtons, customButtons: this._headerTaskbarProcessor.customButtons, slot: "leftButtons", actionsList: this.getActionsList(), primaryButton: this.getPrimaryButton(), resourceID: this.resourceID, customContainerId: this.taskbarCustomContainerId, customSlotId: this.gridHeaderCustomSlotId }, h("slot", { name: this.gridHeaderCustomSlotId }))), h("div", { class: "ez-col ez-col--sd-12" }, h("slot", { name: "SnkGridFooter" })), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
|
|
501
501
|
}
|
|
502
502
|
get _element() { return this; }
|
|
@@ -138,6 +138,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
138
138
|
this.formLegacyConfigName = undefined;
|
|
139
139
|
this.ignoreReadOnlyFormFields = false;
|
|
140
140
|
this.autoFocus = true;
|
|
141
|
+
this.domainMessagesBuilder = undefined;
|
|
141
142
|
this.autoLoad = undefined;
|
|
142
143
|
}
|
|
143
144
|
/**
|
|
@@ -753,8 +754,8 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
753
754
|
return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
|
|
754
755
|
}
|
|
755
756
|
getFormConfig() {
|
|
756
|
-
var _a
|
|
757
|
-
const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(
|
|
757
|
+
var _a;
|
|
758
|
+
const configFromManager = (_a = this._formConfigManager) === null || _a === void 0 ? void 0 : _a.getConfig(this.dataUnit, this.ignoreReadOnlyFormFields);
|
|
758
759
|
if (!this.configName && !configFromManager) {
|
|
759
760
|
return this.formConfig;
|
|
760
761
|
}
|
|
@@ -774,9 +775,10 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
774
775
|
if (this.dataUnit == undefined) {
|
|
775
776
|
return;
|
|
776
777
|
}
|
|
777
|
-
|
|
778
|
+
const taskbarContent = (h("snk-taskbar", { class: this._currentViewMode === VIEW_MODE.FORM && "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: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })));
|
|
779
|
+
return (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(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail, onDataUnitFieldsHidded: this.updateFormConfig.bind(this), domainMessagesBuilder: this.domainMessagesBuilder }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, this._currentViewMode === VIEW_MODE.FORM && taskbarContent, h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, 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(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
|
|
778
780
|
? undefined
|
|
779
|
-
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, 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() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
781
|
+
: this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab, autoFocus: this.autoFocus }, this._currentViewMode === VIEW_MODE.GRID && taskbarContent, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, 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() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && 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 })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
|
|
780
782
|
}
|
|
781
783
|
get _element() { return this; }
|
|
782
784
|
static get watchers() { return {
|
|
@@ -809,6 +811,7 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
809
811
|
"formLegacyConfigName": [1, "form-legacy-config-name"],
|
|
810
812
|
"ignoreReadOnlyFormFields": [4, "ignore-read-only-form-fields"],
|
|
811
813
|
"autoFocus": [4, "auto-focus"],
|
|
814
|
+
"domainMessagesBuilder": [1, "domain-messages-builder"],
|
|
812
815
|
"autoLoad": [4, "auto-load"],
|
|
813
816
|
"_showPopUpGridConfig": [32],
|
|
814
817
|
"_showFormConfig": [32],
|
|
@@ -128,6 +128,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
128
128
|
super();
|
|
129
129
|
this.__registerHost();
|
|
130
130
|
this.actionClick = createEvent(this, "actionClick", 7);
|
|
131
|
+
this.taskbarSaveLocker = createEvent(this, "taskbarSaveLocker", 7);
|
|
132
|
+
this.taskbarSaveUnlocker = createEvent(this, "taskbarSaveUnlocker", 7);
|
|
131
133
|
this.TASKBAR_ITEM_ID_PREFIX = 'TASKBAR_ITEM_';
|
|
132
134
|
this.TASKBAR_CUSTOM_ELEMENTS_CONTAINER_CLASS_NAME = 'taskbar-custom-elements-container';
|
|
133
135
|
this.ACTIONS_BUTTON_TAG = 'TASKBAR-ACTIONS-BUTTON';
|
|
@@ -151,6 +153,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
151
153
|
this.onSaveEvent = (action) => {
|
|
152
154
|
switch (action.type) {
|
|
153
155
|
case Action.FIELD_INVALIDATED:
|
|
156
|
+
case Action.INVALIDATE_CLEAN:
|
|
154
157
|
case Action.DATA_SAVED:
|
|
155
158
|
case Action.SAVING_ERROR:
|
|
156
159
|
this._isWaitingForSave = false;
|
|
@@ -189,6 +192,16 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
189
192
|
this.getCustomElements(true);
|
|
190
193
|
}
|
|
191
194
|
}
|
|
195
|
+
handleTaskbarSaveLocker() {
|
|
196
|
+
if (this._isWaitingForSave !== true) {
|
|
197
|
+
this._isWaitingForSave = true;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
handleTaskbarSaveUnlocker() {
|
|
201
|
+
if (this._isWaitingForSave === true) {
|
|
202
|
+
this._isWaitingForSave = false;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
192
205
|
hasToSearchCustomElements(event) {
|
|
193
206
|
return this.customSlotId === event.detail && !this._slotContainer;
|
|
194
207
|
}
|
|
@@ -207,6 +220,14 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
207
220
|
this._hasToUpdateOverFlow = true;
|
|
208
221
|
}
|
|
209
222
|
}
|
|
223
|
+
observeIsWaitingForSave(newValue, oldValue) {
|
|
224
|
+
if (newValue == true && oldValue == false) {
|
|
225
|
+
this.taskbarSaveLocker.emit();
|
|
226
|
+
}
|
|
227
|
+
if (newValue == false && oldValue == true) {
|
|
228
|
+
this.taskbarSaveUnlocker.emit();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
210
231
|
// Internal methods
|
|
211
232
|
elementsFromString(strButtons) {
|
|
212
233
|
const elements = [];
|
|
@@ -535,7 +556,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
535
556
|
static get watchers() { return {
|
|
536
557
|
"buttons": ["observeButtons"],
|
|
537
558
|
"disabledButtons": ["observeDisabledButtons"],
|
|
538
|
-
"_lastWidth": ["observeLastWidth"]
|
|
559
|
+
"_lastWidth": ["observeLastWidth"],
|
|
560
|
+
"_isWaitingForSave": ["observeIsWaitingForSave"]
|
|
539
561
|
}; }
|
|
540
562
|
static get style() { return snkTaskbarCss; }
|
|
541
563
|
}, [6, "snk-taskbar", {
|
|
@@ -562,7 +584,7 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
562
584
|
"_lastWidth": [32],
|
|
563
585
|
"_hasToUpdateOverFlow": [32],
|
|
564
586
|
"_isWaitingForSave": [32]
|
|
565
|
-
}, [[8, "snkCustomSlotElementsLoaded", "handleCustomSlotElementsLoaded"]]]);
|
|
587
|
+
}, [[8, "snkCustomSlotElementsLoaded", "handleCustomSlotElementsLoaded"], [8, "taskbarSaveLocker", "handleTaskbarSaveLocker"], [8, "taskbarSaveUnlocker", "handleTaskbarSaveUnlocker"]]]);
|
|
566
588
|
function defineCustomElement() {
|
|
567
589
|
if (typeof customElements === "undefined") {
|
|
568
590
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-
|
|
1
|
+
import { R as ResourceFetcher, F as FormConfigFetcher } from './form-config-fetcher-e0382e5a.js';
|
|
2
2
|
import { F as FilterItemType } from './filter-item-type.enum-d45e026f.js';
|
|
3
3
|
import { ObjectUtils } from '@sankhyalabs/core';
|
|
4
|
-
import { d as dist, D as DataFetcher } from './DataFetcher-
|
|
4
|
+
import { d as dist, D as DataFetcher } from './DataFetcher-773a3e4b.js';
|
|
5
5
|
|
|
6
6
|
class GridConfigFetcher extends ResourceFetcher {
|
|
7
7
|
constructor() {
|
|
@@ -423,6 +423,7 @@ class ConfigStorage {
|
|
|
423
423
|
if (config == undefined) {
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
+
name = this.handleLegacyConfigAsString(name, CONFIG_SOURCE.grid);
|
|
426
427
|
await this.deleteGridConfigCache(name, resourceID);
|
|
427
428
|
return this.gridConfigFetcher.saveConfig(config, name, resourceID);
|
|
428
429
|
}
|