@sankhyalabs/ezui 7.2.0-dev.7 → 7.2.0-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/cjs/{ApplicationUtils-dc653b57.js → ApplicationUtils-88dfe345.js} +1 -1
  2. package/dist/cjs/{app-globals-16ec1ff7.js → app-globals-c1d07d68.js} +1 -1
  3. package/dist/cjs/classic-search-list_7.cjs.entry.js +9 -4
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
  5. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-classic-date-input.cjs.entry.js +1 -1
  9. package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-classic-number-input.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-classic-search-plus.cjs.entry.js +25 -12
  12. package/dist/cjs/ez-classic-search.cjs.entry.js +2 -2
  13. package/dist/cjs/ez-classic-time-input.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
  15. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
  16. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  17. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-form.cjs.entry.js +3 -3
  23. package/dist/cjs/ez-grid-pagination.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-grid.cjs.entry.js +3 -3
  25. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  26. package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
  27. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  28. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-record-navigation.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-search-plus.cjs.entry.js +11 -2
  37. package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-search.cjs.entry.js +2 -2
  39. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  40. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  41. package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
  42. package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
  44. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  45. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  47. package/dist/cjs/ez-upload.cjs.entry.js +2 -2
  48. package/dist/cjs/ezui.cjs.js +3 -3
  49. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  50. package/dist/cjs/{index-a8537087.js → index-9739c242.js} +6 -0
  51. package/dist/cjs/loader.cjs.js +3 -3
  52. package/dist/cjs/{search-column-cd0e44be.js → search-column-9612bd3a.js} +2 -2
  53. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.js +26 -11
  54. package/dist/collection/components/ez-image-input/ez-image-input.css +24 -8
  55. package/dist/collection/components/ez-image-input/ez-image-input.js +6 -1
  56. package/dist/collection/components/ez-search-plus/ez-search-plus.js +9 -0
  57. package/dist/collection/utils/i18n/locales/en-us.js +2 -0
  58. package/dist/collection/utils/i18n/locales/es-es.js +2 -0
  59. package/dist/collection/utils/i18n/locales/pt-br.js +2 -0
  60. package/dist/custom-elements/index.js +46 -13
  61. package/dist/esm/{ApplicationUtils-e99e53c8.js → ApplicationUtils-f7721533.js} +1 -1
  62. package/dist/esm/{app-globals-6e27b3bb.js → app-globals-6e258867.js} +1 -1
  63. package/dist/esm/classic-search-list_7.entry.js +9 -4
  64. package/dist/esm/ez-actions-button.entry.js +2 -2
  65. package/dist/esm/ez-alert-list.entry.js +1 -1
  66. package/dist/esm/ez-avatar.entry.js +1 -1
  67. package/dist/esm/ez-calendar.entry.js +1 -1
  68. package/dist/esm/ez-classic-date-input.entry.js +1 -1
  69. package/dist/esm/ez-classic-date-time-input.entry.js +1 -1
  70. package/dist/esm/ez-classic-number-input.entry.js +1 -1
  71. package/dist/esm/ez-classic-search-plus.entry.js +25 -12
  72. package/dist/esm/ez-classic-search.entry.js +2 -2
  73. package/dist/esm/ez-classic-time-input.entry.js +1 -1
  74. package/dist/esm/ez-collapsible-box.entry.js +2 -2
  75. package/dist/esm/ez-combo-box.entry.js +2 -2
  76. package/dist/esm/ez-date-input.entry.js +1 -1
  77. package/dist/esm/ez-date-time-input.entry.js +1 -1
  78. package/dist/esm/ez-dialog.entry.js +1 -1
  79. package/dist/esm/ez-double-list.entry.js +1 -1
  80. package/dist/esm/ez-file-item.entry.js +1 -1
  81. package/dist/esm/ez-form-view.entry.js +1 -1
  82. package/dist/esm/ez-form.entry.js +3 -3
  83. package/dist/esm/ez-grid-pagination.entry.js +1 -1
  84. package/dist/esm/ez-grid.entry.js +3 -3
  85. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  86. package/dist/esm/ez-link-builder_6.entry.js +1 -1
  87. package/dist/esm/ez-list.entry.js +1 -1
  88. package/dist/esm/ez-modal-container.entry.js +1 -1
  89. package/dist/esm/ez-modal.entry.js +1 -1
  90. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  91. package/dist/esm/ez-number-input.entry.js +1 -1
  92. package/dist/esm/ez-pagination.entry.js +1 -1
  93. package/dist/esm/ez-popup.entry.js +1 -1
  94. package/dist/esm/ez-record-navigation.entry.js +1 -1
  95. package/dist/esm/ez-scroller_2.entry.js +1 -1
  96. package/dist/esm/ez-search-plus.entry.js +11 -2
  97. package/dist/esm/ez-search-result-list.entry.js +1 -1
  98. package/dist/esm/ez-search.entry.js +2 -2
  99. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  100. package/dist/esm/ez-skeleton.entry.js +1 -1
  101. package/dist/esm/ez-sortable-list.entry.js +1 -1
  102. package/dist/esm/ez-spinner.entry.js +1 -1
  103. package/dist/esm/ez-split-button.entry.js +1 -1
  104. package/dist/esm/ez-split-item.entry.js +2 -2
  105. package/dist/esm/ez-time-input.entry.js +1 -1
  106. package/dist/esm/ez-tree.entry.js +1 -1
  107. package/dist/esm/ez-upload.entry.js +2 -2
  108. package/dist/esm/ezui.js +3 -3
  109. package/dist/esm/filter-column.entry.js +1 -1
  110. package/dist/esm/{index-a031816b.js → index-9e6dab5b.js} +6 -0
  111. package/dist/esm/loader.js +3 -3
  112. package/dist/esm/{search-column-33d72c20.js → search-column-dba4853a.js} +2 -2
  113. package/dist/ezui/ezui.esm.js +1 -1
  114. package/dist/ezui/{p-2b65728f.entry.js → p-0592535f.entry.js} +1 -1
  115. package/dist/ezui/{p-b5f45319.entry.js → p-063bb342.entry.js} +1 -1
  116. package/dist/ezui/{p-473a397f.entry.js → p-0ac8bd66.entry.js} +1 -1
  117. package/dist/ezui/{p-4991931a.entry.js → p-108503ed.entry.js} +1 -1
  118. package/dist/ezui/{p-3d772561.entry.js → p-1166b2d5.entry.js} +1 -1
  119. package/dist/ezui/p-15873627.js +1 -0
  120. package/dist/ezui/{p-c2d44132.entry.js → p-2856c545.entry.js} +1 -1
  121. package/dist/ezui/{p-c33d46e0.entry.js → p-2ae127bc.entry.js} +1 -1
  122. package/dist/ezui/{p-ea0f78d1.entry.js → p-2bf884f2.entry.js} +1 -1
  123. package/dist/ezui/{p-0fc981e9.entry.js → p-2ebd7383.entry.js} +1 -1
  124. package/dist/ezui/{p-c8584e28.entry.js → p-30c5f48a.entry.js} +1 -1
  125. package/dist/ezui/{p-8a5efec5.entry.js → p-312bd3c6.entry.js} +1 -1
  126. package/dist/ezui/{p-2887cbf9.entry.js → p-3fae7072.entry.js} +1 -1
  127. package/dist/ezui/{p-69344c23.js → p-42e1e733.js} +1 -1
  128. package/dist/ezui/{p-f1390be9.entry.js → p-45245c32.entry.js} +1 -1
  129. package/dist/ezui/{p-caf3cd8f.entry.js → p-46b1b2ac.entry.js} +1 -1
  130. package/dist/ezui/{p-700af412.entry.js → p-54af1af0.entry.js} +1 -1
  131. package/dist/ezui/{p-7f475884.entry.js → p-66455069.entry.js} +1 -1
  132. package/dist/ezui/p-72e77b45.entry.js +1 -0
  133. package/dist/ezui/{p-a8f807ed.entry.js → p-73461028.entry.js} +1 -1
  134. package/dist/ezui/{p-3311e7ef.entry.js → p-7424d520.entry.js} +1 -1
  135. package/dist/ezui/{p-318d4dc9.entry.js → p-7a07c50f.entry.js} +1 -1
  136. package/dist/ezui/p-7b078125.entry.js +1 -0
  137. package/dist/ezui/{p-4ca4e8d1.entry.js → p-7dad8018.entry.js} +1 -1
  138. package/dist/ezui/{p-f71a4d97.js → p-83bddbbb.js} +1 -1
  139. package/dist/ezui/{p-39d2bce5.entry.js → p-881abc22.entry.js} +1 -1
  140. package/dist/ezui/{p-93097edc.entry.js → p-99556756.entry.js} +1 -1
  141. package/dist/ezui/{p-ab4da973.entry.js → p-9bd3e28b.entry.js} +1 -1
  142. package/dist/ezui/{p-ed6b6e0f.entry.js → p-9bd78d39.entry.js} +1 -1
  143. package/dist/ezui/{p-24582dd6.js → p-ad5e263d.js} +1 -1
  144. package/dist/ezui/{p-1244fac0.entry.js → p-b06294c9.entry.js} +1 -1
  145. package/dist/ezui/{p-adee66db.entry.js → p-b493757c.entry.js} +1 -1
  146. package/dist/ezui/{p-510eccc7.entry.js → p-b8cd501a.entry.js} +1 -1
  147. package/dist/ezui/{p-2e07f3d5.entry.js → p-b986da95.entry.js} +1 -1
  148. package/dist/ezui/{p-d98dd01a.entry.js → p-c25a4d30.entry.js} +1 -1
  149. package/dist/ezui/{p-4f76dc28.entry.js → p-c37fb359.entry.js} +1 -1
  150. package/dist/ezui/{p-96e5eaa2.entry.js → p-cb00863d.entry.js} +1 -1
  151. package/dist/ezui/{p-ab41edab.entry.js → p-d5684cdc.entry.js} +1 -1
  152. package/dist/ezui/{p-1ab5ba19.entry.js → p-d70805e4.entry.js} +1 -1
  153. package/dist/ezui/{p-a4911d89.entry.js → p-d75f583b.entry.js} +1 -1
  154. package/dist/ezui/{p-54975948.entry.js → p-d8b69419.entry.js} +1 -1
  155. package/dist/ezui/{p-0bc16f75.entry.js → p-dfced8c7.entry.js} +1 -1
  156. package/dist/ezui/{p-a383fbc5.entry.js → p-e3d6b544.entry.js} +1 -1
  157. package/dist/ezui/{p-84be1391.entry.js → p-e692c2a7.entry.js} +1 -1
  158. package/dist/ezui/{p-32b8f057.entry.js → p-e8cd003b.entry.js} +1 -1
  159. package/dist/ezui/{p-91ff4511.entry.js → p-ed790867.entry.js} +1 -1
  160. package/dist/ezui/{p-dd5326e6.entry.js → p-f2e0acf5.entry.js} +1 -1
  161. package/dist/ezui/{p-8980b477.entry.js → p-f498f6b5.entry.js} +1 -1
  162. package/dist/ezui/{p-ddc6432d.entry.js → p-fb27b98d.entry.js} +1 -1
  163. package/dist/ezui/{p-879cee4d.entry.js → p-fc11f5b9.entry.js} +1 -1
  164. package/dist/types/components/ez-classic-search-plus/ez-classic-search-plus.d.ts +3 -0
  165. package/dist/types/components/ez-image-input/ez-image-input.d.ts +1 -0
  166. package/dist/types/components/ez-search-plus/ez-search-plus.d.ts +1 -0
  167. package/dist/types/utils/i18n/locales/en-us.d.ts +2 -0
  168. package/dist/types/utils/i18n/locales/es-es.d.ts +2 -0
  169. package/dist/types/utils/i18n/locales/pt-br.d.ts +2 -0
  170. package/dist/types/utils/i18n/translations.d.ts +6 -0
  171. package/package.json +1 -1
  172. package/dist/ezui/p-2241dea1.js +0 -1
  173. package/dist/ezui/p-6bb36afc.entry.js +0 -1
  174. package/dist/ezui/p-fcdd861e.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as r,g as s}from"./p-23a36bb6.js";import{StringUtils as a,KeyboardManager as o,ElementIDUtils as l}from"@sankhyalabs/core";import{A as n}from"./p-24582dd6.js";import{C as h}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as c}from"./p-69344c23.js";import{S as d}from"./p-5895e687.js";import"./p-47e4a8ce.js";const u=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.ezEmptySearch=t(this,"ezEmptySearch",7),this.SEARCH_DESCRIPTION_TIMEOUT=300,this.INTERVAL_TO_RETRY_ASYNC_VALUE=100,this._ignoreNextValue=!1,this.value=void 0,this.enabled=!0,this.disableCodeInput=!1,this.disableDescriptionInput=!1,this.label=void 0,this.codLabel=void 0,this.hideDescriptionInput=!1,this.canShowError=!0,this.errorMessage=void 0,this.mode="regular",this.contextProperties=void 0,this.optionLoader=void 0,this.showOptionValue=!0,this.stopPropagateEnterKeyEvent=!1,this.autoFocus=!1,this.showSelectedValue=!0,this.suppressEmptyOption=!1,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.suppressSearch=!1,this.suppressPreLoad=!0,this.ensureClearButtonVisible=!1,this.descriptionValue="",this.codeValue="",this.isLoadingDescription=!1,this.searchDescriptionIsOpen=!1,this.visibleOptions=void 0,this.showLoading=!0}async observeValue(e,t){var i;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const r=this.normalizeValueToCodeValue(e);if(r===this.normalizeValueToCodeValue(t))return;if(void 0===r)return this.codeValue=void 0,this.descriptionValue=void 0,void this.ezChange.emit(void 0);this.codeValue=r;let s=!0;try{this.descriptionValue=await this.normalizeCodeToDescriptionValue(e),null==this.descriptionValue&&console.error(`Valor de descrição não encontrado! ${this.label}: ${this.codeValue}`)}catch(e){await n.info(e.message);const t="string"==typeof this.value?this.value:null===(i=this.value)||void 0===i?void 0:i.value;this.ezEmptySearch.emit(t),this.errorMessage=e.message,s=!1,this._ignoreNextValue=!0,this.clearSearch(),console.warn("[EzSearchPlus] Erro ao obter descrição do registro.",e)}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),s&&(this.errorMessage=null)}canShowLoadSpinDescription(){return this.isLoadingDescription}async setFocus(e){var t,i;this.disableCodeInput?null===(t=this._textInputDescriptionValue)||void 0===t||t.setFocus(e):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(e):null===(i=this._textInputCodeValue)||void 0===i||i.setFocus(e)}async getValueAsync(){if(!this.isLoadingDescription){const e=this.buildCurrentValue();return new Promise((t=>t(e)))}return new Promise((e=>{let t=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(t);const i=this.buildCurrentValue();e(i)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var e,t;null===(e=this._textInputCodeValue)||void 0===e||e.setBlur(),null===(t=this._textInputDescriptionValue)||void 0===t||t.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async componentWillLoad(){this.i18n=await c(),this.value&&a.isEmpty(this.codeValue)&&await this.observeValue(this.value,void 0)}componentDidLoad(){h.applyVarsTextInput(this.el,this._textInputCodeValue),h.applyVarsTextInput(this.el,this._textInputDescriptionValue)}connectedCallback(){this.initKeyboardManager(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}clearSearch(){this.value=null,this.codeValue=null,this.descriptionValue=null,!this.hideDescriptionInput&&this._textInputDescriptionValue&&(this._textInputDescriptionValue.value=null)}getCodLabel(){var e;return this.hideDescriptionInput?this.label:null!==(e=this.codLabel)&&void 0!==e?e:this.i18n("ez-search-plus.defaultCodeLabel")}async normalizeCodeToDescriptionValue(e){if(!e)return"";if("string"==typeof e)try{if((null==(e=JSON.parse(e))?void 0:e.value)&&!(null==e?void 0:e.label))return await this.loadDescriptionValueByCode(null==e?void 0:e.value)}catch(t){return await this.loadDescriptionValueByCode(e)}return"object"!=typeof e?await this.loadDescriptionValueByCode(e):null==e?void 0:e.label}normalizeValueToCodeValue(e){if(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){return e}return"object"!=typeof e?"number"==typeof e?String(e):e:null==e?void 0:e.value}}async loadDescriptionValueByCode(e){if(!this.optionLoader)return console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined")),"";try{this.isLoadingDescription=!0;const t={mode:d.LOAD_DESCRIPTION,argument:e},i=await this.optionLoader(t);return i?Array.isArray(i)?i[0].label:i.label:""}finally{this.isLoadingDescription=!1}}handleCodeInputFocusOut(){this.cancelSelection(),this.codeValue!=this._textInputCodeValue.value&&(this.value=this._textInputCodeValue.value)}handleSearchClick(){this.loadAdvancedSearch()}async loadAdvancedSearch(){if(!this.optionLoader)return void console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));const e={mode:d.ADVANCED,argument:""};let t;try{t=await this.optionLoader(e,this.contextProperties)}catch(e){}t&&(this.value=t)}buildCurrentValue(){if(!a.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(e){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const t=e.target.value;await this.debounceLoaderOptions(t)}async debounceLoaderOptions(e){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((t=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(e),t()}),this.SEARCH_DESCRIPTION_TIMEOUT)}))}updateKeyOption(e){return Object.assign(Object.assign({},e),{presentationValue:e.value,presentationLabel:e.label})}parseSearchOptions(e=[]){if(Array.isArray(e)){const t=e[0];return t?"label"in t||"value"in t?e.map((e=>this.updateKeyOption(e))):e:[]}return("label"in e||"value"in e)&&this.updateKeyOption(e),[e]}async processOptionsLoader(e){try{this.showLoading=!0;const t={mode:d.PREDICTIVE,argument:e},i=await this.optionLoader(t);this.visibleOptions=this.parseSearchOptions(i)}finally{this.showLoading=!1}}handleSelectItem(e){this.value=e.detail,this._popover.hide(),window.requestAnimationFrame((()=>{var e;null===(e=this._textInputDescriptionValue)||void 0===e||e.setFocus({selectText:!0})}))}async handleArrowUp(){this.isOptionsVisible()&&await this._searchList.previousOption()}async handleArrowDown(){this.isOptionsVisible()&&await this._searchList.nextOption()}async selectCurrentItem(){var e;await(null===(e=this._searchList)||void 0===e?void 0:e.selectCurrentItem())}async cancelSelection(){var e,t,i;const r="object"==typeof this.value?null===(e=this.value)||void 0===e?void 0:e.label:"";this._textInputDescriptionValue&&r&&this._textInputDescriptionValue.value!=r&&(this._textInputDescriptionValue.value=r),await(null===(t=this._searchList)||void 0===t?void 0:t.cancelSelection()),null===(i=this._popover)||void 0===i||i.hide()}async handleInputTab(){await this.cancelSelection()}async handleInputEsc(){var e;await this.cancelSelection(),await(null===(e=this._latestFocusedInputElement)||void 0===e?void 0:e.setFocus({selectText:!0}))}async initKeyboardManager(){this._keyboardManager=new o;const e={element:this.el,propagate:!0};this._keyboardManager.bind("ArrowUp",(()=>this.handleArrowUp()),Object.assign(Object.assign({},e),{propagate:!1})).bind("ArrowDown",(()=>this.handleArrowDown()),Object.assign(Object.assign({},e),{propagate:!1})).bind("Enter",(()=>this.selectCurrentItem()),Object.assign(Object.assign({},e),{propagate:!this.stopPropagateEnterKeyEvent})).bind("Tab",(()=>this.handleInputTab()),e).bind("Escape",(()=>this.handleInputEsc()),e)}disconnectedCallback(){this._keyboardManager.unbind("ArrowUp").unbind("ArrowDown").unbind("Enter").unbind("Tab").unbind("Escape")}isOptionsVisible(){return this._popover.opened}setLatestFocusedInputElement(e){this._latestFocusedInputElement=e}handleCodeInputFocus(){this.setLatestFocusedInputElement(this._textInputCodeValue)}handleDescriptionInputFocus(){this.setLatestFocusedInputElement(this._textInputDescriptionValue)}getRightIconElement(){var e,t;return this.ensureClearButtonVisible||this.value||(null===(e=this._textInputCodeValue)||void 0===e?void 0:e.value)||(null===(t=this._textInputDescriptionValue)||void 0===t?void 0:t.value)?i("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},i("ez-icon",{iconName:"close"})):null}getLeftIconElement(){return i("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handleSearchClick()},this.canShowLoadSpinDescription()?i("div",{class:"message__loading"}):i("ez-icon",{iconName:"search"}))}handleOnEzVisibilityChange(e){e.stopPropagation(),this.searchDescriptionIsOpen=e.detail}render(){return l.addIDInfoIfNotExists(this.el,"input"),i(r,null,i("div",{class:"ez-search-plus__container"},i("ez-text-input",{ref:e=>this._textInputCodeValue=e,class:{"ez-search-plus__code-input":!this.hideDescriptionInput,"ez-search-plus__code-input-no-border":!this.hideDescriptionInput,"ez-search-plus__code-input-full":this.hideDescriptionInput},"data-element-id":l.getInternalIDInfo("codeInput"),"data-slave-mode":"true",enabled:!this.disableCodeInput&&this.enabled,mode:this.mode,label:this.getCodLabel(),canShowError:this.canShowError,hasInvalid:!a.isEmpty(this.errorMessage),errorMessage:this.hideDescriptionInput?this.errorMessage:"",value:this.codeValue,onFocusout:()=>this.handleCodeInputFocusOut(),onFocus:()=>this.handleCodeInputFocus()},this.getLeftIconElement()),!this.hideDescriptionInput&&i("div",{class:"description-input-container"},i("ez-text-input",{ref:e=>this._textInputDescriptionValue=e,tabIndex:-1,class:"ez-search-plus__text-input","data-element-id":l.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode,value:this.descriptionValue,onInput:e=>this.handleTextInputChangeHandler(e),onFocus:()=>this.handleDescriptionInputFocus()},this.getRightIconElement()),i("ez-popover-plus",{ref:e=>this._popover=e,anchorElement:this.el,autoClose:!0,boxWidth:"fit-content",overlayType:"none",useAnchorSize:!0,onEzVisibilityChange:e=>this.handleOnEzVisibilityChange(e),"data-element-id":this.el.getAttribute("data-element-id")},i("ez-search-result-list",{ref:e=>this._searchList=e,showLoading:this.showLoading,visibleOptions:this.visibleOptions,value:this.value,showOptionValue:this.showOptionValue,onChangeValue:e=>this.handleSelectItem(e)})))))}get el(){return s(this)}static get watchers(){return{value:["observeValue"]}}};u.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__list-title--primary:var(--title--primary, #2B3A54);--ez-search__list-text--primary:var(--text--primary, #626e82);--ez-search__list-height:calc(var(--ez-search--font-size) + var(--ez-search--space--medium) + 4px);--ez-search__list-min-width:64px;--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);--ez-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-search__scrollbar--width:var(--space--medium, 12px);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)}.list-container{min-width:var(--ez-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-search--background-color--xlight);border-radius:var(--ez-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-search__scrollbar--color-clicked) var(--ez-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-search__scrollbar--color-background);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-search__scrollbar--color-default);border-radius:var(--ez-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size);line-height:var(--ez-search--line-height)}.item__label{font-weight:var(--ez-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-search__list-text--primary);font-weight:var(--ez-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-search__list-height)}.message__no-result{color:var(--ez-search__list-title--primary);font-family:var(--ez-search--font-family);font-size:var(--ez-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-search--background-medium)}.preselected{background-color:var(--background--medium)}.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}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-search-plus__text-input{--ez-text-input--border-top-left-radius:0px;--ez-text-input--border-bottom-left-radius:0px;outline:none}.ez-search-plus__code-input-no-border{--ez-text-input--border-top-right-radius:0px;--ez-text-input--border-bottom-right-radius:0px}.ez-search-plus__code-input{max-width:85px}.ez-search-plus__code-input-full{width:100%}.description-input-container{width:100%;outline:none}";export{u as ez_search_plus}
@@ -1 +0,0 @@
1
- import{r as s,c as e,h as i,H as t,g as a}from"./p-23a36bb6.js";import{StringUtils as r,KeyboardManager as l,ElementIDUtils as o}from"@sankhyalabs/core";import"./p-24582dd6.js";import{C as c}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as n}from"./p-69344c23.js";import{S as h}from"./p-5895e687.js";import"./p-47e4a8ce.js";const d=class{constructor(i){s(this,i),this.ezChange=e(this,"ezChange",7),this.SEARCH_DESCRIPTION_TIMEOUT=2e3,this.INTERVAL_TO_RETRY_ASYNC_VALUE=100,this._ignoreNextValue=!1,this.value=void 0,this.enabled=!0,this.disableCodeInput=!1,this.disableDescriptionInput=!1,this.label=void 0,this.hideDescriptionInput=!1,this.canShowError=!0,this.errorMessage=void 0,this.mode="regular",this.size="default",this.required=!1,this.contextProperties=void 0,this.optionLoader=void 0,this.showOptionValue=!0,this.stopPropagateEnterKeyEvent=!1,this.autoFocus=!1,this.showSelectedValue=!0,this.suppressEmptyOption=!1,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.suppressSearch=!1,this.suppressPreLoad=!0,this.ensureClearButtonVisible=!1,this.descriptionValue="",this.codeValue="",this.isLoadingDescription=!1,this.searchDescriptionIsOpen=!1,this.visibleOptions=void 0,this.showLoading=!0}async observeValue(s,e){var i;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const t=this.normalizeValueToCodeValue(s);if(t!==this.normalizeValueToCodeValue(e)){if(void 0===t)return this.codeValue=void 0,this.descriptionValue=void 0,void this.ezChange.emit(void 0);this.codeValue=t;try{if(this.descriptionValue=await this.normalizeCodeToDescriptionValue(s),null==this.descriptionValue)throw new Error("Valor não encontrado!")}catch(s){throw this._ignoreNextValue=!0,this.clearSearch(),console.warn("[EzSearchPlus] Erro ao obter descrição do registro.",s),"WarningException"===(null===(i=null==s?void 0:s.constructor)||void 0===i?void 0:i.name)&&(this.errorMessage=s.message),s}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),this.errorMessage=null}}async setFocus(s){var e;this.disableCodeInput?null===(e=this._textInputDescriptionValue)||void 0===e||e.setFocus(s):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(s):this._textInputCodeValue.setFocus(s)}async getValueAsync(){if(!this.isLoadingDescription){const s=this.buildCurrentValue();return new Promise((e=>e(s)))}return new Promise((s=>{let e=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(e);const i=this.buildCurrentValue();s(i)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var s,e;null===(s=this._textInputCodeValue)||void 0===s||s.setBlur(),null===(e=this._textInputDescriptionValue)||void 0===e||e.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async componentWillLoad(){this.i18n=await n(),this.value&&r.isEmpty(this.codeValue)&&await this.observeValue(this.value,void 0)}componentDidLoad(){c.applyVarsTextInput(this.el,this._textInputCodeValue),c.applyVarsTextInput(this.el,this._textInputDescriptionValue)}connectedCallback(){this.initKeyboardManager(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}clearSearch(){this.value=null,this.codeValue=null,this.descriptionValue=null,this.hideDescriptionInput||(this._textInputDescriptionValue.value=null)}async normalizeCodeToDescriptionValue(s){if(!s)return"";if("string"==typeof s)try{if((null==(s=JSON.parse(s))?void 0:s.value)&&!(null==s?void 0:s.label))return await this.loadDescriptionValueByCode(null==s?void 0:s.value)}catch(e){return await this.loadDescriptionValueByCode(s)}return"object"!=typeof s?await this.loadDescriptionValueByCode(s):null==s?void 0:s.label}normalizeValueToCodeValue(s){if(s){if("string"==typeof s)try{s=JSON.parse(s)}catch(e){return s}return"object"!=typeof s?"number"==typeof s?String(s):s:null==s?void 0:s.value}}async loadDescriptionValueByCode(s){if(!this.optionLoader)return console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined")),"";try{this.isLoadingDescription=!0;const e={mode:h.LOAD_DESCRIPTION,argument:s},i=await this.optionLoader(e);return i?Array.isArray(i)?i[0].label:i.label:""}finally{this.isLoadingDescription=!1}}handleCodeInputFocusOut(){this.cancelSelection(),this.codeValue!=this._textInputCodeValue.value&&(this.value=this._textInputCodeValue.value)}handleSearchClick(){this.loadAdvancedSearch()}async loadAdvancedSearch(){if(!this.optionLoader)return void console.warn(this.i18n("ez-search-plus.optionLoaderNotDefined"));const s={mode:h.ADVANCED,argument:""};let e;try{e=await this.optionLoader(s,this.contextProperties)}catch(s){}e&&(this.value=e)}buildCurrentValue(){if(!r.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(s){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const e=s.target.value;await this.debounceLoaderOptions(e)}async debounceLoaderOptions(s){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((e=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(s),e()}),this.SEARCH_DESCRIPTION_TIMEOUT)}))}updateKeyOption(s){return Object.assign(Object.assign({},s),{presentationValue:s.value,presentationLabel:s.label})}parseSearchOptions(s=[]){if(Array.isArray(s)){const e=s[0];return e?"label"in e||"value"in e?s.map((s=>this.updateKeyOption(s))):s:[]}return("label"in s||"value"in s)&&this.updateKeyOption(s),[s]}async processOptionsLoader(s){try{this.showLoading=!0;const e={mode:h.PREDICTIVE,argument:s},i=await this.optionLoader(e);this.visibleOptions=this.parseSearchOptions(i)}finally{this.showLoading=!1}}handleSelectItem(s){this.value=s.detail,this._popover.hide(),window.requestAnimationFrame((()=>{var s;null===(s=this._textInputDescriptionValue)||void 0===s||s.setFocus({selectText:!0})}))}async handleArrowUp(){this.isOptionsVisible()&&await this._classicSearchList.previousOption()}async handleArrowDown(){this.isOptionsVisible()&&await this._classicSearchList.nextOption()}async selectCurrentItem(){var s;await(null===(s=this._classicSearchList)||void 0===s?void 0:s.selectCurrentItem())}async cancelSelection(){var s,e,i;const t="object"==typeof this.value?null===(s=this.value)||void 0===s?void 0:s.label:"";this._textInputDescriptionValue&&t&&this._textInputDescriptionValue.value!=t&&(this._textInputDescriptionValue.value=t),await(null===(e=this._classicSearchList)||void 0===e?void 0:e.cancelSelection()),null===(i=this._popover)||void 0===i||i.hide()}async handleInputTab(){await this.cancelSelection()}async handleInputEsc(){var s;await this.cancelSelection(),await(null===(s=this._latestFocusedInputElement)||void 0===s?void 0:s.setFocus({selectText:!0}))}async initKeyboardManager(){this._keyboardManager=new l;const s={element:this.el,propagate:!0};this._keyboardManager.bind("ArrowUp",(()=>this.handleArrowUp()),Object.assign(Object.assign({},s),{propagate:!1})).bind("ArrowDown",(()=>this.handleArrowDown()),Object.assign(Object.assign({},s),{propagate:!1})).bind("Enter",(()=>this.selectCurrentItem()),Object.assign(Object.assign({},s),{propagate:!this.stopPropagateEnterKeyEvent})).bind("Tab",(()=>this.handleInputTab()),s).bind("Escape",(()=>this.handleInputEsc()),s)}disconnectedCallback(){this._keyboardManager.unbind("ArrowUp").unbind("ArrowDown").unbind("Enter").unbind("Tab").unbind("Escape")}isOptionsVisible(){return this._popover.opened}setLatestFocusedInputElement(s){this._latestFocusedInputElement=s}handleCodeInputFocus(){this.setLatestFocusedInputElement(this._textInputCodeValue)}handleDescriptionInputFocus(){this.setLatestFocusedInputElement(this._textInputDescriptionValue)}handleOnEzVisibilityChange(s){s.stopPropagation(),this.searchDescriptionIsOpen=s.detail}render(){var s,e;o.addIDInfoIfNotExists(this.el,"input");const a=!(this.ensureClearButtonVisible||this.value||(null===(s=this._textInputCodeValue)||void 0===s?void 0:s.value)||(null===(e=this._textInputDescriptionValue)||void 0===e?void 0:e.value));return i(t,null,i("div",{class:"ez-classic-search-plus__wrapper"},i("div",{class:"ez-classic-search-plus__label-container"},i("label",{title:this.label},this.label),this.required&&i("span",{class:"required-indicator"},"*")),i("div",{class:"ez-classic-search-plus__container"},i("ez-classic-input",{ref:s=>this._textInputCodeValue=s,class:{"ez-classic-search-plus__code-input":!this.hideDescriptionInput,"ez-classic-search-plus__code-input-no-border":!this.hideDescriptionInput,"ez-classic-search-plus__code-input-full":this.hideDescriptionInput},"data-element-id":o.getInternalIDInfo("codeInput"),"data-slave-mode":"true",enabled:!this.disableCodeInput&&this.enabled,size:this.size,label:null,errorMessage:this.hideDescriptionInput?this.errorMessage:"",value:this.codeValue,onFocusout:()=>this.handleCodeInputFocusOut(),onFocus:()=>this.handleCodeInputFocus(),leftIconName:"search",leftIconClickable:this.enabled,onIconClick:()=>this.handleSearchClick(),onEzChange:s=>s.stopPropagation(),state:this.errorMessage&&this.canShowError?"error":"default"}),!this.hideDescriptionInput&&i("div",{class:"description-input-container"},i("ez-classic-input",{ref:s=>this._textInputDescriptionValue=s,tabIndex:-1,class:{"ez-classic-search-plus__text-input":!0},"data-element-id":o.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:null,size:this.size,value:this.descriptionValue,onInput:s=>this.handleTextInputChangeHandler(s),onFocus:()=>this.handleDescriptionInputFocus(),rightIconName:a?"close":null,rightIconClickable:this.enabled,onIconClick:()=>this.clearSearch(),onEzChange:s=>s.stopPropagation(),state:this.errorMessage&&this.canShowError?"error":"default"}),i("ez-popover-plus",{ref:s=>this._popover=s,anchorElement:this.el,autoClose:!0,boxWidth:"fit-content",overlayType:"none",useAnchorSize:!0,onEzVisibilityChange:s=>this.handleOnEzVisibilityChange(s),"data-element-id":this.el.getAttribute("data-element-id")},i("ez-classic-search-result-list",{ref:s=>this._classicSearchList=s,showLoading:this.showLoading,visibleOptions:this.visibleOptions,value:this.value,showOptionValue:this.showOptionValue,onChangeValue:s=>this.handleSelectItem(s)})))),i("div",{class:"ez-classic-search-plus__error-container"},i("span",null,this.errorMessage))))}get el(){return a(this)}static get watchers(){return{value:["observeValue"]}}};d.style=":host{--ez-classic-search--height:42px;--ez-classic-search--width:100%;--ez-classic-search__icon--width:48px;--ez-classic-search--border-radius:var(--border--radius-medium, 12px);--ez-classic-search--border-radius-small:var(--border--radius-small, 6px);--ez-classic-search--font-size:var(--text--medium, 14px);--ez-classic-search--font-family:var(--font-pattern, Arial);--ez-classic-search--font-weight--large:var(--text-weight--large, 500);--ez-classic-search--font-weight--medium:var(--text-weight--medium, 400);--ez-classic-search--background-color--xlight:var(--background--xlight, #fff);--ez-classic-search--background-medium:var(--background--medium, #f0f3f7);--ez-classic-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-classic-search__input--background-color:var(--background--medium, #e0e0e0);--ez-classic-search__input--border:var(--border--medium, 2px solid);--ez-classic-search__input--border-color:var(--ez-classic-search__input--background-color);--ez-classic-search__input--focus--border-color:var(--color--primary, #008561);--ez-classic-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-classic-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-classic-search__input--error--border-color:#CC2936;--ez-classic-search__btn--color:var(--title--primary, #2B3A54);--ez-classic-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-classic-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-classic-search__label--color:var(--title--primary, #2B3A54);--ez-classic-search__list-title--primary:var(--title--primary, #2B3A54);--ez-classic-search__list-text--primary:var(--text--primary, #626e82);--ez-classic-search__list-height:calc(var(--ez-classic-search--font-size) + var(--ez-classic-search--space--medium) + 4px);--ez-classic-search__list-min-width:64px;--ez-classic-search--space--medium:var(--space--medium, 12px);--ez-classic-search--space--small:var(--space--small, 6px);--ez-classic-search__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-classic-search__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-classic-search__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-classic-search__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-classic-search__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-classic-search__scrollbar--width:var(--space--medium, 12px);--ez-classic-input--helptext-color:var(--color--ocean-green-1000, #00281D);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-classic-search--width);font-family:var(--font--pattern, Arial, sans-serif)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-classic-input__input--border-color:var(--color--strokes, #dce0e8);--ez-classic-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-classic-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-classic-search__list-min-width);overflow:auto;position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:350px;min-width:150px;background-color:var(--ez-classic-search--background-color--xlight);border-radius:var(--ez-classic-search--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000)}.list-options{margin-top:0px;box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--ez-classic-search__scrollbar--color-clicked) var(--ez-classic-search__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--scrollbar--background);width:var(--space--small);max-width:var(--space--small);min-width:var(--space--small);height:var(--space--small);max-height:var(--space--small);min-height:var(--space--small)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-classic-search__scrollbar--color-background);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-classic-search__scrollbar--color-default);border-radius:var(--ez-classic-search__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-classic-search__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-classic-search__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-classic-search--border-radius-small);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size);line-height:var(--ez-classic-search--line-height)}.item__label{font-weight:var(--ez-classic-search--font-weight--medium)}.item__label--bold{font-weight:var(--ez-classic-search--font-weight--large)}.item__value{text-align:center;color:var(--ez-classic-search__list-text--primary);font-weight:var(--ez-classic-search--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-classic-search__list-height)}.message__no-result{color:var(--ez-classic-search__list-title--primary);font-family:var(--ez-classic-search--font-family);font-size:var(--ez-classic-search--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-classic-search__list-title--primary);border-top:3px solid transparent}.item__list>li:hover{background-color:var(--ez-classic-search--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-classic-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-classic-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-classic-search__btn-disabled--color)}.btn:hover{color:var(--ez-classic-search__btn-hover--color)}.btn__close{visibility:hidden}ez-classic-input:hover .btn__close,ez-c-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@supports not (scrollbar-width: thin){.item{padding-right:8px}}.ez-classic-search-plus__container{display:flex;flex-grow:1;gap:3px}.ez-classic-search-plus__wrapper{display:flex;flex-direction:column;flex-grow:1;overflow:hidden}.ez-classic-search-plus__label-container{display:flex;flex-grow:1;gap:3px;overflow:hidden}.ez-classic-search-plus__label-container label{overflow:hidden;text-overflow:ellipsis;font-family:var(--font--pattern, Arial, sans-serif);font-size:var(--font-size--default, 14px);white-space:nowrap}.ez-classic-search-plus__text-input{--ez-classic-input--border-top-left-radius:0px;--ez-classic-input--border-bottom-left-radius:0px;outline:none}.ez-classic-search-plus__code-input-no-border{--ez-classic-input--border-top-right-radius:0px;--ez-classic-input--border-bottom-right-radius:0px}.ez-classic-search-plus__code-input{max-width:85px;--ez-classic-input--padding-inline:6px;--ez-classic-input--gap:6px}.ez-classic-search-plus__code-input-full{width:100%}.description-input-container{width:100%;outline:none}.required-indicator{font-size:var(--font--size--default, 14px);font-family:var(--font--pattern, 'Roboto');color:var(--color--red-600, #BD0025);margin-left:var(--space--4, 4px);vertical-align:top}.ez-classic-search-plus__error-container{display:flex;flex-grow:1;gap:3px;overflow:hidden}.ez-classic-search-plus__error-container span{font-size:var(--font-size--xsmall, 10px);line-height:var(--line-height--16, 16px);overflow:hidden;text-overflow:ellipsis;animation:ez-helptext-fadein 0.3s ease;color:var(--ez-classic-input--helptext-color)}";export{d as ez_classic_search_plus}