@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-49747.0 → 0.0.0-bugfix-dev-KB-49448.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cjs/{SnkMultiSelectionListDataSource-cae896f4.js → SnkMultiSelectionListDataSource-5213120b.js} +1 -1
  2. package/dist/cjs/{pesquisa-fetcher-16e4be85.js → pesquisa-fetcher-94f6b316.js} +1 -1
  3. package/dist/cjs/snk-actions-button_4.cjs.entry.js +1 -1
  4. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-attach.cjs.entry.js +1 -1
  6. package/dist/cjs/snk-crud.cjs.entry.js +1 -1
  7. package/dist/cjs/snk-detail-view.cjs.entry.js +2 -2
  8. package/dist/cjs/snk-grid.cjs.entry.js +19 -3
  9. package/dist/cjs/{snk-guides-viewer-09ef0a84.js → snk-guides-viewer-508bb6fe.js} +1 -1
  10. package/dist/cjs/snk-guides-viewer.cjs.entry.js +2 -2
  11. package/dist/cjs/snk-simple-crud.cjs.entry.js +36 -54
  12. package/dist/collection/components/snk-grid/snk-grid.js +20 -1
  13. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +34 -52
  14. package/dist/collection/lib/http/data-fetcher/fetchers/pesquisa-fetcher.js +1 -1
  15. package/dist/components/dataunit-fetcher.js +1 -1
  16. package/dist/components/snk-grid2.js +17 -1
  17. package/dist/components/snk-simple-crud2.js +34 -52
  18. package/dist/esm/{SnkMultiSelectionListDataSource-79774916.js → SnkMultiSelectionListDataSource-7e7eada5.js} +1 -1
  19. package/dist/esm/{pesquisa-fetcher-74b97d1c.js → pesquisa-fetcher-f05a12ca.js} +1 -1
  20. package/dist/esm/snk-actions-button_4.entry.js +1 -1
  21. package/dist/esm/snk-application.entry.js +1 -1
  22. package/dist/esm/snk-attach.entry.js +1 -1
  23. package/dist/esm/snk-crud.entry.js +1 -1
  24. package/dist/esm/snk-detail-view.entry.js +2 -2
  25. package/dist/esm/snk-grid.entry.js +19 -3
  26. package/dist/esm/{snk-guides-viewer-b8147267.js → snk-guides-viewer-18859840.js} +1 -1
  27. package/dist/esm/snk-guides-viewer.entry.js +2 -2
  28. package/dist/esm/snk-simple-crud.entry.js +36 -54
  29. package/dist/sankhyablocks/{p-4b7ecfa7.entry.js → p-1fa5a18c.entry.js} +2 -2
  30. package/dist/sankhyablocks/{p-1fca250b.js → p-2897fb8c.js} +1 -1
  31. package/dist/sankhyablocks/p-42ea9a35.entry.js +1 -0
  32. package/dist/sankhyablocks/{p-6ae25c2c.js → p-5dbc1a3f.js} +1 -1
  33. package/dist/sankhyablocks/p-7f97fee2.entry.js +1 -0
  34. package/dist/sankhyablocks/{p-324842c9.entry.js → p-b41a622a.entry.js} +1 -1
  35. package/dist/sankhyablocks/{p-a9c8085c.entry.js → p-b4de81ac.entry.js} +1 -1
  36. package/dist/sankhyablocks/{p-1ba55dd0.entry.js → p-ba4871b5.entry.js} +1 -1
  37. package/dist/sankhyablocks/{p-360fc431.entry.js → p-d01ceda6.entry.js} +1 -1
  38. package/dist/sankhyablocks/{p-8eb454fc.js → p-d78d4062.js} +3 -3
  39. package/dist/sankhyablocks/{p-eb34f712.entry.js → p-e4fb3308.entry.js} +1 -1
  40. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  41. package/dist/types/components/snk-grid/snk-grid.d.ts +2 -0
  42. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +3 -2
  43. package/package.json +1 -1
  44. package/dist/sankhyablocks/p-9baa835f.entry.js +0 -1
  45. package/dist/sankhyablocks/p-eaac4cf1.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const DataFetcher = require('./DataFetcher-99f0f6ed.js');
