@sankhyalabs/ezui 5.22.0-dev.103 → 5.22.0-dev.105

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.
@@ -1274,7 +1274,7 @@ const computePosition = (reference, floating, options) => {
1274
1274
  });
1275
1275
  };
1276
1276
 
1277
- const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--20, 20);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--16, 16)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
1277
+ const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--24, 24)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
1278
1278
 
1279
1279
  const EzPopoverCore = class {
1280
1280
  constructor(hostRef) {
@@ -308,7 +308,7 @@ const EzSearch = class {
308
308
  }
309
309
  }
310
310
  cancelPreselection() {
311
- if (!this._textInput.value && this._currentValue) {
311
+ if (!this._textInput.value && this._currentValue && this._source.length > 0) {
312
312
  this.selectOption(undefined);
313
313
  }
314
314
  else {
@@ -8,7 +8,7 @@
8
8
  /*@doc Define a cor de fundo do popover.*/
9
9
  --ez-popover__box--background-color: var(--background--xlight, #fff);
10
10
  /*@doc Define a camada de visibilidade do popover.*/
11
- --ez-popover__box--z-index: var(--elevation--20, 20);
11
+ --ez-popover__box--z-index: var(--elevation--100, 100);
12
12
 
13
13
  /***************
14
14
  host style
@@ -28,7 +28,7 @@
28
28
  width: 100%;
29
29
  height: 100vh;
30
30
  box-sizing: border-box;
31
- z-index: var(--elevation--16, 16);
31
+ z-index: var(--elevation--24, 24);
32
32
  }
33
33
 
34
34
  .popover__overlay--light {
@@ -296,7 +296,7 @@ export class EzSearch {
296
296
  }
297
297
  }
298
298
  cancelPreselection() {
299
- if (!this._textInput.value && this._currentValue) {
299
+ if (!this._textInput.value && this._currentValue && this._source.length > 0) {
300
300
  this.selectOption(undefined);
301
301
  }
302
302
  else {
@@ -75470,7 +75470,7 @@ const computePosition = (reference, floating, options) => {
75470
75470
  });
75471
75471
  };
75472
75472
 
75473
- const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--20, 20);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--16, 16)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
75473
+ const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--24, 24)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
75474
75474
 
75475
75475
  const EzPopoverCore$1 = class extends HTMLElement$1 {
75476
75476
  constructor() {
@@ -76439,7 +76439,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
76439
76439
  }
76440
76440
  }
76441
76441
  cancelPreselection() {
76442
- if (!this._textInput.value && this._currentValue) {
76442
+ if (!this._textInput.value && this._currentValue && this._source.length > 0) {
76443
76443
  this.selectOption(undefined);
76444
76444
  }
76445
76445
  else {
@@ -1270,7 +1270,7 @@ const computePosition = (reference, floating, options) => {
1270
1270
  });
1271
1271
  };
1272
1272
 
1273
- const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--20, 20);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--16, 16)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
1273
+ const ezPopoverCoreCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--24, 24)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";
1274
1274
 
1275
1275
  const EzPopoverCore = class {
1276
1276
  constructor(hostRef) {
@@ -304,7 +304,7 @@ const EzSearch = class {
304
304
  }
305
305
  }
306
306
  cancelPreselection() {
307
- if (!this._textInput.value && this._currentValue) {
307
+ if (!this._textInput.value && this._currentValue && this._source.length > 0) {
308
308
  this.selectOption(undefined);
309
309
  }
310
310
  else {
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-23a36bb6.js";export{s as setNonce}from"./p-23a36bb6.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t(JSON.parse('[["p-cb5cd243",[[6,"ez-grid",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[4],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"refreshSelectedRows":[64],"getCustomValueFormatter":[64],"setFocus":[64],"stopEdit":[64],"checkStopEditOutsideClick":[64]},[[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]]],["p-09de35a2",[[1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]]],["p-e6a9041d",[[1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32],"changeModeMenu":[64],"closeSidebar":[64],"openSidebar":[64]}]]],["p-1e7a8633",[[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]}]]],["p-a4cee65d",[[1,"ez-split-button",{"enabled":[516],"iconName":[513,"icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"show":[32],"setBlur":[64],"setLeftButtonFocus":[64],"setRightButtonFocus":[64]},[[2,"click","clickListener"]]]]],["p-556468d9",[[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],"hideActions":[64],"showActions":[64],"isOpened":[64]}]]],["p-ea54d056",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040],"show":[64]}]]],["p-1f50fa05",[[1,"ez-alert",{"alertType":[513,"alert-type"]}]]],["p-e75c7a23",[[1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"alignItems":[1537,"align-items"],"hasSlot":[32]}]]],["p-e06a9886",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"],"setFocus":[64],"setBlur":[64]}]]],["p-bc2f844e",[[0,"ez-application"]]],["p-5b205c80",[[1,"ez-chart",{"type":[1],"xAxis":[16],"yAxis":[16],"chartTitle":[1,"chart-title"],"chartSubTitle":[1,"chart-sub-title"],"legendEnabled":[4,"legend-enabled"],"series":[16],"width":[2],"height":[2]}]]],["p-cb1535f7",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]]],["p-17eabf46",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"]}]]],["p-8df1ca33",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["p-c0d9c4f8",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"goToTab":[64]}]]],["p-a80b1287",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64]}]]],["p-fd0a19d6",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"cleanValueMask":[4,"clean-value-mask"],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"],"hasRightSlotContent":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-7e677b7b",[[2,"ez-double-list",{"leftList":[1040],"leftTitle":[1,"left-title"],"rightList":[1040],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"leftListLabel":[1,"left-list-label"],"rightListLabel":[1,"right-list-label"],"rightTitle":[1,"right-title"],"leftFilteredList":[32],"rightFilteredList":[32],"selectedLeftList":[32],"selectedRightList":[32],"isFilteringLeft":[32],"isFilteringRight":[32],"resetSelectedLists":[64]}]]],["p-6e429cff",[[1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32],"disableItem":[64],"openGuideNavidator":[64],"enableItem":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"selectGuide":[64],"getParent":[64]}]]],["p-1ad6c61b",[[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"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]]],["p-788467fe",[[4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"structural":[4],"_expanded":[32]}]]],["p-555c9018",[[1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]]],["p-5ed81457",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["p-9f5fa3f9",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["p-fa6732f2",[[0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"],"structural":[4],"rebuildLayout":[64]}]]],["p-44caad9a",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["p-0fa52b0f",[[0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32],"hide":[64],"show":[64]}]]],["p-da1b4a38",[[1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32],"selectItem":[64],"openItem":[64],"disableItem":[64],"enableItem":[64],"addChild":[64],"applyFilter":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"getParent":[64]},[[2,"keydown","onKeyDownListener"]]]]],["p-dc73e1fe",[[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],"clearFilteredOptions":[64]}]]],["p-f5931caa",[[1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"isOpen":[32],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"_textInputReady":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-e347df9c",[[1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["p-17de16e5",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"autoFocus":[4,"auto-focus"],"_value":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-0306dff7",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"fitHorizontal":[64],"hide":[64]},[[11,"scroll","scrollListener"]]]]],["p-6cdd3e0a",[[1,"ez-tooltip",{"errorMessage":[1,"error-message"],"anchoringElement":[16],"positionTooltip":[64]}]]],["p-23b6128c",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-dcf3c8e5",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-c1527804",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-31b71e50",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"],"autoFocus":[4,"auto-focus"],"appendTextToSelection":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-77a4bd35",[[1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["p-b7706b43",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"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"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-20c024f7",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"setValue":[64],"endSearch":[64]}]]],["p-7fdd479f",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4],"getMode":[64],"setFocus":[64]}]]],["p-3195a7a7",[[2,"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"],"enableMultipleSelection":[4,"enable-multiple-selection"],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64],"removeSelection":[64]}]]],["p-56fe5341",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["p-2872fd16",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]},[[2,"click","clickListener"]]]]],["p-c297aa52",[[2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}],[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}],[1,"ez-combo-box-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"maxWidth":[2,"max-width"],"width":[2],"onOptionSelect":[16],"onOptionHover":[16],"nextOption":[64],"previousOption":[64],"selectCurrentOption":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-9a067490",[[1,"ez-card-item",{"item":[16],"enableKey":[4,"enable-key"],"compacted":[4]}],[1,"ez-popover-core",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-f5a30e35",[[0,"multi-selection-box-message",{"message":[1]}],[1,"search-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"canShowListOptions":[4,"can-show-list-options"],"value":[1],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"nextOption":[64],"previousOption":[64]}],[1,"ez-popover-plus",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-20cb13fa",[[2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"_customEditors":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-cf87aacb",[[2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32],"validate":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-2f45506d",[[1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]],[0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]]],["p-288631d1",[[1,"ez-sidebar-button"],[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"]]]]]]'),e)));
1
+ import{p as e,b as t}from"./p-23a36bb6.js";export{s as setNonce}from"./p-23a36bb6.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((e=>t(JSON.parse('[["p-cb5cd243",[[6,"ez-grid",{"enableLockManagerLoadingComp":[4,"enable-lock-manager-loading-comp"],"enableLockManagerTaskbarClick":[4,"enable-lock-manager-taskbar-click"],"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"suppressCheckboxColumn":[4,"suppress-checkbox-column"],"outlineMode":[4,"outline-mode"],"enableRowTableStriped":[4,"enable-row-table-striped"],"compact":[4],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"quickFilter":[64],"locateColumn":[64],"filterColumns":[64],"addCustomEditor":[64],"addGridCustomRender":[64],"addCustomValueFormatter":[64],"removeCustomValueFormatter":[64],"refreshSelectedRows":[64],"getCustomValueFormatter":[64],"setFocus":[64],"stopEdit":[64],"checkStopEditOutsideClick":[64]},[[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]]],["p-09de35a2",[[1,"ez-alert-list",{"alerts":[1040],"enableDragAndDrop":[516,"enable-drag-and-drop"],"enableExpand":[516,"enable-expand"],"itemRightSlotBuilder":[16],"opened":[1540],"expanded":[1540],"_container":[32]}]]],["p-e6a9041d",[[1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32],"changeModeMenu":[64],"closeSidebar":[64],"openSidebar":[64]}]]],["p-1e7a8633",[[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]}]]],["p-a4cee65d",[[1,"ez-split-button",{"enabled":[516],"iconName":[513,"icon-name"],"image":[513],"items":[16],"label":[513],"leftTitle":[513,"left-title"],"rightTitle":[513,"right-title"],"mode":[513],"size":[513],"show":[32],"setBlur":[64],"setLeftButtonFocus":[64],"setRightButtonFocus":[64]},[[2,"click","clickListener"]]]]],["p-556468d9",[[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],"hideActions":[64],"showActions":[64],"isOpened":[64]}]]],["p-ea54d056",[[1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040],"show":[64]}]]],["p-1f50fa05",[[1,"ez-alert",{"alertType":[513,"alert-type"]}]]],["p-e75c7a23",[[1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"alignItems":[1537,"align-items"],"hasSlot":[32]}]]],["p-e06a9886",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"],"setFocus":[64],"setBlur":[64]}]]],["p-bc2f844e",[[0,"ez-application"]]],["p-5b205c80",[[1,"ez-chart",{"type":[1],"xAxis":[16],"yAxis":[16],"chartTitle":[1,"chart-title"],"chartSubTitle":[1,"chart-sub-title"],"legendEnabled":[4,"legend-enabled"],"series":[16],"width":[2],"height":[2]}]]],["p-cb1535f7",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]]],["p-17eabf46",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"]}]]],["p-8df1ca33",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["p-c0d9c4f8",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32],"goToTab":[64]}]]],["p-a80b1287",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64]}]]],["p-fd0a19d6",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"cleanValueMask":[4,"clean-value-mask"],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"],"hasRightSlotContent":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-7e677b7b",[[2,"ez-double-list",{"leftList":[1040],"leftTitle":[1,"left-title"],"rightList":[1040],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"leftListLabel":[1,"left-list-label"],"rightListLabel":[1,"right-list-label"],"rightTitle":[1,"right-title"],"leftFilteredList":[32],"rightFilteredList":[32],"selectedLeftList":[32],"selectedRightList":[32],"isFilteringLeft":[32],"isFilteringRight":[32],"resetSelectedLists":[64]}]]],["p-6e429cff",[[1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32],"disableItem":[64],"openGuideNavidator":[64],"enableItem":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"selectGuide":[64],"getParent":[64]}]]],["p-1ad6c61b",[[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"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]]],["p-788467fe",[[4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"structural":[4],"_expanded":[32]}]]],["p-555c9018",[[1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]]],["p-5ed81457",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["p-9f5fa3f9",[[1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]]],["p-fa6732f2",[[0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"],"structural":[4],"rebuildLayout":[64]}]]],["p-44caad9a",[[0,"ez-view-stack",{"show":[64],"getSelectedIndex":[64]}]]],["p-0fa52b0f",[[0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32],"hide":[64],"show":[64]}]]],["p-da1b4a38",[[1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32],"selectItem":[64],"openItem":[64],"disableItem":[64],"enableItem":[64],"addChild":[64],"applyFilter":[64],"updateItem":[64],"getItem":[64],"getCurrentPath":[64],"getParent":[64]},[[2,"keydown","onKeyDownListener"]]]]],["p-dc73e1fe",[[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],"clearFilteredOptions":[64]}]]],["p-f5931caa",[[1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"isOpen":[32],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32],"_textInputReady":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-e347df9c",[[1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32],"showHide":[64],"applyFocusTextEdit":[64],"cancelEdition":[64]}]]],["p-17de16e5",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"autoFocus":[4,"auto-focus"],"_value":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-0306dff7",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"fitHorizontal":[64],"hide":[64]},[[11,"scroll","scrollListener"]]]]],["p-6cdd3e0a",[[1,"ez-tooltip",{"errorMessage":[1,"error-message"],"anchoringElement":[16],"positionTooltip":[64]}]]],["p-23b6128c",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-dcf3c8e5",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"getValueAsync":[64]}]]],["p-c1527804",[[1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-31b71e50",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"],"autoFocus":[4,"auto-focus"],"appendTextToSelection":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}]]],["p-77a4bd35",[[1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["p-af1a478e",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"contextProperties":[8,"context-properties"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"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"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32],"getValueAsync":[64],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"clearValue":[64]}]]],["p-20c024f7",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"setFocus":[64],"setBlur":[64],"isInvalid":[64],"setValue":[64],"endSearch":[64]}]]],["p-7fdd479f",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4],"getMode":[64],"setFocus":[64]}]]],["p-3195a7a7",[[2,"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"],"enableMultipleSelection":[4,"enable-multiple-selection"],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64],"removeSelection":[64]}]]],["p-56fe5341",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["p-2872fd16",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]},[[2,"click","clickListener"]]]]],["p-c297aa52",[[2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32],"setFocus":[64],"setBlur":[64],"isInvalid":[64]}],[1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32],"applyFocusSelect":[64]}],[1,"ez-combo-box-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"maxWidth":[2,"max-width"],"width":[2],"onOptionSelect":[16],"onOptionHover":[16],"nextOption":[64],"previousOption":[64],"selectCurrentOption":[64]},[[0,"keydown","handleKeyDown"]]]]],["p-bbdc3996",[[1,"ez-card-item",{"item":[16],"enableKey":[4,"enable-key"],"compacted":[4]}],[1,"ez-popover-core",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-f5a30e35",[[0,"multi-selection-box-message",{"message":[1]}],[1,"search-list",{"showLoading":[4,"show-loading"],"visibleOptions":[16],"textEmptyList":[1,"text-empty-list"],"canShowListOptions":[4,"can-show-list-options"],"value":[1],"showOptionValue":[4,"show-option-value"],"preSelection":[2,"pre-selection"],"nextOption":[64],"previousOption":[64]}],[1,"ez-popover-plus",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"overlayType":[513,"overlay-type"],"anchorElement":[1537,"anchor-element"],"options":[1040],"useAnchorSize":[516,"use-anchor-size"],"minWidth":[514,"min-width"],"updatePosition":[64],"show":[64],"showUnder":[64],"hide":[64],"setOptions":[64],"setAnchorElement":[64]}]]],["p-20cb13fa",[[2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"_customEditors":[32],"showUp":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-cf87aacb",[[2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32],"validate":[64],"addCustomEditor":[64],"setFieldProp":[64]}]]],["p-2f45506d",[[1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]],[0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]]],["p-288631d1",[[1,"ez-sidebar-button"],[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"]]]]]]'),e)));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s,H as e,g as h}from"./p-23a36bb6.js";import{C as o}from"./p-ec7db713.js";import{ObjectUtils as r,StringUtils as n,ElementIDUtils as a}from"@sankhyalabs/core";import{A as l}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-4607fb89.js";import{R as c}from"./p-05e1f4e7.js";import{r as d,a as u}from"./p-40a60148.js";const v=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._showLoadingDescription=!1,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.contextProperties=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!1,this.mode="regular",this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.options=void 0,this.suppressSearch=!1,this.ensureClearButtonVisible=!1,this.suppressPreLoad=!0,this.autoFocus=!1}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,!(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())&&this.errorMessage&&this.setInputValue())}getValue(t){return"object"==typeof t?null==t?void 0:t.value:t}validateNewValue(t,i){const s=this.getValue(t),e=this.getValue(i);return!("[object Object]"===s||s===e)}async observeValue(t,i){if(this._textInput&&this.validateNewValue(t,i)){if("string"==typeof t)return void await this.handleValueAsString(t);const i=this.getSelectedOption(t),s=this.getSelectedOption(this._currentValue);this.isDifferentValues(s,i)&&(this._currentValue=i,this.setInputValue(),this.ezChange.emit(null!=i?i:void 0)),this.resetOptions()}}observeOptions(t,i){!t.length&&this.suppressPreLoad||(null==t?void 0:t.join(""))!==(null==i?void 0:i.join(""))&&this.loadOptions(p.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.value))}),100)}:t=>t(this.value))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}async handleValueAsString(t){this.getSelectedOption(t)?this.setInputValue():(await this.loadDescriptionValue(t),this._currentValue&&(this.setInputValue(),this.ezChange.emit(this.value),this._currentValue=this.value))}isDifferentValues(t,i){return r.objectToString(t||{})!==r.objectToString(i||{})}getFormattedText(t){if(null==t)return;let i=this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label;return i=null==i?void 0:i.replace(new RegExp(this._startHighlightTag,"g"),"").replace(new RegExp(this._endHighlightTag,"g"),""),i}getText(){const t=this.getSelectedOption(this._currentValue),i=this.getFormattedText(t);return d(i)}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t?Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}):t}updateVisibleOptions(){let t=this._source||[];this._visibleOptions=this.suppressEmptyOption?t:[{value:void 0,label:""}].concat(t),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var t;const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}showOptions(){this.enabled&&(this.isOptionsVisible()||this._ezPopOverPlusElement.showUnder(this._textInput))}hideOptions(){this._ezPopOverPlusElement.hide()}isOptionsVisible(){return this._ezPopOverPlusElement.opened}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,this._showLoadingDescription=!0,t.then((t=>{this.updateSource(t)})).finally((()=>{this._showLoading=!1,this._showLoadingDescription=!1})),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch(!1))):this.selectOption(t))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(t,i=!0){var s,e;const h=this.getSelectedOption(this.value),o=Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}),r=Object.assign(Object.assign({},o),{value:d(null==o?void 0:o.value),label:d(null==o?void 0:o.label)});if((null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.toString())||null==h&&null!=r&&"value"in r){const t=(null==r?void 0:r.value)?r:void 0;this.value=t,this._currentValue=t}else this.setInputValue(),this.resetOptions();this._visibleOptions=[],this.clearSource(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i},this.contextProperties):this.options)}cancelPreselection(){!this._textInput.value&&this._currentValue&&this._source.length>0?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null,this._currentValue=null}controlListWithOnlyOne(t=!0){var i,s;const e=null===(i=this._visibleOptions)||void 0===i?void 0:i.filter((t=>""!==t.label&&null!=t.value));if((null==e?void 0:e.length)>0){const i=new RegExp(this._startHighlightTag,"g"),h=new RegExp(this._endHighlightTag,"g");let o=n.decodeHtmlEntities(e[0].label);const r={value:null===(s=e[0].value)||void 0===s?void 0:s.replace(i,"").replace(h,""),label:null==o?void 0:o.replace(i,"").replace(h,"")};this.selectOption(r,t)}}controlEmptySearch(t=!0){var i;(null===(i=this._visibleOptions)||void 0===i?void 0:i.length)?this.controlListWithOnlyOne(t):(this.clearSearch(),l.info(this._textEmptyList))}async loadDescriptionValue(t){var i,s;if(null==t)return;if((null===(i=this.options)||void 0===i?void 0:i.length)>0)return void this.loadOptionValue(t);const e={mode:p.PREDICTIVE,argument:t},h=await(null===(s=this.optionLoader)||void 0===s?void 0:s.call(this,e,this.contextProperties));null!=h&&(h instanceof Promise?h.then((t=>{this.setDescriptionValue(t)})):this.setDescriptionValue(h))}setDescriptionValue(t){const i=(null==t?void 0:t[0])||t;null!=i&&Object.keys(i).length?(this._currentValue=i?Object.assign(Object.assign({},i),{value:u(i.value),label:u(i.label)}):i,this.value=this._currentValue,this.setTextInputValue()):this.showNoResultMessage()}setTextInputValue(){if(this._textInput&&null==this._textInput.value){if(null==this.value)return;const t="string"==typeof this.value?this.value:this.getFormattedText(this.value);this._textInput.value=d(t)}}loadOptionValue(t){var i;const s=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===t));null!=s?this.selectOption(s):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),l.info(this._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var t;return null===(t=this.label)||void 0===t?void 0:t.replace(c,"").toUpperCase()}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async handleInitialValue(){if(!this.getValue(this.value))return;if("string"==typeof this.value)return void await this.handleValueAsString(this.value);let t=this.getFormattedText(this.value);t=d(t),this._textInput.value=t}componentWillLoad(){if(void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value"),e=t.getAttribute("details");s||(s=i),this.options.push({label:i,value:s,details:e}),t.hidden=!0}))}this.updateSource([])}componentDidRender(){var t;null===(t=this._optionsList)||void 0===t||t.querySelectorAll(".item").forEach((t=>{a.addIDInfoIfNotExists(t,"itemSearch")}))}async componentDidLoad(){this._currentValue=this.value,o.applyVarsTextInput(this.el,this._textInput),this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)}))})),await this.handleInitialValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect()}handlerIconClick(){this.loadOptions(p.ADVANCED)}buildNumberArgument(t){return this.isTextSearch?NaN:Number(t||void 0)}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim(),e=this.buildNumberArgument(s);this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this._showLoading=!1,this.clearSource(),this.ignoreLimitCharsToSearch||!isNaN(e)||s.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(p.PREDICTIVE,isNaN(e)?s:e.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.hideOptions(),this._showLoading=!1,this.clearSource())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}async keyDownHandler(t){switch(this._tabPressed=!1,t.ctrlKey&&("f"!==t.key&&"F"!==t.key||(this.loadOptions(p.ADVANCED),t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault())),t.key){case"ArrowDown":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),this.isOptionsVisible()||this.showOptions(),await this._searchList.nextOption();break;case"ArrowUp":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),await this._searchList.previousOption();break;case"Enter":this.handleEventPropagation(t),this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne(!1)}}handleEventPropagation(t){this._ezPopOverPlusElement.opened&&this.stopPropagateEnterKeyEvent&&t.stopPropagation()}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}canShowLoadSpinDescription(){return this._showLoadingDescription&&!this._ezPopOverPlusElement.opened}onChangePreSelection(t){this._preSelection=t}render(){var t;return a.addIDInfoIfNotExists(this.el,"input"),s(e,null,s("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},s("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},this.canShowLoadSpinDescription()?s("div",{class:"message__loading"}):s("ez-icon",{iconName:"search"})),(null===(t=this._textInput)||void 0===t?void 0:t.value)&&(this._criteria||this.value)||this.ensureClearButtonVisible?s("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},s("ez-icon",{iconName:"close"})):void 0),s("ez-popover-plus",{ref:t=>this._ezPopOverPlusElement=t,autoClose:!1,overlayType:"none",useAnchorSize:!0,anchorElement:[this._textInput,this.el]},s("search-list",{ref:t=>this._searchList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this._textEmptyList,canShowListOptions:this.canShowListOptions(),value:this.value,showOptionValue:this.showOptionValue,preSelection:this._preSelection,onChangeValue:({detail:t})=>this.selectOption(t),onChangePreSelection:({detail:t})=>this.onChangePreSelection(t)})))}get el(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var p;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(p||(p={})),v.style=":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}";export{v as ez_search}
@@ -1 +1 @@
1
- import{r as t,c as e,h as n,H as i,g as o}from"./p-23a36bb6.js";import{StringUtils as r,ElementIDUtils as a}from"@sankhyalabs/core";const c=class{constructor(n){t(this,n),this.ezClick=e(this,"ezClick",7),this.item=void 0,this.enableKey=!0,this.compacted=!1}componentWillRender(){this.createDetailList()}componentDidLoad(){var t,e;const n={id:r.toCamelCase((null===(t=this.item)||void 0===t?void 0:t.key)||(null===(e=this.item)||void 0===e?void 0:e.title)||"")};a.addIDInfo(this._element,null,n)}createDetailList(){var t,e,n;this._details={detailsLeft:[],detailsRight:[]};let i=0;if(null===(t=this.item)||void 0===t?void 0:t.details)for(const t in this.item.details)i<3?this._details.detailsLeft.push({label:t,value:null===(e=this.item.details[t])||void 0===e?void 0:e.toString()}):this._details.detailsRight.push({label:t,value:null===(n=this.item.details[t])||void 0===n?void 0:n.toString()}),i++}buildDetailContentTitle(t){var e,n;if(null!=(null==t?void 0:t.label)||null!=(null==t?void 0:t.value))return`${null===(e=r.replaceAccentuatedCharsHtmlEntities(null==t?void 0:t.label))||void 0===e?void 0:e.replace(/<[^>]*>/g,"")}: ${null===(n=r.replaceAccentuatedCharsHtmlEntities(null==t?void 0:t.value))||void 0===n?void 0:n.replace(/<[^>]*>/g,"")}`}buildDetailContent(t){return n("div",{class:"card-item__detail "+(this.compacted?"":"card-item__detail-default"),title:this.buildDetailContentTitle(t)},n("label",{class:"card-item__detail-label "+(this.compacted?"card-item__detail-label-compacted":"")},`${t.label}: `)," ",n("label",{class:"card-item__detail-value "+(this.compacted?"card-item__detail-value-compacted":""),innerHTML:t.value}))}render(){return n(i,null,this.item&&n("div",{class:`card-item ${this.compacted?"card-item__compacted":"card-item__expanded"} `,onClick:()=>{this.ezClick.emit(this.item)}},n("div",{class:"ez-row card-item__content"},n("div",{class:"ez-col ez-col--sd-11 card-item__details"},n("label",{class:"card-item__title "+(this.compacted?"card-item__title-compacted":"")},this.enableKey&&n("span",{class:"card-item__key",innerHTML:this.item.key}),n("span",{innerHTML:this.item.title})),n("div",{class:this.compacted?"card-item__details-container_compacted":"card-item__details-container_default"},n("div",{class:"card-item__details-container__left "+(this.compacted?"card-item__details-container__left-compacted":"")},this._details.detailsLeft.map((t=>this.buildDetailContent(t)))),n("div",{class:"card-item__details-container__right "+(this.compacted?"card-item__details-container__right-compacted":"")},this._details.detailsRight.map((t=>this.buildDetailContent(t)))))),n("div",{class:"ez-col ez-col--sd-1 card-item__details-slot"},n("slot",{name:"rightSlot"})))))}get _element(){return o(this)}};c.style=":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--2xs) var(--space--small);\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";const l=Math.min,s=Math.max,d=Math.round,f=t=>({x:t,y:t}),h={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function p(t,e,n){return s(t,l(e,n))}function m(t,e){return"function"==typeof t?t(e):t}function _(t){return t.split("-")[0]}function v(t){return t.split("-")[1]}function x(t){return"x"===t?"y":"x"}function g(t){return"y"===t?"height":"width"}function b(t){return["top","bottom"].includes(_(t))?"y":"x"}function y(t){return x(b(t))}function w(t){return t.replace(/start|end/g,(t=>u[t]))}function z(t){return t.replace(/left|right|bottom|top/g,(t=>h[t]))}function k(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function D(t,e,n){let{reference:i,floating:o}=t;const r=b(e),a=y(e),c=g(a),l=_(e),s="y"===r,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;let u;switch(l){case"top":u={x:d,y:i.y-o.height};break;case"bottom":u={x:d,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:f};break;case"left":u={x:i.x-o.width,y:f};break;default:u={x:i.x,y:i.y}}switch(v(e)){case"start":u[a]-=h*(n&&s?-1:1);break;case"end":u[a]+=h*(n&&s?-1:1)}return u}async function P(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:a,elements:c,strategy:l}=t,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:u=0}=m(e,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),_=c[h?"floating"===f?"reference":"floating":f],v=k(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(_)))||n?_:_.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(c.floating)),boundary:s,rootBoundary:d,strategy:l})),x="floating"===f?{x:i,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c.floating)),b=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},y=k(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:g,strategy:l}):x);return{top:(v.top-y.top+p.top)/b.y,bottom:(y.bottom-v.bottom+p.bottom)/b.y,left:(v.left-y.left+p.left)/b.x,right:(y.right-v.right+p.right)/b.x}}function A(){return"undefined"!=typeof window}function L(t){return S(t)?(t.nodeName||"").toLowerCase():"#document"}function O(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function R(t){var e;return null==(e=(S(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function S(t){return!!A()&&(t instanceof Node||t instanceof O(t).Node)}function C(t){return!!A()&&(t instanceof Element||t instanceof O(t).Element)}function T(t){return!!A()&&(t instanceof HTMLElement||t instanceof O(t).HTMLElement)}function F(t){return!(!A()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof O(t).ShadowRoot)}function E(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function $(t){return["table","td","th"].includes(L(t))}function M(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function j(t){const e=B(),n=C(t)?G(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function B(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function H(t){return["html","body","#document"].includes(L(t))}function G(t){return O(t).getComputedStyle(t)}function N(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function V(t){if("html"===L(t))return t;const e=t.assignedSlot||t.parentNode||F(t)&&t.host||R(t);return F(e)?e.host:e}function W(t){const e=V(t);return H(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&E(e)?e:W(e)}function U(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=W(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),a=O(o);if(r){const t=X(a);return e.concat(a,a.visualViewport||[],E(o)?o:[],t&&n?U(t):[])}return e.concat(o,U(o,[],n))}function X(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Y(t){const e=G(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=T(t),r=o?t.offsetWidth:n,a=o?t.offsetHeight:i,c=d(n)!==r||d(i)!==a;return c&&(n=r,i=a),{width:n,height:i,$:c}}function q(t){return C(t)?t:t.contextElement}function I(t){const e=q(t);if(!T(e))return f(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=Y(e);let a=(r?d(n.width):n.width)/i,c=(r?d(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}const J=f(0);function K(t){const e=O(t);return B()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:J}function Q(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=q(t);let a=f(1);e&&(i?C(i)&&(a=I(i)):a=I(t));const c=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==O(t))&&e}(r,n,i)?K(r):f(0);let l=(o.left+c.x)/a.x,s=(o.top+c.y)/a.y,d=o.width/a.x,h=o.height/a.y;if(r){const t=O(r),e=i&&C(i)?O(i):i;let n=t,o=X(n);for(;o&&i&&e!==n;){const t=I(o),e=o.getBoundingClientRect(),i=G(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,a=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,s*=t.y,d*=t.x,h*=t.y,l+=r,s+=a,n=O(o),o=X(n)}}return k({width:d,height:h,x:l,y:s})}function Z(t,e){const n=N(t).scrollLeft;return e?e.left+n:Q(R(t)).left+n}function tt(t,e,n){void 0===n&&(n=!1);const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-(n?0:Z(t,i)),y:i.top+e.scrollTop}}function et(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=O(t),i=R(t),o=n.visualViewport;let r=i.clientWidth,a=i.clientHeight,c=0,l=0;if(o){r=o.width,a=o.height;const t=B();(!t||t&&"fixed"===e)&&(c=o.offsetLeft,l=o.offsetTop)}return{width:r,height:a,x:c,y:l}}(t,n);else if("document"===e)i=function(t){const e=R(t),n=N(t),i=t.ownerDocument.body,o=s(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=s(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+Z(t);const c=-n.scrollTop;return"rtl"===G(i).direction&&(a+=s(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:a,y:c}}(R(t));else if(C(e))i=function(t,e){const n=Q(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=T(t)?I(t):f(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=K(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return k(i)}function nt(t,e){const n=V(t);return!(n===e||!C(n)||H(n))&&("fixed"===G(n).position||nt(n,e))}function it(t,e,n){const i=T(e),o=R(e),r="fixed"===n,a=Q(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=f(0);if(i||!i&&!r)if(("body"!==L(e)||E(o))&&(c=N(e)),i){const t=Q(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=Z(o));const s=!o||i||r?f(0):tt(o,c);return{x:a.left+c.scrollLeft-l.x-s.x,y:a.top+c.scrollTop-l.y-s.y,width:a.width,height:a.height}}function ot(t){return"static"===G(t).position}function rt(t,e){if(!T(t)||"fixed"===G(t).position)return null;if(e)return e(t);let n=t.offsetParent;return R(t)===n&&(n=n.ownerDocument.body),n}function at(t,e){const n=O(t);if(M(t))return n;if(!T(t)){let e=V(t);for(;e&&!H(e);){if(C(e)&&!ot(e))return e;e=V(e)}return n}let i=rt(t,e);for(;i&&$(i)&&ot(i);)i=rt(i,e);return i&&H(i)&&ot(i)&&!j(i)?n:i||function(t){let e=V(t);for(;T(e)&&!H(e);){if(j(e))return e;if(M(e))return null;e=V(e)}return null}(t)||n}const ct={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,a=R(i),c=!!e&&M(e.floating);if(i===a||c&&r)return n;let l={scrollLeft:0,scrollTop:0},s=f(1);const d=f(0),h=T(i);if((h||!h&&!r)&&(("body"!==L(i)||E(a))&&(l=N(i)),T(i))){const t=Q(i);s=I(i),d.x=t.x+i.clientLeft,d.y=t.y+i.clientTop}const u=!a||h||r?f(0):tt(a,l,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+d.x+u.x,y:n.y*s.y-l.scrollTop*s.y+d.y+u.y}},getDocumentElement:R,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?M(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=U(t,[],!1).filter((t=>C(t)&&"body"!==L(t))),o=null;const r="fixed"===G(t).position;let a=r?V(t):t;for(;C(a)&&!H(a);){const e=G(a),n=j(a);n||"fixed"!==e.position||(o=null),(r?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||E(a)&&!n&&nt(t,a))?i=i.filter((t=>t!==a)):o=e,a=V(a)}return e.set(t,i),i}(e,this._c):[].concat(n),i],a=r.reduce(((t,n)=>{const i=et(e,n,o);return t.top=s(i.top,t.top),t.right=l(i.right,t.right),t.bottom=l(i.bottom,t.bottom),t.left=s(i.left,t.left),t}),et(e,r[0],o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:at,getElementRects:async function(t){const e=this.getOffsetParent||at,n=this.getDimensions,i=await n(t.floating);return{reference:it(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Y(t);return{width:e,height:n}},getScale:I,isElement:C,isRTL:function(t){return"rtl"===G(t).direction}},lt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=m(t,e),s={x:n,y:i},d=await P(e,l),f=b(_(o)),h=x(f);let u=s[h],v=s[f];r&&(u=p(u+d["y"===h?"top":"left"],u,u-d["y"===h?"bottom":"right"])),a&&(v=p(v+d["y"===f?"top":"left"],v,v-d["y"===f?"bottom":"right"]));const g=c.fn({...e,[h]:u,[f]:v});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[h]:r,[f]:a}}}}}},st=class{constructor(n){t(this,n),this.ezVisibilityChange=e(this,"ezVisibilityChange",7),this.TIME_DEBOUNCE=500,this.autoClose=!0,this.boxWidth="fit-content",this.opened=!1,this.overlayType="light",this.anchorElement=void 0,this.options={horizontalGap:0,verticalGap:0,fromRight:!1},this.useAnchorSize=!1,this.minWidth=150}observeOpened(t,e){t!==e&&(t?this.openPopover():this.hidePopover())}async updatePosition(t,e){this.updateOptionPosition(t,e),await this.updatePositionPopover()}async show(t,e){this.updateOptionPosition(t,e),this.opened=!0}async showUnder(t,e){e&&(this.options=e),this.anchorElement=t,this.opened=!0}async hide(){this.opened=!1}async setOptions(t){Object.assign(this.options,t)}async setAnchorElement(t){this.anchorElement=t}parseSizePixel(t,e){return t?"string"==typeof t?Number(t.replace("px","")):null!=t?t:0:null!=e?e:0}updateOptionPosition(t,e){Object.assign(this.options,{horizontalGap:this.parseSizePixel(e,this.options.horizontalGap),verticalGap:this.parseSizePixel(t,this.options.verticalGap)})}getElement(t){return"string"==typeof t?document.getElementById(t):t}getAnchorElement(){if(!this.anchorElement)return this._host;if(Array.isArray(this.anchorElement)){for(const t of this.anchorElement){const e=this.getElement(t);if(e)return e}return this._host}return this.getElement(this.anchorElement)}async updatePositionPopover(){if(!this._box||!this.opened)return;const t=this.getAnchorElement();if(this.useAnchorSize){const e=t.getBoundingClientRect().width;this._box.style.width=`${e<this.minWidth?this.minWidth:e}px`}var e;await((t,e,n)=>{const i=new Map,o={platform:ct,...n},r={...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:a}=n,c=r.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let s=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:f}=D(s,i,l),h=i,u={},p=0;for(let n=0;n<c.length;n++){const{name:r,fn:m}=c[n],{x:_,y:v,data:x,reset:g}=await m({x:d,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:u,rects:s,platform:a,elements:{reference:t,floating:e}});d=null!=_?_:d,f=null!=v?v:f,u={...u,[r]:{...u[r],...x}},g&&p<=50&&(p++,"object"==typeof g&&(g.placement&&(h=g.placement),g.rects&&(s=!0===g.rects?await a.getElementRects({reference:t,floating:e,strategy:o}):g.rects),({x:d,y:f}=D(s,h,l))),n=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:u}})(t,e,{...o,platform:r})})(t,this._box,{placement:this.options.fromRight?"bottom-end":"bottom-start",middleware:[(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:r,rects:a,initialPlacement:c,platform:l,elements:s}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...k}=m(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const D=_(o),A=b(c),L=_(c)===c,O=await(null==l.isRTL?void 0:l.isRTL(s.floating)),R=h||(L||!x?[z(c)]:function(t){const e=z(t);return[w(t),e,w(e)]}(c)),S="none"!==p;!h&&S&&R.push(...function(t,e,n,i){const o=v(t);let r=function(t,e,n){const i=["left","right"],o=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?r:a;default:return[]}}(_(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(w)))),r}(c,x,p,O));const C=[c,...R],T=await P(t,k),F=[];let E=(null==(i=r.flip)?void 0:i.overflows)||[];if(d&&F.push(T[D]),f){const t=function(t,e,n){void 0===n&&(n=!1);const i=v(t),o=y(t),r=g(o);let a="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=z(a)),[a,z(a)]}(o,a,O);F.push(T[t[0]],T[t[1]])}if(E=[...E,{placement:o,overflows:F}],!F.every((t=>t<=0))){var $,M;const t=((null==($=r.flip)?void 0:$.index)||0)+1,e=C[t];if(e)return{data:{index:t,overflows:E},reset:{placement:e}};let n=null==(M=E.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:M.placement;if(!n)switch(u){case"bestFit":{var j;const t=null==(j=E.filter((t=>{if(S){const e=b(t.placement);return e===A||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:j[0];t&&(n=t);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}),lt({padding:5})],strategy:"fixed"}).then((({x:t,y:e,placement:n})=>{const i=n.includes("bottom")?e+this.options.verticalGap:e-this.options.verticalGap,o=n.includes("start")?t+this.options.horizontalGap:t-this.options.horizontalGap;Object.assign(this._box.style,{top:`${i}px`,left:`${o}px`})}))}hidePopover(){this._box&&(this._box.style.display="",this.hideOverlay(),this.ezVisibilityChange.emit(!1))}async openPopover(){this._box&&this.opened&&(this._box.style.display="flex",this._box.style.visibility="hidden",await this.updatePositionPopover(),this.openOverlay(),this.ezVisibilityChange.emit(!0),this._box.style.visibility="visible")}openOverlay(){this._overlay&&this._overlayIsActive&&(this._overlay.style.display="block")}hideOverlay(){this._overlay&&(this._overlay.style.display="none")}checkStatusOverlay(){return"none"!==this.overlayType||!("none"!==this.overlayType||!this.autoClose)}updatePositionDebounce(){this.opened&&(clearTimeout(this._timeoutDebounce),this._timeoutDebounce=setTimeout((()=>{this.updatePositionPopover()}),this.TIME_DEBOUNCE))}componentWillLoad(){window.addEventListener("scroll",this.updatePositionDebounce.bind(this),!0),window.addEventListener("resize",this.updatePositionDebounce.bind(this),!0)}componentDidLoad(){this._overlayIsActive=this.checkStatusOverlay(),this._resizeObserver=new ResizeObserver(this.updatePositionPopover.bind(this)),this._resizeObserver.observe(this._box),this.openPopover()}disconnectedCallback(){window.removeEventListener("scroll",this.updatePositionDebounce.bind(this),!0),window.removeEventListener("resize",this.updatePositionDebounce.bind(this),!0),this._resizeObserver.disconnect()}render(){return n(i,null,n("div",{ref:t=>this._overlay=t,onClick:()=>this.hide(),class:`popover__overlay popover__overlay--${this.overlayType}`}),n("section",{ref:t=>this._box=t,class:{popover__box:!0,"popover__box--fit-content":"fit-content"===this.boxWidth,"popover__box--full-width":"fit-content"!==this.boxWidth}},n("slot",null)))}get _host(){return o(this)}static get watchers(){return{opened:["observeOpened"]}}};st.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--20, 20);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--16, 16)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";export{c as ez_card_item,st as ez_popover_core}
1
+ import{r as t,c as e,h as n,H as i,g as o}from"./p-23a36bb6.js";import{StringUtils as r,ElementIDUtils as a}from"@sankhyalabs/core";const c=class{constructor(n){t(this,n),this.ezClick=e(this,"ezClick",7),this.item=void 0,this.enableKey=!0,this.compacted=!1}componentWillRender(){this.createDetailList()}componentDidLoad(){var t,e;const n={id:r.toCamelCase((null===(t=this.item)||void 0===t?void 0:t.key)||(null===(e=this.item)||void 0===e?void 0:e.title)||"")};a.addIDInfo(this._element,null,n)}createDetailList(){var t,e,n;this._details={detailsLeft:[],detailsRight:[]};let i=0;if(null===(t=this.item)||void 0===t?void 0:t.details)for(const t in this.item.details)i<3?this._details.detailsLeft.push({label:t,value:null===(e=this.item.details[t])||void 0===e?void 0:e.toString()}):this._details.detailsRight.push({label:t,value:null===(n=this.item.details[t])||void 0===n?void 0:n.toString()}),i++}buildDetailContentTitle(t){var e,n;if(null!=(null==t?void 0:t.label)||null!=(null==t?void 0:t.value))return`${null===(e=r.replaceAccentuatedCharsHtmlEntities(null==t?void 0:t.label))||void 0===e?void 0:e.replace(/<[^>]*>/g,"")}: ${null===(n=r.replaceAccentuatedCharsHtmlEntities(null==t?void 0:t.value))||void 0===n?void 0:n.replace(/<[^>]*>/g,"")}`}buildDetailContent(t){return n("div",{class:"card-item__detail "+(this.compacted?"":"card-item__detail-default"),title:this.buildDetailContentTitle(t)},n("label",{class:"card-item__detail-label "+(this.compacted?"card-item__detail-label-compacted":"")},`${t.label}: `)," ",n("label",{class:"card-item__detail-value "+(this.compacted?"card-item__detail-value-compacted":""),innerHTML:t.value}))}render(){return n(i,null,this.item&&n("div",{class:`card-item ${this.compacted?"card-item__compacted":"card-item__expanded"} `,onClick:()=>{this.ezClick.emit(this.item)}},n("div",{class:"ez-row card-item__content"},n("div",{class:"ez-col ez-col--sd-11 card-item__details"},n("label",{class:"card-item__title "+(this.compacted?"card-item__title-compacted":"")},this.enableKey&&n("span",{class:"card-item__key",innerHTML:this.item.key}),n("span",{innerHTML:this.item.title})),n("div",{class:this.compacted?"card-item__details-container_compacted":"card-item__details-container_default"},n("div",{class:"card-item__details-container__left "+(this.compacted?"card-item__details-container__left-compacted":"")},this._details.detailsLeft.map((t=>this.buildDetailContent(t)))),n("div",{class:"card-item__details-container__right "+(this.compacted?"card-item__details-container__right-compacted":"")},this._details.detailsRight.map((t=>this.buildDetailContent(t)))))),n("div",{class:"ez-col ez-col--sd-1 card-item__details-slot"},n("slot",{name:"rightSlot"})))))}get _element(){return o(this)}};c.style=":host { \n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define o tamanho da fonte do componente no modo compacto.*/\n --ez-card-item--font-size-compacted: var(--text--extra-small, 10px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--detail-label--font-weight: var(--text-weight--large, 400);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item__detail{\n display: inline-block;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n opacity: var(--opacity--soft);\n}\n\n\n\n.card-item__expanded {\n padding: var(--space--medium);\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n justify-content: space-between;\n width: 100%;\n}\n\n.card-item__details-container__left {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-container__right {\n display: flex;\n flex-direction: column;\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail{\n cursor: pointer;\n}\n\n.card-item__detail-default:not(:last-child) {\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--detail-label--font-weight);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n.card-item__content{\n display: flex;\n align-items: center;\n}\n\n.card-item__details-container_default{\n display: flex;\n}\n\n.card-item__details-slot{\n margin-left: auto;\n}\n\n/* Modo compacto */\n.card-item__compacted {\n padding: var(--space--2xs) var(--space--small);\n}\n\n.card-item__detail-label-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__detail-value-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__title-compacted {\n font-size: var(--ez-card-item--font-size-compacted);\n}\n\n.card-item__details-container__left-compacted{\n width: 100%;\n}\n\n.card-item__details-container__right-compacted {\n width: 100%;\n}\n\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-container__left {\n width: 100%;\n }\n \n .card-item__details-container__right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";const l=Math.min,s=Math.max,d=Math.round,f=t=>({x:t,y:t}),h={left:"right",right:"left",bottom:"top",top:"bottom"},u={start:"end",end:"start"};function p(t,e,n){return s(t,l(e,n))}function m(t,e){return"function"==typeof t?t(e):t}function _(t){return t.split("-")[0]}function v(t){return t.split("-")[1]}function x(t){return"x"===t?"y":"x"}function g(t){return"y"===t?"height":"width"}function b(t){return["top","bottom"].includes(_(t))?"y":"x"}function y(t){return x(b(t))}function w(t){return t.replace(/start|end/g,(t=>u[t]))}function z(t){return t.replace(/left|right|bottom|top/g,(t=>h[t]))}function k(t){const{x:e,y:n,width:i,height:o}=t;return{width:i,height:o,top:n,left:e,right:e+i,bottom:n+o,x:e,y:n}}function D(t,e,n){let{reference:i,floating:o}=t;const r=b(e),a=y(e),c=g(a),l=_(e),s="y"===r,d=i.x+i.width/2-o.width/2,f=i.y+i.height/2-o.height/2,h=i[c]/2-o[c]/2;let u;switch(l){case"top":u={x:d,y:i.y-o.height};break;case"bottom":u={x:d,y:i.y+i.height};break;case"right":u={x:i.x+i.width,y:f};break;case"left":u={x:i.x-o.width,y:f};break;default:u={x:i.x,y:i.y}}switch(v(e)){case"start":u[a]-=h*(n&&s?-1:1);break;case"end":u[a]+=h*(n&&s?-1:1)}return u}async function P(t,e){var n;void 0===e&&(e={});const{x:i,y:o,platform:r,rects:a,elements:c,strategy:l}=t,{boundary:s="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:u=0}=m(e,t),p=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(u),_=c[h?"floating"===f?"reference":"floating":f],v=k(await r.getClippingRect({element:null==(n=await(null==r.isElement?void 0:r.isElement(_)))||n?_:_.contextElement||await(null==r.getDocumentElement?void 0:r.getDocumentElement(c.floating)),boundary:s,rootBoundary:d,strategy:l})),x="floating"===f?{x:i,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c.floating)),b=await(null==r.isElement?void 0:r.isElement(g))&&await(null==r.getScale?void 0:r.getScale(g))||{x:1,y:1},y=k(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:g,strategy:l}):x);return{top:(v.top-y.top+p.top)/b.y,bottom:(y.bottom-v.bottom+p.bottom)/b.y,left:(v.left-y.left+p.left)/b.x,right:(y.right-v.right+p.right)/b.x}}function A(){return"undefined"!=typeof window}function L(t){return S(t)?(t.nodeName||"").toLowerCase():"#document"}function O(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function R(t){var e;return null==(e=(S(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function S(t){return!!A()&&(t instanceof Node||t instanceof O(t).Node)}function C(t){return!!A()&&(t instanceof Element||t instanceof O(t).Element)}function T(t){return!!A()&&(t instanceof HTMLElement||t instanceof O(t).HTMLElement)}function F(t){return!(!A()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof O(t).ShadowRoot)}function E(t){const{overflow:e,overflowX:n,overflowY:i,display:o}=G(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(o)}function $(t){return["table","td","th"].includes(L(t))}function M(t){return[":popover-open",":modal"].some((e=>{try{return t.matches(e)}catch(t){return!1}}))}function j(t){const e=B(),n=C(t)?G(t):t;return["transform","translate","scale","rotate","perspective"].some((t=>!!n[t]&&"none"!==n[t]))||!!n.containerType&&"normal"!==n.containerType||!e&&!!n.backdropFilter&&"none"!==n.backdropFilter||!e&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((t=>(n.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(n.contain||"").includes(t)))}function B(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function H(t){return["html","body","#document"].includes(L(t))}function G(t){return O(t).getComputedStyle(t)}function N(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function V(t){if("html"===L(t))return t;const e=t.assignedSlot||t.parentNode||F(t)&&t.host||R(t);return F(e)?e.host:e}function W(t){const e=V(t);return H(e)?t.ownerDocument?t.ownerDocument.body:t.body:T(e)&&E(e)?e:W(e)}function U(t,e,n){var i;void 0===e&&(e=[]),void 0===n&&(n=!0);const o=W(t),r=o===(null==(i=t.ownerDocument)?void 0:i.body),a=O(o);if(r){const t=X(a);return e.concat(a,a.visualViewport||[],E(o)?o:[],t&&n?U(t):[])}return e.concat(o,U(o,[],n))}function X(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Y(t){const e=G(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=T(t),r=o?t.offsetWidth:n,a=o?t.offsetHeight:i,c=d(n)!==r||d(i)!==a;return c&&(n=r,i=a),{width:n,height:i,$:c}}function q(t){return C(t)?t:t.contextElement}function I(t){const e=q(t);if(!T(e))return f(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=Y(e);let a=(r?d(n.width):n.width)/i,c=(r?d(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}const J=f(0);function K(t){const e=O(t);return B()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:J}function Q(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=!1);const o=t.getBoundingClientRect(),r=q(t);let a=f(1);e&&(i?C(i)&&(a=I(i)):a=I(t));const c=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==O(t))&&e}(r,n,i)?K(r):f(0);let l=(o.left+c.x)/a.x,s=(o.top+c.y)/a.y,d=o.width/a.x,h=o.height/a.y;if(r){const t=O(r),e=i&&C(i)?O(i):i;let n=t,o=X(n);for(;o&&i&&e!==n;){const t=I(o),e=o.getBoundingClientRect(),i=G(o),r=e.left+(o.clientLeft+parseFloat(i.paddingLeft))*t.x,a=e.top+(o.clientTop+parseFloat(i.paddingTop))*t.y;l*=t.x,s*=t.y,d*=t.x,h*=t.y,l+=r,s+=a,n=O(o),o=X(n)}}return k({width:d,height:h,x:l,y:s})}function Z(t,e){const n=N(t).scrollLeft;return e?e.left+n:Q(R(t)).left+n}function tt(t,e,n){void 0===n&&(n=!1);const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-(n?0:Z(t,i)),y:i.top+e.scrollTop}}function et(t,e,n){let i;if("viewport"===e)i=function(t,e){const n=O(t),i=R(t),o=n.visualViewport;let r=i.clientWidth,a=i.clientHeight,c=0,l=0;if(o){r=o.width,a=o.height;const t=B();(!t||t&&"fixed"===e)&&(c=o.offsetLeft,l=o.offsetTop)}return{width:r,height:a,x:c,y:l}}(t,n);else if("document"===e)i=function(t){const e=R(t),n=N(t),i=t.ownerDocument.body,o=s(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=s(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+Z(t);const c=-n.scrollTop;return"rtl"===G(i).direction&&(a+=s(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:a,y:c}}(R(t));else if(C(e))i=function(t,e){const n=Q(t,!0,"fixed"===e),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=T(t)?I(t):f(1);return{width:t.clientWidth*r.x,height:t.clientHeight*r.y,x:o*r.x,y:i*r.y}}(e,n);else{const n=K(t);i={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return k(i)}function nt(t,e){const n=V(t);return!(n===e||!C(n)||H(n))&&("fixed"===G(n).position||nt(n,e))}function it(t,e,n){const i=T(e),o=R(e),r="fixed"===n,a=Q(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=f(0);if(i||!i&&!r)if(("body"!==L(e)||E(o))&&(c=N(e)),i){const t=Q(e,!0,r,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else o&&(l.x=Z(o));const s=!o||i||r?f(0):tt(o,c);return{x:a.left+c.scrollLeft-l.x-s.x,y:a.top+c.scrollTop-l.y-s.y,width:a.width,height:a.height}}function ot(t){return"static"===G(t).position}function rt(t,e){if(!T(t)||"fixed"===G(t).position)return null;if(e)return e(t);let n=t.offsetParent;return R(t)===n&&(n=n.ownerDocument.body),n}function at(t,e){const n=O(t);if(M(t))return n;if(!T(t)){let e=V(t);for(;e&&!H(e);){if(C(e)&&!ot(e))return e;e=V(e)}return n}let i=rt(t,e);for(;i&&$(i)&&ot(i);)i=rt(i,e);return i&&H(i)&&ot(i)&&!j(i)?n:i||function(t){let e=V(t);for(;T(e)&&!H(e);){if(j(e))return e;if(M(e))return null;e=V(e)}return null}(t)||n}const ct={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r="fixed"===o,a=R(i),c=!!e&&M(e.floating);if(i===a||c&&r)return n;let l={scrollLeft:0,scrollTop:0},s=f(1);const d=f(0),h=T(i);if((h||!h&&!r)&&(("body"!==L(i)||E(a))&&(l=N(i)),T(i))){const t=Q(i);s=I(i),d.x=t.x+i.clientLeft,d.y=t.y+i.clientTop}const u=!a||h||r?f(0):tt(a,l,!0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-l.scrollLeft*s.x+d.x+u.x,y:n.y*s.y-l.scrollTop*s.y+d.y+u.y}},getDocumentElement:R,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const r=[..."clippingAncestors"===n?M(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let i=U(t,[],!1).filter((t=>C(t)&&"body"!==L(t))),o=null;const r="fixed"===G(t).position;let a=r?V(t):t;for(;C(a)&&!H(a);){const e=G(a),n=j(a);n||"fixed"!==e.position||(o=null),(r?!n&&!o:!n&&"static"===e.position&&o&&["absolute","fixed"].includes(o.position)||E(a)&&!n&&nt(t,a))?i=i.filter((t=>t!==a)):o=e,a=V(a)}return e.set(t,i),i}(e,this._c):[].concat(n),i],a=r.reduce(((t,n)=>{const i=et(e,n,o);return t.top=s(i.top,t.top),t.right=l(i.right,t.right),t.bottom=l(i.bottom,t.bottom),t.left=s(i.left,t.left),t}),et(e,r[0],o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:at,getElementRects:async function(t){const e=this.getOffsetParent||at,n=this.getDimensions,i=await n(t.floating);return{reference:it(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=Y(t);return{width:e,height:n}},getScale:I,isElement:C,isRTL:function(t){return"rtl"===G(t).direction}},lt=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:o}=e,{mainAxis:r=!0,crossAxis:a=!1,limiter:c={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=m(t,e),s={x:n,y:i},d=await P(e,l),f=b(_(o)),h=x(f);let u=s[h],v=s[f];r&&(u=p(u+d["y"===h?"top":"left"],u,u-d["y"===h?"bottom":"right"])),a&&(v=p(v+d["y"===f?"top":"left"],v,v-d["y"===f?"bottom":"right"]));const g=c.fn({...e,[h]:u,[f]:v});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[h]:r,[f]:a}}}}}},st=class{constructor(n){t(this,n),this.ezVisibilityChange=e(this,"ezVisibilityChange",7),this.TIME_DEBOUNCE=500,this.autoClose=!0,this.boxWidth="fit-content",this.opened=!1,this.overlayType="light",this.anchorElement=void 0,this.options={horizontalGap:0,verticalGap:0,fromRight:!1},this.useAnchorSize=!1,this.minWidth=150}observeOpened(t,e){t!==e&&(t?this.openPopover():this.hidePopover())}async updatePosition(t,e){this.updateOptionPosition(t,e),await this.updatePositionPopover()}async show(t,e){this.updateOptionPosition(t,e),this.opened=!0}async showUnder(t,e){e&&(this.options=e),this.anchorElement=t,this.opened=!0}async hide(){this.opened=!1}async setOptions(t){Object.assign(this.options,t)}async setAnchorElement(t){this.anchorElement=t}parseSizePixel(t,e){return t?"string"==typeof t?Number(t.replace("px","")):null!=t?t:0:null!=e?e:0}updateOptionPosition(t,e){Object.assign(this.options,{horizontalGap:this.parseSizePixel(e,this.options.horizontalGap),verticalGap:this.parseSizePixel(t,this.options.verticalGap)})}getElement(t){return"string"==typeof t?document.getElementById(t):t}getAnchorElement(){if(!this.anchorElement)return this._host;if(Array.isArray(this.anchorElement)){for(const t of this.anchorElement){const e=this.getElement(t);if(e)return e}return this._host}return this.getElement(this.anchorElement)}async updatePositionPopover(){if(!this._box||!this.opened)return;const t=this.getAnchorElement();if(this.useAnchorSize){const e=t.getBoundingClientRect().width;this._box.style.width=`${e<this.minWidth?this.minWidth:e}px`}var e;await((t,e,n)=>{const i=new Map,o={platform:ct,...n},r={...o.platform,_c:i};return(async(t,e,n)=>{const{placement:i="bottom",strategy:o="absolute",middleware:r=[],platform:a}=n,c=r.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let s=await a.getElementRects({reference:t,floating:e,strategy:o}),{x:d,y:f}=D(s,i,l),h=i,u={},p=0;for(let n=0;n<c.length;n++){const{name:r,fn:m}=c[n],{x:_,y:v,data:x,reset:g}=await m({x:d,y:f,initialPlacement:i,placement:h,strategy:o,middlewareData:u,rects:s,platform:a,elements:{reference:t,floating:e}});d=null!=_?_:d,f=null!=v?v:f,u={...u,[r]:{...u[r],...x}},g&&p<=50&&(p++,"object"==typeof g&&(g.placement&&(h=g.placement),g.rects&&(s=!0===g.rects?await a.getElementRects({reference:t,floating:e,strategy:o}):g.rects),({x:d,y:f}=D(s,h,l))),n=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:u}})(t,e,{...o,platform:r})})(t,this._box,{placement:this.options.fromRight?"bottom-end":"bottom-start",middleware:[(void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:o,middlewareData:r,rects:a,initialPlacement:c,platform:l,elements:s}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:x=!0,...k}=m(e,t);if(null!=(n=r.arrow)&&n.alignmentOffset)return{};const D=_(o),A=b(c),L=_(c)===c,O=await(null==l.isRTL?void 0:l.isRTL(s.floating)),R=h||(L||!x?[z(c)]:function(t){const e=z(t);return[w(t),e,w(e)]}(c)),S="none"!==p;!h&&S&&R.push(...function(t,e,n,i){const o=v(t);let r=function(t,e,n){const i=["left","right"],o=["right","left"],r=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?o:i:e?i:o;case"left":case"right":return e?r:a;default:return[]}}(_(t),"start"===n,i);return o&&(r=r.map((t=>t+"-"+o)),e&&(r=r.concat(r.map(w)))),r}(c,x,p,O));const C=[c,...R],T=await P(t,k),F=[];let E=(null==(i=r.flip)?void 0:i.overflows)||[];if(d&&F.push(T[D]),f){const t=function(t,e,n){void 0===n&&(n=!1);const i=v(t),o=y(t),r=g(o);let a="x"===o?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return e.reference[r]>e.floating[r]&&(a=z(a)),[a,z(a)]}(o,a,O);F.push(T[t[0]],T[t[1]])}if(E=[...E,{placement:o,overflows:F}],!F.every((t=>t<=0))){var $,M;const t=((null==($=r.flip)?void 0:$.index)||0)+1,e=C[t];if(e)return{data:{index:t,overflows:E},reset:{placement:e}};let n=null==(M=E.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:M.placement;if(!n)switch(u){case"bestFit":{var j;const t=null==(j=E.filter((t=>{if(S){const e=b(t.placement);return e===A||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:j[0];t&&(n=t);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}),lt({padding:5})],strategy:"fixed"}).then((({x:t,y:e,placement:n})=>{const i=n.includes("bottom")?e+this.options.verticalGap:e-this.options.verticalGap,o=n.includes("start")?t+this.options.horizontalGap:t-this.options.horizontalGap;Object.assign(this._box.style,{top:`${i}px`,left:`${o}px`})}))}hidePopover(){this._box&&(this._box.style.display="",this.hideOverlay(),this.ezVisibilityChange.emit(!1))}async openPopover(){this._box&&this.opened&&(this._box.style.display="flex",this._box.style.visibility="hidden",await this.updatePositionPopover(),this.openOverlay(),this.ezVisibilityChange.emit(!0),this._box.style.visibility="visible")}openOverlay(){this._overlay&&this._overlayIsActive&&(this._overlay.style.display="block")}hideOverlay(){this._overlay&&(this._overlay.style.display="none")}checkStatusOverlay(){return"none"!==this.overlayType||!("none"!==this.overlayType||!this.autoClose)}updatePositionDebounce(){this.opened&&(clearTimeout(this._timeoutDebounce),this._timeoutDebounce=setTimeout((()=>{this.updatePositionPopover()}),this.TIME_DEBOUNCE))}componentWillLoad(){window.addEventListener("scroll",this.updatePositionDebounce.bind(this),!0),window.addEventListener("resize",this.updatePositionDebounce.bind(this),!0)}componentDidLoad(){this._overlayIsActive=this.checkStatusOverlay(),this._resizeObserver=new ResizeObserver(this.updatePositionPopover.bind(this)),this._resizeObserver.observe(this._box),this.openPopover()}disconnectedCallback(){window.removeEventListener("scroll",this.updatePositionDebounce.bind(this),!0),window.removeEventListener("resize",this.updatePositionDebounce.bind(this),!0),this._resizeObserver.disconnect()}render(){return n(i,null,n("div",{ref:t=>this._overlay=t,onClick:()=>this.hide(),class:`popover__overlay popover__overlay--${this.overlayType}`}),n("section",{ref:t=>this._box=t,class:{popover__box:!0,"popover__box--fit-content":"fit-content"===this.boxWidth,"popover__box--full-width":"fit-content"!==this.boxWidth}},n("slot",null)))}get _host(){return o(this)}static get watchers(){return{opened:["observeOpened"]}}};st.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--elevation--100, 100);position:relative;display:flex;user-select:none}.popover__overlay{display:none;position:fixed;padding:0;top:0px;left:0px;width:100%;height:100vh;box-sizing:border-box;z-index:var(--elevation--24, 24)}.popover__overlay--light{background-color:rgba(var(--rgb-background--overlay), var(--opacity--bright))}.popover__overlay--medium{background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.popover__box{display:none;position:fixed;top:0;left:0;z-index:var(--ez-popover__box--z-index);flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:calc(100% - 10px)}";export{c as ez_card_item,st as ez_popover_core}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyalabs/ezui",
3
- "version": "5.22.0-dev.103",
3
+ "version": "5.22.0-dev.105",
4
4
  "description": "Biblioteca de componentes Sankhya.",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as s,H as e,g as h}from"./p-23a36bb6.js";import{C as o}from"./p-ec7db713.js";import{ObjectUtils as r,StringUtils as n,ElementIDUtils as a}from"@sankhyalabs/core";import{A as l}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-4607fb89.js";import{R as c}from"./p-05e1f4e7.js";import{r as d,a as u}from"./p-40a60148.js";const v=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._showLoadingDescription=!1,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.contextProperties=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!1,this.mode="regular",this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.options=void 0,this.suppressSearch=!1,this.ensureClearButtonVisible=!1,this.suppressPreLoad=!0,this.autoFocus=!1}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,!(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())&&this.errorMessage&&this.setInputValue())}getValue(t){return"object"==typeof t?null==t?void 0:t.value:t}validateNewValue(t,i){const s=this.getValue(t),e=this.getValue(i);return!("[object Object]"===s||s===e)}async observeValue(t,i){if(this._textInput&&this.validateNewValue(t,i)){if("string"==typeof t)return void await this.handleValueAsString(t);const i=this.getSelectedOption(t),s=this.getSelectedOption(this._currentValue);this.isDifferentValues(s,i)&&(this._currentValue=i,this.setInputValue(),this.ezChange.emit(null!=i?i:void 0)),this.resetOptions()}}observeOptions(t,i){!t.length&&this.suppressPreLoad||(null==t?void 0:t.join(""))!==(null==i?void 0:i.join(""))&&this.loadOptions(p.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.value))}),100)}:t=>t(this.value))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}async handleValueAsString(t){this.getSelectedOption(t)?this.setInputValue():(await this.loadDescriptionValue(t),this._currentValue&&(this.setInputValue(),this.ezChange.emit(this.value),this._currentValue=this.value))}isDifferentValues(t,i){return r.objectToString(t||{})!==r.objectToString(i||{})}getFormattedText(t){if(null==t)return;let i=this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label;return i=null==i?void 0:i.replace(new RegExp(this._startHighlightTag,"g"),"").replace(new RegExp(this._endHighlightTag,"g"),""),i}getText(){const t=this.getSelectedOption(this._currentValue),i=this.getFormattedText(t);return d(i)}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t?Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}):t}updateVisibleOptions(){let t=this._source||[];this._visibleOptions=this.suppressEmptyOption?t:[{value:void 0,label:""}].concat(t),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var t;const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}showOptions(){this.enabled&&(this.isOptionsVisible()||this._ezPopOverPlusElement.showUnder(this._textInput))}hideOptions(){this._ezPopOverPlusElement.hide()}isOptionsVisible(){return this._ezPopOverPlusElement.opened}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,this._showLoadingDescription=!0,t.then((t=>{this.updateSource(t)})).finally((()=>{this._showLoading=!1,this._showLoadingDescription=!1})),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch(!1))):this.selectOption(t))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(t,i=!0){var s,e;const h=this.getSelectedOption(this.value),o=Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}),r=Object.assign(Object.assign({},o),{value:d(null==o?void 0:o.value),label:d(null==o?void 0:o.label)});if((null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.toString())||null==h&&null!=r&&"value"in r){const t=(null==r?void 0:r.value)?r:void 0;this.value=t,this._currentValue=t}else this.setInputValue(),this.resetOptions();this._visibleOptions=[],this.clearSource(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i},this.contextProperties):this.options)}cancelPreselection(){!this._textInput.value&&this._currentValue?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null,this._currentValue=null}controlListWithOnlyOne(t=!0){var i,s;const e=null===(i=this._visibleOptions)||void 0===i?void 0:i.filter((t=>""!==t.label&&null!=t.value));if((null==e?void 0:e.length)>0){const i=new RegExp(this._startHighlightTag,"g"),h=new RegExp(this._endHighlightTag,"g");let o=n.decodeHtmlEntities(e[0].label);const r={value:null===(s=e[0].value)||void 0===s?void 0:s.replace(i,"").replace(h,""),label:null==o?void 0:o.replace(i,"").replace(h,"")};this.selectOption(r,t)}}controlEmptySearch(t=!0){var i;(null===(i=this._visibleOptions)||void 0===i?void 0:i.length)?this.controlListWithOnlyOne(t):(this.clearSearch(),l.info(this._textEmptyList))}async loadDescriptionValue(t){var i,s;if(null==t)return;if((null===(i=this.options)||void 0===i?void 0:i.length)>0)return void this.loadOptionValue(t);const e={mode:p.PREDICTIVE,argument:t},h=await(null===(s=this.optionLoader)||void 0===s?void 0:s.call(this,e,this.contextProperties));null!=h&&(h instanceof Promise?h.then((t=>{this.setDescriptionValue(t)})):this.setDescriptionValue(h))}setDescriptionValue(t){const i=(null==t?void 0:t[0])||t;null!=i&&Object.keys(i).length?(this._currentValue=i?Object.assign(Object.assign({},i),{value:u(i.value),label:u(i.label)}):i,this.value=this._currentValue,this.setTextInputValue()):this.showNoResultMessage()}setTextInputValue(){if(this._textInput&&null==this._textInput.value){if(null==this.value)return;const t="string"==typeof this.value?this.value:this.getFormattedText(this.value);this._textInput.value=d(t)}}loadOptionValue(t){var i;const s=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===t));null!=s?this.selectOption(s):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),l.info(this._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var t;return null===(t=this.label)||void 0===t?void 0:t.replace(c,"").toUpperCase()}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async handleInitialValue(){if(!this.getValue(this.value))return;if("string"==typeof this.value)return void await this.handleValueAsString(this.value);let t=this.getFormattedText(this.value);t=d(t),this._textInput.value=t}componentWillLoad(){if(void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value"),e=t.getAttribute("details");s||(s=i),this.options.push({label:i,value:s,details:e}),t.hidden=!0}))}this.updateSource([])}componentDidRender(){var t;null===(t=this._optionsList)||void 0===t||t.querySelectorAll(".item").forEach((t=>{a.addIDInfoIfNotExists(t,"itemSearch")}))}async componentDidLoad(){this._currentValue=this.value,o.applyVarsTextInput(this.el,this._textInput),this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)}))})),await this.handleInitialValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect()}handlerIconClick(){this.loadOptions(p.ADVANCED)}buildNumberArgument(t){return this.isTextSearch?NaN:Number(t||void 0)}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim(),e=this.buildNumberArgument(s);this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this._showLoading=!1,this.clearSource(),this.ignoreLimitCharsToSearch||!isNaN(e)||s.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(p.PREDICTIVE,isNaN(e)?s:e.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.hideOptions(),this._showLoading=!1,this.clearSource())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}async keyDownHandler(t){switch(this._tabPressed=!1,t.ctrlKey&&("f"!==t.key&&"F"!==t.key||(this.loadOptions(p.ADVANCED),t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault())),t.key){case"ArrowDown":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),this.isOptionsVisible()||this.showOptions(),await this._searchList.nextOption();break;case"ArrowUp":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),await this._searchList.previousOption();break;case"Enter":this.handleEventPropagation(t),this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne(!1)}}handleEventPropagation(t){this._ezPopOverPlusElement.opened&&this.stopPropagateEnterKeyEvent&&t.stopPropagation()}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}canShowLoadSpinDescription(){return this._showLoadingDescription&&!this._ezPopOverPlusElement.opened}onChangePreSelection(t){this._preSelection=t}render(){var t;return a.addIDInfoIfNotExists(this.el,"input"),s(e,null,s("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},s("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},this.canShowLoadSpinDescription()?s("div",{class:"message__loading"}):s("ez-icon",{iconName:"search"})),(null===(t=this._textInput)||void 0===t?void 0:t.value)&&(this._criteria||this.value)||this.ensureClearButtonVisible?s("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},s("ez-icon",{iconName:"close"})):void 0),s("ez-popover-plus",{ref:t=>this._ezPopOverPlusElement=t,autoClose:!1,overlayType:"none",useAnchorSize:!0,anchorElement:[this._textInput,this.el]},s("search-list",{ref:t=>this._searchList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this._textEmptyList,canShowListOptions:this.canShowListOptions(),value:this.value,showOptionValue:this.showOptionValue,preSelection:this._preSelection,onChangeValue:({detail:t})=>this.selectOption(t),onChangePreSelection:({detail:t})=>this.onChangePreSelection(t)})))}get el(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var p;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(p||(p={})),v.style=":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}";export{v as ez_search}