@sankhyalabs/ezui 0.0.0-bugfix-dev-kb-50186.0 → 0.0.0-bugfix-dev-KB-39550.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 (40) hide show
  1. package/dist/cjs/ez-alert-list.cjs.entry.js +5 -2
  2. package/dist/cjs/ez-grid.cjs.entry.js +20 -15
  3. package/dist/cjs/ez-scroller_3.cjs.entry.js +18 -4
  4. package/dist/cjs/ez-split-button.cjs.entry.js +25 -6
  5. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  6. package/dist/cjs/ezui.cjs.js +1 -1
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/components/ez-alert-list/ez-alert-list.js +10 -2
  9. package/dist/collection/components/ez-grid/ez-grid.js +20 -15
  10. package/dist/collection/components/ez-split-button/ez-split-button.js +25 -6
  11. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +4 -0
  12. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +1 -1
  13. package/dist/collection/components/ez-tree/ez-tree.css +26 -0
  14. package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js +1 -0
  15. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +15 -2
  16. package/dist/custom-elements/index.js +71 -30
  17. package/dist/esm/ez-alert-list.entry.js +5 -2
  18. package/dist/esm/ez-grid.entry.js +20 -15
  19. package/dist/esm/ez-scroller_3.entry.js +18 -4
  20. package/dist/esm/ez-split-button.entry.js +25 -6
  21. package/dist/esm/ez-split-item.entry.js +2 -2
  22. package/dist/esm/ezui.js +1 -1
  23. package/dist/esm/loader.js +1 -1
  24. package/dist/ezui/ezui.esm.js +1 -1
  25. package/dist/ezui/p-3faa2b46.entry.js +1 -0
  26. package/dist/ezui/p-7a636dfc.entry.js +1 -0
  27. package/dist/ezui/p-91f626d3.entry.js +1 -0
  28. package/dist/ezui/p-e228ccb9.entry.js +1 -0
  29. package/dist/ezui/{p-031784b0.entry.js → p-fb5adf9e.entry.js} +1 -1
  30. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -0
  31. package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +0 -1
  32. package/dist/types/components/ez-split-button/ez-split-button.d.ts +3 -0
  33. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +3 -1
  34. package/dist/types/components/ez-tree/interfaces/ITreeItemBadge.d.ts +6 -0
  35. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +0 -1
  36. package/package.json +1 -1
  37. package/dist/ezui/p-3376ad44.entry.js +0 -1
  38. package/dist/ezui/p-8e7031a0.entry.js +0 -1
  39. package/dist/ezui/p-a08b309b.entry.js +0 -1
  40. package/dist/ezui/p-b9fbf4e7.entry.js +0 -1