4
- const pesquisaFetcher = require('./pesquisa-fetcher-16e4be85.js');
4
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
5
5
  const core = require('@sankhyalabs/core');
6
6
  require('./index-0922807b.js');
7
7
  require('./ISave-e91b70a7.js');
@@ -1074,7 +1074,7 @@ class PesquisaFetcher {
1074
1074
  const reqBody = {
1075
1075
  "serviceName": serviceName,
1076
1076
  "requestBody": {
1077
- "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "pk": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
1077
+ "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
1078
1078
  "clientEventList": {
1079
1079
  "clientEvent": []
1080
1080
  }
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const DataFetcher = require('./DataFetcher-99f0f6ed.js');
8
8
  const ParamType = require('./ParamType-90b440a0.js');
9
- require('./pesquisa-fetcher-16e4be85.js');
9
+ require('./pesquisa-fetcher-94f6b316.js');
10
10
  require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -8,7 +8,7 @@ const utils = require('@sankhyalabs/ezui/dist/collection/utils');
8
8
  const ConfigStorage = require('./ConfigStorage-34be11ce.js');
9
9
  const DataFetcher = require('./DataFetcher-99f0f6ed.js');
10
10
  const authFetcher = require('./auth-fetcher-5161d082.js');
11
- const pesquisaFetcher = require('./pesquisa-fetcher-16e4be85.js');
11
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
12
12
  const SnkMessageBuilder = require('./SnkMessageBuilder-141aa18d.js');
13
13
  require('./form-config-fetcher-9f1a13ca.js');
14
14
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const DataFetcher = require('./DataFetcher-99f0f6ed.js');
8
- const pesquisaFetcher = require('./pesquisa-fetcher-16e4be85.js');
8
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
9
9
  require('./index-0922807b.js');
10
10
  const ISave = require('./ISave-e91b70a7.js');
11
11
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -6,7 +6,7 @@ const index = require('./index-f9e81701.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const taskbarElements = require('./taskbar-elements-3ecd1278.js');
8
8
  require('./DataFetcher-99f0f6ed.js');
9
- require('./pesquisa-fetcher-16e4be85.js');
9
+ require('./pesquisa-fetcher-94f6b316.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  require('./ISave-e91b70a7.js');
12
12
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -7,7 +7,7 @@ const core = require('@sankhyalabs/core');
7
7
  const SnkFormConfigManager = require('./SnkFormConfigManager-6211fb28.js');
8
8
  const form = require('@sankhyalabs/ezui/dist/collection/utils/form');
9
9
  require('./DataFetcher-99f0f6ed.js');
10
- require('./pesquisa-fetcher-16e4be85.js');
10
+ require('./pesquisa-fetcher-94f6b316.js');
11
11
  const index$1 = require('./index-0922807b.js');
12
12
  require('./ISave-e91b70a7.js');
13
13
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -16,7 +16,7 @@ require('./filter-item-type.enum-a7ffdaa6.js');
16
16
  require('./form-config-fetcher-9f1a13ca.js');
17
17
  const taskbarElements = require('./taskbar-elements-3ecd1278.js');
18
18
  const constants = require('./constants-35ddd366.js');
19
- const snkGuidesViewer = require('./snk-guides-viewer-09ef0a84.js');
19
+ const snkGuidesViewer = require('./snk-guides-viewer-508bb6fe.js');
20
20
  const SnkMessageBuilder = require('./SnkMessageBuilder-141aa18d.js');
21
21
  require('./ConfigStorage-34be11ce.js');
22
22
  require('./PrintUtils-bcaeb82f.js');
@@ -10,10 +10,10 @@ const ConfigStorage = require('./ConfigStorage-34be11ce.js');
10
10
  const index$1 = require('./index-0922807b.js');
11
11
  const fieldSearch = require('./field-search-f56aa7d6.js');
12
12
  const index$2 = require('./index-102ba62d.js');
13
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-cae896f4.js');
13
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
14
14
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
15
15
  require('./DataFetcher-99f0f6ed.js');
16
- require('./pesquisa-fetcher-16e4be85.js');
16
+ require('./pesquisa-fetcher-94f6b316.js');
17
17
  require('./ISave-e91b70a7.js');
18
18
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
19
19
  require('./filter-item-type.enum-a7ffdaa6.js');
@@ -119,6 +119,16 @@ const SnkGrid = class {
119
119
  async findColumn() {
120
120
  await fieldSearch.openFieldSearch(this._moreOptions, this._columnSearch);
121
121
  }
122
+ async handleGridLegacyConfigName(newLegacyConfig, oldLegacyConfig) {
123
+ if (!newLegacyConfig) {
124
+ return;
125
+ }
126
+ if (newLegacyConfig === oldLegacyConfig) {
127
+ return;
128
+ }
129
+ this.addGridLegacyConfigName();
130
+ this.loadConfig();
131
+ }
122
132
  openGridConfig() {
123
133
  this._grid.getColumnsState()
124
134
  .then((gridColumns) => {
@@ -412,14 +422,20 @@ const SnkGrid = class {
412
422
  }
413
423
  this._showSnkFilterBar = true;
414
424
  }
425
+ getConfig() {
426
+ return this._gridConfig == undefined ? undefined : Object.assign({}, this._gridConfig);
427
+ }
415
428
  render() {
416
429
  if (!this._dataUnit) {
417
430
  return undefined;
418
431
  }
419
432
  return (index.h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, index.h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
420
- index.h(index.Fragment, null, index.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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.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' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.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 }, index.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 }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
433
+ index.h(index.Fragment, null, index.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 }), index.h("hr", { class: "ez-divider-vertical ez-divider--dark ez-margin-left--medium snk-grid__header-divider" })), index.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' }, index.h("slot", { name: this.topTaskbarCustomSlotId }))), index.h("ez-grid", { ref: ref => this._grid = ref, class: (this.presentationMode === index$1.PresentationMode.SECONDARY ? "snk-grid-container__without-shadow " : "") + "snk-grid__table", "data-element-id": "embedded", dataUnit: this._dataUnit, key: "grid-" + this._snkDataUnit.entityName, config: this.getConfig(), 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 }, index.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 }, index.h("slot", { name: this.gridHeaderCustomSlotId }))), index.h("div", { class: "ez-col ez-col--sd-12" }, index.h("slot", { name: "SnkGridFooter" })), index.h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._popUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, index.h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this._gridConfig, "data-element-id": this._element.getAttribute(core.ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resourceID }))));
421
434
  }
422
435
  get _element() { return index.getElement(this); }
436
+ static get watchers() { return {
437
+ "gridLegacyConfigName": ["handleGridLegacyConfigName"]
438
+ }; }
423
439
  };
424
440
  SnkGrid.style = snkGridCss;
425
441
 
@@ -8,7 +8,7 @@ const fieldSearch = require('./field-search-f56aa7d6.js');
8
8
  const taskbarElements = require('./taskbar-elements-3ecd1278.js');
9
9
  const constants = require('./constants-35ddd366.js');
10
10
  require('./DataFetcher-99f0f6ed.js');
11
- require('./pesquisa-fetcher-16e4be85.js');
11
+ require('./pesquisa-fetcher-94f6b316.js');
12
12
  const index$1 = require('./index-0922807b.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const snkGuidesViewer = require('./snk-guides-viewer-09ef0a84.js');
5
+ const snkGuidesViewer = require('./snk-guides-viewer-508bb6fe.js');
6
6
  require('./index-f9e81701.js');
7
7
  require('@sankhyalabs/core');
8
8
  require('./SnkFormConfigManager-6211fb28.js');
@@ -18,7 +18,7 @@ require('./taskbar-elements-3ecd1278.js');
18
18
  require('./index-0922807b.js');
19
19
  require('./index-102ba62d.js');
20
20
  require('./constants-35ddd366.js');
21
- require('./pesquisa-fetcher-16e4be85.js');
21
+ require('./pesquisa-fetcher-94f6b316.js');
22
22
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
23
23
  require('@sankhyalabs/ezui/dist/collection/components/ez-grid/utils');
24
24
  require('./ResourceIDUtils-5ff86aa7.js');
@@ -7,8 +7,8 @@ const core = require('@sankhyalabs/core');
7
7
  const constants = require('./constants-35ddd366.js');
8
8
  const taskbarElements = require('./taskbar-elements-3ecd1278.js');
9
9
  require('./DataFetcher-99f0f6ed.js');
10
- const pesquisaFetcher = require('./pesquisa-fetcher-16e4be85.js');
11
- const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-cae896f4.js');
10
+ const pesquisaFetcher = require('./pesquisa-fetcher-94f6b316.js');
11
+ const SnkMultiSelectionListDataSource = require('./SnkMultiSelectionListDataSource-5213120b.js');
12
12
  const index$1 = require('./index-0922807b.js');
13
13
  require('./ISave-e91b70a7.js');
14
14
  require('@sankhyalabs/ezui/dist/collection/utils/constants');
@@ -130,34 +130,29 @@ const SnkSimpleCrud = class {
130
130
  }
131
131
  async handleUpdateGridLegacyConfig() {
132
132
  if (this.gridLegacyConfigName) {
133
- this.addGridLegacyConfigName();
134
- if (this._gridConfigAlreadyLoaded) {
135
- await this.loadGridConfig(true);
136
- }
133
+ await this.loadGridConfig(true);
137
134
  }
138
135
  }
139
136
  async handleUpdateFormLegacyConfig() {
140
- var _a, _b, _c;
141
- if (this.formLegacyConfigName) {
142
- const legacyConfig = await this.fetchFormLegacyConfig();
143
- if (!legacyConfig)
144
- return;
145
- const rawFields = (_c = (_b = (_a = legacyConfig === null || legacyConfig === void 0 ? void 0 : legacyConfig.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
146
- const fields = Array.isArray(rawFields) ? rawFields : [rawFields];
147
- const newConfig = { emptyConfig: false, fields: fields };
148
- this.setFormConfig(newConfig, true);
149
- this._formConfigManager.setConfig(this.formConfig);
137
+ if (!this.formLegacyConfigName)
138
+ return;
139
+ const rawLegacyConfig = await this.fetchFormLegacyConfig();
140
+ if (!rawLegacyConfig)
141
+ return;
142
+ const legacyConfig = this.buildLegacyConfig(rawLegacyConfig);
143
+ this.setFormConfig(legacyConfig, true);
144
+ if (!this._formConfigManager) {
145
+ this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
150
146
  }
147
+ this._formConfigManager.setConfig(legacyConfig);
148
+ }
149
+ buildLegacyConfig(config) {
150
+ var _a, _b, _c;
151
+ const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
152
+ return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
151
153
  }
152
154
  async fetchFormLegacyConfig() {
153
- const payload = {
154
- 'requestBody': {
155
- 'config': {
156
- 'chave': this.formLegacyConfigName,
157
- 'tipo': 'T',
158
- },
159
- },
160
- };
155
+ const payload = { 'requestBody': { 'config': { 'chave': this.formLegacyConfigName, 'tipo': 'T' } } };
161
156
  return await this.application.callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
162
157
  }
163
158
  openConfig(viewMode) {
@@ -188,45 +183,32 @@ const SnkSimpleCrud = class {
188
183
  ConfigStorage.ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
189
184
  }
190
185
  }
191
- loadGridConfig(forceUpdate) {
192
- if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
186
+ async loadGridConfig(forceUpdate) {
187
+ await this.addGridLegacyConfigName();
188
+ if (this.isGridConfigLoaded() && !forceUpdate)
193
189
  return;
194
- }
195
- this._gridConfigAlreadyLoaded = true;
196
- return new Promise((accept, reject) => {
197
- ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this._resourceID)
198
- .then(config => {
199
- this.setGridConfig(config);
200
- accept();
201
- })
202
- .catch(reason => {
203
- reject(reason);
204
- });
205
- });
190
+ this.setGridConfig(await ConfigStorage.ConfigStorage.loadGridConfig(this.configName, this._resourceID));
191
+ }
192
+ isGridConfigLoaded() {
193
+ return this.gridConfig;
206
194
  }
207
195
  async loadFormConfig() {
208
- if (this._formConfigManager == undefined) {
209
- this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
210
- this._formConfigManager.setConfig(this.formConfig);
211
- }
212
- if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
196
+ if (this.isFormConfigLoaded())
213
197
  return;
214
- }
215
- this._formConfigAlreadyLoaded = true;
198
+ this._formConfigManager = new SnkFormConfigManager.SnkFormConfigManager(this.configName, this._resourceID);
199
+ this._formConfigManager.setConfig(this.formConfig);
216
200
  this.setFormConfig(await this._formConfigManager.loadConfig());
217
201
  }
202
+ isFormConfigLoaded() {
203
+ return (this._formConfigManager && this.formConfig);
204
+ }
218
205
  async componentWillRender() {
219
206
  this._resourceID = await this.application.getResourceID();
220
207
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
221
- if (this.configName === undefined) {
222
- return;
223
- }
224
- if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
225
- return;
226
- }
227
- await this.addGridLegacyConfigName();
228
- this.loadGridConfig();
229
- this.loadFormConfig();
208
+ await Promise.allSettled([
209
+ this.loadGridConfig.bind(this),
210
+ this.loadFormConfig.bind(this)
211
+ ]);
230
212
  }
231
213
  componentWillLoad() {
232
214
  this.processMetadata();
@@ -101,6 +101,16 @@ export class SnkGrid {
101
101
  async findColumn() {
102
102
  await openFieldSearch(this._moreOptions, this._columnSearch);
103
103
  }
104
+ async handleGridLegacyConfigName(newLegacyConfig, oldLegacyConfig) {
105
+ if (!newLegacyConfig) {
106
+ return;
107
+ }
108
+ if (newLegacyConfig === oldLegacyConfig) {
109
+ return;
110
+ }
111
+ this.addGridLegacyConfigName();
112
+ this.loadConfig();
113
+ }
104
114
  openGridConfig() {
105
115
  this._grid.getColumnsState()
106
116
  .then((gridColumns) => {
@@ -394,12 +404,15 @@ export class SnkGrid {
394
404
  }
395
405
  this._showSnkFilterBar = true;
396
406
  }
407
+ getConfig() {
408
+ return this._gridConfig == undefined ? undefined : Object.assign({}, this._gridConfig);
409
+ }
397
410
  render() {
398
411
  if (!this._dataUnit) {
399
412
  return undefined;
400
413
  }
401
414
  return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
402
- 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 }), 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 }, 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 }))));
415
+ 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 }), 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.getConfig(), 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 }, 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 }))));
403
416
  }
