@sankhyalabs/sankhyablocks 8.15.0-rc.14 → 8.15.0-rc.16

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 (67) hide show
  1. package/dist/cjs/{SnkMessageBuilder-141aa18d.js → SnkMessageBuilder-66aa2557.js} +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/sankhyablocks.cjs.js +1 -1
  4. package/dist/cjs/snk-application.cjs.entry.js +1 -1
  5. package/dist/cjs/snk-data-exporter.cjs.entry.js +4 -4
  6. package/dist/cjs/{snk-data-unit-6026a9f7.js → snk-data-unit-41c29713.js} +1 -1
  7. package/dist/cjs/snk-data-unit.cjs.entry.js +2 -2
  8. package/dist/cjs/snk-detail-view.cjs.entry.js +1 -1
  9. package/dist/cjs/snk-filter-bar.cjs.entry.js +16 -4
  10. package/dist/cjs/snk-filter-detail.cjs.entry.js +4 -1
  11. package/dist/cjs/snk-filter-item.cjs.entry.js +10 -6
  12. package/dist/cjs/snk-simple-crud.cjs.entry.js +12 -3
  13. package/dist/cjs/snk-taskbar.cjs.entry.js +24 -2
  14. package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +2 -2
  15. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-detail.js +22 -1
  16. package/dist/collection/components/snk-filter-bar/filter-item/snk-filter-item.js +28 -6
  17. package/dist/collection/components/snk-filter-bar/snk-filter-bar.css +2 -1
  18. package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +15 -3
  19. package/dist/collection/components/snk-simple-crud/snk-simple-crud.css +5 -2
  20. package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +11 -2
  21. package/dist/collection/components/snk-taskbar/snk-taskbar.js +28 -2
  22. package/dist/collection/lib/message/resources/snk-simple-crud.msg.js +4 -0
  23. package/dist/components/SnkMessageBuilder.js +4 -0
  24. package/dist/components/snk-data-exporter2.js +2 -2
  25. package/dist/components/snk-filter-bar2.js +16 -4
  26. package/dist/components/snk-filter-detail2.js +5 -1
  27. package/dist/components/snk-filter-item2.js +11 -6
  28. package/dist/components/snk-simple-crud2.js +12 -3
  29. package/dist/components/snk-taskbar2.js +27 -3
  30. package/dist/esm/{SnkMessageBuilder-9747ddd2.js → SnkMessageBuilder-0a4becdd.js} +4 -0
  31. package/dist/esm/loader.js +1 -1
  32. package/dist/esm/sankhyablocks.js +1 -1
  33. package/dist/esm/snk-application.entry.js +1 -1
  34. package/dist/esm/snk-data-exporter.entry.js +4 -4
  35. package/dist/esm/{snk-data-unit-4c343635.js → snk-data-unit-de1d140d.js} +1 -1
  36. package/dist/esm/snk-data-unit.entry.js +2 -2
  37. package/dist/esm/snk-detail-view.entry.js +1 -1
  38. package/dist/esm/snk-filter-bar.entry.js +16 -4
  39. package/dist/esm/snk-filter-detail.entry.js +4 -1
  40. package/dist/esm/snk-filter-item.entry.js +10 -6
  41. package/dist/esm/snk-simple-crud.entry.js +12 -3
  42. package/dist/esm/snk-taskbar.entry.js +24 -2
  43. package/dist/sankhyablocks/p-07a61550.entry.js +1 -0
  44. package/dist/sankhyablocks/p-32556aa6.js +1 -0
  45. package/dist/sankhyablocks/{p-b47c2963.entry.js → p-437316f2.entry.js} +1 -1
  46. package/dist/sankhyablocks/{p-400097f2.entry.js → p-48413484.entry.js} +1 -1
  47. package/dist/sankhyablocks/{p-9a5d1b39.js → p-52c8e589.js} +1 -1
  48. package/dist/sankhyablocks/p-54a5d52a.entry.js +1 -0
  49. package/dist/sankhyablocks/{p-2d919e32.entry.js → p-85af23fe.entry.js} +1 -1
  50. package/dist/sankhyablocks/p-b10b9934.entry.js +1 -0
  51. package/dist/sankhyablocks/p-d8113b2f.entry.js +1 -0
  52. package/dist/sankhyablocks/p-e8763234.entry.js +1 -0
  53. package/dist/sankhyablocks/{p-20b46647.entry.js → p-f7d0fab9.entry.js} +1 -1
  54. package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
  55. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-detail.d.ts +4 -0
  56. package/dist/types/components/snk-filter-bar/filter-item/snk-filter-item.d.ts +6 -2
  57. package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +2 -0
  58. package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +1 -0
  59. package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +6 -0
  60. package/dist/types/components.d.ts +16 -0
  61. package/package.json +1 -1
  62. package/dist/sankhyablocks/p-2936303b.js +0 -1
  63. package/dist/sankhyablocks/p-86801b08.entry.js +0 -1
  64. package/dist/sankhyablocks/p-a043314f.entry.js +0 -1
  65. package/dist/sankhyablocks/p-d304659d.entry.js +0 -1
  66. package/dist/sankhyablocks/p-d6317851.entry.js +0 -1
  67. package/dist/sankhyablocks/p-e7dbe53a.entry.js +0 -1
