@sankhyalabs/sankhyablocks 0.0.0-bugfix-dev-KB-49448.0 → 0.0.0-bugfix-dev-KB-50737.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 (98) hide show
  1. package/dist/cjs/{ConfigStorage-34be11ce.js → ConfigStorage-8d4e9d53.js} +1 -1
  2. package/dist/cjs/{SnkFormConfigManager-6211fb28.js → SnkFormConfigManager-33995e92.js} +16 -13
  3. package/dist/cjs/{SnkMultiSelectionListDataSource-5213120b.js → SnkMultiSelectionListDataSource-1438f8f2.js} +1 -1
  4. package/dist/cjs/{auth-fetcher-5161d082.js → auth-fetcher-bb8e9ae4.js} +1 -1
  5. package/dist/cjs/{form-config-fetcher-9f1a13ca.js → form-config-fetcher-d73f4449.js} +12 -0
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  8. package/dist/cjs/snk-actions-button_4.cjs.entry.js +2 -2
  9. package/dist/cjs/snk-application.cjs.entry.js +3 -3
  10. package/dist/cjs/snk-attach.cjs.entry.js +2 -2
  11. package/dist/cjs/snk-crud.cjs.entry.js +2 -2
  12. package/dist/cjs/snk-detail-view.cjs.entry.js +4 -4
  13. package/dist/cjs/snk-filter-bar.cjs.entry.js +18 -6
  14. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  15. package/dist/cjs/snk-filter-item.cjs.entry.js +2 -1
  16. package/dist/cjs/snk-filter-modal-item.cjs.entry.js +2 -2
  17. package/dist/cjs/snk-form-config.cjs.entry.js +1 -1
  18. package/dist/cjs/snk-form.cjs.entry.js +3 -3
  19. package/dist/cjs/snk-grid.cjs.entry.js +4 -7
  20. package/dist/cjs/{snk-guides-viewer-508bb6fe.js → snk-guides-viewer-25721856.js} +2 -2
  21. package/dist/cjs/snk-guides-viewer.cjs.entry.js +4 -4
  22. package/dist/cjs/snk-personalized-filter.cjs.entry.js +2 -2
  23. package/dist/cjs/snk-simple-crud.cjs.entry.js +85 -48
  24. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  25. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +20 -1
  26. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
  27. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +15 -3
  28. package/dist/collection/components/snk-form-config/SnkFormConfigManager.js +14 -11
  29. package/dist/collection/components/snk-grid/snk-grid.js +1 -4
  30. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +119 -45
  31. package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +12 -0
  32. package/dist/components/SnkFormConfigManager.js +14 -11
  33. package/dist/components/form-config-fetcher.js +12 -0
  34. package/dist/components/snk-filter-bar2.js +16 -4
  35. package/dist/components/snk-filter-detail2.js +5 -1
  36. package/dist/components/snk-filter-item2.js +3 -1
  37. package/dist/components/snk-grid2.js +1 -4
  38. package/dist/components/snk-simple-crud2.js +84 -45
  39. package/dist/esm/{ConfigStorage-101a2b4c.js → ConfigStorage-6e241cd7.js} +1 -1
  40. package/dist/esm/{SnkFormConfigManager-d86ba46f.js → SnkFormConfigManager-7a4e678f.js} +16 -13
  41. package/dist/esm/{SnkMultiSelectionListDataSource-7e7eada5.js → SnkMultiSelectionListDataSource-aad5d4ff.js} +1 -1
  42. package/dist/esm/{auth-fetcher-17dc5b5e.js → auth-fetcher-8ec448b0.js} +1 -1
  43. package/dist/esm/{form-config-fetcher-f121f880.js → form-config-fetcher-765b8498.js} +12 -0
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm/sankhyablocks.js +1 -1
  46. package/dist/esm/snk-actions-button_4.entry.js +2 -2
  47. package/dist/esm/snk-application.entry.js +3 -3
  48. package/dist/esm/snk-attach.entry.js +2 -2
  49. package/dist/esm/snk-crud.entry.js +2 -2
  50. package/dist/esm/snk-detail-view.entry.js +4 -4
  51. package/dist/esm/snk-filter-bar.entry.js +18 -6
  52. package/dist/esm/snk-filter-detail.entry.js +4 -1
  53. package/dist/esm/snk-filter-item.entry.js +2 -1
  54. package/dist/esm/snk-filter-modal-item.entry.js +2 -2
  55. package/dist/esm/snk-form-config.entry.js +1 -1
  56. package/dist/esm/snk-form.entry.js +3 -3
  57. package/dist/esm/snk-grid.entry.js +4 -7
  58. package/dist/esm/{snk-guides-viewer-18859840.js → snk-guides-viewer-b94752f2.js} +2 -2
  59. package/dist/esm/snk-guides-viewer.entry.js +4 -4
  60. package/dist/esm/snk-personalized-filter.entry.js +2 -2
  61. package/dist/esm/snk-simple-crud.entry.js +85 -48
  62. package/dist/sankhyablocks/p-004c356e.js +26 -0
  63. package/dist/sankhyablocks/{p-5c0b53ce.js → p-0624f62d.js} +1 -1
  64. package/dist/sankhyablocks/{p-d01ceda6.entry.js → p-0bba5c9f.entry.js} +1 -1
  65. package/dist/sankhyablocks/{p-64c1b368.entry.js → p-1048bd26.entry.js} +1 -1
  66. package/dist/sankhyablocks/p-125bb902.js +1 -0
  67. package/dist/sankhyablocks/{p-7ddd95b6.entry.js → p-24ed6ad6.entry.js} +1 -1
  68. package/dist/sankhyablocks/{p-1fa5a18c.entry.js → p-400097f2.entry.js} +1 -1
  69. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  70. package/dist/sankhyablocks/p-5c8b136d.entry.js +1 -0
  71. package/dist/sankhyablocks/{p-2897fb8c.js → p-6c9adfca.js} +1 -1
  72. package/dist/sankhyablocks/p-85af23fe.entry.js +1 -0
  73. package/dist/sankhyablocks/{p-b41a622a.entry.js → p-85ba3d6b.entry.js} +1 -1
  74. package/dist/sankhyablocks/{p-5dbc1a3f.js → p-88b29791.js} +1 -1
  75. package/dist/sankhyablocks/{p-ba4871b5.entry.js → p-9e8618ec.entry.js} +1 -1
  76. package/dist/sankhyablocks/p-a043314f.entry.js +1 -0
  77. package/dist/sankhyablocks/{p-7f97fee2.entry.js → p-a1642e7c.entry.js} +1 -1
  78. package/dist/sankhyablocks/{p-6b28cc74.entry.js → p-ac77949b.entry.js} +1 -1
  79. package/dist/sankhyablocks/{p-b4de81ac.entry.js → p-b47c2963.entry.js} +1 -1
  80. package/dist/sankhyablocks/{p-7e05bd83.entry.js → p-bf39bdb8.entry.js} +1 -1
  81. package/dist/sankhyablocks/{p-e4fb3308.entry.js → p-d5cb4b5a.entry.js} +1 -1
  82. package/dist/sankhyablocks/{p-60fa6c7a.js → p-efeca7ba.js} +1 -1
  83. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  84. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  85. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +4 -0
  86. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -0
  87. package/dist/types/components/snk-form-config/SnkFormConfigManager.d.ts +1 -1
  88. package/dist/types/components/snk-grid/snk-grid.d.ts +0 -1
  89. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +17 -6
  90. package/dist/types/components.d.ts +32 -0
  91. package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +2 -0
  92. package/package.json +1 -1
  93. package/dist/sankhyablocks/p-1f3174cb.entry.js +0 -1
  94. package/dist/sankhyablocks/p-42ea9a35.entry.js +0 -1
  95. package/dist/sankhyablocks/p-50783a8b.js +0 -1
  96. package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
  97. package/dist/sankhyablocks/p-a13ccb86.js +0 -26
  98. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