@@ -24,6 +24,8 @@
24
24
  --ez-tree--selected--color: var(--color--primary, #008561);
25
25
  /*@doc Define a cor da fonte e do ícone quando desabilitado.*/
26
26
  --ez-tree--disabled--color: var(--text--disable, #AFB6C0);
27
+ /*@doc Usado em fontes com peso maior (bold)*/
28
+ --ez-tree--font-weight--bold: var(--text-weight--large, 600);
27
29
 
28
30
  /* Item */
29
31
  /*@doc Define a altura de cada item.*/
@@ -47,6 +49,18 @@
47
49
  /*@doc Define o espaçamento interno do ícone.*/
48
50
  --ez-tree__item-icon-box--padding: var(--ez-tree__tree-item--padding);
49
51
 
52
+ /* Badge ícone - Cores */
53
+ /*@doc Cor de ícone de badge padrão.*/
54
+ --ez-tree__badge--icon-color--default: var(--title--primary, #2B3A54);
55
+ /*@doc Cor de ícone de badge de erro.*/
56
+ --ez-tree__badge--icon-color--error: var(--color--error, #da4453);
57
+ /*@doc Cor de ícone de badge sucesso.*/
58
+ --ez-tree__badge--icon-color--success: var(--color-alert--success-800, #157a00);
59
+ /*@doc Cor de ícone de badge de aviso.*/
60
+ --ez-tree__badge--icon-color--warning: var(--color--warning, #f2d410);
61
+ /*@doc Cor de ícone de badge desabilitado.*/
62
+ --ez-tree__badge--icon-color--disabled: var(--text--disable, #AFB6C0);
63
+
50
64
  /*private*/
51
65
  display: flex;
52
66
  flex-direction: column;
@@ -85,6 +99,14 @@ ul.first-level {
85
99
  --ez-icon--color: white;
86
100
  }
87
101
 
102
+ .tree-item-badge-text{
103
+ /*public*/
104
+ font-family: var(--ez-tree--font-family);
105
+ font-size: var(--ez-tree--font-size);
106
+ font-weight: var(--ez-tree--font-weight);
107
+ color: var(--ez-tree--color);
108
+ }
109
+
88
110
  .tree-item-badge.error{
89
111
  background: var(--color--error);
90
112
  }
@@ -180,6 +202,10 @@ ul.first-level {
180
202
  color: var(--ez-tree--color);
181
203
  }
182
204
 
205
+ .item-label--bold {
206
+ font-weight: var(--ez-tree--font-weight--bold);
207
+ }
208
+
183
209
  .tree-item[selected] .item-label {
184
210
  /*public*/
185
211
  color: var(--ez-tree--selected--color);
@@ -14,11 +14,24 @@ export const TreeItem = (props) => {
14
14
  if (available) {
15
15
  itemsList.push(treeItem);
16
16
  }
17
- return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
17
+ return (h("ul", { class: level === 1 ? "first-level" : undefined }, h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
18
18
  disabled,
19
19
  selected: treeItem.id === selectedId,
20
20
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
21
21
  }), h("div", { class: "item-label-container" }, h("div", { class: "item-icon-box" }, expandable &&
22
- h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class: "item-label" }, treeItem.label)), h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)), expanded
22
+ h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })), h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)), getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)), expanded
23
23
  && node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
24
24
  };