@@ -8,6 +8,7 @@ export class SnkFilterDetail {
8
8
  constructor() {
9
9
  this.config = undefined;
10
10
  this.getMessage = undefined;
11
+ this.showHardFixed = true;
11
12
  }
12
13
  /**
13
14
  * Exibe o componente snk-filter-detail.
@@ -85,7 +86,9 @@ export class SnkFilterDetail {
85
86
  return Object.assign(Object.assign({}, item), { visible: false, fixed: false, value: undefined });
86
87
  }
87
88
  getPopUpHeaderButtons() {
88
- 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 })))));
89
+ return (h(Fragment, null, !this.config.removalBlocked &&
90
+ this.buildIcon(this.getMessage("snkFilterBar.removeFilter"), "delete", () => this.removeItem()), this.showHardFixed && !this.config.hardFixed &&
91
+ 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 })))));
89
92
  }
90
93
  buildIcon(title, iconName, action) {
91
94
  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}`)}` }))));
@@ -196,6 +199,24 @@ export class SnkFilterDetail {
196
199
  "tags": [],
197
200
  "text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
198
201
  }
202
+ },
203
+ "showHardFixed": {
204
+ "type": "boolean",
205
+ "mutable": false,
206
+ "complexType": {
207
+ "original": "boolean",
208
+ "resolved": "boolean",
209
+ "references": {}
210
+ },
211
+ "required": false,
212
+ "optional": false,
213
+ "docs": {
214
+ "tags": [],
215
+ "text": "Controla a visibilidade do bot\u00E3o de fixar elemento"
216
+ },
217
+ "attribute": "show-hard-fixed",
218
+ "reflect": false,
219
+ "defaultValue": "true"
199
220
  }
200
221
  };
201
222
  }
@@ -14,6 +14,7 @@ export class SnkFilterItem {
14
14
  this.detailIsVisible = undefined;
15
15
  this.config = undefined;
16
16
  this.getMessage = undefined;
17
+ this.showChips = true;
17
18
  }
18
19
  observeDetailIsVisible(value) {
19
20
  this.visibleChanged.emit(value);
@@ -45,19 +46,22 @@ export class SnkFilterItem {
45
46
  autoClose: true,
46
47
  innerClickTest: this.innerClickCheck,
47
48
  backClickListener: () => this.onDetailCloseCallback(),
48
- left: this.getScrollOffsetLeft(),
49
- top: this.getScrollOffsetTop(),
49
+ left: this.getOffsetLeft(),
50
+ top: this.getOffsetTop(),
50
51
  useOverlay: true,
51
52
  overlayClassName: 'ez-scrim ez-scrim--light',
52
53
  isFixed: true
53
54
  };
54
55
  }
55
- getScrollOffsetLeft() {
56
+ getOffsetLeft() {
56
57
  const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
57
58
  const rect = this._filterItemElement.getBoundingClientRect();
58
- return `calc(${rect.x}px + ${padding})`;
59
+ // Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
60
+ const filterDetailWidth = 430;
61
+ const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
62
+ return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
59
63
  }
60
- getScrollOffsetTop() {
64
+ getOffsetTop() {
61
65
  const rect = this._filterItemElement.getBoundingClientRect();
62
66
  return (rect.y + rect.height) + "px";
63
67
  }
@@ -289,7 +293,7 @@ export class SnkFilterItem {
289
293
  }
290
294
  render() {
291
295
  const leftIcon = this.getLeftIconName();
292
- 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 }))));
296
+ 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 }))));
293
297
  }
294
298
  static get is() { return "snk-filter-item"; }
295
299
  static get properties() {
@@ -327,6 +331,24 @@ export class SnkFilterItem {
327
331
  "tags": [],
328
332
  "text": "Usado pra flexibilizar os verbetes e mensagens de acordo com o SnkMessageBuilder."
329
333
  }
334
+ },
335
+ "showChips": {
336
+ "type": "boolean",
337
+ "mutable": false,
338
+ "complexType": {
339
+ "original": "boolean",
340
+ "resolved": "boolean",
341
+ "references": {}
342
+ },
343
+ "required": false,
344
+ "optional": false,
345
+ "docs": {
346
+ "tags": [],
347
+ "text": "Usado para controlar a visibilidade dos chips de filtros"
348
+ },
349
+ "attribute": "show-chips",
350
+ "reflect": false,
351
+ "defaultValue": "true"
330
352
  }
331
353
  };
332
354
  }
@@ -22,7 +22,8 @@
22
22
  }
23
23
 
24
24
  :host([data-mode="hidden"]) {
25
- display: none;
25
+ width: 0px;
26
+ height: 0px;
26
27
  }
27
28
 
28
29
  :host([data-mode="button"]) {
@@ -245,6 +245,17 @@ export class SnkFilterBar {
245
245
  filterActiveFilter(item) {
246
246
  return item.visible || item.removalBlocked;
247
247
  }
248
+ filterPersonalizedItems(item) {
249
+ return item.type === FilterItemType.PERSONALIZED;
250
+ }
251
+ getPersonalizedFilterVariableItems() {
252
+ return this.filterConfig
253
+ .filter(this.filterPersonalizedItems)
254
+ .map(item => {
255
+ const itemId = `filter-${item.id}`;
256
+ 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 }));
257
+ });
258
+ }
248
259
  getFilterItems() {
249
260
  const pinnedItems = [];
250
261
  const unpinnedItems = [];
@@ -430,9 +441,10 @@ export class SnkFilterBar {
430
441
  if (this.showPersonalizedFilter) {
431
442
  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 });
432
443
  }
433
- if (this.mode === "button")
434
- 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) })));
435
- 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" }))));
444
+ if (this.mode !== "regular") {
445
+ 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) }))));
446
+ }
447
+ 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" }))));
436
448
  }
437
449
  static get is() { return "snk-filter-bar"; }
438
450
  static get encapsulation() { return "scoped"; }
@@ -2,11 +2,14 @@
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
5
+
6
+ /*@doc Define a altura minima da grid.*/
7
+ --snk-simple-crud-grid--min-height: 300px;
5
8
  }
