@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-50051.3 → 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 (58) 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-modal-container.cjs.entry.js +5 -6
  4. package/dist/cjs/ez-popup.cjs.entry.js +5 -5
  5. package/dist/cjs/ez-scroller_3.cjs.entry.js +18 -4
  6. package/dist/cjs/ez-search.cjs.entry.js +5 -15
  7. package/dist/cjs/ez-split-button.cjs.entry.js +25 -6
  8. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  9. package/dist/cjs/ezui.cjs.js +1 -1
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/collection/components/ez-alert-list/ez-alert-list.js +10 -2
  12. package/dist/collection/components/ez-grid/ez-grid.js +20 -15
  13. package/dist/collection/components/ez-modal-container/ez-modal-container.js +5 -15
  14. package/dist/collection/components/ez-popup/ez-popup.js +6 -15
  15. package/dist/collection/components/ez-search/ez-search.js +5 -15
  16. package/dist/collection/components/ez-split-button/ez-split-button.js +25 -6
  17. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +4 -0
  18. package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +1 -1
  19. package/dist/collection/components/ez-tree/ez-tree.css +26 -0
  20. package/dist/collection/components/ez-tree/interfaces/ITreeItemBadge.js +1 -0
  21. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +15 -2
  22. package/dist/custom-elements/index.js +88 -59
  23. package/dist/esm/ez-alert-list.entry.js +5 -2
  24. package/dist/esm/ez-grid.entry.js +20 -15
  25. package/dist/esm/ez-modal-container.entry.js +5 -6
  26. package/dist/esm/ez-popup.entry.js +6 -6
  27. package/dist/esm/ez-scroller_3.entry.js +18 -4
  28. package/dist/esm/ez-search.entry.js +5 -15
  29. package/dist/esm/ez-split-button.entry.js +25 -6
  30. package/dist/esm/ez-split-item.entry.js +2 -2
  31. package/dist/esm/ezui.js +1 -1
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/ezui/ezui.esm.js +1 -1
  34. package/dist/ezui/p-2eb8f73b.entry.js +1 -0
  35. package/dist/ezui/p-3faa2b46.entry.js +1 -0
  36. package/dist/ezui/p-701231f0.entry.js +1 -0
  37. package/dist/ezui/p-7a636dfc.entry.js +1 -0
  38. package/dist/ezui/p-91f626d3.entry.js +1 -0
  39. package/dist/ezui/p-a1ec32ef.entry.js +1 -0
  40. package/dist/ezui/p-e228ccb9.entry.js +1 -0
  41. package/dist/ezui/{p-031784b0.entry.js → p-fb5adf9e.entry.js} +1 -1
  42. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -0
  43. package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +0 -1
  44. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +1 -1
  45. package/dist/types/components/ez-popup/ez-popup.d.ts +2 -1
  46. package/dist/types/components/ez-search/ez-search.d.ts +0 -1
  47. package/dist/types/components/ez-split-button/ez-split-button.d.ts +3 -0
  48. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +3 -1
  49. package/dist/types/components/ez-tree/interfaces/ITreeItemBadge.d.ts +6 -0
  50. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +0 -1
  51. package/package.json +1 -1
  52. package/dist/ezui/p-3376ad44.entry.js +0 -1
  53. package/dist/ezui/p-58fae29b.entry.js +0 -1
  54. package/dist/ezui/p-8c82374d.entry.js +0 -1
  55. package/dist/ezui/p-8e7031a0.entry.js +0 -1
  56. package/dist/ezui/p-9aefaa52.entry.js +0 -1
  57. package/dist/ezui/p-a08b309b.entry.js +0 -1
  58. package/dist/ezui/p-b9fbf4e7.entry.js +0 -1
@@ -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.
@@ -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;
125758
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);
125765
+ }
125766
+ return `${selectionStart}px`;
125759
125767
  }
125760
125768
  setEvents() {
125761
125769
  window.removeEventListener('scroll', this.positionSelectionCounter.bind(this));
@@ -126802,12 +126810,6 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
126802
126810
  this.cancelButtonStatus = undefined;
126803
126811
  this.okButtonStatus = undefined;
126804
126812
  }
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);
126810
- }
126811
126813
  cancelIsVisible() {
126812
126814
  return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
126813
126815
  }