25
+ function getBadgeElement(itemId, badge, isSelectedItem) {
26
+ if (badge == undefined) {
27
+ return;
28
+ }
29
+ if (typeof badge === "string") {
30
+ return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
31
+ h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
32
+ }
33
+ if (badge.type === "text") {
34
+ return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
35
+ }
36
+ return h("div", null, h("ez-icon", { id: `${itemId}-badge-icon`, class: "tree-item-badge-icon", style: { "--ez-icon--color": `var(--ez-tree__badge--icon-color--${badge.iconColor || "default"})` }, iconName: badge.iconName }));
37
+ }
@@ -1133,6 +1133,7 @@ const EzAlertList$1 = class extends HTMLElement$1 {
1133
1133
  super();
1134
1134
  this.__registerHost();
1135
1135
  this.__attachShadow();
1136
+ this._container = undefined;
1136
1137
  this.alerts = [];
1137
1138
  this.enableDragAndDrop = undefined;
1138
1139
  this.enableExpand = true;
@@ -1141,7 +1142,9 @@ const EzAlertList$1 = class extends HTMLElement$1 {
1141
1142
  this.expanded = false;
1142
1143
  }
1143
1144
  observeOpened() {
1144
- this.manageOverlay();
1145
+ if (this.opened) {
1146
+ this.manageOverlay();
1147
+ }
1145
1148
  }
1146
1149
  /**
1147
1150
  * Retorna o id do alerta a partir do título e do índice.
@@ -1268,7 +1271,7 @@ const EzAlertList$1 = class extends HTMLElement$1 {
1268
1271
  }
1269
1272
  get _element() { return this; }
1270
1273
  static get watchers() { return {
1271
- "opened": ["observeOpened"]
1274
+ "_container": ["observeOpened"]
1272
1275
  }; }
1273
1276
  static get style() { return ezAlertListCss; }
1274
1277
  };
@@ -125680,9 +125683,6 @@ const EzGrid$1 = class extends HTMLElement$1 {
125680
125683
  return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
125681
125684
  }
125682
125685
  observeConfig(config) {
125683
- if (!config) {
125684
- return;
125685
- }
125686
125686
  this._gridController.setColumnsState(config.columns);
125687
125687
  }
125688
125688
  updatePaginationTooltip() {
@@ -125741,21 +125741,29 @@ const EzGrid$1 = class extends HTMLElement$1 {
125741
125741
  return newConfig;
125742
125742
  }
125743
125743
  positionSelectionCounter() {
125744
- var _a;
125745
- if (this._gridSelectionCounter == undefined) {
125744
+ var _a, _b;
125745
+ if (!this._gridSelectionCounter)
125746
125746
  return;
125747
- }
125748
- if (this._showSelectionCounter) {
125749
- const boundingContainer = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
125750
- if (boundingContainer == undefined) {
125751
- return;
125752
- }
125753
- const limitBottom = boundingContainer.bottom - 30;
125754
- this._gridSelectionCounter.style.bottom = document.body.clientHeight - limitBottom + 'px';
125755
- }
125756
- else {
125747
+ if (!this._showSelectionCounter) {
125757
125748
  this._gridSelectionCounter.style.bottom = '';
125749
+ return;
125750
+ }
125751
+ const containerRect = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
125752
+ const selectionRect = (_b = this._gridSelectionCounter) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
125753
+ if (!containerRect || !selectionRect)
125754
+ return;
125755
+ const positionBottom = containerRect.bottom - 30;
125756
+ this._gridSelectionCounter.style.bottom = document.body.clientHeight - positionBottom + 'px';
125757
+ this._gridSelectionCounter.style.left = this.calculatePositionLeft(containerRect, selectionRect);
125758
+ }
125759
+ calculatePositionLeft(containerRect, selectionRect) {
125760
+ let selectionStart = containerRect.left + (containerRect.width / 2);
125761
+ const containerRightEdge = containerRect.left + this._container.clientWidth;
125762
+ const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
125763
+ if (selectionEnd > containerRightEdge) {
125764
+ selectionStart = containerRightEdge - (selectionRect.width / 2);
125758
125765
  }
125766
+ return `${selectionStart}px`;
125759
125767
  }
125760
125768
  setEvents() {
125761
125769
  window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
@@ -128462,22 +128470,38 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128462
128470
  evt.stopPropagation();
128463
128471
  this.closeDropdown();
128464
128472
  }
128473
+ resolveOffsetParentRect() {
128474
+ var _a, _b;
128475
+ const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
128476
+ const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
128477
+ const scrollTop = window.scrollY || document.documentElement.scrollTop;
128478
+ const rectWithoutScroll = {
128479
+ top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
128480
+ left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
128481
+ bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
128482
+ right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
128483
+ width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
128484
+ height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
128485
+ };
128486
+ this.offsetParentRect = rectWithoutScroll;
128487
+ }
128465
128488
  /**
128466
128489
  * Método responsável em posicionar o dropdown na tela.
128467
128490
  * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
128468
128491
  */
128469
128492
  positionDropdown() {
128493
+ var _a, _b, _c, _d, _e, _f;
128470
128494
  const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
128471
128495
  const rightButtonRect = _rightButton.getBoundingClientRect();
128472
128496
  const dropdownParentRect = _dropdownParent.getBoundingClientRect();
128473
- const spaceBelow = window.innerHeight - rightButtonRect.bottom;
128474
- const spaceAbove = rightButtonRect.top;
128475
- const spaceRight = window.innerWidth - rightButtonRect.right;
128497
+ const spaceBelow = window.innerHeight - (rightButtonRect.bottom + ((_a = this.offsetParentRect) === null || _a === void 0 ? void 0 : _a.top));
128498
+ const spaceAbove = rightButtonRect.top + ((_b = this.offsetParentRect) === null || _b === void 0 ? void 0 : _b.top);
128499
+ const spaceRight = window.innerWidth - (rightButtonRect.left + ((_c = this.offsetParentRect) === null || _c === void 0 ? void 0 : _c.left));
128476
128500
  const spaceLeft = rightButtonRect.left;
128477
128501
  const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
128478
128502
  const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
128479
- let top = `${rightButtonRect.bottom + window.scrollY}px`;
128480
- let left = `${rightButtonRect.left + window.scrollX}px`;
128503
+ let top = `${rightButtonRect.bottom - ((_d = this.offsetParentRect) === null || _d === void 0 ? void 0 : _d.top) + window.scrollY}px`;
128504
+ let left = `${rightButtonRect.left - ((_e = this.offsetParentRect) === null || _e === void 0 ? void 0 : _e.left) + window.scrollX}px`;
128481
128505
  let bottom = 'auto';
128482
128506
  if (hasSpaceBelow) {
128483
128507
  bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
@@ -128485,7 +128509,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128485
128509
  _dropdownParent.style.maxHeight = `${spaceAbove}px`;
128486
128510
  }
128487
128511
  if (hasSpaceRight) {
128488
- left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
128512
+ left = `${rightButtonRect.right - dropdownParentRect.width - ((_f = this.offsetParentRect) === null || _f === void 0 ? void 0 : _f.left) + window.scrollX}px`;
128489
128513
  }
128490
128514
  _dropdownParent.style.top = top;
128491
128515
  _dropdownParent.style.bottom = bottom;
@@ -128498,6 +128522,9 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128498
128522
  componentWillLoad() {
128499
128523
  this.setEvents();
128500
128524
  }
128525
+ componentWillRender() {
128526
+ this.resolveOffsetParentRect();
128527
+ }
128501
128528
  componentDidLoad() {
128502
128529
  if (this._element)
128503
128530
  ElementIDUtils.addIDInfo(this._element);
@@ -128530,7 +128557,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128530
128557
  static get style() { return ezSplitButtonCss; }
128531
128558
  };
128532
128559
 
128533
- const ezSplitItemCss = "ez-split-item{--snk-grid-min-height:0;--ez-grid--min-height:0}.box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
128560
+ const ezSplitItemCss = "ez-split-item{--snk-grid-min-height:0;--ez-grid--min-height:0}.box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}";
128534
128561
 
128535
128562
  const SplitItem = class extends HTMLElement$1 {
128536
128563
  constructor() {
@@ -128551,7 +128578,7 @@ const SplitItem = class extends HTMLElement$1 {
128551
128578
  CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
128552
128579
  }
128553
128580
  render() {
128554
- return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-margin--small ez-title ez-title--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, h("slot", null))));
128581
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, h("slot", null))));
128555
128582
  }