6
9
 
7
10
  .simple-crud__container {
8
11
  display: grid;
9
- grid-template-rows: max-content;
12
+ grid-template-rows: auto 1fr;
10
13
  row-gap: 12px;
11
14
  height: 100%;
12
15
  width: 100%;
@@ -23,7 +26,7 @@
23
26
 
24
27
  ez-grid {
25
28
  --ez-grid__container--shadow: none;
26
- min-height: 300px;
29
+ --ez-grid--min-height: var(--snk-simple-crud-grid--min-height);
27
30
  }
28
31
 
29
32
  ez-form {
@@ -1,4 +1,5 @@
1
1
  import { ApplicationContext, DataType, ElementIDUtils, FloatingManager, JSUtils, ObjectUtils, StringUtils, UserInterface, } from '@sankhyalabs/core';
2
+ import { CSSVarsUtils } from "@sankhyalabs/ezui/dist/collection/utils";
2
3
  import { h } from '@stencil/core';
3
4
  import { SIMPLE_CRUD_MODE, VIEW_MODE } from '../../lib/utils/constants';
4
5
  import { TaskbarElement } from '../snk-taskbar/elements/taskbar-elements';
@@ -150,10 +151,15 @@ export class SnkSimpleCrud {
150
151
  this._showPopUpGridConfig = true;
151
152
  });
152
153
  }
