declare namespace esSelectGlobalType { export interface keyConfig { labelKey: string valueKey: string disabledKey: string } export interface esSelectProps { modelValue: string | number source: [] placeholder: string filterable: boolean keyConfig: keyConfig } export type selectedValueType = string | number export type selectedLabelType = string | number export interface selectedValueItem { value: selectedValueType label: selectedLabelType } export interface rootProvide { props: esSelectProps containerEl: HTMLDivElement panelState: boolean setSourceList: ( list: any[], T: { keyConfig: keyConfig }, ) => void sourceListMap: { [key: string]: selectedValueItem } sourceList: selectedValueItem[] closePanelOnClickBody: (containerEl: HTMLDivElement) => () => void keyConfig: keyConfig selectedValue: selectedValueItem removeSelectedValue: (item: selectedValueItem) => void clearSelectedValue: () => void toggleSelect: ( item: selectedValueItem, P: { inputEl: HTMLDivElement }, ) => void addSelectedValue: (item: selectedValueItem) => void togglePanelState: (inputEl: HTMLInputElement) => void isSelected: (item: selectedValueItem) => boolean setInputEl: (el: HTMLInputElement) => void inputValue: string isFocus: boolean onInputChangeEvt: ( event: { target: HTMLInputElement }, O: { sourceList: selectedValueItem[] originalSourceList: selectedValueItem[] }, ) => void onInputFocusEvt: ( event: { target: HTMLInputElement }, O: { sourceList: selectedValueItem[] originalSourceList: selectedValueItem[] openPanel: rootProvide['openPanel'] }, ) => void onInputBlurEvt: (event: { target: HTMLInputElement }) => void originalSourceList: selectedValueItem[] openPanel: () => void closePanel: () => void inputEl: HTMLInputElement } }