| 18 | * Options for the {@link groupMultiselect} prompt. |
| 19 | */ |
| 20 | export interface GroupMultiSelectOptions<Value> extends CommonOptions { |
| 21 | /** |
| 22 | * The message or question shown to the user above the input. |
| 23 | */ |
| 24 | message: string; |
| 25 | |
| 26 | /** |
| 27 | * Grouped options to display. Each key is a group label, and each value is an array of options. |
| 28 | */ |
| 29 | options: Record<string, Option<Value>[]>; |
| 30 | |
| 31 | /** |
| 32 | * The initially selected option(s). |
| 33 | */ |
| 34 | initialValues?: Value[]; |
| 35 | |
| 36 | /** |
| 37 | * The maximum number of items/options to display at once. |
| 38 | */ |
| 39 | maxItems?: number; |
| 40 | |
| 41 | /** |
| 42 | * When `true` at least one option must be selected. |
| 43 | * @default true |
| 44 | */ |
| 45 | required?: boolean; |
| 46 | |
| 47 | /** |
| 48 | * The value the cursor should be positioned at initially. |
| 49 | */ |
| 50 | cursorAt?: Value; |
| 51 | |
| 52 | /** |
| 53 | * Whether entire groups can be selected at once. |
| 54 | * @default true |
| 55 | */ |
| 56 | selectableGroups?: boolean; |
| 57 | |
| 58 | /** |
| 59 | * Number of blank lines between groups. |
| 60 | * @default 0 |
| 61 | */ |
| 62 | groupSpacing?: number; |
| 63 | |
| 64 | /** |
| 65 | * Show keyboard instructions below the option list. |
| 66 | * @default true |
| 67 | */ |
| 68 | showInstructions?: boolean; |
| 69 | } |
| 70 | |
| 71 | /** |
| 72 | * The `groupMultiselect` prompt extends the {@link multiselect} prompt to allow |
nothing calls this directly
no outgoing calls
no test coverage detected