153
- openFormConfig() {
154
+ async openFormConfig() {
155
+ var _a, _b;
154
156
  //No momento não daremos suporte para configuraçao de formulário quando houver legacy config
155
- if (this.formLegacyConfigName)
157
+ if (this.formLegacyConfigName) {
158
+ const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
159
+ const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
160
+ await this.application.alert(title, message);
156
161
  return;
162
+ }
157
163
  this._showFormConfig = true;
158
164
  }
159
165
  addGridLegacyConfigName() {
@@ -222,6 +228,9 @@ export class SnkSimpleCrud {
222
228
  this.onModeChange();
223
229
  this.configDatasource();
224
230
  }
231
+ componentDidLoad() {
232
+ CSSVarsUtils.applyVarsGrid(this._element, this._grid);
233
+ }
225
234
  configDatasource() {
226
235
  this._multiSelectionListDataSource.setApplication(this.application);
227
236
  this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
@@ -31,6 +31,8 @@ export class SnkTaskbar {
31
31
  this._customElementsId = undefined;
32
32
  this._slotContainer = undefined;
33
33
  this._hiddenActionsList = [];
34
+ this._lastWidth = undefined;
35
+ this._hasToUpdateOverFlow = false;
34
36
  this.alignRigth = false;
35
37
  this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
36
38
  this.customContainerId = undefined;
@@ -56,6 +58,11 @@ export class SnkTaskbar {
56
58
  var _a;
57
59
  (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
58
60
  }
61
+ observeLastWidth(newValue, oldValue) {
62
+ if (oldValue === 0 && newValue !== 0) {
63
+ this._hasToUpdateOverFlow = true;
64
+ }
65
+ }
59
66
  // Internal methods
60
67
  elementsFromString(strButtons) {
61
68
  const elements = [];
@@ -239,10 +246,20 @@ export class SnkTaskbar {
239
246
  this.getCustomElements();
240
247
  }
241
248
  componentWillRender() {
249
+ this.handleDefinitions();
250
+ this.validatePresentationMode();
251
+ this.updateOverFlowIfNeeded();
252
+ }
253
+ handleDefinitions() {
242
254
  if (this._definitions == undefined && this._permissions) {
243
255
  this._definitions = this.elementsFromString(this.buttons);
244
256
  }
245
- this.validatePresentationMode();
257
+ }
258
+ updateOverFlowIfNeeded() {
259
+ if (this._hasToUpdateOverFlow) {
260
+ requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
261
+ this._hasToUpdateOverFlow = false;
262
+ }
246
263
  }
247
264
  handleOverFlow(overFlowingElements) {
248
265
  const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
@@ -309,6 +326,10 @@ export class SnkTaskbar {
309
326
  }
310
327
  componentDidRender() {
311
328
  this.appendCustomElementsInTaskbar();
329
+ this.updateLastWidth();
330
+ }
331
+ updateLastWidth() {
332
+ this._lastWidth = this._element.getBoundingClientRect().width;
312
333
  }
313
334
  disconnectedCallback() {
314
335
  var _a;
@@ -640,7 +661,9 @@ export class SnkTaskbar {
640
661
  "_customElements": {},
641
662
  "_customElementsId": {},
642
663
  "_slotContainer": {},
643
- "_hiddenActionsList": {}
664
+ "_hiddenActionsList": {},
665
+ "_lastWidth": {},
666
+ "_hasToUpdateOverFlow": {}
644
667
  };
645
668
  }
646
669
  static get events() {
@@ -669,6 +692,9 @@ export class SnkTaskbar {
669
692
  }, {
670
693
  "propName": "disabledButtons",
671
694
  "methodName": "observeDisabledButtons"
695
+ }, {
696
+ "propName": "_lastWidth",
697
+ "methodName": "observeLastWidth"
672
698
  }];
673
699
  }
674
700
  }
@@ -1,4 +1,8 @@
1
1
  export const snkSimpleCrudMessages = {
2
2
  findColumn: "Busca de colunas",
3
+ formConfigUnavaliable: {
4
+ title: "Aviso",
5
+ message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
6
+ }
3
7
  };
4
8
  export default snkSimpleCrudMessages;
@@ -146,6 +146,10 @@ const snkCrudMessages = {
146
146
 
147
147
  const snkSimpleCrudMessages = {
148
148
  findColumn: "Busca de colunas",
149
+ formConfigUnavaliable: {
150
+ title: "Aviso",
151
+ message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
152
+ }
149
153
  };
150
154
 
151
155
  const fileViewerMessages = {
@@ -439,14 +439,14 @@ const SnkDataExporter = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
439
439
  const pkObject = [];
440
440
  const appId = (option === null || option === void 0 ? void 0 : option.replace(this._customPrefix, "")) || "";
441
441
  (_a = this.provider) === null || _a === void 0 ? void 0 : _a.getSelectedIDs().forEach(({ name, type, value }, index) => {
442
- const fields = [];
442
+ const fields = {};
443
443
  fields['fields'] = [];
444
444
  // Se for o primeiro elemento, adiciona essa primeira PK
445
445
  if (index === 0) {
446
446
  pkObject[`PK_${name}`] = { type: this.parseDataType(type), value };
447
447
  pkObject['pks'] = [];
448
448
  }
449
- const dataFields = { nome: name, tipo: this.parseDataType(type), valor: value };
449
+ const dataFields = { nome: `PK_${name}`, tipo: this.parseDataType(type), valor: value };
450
450
  fields['fields'].push(dataFields);
451
451
  pkObject['pks'].push(fields);
452
452
  });
@@ -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);
@@ -51,19 +52,22 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
51
52
  autoClose: true,
52
53
  innerClickTest: this.innerClickCheck,
53
54
  backClickListener: () => this.onDetailCloseCallback(),
54
- left: this.getScrollOffsetLeft(),
55
- top: this.getScrollOffsetTop(),
55
+ left: this.getOffsetLeft(),
56
+ top: this.getOffsetTop(),
56
57
  useOverlay: true,
57
58
  overlayClassName: 'ez-scrim ez-scrim--light',
58
59
  isFixed: true
59
60
  };
60
61
  }
61
- getScrollOffsetLeft() {
62
+ getOffsetLeft() {
62
63
  const padding = getComputedStyle(this._filterItemElement).getPropertyValue("padding-left");
63
64
  const rect = this._filterItemElement.getBoundingClientRect();
64
- return `calc(${rect.x}px + ${padding})`;
65
+ // Width baseado no conteudo do snk-filter-detail. Nesse momento ele retorna 0px pois ainda não foi criado em tela.
66
+ const filterDetailWidth = 430;
67
+ const adjustRightPosition = filterDetailWidth - (document.body.clientWidth - rect.left);
68
+ return `calc(${rect.x}px + ${padding} - ${adjustRightPosition > 0 ? adjustRightPosition : 0}px)`;
65
69
  }
66
- getScrollOffsetTop() {
70
+ getOffsetTop() {
67
71
  const rect = this._filterItemElement.getBoundingClientRect();
68
72
  return (rect.y + rect.height) + "px";
69
73
  }
@@ -295,7 +299,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
295
299
  }
296
300
  render() {
297
301
  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 }))));
302
+ 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
303
  }