@@ -126818,6 +126820,10 @@ const EzModalContainer$1 = class extends HTMLElement$1 {
126818
126820
  window.requestAnimationFrame(() => {
126819
126821
  this.ezModalAction.emit(ModalAction$1.LOAD);
126820
126822
  });
126823
+ new KeyboardManager({ propagate: false, element: this._element })
126824
+ .bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
126825
+ .bind("Escape", this.ezModalAction.emit.bind(ModalAction$1.CANCEL))
126826
+ .bind("Esc", this.ezModalAction.emit.bind(ModalAction$1.CANCEL));
126821
126827
  }
126822
126828
  focusLast() {
126823
126829
  if (this._okButton == undefined) {
@@ -127366,11 +127372,11 @@ const EzPopup$1 = class extends HTMLElement$1 {
127366
127372
  observeConfig() {
127367
127373
  this.manageOverflow();
127368
127374
  }
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");
127375
+ componentDidLoad() {
127376
+ new KeyboardManager({ propagate: false, element: this._element })
127377
+ .bind("Enter", this.ezPopupAction.emit.bind("OK"))
127378
+ .bind("Escape", () => this.opened = false)
127379
+ .bind("Esc", () => this.opened = false);
127374
127380
  }
127375
127381
  manageOverflow() {
127376
127382
  if (this.opened) {
@@ -127850,9 +127856,6 @@ const EzSearch$1 = class extends HTMLElement$1 {
127850
127856
  if (typeof value === "string" || value instanceof String) {
127851
127857
  return this._visibleOptions.find(o => o.value === value);
127852
127858
  }
127853
- if (value) {
127854
- 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) });
127855
- }
127856
127859
  return value;
127857
127860
  }
127858
127861
  updateVisibleOptions() {
@@ -127951,7 +127954,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
127951
127954
  }
127952
127955
  scrollToOption(opt) {
127953
127956
  window.requestAnimationFrame(() => {
127954
- 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;
127957
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
127955
127958
  if (liElem)
127956
127959
  liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
127957
127960
  });
@@ -127994,22 +127997,15 @@ const EzSearch$1 = class extends HTMLElement$1 {
127994
127997
  this._source = [];
127995
127998
  this.updateVisibleOptions();
127996
127999
  }
127997
- replaceHighlight(value) {
127998
- const startHighlight = new RegExp(this._startHighlightTag, 'g');
127999
- const endHighlight = new RegExp(this._endHighlightTag, 'g');
128000
- return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
128001
- }
128002
128000
  selectOption(newOption) {
128003
128001
  var _a, _b;
128004
128002
  const currentValue = this.getSelectedOption(this.value);
128005
- 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) });
128006
- 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()))
128007
- || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
128008
- const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
128003
+ 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()))
128004
+ || (currentValue == undefined && newOption != undefined && "value" in newOption)) {
128005
+ const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
128009
128006
  this.value = adjustedOpt;
128010
128007
  }
128011
128008
  else {
128012
- this.setInputValue();
128013
128009
  this.resetOptions();
128014
128010
  }
128015
128011
  this._visibleOptions = [];
@@ -128119,7 +128115,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
128119
128115
  return;
128120
128116
  }
128121
128117
  this._lookupMode = true;
128122
- this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
128118
+ this.value = value;
128123
128119
  }
128124
128120
  loadOptionValue(argument) {
128125
128121
  var _a;
@@ -128474,22 +128470,38 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128474
128470
  evt.stopPropagation();
128475
128471
  this.closeDropdown();
128476
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
+ }
128477
128488
  /**
128478
128489
  * Método responsável em posicionar o dropdown na tela.
128479
128490
  * Faz com que o dropdown se ajuste automaticamente ao espaco na tela
128480
128491
  */
128481
128492
  positionDropdown() {
128493
+ var _a, _b, _c, _d, _e, _f;
128482
128494
  const { rightButton: _rightButton, dropdownParent: _dropdownParent } = this;
128483
128495
  const rightButtonRect = _rightButton.getBoundingClientRect();
128484
128496
  const dropdownParentRect = _dropdownParent.getBoundingClientRect();
128485
- const spaceBelow = window.innerHeight - rightButtonRect.bottom;
128486
- const spaceAbove = rightButtonRect.top;
128487
- 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));
128488
128500
  const spaceLeft = rightButtonRect.left;
128489
128501
  const hasSpaceBelow = spaceBelow < dropdownParentRect.height && spaceAbove > dropdownParentRect.height;
