primevue-mirror/api-generator/components/treeselect.js

245 lines
6.7 KiB
JavaScript
Raw Normal View History

const TreeSelectProps = [
{
2022-09-14 14:26:41 +00:00
name: 'modelValue',
type: 'any',
default: 'null',
description: 'Value of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'options',
type: 'array',
default: 'null',
description: 'An array of treenodes.'
},
{
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-14 14:26:41 +00:00
name: 'placeholder',
type: 'string',
default: 'null',
description: 'Label to display when there are no selections.'
},
{
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.'
},
2024-01-31 08:01:02 +00:00
{
name: 'invalid',
type: 'boolean',
default: 'false',
description: 'When present, it specifies that the component should have invalid state style.'
},
{
name: 'variant',
type: 'string',
2024-02-02 13:26:27 +00:00
default: 'null',
2024-01-31 08:01:02 +00:00
description: 'Specifies the input variant of the component.'
},
{
2022-09-14 14:26:41 +00:00
name: 'tabindex',
type: 'string',
default: 'null',
description: 'Index of the element in tabbing order.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputId',
type: 'string',
default: 'null',
description: 'Identifier of the underlying input element.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputStyle',
type: 'object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Inline style of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'inputClass',
type: 'string | object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Style class of the input field.'
},
{
2022-09-14 14:26:41 +00:00
name: 'selectionMode',
type: 'string',
default: 'null',
description: 'Defines the selection mode, valid values "single", "multiple", and "checkbox".'
},
{
2022-09-14 14:26:41 +00:00
name: 'panelClass',
type: 'string | object',
2022-09-14 14:26:41 +00:00
default: 'null',
description: 'Style class of the overlay panel.'
},
{
2022-09-14 14:26:41 +00:00
name: 'appendTo',
type: 'string',
default: 'body',
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: '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-14 14:26:41 +00:00
name: 'display',
type: 'string',
default: 'comma',
description: 'Defines how the selected items are displayed, valid values are "comma" and "chip".'
},
{
2022-09-14 14:26:41 +00:00
name: 'metaKeySelection',
type: 'boolean',
default: 'true',
description:
'Defines how multiple items can be selected, when true metaKey needs to be pressed to select or unselect an item and when set to false selection of each item can be toggled individually. On touch enabled devices, metaKeySelection is turned off automatically.'
},
{
2022-09-14 14:26:41 +00:00
name: 'aria-labelledby',
type: 'string',
default: 'null',
description: 'Establishes relationships between the component and label(s) where its value should be one or more element IDs.'
},
{
2022-09-14 14:26:41 +00:00
name: 'aria-label',
type: 'string',
default: 'null',
description: 'Used to define a string that labels the element.'
2023-05-07 19:51:06 +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.'
}
];
const TreeSelectEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'change',
description: 'Callback to invoke on value change.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'event',
type: 'object',
description: 'Selected node keys'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'before-show',
description: 'Callback to invoke before the overlay is shown.'
},
{
2022-09-14 14:26:41 +00:00
name: 'before-hide',
description: 'Callback to invoke before the overlay is hidden.'
},
{
2022-09-14 14:26:41 +00:00
name: 'show',
description: 'Callback to invoke when the overlay is shown.'
},
{
2022-09-14 14:26:41 +00:00
name: 'hide',
description: 'Callback to invoke when the overlay is hidden.'
},
{
2022-09-14 14:26:41 +00:00
name: 'node-select',
description: 'Callback to invoke when a node is selected.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'node',
type: 'object',
description: 'Node instance'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'node-unselect',
description: 'Callback to invoke when a node is unselected.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'node',
type: 'object',
description: 'Node instance'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'node-expand',
description: 'Callback to invoke when a node is expanded.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'node',
type: 'object',
description: 'Node instance'
}
]
},
{
2022-09-14 14:26:41 +00:00
name: 'node-collapse',
description: 'Callback to invoke when a node is collapsed.',
arguments: [
{
2022-09-14 14:26:41 +00:00
name: 'node',
type: 'object',
description: 'Node instance'
}
]
}
];
const TreeSelectSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'value',
description: "Custom content for the item's value"
},
{
2022-09-14 14:26:41 +00:00
name: 'header',
description: "Custom content for the component's header"
},
{
2022-09-14 14:26:41 +00:00
name: 'footer',
description: "Custom content for the component's footer"
},
{
2022-09-14 14:26:41 +00:00
name: 'empty',
description: 'Custom content when there is no data to display'
},
{
name: 'triggericon',
2022-09-14 14:26:41 +00:00
description: 'Custom content for the dropdown indicator'
},
{
2024-05-27 09:24:31 +00:00
name: 'itemtoggleicon',
description: 'Custom item toggler icon template.'
},
{
name: 'itemcheckboxicon',
description: 'Custom item checkbox icon template.'
}
];
module.exports = {
treeselect: {
2022-09-14 14:26:41 +00:00
name: 'TreeSelect',
description: 'TreeSelect is a form component to choose from hierarchical data.',
props: TreeSelectProps,
events: TreeSelectEvents,
slots: TreeSelectSlots
}
};