import { EventEmitter } from '../../stencil-public-runtime'; import { IIllustrationMessage, ISelectEvents, ISelectOption } from '../../types'; export interface ISelectOptionWithChildren extends ISelectOption { options?: ISelectOptionsWithChildren; } export type ISelectOptionsWithChildren = Record; export interface ISelectMultiOption extends Omit { options?: ISelectMultiOptions; } export type ISelectMultiOptions = Record; export interface IBuildSelectOptionsParams { options?: ISelectMultiOptions; allOptions?: ISelectMultiOptions; selectedOptions?: Record; highlightedOption?: string; hasAddItem?: boolean; createInputPlaceholder?: string; level?: number; maxSelectable?: number; selectedCount?: number; } export interface ISelectMultiOptionsConfig { /** (optional) The object with the dropdown options */ options?: ISelectMultiOptions; /** (optional) Externally filtered dropdown options. When defined, these override the default local search results. */ filteredOptions?: ISelectMultiOptions; /** (optional) The object with indexed by the dropdown labels and its selected value */ selectedOptions?: Record; /** (optional) The configuration for the "no data available" empty state illustration */ noDataAvailableConfig?: IIllustrationMessage; /** (optional) The configuration for the "no results found" empty state illustration */ noResultsFoundConfig?: IIllustrationMessage; /** (optional) If `false` the dropdown is not searchable. Default `true` */ searchable?: boolean; /** (optional) The list search text field placeholder */ searchPlaceholder?: string; /** (optional) The search value to display */ searchValue?: string; /** (optional) The debounce, in milliseconds, applied to the search value before the options are filtered locally. Set to `0` to filter on every keystroke. Defaults to `300`. */ searchDebounce?: number; /** (optional) If `true` dropdown items can be cleared */ selectionClearable?: boolean; /** (optional) The clear selection action text */ clearSelectionLabel?: string; /** (optional) The dropdown's min-height */ minHeight?: string; /** (optional) The dropdown's max-height */ maxHeight?: string; /** (optional) The dropdown's min-width */ minWidth?: string; /** (optional) The dropdown's max-width */ maxWidth?: string; /** (optional) If `true` the list has an action to select all items */ selectionAll?: boolean; /** (optional) The selection all action text */ selectAllLabel?: string; /** (optional) If `true` a selection counter is displayed */ counter?: boolean; /** (optional) The minimum amount of options required to display the search. Defaults to `15`. */ minSearchOptions?: number; /** (optional) If `true` the keyboard shortcuts can be used to navigate between the dropdown results. Default `false` */ shortcuts?: boolean; /** (optional) If `true` an add option will appear at the bottom of options list. Default: `false` */ canAddItems?: boolean; /** (optional) The create new option placeholder. Default: `Add a new option`*/ createOptionPlaceholder?: string; /** (optional) The create form input placeholder */ createInputPlaceholder?: string; /** (optional) Maximum number of items that can be selected */ maxSelectable?: number; /** (optional) If `true` a contiguous range can be selected by shift-clicking or by holding shift while navigating. Default `true` */ rangeSelection?: boolean; } export interface ISelectMultiOptionsEvents extends ISelectEvents { /** Emitted when the selected options change */ optionsSelected: EventEmitter>; /** Emitted when an option is selected */ optionSelected: EventEmitter; /** Emitted when the 'esc' key is pressed */ dismiss: EventEmitter; /** Emitted when a new option is created */ optionCreated: EventEmitter; }