import { ComponentOptionsMixin } from 'vue'; import { ComponentProvideOptions } from 'vue'; import { DefineComponent } from 'vue'; import { ExtractPropTypes } from 'vue'; import { Placement } from '@floating-ui/vue'; import { PropType } from 'vue'; import { PublicProps } from 'vue'; declare type __VLS_NonUndefinedable = T extends undefined ? never : T; declare type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; declare type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable>; } : { type: PropType; required: true; }; }; declare type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; declare type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; }; declare const _default: __VLS_WithTemplateSlots, { preventEmpty: boolean; allowEmpty: null; displayBy: string; searchBy: () => never[]; trackBy: string; placeholder: string; error: string; hint: string; icon: string; name: undefined; options: () => never[]; lazy: undefined; modelValue: () => never[]; value: null; hideSearch: boolean; searchable: null; preserveSearchTerm: boolean; disableFiltering: boolean; single: boolean; noTruncate: boolean; loading: boolean; searchLoading: boolean; selectItemType: string; hideCheck: boolean; searchPlaceholder: string; onSearch: undefined; useFuzzySearch: boolean; menuPlacement: string; enableTeleport: boolean; teleportTo: string; }>>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "update:model-value": (selectedOptions: any) => void; clear: () => void; add: (optionAdded: any) => void; remove: (optionRemoved: any, index: number) => void; opened: () => void; closed: (selectedOptions: any) => void; }, string, PublicProps, Readonly, { preventEmpty: boolean; allowEmpty: null; displayBy: string; searchBy: () => never[]; trackBy: string; placeholder: string; error: string; hint: string; icon: string; name: undefined; options: () => never[]; lazy: undefined; modelValue: () => never[]; value: null; hideSearch: boolean; searchable: null; preserveSearchTerm: boolean; disableFiltering: boolean; single: boolean; noTruncate: boolean; loading: boolean; searchLoading: boolean; selectItemType: string; hideCheck: boolean; searchPlaceholder: string; onSearch: undefined; useFuzzySearch: boolean; menuPlacement: string; enableTeleport: boolean; teleportTo: string; }>>> & Readonly<{ onRemove?: ((optionRemoved: any, index: number) => any) | undefined; "onUpdate:model-value"?: ((selectedOptions: any) => any) | undefined; onClear?: (() => any) | undefined; onAdd?: ((optionAdded: any) => any) | undefined; onOpened?: (() => any) | undefined; onClosed?: ((selectedOptions: any) => any) | undefined; }>, { lazy: () => any[]; error: string; name: string; placeholder: string; icon: string | boolean; trackBy: string; hint: string; preventEmpty: boolean; allowEmpty: string | boolean | null; displayBy: string; searchBy: string[]; options: any[] | readonly any[]; modelValue: any; value: any; hideSearch: boolean; searchable: string | boolean | null; preserveSearchTerm: boolean; disableFiltering: boolean; single: boolean; noTruncate: boolean; loading: boolean; searchLoading: boolean; selectItemType: string; hideCheck: boolean; searchPlaceholder: string; onSearch: (searchTerm: string) => void | Promise; useFuzzySearch: boolean; menuPlacement: Placement; enableTeleport: boolean; teleportTo: string | HTMLElement; }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Readonly<{ /** * Selected value(s) custom text. Exposes the option object and remove function. */ selected(props: { /** * The selected option object. */ option: Option_2; /** * Function to remove the selected option from the selection. */ onRemove: () => void; /** * Class to apply to the selected chip. */ chipSelectedClass: string; }): unknown; /** * Select custom option text. Exposes the option object */ option(props: { /** * Option The option instance for this list item. */ option: Option_2; }): unknown; /** * Slot for when there are no options available. */ 'no-options'(): unknown; /** * Slot to display a helpful hint message below the select field. */ hint(): unknown; }> & { /** * Selected value(s) custom text. Exposes the option object and remove function. */ selected(props: { /** * The selected option object. */ option: Option_2; /** * Function to remove the selected option from the selection. */ onRemove: () => void; /** * Class to apply to the selected chip. */ chipSelectedClass: string; }): unknown; /** * Select custom option text. Exposes the option object */ option(props: { /** * Option The option instance for this list item. */ option: Option_2; }): unknown; /** * Slot for when there are no options available. */ 'no-options'(): unknown; /** * Slot to display a helpful hint message below the select field. */ hint(): unknown; }>; export default _default; declare interface FieldProps { /** * Adds spacing under the field that is consistent whether hint/error text is displayed. */ addBottomSpace?: boolean; /** * Error text to display. Replaces `hintText` (if provided) & adds error styling. */ errorText?: string; /** * Displays text below the input; hidden when the isReadOnly prop is truthy. */ hintText?: string; /** * ID for the Label and Input; must be unique */ id?: string; /** * ID for the error text element; useful for aria-errormessage */ errorId?: string; /** * Whether it's a readonly field. */ isReadOnly?: boolean; /** * Whether the field is required. */ isRequired?: boolean; /** * Label to render above the input. */ label?: string; /** * Show "(optional)" to the right of the label text */ showOptionalInLabel?: boolean; /** * Indicates whether the label should be visually hidden (screen reader only). */ isLabelSrOnly?: boolean; /** * Indicates wheter the field is a fieldset or not */ fieldset?: boolean; /** * Indicates whether the field is disabled. */ isDisabled?: boolean; /** * Indicates whether the field is disabled. * * @deprecated Use `isDisabled` instead. */ disabled?: boolean; } declare type Option_2 = any; declare type SelectedOptions = Option_2 | Option_2[]; export declare interface SelectProps extends FieldProps { /** * If there is only 1 option selected, it prevents that option from being de-selected */ preventEmpty?: boolean; /** * @deprecated The `allowEmpty` prop is no longer supported; use `preventEmpty` instead. */ allowEmpty?: string | boolean | null; /** * If `options` are an object, this is what prop to use for display. */ displayBy?: string; /** * List of one or more fields to search on. When empty, displayBy will be used */ searchBy?: string[]; /** * Default field to track selected options by. */ trackBy?: string; /** * Placeholder text. */ placeholder?: string; /** * @deprecated Use the `error-text` prop instead */ error?: string; /** * @deprecated Use the `hint-text` prop instead */ hint?: string; /** * Sets a custom icon. */ icon?: string | boolean; /** * Sets a name attribute on the native (hidden) select element * * Setting the default value to `undefined` so the attribute isn't rendered if not explicitly provided to ensure backwards compatibility with MP django forms */ name?: string; /** * The list of all options to select from. */ options?: Option_2[] | readonly Option_2[]; /** * Lazily evaluate and set component `options`. Will execute upon user mouseover. */ lazy?: () => Option_2[]; /** * Sets the currently-selected value(s) for the component. * Accepts an array of Objects, or a single Object (if `single` is true), or a string */ modelValue?: SelectedOptions; /** * @deprecated Use :model-value or v-model instead of :value. */ value?: SelectedOptions | null; /** * Hides the search input */ hideSearch?: boolean; /** * @deprecated The `searchable` prop is no longer supported; Use `hideSearch` instead. */ searchable?: string | boolean | null; /** * If true, prevents the search term from being cleared when the drawer is dismissed. */ preserveSearchTerm?: boolean; /** * Prevents the options from being filtered when the search term changes. * Allows the parent to filter the options. */ disableFiltering?: boolean; /** * Functions as a single select, if true */ single?: boolean; /** * Prevents the Selected Option from being truncated, if true */ noTruncate?: boolean; /** * On an ajaxed request when the dropdown is open, we may be experiencing slower load times. * This flag will drop a loader into the dropdown. Note: This has never been design reviewed. */ loading?: boolean; /** * @deprecated Instead, use the `@search` event (the onSearch prop) and ensure its event handler returns a Promise that resolves after the search is complete. */ searchLoading?: boolean; /** * In the selection text we use this to give more visual distinction to what type of item(s) are selected * E.g. 2 customers selected. An empty string will result in `2 selected`. */ selectItemType?: string; /** * Hides the "check" icon if truthy */ hideCheck?: boolean; searchPlaceholder?: string; /** * Equivalent to emitting a "search" event, except this prop can be used to populate the list of `options` using an HTTP request because a prop's return value can be received and awaited, unlike an event. * * **Tip:** to show a loading indicator while searching, return a Promise that resolves after the search is complete. * * **Warning:** the search input is debounced so there is no need to debounce this function. */ onSearch?: (searchTerm: string) => Promise | void; /** * Uses the "fuzzy search" algorithm when searching, if true */ useFuzzySearch?: boolean; /** * Sets the placement of the dropdown * @default 'bottom-start' */ menuPlacement?: Placement; /** * Enables teleporting the dropdown * @default false */ enableTeleport?: boolean; /** * The selector or element to which the dropdown should be teleported * @default `'#stash-menus-mount-node'` */ teleportTo?: string | HTMLElement; } export { }