128556
128583
  static get style() { return ezSplitItemCss; }
128557
128584
  };
@@ -130382,7 +130409,7 @@ const TreeItem = (props) => {
130382
130409
  itemsList.push(treeItem);
130383
130410
  }
130384
130411
  return (h("ul", { class: level === 1 ? "first-level" : undefined },
130385
- h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
130412
+ h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
130386
130413
  disabled,
130387
130414
  selected: treeItem.id === selectedId,
130388
130415
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
@@ -130390,11 +130417,25 @@ const TreeItem = (props) => {
130390
130417
  h("div", { class: "item-label-container" },
130391
130418
  h("div", { class: "item-icon-box" }, expandable &&
130392
130419
  h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
130393
- h("label", { class: "item-label" }, treeItem.label)),
130394
- h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)),
130420
+ h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
130421
+ getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
130395
130422
  expanded
130396
130423
  && node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
130397
130424
  };
130425
+ function getBadgeElement(itemId, badge, isSelectedItem) {
130426
+ if (badge == undefined) {
130427
+ return;
130428
+ }
130429
+ if (typeof badge === "string") {
130430
+ return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
130431
+ h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
130432
+ }
130433
+ if (badge.type === "text") {
130434
+ return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
130435
+ }
130436
+ return h("div", null,
130437
+ h("ez-icon", { id: `${itemId}-badge-icon`, class: "tree-item-badge-icon", style: { "--ez-icon--color": `var(--ez-tree__badge--icon-color--${badge.iconColor || "default"})` }, iconName: badge.iconName }));
130438
+ }
130398
130439
 
130399
130440
  class Node$1 {
130400
130441
  constructor(tree, item, parent, isPlaceHolder = false) {
@@ -130638,7 +130679,7 @@ class Tree extends Node$1 {
130638
130679
  }
130639
130680
  }
130640
130681
 
130641
- const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
130682
+ const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree--font-weight--bold:var(--text-weight--large, 600);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);--ez-tree__badge--icon-color--default:var(--title--primary, #2B3A54);--ez-tree__badge--icon-color--error:var(--color--error, #da4453);--ez-tree__badge--icon-color--success:var(--color-alert--success-800, #157a00);--ez-tree__badge--icon-color--warning:var(--color--warning, #f2d410);--ez-tree__badge--icon-color--disabled:var(--text--disable, #AFB6C0);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge-text{font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.item-label--bold{font-weight:var(--ez-tree--font-weight--bold)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
130642
130683
 
130643
130684
  const EzTree$1 = class extends HTMLElement$1 {
130644
130685
  constructor() {
@@ -131576,7 +131617,7 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
131576
131617
 
131577
131618
  const EzActionsButton = /*@__PURE__*/proxyCustomElement(EzActionsButton$1, [1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32]}]);
131578
131619
  const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
131579
- const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540]}]);
131620
+ const EzAlertList = /*@__PURE__*/proxyCustomElement(EzAlertList$1, [1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]);
131580
131621
  const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