404
417
  static get is() { return "snk-grid"; }
405
418
  static get encapsulation() { return "scoped"; }
@@ -966,4 +979,10 @@ export class SnkGrid {
966
979
  };
967
980
  }
968
981
  static get elementRef() { return "_element"; }
982
+ static get watchers() {
983
+ return [{
984
+ "propName": "gridLegacyConfigName",
985
+ "methodName": "handleGridLegacyConfigName"
986
+ }];
987
+ }
969
988
  }
@@ -104,34 +104,29 @@ export class SnkSimpleCrud {
104
104
  }
105
105
  async handleUpdateGridLegacyConfig() {
106
106
  if (this.gridLegacyConfigName) {
107
- this.addGridLegacyConfigName();
108
- if (this._gridConfigAlreadyLoaded) {
109
- await this.loadGridConfig(true);
110
- }
107
+ await this.loadGridConfig(true);
111
108
  }
112
109
  }
113
110
  async handleUpdateFormLegacyConfig() {
114
- var _a, _b, _c;
115
- if (this.formLegacyConfigName) {
116
- const legacyConfig = await this.fetchFormLegacyConfig();
117
- if (!legacyConfig)
118
- return;
119
- const rawFields = (_c = (_b = (_a = legacyConfig === null || legacyConfig === void 0 ? void 0 : legacyConfig.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
120
- const fields = Array.isArray(rawFields) ? rawFields : [rawFields];
121
- const newConfig = { emptyConfig: false, fields: fields };
122
- this.setFormConfig(newConfig, true);
123
- this._formConfigManager.setConfig(this.formConfig);
111
+ if (!this.formLegacyConfigName)
112
+ return;
113
+ const rawLegacyConfig = await this.fetchFormLegacyConfig();
114
+ if (!rawLegacyConfig)
115
+ return;
116
+ const legacyConfig = this.buildLegacyConfig(rawLegacyConfig);
117
+ this.setFormConfig(legacyConfig, true);
118
+ if (!this._formConfigManager) {
119
+ this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
124
120
  }
121
+ this._formConfigManager.setConfig(legacyConfig);
122
+ }
123
+ buildLegacyConfig(config) {
124
+ var _a, _b, _c;
125
+ const rawFields = (_c = (_b = (_a = config === null || config === void 0 ? void 0 : config.formConfig) === null || _a === void 0 ? void 0 : _a.layout) === null || _b === void 0 ? void 0 : _b.field) !== null && _c !== void 0 ? _c : [];
126
+ return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
125
127
  }
126
128
  async fetchFormLegacyConfig() {
127
- const payload = {
128
- 'requestBody': {
129
- 'config': {
130
- 'chave': this.formLegacyConfigName,
131
- 'tipo': 'T',
132
- },
133
- },
134
- };
129
+ const payload = { 'requestBody': { 'config': { 'chave': this.formLegacyConfigName, 'tipo': 'T' } } };
135
130
  return await this.application.callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
136
131
  }
137
132
  openConfig(viewMode) {
@@ -162,45 +157,32 @@ export class SnkSimpleCrud {
162
157
  ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
163
158
  }
164
159
  }
165
- loadGridConfig(forceUpdate) {
166
- if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
160
+ async loadGridConfig(forceUpdate) {
161
+ await this.addGridLegacyConfigName();
162
+ if (this.isGridConfigLoaded() && !forceUpdate)
167
163
  return;
168
- }
169
- this._gridConfigAlreadyLoaded = true;
170
- return new Promise((accept, reject) => {
171
- ConfigStorage.loadGridConfig(this.configName, this._resourceID)
172
- .then(config => {
173
- this.setGridConfig(config);
174
- accept();
175
- })
176
- .catch(reason => {
177
- reject(reason);
178
- });
179
- });
164
+ this.setGridConfig(await ConfigStorage.loadGridConfig(this.configName, this._resourceID));
165
+ }
166
+ isGridConfigLoaded() {
167
+ return this.gridConfig;
180
168
  }
181
169
  async loadFormConfig() {
182
- if (this._formConfigManager == undefined) {
183
- this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
184
- this._formConfigManager.setConfig(this.formConfig);
185
- }
186
- if (this.formConfig != undefined || this._formConfigAlreadyLoaded) {
170
+ if (this.isFormConfigLoaded())
187
171
  return;
188
- }
189
- this._formConfigAlreadyLoaded = true;
172
+ this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
173
+ this._formConfigManager.setConfig(this.formConfig);
190
174
  this.setFormConfig(await this._formConfigManager.loadConfig());
191
175
  }
176
+ isFormConfigLoaded() {
177
+ return (this._formConfigManager && this.formConfig);
178
+ }
192
179
  async componentWillRender() {
193
180
  this._resourceID = await this.application.getResourceID();
194
181
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
195
- if (this.configName === undefined) {
196
- return;
197
- }
198
- if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
199
- return;
200
- }
201
- await this.addGridLegacyConfigName();
202
- this.loadGridConfig();
203
- this.loadFormConfig();
182
+ await Promise.allSettled([
183
+ this.loadGridConfig.bind(this),
184
+ this.loadFormConfig.bind(this)
185
+ ]);
204
186
  }
205
187
  componentWillLoad() {
206
188
  this.processMetadata();
@@ -90,7 +90,7 @@ export class PesquisaFetcher {
90
90
  const reqBody = {
91
91
  "serviceName": serviceName,
92
92
  "requestBody": {
93
- "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "pk": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
93
+ "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
94
94
  "clientEventList": {
95
95
  "clientEvent": []
96
96
  }
@@ -94,7 +94,7 @@ class PesquisaFetcher {
94
94
  const reqBody = {
95
95
  "serviceName": serviceName,
96
96
  "requestBody": {
97
- "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "pk": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
97
+ "criteria": Object.assign({ "entityName": entityName, "compacted": false, "ignoreEntityCriteria": false, "limit": this._defaultPageSize, "query": { "$": values.argument }, "orderByDesc": false, "externalCriteria": externalCriteria, "localEntityName": (_d = values.searchOptions) === null || _d === void 0 ? void 0 : _d.rootEntity }, { options }),
98
98
  "clientEventList": {
99
99
  "clientEvent": []
100
100
  }
@@ -127,6 +127,16 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
127
127
  async findColumn() {
128
128
  await openFieldSearch(this._moreOptions, this._columnSearch);
129
129
  }
130
+ async handleGridLegacyConfigName(newLegacyConfig, oldLegacyConfig) {
131
+ if (!newLegacyConfig) {
132
+ return;
133
+ }
134
+ if (newLegacyConfig === oldLegacyConfig) {
135
+ return;
136
+ }
137
+ this.addGridLegacyConfigName();
138
+ this.loadConfig();
139
+ }
130
140
  openGridConfig() {
131
141
  this._grid.getColumnsState()
132
142
  .then((gridColumns) => {
@@ -420,14 +430,20 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
420
430
  }
421
431
  this._showSnkFilterBar = true;
422
432
  }
433
+ getConfig() {
434
+ return this._gridConfig == undefined ? undefined : Object.assign({}, this._gridConfig);
435
+ }
423
436
  render() {
424
437
  if (!this._dataUnit) {
425
438
  return undefined;
426
439
  }
427
440
  return (h("div", { class: "snk-grid__container ez-flex ez-flex--column ez-flex-item--auto ez-padding--large" }, h("div", { class: "snk-grid__header ez-margin-bottom--medium" }, this._showSnkFilterBar &&
428
- 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 }), 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 }, 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 }))));
441
+ 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 }), 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.getConfig(), 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 }, 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 }))));
429
442
  }
430
443
  get _element() { return this; }
444
+ static get watchers() { return {
445
+ "gridLegacyConfigName": ["handleGridLegacyConfigName"]
446
+ }; }
431
447
  static get style() { return snkGridCss; }
432
448
  }, [6, "snk-grid", {
433
449
  "columnFilterDataSource": [1040],