@sankhyalabs/ezui 7.1.0-dev.22 → 7.1.0-dev.23
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.
- package/dist/cjs/classic-search-list_7.cjs.entry.js +2 -2
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-classic-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +2 -2
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
- package/dist/cjs/ez-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-rich-toolbar-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-plus.cjs.entry.js +1 -1
- package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +13 -14
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tag.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile-medium.cjs.entry.js +1 -1
- package/dist/cjs/ez-tile.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-underface.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +0 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{search-column-9654bf26.js → search-column-fbf680d7.js} +7 -2
- package/dist/collection/components/ez-split-button/ez-split-button.js +18 -13
- package/dist/collection/utils/searchColumn/search-column.js +6 -1
- package/dist/custom-elements/index.js +19 -15
- package/dist/esm/classic-search-list_7.entry.js +2 -2
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-avatar.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-classic-combo-box.entry.js +1 -1
- package/dist/esm/ez-classic-date-input.entry.js +1 -1
- package/dist/esm/ez-classic-date-time-input.entry.js +1 -1
- package/dist/esm/ez-classic-input.entry.js +1 -1
- package/dist/esm/ez-classic-number-input.entry.js +1 -1
- package/dist/esm/ez-classic-search-plus.entry.js +1 -1
- package/dist/esm/ez-classic-search.entry.js +1 -1
- package/dist/esm/ez-classic-text-area.entry.js +1 -1
- package/dist/esm/ez-classic-time-input.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +1 -1
- package/dist/esm/ez-dropdown.entry.js +1 -1
- package/dist/esm/ez-empty-card.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid-view.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +2 -2
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-link-builder_6.entry.js +1 -1
- package/dist/esm/ez-list-item.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-pagination.entry.js +1 -1
- package/dist/esm/ez-popover-core.entry.js +1 -1
- package/dist/esm/ez-popover-plus_3.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-progress-bar.entry.js +1 -1
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-rich-toolbar-item.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search-plus.entry.js +1 -1
- package/dist/esm/ez-search-result-list.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-skeleton.entry.js +1 -1
- package/dist/esm/ez-sortable-list.entry.js +1 -1
- package/dist/esm/ez-spinner.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +13 -14
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-tag-input.entry.js +1 -1
- package/dist/esm/ez-tag.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-tile-medium.entry.js +1 -1
- package/dist/esm/ez-tile.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-underface.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +1 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{search-column-c3df6285.js → search-column-40a78cac.js} +7 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-e275353b.entry.js → p-0248846f.entry.js} +1 -1
- package/dist/ezui/{p-34d596a3.entry.js → p-0625743b.entry.js} +1 -1
- package/dist/ezui/p-07fb22c3.entry.js +1 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-cf33bc48.entry.js → p-20c024f7.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/{p-169d460d.entry.js → p-2528e988.entry.js} +1 -1
- package/dist/ezui/{p-d57ea090.entry.js → p-26cd4c2e.entry.js} +1 -1
- package/dist/ezui/{p-06f1b8e4.entry.js → p-288631d1.entry.js} +1 -1
- package/dist/ezui/{p-e0380234.entry.js → p-2da9faf1.entry.js} +1 -1
- package/dist/ezui/{p-f32d5a82.entry.js → p-34d459e4.entry.js} +1 -1
- package/dist/ezui/{p-f7ca8634.entry.js → p-411c0222.entry.js} +1 -1
- package/dist/ezui/{p-87739608.entry.js → p-44183c39.entry.js} +1 -1
- package/dist/ezui/{p-2c123fdf.entry.js → p-4af745e1.entry.js} +1 -1
- package/dist/ezui/{p-0820f8c3.entry.js → p-4c2a4435.entry.js} +1 -1
- package/dist/ezui/{p-fe0bca65.entry.js → p-4c76b365.entry.js} +1 -1
- package/dist/ezui/{p-4a876b8b.entry.js → p-4d30b703.entry.js} +1 -1
- package/dist/ezui/{p-4d909730.entry.js → p-4e576bb9.entry.js} +1 -1
- package/dist/ezui/{p-2fa490f1.entry.js → p-4e869617.entry.js} +1 -1
- package/dist/ezui/{p-55a9e4ba.entry.js → p-4f7ad3ee.entry.js} +1 -1
- package/dist/ezui/{p-3453dad5.entry.js → p-544605c4.entry.js} +1 -1
- package/dist/ezui/{p-05bcbe61.entry.js → p-556bf329.entry.js} +1 -1
- package/dist/ezui/{p-be2e39c5.entry.js → p-56565777.entry.js} +1 -1
- package/dist/ezui/{p-27c8a9b7.entry.js → p-57b68d43.entry.js} +1 -1
- package/dist/ezui/{p-12cc95dc.entry.js → p-5abb220b.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-c754774e.entry.js → p-6020f3d5.entry.js} +1 -1
- package/dist/ezui/{p-f0425f87.entry.js → p-619225ce.entry.js} +1 -1
- package/dist/ezui/{p-51e34317.entry.js → p-6369a0cd.entry.js} +1 -1
- package/dist/ezui/{p-81a98a7c.entry.js → p-679a2942.entry.js} +1 -1
- package/dist/ezui/{p-29341f74.js → p-6a794336.js} +1 -1
- package/dist/ezui/{p-458027b5.entry.js → p-6ac056d7.entry.js} +1 -1
- package/dist/ezui/{p-0b531233.entry.js → p-6d596a5a.entry.js} +1 -1
- package/dist/ezui/{p-1723f728.entry.js → p-6f77a359.entry.js} +1 -1
- package/dist/ezui/{p-82e1d7fc.entry.js → p-7134726a.entry.js} +1 -1
- package/dist/ezui/{p-e039e049.entry.js → p-729bd1be.entry.js} +1 -1
- package/dist/ezui/{p-70f30bfe.entry.js → p-7953ecb9.entry.js} +1 -1
- package/dist/ezui/{p-636ea910.entry.js → p-7edc3ef7.entry.js} +1 -1
- package/dist/ezui/{p-e195eaad.entry.js → p-7f792043.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/{p-75443a91.entry.js → p-8e5f1c74.entry.js} +1 -1
- package/dist/ezui/{p-78e975b4.entry.js → p-91c9d50e.entry.js} +1 -1
- package/dist/ezui/{p-05e68ab3.entry.js → p-93e1c917.entry.js} +1 -1
- package/dist/ezui/{p-0d393a5d.entry.js → p-951b32a1.entry.js} +1 -1
- package/dist/ezui/{p-0ba284cd.entry.js → p-97312709.entry.js} +1 -1
- package/dist/ezui/{p-d3aca6aa.entry.js → p-987185c4.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/{p-bc693db6.entry.js → p-a0bf1fc7.entry.js} +1 -1
- package/dist/ezui/{p-27421015.entry.js → p-a0f51b99.entry.js} +1 -1
- package/dist/ezui/{p-9bcfa689.entry.js → p-a3075f52.entry.js} +1 -1
- package/dist/ezui/{p-f26b97e9.entry.js → p-a3ada561.entry.js} +1 -1
- package/dist/ezui/{p-71b341cc.entry.js → p-a3bad8f8.entry.js} +1 -1
- package/dist/ezui/{p-e94d3af5.entry.js → p-a4351519.entry.js} +1 -1
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/{p-534209bf.entry.js → p-a872c642.entry.js} +1 -1
- package/dist/ezui/{p-e963cb3f.entry.js → p-b0a716ef.entry.js} +1 -1
- package/dist/ezui/p-b36475f9.entry.js +1 -0
- package/dist/ezui/{p-9fb7131e.entry.js → p-b705b342.entry.js} +1 -1
- package/dist/ezui/{p-f1b54699.entry.js → p-b8078832.entry.js} +1 -1
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-75e8862c.entry.js → p-c0ae79fa.entry.js} +1 -1
- package/dist/ezui/{p-75e650ff.entry.js → p-c56ee8c0.entry.js} +1 -1
- package/dist/ezui/{p-25748a4e.entry.js → p-cd8be0c7.entry.js} +1 -1
- package/dist/ezui/{p-24993171.entry.js → p-ce0a0036.entry.js} +1 -1
- package/dist/ezui/{p-ce2614fc.entry.js → p-cfa26133.entry.js} +1 -1
- package/dist/ezui/{p-c96e536d.entry.js → p-d2645bdf.entry.js} +1 -1
- package/dist/ezui/{p-a9432878.entry.js → p-d6742c1e.entry.js} +1 -1
- package/dist/ezui/{p-770cf2b8.entry.js → p-d6f50207.entry.js} +1 -1
- package/dist/ezui/p-d8cc640d.entry.js +1 -0
- package/dist/ezui/{p-9d515e5b.entry.js → p-df802548.entry.js} +1 -1
- package/dist/ezui/{p-892e7326.entry.js → p-e2689b33.entry.js} +1 -1
- package/dist/ezui/{p-e0fd2ce5.entry.js → p-e2972977.entry.js} +1 -1
- package/dist/ezui/{p-181cb82f.entry.js → p-e3a42f47.entry.js} +1 -1
- package/dist/ezui/{p-29f0de90.entry.js → p-e3cd5080.entry.js} +1 -1
- package/dist/ezui/{p-4df2edb5.entry.js → p-e493ad57.entry.js} +1 -1
- package/dist/ezui/{p-000159dc.entry.js → p-e75c7a23.entry.js} +1 -1
- package/dist/ezui/{p-e9b409c1.entry.js → p-e7a7c594.entry.js} +1 -1
- package/dist/ezui/{p-b21efe83.entry.js → p-e8c57463.entry.js} +1 -1
- package/dist/ezui/{p-35e3715c.entry.js → p-ef8bd3e8.entry.js} +1 -1
- package/dist/ezui/{p-980f1f18.entry.js → p-f34ec732.entry.js} +1 -1
- package/dist/ezui/{p-a6ea8da3.entry.js → p-f5552540.entry.js} +1 -1
- package/dist/ezui/{p-44b39e81.entry.js → p-fa6732f2.entry.js} +1 -1
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -2
- package/package.json +1 -1
- package/dist/ezui/p-14d6aeb8.entry.js +0 -1
- package/dist/ezui/p-2b51d5a9.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-8f7373ab.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as e,H as t,g as a}from"./p-e4c7eb39.js";import{StringUtils as r,KeyboardManager as l,ElementIDUtils as c}from"@sankhyalabs/core";import"./p-9825c1d2.js";import{C as o}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as n}from"./p-c178730b.js";import{S as h}from"./p-5895e687.js";import"./p-47e4a8ce.js";const d=class{constructor(e){s(this,e),this.ezChange=i(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,i){var e;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const t=this.normalizeValueToCodeValue(s);if(t!==this.normalizeValueToCodeValue(i)){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===(e=null==s?void 0:s.constructor)||void 0===e?void 0:e.name)&&(this.errorMessage=s.message),s}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),this.errorMessage=null}}async setFocus(s){var i;this.disableCodeInput?null===(i=this._textInputDescriptionValue)||void 0===i||i.setFocus(s):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(s):this._textInputCodeValue.setFocus(s)}async getValueAsync(){if(!this.isLoadingDescription){const s=this.buildCurrentValue();return new Promise((i=>i(s)))}return new Promise((s=>{let i=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(i);const e=this.buildCurrentValue();s(e)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var s,i;null===(s=this._textInputCodeValue)||void 0===s||s.setBlur(),null===(i=this._textInputDescriptionValue)||void 0===i||i.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(){o.applyVarsTextInput(this.el,this._textInputCodeValue),o.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(i){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(i){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 i={mode:h.LOAD_DESCRIPTION,argument:s},e=await this.optionLoader(i);return e?Array.isArray(e)?e[0].label:e.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 i;try{i=await this.optionLoader(s,this.contextProperties)}catch(s){}i&&(this.value=i)}buildCurrentValue(){if(!r.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(s){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const i=s.target.value;await this.debounceLoaderOptions(i)}async debounceLoaderOptions(s){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((i=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(s),i()}),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 i=s[0];return i?"label"in i||"value"in i?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 i={mode:h.PREDICTIVE,argument:s},e=await this.optionLoader(i);this.visibleOptions=this.parseSearchOptions(e)}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,i,e;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===(i=this._classicSearchList)||void 0===i?void 0:i.cancelSelection()),null===(e=this._popover)||void 0===e||e.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,i;c.addIDInfoIfNotExists(this.el,"input");const a=!(this.ensureClearButtonVisible||this.value||(null===(s=this._textInputCodeValue)||void 0===s?void 0:s.value)||(null===(i=this._textInputDescriptionValue)||void 0===i?void 0:i.value));return e(t,null,e("div",{class:"ez-classic-search-plus__wrapper"},e("div",{class:"ez-classic-search-plus__label-container"},e("label",{title:this.label},this.label),this.required&&e("span",{class:"required-indicator"},"*")),e("div",{class:"ez-classic-search-plus__container"},e("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":c.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()}),!this.hideDescriptionInput&&e("div",{class:"description-input-container"},e("ez-classic-input",{ref:s=>this._textInputDescriptionValue=s,tabIndex:-1,class:{"ez-classic-search-plus__text-input":!0},"data-element-id":c.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:null,errorMessage:this.errorMessage,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()}),e("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")},e("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)}))))))}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);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-classic-search--width)}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}";export{d as ez_classic_search_plus}
|
|
1
|
+
import{r as s,c as i,h as e,H as t,g as a}from"./p-23a36bb6.js";import{StringUtils as r,KeyboardManager as l,ElementIDUtils as c}from"@sankhyalabs/core";import"./p-9825c1d2.js";import{C as o}from"./p-ec7db713.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{i as n}from"./p-c178730b.js";import{S as h}from"./p-5895e687.js";import"./p-47e4a8ce.js";const d=class{constructor(e){s(this,e),this.ezChange=i(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,i){var e;if(this._ignoreNextValue)return void(this._ignoreNextValue=!1);const t=this.normalizeValueToCodeValue(s);if(t!==this.normalizeValueToCodeValue(i)){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===(e=null==s?void 0:s.constructor)||void 0===e?void 0:e.name)&&(this.errorMessage=s.message),s}this.value=this.buildCurrentValue(),this.ezChange.emit(this.value),this.errorMessage=null}}async setFocus(s){var i;this.disableCodeInput?null===(i=this._textInputDescriptionValue)||void 0===i||i.setFocus(s):this._latestFocusedInputElement?this._latestFocusedInputElement.setFocus(s):this._textInputCodeValue.setFocus(s)}async getValueAsync(){if(!this.isLoadingDescription){const s=this.buildCurrentValue();return new Promise((i=>i(s)))}return new Promise((s=>{let i=setInterval((()=>{if(!this.isLoadingDescription){clearInterval(i);const e=this.buildCurrentValue();s(e)}}),this.INTERVAL_TO_RETRY_ASYNC_VALUE)}))}async clearValue(){this.clearSearch()}async setBlur(){var s,i;null===(s=this._textInputCodeValue)||void 0===s||s.setBlur(),null===(i=this._textInputDescriptionValue)||void 0===i||i.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(){o.applyVarsTextInput(this.el,this._textInputCodeValue),o.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(i){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(i){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 i={mode:h.LOAD_DESCRIPTION,argument:s},e=await this.optionLoader(i);return e?Array.isArray(e)?e[0].label:e.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 i;try{i=await this.optionLoader(s,this.contextProperties)}catch(s){}i&&(this.value=i)}buildCurrentValue(){if(!r.isEmpty(this.codeValue))return{value:this.codeValue,label:this.descriptionValue}}async handleTextInputChangeHandler(s){this.searchDescriptionIsOpen||this._popover.showUnder(this.el);const i=s.target.value;await this.debounceLoaderOptions(i)}async debounceLoaderOptions(s){return this._debounceSearch&&clearTimeout(this._debounceSearch),new Promise((i=>{this._debounceSearch=setTimeout((async()=>{await this.processOptionsLoader(s),i()}),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 i=s[0];return i?"label"in i||"value"in i?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 i={mode:h.PREDICTIVE,argument:s},e=await this.optionLoader(i);this.visibleOptions=this.parseSearchOptions(e)}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,i,e;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===(i=this._classicSearchList)||void 0===i?void 0:i.cancelSelection()),null===(e=this._popover)||void 0===e||e.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,i;c.addIDInfoIfNotExists(this.el,"input");const a=!(this.ensureClearButtonVisible||this.value||(null===(s=this._textInputCodeValue)||void 0===s?void 0:s.value)||(null===(i=this._textInputDescriptionValue)||void 0===i?void 0:i.value));return e(t,null,e("div",{class:"ez-classic-search-plus__wrapper"},e("div",{class:"ez-classic-search-plus__label-container"},e("label",{title:this.label},this.label),this.required&&e("span",{class:"required-indicator"},"*")),e("div",{class:"ez-classic-search-plus__container"},e("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":c.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()}),!this.hideDescriptionInput&&e("div",{class:"description-input-container"},e("ez-classic-input",{ref:s=>this._textInputDescriptionValue=s,tabIndex:-1,class:{"ez-classic-search-plus__text-input":!0},"data-element-id":c.getInternalIDInfo("textInput"),"data-slave-mode":"true",enabled:!this.disableDescriptionInput&&this.enabled,label:null,errorMessage:this.errorMessage,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()}),e("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")},e("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)}))))))}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);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-classic-search--width)}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}";export{d as ez_classic_search_plus}
|