@@ -2,7 +2,7 @@ import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils,
2
2
  import { h } from '@stencil/core';
3
3
  import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
4
4
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
5
- import { CrudUtils, PresentationMode } from '../../lib';
5
+ import { CrudUtils, FormConfigFetcher, PresentationMode } from '../../lib';
6
6
  import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
7
7
  import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
8
8
  import SnkMultiSelectionListDataSource from '../snk-grid/filtercolumn/SnkMultiSelectionListDataSource';
@@ -14,6 +14,7 @@ export class SnkSimpleCrud {
14
14
  constructor() {
15
15
  this._multiSelectionListDataSource = new SnkMultiSelectionListDataSource();
16
16
  this._keyDownHandler = (event) => this.keyDownListener(event);
17
+ this._formConfigFetcher = new FormConfigFetcher();
17
18
  this._taskbarProcessor = new TaskbarProcessor({
18
19
  "snkSimpleCrudTaskbar.form_regular": this.getButtons(false, TaskbarElement.GRID_MODE),
19
20
  "snkSimpleCrudTaskbar.grid_regular": this.getButtons(false, TaskbarElement.FORM_MODE),
@@ -35,6 +36,7 @@ export class SnkSimpleCrud {
35
36
  this._formFields = [];
36
37
  this.multipleSelection = undefined;
37
38
  this.useCancelConfirm = true;
39
+ this.resourceID = undefined;
38
40
  this.taskbarManager = undefined;
39
41
  this.messagesBuilder = undefined;
40
42
  this.useEnterLikeTab = false;
@@ -43,6 +45,17 @@ export class SnkSimpleCrud {
43
45
  this.showConfiguratorButtons = undefined;
44
46
  this.gridLegacyConfigName = undefined;
45
47
  this.formLegacyConfigName = undefined;
48
+ this.ignoreReadOnlyFormFields = false;
49
+ }
50
+ handleResourceIDChanged(newValue, oldValue) {
51
+ if (StringUtils.isEmpty(newValue)) {
52
+ return;
53
+ }
54
+ if (newValue === oldValue) {
55
+ return;
56
+ }
57
+ this.loadFormConfig(true);
58
+ this.loadGridConfig(true);
46
59
  }
47
60
  getButtons(selected, changeModeBtn) {
48
61
  return this.addConfigButton(this.resolveInMemoryBtns(selected ? REGULAR_SELECTED_BTNS : REGULAR_DEFAULT_BTNS)
@@ -96,38 +109,29 @@ export class SnkSimpleCrud {
96
109
  this.dataStateChange.emit(newValue);
97
110
  }
98
111
  }
99
- async observeFormLegacy() {
100
- await this.handleUpdateFormLegacyConfig();
112
+ async observeFormLegacy(newValue, oldValue) {
113
+ await this.handleUpdateFormLegacyConfig(newValue, oldValue);
101
114
  }
102
- async observeGridLegacy() {
103
- await this.handleUpdateGridLegacyConfig();
115
+ async observeGridLegacy(newValue, oldValue) {
116
+ await this.handleUpdateGridLegacyConfig(newValue, oldValue);
104
117
  }
105
- async handleUpdateGridLegacyConfig() {
106
- if (this.gridLegacyConfigName) {
107
- await this.loadGridConfig(true);
118
+ async handleUpdateGridLegacyConfig(newValue, oldValue) {
119
+ if (newValue == undefined || newValue == oldValue) {
120
+ return;
121
+ }
122
+ if (!this._gridConfigAlreadyLoaded) {
123
+ return;
108
124
  }
125
+ await this.loadGridConfig(true);
109
126
  }
110
- async handleUpdateFormLegacyConfig() {
111
- if (!this.formLegacyConfigName)
127
+ async handleUpdateFormLegacyConfig(newValue, oldValue) {
128
+ if (newValue == undefined || newValue == oldValue) {
112
129
  return;
113
- const rawLegacyConfig = await this.fetchFormLegacyConfig();
114
- if (!rawLegacyConfig)
130
+ }
131
+ if (!this._formConfigAlreadyLoaded) {
115
132
  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);
120
133
  }
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] };
127
- }
128
- async fetchFormLegacyConfig() {
129
- const payload = { 'requestBody': { 'config': { 'chave': this.formLegacyConfigName, 'tipo': 'T' } } };
130
- return await this.application.callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
134
+ this.loadFormConfig(true);
131
135
  }
132
136
  openConfig(viewMode) {
133
137
  this._snkConfigurator.close();
@@ -157,32 +161,61 @@ export class SnkSimpleCrud {
157
161
  ConfigStorage.addGridLegacyConfig(this.configName, this.gridLegacyConfigName);
158
162
  }
159
163
  }
160
- async loadGridConfig(forceUpdate) {
161
- await this.addGridLegacyConfigName();
162
- if (this.isGridConfigLoaded() && !forceUpdate)
164
+ loadGridConfig(forceUpdate) {
165
+ if (this.configName === undefined) {
166
+ return;
167
+ }
168
+ if ((this.gridConfig != undefined || this._gridConfigAlreadyLoaded) && !forceUpdate) {
163
169
  return;
164
- this.setGridConfig(await ConfigStorage.loadGridConfig(this.configName, this._resourceID));
170
+ }
171
+ this.addGridLegacyConfigName();
172
+ this._gridConfigAlreadyLoaded = true;
173
+ return new Promise((accept, reject) => {
174
+ ConfigStorage.loadGridConfig(this.configName, this.resolveResourceID())
175
+ .then(config => {
176
+ this.setGridConfig(config);
177
+ accept();
178
+ })
179
+ .catch(reason => {
180
+ reject(reason);
181
+ });
182
+ });
165
183
  }
166
- isGridConfigLoaded() {
167
- return this.gridConfig;
184
+ formConfigIsLoaded() {
185
+ return this.formConfig != undefined || this._formConfigAlreadyLoaded;
168
186
  }
169
- async loadFormConfig() {
170
- if (this.isFormConfigLoaded())
187
+ async loadFormConfig(forceLoad = false) {
188
+ if (this.configName === undefined) {
189
+ return;
190
+ }
191
+ if (this._formConfigManager == undefined) {
192
+ this._formConfigManager = new SnkFormConfigManager(this.configName, this.resolveResourceID());
193
+ this._formConfigManager.setConfig(this.formConfig);
194
+ }
195
+ if (this.formConfigIsLoaded() && !forceLoad) {
196
+ return;
197
+ }
198
+ this._formConfigAlreadyLoaded = true;
199
+ let loadedLegacyConfig = await this._formConfigFetcher.fetchLegacyConfigurableForm(this.formLegacyConfigName);
200
+ if (loadedLegacyConfig != undefined) {
201
+ this._formConfigManager.setConfig(loadedLegacyConfig);
202
+ this.setFormConfig(loadedLegacyConfig);
171
203
  return;
172
- this._formConfigManager = new SnkFormConfigManager(this.configName, this._resourceID);
173
- this._formConfigManager.setConfig(this.formConfig);
204
+ }
174
205
  this.setFormConfig(await this._formConfigManager.loadConfig());
175
206
  }
176
- isFormConfigLoaded() {
177
- return (this._formConfigManager && this.formConfig);
178
- }
179
207
  async componentWillRender() {
180
208
  this._resourceID = await this.application.getResourceID();
181
209
  this._taskbarProcessor.process(this.getTaskBarId(), this.taskbarManager, this.dataState, this.getTaskBarDisabledButtons());
182
- await Promise.allSettled([
183
- this.loadGridConfig.bind(this),
184
- this.loadFormConfig.bind(this)
185
- ]);
210
+ if (this.configName === undefined) {
211
+ return;
212
+ }
213
+ if (this.gridConfig != undefined || this._gridConfigAlreadyLoaded) {
214
+ return;
215
+ }
216
+ await this.addGridLegacyConfigName();
217
+ this.loadGridConfig();
218
+ this.loadFormConfig();
186
219
  }
187
220
  componentWillLoad() {
188
221
  this.processMetadata();
@@ -424,7 +457,7 @@ export class SnkSimpleCrud {
424
457
  }
425
458
  gridConfigChangeHandler(evt) {
426
459
  const config = evt.detail;
427
- ConfigStorage.saveGridConfig(config, this.configName, this._resourceID);
460
+ ConfigStorage.saveGridConfig(config, this.configName, this.resolveResourceID());
428
461
  evt.stopPropagation();
429
462
  }
430
463
  modalConfigChangeHandler(evt) {
@@ -455,6 +488,9 @@ export class SnkSimpleCrud {
455
488
  handleShowFormConfig() {
456
489
  return this._showFormConfig && !this.formLegacyConfigName;
457
490
  }
491
+ resolveResourceID() {
492
+ return StringUtils.isEmpty(this.resourceID) ? this._resourceID : this.resourceID;
493
+ }
458
494
  /* istanbul ignore next */
459
495
  render() {
460
496
  var _a, _b, _c;
@@ -463,7 +499,7 @@ export class SnkSimpleCrud {
463
499
  }
464
500
  return (h("snk-data-unit", { class: "simple-crud__container", dataUnit: this.dataUnit, useCancelConfirm: this.useCancelConfirm, onDataStateChange: evt => this.onDataStateChange(evt), onCancelEdition: this.handleCancelEdit.bind(this), onInsertionMode: () => this.goToView(VIEW_MODE.FORM), onDataUnitReady: (evt) => this.dataUnitReady.emit(evt.detail), ignoreSaveMessage: this._currentViewMode === VIEW_MODE.GRID, onMessagesBuilderUpdated: evt => this.messagesBuilder = evt.detail }, h("header", null, h("slot", { name: "snkSimpleCrudHeader" })), h("section", { class: "ez-box ez-box--shadow simple-crud__container-section" }, h("snk-taskbar", { class: "ez-box ez-box--shadow ez-padding--medium", dataUnit: this.dataUnit, primaryButton: ((_a = this.dataState) === null || _a === void 0 ? void 0 : _a.isDirty) ? "SAVE" : "INSERT", "data-element-id": "grid_left", messagesBuilder: this.messagesBuilder, buttons: this._taskbarProcessor.buttons, actionsList: this.getActionsList(), disabledButtons: this._taskbarProcessor.disabledButtons, customButtons: this._taskbarProcessor.customButtons, slot: "leftButtons", presentationMode: PresentationMode.SECONDARY }, h("slot", { name: "TASKBAR_CUSTOM_ELEMENTS" })), h("ez-view-stack", { ref: (ref) => this._viewStack = ref, "data-element-id": "simple-crud" }, h("stack-item", null, h("ez-grid", { class: "ez-margin-bottom--large", ref: ref => this._grid = ref, dataUnit: this.dataUnit, config: this.gridConfig, "no-header": true, multipleSelection: this.multipleSelection, onEzDoubleClick: () => this.goToView(VIEW_MODE.FORM), onConfigChange: evt => this.gridConfigChangeHandler(evt), columnfilterDataSource: this.dataUnit.name && this.dataUnit.name.includes(InMemoryLoader.IN_MEMORY_DATA_UNIT_NAME)
465
501
  ? undefined
466
- : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this._resourceID, customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this._resourceID }))));
502
+ : this._multiSelectionListDataSource, useEnterLikeTab: this.useEnterLikeTab }, h("div", { slot: "footer" }, h("slot", { name: "snkSimpleCrudFooter" })))), h("stack-item", null, h("ez-form", { class: `ez-margin-top--large ${this.handleShowFormConfig() ? "simple-crud__form--hidden" : ""}`, dataUnit: this.dataUnit, config: (_b = this._formConfigManager) === null || _b === void 0 ? void 0 : _b.getConfig((_c = this.dataState) === null || _c === void 0 ? void 0 : _c.insertionMode, this.dataUnit, this.ignoreReadOnlyFormFields), fieldToFocus: this._fieldToGetFocus, onEzFormSetFields: (evt) => this.handleFormSetFields(evt.detail), onEzFormRequestClearFieldToFocus: this.clearFieldToFocusHandler.bind(this) }), this.handleShowFormConfig() && h("snk-form-config", { messagesBuilder: this.messagesBuilder, dataUnit: this.dataUnit, configManager: this._formConfigManager, onConfigClose: () => this.closeFormConfig() })), this.messagesBuilder && h("snk-configurator", { ref: (ref) => this._snkConfigurator = ref, viewMode: this._currentViewMode, messagesBuilder: this.messagesBuilder, onConfigSelected: (evt) => this.goToView(evt.detail), onOpenConfig: (evt) => this.openConfig(evt.detail), showActionButtons: this.showConfiguratorButtons, onSave: evt => this.handleConfiguratorEvent(evt, 'SAVE'), onCancel: evt => this.handleConfiguratorEvent(evt, 'CANCEL'), resourceID: this.resolveResourceID(), customContainerId: this._customContainerId })), h("div", { id: `${this._customContainerId}` }, h("slot", { name: "SnkConfigContainerSlot" }))), h("ez-modal", { modalSize: "small", closeEsc: false, closeOutsideClick: false, opened: this._showPopUpGridConfig, onEzCloseModal: () => this.closeGridConfig() }, h("snk-grid-config", { ref: ref => this._snkGridConfig = ref, config: this.gridConfig, "data-element-id": this._element.getAttribute(ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME), selectedIndex: 0, configName: this.configName, onConfigChange: (evt) => this.modalConfigChangeHandler(evt), onConfigCancel: () => this.closeGridConfig(), resourceID: this.resolveResourceID() }))));
467
503
  }
468
504
  static get is() { return "snk-simple-crud"; }
469
505
  static get encapsulation() { return "scoped"; }
@@ -617,6 +653,23 @@ export class SnkSimpleCrud {
617
653
  "reflect": false,
618
654
  "defaultValue": "true"
619
655
  },
656
+ "resourceID": {
657
+ "type": "string",
658
+ "mutable": false,
659
+ "complexType": {
660
+ "original": "string",
661
+ "resolved": "string",
662
+ "references": {}
663
+ },
664
+ "required": false,
665
+ "optional": false,
666
+ "docs": {
667
+ "tags": [],
668
+ "text": "Identificador de recursos como configura\u00E7\u00F5es e acesso."
669
+ },
670
+ "attribute": "resource-i-d",
671
+ "reflect": false
672
+ },
620
673
  "taskbarManager": {
621
674
  "type": "unknown",
622
675
  "mutable": false,
@@ -765,6 +818,24 @@ export class SnkSimpleCrud {
765
818
  },
766
819
  "attribute": "form-legacy-config-name",
767
820
  "reflect": false
821
+ },
822
+ "ignoreReadOnlyFormFields": {
823
+ "type": "boolean",
824
+ "mutable": false,
825
+ "complexType": {
826
+ "original": "boolean",
827
+ "resolved": "boolean",
828
+ "references": {}
829
+ },
830
+ "required": false,
831
+ "optional": false,
832
+ "docs": {
833
+ "tags": [],
834
+ "text": "Ignora os campos \"somente leitura\" no modo de inser\u00E7\u00E3o."
835
+ },
836
+ "attribute": "ignore-read-only-form-fields",
837
+ "reflect": false,
838
+ "defaultValue": "false"
768
839
  }
769
840
  };
770
841
  }
@@ -1023,6 +1094,9 @@ export class SnkSimpleCrud {
1023
1094
  static get elementRef() { return "_element"; }
1024
1095
  static get watchers() {
1025
1096
  return [{
1097
+ "propName": "resourceID",
1098
+ "methodName": "handleResourceIDChanged"
1099
+ }, {
1026
1100
  "propName": "mode",
1027
1101
  "methodName": "onModeChange"
1028
1102
  }, {
@@ -168,6 +168,18 @@ export class FormConfigFetcher extends ResourceFetcher {
168
168
  }
169
169
  return `cfg://${authority}/${resourceID}`;
170
170
  }
171
+ async fetchLegacyConfigurableForm(configName) {
172
+ const payload = { 'requestBody': { 'config': { 'chave': configName, 'tipo': 'T' } } };
173
+ const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
174
+ if (ObjectUtils.isEmpty(response))
175
+ return undefined;
176
+ return this.buildLegacyConfigurableForm(response);
177
+ }
178
+ buildLegacyConfigurableForm(config) {
179
+ var _a, _b, _c;
180
+ 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 : [];
181
+ return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
182
+ }
171
183
  }
172
184
  export var UserConfigType;
173
185
  (function (UserConfigType) {
@@ -98,16 +98,19 @@ class SnkFormConfigManager {
98
98
  const normalizedFilter = StringUtils.replaceAccentuatedCharsLower(descriptionFilter.toLocaleLowerCase());
99
99
  return normalizedText.includes(normalizedFilter);
100
100
  }
101
- getInsertionConfig(dataUnit) {
102
- const fields = this.getFieldsList(dataUnit).filter(field => {
103
- if (dataUnit) {
104
- const def = dataUnit.getField(field.name);
105
- if (def && def.readOnly) {
106
- return false;
101
+ getInsertionConfig(dataUnit, ignoreReadOnlyFormFields) {
102
+ let fields = this.getFieldsList(dataUnit);
103
+ if (ignoreReadOnlyFormFields) {
104
+ fields = fields.filter(field => {
105
+ if (dataUnit) {
106
+ const def = dataUnit.getField(field.name);
107
+ if (def && def.readOnly) {
108
+ return false;
109
+ }
107
110
  }
108
- }
109
- return !field.readOnly;
110
- });
111
+ return !field.readOnly;
112
+ });
113
+ }
111
114
  return Object.assign(Object.assign({}, this._config), { fields });
112
115
  }
113
116
  setConfig(config) {
@@ -127,8 +130,8 @@ class SnkFormConfigManager {
127
130
  this._onConfigChange(Object.assign({}, this._config));
128
131
  }
129
132
  }
130
- getConfig(insertionMode, dataUnit) {
131
- return insertionMode ? this.getInsertionConfig(dataUnit) : Object.assign({}, this._config);
133
+ getConfig(insertionMode, dataUnit, ignoreReadOnlyFormFields) {
134
+ return insertionMode ? this.getInsertionConfig(dataUnit, ignoreReadOnlyFormFields !== null && ignoreReadOnlyFormFields !== void 0 ? ignoreReadOnlyFormFields : true) : Object.assign({}, this._config);
132
135
  }
133
136
  getFormConfigFetcher() {
134
137
  if (this._formConfigFetcher == undefined) {
@@ -230,6 +230,18 @@ class FormConfigFetcher extends ResourceFetcher {
230
230
  }
231
231
  return `cfg://${authority}/${resourceID}`;
232
232
  }
233
+ async fetchLegacyConfigurableForm(configName) {
234
+ const payload = { 'requestBody': { 'config': { 'chave': configName, 'tipo': 'T' } } };
235
+ const response = await DataFetcher.get().callServiceBroker('SystemUtilsSP.getConf', JSON.stringify(payload));
236
+ if (ObjectUtils.isEmpty(response))
237
+ return undefined;
238
+ return this.buildLegacyConfigurableForm(response);
239
+ }
240
+ buildLegacyConfigurableForm(config) {
241
+ var _a, _b, _c;
242
+ 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 : [];
243
+ return { emptyConfig: false, fields: Array.isArray(rawFields) ? rawFields : [rawFields] };
244
+ }
233
245
  }
234
246
  var UserConfigType;
235
247
  (function (UserConfigType) {
@@ -253,7 +253,7 @@ class SnkFilterModalFactory {
253
253
  }
254
254
  }
255
255
 
256
- const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{display:none}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
256
+ const snkFilterBarCss = ".sc-snk-filter-bar-h{display:grid;grid-template-columns:1fr minmax(100px, 100%) 1fr 1fr;--snk-personalized-filter--z-index:var(--elevation--20, 20);--snk-personalized-filter--background-color:var(--background--xlight, #fff)}.snk-filter-bar__title.sc-snk-filter-bar{max-width:260px;display:inline-block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:16px;font-family:var(--font-pattern, Arial);font-weight:var(--text-weight--large, 600);color:var(--color--title-primary, #2B3A54);margin-top:8px}[data-mode=\"hidden\"].sc-snk-filter-bar-h{width:0px;height:0px}[data-mode=\"button\"].sc-snk-filter-bar-h{grid-template-columns:1fr;width:fit-content}.snk-filter__popover-container.sc-snk-filter-bar{display:flex;cursor:auto}.filter-bar__personalized-filter.sc-snk-filter-bar{display:flex;flex-direction:column;position:fixed;top:0;left:0;width:100%;height:100%;overflow:auto;z-index:var(--snk-personalized-filter--z-index);background-color:var(--snk-personalized-filter--background-color)}.snk-filter__popover.sc-snk-filter-bar{display:flex;flex-direction:column;position:absolute;width:fit-content;height:fit-content;min-width:265px;background-color:var(--background--xlight, #fff);border-radius:var(--border--radius-medium, 12px);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.snk-filter-item__editor-header.sc-snk-filter-bar{flex-grow:1;font-weight:var(--text-weight--medium, 400);color:var(--color--title-primary, #2B3A54)}.snk-filter__popover-rule.sc-snk-filter-bar{border-style:solid;border-color:var(--color--disable-secondary, #F2F5F8);border-radius:1px;border-width:1px;width:100%}.editor__ez-check.sc-snk-filter-bar{--ez-check__label--padding-left:0}.snk-filter-item__editor-header-button.sc-snk-filter-bar{cursor:pointer;background-color:transparent;border:none;padding:3px;outline-color:var(--color--primary)}.snk-filter-bar__divider.sc-snk-filter-bar{margin-bottom:var(--space--small)}.snk-filter-bar__scroller.sc-snk-filter-bar{height:calc(100% + var(--space-extra-small, 3px))}.snk-filter-bar__filter-item-container.sc-snk-filter-bar{display:flex;align-self:center}.snk-filter-bar__scroller.sc-snk-filter-bar .sc-snk-filter-bar:first-child{margin-left:var(--space-extra-small, 3px)}.snk-filter-bar__filter-list-items-container.sc-snk-filter-bar{overflow-y:auto;max-height:360px;margin-top:var(--space--small, 6px)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar{cursor:pointer;border-radius:var(--border--radius-small, 6px);border:none;background-color:transparent}.snk-filter-bar__filter-list-item__label.sc-snk-filter-bar{color:var(--title--primary)}.snk-filter-bar__filter-list-item__label--secondary.sc-snk-filter-bar{color:var(--text--primary)}.snk-filter-bar__filter-list-item__icon.sc-snk-filter-bar{--ez-icon--color:var(--title--primary)}.snk-filter-bar__filter-list-item__icon--secondary.sc-snk-filter-bar{--ez-icon--color:var(--text--secondary)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:focus-visible{outline:none;background-color:var(--background--medium)}.snk-filter-bar__filter-list-item.sc-snk-filter-bar:hover{background-color:var(--background--medium)}.snk-filter-bar__filter-list-items-container--empty.sc-snk-filter-bar{width:100%;height:100px;display:flex;justify-content:center;align-self:center;align-items:center}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar{position:relative}.snk-filter-bar__filter-list-items-button--active.sc-snk-filter-bar::after{display:flex;position:absolute;content:\"\";width:8px;height:8px;top:7px;left:17px;background-color:var(--icon--alert--color, #008561);border-radius:50%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar{--modal-item-border-width:2px;display:flex;flex-direction:row;margin-left:var(--modal-item-border-width);border-radius:var(--border--radius-medium, 12px);background-color:var(--background--medium, #f0f3f7);border:none;width:100%}.snk-filter-bar__filter-modal-item.sc-snk-filter-bar:focus-visible{outline:var(--color--primary) solid var(--modal-item-border-width)}.snk-filter-bar__filter-modal-item__check.sc-snk-filter-bar{width:auto}.snk-filter-bar__filter-modal-item__label.sc-snk-filter-bar{font-weight:var(--text-weight--medium)}.snk-filter-bar__filter-modal-content.sc-snk-filter-bar{display:grid;grid-template-rows:auto auto 1fr auto;width:99%;height:100%}";
257
257
 
258
258
  const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
259
259
  constructor() {
@@ -496,6 +496,17 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
496
496
  filterActiveFilter(item) {
497
497
  return item.visible || item.removalBlocked;
498
498
  }
499
+ filterPersonalizedItems(item) {
500
+ return item.type === FilterItemType.PERSONALIZED;
501
+ }
502
+ getPersonalizedFilterVariableItems() {
503
+ return this.filterConfig
504
+ .filter(this.filterPersonalizedItems)
505
+ .map(item => {
506
+ const itemId = `filter-${item.id}`;
507
+ return (h("snk-filter-item", { key: item.id, id: itemId, config: Object.assign({}, item), onFocusin: () => this.itemFocused(itemId), onVisibleChanged: (evt) => this.scrollerLocked = evt.detail, onFilterChange: (event) => this.updateFilter(event.detail), getMessage: (key, props) => this.getMessage(key, props), showChips: false }));
508
+ });
509
+ }
499
510
  getFilterItems() {
500
511
  const pinnedItems = [];
501
512
  const unpinnedItems = [];
@@ -681,9 +692,10 @@ const SnkFilterBar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
681
692
  if (this.showPersonalizedFilter) {
682
693
  return h("snk-personalized-filter", { class: "filter-bar__personalized-filter", filterId: this.personalizedFilterId, ref: (el) => this._elPersonalizedFilter = el, onEzCancel: () => this.handleHidePersonalizedFilter(false), onEzAfterSave: () => this.handleHidePersonalizedFilter(true), entityUri: this.dataUnit.name, configName: this.configName, resourceID: this.resourceID });
683
694
  }
684
- if (this.mode === "button")
685
- return (h(Host, { "data-mode": this.mode }, h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) })));
686
- return (h(Host, { "data-mode": this.mode }, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
695
+ if (this.mode !== "regular") {
696
+ return (h(Host, { "data-mode": this.mode }, this.getPersonalizedFilterVariableItems(), this.mode === 'button' && (h("ez-button", { class: "ez-margin-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }))));
697
+ }
698
+ return (h(Host, null, h("div", null, h("span", { class: "snk-filter-bar__title", title: this.title, "data-tooltip": this.title, "data-flow": "bottom" }, this.title)), h("ez-scroller", { class: "snk-filter-bar__scroller", direction: EzScrollDirection.HORIZONTAL, activeShadow: true, locked: this.scrollerLocked }, h("section", { class: "snk-filter-bar__filter-item-container" }, this.getFilterItems())), h("ez-button", { class: "ez-padding-left--medium", size: "small", label: this.getMessage('snkFilterBar.filters', undefined, 'Filtros'), onClick: this.showFilterModal.bind(this) }, h("ez-icon", { slot: "leftIcon", iconName: "plus", class: "ez-padding-right--small" }))));
687
699
  }
688
700
  get _element() { return this; }
689
701
  static get watchers() { return {
@@ -12,6 +12,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
12
12
  this.filterChange = createEvent(this, "filterChange", 7);
13
13
  this.config = undefined;
14
14
  this.getMessage = undefined;
15
+ this.showHardFixed = true;
15
16
  }
16
17
  /**
17
18
  * Exibe o componente snk-filter-detail.
@@ -89,7 +90,9 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
89
90
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
90
91
  }
91
92
  getPopUpHeaderButtons() {
92
- return (h(Fragment, null, !this.config.removalBlocked && this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), !this.config.hardFixed && this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
93
+ return (h(Fragment, null, !this.config.removalBlocked &&
94
+ this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
95
+ this.buildIcon(this.getMessage(this.config.fixed ? "snkFilterBar.unpinFilter" : "snkFilterBar.pinFilter"), this.config.fixed ? "un-pin" : "push-pin", () => this.changeConfig(Object.assign(Object.assign({}, this.config), { fixed: !this.config.fixed })))));
93
96
  }
94
97
  buildIcon(title, iconName, action) {
95
98
  return (h("button", { onClick: () => action(), class: "sc-snk-filter-bar snk-filter-item__editor-header-button", ref: elem => elem && this.buildIdButton(elem, title) }, h("ez-icon", Object.assign({ title: title, iconName: iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`_${title}`)}` }))));
@@ -170,6 +173,7 @@ const SnkFilterDetail = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
170
173
  }, [0, "snk-filter-detail", {
171
174
  "config": [1040],
172
175
  "getMessage": [16],
176
+ "showHardFixed": [4, "show-hard-fixed"],
173
177
  "show": [64]
174
178
  }]);
175
179
  function defineCustomElement() {
@@ -20,6 +20,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
20
20
  this.detailIsVisible = undefined;
21
21
  this.config = undefined;
22
22
  this.getMessage = undefined;
23
+ this.showChips = true;
23
24
  }
24
25
  observeDetailIsVisible(value) {
25
26
  this.visibleChanged.emit(value);
@@ -295,7 +296,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
295
296
  }
296
297
  render() {
297
298
  const leftIcon = this.getLeftIconName();
298
- return (h(Host, null, h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon ? h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" }) : undefined, h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" })), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail }))));
299
+ return (h(Host, null, this.showChips && (h("ez-chip", { id: this.config.id, ref: ref => this._chipElement = ref, label: this.getLabel(), value: this.getEnabledChip() }, leftIcon && (h("ez-icon", { ref: ref => this._leftIconElement = ref, iconName: leftIcon, class: "ez-padding-right--small", slot: "leftIcon" })), h("ez-icon", { ref: ref => this._rightIconElement = ref, iconName: this.getRightIconName(), class: "ez-padding-left--small", slot: "rightIcon", id: "removeFilter" }))), h("section", { class: "ez-margin-top--small sc-snk-filter-bar snk-filter__popover-container", ref: elem => this._popoverContainer = elem }, h("snk-filter-detail", { config: this.config, getMessage: this.getMessage, class: "sc-snk-filter-bar snk-filter__popover ez-padding--small ez-elevation--16", ref: elem => this._popover = elem, key: this.config.id, "data-element-id": this._idSnkFilterDetail, showHardFixed: this.showChips }))));
299
300
  }
300
301
  get _filterItemElement() { return this; }
301
302
  static get watchers() { return {
@@ -304,6 +305,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
304
305
  }, [0, "snk-filter-item", {
305
306
  "config": [1040],
306
307
  "getMessage": [16],
308
+ "showChips": [4, "show-chips"],
307
309
  "detailIsVisible": [32],
308
310
  "showUp": [64],
309
311
  "hideDetail": [64]
@@ -430,15 +430,12 @@ const SnkGrid = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
430
430
  }
431
431
  this._showSnkFilterBar = true;
432
432
  }
433
- getConfig() {
434
- return this._gridConfig == undefined ? undefined : Object.assign({}, this._gridConfig);
435
- }
436
433
  render() {
437
434
  if (!this._dataUnit) {
438
435
  return undefined;
439
436
  }
440
437
  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 &&
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 }))));
438
+ 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 }))));
442
439
  }
443
440
  get _element() { return this; }
444
441
  static get watchers() { return {