128490
128502
  const hasSpaceRight = spaceRight < dropdownParentRect.width && spaceLeft > dropdownParentRect.width;
128491
- let top = `${rightButtonRect.bottom + window.scrollY}px`;
128492
- 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`;
128493
128505
  let bottom = 'auto';
128494
128506
  if (hasSpaceBelow) {
128495
128507
  bottom = `${window.innerHeight - rightButtonRect.top - window.scrollY}px`;
@@ -128497,7 +128509,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128497
128509
  _dropdownParent.style.maxHeight = `${spaceAbove}px`;
128498
128510
  }
128499
128511
  if (hasSpaceRight) {
128500
- 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`;
128501
128513
  }
128502
128514
  _dropdownParent.style.top = top;
128503
128515
  _dropdownParent.style.bottom = bottom;
@@ -128510,6 +128522,9 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128510
128522
  componentWillLoad() {
128511
128523
  this.setEvents();
128512
128524
  }
128525
+ componentWillRender() {
128526
+ this.resolveOffsetParentRect();
128527
+ }
128513
128528
  componentDidLoad() {
128514
128529
  if (this._element)
128515
128530
  ElementIDUtils.addIDInfo(this._element);
@@ -128542,7 +128557,7 @@ const EzSplitButton$1 = class extends HTMLElement$1 {
128542
128557
  static get style() { return ezSplitButtonCss; }
128543
128558
  };
128544
128559
 
128545
- 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)}";
128546
128561
 
128547
128562
  const SplitItem = class extends HTMLElement$1 {
128548
128563
  constructor() {
@@ -128563,7 +128578,7 @@ const SplitItem = class extends HTMLElement$1 {
128563
128578
  CSSVarsUtils.applyVarsGrid(this._element, this._slot.children[0]);
128564
128579
  }
128565
128580
  render() {
128566
- 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))));
128567
128582
  }
128568
128583
  static get style() { return ezSplitItemCss; }
128569
128584
  };
@@ -130394,7 +130409,7 @@ const TreeItem = (props) => {
130394
130409
  itemsList.push(treeItem);
130395
130410
  }
