fe08b7825225f6c15bde54c006516d6fde85197af1ad684ef50e5746c7ff4d58e82c6175c6b353a25d3102393ad2b1022f177deb85db262cbd52bfa94c31f3 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import type { Option, OptionType, SelectStates } from './select.types';
  2. import type { SelectV2Props } from './token';
  3. import type { SelectV2EmitFn } from './defaults';
  4. import type { TooltipInstance } from 'element-plus/es/components/tooltip';
  5. import type { SelectDropdownInstance } from './select-dropdown';
  6. declare const useSelect: (props: SelectV2Props, emit: SelectV2EmitFn) => {
  7. inputId: import("vue").Ref<string | undefined>;
  8. collapseTagSize: import("vue").ComputedRef<"default" | "small">;
  9. currentPlaceholder: import("vue").ComputedRef<string>;
  10. expanded: import("vue").Ref<boolean>;
  11. emptyText: import("vue").ComputedRef<string | false | null>;
  12. popupHeight: import("vue").ComputedRef<number>;
  13. debounce: import("vue").ComputedRef<0 | 300>;
  14. allOptions: import("vue").ComputedRef<OptionType[]>;
  15. allOptionsValueMap: import("vue").ComputedRef<Map<any, any>>;
  16. filteredOptions: import("vue").Ref<({
  17. [x: string]: any;
  18. } | {
  19. [x: string]: any;
  20. created?: boolean | undefined;
  21. })[]>;
  22. iconComponent: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component) | ((new (...args: any[]) => (string | import("vue").Component) & {}) | (() => string | import("vue").Component))[], unknown, unknown> | undefined>;
  23. iconReverse: import("vue").ComputedRef<string | undefined>;
  24. tagStyle: import("vue").ComputedRef<{
  25. maxWidth: string;
  26. }>;
  27. collapseTagStyle: import("vue").ComputedRef<{
  28. maxWidth: string;
  29. }>;
  30. popperSize: import("vue").Ref<number>;
  31. dropdownMenuVisible: import("vue").WritableComputedRef<boolean>;
  32. hasModelValue: import("vue").ComputedRef<boolean>;
  33. shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
  34. selectDisabled: import("vue").ComputedRef<boolean>;
  35. selectSize: import("vue").ComputedRef<"" | "small" | "default" | "large">;
  36. needStatusIcon: import("vue").ComputedRef<boolean>;
  37. showClearBtn: import("vue").ComputedRef<boolean>;
  38. states: SelectStates;
  39. isFocused: import("vue").Ref<boolean>;
  40. nsSelect: {
  41. namespace: import("vue").ComputedRef<string>;
  42. b: (blockSuffix?: string) => string;
  43. e: (element?: string) => string;
  44. m: (modifier?: string) => string;
  45. be: (blockSuffix?: string, element?: string) => string;
  46. em: (element?: string, modifier?: string) => string;
  47. bm: (blockSuffix?: string, modifier?: string) => string;
  48. bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
  49. is: {
  50. (name: string, state: boolean | undefined): string;
  51. (name: string): string;
  52. };
  53. cssVar: (object: Record<string, string>) => Record<string, string>;
  54. cssVarName: (name: string) => string;
  55. cssVarBlock: (object: Record<string, string>) => Record<string, string>;
  56. cssVarBlockName: (name: string) => string;
  57. };
  58. nsInput: {
  59. namespace: import("vue").ComputedRef<string>;
  60. b: (blockSuffix?: string) => string;
  61. e: (element?: string) => string;
  62. m: (modifier?: string) => string;
  63. be: (blockSuffix?: string, element?: string) => string;
  64. em: (element?: string, modifier?: string) => string;
  65. bm: (blockSuffix?: string, modifier?: string) => string;
  66. bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
  67. is: {
  68. (name: string, state: boolean | undefined): string;
  69. (name: string): string;
  70. };
  71. cssVar: (object: Record<string, string>) => Record<string, string>;
  72. cssVarName: (name: string) => string;
  73. cssVarBlock: (object: Record<string, string>) => Record<string, string>;
  74. cssVarBlockName: (name: string) => string;
  75. };
  76. inputRef: import("vue").Ref<HTMLElement | undefined>;
  77. menuRef: import("vue").Ref<SelectDropdownInstance | undefined>;
  78. tagMenuRef: import("vue").Ref<HTMLElement | undefined>;
  79. tooltipRef: import("vue").Ref<TooltipInstance | undefined>;
  80. tagTooltipRef: import("vue").Ref<TooltipInstance | undefined>;
  81. selectRef: import("vue").Ref<HTMLElement | undefined>;
  82. wrapperRef: import("vue").ShallowRef<HTMLElement | undefined>;
  83. selectionRef: import("vue").Ref<HTMLElement | undefined>;
  84. prefixRef: import("vue").Ref<HTMLElement | undefined>;
  85. suffixRef: import("vue").Ref<HTMLElement | undefined>;
  86. collapseItemRef: import("vue").Ref<HTMLElement | undefined>;
  87. popperRef: import("vue").ComputedRef<HTMLElement | undefined>;
  88. validateState: import("vue").ComputedRef<"" | "error" | "success" | "validating">;
  89. validateIcon: import("vue").ComputedRef<any>;
  90. showTagList: import("vue").ComputedRef<Option[]>;
  91. collapseTagList: import("vue").ComputedRef<Option[]>;
  92. debouncedOnInputChange: import("lodash").DebouncedFunc<() => void>;
  93. deleteTag: (event: MouseEvent, option: Option) => void;
  94. getLabel: (option: Option) => any;
  95. getValue: (option: Option) => any;
  96. getDisabled: (option: Option) => any;
  97. getValueKey: (item: unknown) => any;
  98. getIndex: (option: Option) => any;
  99. handleClear: () => void;
  100. handleClickOutside: (event: Event) => void;
  101. handleDel: (e: KeyboardEvent) => void;
  102. handleEsc: () => void;
  103. focus: () => void;
  104. blur: () => void;
  105. handleMenuEnter: () => Promise<void>;
  106. handleResize: () => void;
  107. resetSelectionWidth: () => void;
  108. updateTooltip: () => void;
  109. updateTagTooltip: () => void;
  110. updateOptions: () => void;
  111. toggleMenu: () => void;
  112. scrollTo: (index: number) => void;
  113. onInput: (event: Event) => void;
  114. onKeyboardNavigate: (direction: "forward" | "backward", hoveringIndex?: number | undefined) => void;
  115. onKeyboardSelect: () => void;
  116. onSelect: (option: Option) => void;
  117. onHover: (idx?: number) => void;
  118. handleCompositionStart: (event: CompositionEvent) => void;
  119. handleCompositionEnd: (event: CompositionEvent) => void;
  120. handleCompositionUpdate: (event: CompositionEvent) => void;
  121. };
  122. export default useSelect;