300
304
  get _filterItemElement() { return this; }
301
305
  static get watchers() { return {
@@ -304,6 +308,7 @@ const SnkFilterItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
304
308
  }, [0, "snk-filter-item", {
305
309
  "config": [1040],
306
310
  "getMessage": [16],
311
+ "showChips": [4, "show-chips"],
307
312
  "detailIsVisible": [32],
308
313
  "showUp": [64],
309
314
  "hideDetail": [64]
@@ -1,5 +1,6 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
2
  import { StringUtils, ApplicationContext, ObjectUtils, DataType, UserInterface, JSUtils, FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
+ import { CSSVarsUtils } from '@sankhyalabs/ezui/dist/collection/utils';
3
4
  import { V as VIEW_MODE, S as SIMPLE_CRUD_MODE } from './constants.js';
4
5
  import { T as TaskbarElement, d as defineCustomElement$2 } from './snk-taskbar2.js';
5
6
  import './DataFetcher.js';
@@ -28,7 +29,7 @@ import { d as defineCustomElement$1 } from './taskbar-actions-button2.js';
28
29
  const REGULAR_DEFAULT_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "MORE_OPTIONS"];
29
30
  const REGULAR_SELECTED_BTNS = ["INSERT", "REFRESH", "PREVIOUS", "NEXT", "DIVIDER", "CLONE", "REMOVE", "DIVIDER", "MORE_OPTIONS"];
30
31
 
31
- const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:max-content;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;min-height:300px}ez-form.sc-snk-simple-crud{min-height:300px}";
32
+ const snkSimpleCrudCss = ".sc-snk-simple-crud-h{display:flex;height:100%;width:100%;--snk-simple-crud-grid--min-height:300px}.simple-crud__container.sc-snk-simple-crud{display:grid;grid-template-rows:auto 1fr;row-gap:12px;height:100%;width:100%}.simple-crud__container-section.sc-snk-simple-crud{flex-wrap:unset;flex-direction:column}.simple-crud__form--hidden.sc-snk-simple-crud{display:none}ez-grid.sc-snk-simple-crud{--ez-grid__container--shadow:none;--ez-grid--min-height:var(--snk-simple-crud-grid--min-height)}ez-form.sc-snk-simple-crud{min-height:300px}";
32
33
 
33
34
  const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
34
35
  constructor() {
@@ -178,10 +179,15 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
178
179
  this._showPopUpGridConfig = true;
179
180
  });
180
181
  }