130396
130411
  return (h("ul", { class: level === 1 ? "first-level" : undefined },
130397
- 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) }, {
130398
130413
  disabled,
130399
130414
  selected: treeItem.id === selectedId,
130400
130415
  [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezTreeItem_${treeItem.id}`)
@@ -130402,11 +130417,25 @@ const TreeItem = (props) => {
130402
130417
  h("div", { class: "item-label-container" },
130403
130418
  h("div", { class: "item-icon-box" }, expandable &&
130404
130419
  h("ez-icon", { id: treeItem.id, class: "item-icon", size: "small", iconName: iconResolver(treeItem, expanded, level), onClick: () => available && iconClick(treeItem) })),
130405
- h("label", { class: "item-label" }, treeItem.label)),
130406
- 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)),
130407
130422
  expanded
130408
130423
  && node.getChildren().map(child => h(TreeItem, { selectedId: selectedId, node: child, itemClick: itemClick, iconClick: iconClick, level: level + 1, iconResolver: iconResolver, tooltipResolver: tooltipResolver, itemsList: itemsList }))));
130409
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
+ }
130410
130439
 
130411
130440
  class Node$1 {
130412
130441
  constructor(tree, item, parent, isPlaceHolder = false) {
@@ -130650,7 +130679,7 @@ class Tree extends Node$1 {
130650
130679
  }
130651
130680
  }
130652
130681
 
130653
- 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)}";
130654
130683
 
130655
130684
  const EzTree$1 = class extends HTMLElement$1 {
130656
130685
  constructor() {
@@ -131588,7 +131617,7 @@ const MultiSelectionBoxMessage$1 = class extends HTMLElement$1 {
131588
131617
 
131589
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]}]);
131590
131619
  const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
131591
- 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]}]);
131592
131621
  const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
131593
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]}]);
131594
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]}]);
@@ -131613,11 +131642,11 @@ const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[5
131613
131642
  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]}]);
131614
131643
  const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
131615
131644
  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]}]);
131616
- 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"]]]);
131645
+ 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"]}]);
131617
131646
  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]}]);
131618
131647
  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]}]);
131619
131648
  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"]}]);
131620
- 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"]]]);
131649
+ 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"]}]);
131621
131650
  const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
131622
131651
  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"]]]);
131623
131652
  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"]]]);
@@ -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));
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host } from './index-baa5e267.js';
2
+ import { KeyboardManager } from '@sankhyalabs/core';
2
3
 
3
4
  var ModalAction;
4
5
  (function (ModalAction) {
@@ -31,12 +32,6 @@ const EzModalContainer = class {
31
32
  this.cancelButtonStatus = undefined;
32
33
  this.okButtonStatus = undefined;
33
34
  }
34
- handleKeyDown(event) {
35
- if (event.key === 'Escape' || event.key === 'Esc')
36
- this.ezModalAction.emit(ModalAction$1.CANCEL);
37
- if (event.key === 'Enter')
38
- this.ezModalAction.emit(ModalAction$1.OK);
39
- }
40
35
  cancelIsVisible() {
41
36
  return (this.cancelButtonStatus !== ModalButtonStatus$1.HIDDEN && this.cancelButtonLabel != undefined);
42
37
  }
@@ -47,6 +42,10 @@ const EzModalContainer = class {
47
42
  window.requestAnimationFrame(() => {
48
43
  this.ezModalAction.emit(ModalAction$1.LOAD);
49
44
  });
45
+ new KeyboardManager({ propagate: false, element: this._element })
46
+ .bind("Enter", this.ezModalAction.emit.bind(ModalAction$1.OK))
47
+ .bind("Escape", this.ezModalAction.emit.bind(ModalAction$1.CANCEL))
48
+ .bind("Esc", this.ezModalAction.emit.bind(ModalAction$1.CANCEL));
50
49
  }
51
50
  focusLast() {
52
51
  if (this._okButton == undefined) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host } from './index-baa5e267.js';
2
- import { FloatingManager } from '@sankhyalabs/core';
2
+ import { KeyboardManager, FloatingManager } from '@sankhyalabs/core';
3
3
 
4
4
  const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
5
5
 
@@ -25,11 +25,11 @@ const EzPopup = class {
25
25
  observeConfig() {
26
26
  this.manageOverflow();
27
27
  }
28
- handleKeyDown(event) {
29
- if (event.key === 'Escape' || event.key === 'Esc')
30
- this.opened = false;
31
- if (event.key === 'Enter')
32
- this.ezPopupAction.emit("OK");
28
+ componentDidLoad() {
29
+ new KeyboardManager({ propagate: false, element: this._element })
30
+ .bind("Enter", this.ezPopupAction.emit.bind("OK"))
31
+ .bind("Escape", () => this.opened = false)
32
+ .bind("Esc", () => this.opened = false);
33
33
  }
34
34
  manageOverflow() {
35
35
  if (this.opened) {
@@ -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) {
@@ -214,9 +214,6 @@ const EzSearch = class {
214
214
  if (typeof value === "string" || value instanceof String) {
215
215
  return this._visibleOptions.find(o => o.value === value);
216
216
  }
217
- if (value) {
218
- 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) });
219
- }
220
217
  return value;
221
218
  }
222
219
  updateVisibleOptions() {
@@ -315,7 +312,7 @@ const EzSearch = class {
315
312
  }
316
313
  scrollToOption(opt) {
317
314
  window.requestAnimationFrame(() => {
318
- 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;
315
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`div#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
319
316
  if (liElem)
320
317
  liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
321
318
  });
@@ -358,22 +355,15 @@ const EzSearch = class {
358
355
  this._source = [];
359
356
  this.updateVisibleOptions();
360
357
  }
361
- replaceHighlight(value) {
362
- const startHighlight = new RegExp(this._startHighlightTag, 'g');
363
- const endHighlight = new RegExp(this._endHighlightTag, 'g');
364
- return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
365
- }
366
358
  selectOption(newOption) {
367
359
  var _a, _b;
368
360
  const currentValue = this.getSelectedOption(this.value);
369
- 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) });
370
- 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()))
371
- || (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
372
- const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
361
+ 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()))
362
+ || (currentValue == undefined && newOption != undefined && "value" in newOption)) {
363
+ const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
373
364
  this.value = adjustedOpt;
374
365
  }
375
366
  else {
376
- this.setInputValue();
377
367
  this.resetOptions();
378
368
  }
379
369
  this._visibleOptions = [];
@@ -483,7 +473,7 @@ const EzSearch = class {
483
473
  return;
484
474
  }
485
475
  this._lookupMode = true;
486
- this.value = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
476
+ this.value = value;
487
477
  }
488
478
  loadOptionValue(argument) {
489
479
  var _a;