131581
131622
  const EzBadge = /*@__PURE__*/proxyCustomElement(EzBadge$1, [1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"hasSlot":[32]}]);
131582
131623
  const EzBreadcrumb = /*@__PURE__*/proxyCustomElement(EzBreadcrumb$1, [1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]);
@@ -6,6 +6,7 @@ const ezAlertListCss = ":host {\n display: flex;\n\n /* Alert List */\n \n /
6
6
  const EzAlertList = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
+ this._container = undefined;
9
10
  this.alerts = [];
10
11
  this.enableDragAndDrop = undefined;
11
12
  this.enableExpand = true;
@@ -14,7 +15,9 @@ const EzAlertList = class {
14
15
  this.expanded = false;
15
16
  }
16
17
  observeOpened() {
17
- this.manageOverlay();
18
+ if (this.opened) {
19
+ this.manageOverlay();
20
+ }
18
21
  }
19
22
  /**
20
23
  * Retorna o id do alerta a partir do título e do índice.
@@ -141,7 +144,7 @@ const EzAlertList = class {
141
144
  }
142
145
  get _element() { return getElement(this); }
143
146
  static get watchers() { return {
144
- "opened": ["observeOpened"]
147
+ "_container": ["observeOpened"]
145
148
  }; }
146
149
  };
147
150
  EzAlertList.style = ezAlertListCss;
@@ -120763,9 +120763,6 @@ const EzGrid = class {
120763
120763
  return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
120764
120764
  }
120765
120765
  observeConfig(config) {
120766
- if (!config) {
120767
- return;
120768
- }
120769
120766
  this._gridController.setColumnsState(config.columns);
120770
120767
  }
120771
120768
  updatePaginationTooltip() {
@@ -120824,21 +120821,29 @@ const EzGrid = class {
120824
120821
  return newConfig;
120825
120822
  }
120826
120823
  positionSelectionCounter() {
120827
- var _a;
120828
- if (this._gridSelectionCounter == undefined) {
120824
+ var _a, _b;
120825
+ if (!this._gridSelectionCounter)
120829
120826
  return;
120830
- }
120831
- if (this._showSelectionCounter) {
120832
- const boundingContainer = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
120833
- if (boundingContainer == undefined) {
120834
- return;
120835
- }
120836
- const limitBottom = boundingContainer.bottom - 30;
120837
- this._gridSelectionCounter.style.bottom = document.body.clientHeight - limitBottom + 'px';
120838
- }
120839
- else {
120827
+ if (!this._showSelectionCounter) {
120840
120828
  this._gridSelectionCounter.style.bottom = '';
120829
+ return;
120841
120830
  }
120831
+ const containerRect = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
120832
+ const selectionRect = (_b = this._gridSelectionCounter) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
120833
+ if (!containerRect || !selectionRect)
120834
+ return;
120835
+ const positionBottom = containerRect.bottom - 30;
120836
+ this._gridSelectionCounter.style.bottom = document.body.clientHeight - positionBottom + 'px';
120837
+ this._gridSelectionCounter.style.left = this.calculatePositionLeft(containerRect, selectionRect);
120838
+ }
120839
+ calculatePositionLeft(containerRect, selectionRect) {
120840
+ let selectionStart = containerRect.left + (containerRect.width / 2);
120841
+ const containerRightEdge = containerRect.left + this._container.clientWidth;
120842
+ const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
120843
+ if (selectionEnd > containerRightEdge) {
120844
+ selectionStart = containerRightEdge - (selectionRect.width / 2);
120845
+ }
120846
+ return `${selectionStart}px`;
120842
120847
  }
120843
120848
  setEvents() {
120844
120849
  window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
@@ -242,7 +242,7 @@ const TreeItem = (props) => {
242
242
  itemsList.push(treeItem);
243
243
  }
244
244
  return (h("ul", { class: level === 1 ? "first-level" : undefined },
245
- h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
245
+ h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
246
246
  disabled,
247
247
  selected: treeItem.id === selectedId,
248
248
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
@@ -250,11 +250,25 @@ const TreeItem = (props) => {
250
250
  h("div", { class: "item-label-container" },
251
251
  h("div", { class: "item-icon-box" }, expandable &&
252
252
  h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
253
- h("label", { class: "item-label" }, treeItem.label)),
254
- h("div", { class: `tree-item-badge ${(treeItem.id !== selectedId) ? treeItem.badge : null}` }, treeItem.badge === 'error' ? (h("ez-icon", { id: `${treeItem.id}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" })) : null)),
253
+ h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
254
+ getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
255
255
  expanded
256
256
  && node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
257
257
  };
258
+ function getBadgeElement(itemId, badge, isSelectedItem) {
259
+ if (badge == undefined) {
260
+ return;
261
+ }
262
+ if (typeof badge === "string") {
263
+ return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
264
+ h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
265
+ }
266
+ if (badge.type === "text") {
267
+ return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
268
+ }
269
+ return h("div", null,
270
+ h("ez-icon", { id: `${itemId}-badge-icon`, class: "tree-item-badge-icon", style: { "--ez-icon--color": `var(--ez-tree__badge--icon-color--${badge.iconColor || "default"})` }, iconName: badge.iconName }));
271
+ }
258
272
 
259
273
  class Node {
260
274
  constructor(tree, item, parent, isPlaceHolder = false) {
@@ -498,7 +512,7 @@ class Tree extends Node {
498
512
  }
499
513
  }
500
514
 
501
- const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
515
+ const ezTreeCss = ":host{--ez-tree--border-radius:var(--border--radius-small, 8px);--ez-tree--padding-inline-start:20px;--ez-tree--margin:var(--space--extra-small, 3px);--ez-tree--margin-right:calc(var(--space--small, 6px) + 2px);--ez-tree--font-family:var(--font-pattern, Arial);--ez-tree--font-size:var(--text--medium, 14px);--ez-tree--selected--font-weight:var(--text-weight--large, 600);--ez-tree--font-weight:var(--text-weight--small, 400);--ez-tree--color:var(--title--primary, #2B3A54);--ez-tree--selected--color:var(--color--primary, #008561);--ez-tree--disabled--color:var(--text--disable, #AFB6C0);--ez-tree--font-weight--bold:var(--text-weight--large, 600);--ez-tree__tree-item--height:var(--size-medium, 18px);--ez-tree__tree-item--padding:var(--space--small, 6px);--ez-tree__tree-item--background-color:var(--background--xlight, #FFFFFF);--ez-tree__tree-item--selected--background-color:var(--color--primary-300, #E2F4EF);--ez-tree__tree-item--hover--background-color:var(--background--medium, #F0F3F7);--ez-tree__tree-item--disabled--background-color:var(--ez-tree__tree-Item--background-color);--ez-tree__item-icon-box--height:var(--ez-tree__tree-item--height);--ez-tree__item-icon-box--width:var(--size-medium, 18px);--ez-tree__item-icon-box--padding:var(--ez-tree__tree-item--padding);--ez-tree__badge--icon-color--default:var(--title--primary, #2B3A54);--ez-tree__badge--icon-color--error:var(--color--error, #da4453);--ez-tree__badge--icon-color--success:var(--color-alert--success-800, #157a00);--ez-tree__badge--icon-color--warning:var(--color--warning, #f2d410);--ez-tree__badge--icon-color--disabled:var(--text--disable, #AFB6C0);display:flex;flex-direction:column;margin:0 var(--ez-tree--margin) var(--ez-tree--margin) var(--ez-tree--margin);outline:none}ul{list-style-type:none;margin:0;padding-inline-start:var(--ez-tree--padding-inline-start)}ul.first-level{padding-inline-start:0}.tree-item-badge{width:16px;height:16px;background:transparent;border-radius:50%;transition:all 300ms ease-in-out;display:flex;align-items:center;justify-content:center}.tree-item-badge-error-icon{--ez-icon--color:white}.tree-item-badge-text{font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.tree-item-badge.error{background:var(--color--error)}.tree-item-badge.warning{background:var(--color--warning)}.tree-item-badge.success{background:var(--color--success)}.item-label-container{display:flex;align-items:center}.tree-item{display:flex;align-items:center;margin-top:var(--ez-tree--margin);margin-right:var(--ez-tree--margin-right);border-radius:var(--ez-tree--border-radius);height:var(--ez-tree__tree-item--height);padding:var(--ez-tree__tree-item--padding);justify-content:space-between}.tree-item[selected]{background-color:var(--ez-tree__tree-item--selected--background-color)}.tree-item:hover{background-color:var(--ez-tree__tree-item--hover--background-color)}.tree-item[disabled],.tree-item[disabled]:hover{background-color:var(--ez-tree__tree-item--disabled--background-color)}.item-icon-box{display:flex;align-items:center;justify-content:center;width:var(--ez-tree__item-icon-box--width);height:var(--ez-tree__item-icon-box--height);padding:var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) var(--ez-tree__item-icon-box--padding) 0}.item-icon{--ez-icon--color:var(--ez-tree--color)}.item-icon:hover{cursor:pointer}.tree-item[selected] .item-icon{--ez-icon--color:var(--ez-tree--selected--color)}.tree-item[disabled] .item-icon{cursor:unset;--ez-icon--color:var(--ez-tree--disabled--color)}.item-label{cursor:inherit;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-family:var(--ez-tree--font-family);font-size:var(--ez-tree--font-size);font-weight:var(--ez-tree--font-weight);color:var(--ez-tree--color)}.item-label--bold{font-weight:var(--ez-tree--font-weight--bold)}.tree-item[selected] .item-label{color:var(--ez-tree--selected--color);font-weight:var(--ez-tree--selected--font-weight)}.tree-item[disabled] .item-label{color:var(--ez-tree--disabled--color)}";
502
516
 
503
517
  const EzTree = class {
504
518
  constructor(hostRef) {
@@ -72,22 +72,38 @@ const EzSplitButton = class {
72
72
  evt.stopPropagation();
73
73
  this.closeDropdown();
74
74
  }
75
+ resolveOffsetParentRect() {
76
+ var _a, _b;
77
+ const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
78
+ const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
79
+ const scrollTop = window.scrollY || document.documentElement.scrollTop;
80
+ const rectWithoutScroll = {
81
+ top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
82
+ left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
83
+ bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
84
+ right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
85
+ width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
86
+ height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
87
+ };
88
+ this.offsetParentRect = rectWithoutScroll;
89
+ }
75
90
  /**
76
91
  * Método responsável em posicionar o dropdown na tela.
77
92
  * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
78
93
  */
