@sankhyalabs/sankhyablocks 9.1.0-dev.4 → 9.1.0-dev.6
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/{ClientSideExporterProvider-0ce2bcd9.js → ClientSideExporterProvider-b4f112f5.js} +4 -4
- package/dist/cjs/{ConfigStorage-48ba265b.js → ConfigStorage-34aa43d8.js} +2 -2
- package/dist/cjs/{DataFetcher-1afdb18e.js → DataFetcher-e23a263b.js} +6 -1
- package/dist/cjs/{ISave-c76e2c51.js → ISave-e0be2362.js} +1 -1
- package/dist/cjs/{SnkFormConfigManager-aa4631bd.js → SnkFormConfigManager-61bf3266.js} +2 -2
- package/dist/cjs/{auth-fetcher-1687ac0a.js → auth-fetcher-8670a38f.js} +1 -1
- package/dist/cjs/{dataunit-fetcher-a723f0dc.js → dataunit-fetcher-05ed9547.js} +1 -1
- package/dist/cjs/{form-config-fetcher-40d3f752.js → form-config-fetcher-d8b78403.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pesquisa-grid_2.cjs.entry.js +4 -4
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-actions-button_8.cjs.entry.js +5 -5
- package/dist/cjs/snk-application.cjs.entry.js +6 -6
- package/dist/cjs/snk-attach.cjs.entry.js +33 -16
- package/dist/cjs/snk-crud.cjs.entry.js +5 -5
- package/dist/cjs/snk-data-exporter.cjs.entry.js +5 -5
- package/dist/cjs/{snk-data-unit-bf45314d.js → snk-data-unit-8336edac.js} +1 -1
- package/dist/cjs/snk-data-unit.cjs.entry.js +3 -3
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -7
- package/dist/cjs/snk-filter-bar_4.cjs.entry.js +3 -3
- package/dist/cjs/snk-filter-modal-item.cjs.entry.js +3 -3
- package/dist/cjs/snk-form_2.cjs.entry.js +4 -4
- package/dist/cjs/snk-grid.cjs.entry.js +6 -6
- package/dist/cjs/{snk-guides-viewer-edc0a00a.js → snk-guides-viewer-eb62127a.js} +5 -5
- 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-pesquisa.cjs.entry.js +4 -4
- package/dist/cjs/snk-simple-crud.cjs.entry.js +14 -14
- package/dist/collection/components/snk-attach/snk-attach.js +45 -11
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +8 -8
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +6 -1
- package/dist/components/DataFetcher.js +6 -1
- package/dist/components/snk-attach2.js +29 -11
- package/dist/components/snk-simple-crud2.js +7 -7
- package/dist/esm/{ClientSideExporterProvider-3ed744fd.js → ClientSideExporterProvider-c56c2549.js} +4 -4
- package/dist/esm/{ConfigStorage-79b9e180.js → ConfigStorage-89154c4e.js} +2 -2
- package/dist/esm/{DataFetcher-88e56266.js → DataFetcher-db08cad0.js} +6 -1
- package/dist/esm/{ISave-5efafc97.js → ISave-da565824.js} +1 -1
- package/dist/esm/{SnkFormConfigManager-b4b93298.js → SnkFormConfigManager-d64d62d6.js} +2 -2
- package/dist/esm/{auth-fetcher-3510520e.js → auth-fetcher-43c8d76b.js} +1 -1
- package/dist/esm/{dataunit-fetcher-0e025732.js → dataunit-fetcher-41609933.js} +1 -1
- package/dist/esm/{form-config-fetcher-fa208a6c.js → form-config-fetcher-e623539b.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pesquisa-grid_2.entry.js +4 -4
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-actions-button_8.entry.js +5 -5
- package/dist/esm/snk-application.entry.js +6 -6
- package/dist/esm/snk-attach.entry.js +33 -16
- package/dist/esm/snk-crud.entry.js +5 -5
- package/dist/esm/snk-data-exporter.entry.js +5 -5
- package/dist/esm/{snk-data-unit-ba90734a.js → snk-data-unit-a44c4cfd.js} +1 -1
- package/dist/esm/snk-data-unit.entry.js +3 -3
- package/dist/esm/snk-detail-view.entry.js +7 -7
- package/dist/esm/snk-filter-bar_4.entry.js +3 -3
- package/dist/esm/snk-filter-modal-item.entry.js +3 -3
- package/dist/esm/snk-form_2.entry.js +4 -4
- package/dist/esm/snk-grid.entry.js +6 -6
- package/dist/esm/{snk-guides-viewer-32f3d3ab.js → snk-guides-viewer-68c32d00.js} +5 -5
- package/dist/esm/snk-guides-viewer.entry.js +7 -7
- package/dist/esm/snk-personalized-filter.entry.js +3 -3
- package/dist/esm/snk-pesquisa.entry.js +4 -4
- package/dist/esm/snk-simple-crud.entry.js +14 -14
- package/dist/sankhyablocks/{p-aa72089a.entry.js → p-0bc54da7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-afffa6cb.entry.js → p-0ea9dc32.entry.js} +1 -1
- package/dist/sankhyablocks/{p-3d452f27.entry.js → p-117c76f4.entry.js} +1 -1
- package/dist/sankhyablocks/{p-a5bb2f93.entry.js → p-2d58f98e.entry.js} +1 -1
- package/dist/sankhyablocks/{p-9751c42f.entry.js → p-31193a60.entry.js} +1 -1
- package/dist/sankhyablocks/{p-763b04fa.js → p-344ee730.js} +1 -1
- package/dist/sankhyablocks/{p-a6513fcb.js → p-412e06e9.js} +1 -1
- package/dist/sankhyablocks/{p-bd665460.entry.js → p-48633f79.entry.js} +1 -1
- package/dist/sankhyablocks/{p-1456d7cb.entry.js → p-4eafedb7.entry.js} +1 -1
- package/dist/sankhyablocks/{p-05f3a2da.entry.js → p-67fe0ff3.entry.js} +1 -1
- package/dist/sankhyablocks/{p-97bc6983.js → p-6e3b40fa.js} +1 -1
- package/dist/sankhyablocks/p-726563f9.entry.js +1 -0
- package/dist/sankhyablocks/{p-6416975c.js → p-8758404f.js} +1 -1
- package/dist/sankhyablocks/{p-cfd0a4c6.entry.js → p-8d61022c.entry.js} +1 -1
- package/dist/sankhyablocks/{p-7993b2e3.js → p-a35114d4.js} +1 -1
- package/dist/sankhyablocks/{p-601b252b.js → p-b21d32f6.js} +1 -1
- package/dist/sankhyablocks/{p-c926cf6b.entry.js → p-b2946adb.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6a1b38d2.entry.js → p-b5d46d99.entry.js} +1 -1
- package/dist/sankhyablocks/{p-6dd38d7b.js → p-c9657baa.js} +1 -1
- package/dist/sankhyablocks/{p-fbba7e3d.js → p-cd1a5b6a.js} +1 -1
- package/dist/sankhyablocks/{p-fc0b609e.js → p-cfb29ae5.js} +1 -1
- package/dist/sankhyablocks/{p-3bf2f5cd.entry.js → p-d53231ba.entry.js} +1 -1
- package/dist/sankhyablocks/p-ded76667.entry.js +1 -0
- package/dist/sankhyablocks/{p-73285a8a.js → p-e25412da.js} +1 -1
- package/dist/sankhyablocks/p-e9411bba.entry.js +1 -0
- package/dist/sankhyablocks/{p-d9491f6f.entry.js → p-fe8c0d02.entry.js} +1 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-attach/interfaces/ICrudConfig.d.ts +1 -1
- package/dist/types/components/snk-attach/snk-attach.d.ts +5 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -1
- package/dist/types/components.d.ts +8 -0
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +1 -0
- package/package.json +1 -1
- package/dist/sankhyablocks/p-50b68b68.entry.js +0 -1
- package/dist/sankhyablocks/p-b31cc92d.entry.js +0 -1
- package/dist/sankhyablocks/p-e7cccc45.entry.js +0 -1
- /package/dist/collection/components/snk-simple-crud/{regular-buttons.js → snk-simple-crud.constants.js} +0 -0
- /package/dist/types/components/snk-simple-crud/{regular-buttons.d.ts → snk-simple-crud.constants.d.ts} +0 -0
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const DataFetcher = require('./DataFetcher-
|
8
|
-
const ISave = require('./ISave-
|
7
|
+
const DataFetcher = require('./DataFetcher-e23a263b.js');
|
8
|
+
const ISave = require('./ISave-e0be2362.js');
|
9
9
|
require('./index-e3e39724.js');
|
10
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
10
|
+
const dataunitFetcher = require('./dataunit-fetcher-05ed9547.js');
|
11
11
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
12
|
-
require('./form-config-fetcher-
|
12
|
+
require('./form-config-fetcher-d8b78403.js');
|
13
13
|
const constants = require('./constants-6d82e405.js');
|
14
|
-
const authFetcher = require('./auth-fetcher-
|
14
|
+
const authFetcher = require('./auth-fetcher-8670a38f.js');
|
15
15
|
const taskbarElements = require('./taskbar-elements-3b74cd21.js');
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
17
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
@@ -625,6 +625,8 @@ const snkAttachCss = ".snk-attach__header.sc-snk-attach,.snk-attach__crud-sectio
|
|
625
625
|
|
626
626
|
const RESOURCE_ID = 'AnexoSistema';
|
627
627
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
628
|
+
const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
|
629
|
+
const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
|
628
630
|
const SnkAttach = class {
|
629
631
|
constructor(hostRef) {
|
630
632
|
index.registerInstance(this, hostRef);
|
@@ -653,6 +655,7 @@ const SnkAttach = class {
|
|
653
655
|
this.back.emit();
|
654
656
|
});
|
655
657
|
};
|
658
|
+
this.gridLegacyConfigName = undefined;
|
656
659
|
this.fetcherType = undefined;
|
657
660
|
this.fetcher = undefined;
|
658
661
|
this.dataUnit = undefined;
|
@@ -764,9 +767,11 @@ const SnkAttach = class {
|
|
764
767
|
var _a, _b;
|
765
768
|
this._currentDataUnit = new dataunitFetcher.DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
766
769
|
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
770
|
+
let gridValidateForm;
|
767
771
|
if (!this._currentDataUnit.metadata) {
|
768
772
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
769
|
-
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
773
|
+
this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
|
774
|
+
gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
|
770
775
|
}
|
771
776
|
this.initDataUnitLoaders();
|
772
777
|
this._currentDataUnit.addFilterProvider({
|
@@ -776,19 +781,21 @@ const SnkAttach = class {
|
|
776
781
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
777
782
|
});
|
778
783
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
779
|
-
this.disableEditFieldsNotInForm();
|
784
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
780
785
|
}
|
781
786
|
async loadAttach() {
|
782
787
|
var _a, _b;
|
783
788
|
this._currentFetcher = new AttachFetcher();
|
784
789
|
this._currentDataUnit = new core.DataUnit(dataunitFetcher.InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
785
790
|
this._currentDataUnit.pageSize = 150;
|
791
|
+
let gridValidateForm;
|
786
792
|
this.initDataUnitLoaders();
|
787
793
|
this._currentDataUnit.addInterceptor({
|
788
794
|
interceptAction: (action) => {
|
789
795
|
var _a;
|
790
796
|
if (action.type === core.Action.METADATA_LOADED) {
|
791
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
797
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
798
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
792
799
|
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
793
800
|
}
|
794
801
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
@@ -796,9 +803,10 @@ const SnkAttach = class {
|
|
796
803
|
});
|
797
804
|
if (!this._currentDataUnit.metadata) {
|
798
805
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
799
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
806
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
807
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
800
808
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
801
|
-
this.disableEditFieldsNotInForm();
|
809
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
802
810
|
}
|
803
811
|
}
|
804
812
|
initDataUnitLoaders() {
|
@@ -817,12 +825,16 @@ const SnkAttach = class {
|
|
817
825
|
});
|
818
826
|
}
|
819
827
|
}
|
820
|
-
disableEditFieldsNotInForm() {
|
821
|
-
var _a;
|
822
|
-
(_a = this.
|
823
|
-
|
828
|
+
disableEditFieldsNotInForm(gridValidateForm) {
|
829
|
+
var _a, _b, _c, _d, _e;
|
830
|
+
const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
|
831
|
+
if (!!this.getGridLegacyConfigName()) {
|
832
|
+
this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
|
833
|
+
}
|
834
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
|
835
|
+
var _a, _b;
|
824
836
|
const fieldName = column.name;
|
825
|
-
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
837
|
+
if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
|
826
838
|
this._currentDataUnit.disableField(fieldName);
|
827
839
|
}
|
828
840
|
});
|
@@ -872,11 +884,16 @@ const SnkAttach = class {
|
|
872
884
|
await this._currentDataUnit.loadMetadata();
|
873
885
|
}
|
874
886
|
;
|
887
|
+
getGridLegacyConfigName() {
|
888
|
+
if (this.gridLegacyConfigName)
|
889
|
+
return this.gridLegacyConfigName;
|
890
|
+
return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
|
891
|
+
}
|
875
892
|
render() {
|
876
893
|
var _a, _b;
|
877
894
|
if (!this._currentDataUnit)
|
878
895
|
return null;
|
879
|
-
return (index.h("main", { class: "snk-attach__main" }, index.h("header", { class: "snk-attach__header" }, index.h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, index.h("div", { slot: "rightSlot" }, index.h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), index.h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, index.h("div", { class: "ez-box__container" }, index.h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, index.h("div", { slot: "snkSimpleCrudHeader" }, index.h("div", { class: "ez-flex ez-flex--column" }, index.h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), index.h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
896
|
+
return (index.h("main", { class: "snk-attach__main" }, index.h("header", { class: "snk-attach__header" }, index.h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, index.h("div", { slot: "rightSlot" }, index.h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), index.h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, index.h("div", { class: "ez-box__container" }, index.h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, index.h("div", { slot: "snkSimpleCrudHeader" }, index.h("div", { class: "ez-flex ez-flex--column" }, index.h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), index.h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
880
897
|
}
|
881
898
|
static get watchers() { return {
|
882
899
|
"registerKey": ["registerKeyWatcher"]
|
@@ -5,16 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const taskbarElements = require('./taskbar-elements-3b74cd21.js');
|
8
|
-
require('./DataFetcher-
|
9
|
-
require('./ISave-
|
8
|
+
require('./DataFetcher-e23a263b.js');
|
9
|
+
require('./ISave-e0be2362.js');
|
10
10
|
const index$1 = require('./index-e3e39724.js');
|
11
11
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
12
12
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
13
|
-
require('./dataunit-fetcher-
|
13
|
+
require('./dataunit-fetcher-05ed9547.js');
|
14
14
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
15
|
-
require('./form-config-fetcher-
|
15
|
+
require('./form-config-fetcher-d8b78403.js');
|
16
16
|
const constants = require('./constants-6d82e405.js');
|
17
|
-
const authFetcher = require('./auth-fetcher-
|
17
|
+
const authFetcher = require('./auth-fetcher-8670a38f.js');
|
18
18
|
require('./index-0ad2baeb.js');
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
20
20
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
@@ -8,14 +8,14 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
|
8
8
|
const IFetchDataExporterParams = require('./IFetchDataExporterParams-e78ec415.js');
|
9
9
|
const index = require('./index-e3e39724.js');
|
10
10
|
const constants = require('./constants-6d82e405.js');
|
11
|
-
const DataFetcher = require('./DataFetcher-
|
12
|
-
const snkDataUnit = require('./snk-data-unit-
|
13
|
-
require('./ISave-
|
11
|
+
const DataFetcher = require('./DataFetcher-e23a263b.js');
|
12
|
+
const snkDataUnit = require('./snk-data-unit-8336edac.js');
|
13
|
+
require('./ISave-e0be2362.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-05ed9547.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
|
-
require('./form-config-fetcher-
|
18
|
+
require('./form-config-fetcher-d8b78403.js');
|
19
19
|
require('./PrintUtils-bcaeb82f.js');
|
20
20
|
require('./SnkMessageBuilder-221cc88d.js');
|
21
21
|
require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
@@ -4,7 +4,7 @@ const index = require('./index-1cf293c1.js');
|
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
5
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
6
6
|
const SnkMessageBuilder = require('./SnkMessageBuilder-221cc88d.js');
|
7
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
7
|
+
const dataunitFetcher = require('./dataunit-fetcher-05ed9547.js');
|
8
8
|
const DataType = require('@sankhyalabs/core/dist/dataunit/metadata/DataType');
|
9
9
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
10
10
|
|
@@ -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-8336edac.js');
|
6
6
|
require('./index-1cf293c1.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
8
|
require('@sankhyalabs/ezui/dist/collection/utils');
|
9
9
|
require('./SnkMessageBuilder-221cc88d.js');
|
10
|
-
require('./dataunit-fetcher-
|
11
|
-
require('./DataFetcher-
|
10
|
+
require('./dataunit-fetcher-05ed9547.js');
|
11
|
+
require('./DataFetcher-e23a263b.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-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-61bf3266.js');
|
8
8
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
9
|
-
require('./DataFetcher-
|
10
|
-
require('./ISave-
|
9
|
+
require('./DataFetcher-e23a263b.js');
|
10
|
+
require('./ISave-e0be2362.js');
|
11
11
|
const index$1 = require('./index-e3e39724.js');
|
12
12
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
13
13
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
14
|
-
require('./dataunit-fetcher-
|
14
|
+
require('./dataunit-fetcher-05ed9547.js');
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
16
|
-
require('./form-config-fetcher-
|
16
|
+
require('./form-config-fetcher-d8b78403.js');
|
17
17
|
const constants = require('./constants-6d82e405.js');
|
18
18
|
const taskbarElements = require('./taskbar-elements-3b74cd21.js');
|
19
|
-
const snkGuidesViewer = require('./snk-guides-viewer-
|
19
|
+
const snkGuidesViewer = require('./snk-guides-viewer-eb62127a.js');
|
20
20
|
const SnkMessageBuilder = require('./SnkMessageBuilder-221cc88d.js');
|
21
21
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
22
|
-
require('./ConfigStorage-
|
22
|
+
require('./ConfigStorage-34aa43d8.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');
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index$1 = require('./index-1cf293c1.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-34aa43d8.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-62760a9c.js');
|
@@ -15,8 +15,8 @@ const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js')
|
|
15
15
|
const ezModalContainer = require('@sankhyalabs/ezui/dist/collection/components/ez-modal-container');
|
16
16
|
const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
|
17
17
|
const defaultFilters = require('./default-filters-a09bf82b.js');
|
18
|
-
require('./form-config-fetcher-
|
19
|
-
require('./DataFetcher-
|
18
|
+
require('./form-config-fetcher-d8b78403.js');
|
19
|
+
require('./DataFetcher-e23a263b.js');
|
20
20
|
require('./PrintUtils-bcaeb82f.js');
|
21
21
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
22
22
|
|
@@ -6,10 +6,10 @@ const index = require('./index-1cf293c1.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-34aa43d8.js');
|
10
10
|
const filterType_enum = require('./filter-type.enum-2bb46d2a.js');
|
11
|
-
require('./form-config-fetcher-
|
12
|
-
require('./DataFetcher-
|
11
|
+
require('./form-config-fetcher-d8b78403.js');
|
12
|
+
require('./DataFetcher-e23a263b.js');
|
13
13
|
require('./PrintUtils-bcaeb82f.js');
|
14
14
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
15
15
|
|
@@ -4,16 +4,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
7
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-61bf3266.js');
|
8
8
|
const ResourceIDUtils = require('./ResourceIDUtils-5ff86aa7.js');
|
9
9
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
10
10
|
const FormConfigHelper = require('./FormConfigHelper-c664dbae.js');
|
11
11
|
const constants = require('./constants-6d82e405.js');
|
12
12
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
13
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
14
|
-
require('./ConfigStorage-
|
13
|
+
const formConfigFetcher = require('./form-config-fetcher-d8b78403.js');
|
14
|
+
require('./ConfigStorage-34aa43d8.js');
|
15
15
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
16
|
-
require('./DataFetcher-
|
16
|
+
require('./DataFetcher-e23a263b.js');
|
17
17
|
require('./PrintUtils-bcaeb82f.js');
|
18
18
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
19
19
|
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const taskbarElements = require('./taskbar-elements-3b74cd21.js');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
8
|
+
const ConfigStorage = require('./ConfigStorage-34aa43d8.js');
|
9
9
|
const index$1 = require('./index-e3e39724.js');
|
10
10
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
11
11
|
const index$2 = require('./index-0ad2baeb.js');
|
12
|
-
const ClientSideExporterProvider = require('./ClientSideExporterProvider-
|
12
|
+
const ClientSideExporterProvider = require('./ClientSideExporterProvider-b4f112f5.js');
|
13
13
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
14
|
-
require('./DataFetcher-
|
15
|
-
require('./ISave-
|
14
|
+
require('./DataFetcher-e23a263b.js');
|
15
|
+
require('./ISave-e0be2362.js');
|
16
16
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
17
17
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
18
|
-
require('./dataunit-fetcher-
|
18
|
+
require('./dataunit-fetcher-05ed9547.js');
|
19
19
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
20
|
-
require('./form-config-fetcher-
|
20
|
+
require('./form-config-fetcher-d8b78403.js');
|
21
21
|
require('./constants-6d82e405.js');
|
22
22
|
const GetSelectedRecordsIDsInfo = require('./GetSelectedRecordsIDsInfo-bd50caf1.js');
|
23
23
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
@@ -2,19 +2,19 @@
|
|
2
2
|
|
3
3
|
const index = require('./index-1cf293c1.js');
|
4
4
|
const core = require('@sankhyalabs/core');
|
5
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
5
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-61bf3266.js');
|
6
6
|
const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
|
7
7
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
8
8
|
const taskbarElements = require('./taskbar-elements-3b74cd21.js');
|
9
9
|
const constants = require('./constants-6d82e405.js');
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./ISave-
|
10
|
+
require('./DataFetcher-e23a263b.js');
|
11
|
+
require('./ISave-e0be2362.js');
|
12
12
|
const index$1 = require('./index-e3e39724.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-05ed9547.js');
|
16
16
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
17
|
-
require('./form-config-fetcher-
|
17
|
+
require('./form-config-fetcher-d8b78403.js');
|
18
18
|
const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
|
19
19
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
20
20
|
|
@@ -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-eb62127a.js');
|
6
6
|
require('./index-1cf293c1.js');
|
7
7
|
require('@sankhyalabs/core');
|
8
|
-
require('./SnkFormConfigManager-
|
9
|
-
require('./ConfigStorage-
|
10
|
-
require('./form-config-fetcher-
|
11
|
-
require('./DataFetcher-
|
8
|
+
require('./SnkFormConfigManager-61bf3266.js');
|
9
|
+
require('./ConfigStorage-34aa43d8.js');
|
10
|
+
require('./form-config-fetcher-d8b78403.js');
|
11
|
+
require('./DataFetcher-e23a263b.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,9 +18,9 @@ require('./taskbar-processor-2fba34a8.js');
|
|
18
18
|
require('./taskbar-elements-3b74cd21.js');
|
19
19
|
require('./index-e3e39724.js');
|
20
20
|
require('./index-0ad2baeb.js');
|
21
|
-
require('./ISave-
|
21
|
+
require('./ISave-e0be2362.js');
|
22
22
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
23
|
-
require('./dataunit-fetcher-
|
23
|
+
require('./dataunit-fetcher-05ed9547.js');
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
25
25
|
require('@sankhyalabs/core/dist/utils/SortingUtils');
|
26
26
|
require('./ResourceIDUtils-5ff86aa7.js');
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
7
|
const PersonalizedFilterUtils = require('./PersonalizedFilterUtils-7259cf65.js');
|
8
|
-
const ConfigStorage = require('./ConfigStorage-
|
8
|
+
const ConfigStorage = require('./ConfigStorage-34aa43d8.js');
|
9
9
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
10
10
|
const index$1 = require('./index-62760a9c.js');
|
11
11
|
const index$2 = require('./index-0ad2baeb.js');
|
12
12
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
13
|
-
require('./form-config-fetcher-
|
14
|
-
require('./DataFetcher-
|
13
|
+
require('./form-config-fetcher-d8b78403.js');
|
14
|
+
require('./DataFetcher-e23a263b.js');
|
15
15
|
require('./PrintUtils-bcaeb82f.js');
|
16
16
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
17
17
|
|
@@ -4,14 +4,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
5
5
|
const index = require('./index-1cf293c1.js');
|
6
6
|
const core = require('@sankhyalabs/core');
|
7
|
-
const ISave = require('./ISave-
|
8
|
-
require('./DataFetcher-
|
7
|
+
const ISave = require('./ISave-e0be2362.js');
|
8
|
+
require('./DataFetcher-e23a263b.js');
|
9
9
|
require('./index-e3e39724.js');
|
10
10
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
11
11
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
12
|
-
require('./dataunit-fetcher-
|
12
|
+
require('./dataunit-fetcher-05ed9547.js');
|
13
13
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
14
|
-
require('./form-config-fetcher-
|
14
|
+
require('./form-config-fetcher-d8b78403.js');
|
15
15
|
require('./constants-6d82e405.js');
|
16
16
|
require('./PrintUtils-bcaeb82f.js');
|
17
17
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
|
@@ -7,18 +7,18 @@ const core = require('@sankhyalabs/core');
|
|
7
7
|
const utils = require('@sankhyalabs/ezui/dist/collection/utils');
|
8
8
|
const constants = require('./constants-6d82e405.js');
|
9
9
|
const taskbarElements = require('./taskbar-elements-3b74cd21.js');
|
10
|
-
require('./DataFetcher-
|
11
|
-
require('./ISave-
|
12
|
-
const ClientSideExporterProvider = require('./ClientSideExporterProvider-
|
10
|
+
require('./DataFetcher-e23a263b.js');
|
11
|
+
require('./ISave-e0be2362.js');
|
12
|
+
const ClientSideExporterProvider = require('./ClientSideExporterProvider-b4f112f5.js');
|
13
13
|
const index$1 = require('./index-e3e39724.js');
|
14
14
|
require('@sankhyalabs/ezui/dist/collection/utils/constants');
|
15
15
|
require('@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata');
|
16
|
-
const dataunitFetcher = require('./dataunit-fetcher-
|
16
|
+
const dataunitFetcher = require('./dataunit-fetcher-05ed9547.js');
|
17
17
|
require('./filter-item-type.enum-a7ffdaa6.js');
|
18
|
-
const formConfigFetcher = require('./form-config-fetcher-
|
18
|
+
const formConfigFetcher = require('./form-config-fetcher-d8b78403.js');
|
19
19
|
const taskbarProcessor = require('./taskbar-processor-2fba34a8.js');
|
20
|
-
const ConfigStorage = require('./ConfigStorage-
|
21
|
-
const SnkFormConfigManager = require('./SnkFormConfigManager-
|
20
|
+
const ConfigStorage = require('./ConfigStorage-34aa43d8.js');
|
21
|
+
const SnkFormConfigManager = require('./SnkFormConfigManager-61bf3266.js');
|
22
22
|
const index$2 = require('./index-0ad2baeb.js');
|
23
23
|
require('./PrintUtils-bcaeb82f.js');
|
24
24
|
require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource');
|
@@ -110,15 +110,15 @@ const SnkSimpleCrud = class {
|
|
110
110
|
newCustomRenders.set(fieldName, customRender);
|
111
111
|
this._customRenders = newCustomRenders;
|
112
112
|
}
|
113
|
-
handleResourceIDChanged(newValue, oldValue) {
|
113
|
+
async handleResourceIDChanged(newValue, oldValue) {
|
114
114
|
if (core.StringUtils.isEmpty(newValue)) {
|
115
115
|
return;
|
116
116
|
}
|
117
117
|
if (newValue === oldValue) {
|
118
118
|
return;
|
119
119
|
}
|
120
|
-
this.loadFormConfig(true);
|
121
|
-
this.loadGridConfig(true);
|
120
|
+
await this.loadFormConfig(true);
|
121
|
+
await this.loadGridConfig(true);
|
122
122
|
}
|
123
123
|
/**
|
124
124
|
* Registra um formatador de valores para uma coluna da grid.
|
@@ -174,7 +174,7 @@ const SnkSimpleCrud = class {
|
|
174
174
|
.concat(extraButtons));
|
175
175
|
}
|
176
176
|
addConfigButton(buttons) {
|
177
|
-
if (this.configName === undefined) {
|
177
|
+
if (this.configName === undefined || (this.configName && this.gridLegacyConfigName)) {
|
178
178
|
return buttons;
|
179
179
|
}
|
180
180
|
return buttons.concat(taskbarElements.TaskbarElement.CONFIGURATOR);
|
@@ -285,7 +285,7 @@ const SnkSimpleCrud = class {
|
|
285
285
|
if (!this._formConfigAlreadyLoaded) {
|
286
286
|
return;
|
287
287
|
}
|
288
|
-
this.loadFormConfig(true);
|
288
|
+
await this.loadFormConfig(true);
|
289
289
|
}
|
290
290
|
openConfig(viewMode) {
|
291
291
|
this._snkConfigurator.close();
|
@@ -370,8 +370,8 @@ const SnkSimpleCrud = class {
|
|
370
370
|
return;
|
371
371
|
}
|
372
372
|
await this.addGridLegacyConfigName();
|
373
|
-
this.loadGridConfig();
|
374
|
-
this.loadFormConfig();
|
373
|
+
await this.loadGridConfig();
|
374
|
+
await this.loadFormConfig();
|
375
375
|
}
|
376
376
|
componentDidRender() {
|
377
377
|
this._rmPrecisionCustomValueFormatter.setGrid(this._grid);
|
@@ -7,6 +7,8 @@ import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
|
7
7
|
import { SaveErrorsEnum } from '../../lib/http/data-fetcher/fetchers/AttachFetcher/interfaces';
|
8
8
|
const RESOURCE_ID = 'AnexoSistema';
|
9
9
|
const DATA_UNIT_NAME = 'br.com.sankhya.core.v3.anexoSistema';
|
10
|
+
const GRID_LEGACY_CONFIG_NAME = 'GrdCfgHtml5:grdcfg.dynaform.anexo';
|
11
|
+
const LINKORFILE_COLUMN_NAME = "ARQUIVOOULINK";
|
10
12
|
export class SnkAttach {
|
11
13
|
constructor() {
|
12
14
|
this.handleTaskbarClick = async ({ detail: taskbar }) => {
|
@@ -33,6 +35,7 @@ export class SnkAttach {
|
|
33
35
|
this.back.emit();
|
34
36
|
});
|
35
37
|
};
|
38
|
+
this.gridLegacyConfigName = undefined;
|
36
39
|
this.fetcherType = undefined;
|
37
40
|
this.fetcher = undefined;
|
38
41
|
this.dataUnit = undefined;
|
@@ -144,9 +147,11 @@ export class SnkAttach {
|
|
144
147
|
var _a, _b;
|
145
148
|
this._currentDataUnit = new DataUnitFetcher().getDataUnit(RESOURCE_ID, DATA_UNIT_NAME);
|
146
149
|
this._currentFetcher = this.getAnexoSistemaFetcherInstance();
|
150
|
+
let gridValidateForm;
|
147
151
|
if (!this._currentDataUnit.metadata) {
|
148
152
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
149
|
-
this.crudConfig = Object.assign({}, anexoSistemaCrudConfig);
|
153
|
+
this.crudConfig = this.entityName ? { form: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.form } : Object.assign({}, anexoSistemaCrudConfig);
|
154
|
+
gridValidateForm = { grid: anexoSistemaCrudConfig === null || anexoSistemaCrudConfig === void 0 ? void 0 : anexoSistemaCrudConfig.grid };
|
150
155
|
}
|
151
156
|
this.initDataUnitLoaders();
|
152
157
|
this._currentDataUnit.addFilterProvider({
|
@@ -156,19 +161,21 @@ export class SnkAttach {
|
|
156
161
|
interceptAction: (action) => this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement)
|
157
162
|
});
|
158
163
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData());
|
159
|
-
this.disableEditFieldsNotInForm();
|
164
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
160
165
|
}
|
161
166
|
async loadAttach() {
|
162
167
|
var _a, _b;
|
163
168
|
this._currentFetcher = new AttachFetcher();
|
164
169
|
this._currentDataUnit = new DataUnit(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME);
|
165
170
|
this._currentDataUnit.pageSize = 150;
|
171
|
+
let gridValidateForm;
|
166
172
|
this.initDataUnitLoaders();
|
167
173
|
this._currentDataUnit.addInterceptor({
|
168
174
|
interceptAction: (action) => {
|
169
175
|
var _a;
|
170
176
|
if (action.type === Action.METADATA_LOADED) {
|
171
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
177
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
178
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
172
179
|
(_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.updateConfig();
|
173
180
|
}
|
174
181
|
return this._currentDataUnitBuilder.getInterceptions(this._currentDataUnit, action, this._crudElement);
|
@@ -176,9 +183,10 @@ export class SnkAttach {
|
|
176
183
|
});
|
177
184
|
if (!this._currentDataUnit.metadata) {
|
178
185
|
await ((_a = this._currentDataUnit) === null || _a === void 0 ? void 0 : _a.loadMetadata());
|
179
|
-
this.crudConfig = Object.assign({}, attachCrudConfig);
|
186
|
+
this.crudConfig = this.entityName ? { form: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.form } : Object.assign({}, attachCrudConfig);
|
187
|
+
gridValidateForm = { grid: attachCrudConfig === null || attachCrudConfig === void 0 ? void 0 : attachCrudConfig.grid };
|
180
188
|
await ((_b = this._currentDataUnit) === null || _b === void 0 ? void 0 : _b.loadData(undefined, undefined, true, this.registerKey));
|
181
|
-
this.disableEditFieldsNotInForm();
|
189
|
+
this.disableEditFieldsNotInForm(gridValidateForm);
|
182
190
|
}
|
183
191
|
}
|
184
192
|
initDataUnitLoaders() {
|
@@ -197,12 +205,16 @@ export class SnkAttach {
|
|
197
205
|
});
|
198
206
|
}
|
199
207
|
}
|
200
|
-
disableEditFieldsNotInForm() {
|
201
|
-
var _a;
|
202
|
-
(_a = this.
|
203
|
-
|
208
|
+
disableEditFieldsNotInForm(gridValidateForm) {
|
209
|
+
var _a, _b, _c, _d, _e;
|
210
|
+
const gridColumns = ((_b = (_a = this._crudElement) === null || _a === void 0 ? void 0 : _a.gridConfig) === null || _b === void 0 ? void 0 : _b.columns) || ((_c = gridValidateForm === null || gridValidateForm === void 0 ? void 0 : gridValidateForm.grid) === null || _c === void 0 ? void 0 : _c.columns) || ((_e = (_d = this.crudConfig) === null || _d === void 0 ? void 0 : _d.grid) === null || _e === void 0 ? void 0 : _e.columns);
|
211
|
+
if (!!this.getGridLegacyConfigName()) {
|
212
|
+
this._currentDataUnit.disableField(LINKORFILE_COLUMN_NAME);
|
213
|
+
}
|
214
|
+
gridColumns === null || gridColumns === void 0 ? void 0 : gridColumns.forEach(column => {
|
215
|
+
var _a, _b;
|
204
216
|
const fieldName = column.name;
|
205
|
-
if (!((_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form.fields.some(field => field.name === fieldName))) {
|
217
|
+
if (!((_b = (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.fields.some(field => (field === null || field === void 0 ? void 0 : field.name) === fieldName))) {
|
206
218
|
this._currentDataUnit.disableField(fieldName);
|
207
219
|
}
|
208
220
|
});
|
@@ -252,11 +264,16 @@ export class SnkAttach {
|
|
252
264
|
await this._currentDataUnit.loadMetadata();
|
253
265
|
}
|
254
266
|
;
|
267
|
+
getGridLegacyConfigName() {
|
268
|
+
if (this.gridLegacyConfigName)
|
269
|
+
return this.gridLegacyConfigName;
|
270
|
+
return this.entityName ? GRID_LEGACY_CONFIG_NAME + "." + this.entityName : this.entityName;
|
271
|
+
}
|
255
272
|
render() {
|
256
273
|
var _a, _b;
|
257
274
|
if (!this._currentDataUnit)
|
258
275
|
return null;
|
259
|
-
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
276
|
+
return (h("main", { class: "snk-attach__main" }, h("header", { class: "snk-attach__header" }, h("snk-simple-bar", { onExit: this.handleBack, messagesBuilder: this.messagesBuilder }, h("div", { slot: "rightSlot" }, h("ez-button", { class: "ez-button--primary", label: this.getMessage("snkAttach.finish"), onClick: this.handleFinish })))), h("div", { class: "snk-attach__crud-section ez-size-height--full ez-size-width--full ez-flex ez-flex--column" }, h("div", { class: "ez-box__container" }, h("snk-simple-crud", { ref: (el) => this._crudElement = el, dataUnit: this._currentDataUnit, taskbarManager: buildTaskBarManager(), gridConfig: (_a = this.crudConfig) === null || _a === void 0 ? void 0 : _a.grid, formConfig: (_b = this.crudConfig) === null || _b === void 0 ? void 0 : _b.form, useCancelConfirm: false, onActionClick: this.handleTaskbarClick, messagesBuilder: this.messagesBuilder, onDataStateChange: this.handleOnDataStateChange.bind(this), multipleSelection: true, configName: this.entityName, ignoreReadOnlyFormFields: this.entityName ? true : false, gridLegacyConfigName: this.getGridLegacyConfigName() }, h("div", { slot: "snkSimpleCrudHeader" }, h("div", { class: "ez-flex ez-flex--column" }, h("span", { class: "ez-title--primary ez-text ez-text--large ez-text--bold ez-padding-bottom--medium" }, this.getMessage("snkAttach.title")), h("span", { class: "ez-text ez-text--medium ez-text--secondary ez-padding-bottom--medium" }, this.getMessage("snkAttach.description")))))))));
|
260
277
|
}
|
261
278
|
static get is() { return "snk-attach"; }
|
262
279
|
static get encapsulation() { return "scoped"; }
|
@@ -272,6 +289,23 @@ export class SnkAttach {
|
|
272
289
|
}
|
273
290
|
static get properties() {
|
274
291
|
return {
|
292
|
+
"gridLegacyConfigName": {
|
293
|
+
"type": "string",
|
294
|
+
"mutable": false,
|
295
|
+
"complexType": {
|
296
|
+
"original": "string",
|
297
|
+
"resolved": "string",
|
298
|
+
"references": {}
|
299
|
+
},
|
300
|
+
"required": false,
|
301
|
+
"optional": false,
|
302
|
+
"docs": {
|
303
|
+
"tags": [],
|
304
|
+
"text": "Chave da configura\u00E7\u00E3o legado da grid."
|
305
|
+
},
|
306
|
+
"attribute": "grid-legacy-config-name",
|
307
|
+
"reflect": false
|
308
|
+
},
|
275
309
|
"fetcherType": {
|
276
310
|
"type": "string",
|
277
311
|
"mutable": false,
|