@angular/cdk-experimental 20.0.0-next.1 → 20.0.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/column-resize/index.d.ts +39 -4
- package/combobox/index.d.ts +3 -2
- package/deferred-content/index.d.ts +37 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +134 -61
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +19 -22
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +60 -0
- package/fesm2022/deferred-content.mjs.map +1 -0
- package/fesm2022/list-focus-Di7m_z_6.mjs +382 -0
- package/fesm2022/list-focus-Di7m_z_6.mjs.map +1 -0
- package/fesm2022/listbox.mjs +42 -17
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/option-f_gNslw8.mjs +367 -0
- package/fesm2022/option-f_gNslw8.mjs.map +1 -0
- package/fesm2022/{polyfill-ae40ec6f.mjs → polyfill-CXksG4af.mjs} +1 -1
- package/fesm2022/polyfill-CXksG4af.mjs.map +1 -0
- package/fesm2022/popover-edit.mjs +92 -65
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/scrolling.mjs +7 -7
- package/fesm2022/scrolling.mjs.map +1 -1
- package/fesm2022/selection.mjs +19 -19
- package/fesm2022/selection.mjs.map +1 -1
- package/fesm2022/table-scroll-container.mjs +8 -9
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/tabs-BunANY1M.mjs +176 -0
- package/fesm2022/tabs-BunANY1M.mjs.map +1 -0
- package/fesm2022/tabs.mjs +225 -0
- package/fesm2022/tabs.mjs.map +1 -0
- package/fesm2022/ui-patterns.mjs +14 -1
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/list-navigation.d-DfOSxsSp.d.ts +247 -0
- package/listbox/index.d.ts +30 -17
- package/listbox.d-QWPLmxRe.d.ts +193 -0
- package/package.json +13 -2
- package/popover-edit/index.d.ts +6 -4
- package/selection/index.d.ts +2 -1
- package/tabs/index.d.ts +128 -0
- package/tabs.d-BAo141mw.d.ts +110 -0
- package/ui-patterns/index.d.ts +3 -1
- package/fesm2022/option-d2bb1041.mjs +0 -607
- package/fesm2022/option-d2bb1041.mjs.map +0 -1
- package/fesm2022/polyfill-ae40ec6f.mjs.map +0 -1
- package/listbox.d-8e28229b.d.ts +0 -376
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"option-d2bb1041.mjs","sources":["../../../../../../src/cdk-experimental/ui-patterns/behaviors/event-manager/event-manager.ts","../../../../../../src/cdk-experimental/ui-patterns/behaviors/event-manager/keyboard-event-manager.ts","../../../../../../src/cdk-experimental/ui-patterns/behaviors/event-manager/pointer-event-manager.ts","../../../../../../src/cdk-experimental/ui-patterns/behaviors/list-selection/list-selection.ts","../../../../../../src/cdk-experimental/ui-patterns/behaviors/list-typeahead/list-typeahead.ts","../../../../../../src/cdk-experimental/ui-patterns/behaviors/list-navigation/list-navigation.ts","../../../../../../src/cdk-experimental/ui-patterns/behaviors/list-focus/list-focus.ts","../../../../../../src/cdk-experimental/ui-patterns/listbox/listbox.ts","../../../../../../src/cdk-experimental/ui-patterns/listbox/option.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * An event that supports modifier keys.\n *\n * Matches the native KeyboardEvent, MouseEvent, and TouchEvent.\n */\nexport interface EventWithModifiers extends Event {\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\n/**\n * Options that are applicable to all event handlers.\n *\n * This library has not yet had a need for stopPropagationImmediate.\n */\nexport interface EventHandlerOptions {\n stopPropagation: boolean;\n preventDefault: boolean;\n}\n\n/** A basic event handler. */\nexport type EventHandler<T extends Event> = (event: T) => void;\n\n/** A function that determines whether an event is to be handled. */\nexport type EventMatcher<T extends Event> = (event: T) => boolean;\n\n/** A config that specifies how to handle a particular event. */\nexport interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {\n matcher: EventMatcher<T>;\n handler: EventHandler<T>;\n}\n\n/** Bit flag representation of the possible modifier keys that can be present on an event. */\nexport enum ModifierKey {\n None = 0,\n Ctrl = 0b1,\n Shift = 0b10,\n Alt = 0b100,\n Meta = 0b1000,\n}\n\nexport type ModifierInputs = ModifierKey | ModifierKey[];\n\n/**\n * Abstract base class for all event managers.\n *\n * Event managers are designed to normalize how event handlers are authored and create a safety net\n * for common event handling gotchas like remembering to call preventDefault or stopPropagation.\n */\nexport abstract class EventManager<T extends Event> {\n protected configs: EventHandlerConfig<T>[] = [];\n abstract options: EventHandlerOptions;\n\n /** Runs the handlers that match with the given event. */\n handle(event: T): void {\n for (const config of this.configs) {\n if (config.matcher(event)) {\n config.handler(event);\n\n if (config.preventDefault) {\n event.preventDefault();\n }\n\n if (config.stopPropagation) {\n event.stopPropagation();\n }\n }\n }\n }\n\n /** Configures the event manager to handle specific events. (See subclasses for more). */\n abstract on(...args: [...unknown[]]): this;\n}\n\n/** Gets bit flag representation of the modifier keys present on the given event. */\nexport function getModifiers(event: EventWithModifiers): number {\n return (\n (+event.ctrlKey && ModifierKey.Ctrl) |\n (+event.shiftKey && ModifierKey.Shift) |\n (+event.altKey && ModifierKey.Alt) |\n (+event.metaKey && ModifierKey.Meta)\n );\n}\n\n/**\n * Checks if the given event has modifiers that are an exact match for any of the given modifier\n * flag combinations.\n */\nexport function hasModifiers(event: EventWithModifiers, modifiers: ModifierInputs): boolean {\n const eventModifiers = getModifiers(event);\n const modifiersList = Array.isArray(modifiers) ? modifiers : [modifiers];\n return modifiersList.some(modifiers => eventModifiers === modifiers);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SignalLike} from '../signal-like/signal-like';\nimport {\n EventHandler,\n EventHandlerOptions,\n EventManager,\n hasModifiers,\n ModifierInputs,\n ModifierKey,\n} from './event-manager';\n\n/**\n * Used to represent a keycode.\n *\n * This is used to match whether an events keycode should be handled. The ability to match using a\n * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.\n */\ntype KeyCode = string | SignalLike<string> | RegExp;\n\n/**\n * An event manager that is specialized for handling keyboard events. By default this manager stops\n * propagation and prevents default on all events it handles.\n */\nexport class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {\n options: EventHandlerOptions = {\n preventDefault: true,\n stopPropagation: true,\n };\n\n /** Configures this event manager to handle events with a specific key and no modifiers. */\n on(key: KeyCode, handler: EventHandler<T>): this;\n\n /** Configures this event manager to handle events with a specific modifer and key combination. */\n on(modifiers: ModifierInputs, key: KeyCode, handler: EventHandler<T>): this;\n\n on(...args: any[]) {\n const {modifiers, key, handler} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler: handler,\n matcher: event => this._isMatch(event, key, modifiers),\n ...this.options,\n });\n\n return this;\n }\n\n private _normalizeInputs(...args: any[]) {\n const key = args.length === 3 ? args[1] : args[0];\n const handler = args.length === 3 ? args[2] : args[1];\n const modifiers = args.length === 3 ? args[0] : ModifierKey.None;\n\n return {\n key: key as KeyCode,\n handler: handler as EventHandler<T>,\n modifiers: modifiers as ModifierInputs,\n };\n }\n\n private _isMatch(event: T, key: KeyCode, modifiers: ModifierInputs) {\n if (key instanceof RegExp) {\n return key.test(event.key);\n }\n\n const keyStr = typeof key === 'string' ? key : key();\n return keyStr.toLowerCase() === event.key.toLowerCase() && hasModifiers(event, modifiers);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n EventHandler,\n EventHandlerOptions,\n EventManager,\n hasModifiers,\n ModifierInputs,\n ModifierKey,\n} from './event-manager';\n\n/**\n * The different mouse buttons that may appear on a pointer event.\n */\nexport enum MouseButton {\n Main = 0,\n Auxiliary = 1,\n Secondary = 2,\n}\n\n/** An event manager that is specialized for handling pointer events. */\nexport class PointerEventManager<T extends PointerEvent> extends EventManager<T> {\n options: EventHandlerOptions = {\n preventDefault: false,\n stopPropagation: false,\n };\n\n /**\n * Configures this event manager to handle events with a specific modifer and mouse button\n * combination.\n */\n on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;\n\n /**\n * Configures this event manager to handle events with a specific mouse button and no modifiers.\n */\n on(modifiers: ModifierInputs, handler: EventHandler<T>): this;\n\n /**\n * Configures this event manager to handle events with the main mouse button and no modifiers.\n *\n * @param handler The handler function\n * @param options Options for whether to stop propagation or prevent default.\n */\n on(handler: EventHandler<T>): this;\n\n on(...args: any[]) {\n const {button, handler, modifiers} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler,\n matcher: event => this._isMatch(event, button, modifiers),\n ...this.options,\n });\n return this;\n }\n\n private _normalizeInputs(...args: any[]) {\n if (args.length === 3) {\n return {\n button: args[0] as MouseButton,\n modifiers: args[1] as ModifierInputs,\n handler: args[2] as EventHandler<T>,\n };\n }\n\n if (typeof args[0] === 'number' && typeof args[1] === 'function') {\n return {\n button: MouseButton.Main,\n modifiers: args[0] as ModifierInputs,\n handler: args[1] as EventHandler<T>,\n };\n }\n\n return {\n button: MouseButton.Main,\n modifiers: ModifierKey.None,\n handler: args[0] as EventHandler<T>,\n };\n }\n\n _isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs) {\n return button === (event.button ?? 0) && hasModifiers(event, modifiers);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {signal} from '@angular/core';\nimport {SignalLike, WritableSignalLike} from '../signal-like/signal-like';\nimport {ListNavigation, ListNavigationItem} from '../list-navigation/list-navigation';\n\n/** Represents an item in a collection, such as a listbox option, than can be selected. */\nexport interface ListSelectionItem extends ListNavigationItem {\n /** A unique identifier for the item. */\n id: SignalLike<string>;\n\n /** Whether an item is disabled. */\n disabled: SignalLike<boolean>;\n}\n\n/** Represents the required inputs for a collection that contains selectable items. */\nexport interface ListSelectionInputs<T extends ListSelectionItem> {\n /** The items in the list. */\n items: SignalLike<T[]>;\n\n /** Whether multiple items in the list can be selected at once. */\n multiselectable: SignalLike<boolean>;\n\n /** The ids of the current selected items. */\n selectedIds: WritableSignalLike<string[]>;\n\n /** The selection strategy used by the list. */\n selectionMode: SignalLike<'follow' | 'explicit'>;\n}\n\n/** Controls selection for a list of items. */\nexport class ListSelection<T extends ListSelectionItem> {\n /** The id of the most recently selected item. */\n previousSelectedId = signal<string | undefined>(undefined);\n\n /** The navigation controller of the parent list. */\n navigation: ListNavigation<T>;\n\n constructor(readonly inputs: ListSelectionInputs<T> & {navigation: ListNavigation<T>}) {\n this.navigation = inputs.navigation;\n }\n\n /** Selects the item at the current active index. */\n select(item?: T) {\n item = item ?? this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];\n\n if (item.disabled() || this.inputs.selectedIds().includes(item.id())) {\n return;\n }\n\n if (!this.inputs.multiselectable()) {\n this.deselectAll();\n }\n\n // TODO: Need to discuss when to drop this.\n this._anchor();\n this.inputs.selectedIds.update(ids => ids.concat(item.id()));\n }\n\n /** Deselects the item at the current active index. */\n deselect(item?: T) {\n item = item ?? this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];\n\n if (!item.disabled()) {\n this.inputs.selectedIds.update(ids => ids.filter(id => id !== item.id()));\n }\n }\n\n /** Toggles the item at the current active index. */\n toggle() {\n const item = this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];\n this.inputs.selectedIds().includes(item.id()) ? this.deselect() : this.select();\n }\n\n /** Toggles only the item at the current active index. */\n toggleOne() {\n const item = this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];\n this.inputs.selectedIds().includes(item.id()) ? this.deselect() : this.selectOne();\n }\n\n /** Selects all items in the list. */\n selectAll() {\n if (!this.inputs.multiselectable()) {\n return; // Should we log a warning?\n }\n\n for (const item of this.inputs.items()) {\n this.select(item);\n }\n\n this._anchor();\n }\n\n /** Deselects all items in the list. */\n deselectAll() {\n for (const item of this.inputs.items()) {\n this.deselect(item);\n }\n }\n\n /** Selects the items in the list starting at the last selected item. */\n selectFromPrevSelectedItem() {\n const prevSelectedId = this.inputs.items().findIndex(i => this.previousSelectedId() === i.id());\n this._selectFromIndex(prevSelectedId);\n }\n\n /** Selects the items in the list starting at the last active item. */\n selectFromActive() {\n this._selectFromIndex(this.inputs.navigation.prevActiveIndex());\n }\n\n /** Selects the items in the list starting at the given index. */\n private _selectFromIndex(index: number) {\n if (index === -1) {\n return;\n }\n\n const upper = Math.max(this.inputs.navigation.inputs.activeIndex(), index);\n const lower = Math.min(this.inputs.navigation.inputs.activeIndex(), index);\n\n for (let i = lower; i <= upper; i++) {\n this.select(this.inputs.items()[i]);\n }\n }\n\n /** Sets the selection to only the current active item. */\n selectOne() {\n this.deselectAll();\n this.select();\n }\n\n /** Sets the anchor to the current active index. */\n private _anchor() {\n const item = this.inputs.items()[this.inputs.navigation.inputs.activeIndex()];\n this.previousSelectedId.set(item.id());\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {signal} from '@angular/core';\nimport {SignalLike} from '../signal-like/signal-like';\nimport {ListNavigationItem, ListNavigation} from '../list-navigation/list-navigation';\n\n/**\n * Represents an item in a collection, such as a listbox option, than can be navigated to by\n * typeahead.\n */\nexport interface ListTypeaheadItem extends ListNavigationItem {\n /** The text used by the typeahead search. */\n searchTerm: SignalLike<string>;\n}\n\n/**\n * Represents the required inputs for a collection that contains items that can be navigated to by\n * typeahead.\n */\nexport interface ListTypeaheadInputs {\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay: SignalLike<number>;\n}\n\n/** Controls typeahead for a list of items. */\nexport class ListTypeahead<T extends ListTypeaheadItem> {\n /** A reference to the timeout for resetting the typeahead search. */\n timeout?: ReturnType<typeof setTimeout> | undefined;\n\n /** The navigation controller of the parent list. */\n navigation: ListNavigation<T>;\n\n /** Keeps track of the characters that typeahead search is being called with. */\n private _query = signal('');\n\n /** The index where that the typeahead search was initiated from. */\n private _startIndex = signal<number | undefined>(undefined);\n\n constructor(readonly inputs: ListTypeaheadInputs & {navigation: ListNavigation<T>}) {\n this.navigation = inputs.navigation;\n }\n\n /** Performs a typeahead search, appending the given character to the search string. */\n search(char: string) {\n if (char.length !== 1) {\n return;\n }\n\n if (this._startIndex() === undefined) {\n this._startIndex.set(this.navigation.inputs.activeIndex());\n }\n\n clearTimeout(this.timeout);\n this._query.update(q => q + char.toLowerCase());\n const item = this._getItem();\n\n if (item) {\n this.navigation.goto(item);\n }\n\n this.timeout = setTimeout(() => {\n this._query.set('');\n this._startIndex.set(undefined);\n }, this.inputs.typeaheadDelay() * 1000);\n }\n\n /**\n * Returns the first item whose search term matches the\n * current query starting from the the current anchor index.\n */\n private _getItem() {\n let items = this.navigation.inputs.items();\n const after = items.slice(this._startIndex()! + 1);\n const before = items.slice(0, this._startIndex()!);\n items = this.navigation.inputs.wrap() ? after.concat(before) : after; // TODO: Always wrap?\n items.push(this.navigation.inputs.items()[this._startIndex()!]);\n\n const focusableItems = [];\n for (const item of items) {\n if (this.navigation.isFocusable(item)) {\n focusableItems.push(item);\n }\n }\n\n return focusableItems.find(i => i.searchTerm().toLowerCase().startsWith(this._query()));\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {signal} from '@angular/core';\nimport {SignalLike, WritableSignalLike} from '../signal-like/signal-like';\n\n/** Represents an item in a collection, such as a listbox option, than can be navigated to. */\nexport interface ListNavigationItem {\n /** Whether an item is disabled. */\n disabled: SignalLike<boolean>;\n}\n\n/** Represents the required inputs for a collection that has navigable items. */\nexport interface ListNavigationInputs<T extends ListNavigationItem> {\n /** Whether focus should wrap when navigating. */\n wrap: SignalLike<boolean>;\n\n /** The items in the list. */\n items: SignalLike<T[]>;\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled: SignalLike<boolean>;\n\n /** The current index that has been navigated to. */\n activeIndex: WritableSignalLike<number>;\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation: SignalLike<'vertical' | 'horizontal'>;\n\n /** The direction that text is read based on the users locale. */\n textDirection: SignalLike<'rtl' | 'ltr'>;\n}\n\n/** Controls navigation for a list of items. */\nexport class ListNavigation<T extends ListNavigationItem> {\n /** The last index that was active. */\n prevActiveIndex = signal(0);\n\n constructor(readonly inputs: ListNavigationInputs<T>) {\n this.prevActiveIndex.set(inputs.activeIndex());\n }\n\n /** Navigates to the given item. */\n goto(item: T) {\n if (this.isFocusable(item)) {\n this.prevActiveIndex.set(this.inputs.activeIndex());\n const index = this.inputs.items().indexOf(item);\n this.inputs.activeIndex.set(index);\n }\n }\n\n /** Navigates to the next item in the list. */\n next() {\n this._advance(1);\n }\n\n /** Navigates to the previous item in the list. */\n prev() {\n this._advance(-1);\n }\n\n /** Navigates to the first item in the list. */\n first() {\n const item = this.inputs.items().find(i => this.isFocusable(i));\n\n if (item) {\n this.goto(item);\n }\n }\n\n /** Navigates to the last item in the list. */\n last() {\n const items = this.inputs.items();\n for (let i = items.length - 1; i >= 0; i--) {\n if (this.isFocusable(items[i])) {\n this.goto(items[i]);\n return;\n }\n }\n }\n\n /** Returns true if the given item can be navigated to. */\n isFocusable(item: T): boolean {\n return !item.disabled() || !this.inputs.skipDisabled();\n }\n\n /** Advances to the next or previous focusable item in the list based on the given delta. */\n private _advance(delta: 1 | -1) {\n const items = this.inputs.items();\n const itemCount = items.length;\n const startIndex = this.inputs.activeIndex();\n const step = (i: number) =>\n this.inputs.wrap() ? (i + delta + itemCount) % itemCount : i + delta;\n\n // If wrapping is enabled, this loop ultimately terminates when `i` gets back to `startIndex`\n // in the case that all options are disabled. If wrapping is disabled, the loop terminates\n // when the index goes out of bounds.\n for (let i = step(startIndex); i !== startIndex && i < itemCount && i >= 0; i = step(i)) {\n if (this.isFocusable(items[i])) {\n this.goto(items[i]);\n return;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SignalLike} from '../signal-like/signal-like';\nimport {ListNavigation, ListNavigationItem} from '../list-navigation/list-navigation';\n\n/** Represents an item in a collection, such as a listbox option, than may receive focus. */\nexport interface ListFocusItem extends ListNavigationItem {\n /** A unique identifier for the item. */\n id: SignalLike<string>;\n\n /** The html element that should receive focus. */\n element: SignalLike<HTMLElement>;\n}\n\n/** Represents the required inputs for a collection that contains focusable items. */\nexport interface ListFocusInputs<T extends ListFocusItem> {\n /** The focus strategy used by the list. */\n focusMode: SignalLike<'roving' | 'activedescendant'>;\n}\n\n/** Controls focus for a list of items. */\nexport class ListFocus<T extends ListFocusItem> {\n /** The navigation controller of the parent list. */\n navigation: ListNavigation<ListFocusItem>;\n\n constructor(readonly inputs: ListFocusInputs<T> & {navigation: ListNavigation<T>}) {\n this.navigation = inputs.navigation;\n }\n\n /** The id of the current active item. */\n getActiveDescendant(): String | undefined {\n if (this.inputs.focusMode() === 'roving') {\n return undefined;\n }\n return this.navigation.inputs.items()[this.navigation.inputs.activeIndex()].id();\n }\n\n /** The tabindex for the list. */\n getListTabindex(): -1 | 0 {\n return this.inputs.focusMode() === 'activedescendant' ? 0 : -1;\n }\n\n /** Returns the tabindex for the given item. */\n getItemTabindex(item: T): -1 | 0 {\n if (this.inputs.focusMode() === 'activedescendant') {\n return -1;\n }\n const index = this.navigation.inputs.items().indexOf(item);\n return this.navigation.inputs.activeIndex() === index ? 0 : -1;\n }\n\n /** Focuses the current active item. */\n focus() {\n if (this.inputs.focusMode() === 'activedescendant') {\n return;\n }\n\n const item = this.navigation.inputs.items()[this.navigation.inputs.activeIndex()];\n item.element().focus();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {ModifierKey as Modifier} from '../behaviors/event-manager/event-manager';\nimport {KeyboardEventManager} from '../behaviors/event-manager/keyboard-event-manager';\nimport {PointerEventManager} from '../behaviors/event-manager/pointer-event-manager';\nimport {OptionPattern} from './option';\nimport {ListSelection, ListSelectionInputs} from '../behaviors/list-selection/list-selection';\nimport {ListTypeahead, ListTypeaheadInputs} from '../behaviors/list-typeahead/list-typeahead';\nimport {ListNavigation, ListNavigationInputs} from '../behaviors/list-navigation/list-navigation';\nimport {ListFocus, ListFocusInputs} from '../behaviors/list-focus/list-focus';\nimport {computed} from '@angular/core';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\n\n/** The selection operations that the listbox can perform. */\ninterface SelectOptions {\n select?: boolean;\n toggle?: boolean;\n toggleOne?: boolean;\n selectOne?: boolean;\n selectAll?: boolean;\n selectFromAnchor?: boolean;\n selectFromActive?: boolean;\n}\n\n/** Represents the required inputs for a listbox. */\nexport type ListboxInputs = ListNavigationInputs<OptionPattern> &\n ListSelectionInputs<OptionPattern> &\n ListTypeaheadInputs &\n ListFocusInputs<OptionPattern> & {\n disabled: SignalLike<boolean>;\n };\n\n/** Controls the state of a listbox. */\nexport class ListboxPattern {\n /** Controls navigation for the listbox. */\n navigation: ListNavigation<OptionPattern>;\n\n /** Controls selection for the listbox. */\n selection: ListSelection<OptionPattern>;\n\n /** Controls typeahead for the listbox. */\n typeahead: ListTypeahead<OptionPattern>;\n\n /** Controls focus for the listbox. */\n focusManager: ListFocus<OptionPattern>;\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation: SignalLike<'vertical' | 'horizontal'>;\n\n /** Whether the listbox is disabled. */\n disabled: SignalLike<boolean>;\n\n /** The tabindex of the listbox. */\n tabindex = computed(() => this.focusManager.getListTabindex());\n\n /** The id of the current active item. */\n activedescendant = computed(() => this.focusManager.getActiveDescendant());\n\n /** Whether multiple items in the list can be selected at once. */\n multiselectable: SignalLike<boolean>;\n\n /** The number of items in the listbox. */\n setsize = computed(() => this.navigation.inputs.items().length);\n\n /** Whether the listbox selection follows focus. */\n followFocus = computed(() => this.inputs.selectionMode() === 'follow');\n\n /** The key used to navigate to the previous item in the list. */\n prevKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowUp';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key used to navigate to the next item in the list. */\n nextKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowDown';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The regexp used to decide if a key should trigger typeahead. */\n typeaheadRegexp = /^.$/; // TODO: Ignore spaces?\n\n /** The keydown event manager for the listbox. */\n keydown = computed(() => {\n const manager = new KeyboardEventManager();\n\n if (!this.followFocus()) {\n manager\n .on(this.prevKey, () => this.prev())\n .on(this.nextKey, () => this.next())\n .on('Home', () => this.first())\n .on('End', () => this.last())\n .on(this.typeaheadRegexp, e => this.search(e.key));\n }\n\n if (this.followFocus()) {\n manager\n .on(this.prevKey, () => this.prev({selectOne: true}))\n .on(this.nextKey, () => this.next({selectOne: true}))\n .on('Home', () => this.first({selectOne: true}))\n .on('End', () => this.last({selectOne: true}))\n .on(this.typeaheadRegexp, e => this.search(e.key, {selectOne: true}));\n }\n\n if (this.inputs.multiselectable()) {\n manager\n .on(Modifier.Shift, ' ', () => this._updateSelection({selectFromAnchor: true}))\n .on(Modifier.Shift, 'Enter', () => this._updateSelection({selectFromAnchor: true}))\n .on(Modifier.Shift, this.prevKey, () => this.prev({toggle: true}))\n .on(Modifier.Shift, this.nextKey, () => this.next({toggle: true}))\n .on(Modifier.Ctrl | Modifier.Shift, 'Home', () => this.first({selectFromActive: true}))\n .on(Modifier.Ctrl | Modifier.Shift, 'End', () => this.last({selectFromActive: true}))\n .on(Modifier.Ctrl, 'A', () => this._updateSelection({selectAll: true}));\n }\n\n if (!this.followFocus() && this.inputs.multiselectable()) {\n manager.on(' ', () => this._updateSelection({toggle: true}));\n manager.on('Enter', () => this._updateSelection({toggle: true}));\n }\n\n if (!this.followFocus() && !this.inputs.multiselectable()) {\n manager.on(' ', () => this._updateSelection({toggleOne: true}));\n manager.on('Enter', () => this._updateSelection({toggleOne: true}));\n }\n\n if (this.inputs.multiselectable() && this.followFocus()) {\n manager\n .on(Modifier.Ctrl, this.prevKey, () => this.prev())\n .on(Modifier.Ctrl, this.nextKey, () => this.next())\n .on(Modifier.Ctrl, 'Home', () => this.first()) // TODO: Not in spec but prob should be.\n .on(Modifier.Ctrl, 'End', () => this.last()); // TODO: Not in spec but prob should be.\n }\n\n return manager;\n });\n\n /** The pointerdown event manager for the listbox. */\n pointerdown = computed(() => {\n const manager = new PointerEventManager();\n\n if (this.inputs.multiselectable()) {\n manager\n .on(e => this.goto(e, {toggle: true}))\n .on(Modifier.Shift, e => this.goto(e, {selectFromActive: true}));\n } else {\n manager.on(e => this.goto(e, {toggleOne: true}));\n }\n\n return manager;\n });\n\n constructor(readonly inputs: ListboxInputs) {\n this.disabled = inputs.disabled;\n this.orientation = inputs.orientation;\n this.multiselectable = inputs.multiselectable;\n\n this.navigation = new ListNavigation(inputs);\n this.selection = new ListSelection({...inputs, navigation: this.navigation});\n this.typeahead = new ListTypeahead({...inputs, navigation: this.navigation});\n this.focusManager = new ListFocus({...inputs, navigation: this.navigation});\n }\n\n /** Handles keydown events for the listbox. */\n onKeydown(event: KeyboardEvent) {\n if (!this.disabled()) {\n this.keydown().handle(event);\n }\n }\n\n onPointerdown(event: PointerEvent) {\n if (!this.disabled()) {\n this.pointerdown().handle(event);\n }\n }\n\n /** Navigates to the first option in the listbox. */\n first(opts?: SelectOptions) {\n this.navigation.first();\n this.focusManager.focus();\n this._updateSelection(opts);\n }\n\n /** Navigates to the last option in the listbox. */\n last(opts?: SelectOptions) {\n this.navigation.last();\n this.focusManager.focus();\n this._updateSelection(opts);\n }\n\n /** Navigates to the next option in the listbox. */\n next(opts?: SelectOptions) {\n this.navigation.next();\n this.focusManager.focus();\n this._updateSelection(opts);\n }\n\n /** Navigates to the previous option in the listbox. */\n prev(opts?: SelectOptions) {\n this.navigation.prev();\n this.focusManager.focus();\n this._updateSelection(opts);\n }\n\n /** Navigates to the given item in the listbox. */\n goto(event: PointerEvent, opts?: SelectOptions) {\n const item = this._getItem(event);\n\n if (item) {\n this.navigation.goto(item);\n this.focusManager.focus();\n this._updateSelection(opts);\n }\n }\n\n /** Handles typeahead search navigation for the listbox. */\n search(char: string, opts?: SelectOptions) {\n this.typeahead.search(char);\n this.focusManager.focus();\n this._updateSelection(opts);\n }\n\n /** Handles updating selection for the listbox. */\n private _updateSelection(opts?: SelectOptions) {\n if (opts?.select) {\n this.selection.select();\n }\n if (opts?.toggle) {\n this.selection.toggle();\n }\n if (opts?.toggleOne) {\n this.selection.toggleOne();\n }\n if (opts?.selectOne) {\n this.selection.selectOne();\n }\n if (opts?.selectAll) {\n this.selection.selectAll();\n }\n if (opts?.selectFromAnchor) {\n this.selection.selectFromPrevSelectedItem();\n }\n if (opts?.selectFromActive) {\n this.selection.selectFromActive();\n }\n }\n\n private _getItem(e: PointerEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n\n const element = e.target.closest('[cdkoption]'); // TODO: Use a different identifier.\n return this.inputs.items().find(i => i.element() === element);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {computed} from '@angular/core';\nimport {ListSelection, ListSelectionItem} from '../behaviors/list-selection/list-selection';\nimport {ListTypeaheadItem} from '../behaviors/list-typeahead/list-typeahead';\nimport {ListNavigation, ListNavigationItem} from '../behaviors/list-navigation/list-navigation';\nimport {ListFocus, ListFocusItem} from '../behaviors/list-focus/list-focus';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\n\n/**\n * Represents the properties exposed by a listbox that need to be accessed by an option.\n * This exists to avoid circular dependency errors between the listbox and option.\n */\ninterface ListboxPattern {\n focusManager: ListFocus<OptionPattern>;\n selection: ListSelection<OptionPattern>;\n navigation: ListNavigation<OptionPattern>;\n}\n\n/** Represents the required inputs for an option in a listbox. */\nexport interface OptionInputs\n extends ListNavigationItem,\n ListSelectionItem,\n ListTypeaheadItem,\n ListFocusItem {\n listbox: SignalLike<ListboxPattern>;\n}\n\n/** Represents an option in a listbox. */\nexport class OptionPattern {\n /** A unique identifier for the option. */\n id: SignalLike<string>;\n\n /** The position of the option in the list. */\n index = computed(\n () =>\n this.listbox()\n .navigation.inputs.items()\n .findIndex(i => i.id() === this.id()) ?? -1,\n );\n\n /** Whether the option is selected. */\n selected = computed(() => this.listbox().selection.inputs.selectedIds().includes(this.id()));\n\n /** Whether the option is disabled. */\n disabled: SignalLike<boolean>;\n\n /** The text used by the typeahead search. */\n searchTerm: SignalLike<string>;\n\n /** A reference to the parent listbox. */\n listbox: SignalLike<ListboxPattern>;\n\n /** The tabindex of the option. */\n tabindex = computed(() => this.listbox().focusManager.getItemTabindex(this));\n\n /** The html element that should receive focus. */\n element: SignalLike<HTMLElement>;\n\n constructor(args: OptionInputs) {\n this.id = args.id;\n this.listbox = args.listbox;\n this.element = args.element;\n this.disabled = args.disabled;\n this.searchTerm = args.searchTerm;\n }\n}\n"],"names":["Modifier"],"mappings":";;AA0CA;AACA,IAAY,WAMX,CAAA;AAND,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,WAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ,CAAA;AACR,IAAA,WAAA,CAAA,WAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAU,CAAA;AACV,IAAA,WAAA,CAAA,WAAA,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E,CAAA;;IAGF,KAAK,GAAG,QAAQ,CACd,MACE,IAAI,CAAC,OAAO,EAAE;AACX,SAAA,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE;AACzB,SAAA,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAChD,CAAA;;IAGD,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;;AAG5F,IAAA,QAAQ,CAAA;;AAGR,IAAA,UAAU,CAAA;;AAGV,IAAA,OAAO,CAAA;;AAGP,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAA;;AAG5E,IAAA,OAAO,CAAA;AAEP,IAAA,WAAA,CAAY,IAAkB,EAAA;AAC5B,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;AACjB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;AAC3B,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;AAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAA;KACnC;AACD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polyfill-ae40ec6f.mjs","sources":["../../../../../../src/cdk-experimental/popover-edit/polyfill.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** closest implementation that is able to start from non-Element Nodes. */\nexport function closest(\n element: EventTarget | Element | null | undefined,\n selector: string,\n): Element | null {\n if (!(element instanceof Node)) {\n return null;\n }\n\n let curr: Node | null = element;\n while (curr != null && !(curr instanceof Element)) {\n curr = curr.parentNode;\n }\n\n return curr?.closest(selector) ?? null;\n}\n"],"names":[],"mappings":"AAQA;AACgB,SAAA,OAAO,CACrB,OAAiD,EACjD,QAAgB,EAAA;AAEhB,IAAA,IAAI,EAAE,OAAO,YAAY,IAAI,CAAC,EAAE;AAC9B,QAAA,OAAO,IAAI,CAAA;KACb;IAEA,IAAI,IAAI,GAAgB,OAAO,CAAA;IAC/B,OAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,YAAY,OAAO,CAAC,EAAE;AACjD,QAAA,IAAI,GAAG,IAAI,CAAC,UAAU,CAAA;KACxB;IAEA,OAAO,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAA;AACxC;;;;"}
|
package/listbox.d-8e28229b.d.ts
DELETED
|
@@ -1,376 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
|
|
3
|
-
type SignalLike<T> = () => T;
|
|
4
|
-
interface WritableSignalLike<T> extends SignalLike<T> {
|
|
5
|
-
set(value: T): void;
|
|
6
|
-
update(updateFn: (value: T) => T): void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Options that are applicable to all event handlers.
|
|
11
|
-
*
|
|
12
|
-
* This library has not yet had a need for stopPropagationImmediate.
|
|
13
|
-
*/
|
|
14
|
-
interface EventHandlerOptions {
|
|
15
|
-
stopPropagation: boolean;
|
|
16
|
-
preventDefault: boolean;
|
|
17
|
-
}
|
|
18
|
-
/** A basic event handler. */
|
|
19
|
-
type EventHandler<T extends Event> = (event: T) => void;
|
|
20
|
-
/** A function that determines whether an event is to be handled. */
|
|
21
|
-
type EventMatcher<T extends Event> = (event: T) => boolean;
|
|
22
|
-
/** A config that specifies how to handle a particular event. */
|
|
23
|
-
interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {
|
|
24
|
-
matcher: EventMatcher<T>;
|
|
25
|
-
handler: EventHandler<T>;
|
|
26
|
-
}
|
|
27
|
-
/** Bit flag representation of the possible modifier keys that can be present on an event. */
|
|
28
|
-
declare enum ModifierKey {
|
|
29
|
-
None = 0,
|
|
30
|
-
Ctrl = 1,
|
|
31
|
-
Shift = 2,
|
|
32
|
-
Alt = 4,
|
|
33
|
-
Meta = 8
|
|
34
|
-
}
|
|
35
|
-
type ModifierInputs = ModifierKey | ModifierKey[];
|
|
36
|
-
/**
|
|
37
|
-
* Abstract base class for all event managers.
|
|
38
|
-
*
|
|
39
|
-
* Event managers are designed to normalize how event handlers are authored and create a safety net
|
|
40
|
-
* for common event handling gotchas like remembering to call preventDefault or stopPropagation.
|
|
41
|
-
*/
|
|
42
|
-
declare abstract class EventManager<T extends Event> {
|
|
43
|
-
protected configs: EventHandlerConfig<T>[];
|
|
44
|
-
abstract options: EventHandlerOptions;
|
|
45
|
-
/** Runs the handlers that match with the given event. */
|
|
46
|
-
handle(event: T): void;
|
|
47
|
-
/** Configures the event manager to handle specific events. (See subclasses for more). */
|
|
48
|
-
abstract on(...args: [...unknown[]]): this;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Used to represent a keycode.
|
|
53
|
-
*
|
|
54
|
-
* This is used to match whether an events keycode should be handled. The ability to match using a
|
|
55
|
-
* string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.
|
|
56
|
-
*/
|
|
57
|
-
type KeyCode = string | SignalLike<string> | RegExp;
|
|
58
|
-
/**
|
|
59
|
-
* An event manager that is specialized for handling keyboard events. By default this manager stops
|
|
60
|
-
* propagation and prevents default on all events it handles.
|
|
61
|
-
*/
|
|
62
|
-
declare class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {
|
|
63
|
-
options: EventHandlerOptions;
|
|
64
|
-
/** Configures this event manager to handle events with a specific key and no modifiers. */
|
|
65
|
-
on(key: KeyCode, handler: EventHandler<T>): this;
|
|
66
|
-
/** Configures this event manager to handle events with a specific modifer and key combination. */
|
|
67
|
-
on(modifiers: ModifierInputs, key: KeyCode, handler: EventHandler<T>): this;
|
|
68
|
-
private _normalizeInputs;
|
|
69
|
-
private _isMatch;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* The different mouse buttons that may appear on a pointer event.
|
|
74
|
-
*/
|
|
75
|
-
declare enum MouseButton {
|
|
76
|
-
Main = 0,
|
|
77
|
-
Auxiliary = 1,
|
|
78
|
-
Secondary = 2
|
|
79
|
-
}
|
|
80
|
-
/** An event manager that is specialized for handling pointer events. */
|
|
81
|
-
declare class PointerEventManager<T extends PointerEvent> extends EventManager<T> {
|
|
82
|
-
options: EventHandlerOptions;
|
|
83
|
-
/**
|
|
84
|
-
* Configures this event manager to handle events with a specific modifer and mouse button
|
|
85
|
-
* combination.
|
|
86
|
-
*/
|
|
87
|
-
on(button: MouseButton, modifiers: ModifierInputs, handler: EventHandler<T>): this;
|
|
88
|
-
/**
|
|
89
|
-
* Configures this event manager to handle events with a specific mouse button and no modifiers.
|
|
90
|
-
*/
|
|
91
|
-
on(modifiers: ModifierInputs, handler: EventHandler<T>): this;
|
|
92
|
-
/**
|
|
93
|
-
* Configures this event manager to handle events with the main mouse button and no modifiers.
|
|
94
|
-
*
|
|
95
|
-
* @param handler The handler function
|
|
96
|
-
* @param options Options for whether to stop propagation or prevent default.
|
|
97
|
-
*/
|
|
98
|
-
on(handler: EventHandler<T>): this;
|
|
99
|
-
private _normalizeInputs;
|
|
100
|
-
_isMatch(event: PointerEvent, button: MouseButton, modifiers: ModifierInputs): boolean;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
/** Represents an item in a collection, such as a listbox option, than can be navigated to. */
|
|
104
|
-
interface ListNavigationItem {
|
|
105
|
-
/** Whether an item is disabled. */
|
|
106
|
-
disabled: SignalLike<boolean>;
|
|
107
|
-
}
|
|
108
|
-
/** Represents the required inputs for a collection that has navigable items. */
|
|
109
|
-
interface ListNavigationInputs<T extends ListNavigationItem> {
|
|
110
|
-
/** Whether focus should wrap when navigating. */
|
|
111
|
-
wrap: SignalLike<boolean>;
|
|
112
|
-
/** The items in the list. */
|
|
113
|
-
items: SignalLike<T[]>;
|
|
114
|
-
/** Whether disabled items in the list should be skipped when navigating. */
|
|
115
|
-
skipDisabled: SignalLike<boolean>;
|
|
116
|
-
/** The current index that has been navigated to. */
|
|
117
|
-
activeIndex: WritableSignalLike<number>;
|
|
118
|
-
/** Whether the list is vertically or horizontally oriented. */
|
|
119
|
-
orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
120
|
-
/** The direction that text is read based on the users locale. */
|
|
121
|
-
textDirection: SignalLike<'rtl' | 'ltr'>;
|
|
122
|
-
}
|
|
123
|
-
/** Controls navigation for a list of items. */
|
|
124
|
-
declare class ListNavigation<T extends ListNavigationItem> {
|
|
125
|
-
readonly inputs: ListNavigationInputs<T>;
|
|
126
|
-
/** The last index that was active. */
|
|
127
|
-
prevActiveIndex: i0.WritableSignal<number>;
|
|
128
|
-
constructor(inputs: ListNavigationInputs<T>);
|
|
129
|
-
/** Navigates to the given item. */
|
|
130
|
-
goto(item: T): void;
|
|
131
|
-
/** Navigates to the next item in the list. */
|
|
132
|
-
next(): void;
|
|
133
|
-
/** Navigates to the previous item in the list. */
|
|
134
|
-
prev(): void;
|
|
135
|
-
/** Navigates to the first item in the list. */
|
|
136
|
-
first(): void;
|
|
137
|
-
/** Navigates to the last item in the list. */
|
|
138
|
-
last(): void;
|
|
139
|
-
/** Returns true if the given item can be navigated to. */
|
|
140
|
-
isFocusable(item: T): boolean;
|
|
141
|
-
/** Advances to the next or previous focusable item in the list based on the given delta. */
|
|
142
|
-
private _advance;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/** Represents an item in a collection, such as a listbox option, than can be selected. */
|
|
146
|
-
interface ListSelectionItem extends ListNavigationItem {
|
|
147
|
-
/** A unique identifier for the item. */
|
|
148
|
-
id: SignalLike<string>;
|
|
149
|
-
/** Whether an item is disabled. */
|
|
150
|
-
disabled: SignalLike<boolean>;
|
|
151
|
-
}
|
|
152
|
-
/** Represents the required inputs for a collection that contains selectable items. */
|
|
153
|
-
interface ListSelectionInputs<T extends ListSelectionItem> {
|
|
154
|
-
/** The items in the list. */
|
|
155
|
-
items: SignalLike<T[]>;
|
|
156
|
-
/** Whether multiple items in the list can be selected at once. */
|
|
157
|
-
multiselectable: SignalLike<boolean>;
|
|
158
|
-
/** The ids of the current selected items. */
|
|
159
|
-
selectedIds: WritableSignalLike<string[]>;
|
|
160
|
-
/** The selection strategy used by the list. */
|
|
161
|
-
selectionMode: SignalLike<'follow' | 'explicit'>;
|
|
162
|
-
}
|
|
163
|
-
/** Controls selection for a list of items. */
|
|
164
|
-
declare class ListSelection<T extends ListSelectionItem> {
|
|
165
|
-
readonly inputs: ListSelectionInputs<T> & {
|
|
166
|
-
navigation: ListNavigation<T>;
|
|
167
|
-
};
|
|
168
|
-
/** The id of the most recently selected item. */
|
|
169
|
-
previousSelectedId: i0.WritableSignal<string | undefined>;
|
|
170
|
-
/** The navigation controller of the parent list. */
|
|
171
|
-
navigation: ListNavigation<T>;
|
|
172
|
-
constructor(inputs: ListSelectionInputs<T> & {
|
|
173
|
-
navigation: ListNavigation<T>;
|
|
174
|
-
});
|
|
175
|
-
/** Selects the item at the current active index. */
|
|
176
|
-
select(item?: T): void;
|
|
177
|
-
/** Deselects the item at the current active index. */
|
|
178
|
-
deselect(item?: T): void;
|
|
179
|
-
/** Toggles the item at the current active index. */
|
|
180
|
-
toggle(): void;
|
|
181
|
-
/** Toggles only the item at the current active index. */
|
|
182
|
-
toggleOne(): void;
|
|
183
|
-
/** Selects all items in the list. */
|
|
184
|
-
selectAll(): void;
|
|
185
|
-
/** Deselects all items in the list. */
|
|
186
|
-
deselectAll(): void;
|
|
187
|
-
/** Selects the items in the list starting at the last selected item. */
|
|
188
|
-
selectFromPrevSelectedItem(): void;
|
|
189
|
-
/** Selects the items in the list starting at the last active item. */
|
|
190
|
-
selectFromActive(): void;
|
|
191
|
-
/** Selects the items in the list starting at the given index. */
|
|
192
|
-
private _selectFromIndex;
|
|
193
|
-
/** Sets the selection to only the current active item. */
|
|
194
|
-
selectOne(): void;
|
|
195
|
-
/** Sets the anchor to the current active index. */
|
|
196
|
-
private _anchor;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Represents an item in a collection, such as a listbox option, than can be navigated to by
|
|
201
|
-
* typeahead.
|
|
202
|
-
*/
|
|
203
|
-
interface ListTypeaheadItem extends ListNavigationItem {
|
|
204
|
-
/** The text used by the typeahead search. */
|
|
205
|
-
searchTerm: SignalLike<string>;
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Represents the required inputs for a collection that contains items that can be navigated to by
|
|
209
|
-
* typeahead.
|
|
210
|
-
*/
|
|
211
|
-
interface ListTypeaheadInputs {
|
|
212
|
-
/** The amount of time before the typeahead search is reset. */
|
|
213
|
-
typeaheadDelay: SignalLike<number>;
|
|
214
|
-
}
|
|
215
|
-
/** Controls typeahead for a list of items. */
|
|
216
|
-
declare class ListTypeahead<T extends ListTypeaheadItem> {
|
|
217
|
-
readonly inputs: ListTypeaheadInputs & {
|
|
218
|
-
navigation: ListNavigation<T>;
|
|
219
|
-
};
|
|
220
|
-
/** A reference to the timeout for resetting the typeahead search. */
|
|
221
|
-
timeout?: ReturnType<typeof setTimeout> | undefined;
|
|
222
|
-
/** The navigation controller of the parent list. */
|
|
223
|
-
navigation: ListNavigation<T>;
|
|
224
|
-
/** Keeps track of the characters that typeahead search is being called with. */
|
|
225
|
-
private _query;
|
|
226
|
-
/** The index where that the typeahead search was initiated from. */
|
|
227
|
-
private _startIndex;
|
|
228
|
-
constructor(inputs: ListTypeaheadInputs & {
|
|
229
|
-
navigation: ListNavigation<T>;
|
|
230
|
-
});
|
|
231
|
-
/** Performs a typeahead search, appending the given character to the search string. */
|
|
232
|
-
search(char: string): void;
|
|
233
|
-
/**
|
|
234
|
-
* Returns the first item whose search term matches the
|
|
235
|
-
* current query starting from the the current anchor index.
|
|
236
|
-
*/
|
|
237
|
-
private _getItem;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/** Represents an item in a collection, such as a listbox option, than may receive focus. */
|
|
241
|
-
interface ListFocusItem extends ListNavigationItem {
|
|
242
|
-
/** A unique identifier for the item. */
|
|
243
|
-
id: SignalLike<string>;
|
|
244
|
-
/** The html element that should receive focus. */
|
|
245
|
-
element: SignalLike<HTMLElement>;
|
|
246
|
-
}
|
|
247
|
-
/** Represents the required inputs for a collection that contains focusable items. */
|
|
248
|
-
interface ListFocusInputs<T extends ListFocusItem> {
|
|
249
|
-
/** The focus strategy used by the list. */
|
|
250
|
-
focusMode: SignalLike<'roving' | 'activedescendant'>;
|
|
251
|
-
}
|
|
252
|
-
/** Controls focus for a list of items. */
|
|
253
|
-
declare class ListFocus<T extends ListFocusItem> {
|
|
254
|
-
readonly inputs: ListFocusInputs<T> & {
|
|
255
|
-
navigation: ListNavigation<T>;
|
|
256
|
-
};
|
|
257
|
-
/** The navigation controller of the parent list. */
|
|
258
|
-
navigation: ListNavigation<ListFocusItem>;
|
|
259
|
-
constructor(inputs: ListFocusInputs<T> & {
|
|
260
|
-
navigation: ListNavigation<T>;
|
|
261
|
-
});
|
|
262
|
-
/** The id of the current active item. */
|
|
263
|
-
getActiveDescendant(): String | undefined;
|
|
264
|
-
/** The tabindex for the list. */
|
|
265
|
-
getListTabindex(): -1 | 0;
|
|
266
|
-
/** Returns the tabindex for the given item. */
|
|
267
|
-
getItemTabindex(item: T): -1 | 0;
|
|
268
|
-
/** Focuses the current active item. */
|
|
269
|
-
focus(): void;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Represents the properties exposed by a listbox that need to be accessed by an option.
|
|
274
|
-
* This exists to avoid circular dependency errors between the listbox and option.
|
|
275
|
-
*/
|
|
276
|
-
interface ListboxPattern$1 {
|
|
277
|
-
focusManager: ListFocus<OptionPattern>;
|
|
278
|
-
selection: ListSelection<OptionPattern>;
|
|
279
|
-
navigation: ListNavigation<OptionPattern>;
|
|
280
|
-
}
|
|
281
|
-
/** Represents the required inputs for an option in a listbox. */
|
|
282
|
-
interface OptionInputs extends ListNavigationItem, ListSelectionItem, ListTypeaheadItem, ListFocusItem {
|
|
283
|
-
listbox: SignalLike<ListboxPattern$1>;
|
|
284
|
-
}
|
|
285
|
-
/** Represents an option in a listbox. */
|
|
286
|
-
declare class OptionPattern {
|
|
287
|
-
/** A unique identifier for the option. */
|
|
288
|
-
id: SignalLike<string>;
|
|
289
|
-
/** The position of the option in the list. */
|
|
290
|
-
index: i0.Signal<number>;
|
|
291
|
-
/** Whether the option is selected. */
|
|
292
|
-
selected: i0.Signal<boolean>;
|
|
293
|
-
/** Whether the option is disabled. */
|
|
294
|
-
disabled: SignalLike<boolean>;
|
|
295
|
-
/** The text used by the typeahead search. */
|
|
296
|
-
searchTerm: SignalLike<string>;
|
|
297
|
-
/** A reference to the parent listbox. */
|
|
298
|
-
listbox: SignalLike<ListboxPattern$1>;
|
|
299
|
-
/** The tabindex of the option. */
|
|
300
|
-
tabindex: i0.Signal<0 | -1>;
|
|
301
|
-
/** The html element that should receive focus. */
|
|
302
|
-
element: SignalLike<HTMLElement>;
|
|
303
|
-
constructor(args: OptionInputs);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
/** The selection operations that the listbox can perform. */
|
|
307
|
-
interface SelectOptions {
|
|
308
|
-
select?: boolean;
|
|
309
|
-
toggle?: boolean;
|
|
310
|
-
toggleOne?: boolean;
|
|
311
|
-
selectOne?: boolean;
|
|
312
|
-
selectAll?: boolean;
|
|
313
|
-
selectFromAnchor?: boolean;
|
|
314
|
-
selectFromActive?: boolean;
|
|
315
|
-
}
|
|
316
|
-
/** Represents the required inputs for a listbox. */
|
|
317
|
-
type ListboxInputs = ListNavigationInputs<OptionPattern> & ListSelectionInputs<OptionPattern> & ListTypeaheadInputs & ListFocusInputs<OptionPattern> & {
|
|
318
|
-
disabled: SignalLike<boolean>;
|
|
319
|
-
};
|
|
320
|
-
/** Controls the state of a listbox. */
|
|
321
|
-
declare class ListboxPattern {
|
|
322
|
-
readonly inputs: ListboxInputs;
|
|
323
|
-
/** Controls navigation for the listbox. */
|
|
324
|
-
navigation: ListNavigation<OptionPattern>;
|
|
325
|
-
/** Controls selection for the listbox. */
|
|
326
|
-
selection: ListSelection<OptionPattern>;
|
|
327
|
-
/** Controls typeahead for the listbox. */
|
|
328
|
-
typeahead: ListTypeahead<OptionPattern>;
|
|
329
|
-
/** Controls focus for the listbox. */
|
|
330
|
-
focusManager: ListFocus<OptionPattern>;
|
|
331
|
-
/** Whether the list is vertically or horizontally oriented. */
|
|
332
|
-
orientation: SignalLike<'vertical' | 'horizontal'>;
|
|
333
|
-
/** Whether the listbox is disabled. */
|
|
334
|
-
disabled: SignalLike<boolean>;
|
|
335
|
-
/** The tabindex of the listbox. */
|
|
336
|
-
tabindex: i0.Signal<0 | -1>;
|
|
337
|
-
/** The id of the current active item. */
|
|
338
|
-
activedescendant: i0.Signal<String | undefined>;
|
|
339
|
-
/** Whether multiple items in the list can be selected at once. */
|
|
340
|
-
multiselectable: SignalLike<boolean>;
|
|
341
|
-
/** The number of items in the listbox. */
|
|
342
|
-
setsize: i0.Signal<number>;
|
|
343
|
-
/** Whether the listbox selection follows focus. */
|
|
344
|
-
followFocus: i0.Signal<boolean>;
|
|
345
|
-
/** The key used to navigate to the previous item in the list. */
|
|
346
|
-
prevKey: i0.Signal<"ArrowUp" | "ArrowRight" | "ArrowLeft">;
|
|
347
|
-
/** The key used to navigate to the next item in the list. */
|
|
348
|
-
nextKey: i0.Signal<"ArrowRight" | "ArrowLeft" | "ArrowDown">;
|
|
349
|
-
/** The regexp used to decide if a key should trigger typeahead. */
|
|
350
|
-
typeaheadRegexp: RegExp;
|
|
351
|
-
/** The keydown event manager for the listbox. */
|
|
352
|
-
keydown: i0.Signal<KeyboardEventManager<KeyboardEvent>>;
|
|
353
|
-
/** The pointerdown event manager for the listbox. */
|
|
354
|
-
pointerdown: i0.Signal<PointerEventManager<PointerEvent>>;
|
|
355
|
-
constructor(inputs: ListboxInputs);
|
|
356
|
-
/** Handles keydown events for the listbox. */
|
|
357
|
-
onKeydown(event: KeyboardEvent): void;
|
|
358
|
-
onPointerdown(event: PointerEvent): void;
|
|
359
|
-
/** Navigates to the first option in the listbox. */
|
|
360
|
-
first(opts?: SelectOptions): void;
|
|
361
|
-
/** Navigates to the last option in the listbox. */
|
|
362
|
-
last(opts?: SelectOptions): void;
|
|
363
|
-
/** Navigates to the next option in the listbox. */
|
|
364
|
-
next(opts?: SelectOptions): void;
|
|
365
|
-
/** Navigates to the previous option in the listbox. */
|
|
366
|
-
prev(opts?: SelectOptions): void;
|
|
367
|
-
/** Navigates to the given item in the listbox. */
|
|
368
|
-
goto(event: PointerEvent, opts?: SelectOptions): void;
|
|
369
|
-
/** Handles typeahead search navigation for the listbox. */
|
|
370
|
-
search(char: string, opts?: SelectOptions): void;
|
|
371
|
-
/** Handles updating selection for the listbox. */
|
|
372
|
-
private _updateSelection;
|
|
373
|
-
private _getItem;
|
|
374
|
-
}
|
|
375
|
-
|
|
376
|
-
export { ListboxPattern as L, OptionPattern as O, type ListboxInputs as a, type OptionInputs as b };
|