181
- openFormConfig() {
182
+ async openFormConfig() {
183
+ var _a, _b;
182
184
  //No momento não daremos suporte para configuraçao de formulário quando houver legacy config
183
- if (this.formLegacyConfigName)
185
+ if (this.formLegacyConfigName) {
186
+ const title = (_a = this.messagesBuilder) === null || _a === void 0 ? void 0 : _a.getMessage("snkSimpleCrud.formConfigUnavaliable.title", undefined);
187
+ const message = (_b = this.messagesBuilder) === null || _b === void 0 ? void 0 : _b.getMessage("snkSimpleCrud.formConfigUnavaliable.message", undefined);
188
+ await this.application.alert(title, message);
184
189
  return;
190
+ }
185
191
  this._showFormConfig = true;
186
192
  }
187
193
  addGridLegacyConfigName() {
@@ -250,6 +256,9 @@ const SnkSimpleCrud = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
250
256
  this.onModeChange();
251
257
  this.configDatasource();
252
258
  }
259
+ componentDidLoad() {
260
+ CSSVarsUtils.applyVarsGrid(this._element, this._grid);
261
+ }
253
262
  configDatasource() {
254
263
  this._multiSelectionListDataSource.setApplication(this.application);
255
264
  this._multiSelectionListDataSource.setDataUnit(this.dataUnit);
@@ -154,6 +154,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
154
154
  this._customElementsId = undefined;
155
155
  this._slotContainer = undefined;
156
156
  this._hiddenActionsList = [];
157
+ this._lastWidth = undefined;
158
+ this._hasToUpdateOverFlow = false;
157
159
  this.alignRigth = false;
158
160
  this.customSlotId = "TASKBAR_CUSTOM_ELEMENTS";
159
161
  this.customContainerId = undefined;
@@ -179,6 +181,11 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
179
181
  var _a;
180
182
  (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate();
181
183
  }
184
+ observeLastWidth(newValue, oldValue) {
185
+ if (oldValue === 0 && newValue !== 0) {
186
+ this._hasToUpdateOverFlow = true;
187
+ }
188
+ }
182
189
  // Internal methods
183
190
  elementsFromString(strButtons) {
184
191
  const elements = [];
@@ -362,10 +369,20 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
362
369
  this.getCustomElements();
363
370
  }
364
371
  componentWillRender() {
372
+ this.handleDefinitions();
373
+ this.validatePresentationMode();
374
+ this.updateOverFlowIfNeeded();
375
+ }
376
+ handleDefinitions() {
365
377
  if (this._definitions == undefined && this._permissions) {
366
378
  this._definitions = this.elementsFromString(this.buttons);
367
379
  }
368
- this.validatePresentationMode();
380
+ }
381
+ updateOverFlowIfNeeded() {
382
+ if (this._hasToUpdateOverFlow) {
383
+ requestAnimationFrame(() => { var _a; return (_a = this._overFlowWatcher) === null || _a === void 0 ? void 0 : _a.forceUpdate(); });
384
+ this._hasToUpdateOverFlow = false;
385
+ }
369
386
  }
370
387
  handleOverFlow(overFlowingElements) {
371
388
  const elementsToHandle = overFlowingElements.filter(element => !this.hasToIgnoreOverFlow(element));
@@ -432,6 +449,10 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
432
449
  }
433
450
  componentDidRender() {
434
451
  this.appendCustomElementsInTaskbar();
452
+ this.updateLastWidth();
453
+ }
454
+ updateLastWidth() {
455
+ this._lastWidth = this._element.getBoundingClientRect().width;
435
456
  }
436
457
  disconnectedCallback() {
437
458
  var _a;
@@ -478,7 +499,8 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
478
499
  get _element() { return this; }
479
500
  static get watchers() { return {
480
501
  "buttons": ["observeButtons"],
481
- "disabledButtons": ["observeDisabledButtons"]
502
+ "disabledButtons": ["observeDisabledButtons"],
503
+ "_lastWidth": ["observeLastWidth"]
482
504
  }; }
483
505
  static get style() { return snkTaskbarCss; }
484
506
  }, [6, "snk-taskbar", {
@@ -501,7 +523,9 @@ const SnkTaskbar = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
501
523
  "_customElements": [32],
502
524
  "_customElementsId": [32],
503
525
  "_slotContainer": [32],
504
- "_hiddenActionsList": [32]
526
+ "_hiddenActionsList": [32],
527
+ "_lastWidth": [32],
528
+ "_hasToUpdateOverFlow": [32]
505
529
  }]);
506
530
  function defineCustomElement() {
507
531
  if (typeof customElements === "undefined") {
@@ -146,6 +146,10 @@ const snkCrudMessages = {
146
146
 
147
147
  const snkSimpleCrudMessages = {
148
148
  findColumn: "Busca de colunas",
149
+ formConfigUnavaliable: {
150
+ title: "Aviso",
151
+ message: 'A opção "Configurar formulário" será disponibilizada em breve. Enquanto isso, acesse a configuração do fomulário através dos layouts anteriores, HTML5 ou Flex.'
152
+ }
149
153
  };
150
154
 
151
155
  const fileViewerMessages = {