79
94
  positionDropdown() {
95
+ var _a, _b, _c, _d, _e, _f;
80
96
  const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
81
97
  const rightButtonRect = _rightButton.getBoundingClientRect();
82
98
  const dropdownParentRect = _dropdownParent.getBoundingClientRect();
83
- const spaceBelow = window.innerHeight - rightButtonRect.bottom;
84
- const spaceAbove = rightButtonRect.top;
85
- const spaceRight = window.innerWidth - rightButtonRect.right;
99
+ const spaceBelow = window.innerHeight - (rightButtonRect.bottom + ((_a = this.offsetParentRect) === null || _a === void 0 ? void 0 : _a.top));
100
+ const spaceAbove = rightButtonRect.top + ((_b = this.offsetParentRect) === null || _b === void 0 ? void 0 : _b.top);
101
+ const spaceRight = window.innerWidth - (rightButtonRect.left + ((_c = this.offsetParentRect) === null || _c === void 0 ? void 0 : _c.left));
86
102
  const spaceLeft = rightButtonRect.left;
87
103
  const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
88
104
  const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
89
- let top = `${rightButtonRect.bottom + window.scrollY}px`;
90
- let left = `${rightButtonRect.left + window.scrollX}px`;
105
+ let top = `${rightButtonRect.bottom - ((_d = this.offsetParentRect) === null || _d === void 0 ? void 0 : _d.top) + window.scrollY}px`;
106
+ let left = `${rightButtonRect.left - ((_e = this.offsetParentRect) === null || _e === void 0 ? void 0 : _e.left) + window.scrollX}px`;
91
107
  let bottom = 'auto';
92
108
  if (hasSpaceBelow) {
93
109
  bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
@@ -95,7 +111,7 @@ const EzSplitButton = class {
95
111
  _dropdownParent.style.maxHeight = `${spaceAbove}px`;
96
112
  }
97
113
  if (hasSpaceRight) {
98
- left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
114
+ left = `${rightButtonRect.right - dropdownParentRect.width - ((_f = this.offsetParentRect) === null || _f === void 0 ? void 0 : _f.left) + window.scrollX}px`;
99
115
  }
100
116
  _dropdownParent.style.top = top;
101
117
  _dropdownParent.style.bottom = bottom;
@@ -108,6 +124,9 @@ const EzSplitButton = class {
108
124
  componentWillLoad() {
109
125
  this.setEvents();
110
126
  }
127
+ componentWillRender() {
128
+ this.resolveOffsetParentRect();
129
+ }
111
130
  componentDidLoad() {
112
131
  if (this._element)
113
132
  ElementIDUtils.addIDInfo(this._element);
@@ -5,7 +5,7 @@ import './DialogType-54a62731.js';
5
5
  import './CheckMode-bdb2ec19.js';
6
6
  import '@sankhyalabs/core';
7
7
 
8
- const ezSplitItemCss = "ez-split-item{--snk-grid-min-height:0;--ez-grid--min-height:0}.box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}";
8
+ const ezSplitItemCss = "ez-split-item{--snk-grid-min-height:0;--ez-grid--min-height:0}.box_split-item{background-color:var(--background--xlight);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);flex-direction:column;overflow:hidden;display:flex;padding:var(--space--nano)}.box_split-item>.ez-split-item--content{overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-title{flex:1;white-space:nowrap;overflow:hidden}.ez-split-item--header-title h3{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:100%}h3.ez-margin--small{margin-left:var(--space--small)}";
9
9
 
10
10
  const SplitItem = class {
11
11
  constructor(hostRef) {
@@ -25,7 +25,7 @@ const SplitItem = class {
25
25
  CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
26
26
  }
27
27
  render() {
28
- return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-margin--small ez-title ez-title--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, h("slot", null))));
28
+ return (h(Host, { class: `box_split-item ${this._expanded ? 'expanded__item' : ''}`, ref: el => (this._element = el) }, h("div", { class: "ez-split-item--header" }, h("slot", { name: "leftButtons" }), h("div", { class: "ez-split-item--header-title" }, this.label && (h("h3", { class: "ez-text ez-text--primary ez-title ez-title--small ez-margin--small", title: this.label }, this.label))), h("div", { class: "ez-split-item--header-buttons" }, this.enableExpand && (h("ez-button", { size: "small", mode: "icon", iconName: "expand", class: 'ez-button--tertiary', onClick: () => this.toggleExpandItem(), title: this._expanded ? 'Resumir' : 'Expandir' })), h("slot", { name: "rightButtons" }))), h("div", { class: "ez-split-item--content", ref: el => (this._slot = el) }, h("slot", null))));
29
29
  }
30
30
  };
31
31
  SplitItem.style = ezSplitItemCss;