2022-09-12 07:13:52 +00:00
const MultiSelectProps = [
{
2022-09-14 14:26:41 +00:00
name : 'modelValue' ,
type : 'any' ,
default : 'null' ,
description : 'Value of the component.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'options' ,
type : 'array' ,
default : 'null' ,
description : 'An array of selectitems to display as the available options.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'optionLabel' ,
type : 'string' ,
default : 'null' ,
description : 'Property name or getter function to use as the label of an option.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'optionValue' ,
type : 'string | function' ,
default : 'null' ,
description : 'Property name or getter function to use as the value of an option, defaults to the option itself when not defined.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'optionDisabled' ,
type : 'boolean | function' ,
default : 'null' ,
description : 'Property name or getter function to use as the disabled flag of an option, defaults to false when not defined.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'optionGroupLabel' ,
type : 'string | function' ,
default : 'null' ,
description : 'Property name or getter function to use as the label of an option group.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'optionGroupChildren' ,
type : 'string | function' ,
default : 'null' ,
description : 'Property name or getter function that refers to the children options of option group.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'scrollHeight' ,
type : 'string' ,
default : '200px' ,
description : 'Height of the viewport, a scrollbar is defined if height of list exceeds this value.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'placeholder' ,
type : 'string' ,
default : 'null' ,
description : 'Label to display when there are no selections.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'disabled' ,
type : 'boolean' ,
default : 'false' ,
description : 'When present, it specifies that the component should be disabled.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'inputId' ,
type : 'string' ,
default : 'null' ,
description : 'Identifier of the underlying input element.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'inputProps' ,
type : 'object' ,
default : 'null' ,
2023-08-01 14:01:12 +00:00
description : 'Used to pass all properties of the HTMLInputElement to the focusable input element inside the component.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'panelStyle' ,
type : 'object' ,
default : 'null' ,
description : 'Inline style of the overlay panel.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'panelClass' ,
type : 'string' ,
default : 'null' ,
description : 'Style class of the overlay panel.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'panelProps' ,
type : 'object' ,
default : 'null' ,
2023-08-01 14:01:12 +00:00
description : 'Used to pass all properties of the HTMLDivElement to the overlay panel.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filterInputProps' ,
type : 'object' ,
default : 'null' ,
2023-08-01 14:01:12 +00:00
description : 'Used to pass all properties of the HTMLInputElement to the filter input inside the overlay panel.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'closeButtonProps' ,
type : 'object' ,
default : 'null' ,
2023-08-01 14:01:12 +00:00
description : 'Used to pass all properties of the HTMLButtonElement to the close button inside the overlay panel.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'dataKey' ,
type : 'string' ,
default : 'null' ,
description : 'A property to uniquely identify an option.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filter' ,
type : 'boolean' ,
default : 'false' ,
description : 'When specified, displays a filter input at header.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filterPlaceholder' ,
type : 'string' ,
default : 'null' ,
description : 'Placeholder text to show when filter input is empty.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filterLocale' ,
type : 'string' ,
default : 'undefined' ,
2022-09-12 07:13:52 +00:00
description : "Locale to use in filtering. The default locale is the host environment's current locale."
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filterMatchMode' ,
type : 'string' ,
default : 'contains' ,
2022-09-12 07:13:52 +00:00
description : 'Defines the filtering algorithm to use when searching the options. Valid values are "contains" (default), "startsWith" and "endsWith"'
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filterFields' ,
type : 'array' ,
default : 'null' ,
description : 'Fields used when filtering the options, defaults to optionLabel.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'appendTo' ,
type : 'string' ,
default : 'body' ,
2022-09-12 07:13:52 +00:00
description : "A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself."
} ,
{
2022-09-14 14:26:41 +00:00
name : 'display' ,
type : 'string' ,
default : 'comma' ,
2022-09-12 07:13:52 +00:00
description : 'Defines how the selected items are displayed, valid values are "comma" and "chip".'
} ,
{
2022-09-14 14:26:41 +00:00
name : 'selectedItemsLabel' ,
type : 'string' ,
default : '{0} items selected' ,
description : 'Label to display after exceeding max selected labels.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'maxSelectedLabels' ,
type : 'number' ,
default : 'null' ,
description : 'Decides how many selected item labels to show at most.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'selectionLimit' ,
type : 'number' ,
default : 'null' ,
description : 'Maximum number of selectable items.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'showToggleAll' ,
type : 'boolean' ,
default : 'false' ,
description : 'Whether to show the header checkbox to toggle the selection of all items at once.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'loading' ,
type : 'boolean' ,
default : 'false' ,
description : 'Whether the multiselect is in loading state.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'loadingIcon' ,
type : 'string' ,
2023-04-04 12:41:18 +00:00
default : 'null' ,
2022-09-14 14:26:41 +00:00
description : 'Icon to display in loading state.'
2022-09-12 07:13:52 +00:00
} ,
2023-04-04 12:41:18 +00:00
{
name : 'checkboxIcon' ,
type : 'string' ,
default : 'null' ,
description : 'Icon to display in the checkboxes.'
} ,
{
name : 'closeIcon' ,
type : 'string' ,
default : 'null' ,
description : 'Icon to display in the dropdown close button.'
} ,
{
name : 'dropdownIcon' ,
type : 'string' ,
default : 'null' ,
description : 'Icon to display in the dropdown.'
} ,
{
name : 'filterIcon' ,
type : 'string' ,
default : 'null' ,
description : 'Icon to display in filter input.'
} ,
{
name : 'removeTokenIcon' ,
type : 'string' ,
default : 'null' ,
description : 'Icon to display in chip remove action.'
} ,
2022-09-12 07:13:52 +00:00
{
2022-09-14 14:26:41 +00:00
name : 'selectAll' ,
type : 'boolean' ,
default : 'false' ,
description : 'Whether all data is selected.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'resetFilterOnHide' ,
type : 'boolean' ,
default : 'false' ,
description : 'Clears the filter value when hiding the dropdown.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'virtualScrollerOptions' ,
type : 'object' ,
default : 'null' ,
description : 'Whether to use the virtualScroller feature. The properties of VirtualScroller component can be used like an object in it.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'autoOptionFocus' ,
type : 'boolean' ,
default : 'true' ,
description : 'Whether to focus on the first visible or selected element when the overlay panel is shown.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'autoFilterFocus' ,
type : 'boolean' ,
default : 'false' ,
description : 'Whether to focus on the filter element when the overlay panel is shown.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filterMessage' ,
type : 'string' ,
default : '{0} results are available' ,
description : 'Text to be displayed in hidden accessible field when filtering returns any results. Defaults to value from PrimeVue locale configuration.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'selectionMessage' ,
type : 'string' ,
default : '{0} items selected' ,
description : 'Text to be displayed in hidden accessible field when options are selected. Defaults to value from PrimeVue locale configuration.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'emptySelectionMessage' ,
type : 'string' ,
default : 'No selected item' ,
description : 'Text to be displayed in hidden accessible field when any option is not selected. Defaults to value from PrimeVue locale configuration.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'emptyFilterMessage' ,
type : 'string' ,
default : 'No results found' ,
description : 'Text to display when filtering does not return any results. Defaults to value from PrimeVue locale configuration.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'emptyMessage' ,
type : 'string' ,
default : 'No results found' ,
description : 'Text to display when there are no options available. Defaults to value from PrimeVue locale configuration.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'tabindex' ,
type : 'number' ,
default : '0' ,
description : 'Index of the element in tabbing order.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'aria-label' ,
type : 'string' ,
default : 'null' ,
description : 'Defines a string value that labels an interactive element.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'aria-labelledby' ,
type : 'string' ,
default : 'null' ,
description : 'Identifier of the underlying input element.'
2023-05-08 07:00:16 +00:00
} ,
{
name : 'pt' ,
type : 'any' ,
default : 'null' ,
2023-08-01 14:01:12 +00:00
description : 'Used to pass attributes to DOM elements inside the component.'
2023-07-06 13:20:37 +00:00
} ,
{
name : 'unstyled' ,
type : 'boolean' ,
default : 'false' ,
description : 'When enabled, it removes component related styles in the core.'
2022-09-12 07:13:52 +00:00
}
] ;
const MultiSelectEvents = [
{
2022-09-14 14:26:41 +00:00
name : 'change' ,
description : 'Callback to invoke on value change.' ,
2022-09-12 07:13:52 +00:00
arguments : [
{
2022-09-14 14:26:41 +00:00
name : 'event.originalEvent' ,
type : 'object' ,
description : 'Browser event'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'event.value' ,
type : 'array' ,
description : 'Selected option value'
2022-09-12 07:13:52 +00:00
}
]
} ,
{
2022-09-14 14:26:41 +00:00
name : 'focus' ,
description : 'Callback to invoke when component receives focus.' ,
2022-09-12 07:13:52 +00:00
arguments : [
{
2022-09-14 14:26:41 +00:00
name : 'event' ,
type : 'object' ,
description : 'Browser event'
2022-09-12 07:13:52 +00:00
}
]
} ,
{
2022-09-14 14:26:41 +00:00
name : 'blur' ,
description : 'Callback to invoke when component loses focus.' ,
2022-09-12 07:13:52 +00:00
arguments : [
{
2022-09-14 14:26:41 +00:00
name : 'event' ,
type : 'object' ,
description : 'Browser event'
2022-09-12 07:13:52 +00:00
}
]
} ,
{
2022-09-14 14:26:41 +00:00
name : 'before-show' ,
description : 'Callback to invoke before the overlay is shown.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'before-hide' ,
description : 'Callback to invoke before the overlay is hidden.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'show' ,
description : 'Callback to invoke when the overlay is shown.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'hide' ,
description : 'Callback to invoke when the overlay is hidden.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'filter' ,
description : 'Callback to invoke on filter input.' ,
2022-09-12 07:13:52 +00:00
arguments : [
{
2022-09-14 14:26:41 +00:00
name : 'event.originalEvent' ,
type : 'object' ,
description : 'Browser event'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'event.value' ,
type : 'string' ,
description : 'Filter value'
2022-09-12 07:13:52 +00:00
}
]
} ,
{
2022-09-14 14:26:41 +00:00
name : 'selectall-change' ,
description : 'Callback to invoke when all data is selected.' ,
2022-09-12 07:13:52 +00:00
arguments : [
{
2022-09-14 14:26:41 +00:00
name : 'event.originalEvent' ,
type : 'object' ,
description : 'Browser event'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'event.checked' ,
type : 'boolean' ,
description : 'Whether all data is selected.'
2022-09-12 07:13:52 +00:00
}
]
}
] ;
const MultiSelectSlots = [
{
2022-09-14 14:26:41 +00:00
name : 'value' ,
2023-04-04 12:41:18 +00:00
description : 'Custom content for the item value.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'chip' ,
description : 'Custom content for the chip display.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'indicator' ,
2023-04-04 12:41:18 +00:00
description : 'Custom content for the dropdown indicator.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'header' ,
2023-04-04 12:41:18 +00:00
description : "Custom content for the component's header."
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'footer' ,
2023-04-04 12:41:18 +00:00
description : "Custom content for the component's footer."
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'option' ,
2023-04-04 12:41:18 +00:00
description : "Custom content for the item's option."
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'optiongroup' ,
2023-04-04 12:41:18 +00:00
description : "Custom content for the item's optiongroup."
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'emptyfilter' ,
2023-04-04 12:41:18 +00:00
description : 'Custom content when there is no filtered data to display.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'empty' ,
2023-04-04 12:41:18 +00:00
description : 'Custom content when there is no data to display.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'content' ,
2023-04-04 12:41:18 +00:00
description : 'Custom content for the virtual scroller.'
2022-09-12 07:13:52 +00:00
} ,
{
2022-09-14 14:26:41 +00:00
name : 'loader' ,
2023-04-04 12:41:18 +00:00
description : 'Custom content for the virtual scroller loader items.'
} ,
{
name : 'removetokenicon' ,
description : 'Custom remove token icon template.'
} ,
{
name : 'headercheckboxicon' ,
description : 'Custom header checkbox icon template.'
} ,
{
name : 'filtericon' ,
description : 'Custom filter icon template.'
} ,
{
name : 'closeicon' ,
description : 'Custom close icon template.'
} ,
{
name : 'itemcheckboxicon' ,
description : 'Custom item checkbox icon template.'
2023-04-18 13:42:36 +00:00
} ,
{
name : 'loadingicon' ,
description : 'Custom loading icon template.'
} ,
{
name : 'dropdownicon' ,
description : 'Custom dropdown icon template.'
2022-09-12 07:13:52 +00:00
}
] ;
module . exports = {
multiselect : {
2022-09-14 14:26:41 +00:00
name : 'MultiSelect' ,
description : 'MultiSelect is used to multiple values from a list of options.' ,
2022-09-12 07:13:52 +00:00
props : MultiSelectProps ,
events : MultiSelectEvents ,
slots : MultiSelectSlots
}
} ;