@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-50898.0 → 0.0.0-bugfix-dev-KB-52057.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 (69) hide show
  1. package/dist/cjs/ez-alert-list.cjs.entry.js +14 -3
  2. package/dist/cjs/ez-grid.cjs.entry.js +21 -16
  3. package/dist/cjs/ez-modal-container.cjs.entry.js +16 -6
  4. package/dist/cjs/ez-modal.cjs.entry.js +7 -8
  5. package/dist/cjs/ez-popup.cjs.entry.js +17 -11
  6. package/dist/cjs/ez-scroller_3.cjs.entry.js +18 -4
  7. package/dist/cjs/ez-search.cjs.entry.js +15 -5
  8. package/dist/cjs/ez-split-button.cjs.entry.js +25 -6
  9. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  10. package/dist/cjs/ez-split-panel.cjs.entry.js +13 -5
  11. package/dist/cjs/ezui.cjs.js +1 -1
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/collection/components/ez-alert-list/ez-alert-list.js +19 -3
  14. package/dist/collection/components/ez-grid/ez-grid.js +21 -16
  15. package/dist/collection/components/ez-modal/ez-modal.js +22 -9
  16. package/dist/collection/components/ez-modal-container/ez-modal-container.js +19 -9
  17. package/dist/collection/components/ez-popup/ez-popup.js +18 -21
  18. package/dist/collection/components/ez-search/ez-search.js +15 -5
  19. package/dist/collection/components/ez-split-button/ez-split-button.js +25 -6
  20. package/dist/collection/components/ez-split-panel/ez-split-panel.js +13 -5
  21. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +0 -7
  22. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +1 -1
  23. package/dist/collection/components/ez-tree/ez-tree.css +26 -0
  24. package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js +1 -0
  25. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +15 -2
  26. package/dist/custom-elements/index.js +151 -70
  27. package/dist/esm/ez-alert-list.entry.js +14 -3
  28. package/dist/esm/ez-grid.entry.js +21 -16
  29. package/dist/esm/ez-modal-container.entry.js +17 -7
  30. package/dist/esm/ez-modal.entry.js +9 -10
  31. package/dist/esm/ez-popup.entry.js +19 -13
  32. package/dist/esm/ez-scroller_3.entry.js +18 -4
  33. package/dist/esm/ez-search.entry.js +15 -5
  34. package/dist/esm/ez-split-button.entry.js +25 -6
  35. package/dist/esm/ez-split-item.entry.js +2 -2
  36. package/dist/esm/ez-split-panel.entry.js +13 -5
  37. package/dist/esm/ezui.js +1 -1
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/ezui/ezui.esm.js +1 -1
  40. package/dist/ezui/{p-031784b0.entry.js → p-384247cd.entry.js} +1 -1
  41. package/dist/ezui/p-3faa2b46.entry.js +1 -0
  42. package/dist/ezui/p-44c5b6a5.entry.js +1 -0
  43. package/dist/ezui/p-5ef056ce.entry.js +1 -0
  44. package/dist/ezui/{p-7a636dfc.entry.js → p-86ff298d.entry.js} +1 -1
  45. package/dist/ezui/p-91f626d3.entry.js +1 -0
  46. package/dist/ezui/p-9aefaa52.entry.js +1 -0
  47. package/dist/ezui/{p-65b3c23b.entry.js → p-af2ecb1b.entry.js} +1 -1
  48. package/dist/ezui/{p-8c82374d.entry.js → p-d9401ea0.entry.js} +1 -1
  49. package/dist/ezui/p-f3c526cc.entry.js +1 -0
  50. package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +5 -0
  51. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -0
  52. package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +0 -1
  53. package/dist/types/components/ez-modal/ez-modal.d.ts +9 -1
  54. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -1
  55. package/dist/types/components/ez-popup/ez-popup.d.ts +4 -3
  56. package/dist/types/components/ez-search/ez-search.d.ts +1 -0
  57. package/dist/types/components/ez-split-button/ez-split-button.d.ts +3 -0
  58. package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +1 -0
  59. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +3 -1
  60. package/dist/types/components/ez-tree/interfaces/ITreeItemBadge.d.ts +6 -0
  61. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +0 -1
  62. package/dist/types/components.d.ts +4 -0
  63. package/package.json +1 -1
  64. package/dist/ezui/p-2eb8f73b.entry.js +0 -1
  65. package/dist/ezui/p-58fae29b.entry.js +0 -1
  66. package/dist/ezui/p-5e1d036e.entry.js +0 -1
  67. package/dist/ezui/p-8e7031a0.entry.js +0 -1
  68. package/dist/ezui/p-a08b309b.entry.js +0 -1
  69. 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
+ }
@@ -1,6 +1,6 @@
1
1
  import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
2
2
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
3
- import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
3
+ import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
4
4
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
5
5
 
6
6
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
@@ -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.
@@ -1157,6 +1160,14 @@ const EzAlertList$1 = class extends HTMLElement$1 {
1157
1160
  var _a;
1158
1161
  return (_a = this.alerts.find((alert, index) => this.alertId(alert.title, index) === id)) === null || _a === void 0 ? void 0 : _a.title;
1159
1162
  }
1163
+ /**
1164
+ * Retorna o link para o titulo do alerta a partir do id.
1165
+ */
1166
+ getLinkTitle(item) {
1167
+ var _a;
1168
+ const link = (_a = this.alerts.find((alert, index) => this.alertId(alert.title, index) === item.id)) === null || _a === void 0 ? void 0 : _a.link;
1169
+ return link !== null && link !== void 0 ? link : "#";
1170
+ }
1160
1171
  /**
1161
1172
  * Retorna o texto do título do alerta.
1162
1173
  */
@@ -1247,7 +1258,7 @@ const EzAlertList$1 = class extends HTMLElement$1 {
1247
1258
  (h("div", { ref: elem => (this._overlayRef = elem) }, h("div", { class: `alert-list__container ${this.expanded ? 'expanded' : ''}`, ref: elem => (this._container = elem) }, h("div", { class: "alert-list__content" }, h("div", { class: "alert-list__header" }, h("div", { class: "alert-list__title" }, `Avisos (${this.alerts.length})`), h("div", { class: "alert-list__header__buttons" }, this.enableExpand && (h("ez-button", { mode: "icon", size: "small", iconName: "expand", onClick: () => this.toggleExpandContainer(), "data-element-id": ElementIDUtils.getInternalIDInfo('expandButton'), title: this.expanded ? 'Resumir' : 'Expandir' })), h("ez-button", { mode: "icon", size: "small", iconName: "close", "data-element-id": ElementIDUtils.getInternalIDInfo('closeButton'), onClick: () => {
1248
1259
  this.opened = false;
1249
1260
  }, title: 'Fechar' }))), h("div", { class: "alert-list__expandable-content" }, h("ez-list", { itemSlotBuilder: this.itemRightSlotBuilder, hoverFeedback: true, itemLeftSlotBuilder: item => {
1250
- return (h("a", { href: "#", style: {
1261
+ return (h("a", { href: this.getLinkTitle(item), style: {
1251
1262
  fontFamily: "var(--font-pattern, 'Roboto')",
1252
1263
  fontSize: 'var(--text--medium, 14px)',
1253
1264
  fontWeight: 'var(--text-weight--medium, 400)',
@@ -1268,7 +1279,7 @@ const EzAlertList$1 = class extends HTMLElement$1 {
1268
1279
  }
1269
1280
  get _element() { return this; }
1270
1281
  static get watchers() { return {
1271
- "opened": ["observeOpened"]
1282
+ "_container": ["observeOpened"]
1272
1283
  }; }
1273
1284
  static get style() { return ezAlertListCss; }
1274
1285
  };
@@ -125680,10 +125691,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
125680
125691
  return Promise.resolve(this._gridController.getColumnsState().filter(col => matches(col.label, search)));
125681
125692
  }
125682
125693
  observeConfig(config) {
125683
- if (!config) {
125684
- return;
125685
- }
125686
- this._gridController.setColumnsState(config.columns);
125694
+ this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
125687
125695
  }
125688
125696
  updatePaginationTooltip() {
125689
125697
  if (!this._refPaginationLabelTooltip)
@@ -125741,21 +125749,29 @@ const EzGrid$1 = class extends HTMLElement$1 {
125741
125749
  return newConfig;
125742
125750
  }
125743
125751
  positionSelectionCounter() {
125744
- var _a;
125745
- if (this._gridSelectionCounter == undefined) {
125752
+ var _a, _b;
125753
+ if (!this._gridSelectionCounter)
125746
125754
  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 {
125755
+ if (!this._showSelectionCounter) {
125757
125756
  this._gridSelectionCounter.style.bottom = '';
125757
+ return;
125758
125758
  }
125759
+ const containerRect = (_a = this._container) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
125760
+ const selectionRect = (_b = this._gridSelectionCounter) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
125761
+ if (!containerRect || !selectionRect)
125762
+ return;
125763
+ const positionBottom = containerRect.bottom - 30;
125764
+ this._gridSelectionCounter.style.bottom = document.body.clientHeight - positionBottom + 'px';
125765
+ this._gridSelectionCounter.style.left = this.calculatePositionLeft(containerRect, selectionRect);
125766
+ }
125767
+ calculatePositionLeft(containerRect, selectionRect) {
125768
+ let selectionStart = containerRect.left + (containerRect.width / 2);
125769
+ const containerRightEdge = containerRect.left + this._container.clientWidth;
125770
+ const selectionEnd = (selectionStart - (selectionRect.width / 2)) + selectionRect.width;
125771
+ if (selectionEnd > containerRightEdge) {
125772
+ selectionStart = containerRightEdge - (selectionRect.width / 2);
125773
+ }
125774
+ return `${selectionStart}px`;
125759
125775
  }
125760
125776
  setEvents() {
125761
125777
  window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
@@ -126713,11 +126729,7 @@ const EzModal$1 = class extends HTMLElement$1 {
126713
126729
  this.__attachShadow();
126714
126730
  this.ezCloseModal = createEvent(this, "ezCloseModal", 7);
126715
126731
  this.ezOpenModal = createEvent(this, "ezOpenModal", 7);
126716
- this.handleKeyboardEvent = (ev) => {
126717
- if ((ev === null || ev === void 0 ? void 0 : ev.key) === "Escape" && this.closeEsc) {
126718
- this.closeModal();
126719
- }
126720
- };
126732
+ this.ezModalAction = createEvent(this, "ezModalAction", 7);
126721
126733
  this.modalSize = undefined;
126722
126734
  this.align = undefined;
126723
126735
  this.heightMode = "regular";
@@ -126729,11 +126741,9 @@ const EzModal$1 = class extends HTMLElement$1 {
126729
126741
  observeOpened() {
126730
126742
  if (this.opened) {
126731
126743
  this._overlayId = FloatingManager.subscribeOverlayControl(this._modalRef);
126732
- document.addEventListener("keydown", this.handleKeyboardEvent);
126733
126744
  }
126734
126745
  else {
126735
126746
  FloatingManager.unsubscribeOverlayControl(this._modalRef || this._overlayId);
126736
- document.removeEventListener("keydown", this.handleKeyboardEvent);
126737
126747
  }
126738
126748
  }
126739
126749
  closeModal() {
@@ -126742,6 +126752,10 @@ const EzModal$1 = class extends HTMLElement$1 {
126742
126752
  }
126743
126753
  componentDidLoad() {
126744
126754
  this.observeOpened();
126755
+ new KeyboardManager({ propagate: false, element: this._element })
126756
+ .bind("Enter", this.ezModalAction.emit.bind("OK"))
126757
+ .bind("Escape", () => this.closeModal())
126758
+ .bind("Esc", () => this.closeModal());
126745
126759
  }
126746
126760
  componentDidRender() {
126747
126761
  if (this.opened) {
@@ -126760,10 +126774,11 @@ const EzModal$1 = class extends HTMLElement$1 {
126760
126774
  const scrimType = `modal__screen-${this.scrim}`;
126761
126775
  return (h(Host, null, this.opened
126762
126776
  ?
126763
- h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt) }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
126777
+ h("div", { ref: ref => this._modalRef = ref, class: `modal ${scrimType} ${regularVerticalPaddingClass}`, onMouseDown: evt => this.onMouseDownHandler(evt), tabIndex: -1 }, h("div", { class: `modal__container modal__container--${positionSufix}`, ref: ref => this._overlay = ref }, h("div", { class: `modal__content ${modalContentHeightMode} ${this.modalSize}` }, h("slot", null))))
126764
126778
  :
126765
126779
  undefined));
126766
126780
  }
126781
+ get _element() { return this; }
126767
126782
  static get watchers() { return {
126768
126783
  "opened": ["observeOpened"]
126769
126784
  }; }
@@ -126802,11 +126817,11 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
126802
126817
  this.cancelButtonStatus = undefined;
126803
126818
  this.okButtonStatus = undefined;
126804
126819
  }
126805
- handleKeyDown(event) {
126806
- if (event.key === 'Escape' || event.key === 'Esc')
126807
- this.ezModalAction.emit(ModalAction$1.CANCEL);
126808
- if (event.key === 'Enter')
126809
- this.ezModalAction.emit(ModalAction$1.OK);
126820
+ async handleEzModalAction(event) {
126821
+ var _a;
126822
+ if ((event === null || event === void 0 ? void 0 : event.target) && (event === null || event === void 0 ? void 0 : event.target) === ((_a = this._element) === null || _a === void 0 ? void 0 : _a.parentElement)) {
126823
+ this.closeModal();
126824
+ }
126810
126825
  }
126811
126826
  cancelIsVisible() {
126812
126827
  return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
@@ -126817,7 +126832,15 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
126817
126832
  componentDidLoad() {
126818
126833
  window.requestAnimationFrame(() => {
126819
126834
  this.ezModalAction.emit(ModalAction$1.LOAD);
126835
+ this._modalRef.focus();
126820
126836
  });
126837
+ new KeyboardManager({ propagate: false, element: this._element })
126838
+ .bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
126839
+ .bind("Escape", () => this.closeModal())
126840
+ .bind("Esc", () => this.closeModal());
126841
+ }
126842
+ closeModal() {
126843
+ this.ezModalAction.emit("CLOSE");
126821
126844
  }
126822
126845
  focusLast() {
126823
126846
  if (this._okButton == undefined) {
@@ -126829,8 +126852,9 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
126829
126852
  this._closeButton.focus();
126830
126853
  }
126831
126854
  render() {
126832
- return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", null, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
126855
+ return (h(Host, null, h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusLast() }), h("div", { ref: ref => this._modalRef = ref, tabIndex: -1 }, this.showTitleBar && (h("div", { class: "ez-modal-container__header ez-margin-bottom--large" }, h("div", { class: "ez-col ez-align--middle ez-modal-container__title" }, h("h2", { class: "ez-text ez-title--large ez-title--primary ez-text--bold ez-margin-vertical--extra-small" }, this.modalTitle), this.modalSubTitle && (h("div", { class: "ez-text ez-text--medium ez-text--primary ez-margin-vertical--extra-small" }, this.modalSubTitle))), h("button", { ref: ref => this._closeButton = ref, class: "ez-modal-container__close-button", onClick: () => this.ezModalAction.emit(ModalAction$1.CLOSE) }, h("ez-icon", { class: "ez-modal-container__close-icon", size: "medium", iconName: "close" }))))), h("div", { class: "ez-modal-container__content" }, h("slot", null)), h("div", { class: "ez-modal-container__footer" }, this.cancelIsVisible() && (h("ez-button", { label: this.cancelButtonLabel, enabled: this.cancelButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.CANCEL) })), this.okIsVisible() && (h("ez-button", { ref: ref => this._okButton = ref, class: "ez-button--primary", label: this.okButtonLabel, enabled: this.okButtonStatus !== ModalButtonStatus$1.DISABLED, onClick: () => this.ezModalAction.emit(ModalAction$1.OK) }))), h("button", { class: "ez-modal-container__focus-ctrl", onFocusin: () => this.focusFirst() })));
126833
126856
  }
126857
+ get _element() { return this; }
126834
126858
  static get style() { return ezModalContainerCss; }
126835
126859
  };
126836
126860
 
@@ -127366,11 +127390,19 @@ const EzPopup$1 = class extends HTMLElement$1 {
127366
127390
  observeConfig() {
127367
127391
  this.manageOverflow();
127368
127392
  }
127369
- handleKeyDown(event) {
127370
- if (event.key === 'Escape' || event.key === 'Esc')
127371
- this.opened = false;
127372
- if (event.key === 'Enter')
127373
- this.ezPopupAction.emit("OK");
127393
+ componentDidLoad() {
127394
+ if (this.opened && this._popupRef) {
127395
+ this._popupRef.focus();
127396
+ }
127397
+ new KeyboardManager({ propagate: false, element: this._element })
127398
+ .bind("Enter", this.ezPopupAction.emit.bind("OK"))
127399
+ .bind("Escape", () => this.closePopup())
127400
+ .bind("Esc", () => this.closePopup());
127401
+ }
127402
+ closePopup() {
127403
+ this.opened = false;
127404
+ this.manageOverflow();
127405
+ this.ezClosePopup.emit();
127374
127406
  }
127375
127407
  manageOverflow() {
127376
127408
  if (this.opened) {
@@ -127382,25 +127414,23 @@ const EzPopup$1 = class extends HTMLElement$1 {
127382
127414
  }
127383
127415
  manageOverlay() {
127384
127416
  if (this.opened) {
127385
- this._overlayId = FloatingManager.subscribeOverlayControl(this._modalRef);
127417
+ this._overlayId = FloatingManager.subscribeOverlayControl(this._popupRef);
127386
127418
  }
127387
127419
  else {
127388
- FloatingManager.unsubscribeOverlayControl(this._modalRef || this._overlayId);
127420
+ FloatingManager.unsubscribeOverlayControl(this._popupRef || this._overlayId);
127389
127421
  }
127390
127422
  }
127391
127423
  getGridSize() {
127392
127424
  return this._sizeClasses[this.size] || this._sizeClasses["medium"];
127393
127425
  }
127394
127426
  componentDidRender() {
127395
- if (this._container) {
127396
- this._container.focus();
127397
- }
127398
127427
  this.manageOverlay();
127399
127428
  }
127400
127429
  render() {
127401
- return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._modalRef = ref }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container " + (this.heightMode === "auto" ? "popup__container--auto" : ""), ref: elem => this._container = elem, tabIndex: -1 }, h("div", { class: "popup__content" }, h("div", { class: "popup__header " + (this.useHeader ? "popup__header--padding" : "") }, this.useHeader &&
127430
+ return (h(Host, null, this.opened ? (h("div", { class: "overlay", ref: ref => this._popupRef = ref, tabIndex: -1 }, h("div", { class: "popup col " + this.getGridSize() }, h("div", { class: "popup__container " + (this.heightMode === "auto" ? "popup__container--auto" : "") }, h("div", { class: "popup__content" }, h("div", { class: "popup__header " + (this.useHeader ? "popup__header--padding" : "") }, this.useHeader &&
127402
127431
  h(Fragment, null, !!this.ezTitle && h("div", { class: "popup__title" }, this.ezTitle), h("button", { class: this.ezTitle ? "btn-close" : "btn-close btn-close--solo", onClick: () => { this.opened = false; this.ezClosePopup.emit(); } }))), h("div", { class: "popup__expandable-content" }, h("slot", null))))))) : undefined));
127403
127432
  }
127433
+ get _element() { return this; }
127404
127434
  static get watchers() { return {
127405
127435
  "opened": ["observeConfig"]
127406
127436
  }; }
@@ -127850,6 +127880,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
127850
127880
  if (typeof value === "string" || value instanceof String) {
127851
127881
  return this._visibleOptions.find(o => o.value === value);
127852
127882
  }
127883
+ if (value) {
127884
+ return Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value === null || value === void 0 ? void 0 : value.value), label: this.replaceHighlight(value === null || value === void 0 ? void 0 : value.label) });
127885
+ }
127853
127886
  return value;
127854
127887
  }
127855
127888
  updateVisibleOptions() {
@@ -127948,7 +127981,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
127948
127981
  }
127949
127982
  scrollToOption(opt) {
127950
127983
  window.requestAnimationFrame(() => {
127951
- const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
127984
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${this.replaceHighlight(opt.value).replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
127952
127985
  if (liElem)
127953
127986
  liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
127954
127987
  });
@@ -127991,15 +128024,22 @@ const EzSearch$1 = class extends HTMLElement$1 {
127991
128024
  this._source = [];
127992
128025
  this.updateVisibleOptions();
127993
128026
  }
128027
+ replaceHighlight(value) {
128028
+ const startHighlight = new RegExp(this._startHighlightTag, 'g');
128029
+ const endHighlight = new RegExp(this._endHighlightTag, 'g');
128030
+ return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
128031
+ }
127994
128032
  selectOption(newOption) {
127995
128033
  var _a, _b;
127996
128034
  const currentValue = this.getSelectedOption(this.value);
127997
- if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
127998
- || (currentValue == undefined && newOption != undefined && "value" in newOption)) {
127999
- const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
128035
+ const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
128036
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) === null || _b === void 0 ? void 0 : _b.toString()))
128037
+ || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
128038
+ const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
128000
128039
  this.value = adjustedOpt;
128001
128040
  }
128002
128041
  else {
128042
+ this.setInputValue();
128003
128043
  this.resetOptions();
128004
128044
  }
128005
128045
  this._visibleOptions = [];
@@ -128109,7 +128149,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128109
128149
  return;
128110
128150
  }
128111
128151
  this._lookupMode = true;
128112
- this.value = value;
128152
+ this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
128113
128153
  }
128114
128154
  loadOptionValue(argument) {
128115
128155
  var _a;
@@ -128464,22 +128504,38 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128464
128504
  evt.stopPropagation();
128465
128505
  this.closeDropdown();
128466
128506
  }
128507
+ resolveOffsetParentRect() {
128508
+ var _a, _b;
128509
+ const offsetParentRect = (_b = (_a = this.dropdownParent) === null || _a === void 0 ? void 0 : _a.offsetParent) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
128510
+ const scrollLeft = window.scrollX || document.documentElement.scrollLeft;
128511
+ const scrollTop = window.scrollY || document.documentElement.scrollTop;
128512
+ const rectWithoutScroll = {
128513
+ top: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.top) + scrollTop,
128514
+ left: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.left) + scrollLeft,
128515
+ bottom: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.bottom) + scrollTop,
128516
+ right: (offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.right) + scrollLeft,
128517
+ width: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.width,
128518
+ height: offsetParentRect === null || offsetParentRect === void 0 ? void 0 : offsetParentRect.height
128519
+ };
128520
+ this.offsetParentRect = rectWithoutScroll;
128521
+ }
128467
128522
  /**
128468
128523
  * Método responsável em posicionar o dropdown na tela.
128469
128524
  * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
128470
128525
  */
128471
128526
  positionDropdown() {
128527
+ var _a, _b, _c, _d, _e, _f;
128472
128528
  const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
128473
128529
  const rightButtonRect = _rightButton.getBoundingClientRect();
128474
128530
  const dropdownParentRect = _dropdownParent.getBoundingClientRect();
128475
- const spaceBelow = window.innerHeight - rightButtonRect.bottom;
128476
- const spaceAbove = rightButtonRect.top;
128477
- const spaceRight = window.innerWidth - rightButtonRect.right;
128531
+ const spaceBelow = window.innerHeight - (rightButtonRect.bottom + ((_a = this.offsetParentRect) === null || _a === void 0 ? void 0 : _a.top));
128532
+ const spaceAbove = rightButtonRect.top + ((_b = this.offsetParentRect) === null || _b === void 0 ? void 0 : _b.top);
128533
+ const spaceRight = window.innerWidth - (rightButtonRect.left + ((_c = this.offsetParentRect) === null || _c === void 0 ? void 0 : _c.left));
128478
128534
  const spaceLeft = rightButtonRect.left;
128479
128535
  const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
128480
128536
  const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
128481
- let top = `${rightButtonRect.bottom + window.scrollY}px`;
128482
- let left = `${rightButtonRect.left + window.scrollX}px`;
128537
+ let top = `${rightButtonRect.bottom - ((_d = this.offsetParentRect) === null || _d === void 0 ? void 0 : _d.top) + window.scrollY}px`;
128538
+ let left = `${rightButtonRect.left - ((_e = this.offsetParentRect) === null || _e === void 0 ? void 0 : _e.left) + window.scrollX}px`;
128483
128539
  let bottom = 'auto';
128484
128540
  if (hasSpaceBelow) {
128485
128541
  bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
@@ -128487,7 +128543,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128487
128543
  _dropdownParent.style.maxHeight = `${spaceAbove}px`;
128488
128544
  }
128489
128545
  if (hasSpaceRight) {
128490
- left = `${rightButtonRect.right - dropdownParentRect.width + window.scrollX}px`;
128546
+ left = `${rightButtonRect.right - dropdownParentRect.width - ((_f = this.offsetParentRect) === null || _f === void 0 ? void 0 : _f.left) + window.scrollX}px`;
128491
128547
  }
128492
128548
  _dropdownParent.style.top = top;
128493
128549
  _dropdownParent.style.bottom = bottom;
@@ -128500,6 +128556,9 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128500
128556
  componentWillLoad() {
128501
128557
  this.setEvents();
128502
128558
  }
128559
+ componentWillRender() {
128560
+ this.resolveOffsetParentRect();
128561
+ }
128503
128562
  componentDidLoad() {
128504
128563
  if (this._element)
128505
128564
  ElementIDUtils.addIDInfo(this._element);
@@ -128532,7 +128591,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128532
128591
  static get style() { return ezSplitButtonCss; }
128533
128592
  };
128534
128593
 
128535
- 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)}";
128594
+ const ezSplitItemCss = ".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)}";
128536
128595
 
128537
128596
  const SplitItem = class extends HTMLElement$1 {
128538
128597
  constructor() {
@@ -128553,7 +128612,7 @@ const SplitItem = class extends HTMLElement$1 {
128553
128612
  CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
128554
128613
  }
128555
128614
  render() {
128556
- 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))));
128615
+ 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 grid_height-0", ref: el => (this._slot = el) }, h("slot", null))));
128557
128616
  }
128558
128617
  static get style() { return ezSplitItemCss; }
128559
128618
  };
@@ -129342,17 +129401,25 @@ const SplitPanel = class extends HTMLElement$1 {
129342
129401
  };
129343
129402
  return style;
129344
129403
  }
129345
- getGridTemplate() {
129346
- let template = '';
129404
+ calcFreeSpacePercentage() {
129347
129405
  const inUseSpacePercentage = this._items.reduce((accumulator, currentValue) => {
129348
129406
  var _a;
129349
129407
  return accumulator + (((_a = currentValue.size) === null || _a === void 0 ? void 0 : _a.includes('%')) ? Number(currentValue.size.replace("%", "")) : 0);
129350
129408
  }, 0);
129351
- const itemsWithPercentageAmount = this._items.filter((item) => item.size === undefined).length;
129409
+ const itemsWithoutSizeAmount = this._items.filter((item) => item.size === undefined).length;
129410
+ if (!itemsWithoutSizeAmount || !inUseSpacePercentage) {
129411
+ return null;
129412
+ }
129413
+ const freeSpacePercentage = ((100 - inUseSpacePercentage) / itemsWithoutSizeAmount);
129414
+ return freeSpacePercentage;
129415
+ }
129416
+ getGridTemplate() {
129417
+ let template = '';
129418
+ const freeSpacePercentage = this.calcFreeSpacePercentage();
129352
129419
  this._items.forEach((col, index) => {
129353
129420
  let size = col.size || '1fr';
129354
- if (!col.size && inUseSpacePercentage > 0) {
129355
- size = `${(100 - inUseSpacePercentage) / itemsWithPercentageAmount}%`;
129421
+ if (!col.size && freeSpacePercentage) {
129422
+ size = `${freeSpacePercentage}%`;
129356
129423
  }
129357
129424
  if (index === this._items.length - 1) {
129358
129425
  template += ` ${size}`;
@@ -130392,7 +130459,7 @@ const TreeItem = (props) => {
130392
130459
  itemsList.push(treeItem);
130393
130460
  }
130394
130461
  return (h("ul", { class: level === 1 ? "first-level" : undefined },
130395
- h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? 'tree-item-error' : ""}`, onClick: () => available && itemClick(treeItem) }, {
130462
+ h("li", Object.assign({ title: tooltipResolver(treeItem, !disabled, level), class: `tree-item ${treeItem.id !== selectedId ? "tree-item-error" : ""}`, onClick: () => available && itemClick(treeItem) }, {
130396
130463
  disabled,
130397
130464
  selected: treeItem.id === selectedId,
130398
130465
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
@@ -130400,11 +130467,25 @@ const TreeItem = (props) => {
130400
130467
  h("div", { class: "item-label-container" },
130401
130468
  h("div", { class: "item-icon-box" }, expandable &&
130402
130469
  h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
130403
- h("label", { class: "item-label" }, treeItem.label)),
130404
- 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)),
130470
+ h("label", { class: `item-label ${treeItem.bold ? "item-label--bold" : ""}` }, treeItem.label)),
130471
+ getBadgeElement(treeItem.id, treeItem.badge, treeItem.id === selectedId)),
130405
130472
  expanded
130406
130473
  && node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
130407
130474
  };
130475
+ function getBadgeElement(itemId, badge, isSelectedItem) {
130476
+ if (badge == undefined) {
130477
+ return;
130478
+ }
130479
+ if (typeof badge === "string") {
130480
+ return h("div", { class: `tree-item-badge ${isSelectedItem ? null : badge}` }, badge === "error" &&
130481
+ h("ez-icon", { id: `${itemId}-badge-error`, class: "tree-item-badge-error-icon", size: "x-small", style: { color: 'white' }, iconName: "alert-circle" }));
130482
+ }
130483
+ if (badge.type === "text") {
130484
+ return h("div", { id: `${itemId}-badge-text`, class: "tree-item-badge-text" }, badge.text);
130485
+ }
130486
+ return h("div", null,
130487
+ 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 }));
130488
+ }
130408
130489
 
130409
130490
  class Node$1 {
130410
130491
  constructor(tree, item, parent, isPlaceHolder = false) {
@@ -130648,7 +130729,7 @@ class Tree extends Node$1 {
130648
130729
  }
130649
130730
  }
130650
130731
 
130651
- 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)}";
130732
+ 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)}";
130652
130733
 
130653
130734
  const EzTree$1 = class extends HTMLElement$1 {
130654
130735
  constructor() {
@@ -131586,7 +131667,7 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
131586
131667
 
131587
131668
  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]}]);
131588
131669
  const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
131589
- 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]}]);
131670
+ 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]}]);
131590
131671
  const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
131591
131672
  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]}]);
131592
131673
  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]}]);
@@ -131611,11 +131692,11 @@ const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[5
131611
131692
  const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
131612
131693
  const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
131613
131694
  const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
131614
- const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]},[[8,"keydown","handleKeyDown"]]]);
131695
+ const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]},[[4,"ezCloseModal","handleEzModalAction"]]]);
131615
131696
  const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
131616
131697
  const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
131617
131698
  const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
131618
- const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]},[[8,"keydown","handleKeyDown"]]]);
131699
+ const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
131619
131700
  const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
131620
131701
  const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
131621
131702
  const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);