@angular/aria 22.0.0-next.7 → 22.0.0-next.8
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/fesm2022/_accordion-chunk.mjs +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs +1 -1
- package/fesm2022/{_signal-like-chunk.mjs → _collection-chunk.mjs} +51 -2
- package/fesm2022/_collection-chunk.mjs.map +1 -0
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_list-chunk.mjs +4 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs +1 -1
- package/fesm2022/_menu-chunk.mjs +1 -1
- package/fesm2022/{_combobox-listbox-chunk.mjs → _option-chunk.mjs} +3 -50
- package/fesm2022/_option-chunk.mjs.map +1 -0
- package/fesm2022/_tabs-chunk.mjs +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs +1 -1
- package/fesm2022/_transforms-chunk.mjs +8 -0
- package/fesm2022/_transforms-chunk.mjs.map +1 -0
- package/fesm2022/{_combobox-tree-chunk.mjs → _tree-chunk.mjs} +3 -48
- package/fesm2022/_tree-chunk.mjs.map +1 -0
- package/fesm2022/_widget-chunk.mjs +36 -15
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +28 -55
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox-testing.mjs +79 -0
- package/fesm2022/combobox-testing.mjs.map +1 -0
- package/fesm2022/combobox.mjs +273 -307
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs +8 -0
- package/fesm2022/grid-testing.mjs.map +1 -1
- package/fesm2022/grid.mjs +68 -87
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs +4 -0
- package/fesm2022/listbox-testing.mjs.map +1 -1
- package/fesm2022/listbox.mjs +184 -205
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs +11 -0
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +42 -66
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +19 -13
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +78 -84
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs +5 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +21 -31
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs +12 -0
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +118 -146
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +6 -6
- package/types/_accordion-chunk.d.ts +2 -2
- package/types/_collection-chunk.d.ts +42 -0
- package/types/_expansion-chunk.d.ts +1 -1
- package/types/_grid-chunk.d.ts +9 -3
- package/types/_keyboard-event-manager-chunk.d.ts +1 -1
- package/types/_list-chunk.d.ts +1 -1
- package/types/_list-navigation-chunk.d.ts +1 -1
- package/types/_listbox-chunk.d.ts +1 -1
- package/types/_menu-chunk.d.ts +1 -1
- package/types/_tabs-chunk.d.ts +1 -1
- package/types/_toolbar-chunk.d.ts +1 -1
- package/types/_tree-chunk.d.ts +1 -1
- package/types/accordion.d.ts +7 -13
- package/types/combobox-testing.d.ts +63 -0
- package/types/combobox.d.ts +96 -193
- package/types/grid-testing.d.ts +4 -0
- package/types/grid.d.ts +101 -97
- package/types/listbox-testing.d.ts +25 -0
- package/types/listbox.d.ts +55 -60
- package/types/menu-testing.d.ts +6 -0
- package/types/menu.d.ts +17 -13
- package/types/private.d.ts +24 -138
- package/types/tabs.d.ts +69 -72
- package/types/toolbar-testing.d.ts +4 -0
- package/types/toolbar.d.ts +5 -6
- package/types/tree-testing.d.ts +8 -0
- package/types/tree.d.ts +7 -14
- package/fesm2022/_combobox-chunk.mjs +0 -478
- package/fesm2022/_combobox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-listbox-chunk.mjs.map +0 -1
- package/fesm2022/_combobox-tree-chunk.mjs.map +0 -1
- package/fesm2022/_element-chunk.mjs +0 -6
- package/fesm2022/_element-chunk.mjs.map +0 -1
- package/fesm2022/_signal-like-chunk.mjs.map +0 -1
- package/fesm2022/simple-combobox.mjs +0 -443
- package/fesm2022/simple-combobox.mjs.map +0 -1
- package/types/_combobox-chunk.d.ts +0 -224
- package/types/_element-chunk.d.ts +0 -10
- package/types/_signal-like-chunk.d.ts +0 -14
- package/types/simple-combobox.d.ts +0 -124
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_combobox-tree-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/tree/tree.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/tree/tree.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/tree/combobox-tree.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\nimport {computed, signal, SignalLike} from '../signal-like/signal-like';\nimport {ExpansionItem, ListExpansion, ListExpansionInputs} from '../expansion/expansion';\nimport {ListFocus, ListFocusInputs, ListFocusItem} from '../list-focus/list-focus';\nimport {\n ListNavigation,\n ListNavigationInputs,\n ListNavigationItem,\n} from '../list-navigation/list-navigation';\nimport {\n ListSelection,\n ListSelectionInputs,\n ListSelectionItem,\n} from '../list-selection/list-selection';\nimport {\n ListTypeahead,\n ListTypeaheadInputs,\n ListTypeaheadItem,\n} from '../list-typeahead/list-typeahead';\nimport {NavOptions} from '../list/list';\n\n/** Represents an item in the tree. */\nexport interface TreeItem<V, T extends TreeItem<V, T>>\n extends\n ListTypeaheadItem,\n ListNavigationItem,\n ListSelectionItem<V>,\n ListFocusItem,\n ExpansionItem {\n /** The children of this item. */\n children: SignalLike<T[] | undefined>;\n\n /** The parent of this item. */\n parent: SignalLike<T | undefined>;\n\n /** Whether this item is visible. */\n visible: SignalLike<boolean>;\n}\n\n/** The necessary inputs for the tree behavior. */\nexport type TreeInputs<T extends TreeItem<V, T>, V> = ListFocusInputs<T> &\n ListNavigationInputs<T> &\n ListSelectionInputs<T, V> &\n ListTypeaheadInputs<T> &\n ListExpansionInputs;\n\n/** Controls focus for a tree, ensuring that only visible items are focusable. */\nclass TreeListFocus<T extends TreeItem<V, T>, V> extends ListFocus<T> {\n override isFocusable(item: T): boolean {\n return super.isFocusable(item) && item.visible();\n }\n}\n\n/** Controls the state of a tree. */\nexport class Tree<T extends TreeItem<V, T>, V> {\n /** Controls navigation for the tree. */\n readonly navigationBehavior: ListNavigation<T>;\n\n /** Controls selection for the tree. */\n readonly selectionBehavior: ListSelection<T, V>;\n\n /** Controls typeahead for the tree. */\n readonly typeaheadBehavior: ListTypeahead<T>;\n\n /** Controls focus for the tree. */\n readonly focusBehavior: ListFocus<T>;\n\n /** Controls expansion for the tree. */\n readonly expansionBehavior: ListExpansion;\n\n /** Whether the tree is disabled. */\n readonly disabled = computed(() => this.focusBehavior.isListDisabled());\n\n /** The id of the current active item. */\n readonly activeDescendant = computed(() => this.focusBehavior.getActiveDescendant());\n\n /** The tab index of the tree. */\n readonly tabIndex = computed(() => this.focusBehavior.getListTabIndex());\n\n /** The index of the currently active item in the tree (within the flattened list). */\n readonly activeIndex = computed(() => this.focusBehavior.activeIndex());\n\n /** The uncommitted index for selecting a range of options. */\n private readonly _anchorIndex = signal(0);\n\n /** Whether the list should wrap. */\n private readonly _wrap = signal(true);\n\n constructor(readonly inputs: TreeInputs<T, V>) {\n this.focusBehavior = new TreeListFocus<T, V>(inputs);\n this.selectionBehavior = new ListSelection<T, V>({...inputs, focusManager: this.focusBehavior});\n this.typeaheadBehavior = new ListTypeahead<T>({...inputs, focusManager: this.focusBehavior});\n this.expansionBehavior = new ListExpansion(inputs);\n this.navigationBehavior = new ListNavigation<T>({\n ...inputs,\n focusManager: this.focusBehavior,\n wrap: computed(() => this._wrap() && this.inputs.wrap()),\n });\n }\n\n /** Returns the tab index for the given item. */\n getItemTabindex(item: T) {\n return this.focusBehavior.getItemTabIndex(item);\n }\n\n /** Navigates to the first option in the tree. */\n first(opts?: NavOptions<T>) {\n this._navigate(opts, () => this.navigationBehavior.first(opts));\n }\n\n /** Navigates to the last option in the tree. */\n last(opts?: NavOptions<T>) {\n this._navigate(opts, () => this.navigationBehavior.last(opts));\n }\n\n /** Navigates to the next option in the tree. */\n next(opts?: NavOptions<T>) {\n this._navigate(opts, () => this.navigationBehavior.next(opts));\n }\n\n /** Navigates to the previous option in the tree. */\n prev(opts?: NavOptions<T>) {\n this._navigate(opts, () => this.navigationBehavior.prev(opts));\n }\n\n /** Navigates to the first child of the current active item. */\n firstChild(opts?: NavOptions<T>) {\n this._navigate(opts, () => {\n const item = this.inputs.activeItem();\n const items = item?.children?.() ?? [];\n return this.navigationBehavior.first({items, ...opts});\n });\n }\n\n /** Navigates to the last child of the current active item. */\n lastChild(opts?: NavOptions<T>) {\n this._navigate(opts, () => {\n const item = this.inputs.activeItem();\n const items = item?.children?.() ?? [];\n return this.navigationBehavior.last({items, ...opts});\n });\n }\n\n /** Navigates to the next sibling of the current active item. */\n nextSibling(opts?: NavOptions<T>) {\n this._navigate(opts, () => {\n const item = this.inputs.activeItem();\n const items = item?.parent?.()?.children?.() ?? [];\n return this.navigationBehavior.next({items, ...opts});\n });\n }\n\n /** Navigates to the previous sibling of the current active item. */\n prevSibling(opts?: NavOptions<T>) {\n this._navigate(opts, () => {\n const item = this.inputs.activeItem();\n const items = item?.parent?.()?.children?.() ?? [];\n return this.navigationBehavior.prev({items, ...opts});\n });\n }\n\n /** Navigates to the parent of the current active item. */\n parent(opts?: NavOptions<T>) {\n this._navigate(opts, () =>\n this.navigationBehavior.goto(this.inputs.activeItem()?.parent?.(), opts),\n );\n }\n\n /** Navigates to the given item in the tree. */\n goto(item: T, opts?: NavOptions<T>) {\n this._navigate(opts, () => this.navigationBehavior.goto(item, opts));\n }\n\n /** Removes focus from the tree. */\n unfocus() {\n this.inputs.activeItem.set(undefined);\n }\n\n /** Marks the given index as the potential start of a range selection. */\n anchor(index: number) {\n this._anchorIndex.set(index);\n }\n\n /** Handles typeahead search navigation for the tree. */\n search(char: string, opts?: NavOptions<T>) {\n this._navigate(opts, () => this.typeaheadBehavior.search(char));\n }\n\n /** Checks if the tree is currently typing for typeahead search. */\n isTyping() {\n return this.typeaheadBehavior.isTyping();\n }\n\n /** Selects the currently active item in the tree. */\n select(item?: T) {\n this.selectionBehavior.select(item);\n }\n\n /** Sets the selection to only the current active item. */\n selectOne() {\n this.selectionBehavior.selectOne();\n }\n\n /** Deselects the currently active item in the tree. */\n deselect(item?: T) {\n this.selectionBehavior.deselect(item);\n }\n\n /** Deselects all items in the tree. */\n deselectAll() {\n this.selectionBehavior.deselectAll();\n }\n\n /** Toggles the currently active item in the tree. */\n toggle(item?: T) {\n this.selectionBehavior.toggle(item);\n }\n\n /** Toggles the currently active item in the tree, deselecting all other items. */\n toggleOne() {\n this.selectionBehavior.toggleOne();\n }\n\n /** Toggles the selection of all items in the tree. */\n toggleAll() {\n this.selectionBehavior.toggleAll();\n }\n\n /** Toggles the expansion of the given item. */\n toggleExpansion(item?: T) {\n item ??= this.inputs.activeItem();\n if (!item || !this.isFocusable(item)) return;\n\n if (this.isExpandable(item)) {\n this.expansionBehavior.toggle(item);\n }\n }\n\n /** Expands the given item. */\n expand(item: T) {\n if (this.isExpandable(item)) {\n this.expansionBehavior.open(item);\n }\n }\n\n /** Collapses the given item. */\n collapse(item: T) {\n this.expansionBehavior.close(item);\n }\n\n /** Expands all sibling items of the given item (or active item). */\n expandSiblings(item?: T) {\n item ??= this.inputs.activeItem();\n if (!item) return;\n\n // If the item has a parent, get all of the parent's children.\n // Otherwise, it is a root item, and get all other root items.\n const parent = item.parent?.();\n const siblings = parent ? parent.children?.() : this.inputs.items().filter(i => !i.parent?.());\n\n siblings?.forEach(s => this.expand(s));\n }\n\n /** Expands all items in the tree. */\n expandAll() {\n this.expansionBehavior.openAll();\n }\n\n /** Collapses all items in the tree. */\n collapseAll() {\n this.expansionBehavior.closeAll();\n }\n\n /** Checks if the given item is able to receive focus. */\n isFocusable(item: T) {\n return this.focusBehavior.isFocusable(item);\n }\n\n /** Checks if the given item is expandable. */\n isExpandable(item: T) {\n return this.expansionBehavior.isExpandable(item);\n }\n\n /** Handles updating selection for the tree. */\n updateSelection(opts: NavOptions<T> = {anchor: true}) {\n if (opts.toggle) {\n this.selectionBehavior.toggle();\n }\n if (opts.select) {\n this.selectionBehavior.select();\n }\n if (opts.selectOne) {\n this.selectionBehavior.selectOne();\n }\n if (opts.selectRange) {\n this.selectionBehavior.selectRange();\n }\n if (!opts.anchor) {\n this.anchor(this.selectionBehavior.rangeStartIndex());\n }\n }\n\n /**\n * Safely performs a navigation operation.\n */\n private _navigate(opts: NavOptions<T> = {}, operation: () => boolean) {\n if (opts?.selectRange) {\n this._wrap.set(false);\n this.selectionBehavior.rangeStartIndex.set(this._anchorIndex());\n }\n\n const moved = operation();\n\n if (moved) {\n this.updateSelection(opts);\n }\n\n this._wrap.set(true);\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 SignalLike,\n computed,\n WritableSignalLike,\n signal,\n} from '../behaviors/signal-like/signal-like';\nimport {Tree, TreeItem, TreeInputs as TreeBehaviorInputs} from '../behaviors/tree/tree';\nimport {KeyboardEventManager, Modifier, ClickEventManager} from '../behaviors/event-manager';\n\n/** Represents the required inputs for a tree item. */\nexport interface TreeItemInputs<V> extends Omit<\n TreeItem<V, TreeItemPattern<V>>,\n 'index' | 'parent' | 'visible' | 'expandable'\n> {\n /** The parent item. */\n parent: SignalLike<TreeItemPattern<V> | TreePattern<V>>;\n\n /** Whether this item has children. Children can be lazily loaded. */\n hasChildren: SignalLike<boolean>;\n\n /** The tree pattern this item belongs to. */\n tree: SignalLike<TreePattern<V>>;\n}\n\n/**\n * Represents an item in a Tree.\n */\nexport class TreeItemPattern<V> implements TreeItem<V, TreeItemPattern<V>> {\n /** A unique identifier for this item. */\n readonly id: SignalLike<string> = () => this.inputs.id();\n\n /** The value of this item. */\n readonly value: SignalLike<V> = () => this.inputs.value();\n\n /** A reference to the item element. */\n readonly element: SignalLike<HTMLElement> = () => this.inputs.element()!;\n\n /** Whether the item is disabled. */\n readonly disabled: SignalLike<boolean> = () => this.inputs.disabled();\n\n /** The text used by the typeahead search. */\n readonly searchTerm: SignalLike<string> = () => this.inputs.searchTerm();\n\n /** The tree pattern this item belongs to. */\n readonly tree: SignalLike<TreePattern<V>> = () => this.inputs.tree();\n\n /** The parent item. */\n readonly parent: SignalLike<TreeItemPattern<V> | undefined> = computed(() => {\n const parent = this.inputs.parent();\n return parent instanceof TreeItemPattern ? parent : undefined;\n });\n\n /** The children items. */\n readonly children: SignalLike<TreeItemPattern<V>[]> = () => this.inputs.children() ?? [];\n\n /** The position of this item among its siblings. */\n readonly index = computed(() => this.tree().inputs.items().indexOf(this));\n\n /** Whether the item is expandable. It's expandable if children item exist. */\n readonly expandable: SignalLike<boolean> = () => this.inputs.hasChildren();\n\n /** Whether the item is selectable. */\n readonly selectable: SignalLike<boolean> = () => this.inputs.selectable();\n\n /** Whether the item is expanded. */\n readonly expanded: WritableSignalLike<boolean>;\n\n /** The level of the current item in a tree. */\n readonly level: SignalLike<number> = computed(() => this.inputs.parent().level() + 1);\n\n /** Whether this item is visible. */\n readonly visible: SignalLike<boolean> = computed(\n () => this.inputs.parent().expanded() && this.inputs.parent().visible(),\n );\n\n /** The number of items under the same parent at the same level. */\n readonly setsize = computed(() => this.inputs.parent().children().length);\n\n /** The position of this item among its siblings (1-based). */\n readonly posinset = computed(() => this.inputs.parent().children().indexOf(this) + 1);\n\n /** Whether the item is active. */\n readonly active = computed(() => this.tree().activeItem() === this);\n\n /** The tab index of the item. */\n readonly tabIndex = computed(() => this.tree().treeBehavior.getItemTabindex(this));\n\n /** Whether the item is selected. */\n readonly selected: SignalLike<boolean | undefined> = computed(() => {\n if (this.tree().nav()) {\n return undefined;\n }\n if (!this.selectable()) {\n return undefined;\n }\n return this.tree().value().includes(this.value());\n });\n\n /** The current type of this item. */\n readonly current: SignalLike<string | undefined> = computed(() => {\n if (!this.tree().nav()) {\n return undefined;\n }\n if (!this.selectable()) {\n return undefined;\n }\n return this.tree().value().includes(this.value()) ? this.tree().currentType() : undefined;\n });\n\n constructor(readonly inputs: TreeItemInputs<V>) {\n this.expanded = inputs.expanded;\n }\n}\n\n/** The selection operations that the tree can perform. */\ninterface SelectOptions {\n toggle?: boolean;\n selectOne?: boolean;\n selectRange?: boolean;\n anchor?: boolean;\n}\n\n/** Represents the required inputs for a tree. */\nexport interface TreeInputs<V> extends Omit<\n TreeBehaviorInputs<TreeItemPattern<V>, V>,\n 'multiExpandable'\n> {\n /** A unique identifier for the tree. */\n id: SignalLike<string>;\n\n /** Whether the tree is in navigation mode. */\n nav: SignalLike<boolean>;\n\n /** The aria-current type. */\n currentType: SignalLike<'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'>;\n\n /** The text direction of the tree. */\n textDirection: SignalLike<'ltr' | 'rtl'>;\n}\n\n/** Controls the state and interactions of a tree view. */\nexport class TreePattern<V> implements TreeInputs<V> {\n /** The tree behavior for the tree. */\n readonly treeBehavior: Tree<TreeItemPattern<V>, V>;\n\n /** Whether the tree has been interacted with. */\n readonly hasBeenInteracted = signal(false);\n\n /** The root level is 0. */\n readonly level = () => 0;\n\n /** The root is always expanded. */\n readonly expanded = () => true;\n\n /** The root is always visible. */\n readonly visible = () => true;\n\n /** The tab index of the tree. */\n readonly tabIndex: SignalLike<-1 | 0> = computed(() => this.treeBehavior.tabIndex());\n\n /** The id of the current active item. */\n readonly activeDescendant = computed(() => this.treeBehavior.activeDescendant());\n\n /** The direct children of the root (top-level tree items). */\n readonly children = computed(() =>\n this.inputs.items().filter(item => item.level() === this.level() + 1),\n );\n\n /** Whether the tree selection follows focus. */\n readonly followFocus = computed(() => this.inputs.selectionMode() === 'follow');\n\n /** Whether the tree direction is RTL. */\n readonly isRtl = computed(() => this.inputs.textDirection() === 'rtl');\n\n /** The key for navigating to the previous item. */\n readonly prevKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowUp';\n }\n return this.isRtl() ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key for navigating to the next item. */\n readonly nextKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowDown';\n }\n return this.isRtl() ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The key for collapsing an item or moving to its parent. */\n readonly collapseKey = computed(() => {\n if (this.inputs.orientation() === 'horizontal') {\n return 'ArrowUp';\n }\n return this.isRtl() ? 'ArrowRight' : 'ArrowLeft';\n });\n\n /** The key for expanding an item or moving to its first child. */\n readonly expandKey = computed(() => {\n if (this.inputs.orientation() === 'horizontal') {\n return 'ArrowDown';\n }\n return this.isRtl() ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** Represents the space key. Does nothing when the user is actively using typeahead. */\n readonly dynamicSpaceKey = computed(() => (this.treeBehavior.isTyping() ? '' : ' '));\n\n /** Regular expression to match characters for typeahead. */\n readonly typeaheadRegexp = /^.$/;\n\n /** The keydown event manager for the tree. */\n readonly keydown = computed(() => {\n const manager = new KeyboardEventManager();\n const tree = this.treeBehavior;\n\n manager\n .on(this.prevKey, () => tree.prev({selectOne: this.followFocus()}), {ignoreRepeat: false})\n .on(this.nextKey, () => tree.next({selectOne: this.followFocus()}), {ignoreRepeat: false})\n .on('Home', () => tree.first({selectOne: this.followFocus()}))\n .on('End', () => tree.last({selectOne: this.followFocus()}))\n .on(this.typeaheadRegexp, e => tree.search(e.key, {selectOne: this.followFocus()}))\n .on(Modifier.Shift, '*', () => tree.expandSiblings())\n .on(this.expandKey, () => this._expandOrFirstChild({selectOne: this.followFocus()}))\n .on(this.collapseKey, () => this._collapseOrParent({selectOne: this.followFocus()}));\n\n if (this.inputs.multi()) {\n manager\n // TODO: Tracking the anchor by index can break if the\n // tree is expanded or collapsed causing the index to change.\n .on(Modifier.Any, 'Shift', () => tree.anchor(this.treeBehavior.activeIndex()))\n .on(Modifier.Shift, this.prevKey, () => tree.prev({selectRange: true}), {\n ignoreRepeat: false,\n })\n .on(Modifier.Shift, this.nextKey, () => tree.next({selectRange: true}), {\n ignoreRepeat: false,\n })\n .on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'Home', () =>\n tree.first({selectRange: true, anchor: false}),\n )\n .on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'End', () =>\n tree.last({selectRange: true, anchor: false}),\n )\n .on(Modifier.Shift, 'Enter', () => tree.updateSelection({selectRange: true, anchor: false}))\n .on(Modifier.Shift, this.dynamicSpaceKey, () =>\n tree.updateSelection({selectRange: true, anchor: false}),\n );\n }\n\n if (!this.followFocus() && this.inputs.multi()) {\n manager\n .on(this.dynamicSpaceKey, () => tree.toggle())\n .on('Enter', () => tree.toggle(), {preventDefault: !this.nav()})\n .on([Modifier.Ctrl, Modifier.Meta], 'A', () => tree.toggleAll());\n }\n\n if (!this.followFocus() && !this.inputs.multi()) {\n manager.on(this.dynamicSpaceKey, () => tree.selectOne());\n manager.on('Enter', () => tree.selectOne(), {preventDefault: !this.nav()});\n }\n\n if (this.inputs.multi() && this.followFocus()) {\n manager\n .on([Modifier.Ctrl, Modifier.Meta], this.prevKey, () => tree.prev(), {ignoreRepeat: false})\n .on([Modifier.Ctrl, Modifier.Meta], this.nextKey, () => tree.next(), {ignoreRepeat: false})\n .on([Modifier.Ctrl, Modifier.Meta], this.expandKey, () => this._expandOrFirstChild())\n .on([Modifier.Ctrl, Modifier.Meta], this.collapseKey, () => this._collapseOrParent())\n .on([Modifier.Ctrl, Modifier.Meta], ' ', () => tree.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'Enter', () => tree.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'Home', () => tree.first())\n .on([Modifier.Ctrl, Modifier.Meta], 'End', () => tree.last())\n .on([Modifier.Ctrl, Modifier.Meta], 'A', () => {\n tree.toggleAll();\n tree.select(); // Ensure the currect item remains selected.\n });\n }\n\n return manager;\n });\n\n /** The click event manager for the tree. */\n readonly clickManager = computed(() => {\n const manager = new ClickEventManager<PointerEvent>();\n\n if (this.multi()) {\n manager.on(Modifier.Shift, (e: PointerEvent) => this.goto(e, {selectRange: true}));\n }\n\n if (!this.multi()) {\n return manager.on((e: PointerEvent) => this.goto(e, {selectOne: true}));\n }\n\n if (this.multi() && this.followFocus()) {\n return manager\n .on((e: PointerEvent) => this.goto(e, {selectOne: true}))\n .on(Modifier.Ctrl, (e: PointerEvent) => this.goto(e, {toggle: true}));\n }\n\n if (this.multi() && !this.followFocus()) {\n return manager.on((e: PointerEvent) => this.goto(e, {toggle: true}));\n }\n\n return manager;\n });\n\n /** A unique identifier for the tree. */\n readonly id: SignalLike<string> = () => this.inputs.id();\n\n /** The host native element. */\n readonly element: SignalLike<HTMLElement> = () => this.inputs.element()!;\n\n /** Whether the tree is in navigation mode. */\n readonly nav: SignalLike<boolean> = () => this.inputs.nav();\n\n /** The aria-current type. */\n readonly currentType: SignalLike<\n 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false'\n > = () => this.inputs.currentType();\n\n /** All items in the tree, in document order (DFS-like, a flattened list). */\n readonly items: SignalLike<TreeItemPattern<V>[]> = () => this.inputs.items();\n\n /** The focus strategy used by the tree. */\n readonly focusMode: SignalLike<'roving' | 'activedescendant'> = () => this.inputs.focusMode();\n\n /** Whether the tree is disabled. */\n readonly disabled: SignalLike<boolean> = () => this.inputs.disabled();\n\n /** The currently active item in the tree. */\n readonly activeItem: WritableSignalLike<TreeItemPattern<V> | undefined>;\n\n /** Whether disabled items should be focusable. */\n readonly softDisabled: SignalLike<boolean> = () => this.inputs.softDisabled();\n\n /** Whether the focus should wrap when navigating past the first or last item. */\n readonly wrap: SignalLike<boolean> = () => this.inputs.wrap();\n\n /** The orientation of the tree. */\n readonly orientation: SignalLike<'vertical' | 'horizontal'> = () => this.inputs.orientation();\n\n /** The text direction of the tree. */\n readonly textDirection: SignalLike<'ltr' | 'rtl'> = () => this.textDirection();\n\n /** Whether multiple items can be selected at the same time. */\n readonly multi: SignalLike<boolean> = computed(() => (this.nav() ? false : this.inputs.multi()));\n\n /** The selection mode of the tree. */\n readonly selectionMode: SignalLike<'follow' | 'explicit'> = () => this.inputs.selectionMode();\n\n /** The delay in milliseconds to wait before clearing the typeahead buffer. */\n readonly typeaheadDelay: SignalLike<number> = () => this.inputs.typeaheadDelay();\n\n /** The current selected items of the tree. */\n readonly value: WritableSignalLike<V[]>;\n\n constructor(readonly inputs: TreeInputs<V>) {\n this.activeItem = inputs.activeItem;\n this.value = inputs.value;\n\n this.treeBehavior = new Tree<TreeItemPattern<V>, V>({\n ...inputs,\n multi: this.multi,\n multiExpandable: () => true,\n });\n }\n\n /** Returns a set of violations */\n validate(): string[] {\n const violations: string[] = [];\n\n if (!this.inputs.multi() && this.inputs.value().length > 1) {\n violations.push(\n `A single-select tree should not have multiple selected options. Selected options: ${this.inputs.value().join(', ')}`,\n );\n }\n\n return violations;\n }\n\n /**\n * Sets the tree to it's default initial state.\n *\n * Sets the active index of the tree to the first focusable selected tree item if one exists.\n * Otherwise, sets focus to the first focusable tree item.\n */\n setDefaultState() {\n let firstItem: TreeItemPattern<V> | undefined;\n\n for (const item of this.inputs.items()) {\n if (!item.visible()) continue;\n if (!this.treeBehavior.isFocusable(item)) continue;\n\n if (firstItem === undefined) {\n firstItem = item;\n }\n\n if (item.selected()) {\n this.activeItem.set(item);\n return;\n }\n }\n\n if (firstItem !== undefined) {\n this.activeItem.set(firstItem);\n }\n }\n\n /** Sets the default active state of the tree before receiving interaction for the first time. */\n setDefaultStateEffect(): void {\n if (this.hasBeenInteracted()) return;\n\n this.setDefaultState();\n }\n\n /** Handles keydown events on the tree. */\n onKeydown(event: KeyboardEvent) {\n if (!this.disabled()) {\n this.hasBeenInteracted.set(true);\n this.keydown().handle(event);\n }\n }\n\n /** Handles click events on the tree. */\n onClick(event: PointerEvent) {\n if (!this.disabled()) {\n this.hasBeenInteracted.set(true);\n this.clickManager().handle(event);\n }\n }\n\n /** Handles focusin events on the tree. */\n onFocusIn() {\n this.hasBeenInteracted.set(true);\n }\n\n /** Navigates to the given tree item in the tree. */\n goto(e: PointerEvent, opts?: SelectOptions) {\n const item = this._getItem(e);\n if (!item) return;\n\n this.treeBehavior.goto(item, opts);\n this.treeBehavior.toggleExpansion(item);\n }\n\n /** Expands the active item if possible, otherwise navigates to the first child. */\n _expandOrFirstChild(opts?: SelectOptions) {\n const item = this.treeBehavior.inputs.activeItem();\n if (item && this.treeBehavior.isExpandable(item) && !item.expanded()) {\n this.treeBehavior.expand(item);\n } else {\n this.treeBehavior.firstChild(opts);\n }\n }\n\n /** Collapses the active item if possible, otherwise navigates to the parent. */\n _collapseOrParent(opts?: SelectOptions) {\n const item = this.treeBehavior.inputs.activeItem();\n if (item && this.treeBehavior.isExpandable(item) && item.expanded()) {\n this.treeBehavior.collapse(item);\n } else {\n this.treeBehavior.parent(opts);\n }\n }\n\n /** Retrieves the TreeItemPattern associated with a DOM event, if any. */\n protected _getItem(event: Event): TreeItemPattern<V> | undefined {\n if (!(event.target instanceof HTMLElement)) {\n return;\n }\n const element = event.target.closest('[role=\"treeitem\"]');\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 {TreeInputs, TreePattern, TreeItemPattern} from './tree';\nimport {computed, SignalLike} from '../behaviors/signal-like/signal-like';\nimport {ComboboxPattern, ComboboxTreeControls} from '../combobox/combobox';\n\nexport type ComboboxTreeInputs<V> = TreeInputs<V> & {\n /** The combobox controlling the tree. */\n combobox: SignalLike<ComboboxPattern<TreeItemPattern<V>, V> | undefined>;\n};\n\nexport class ComboboxTreePattern<V>\n extends TreePattern<V>\n implements ComboboxTreeControls<TreeItemPattern<V>, V>\n{\n /** Toggles to expand or collapse a tree item. */\n readonly toggleExpansion = (item?: TreeItemPattern<V>) => this.treeBehavior.toggleExpansion(item);\n\n /** Whether the currently focused item is collapsible. */\n readonly isItemCollapsible = () => this.inputs.activeItem()?.parent() instanceof TreeItemPattern;\n\n /** The ARIA role for the tree. */\n readonly role = () => 'tree' as const;\n\n /* The id of the active (focused) item in the tree. */\n readonly activeId = computed(() => this.treeBehavior.activeDescendant());\n\n /** Returns the currently active (focused) item in the tree. */\n readonly getActiveItem = () => this.inputs.activeItem();\n\n /** The list of items in the tree. */\n override items = computed(() => this.inputs.items());\n\n /** The tab index for the tree. Always -1 because the combobox handles focus. */\n override readonly tabIndex: SignalLike<-1 | 0> = () => -1;\n\n constructor(override readonly inputs: ComboboxTreeInputs<V>) {\n if (inputs.combobox()) {\n inputs.multi = () => false;\n inputs.focusMode = () => 'activedescendant';\n inputs.element = inputs.combobox()!.inputs.inputEl;\n }\n\n super(inputs);\n }\n\n /** Noop. The combobox handles keydown events. */\n override onKeydown(_: KeyboardEvent): void {}\n\n /** Noop. The combobox handles click events. */\n override onClick(_: PointerEvent): void {}\n\n /** Noop. The combobox controls the open state. */\n override setDefaultState(): void {}\n\n /** Navigates to the specified item in the tree. */\n readonly focus = (item: TreeItemPattern<V>) => this.treeBehavior.goto(item);\n\n /** Navigates to the next focusable item in the tree. */\n readonly next = () => this.treeBehavior.next();\n\n /** Navigates to the previous focusable item in the tree. */\n readonly prev = () => this.treeBehavior.prev();\n\n /** Navigates to the last focusable item in the tree. */\n readonly last = () => this.treeBehavior.last();\n\n /** Navigates to the first focusable item in the tree. */\n readonly first = () => this.treeBehavior.first();\n\n /** Unfocuses the currently focused item in the tree. */\n readonly unfocus = () => this.treeBehavior.unfocus();\n\n // TODO: handle non-selectable parent nodes.\n /** Selects the specified item in the tree or the current active item if not provided. */\n readonly select = (item?: TreeItemPattern<V>) => this.treeBehavior.select(item);\n\n /** Toggles the selection state of the given item in the tree or the current active item if not provided. */\n readonly toggle = (item?: TreeItemPattern<V>) => this.treeBehavior.toggle(item);\n\n /** Clears the selection in the tree. */\n readonly clearSelection = () => this.treeBehavior.deselectAll();\n\n /** Retrieves the TreeItemPattern associated with a pointer event. */\n readonly getItem = (e: PointerEvent) => this._getItem(e);\n\n /** Retrieves the currently selected items in the tree */\n readonly getSelectedItems = () => this.inputs.items().filter(item => item.selected());\n\n /** Sets the value of the combobox tree. */\n readonly setValue = (value: V | undefined) => this.inputs.value.set(value ? [value] : []);\n\n /** Expands the currently focused item if it is expandable, or navigates to the first child. */\n readonly expandItem = () => this._expandOrFirstChild();\n\n /** Collapses the currently focused item if it is expandable, or navigates to the parent. */\n readonly collapseItem = () => this._collapseOrParent();\n\n /** Whether the specified item or the currently active item is expandable. */\n isItemExpandable(item: TreeItemPattern<V> | undefined = this.inputs.activeItem()) {\n return item ? item.expandable() : false;\n }\n\n /** Expands all of the tree items. */\n readonly expandAll = () => this.treeBehavior.expandAll();\n\n /** Collapses all of the tree items. */\n readonly collapseAll = () => this.treeBehavior.collapseAll();\n\n /** Whether the currently active item is selectable. */\n readonly isItemSelectable = (item: TreeItemPattern<V> | undefined = this.inputs.activeItem()) => {\n return item ? item.selectable() : false;\n };\n}\n"],"names":["TreeListFocus","ListFocus","isFocusable","item","visible","Tree","inputs","navigationBehavior","selectionBehavior","typeaheadBehavior","focusBehavior","expansionBehavior","disabled","computed","isListDisabled","activeDescendant","getActiveDescendant","tabIndex","getListTabIndex","activeIndex","_anchorIndex","signal","_wrap","constructor","ListSelection","focusManager","ListTypeahead","ListExpansion","ListNavigation","wrap","getItemTabindex","getItemTabIndex","first","opts","_navigate","last","next","prev","firstChild","activeItem","items","children","lastChild","nextSibling","parent","prevSibling","goto","unfocus","set","undefined","anchor","index","search","char","isTyping","select","selectOne","deselect","deselectAll","toggle","toggleOne","toggleAll","toggleExpansion","isExpandable","expand","open","collapse","close","expandSiblings","siblings","filter","i","forEach","s","expandAll","openAll","collapseAll","closeAll","updateSelection","selectRange","rangeStartIndex","operation","moved","TreeItemPattern","id","value","element","searchTerm","tree","indexOf","expandable","hasChildren","selectable","expanded","level","setsize","length","posinset","active","treeBehavior","selected","nav","includes","current","currentType","TreePattern","hasBeenInteracted","followFocus","selectionMode","isRtl","textDirection","prevKey","orientation","nextKey","collapseKey","expandKey","dynamicSpaceKey","typeaheadRegexp","keydown","manager","KeyboardEventManager","on","ignoreRepeat","e","key","Modifier","Shift","_expandOrFirstChild","_collapseOrParent","multi","Any","Ctrl","Meta","preventDefault","clickManager","ClickEventManager","focusMode","softDisabled","typeaheadDelay","multiExpandable","validate","violations","push","join","setDefaultState","firstItem","setDefaultStateEffect","onKeydown","event","handle","onClick","onFocusIn","_getItem","target","HTMLElement","closest","find","ComboboxTreePattern","isItemCollapsible","role","activeId","getActiveItem","combobox","inputEl","_","focus","clearSelection","getItem","getSelectedItems","setValue","expandItem","collapseItem","isItemExpandable","isItemSelectable"],"mappings":";;;;;;AAsDA,MAAMA,aAA2C,SAAQC,SAAY,CAAA;EAC1DC,WAAWA,CAACC,IAAO,EAAA;IAC1B,OAAO,KAAK,CAACD,WAAW,CAACC,IAAI,CAAC,IAAIA,IAAI,CAACC,OAAO,EAAE;AAClD,EAAA;AACD;MAGYC,IAAI,CAAA;EAkCMC,MAAA;EAhCZC,kBAAkB;EAGlBC,iBAAiB;EAGjBC,iBAAiB;EAGjBC,aAAa;EAGbC,iBAAiB;EAGjBC,QAAQ,GAAGC,QAAQ,CAAC,MAAM,IAAI,CAACH,aAAa,CAACI,cAAc,EAAE,CAAC;EAG9DC,gBAAgB,GAAGF,QAAQ,CAAC,MAAM,IAAI,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uC,IAAI,CAACG,MAAM,CAACiC,UAAU,EAAE,EAAA;IAC9E,OAAOpC,IAAI,GAAGA,IAAI,CAACuF,UAAU,EAAE,GAAG,KAAK;AACzC,EAAA;EAGShB,SAAS,GAAGA,MAAM,IAAI,CAACyB,YAAY,CAACzB,SAAS,EAAE;EAG/CE,WAAW,GAAGA,MAAM,IAAI,CAACuB,YAAY,CAACvB,WAAW,EAAE;EAGnDiG,gBAAgB,GAAGA,CAAC1K,IAAA,GAAuC,IAAI,CAACG,MAAM,CAACiC,UAAU,EAAE,KAAI;IAC9F,OAAOpC,IAAI,GAAGA,IAAI,CAACyF,UAAU,EAAE,GAAG,KAAK;EACzC,CAAC;AACF;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_element-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/element.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\nexport interface HasElement {\n element: HTMLElement;\n}\n\n/**\n * Sort directives by their document order.\n */\nexport function sortDirectives(a: HasElement, b: HasElement) {\n return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0\n ? 1\n : -1;\n}\n"],"names":["sortDirectives","a","b","element","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING"],"mappings":"AAeM,SAAUA,cAAcA,CAACC,CAAa,EAAEC,CAAa,EAAA;EACzD,OAAO,CAACD,CAAC,CAACE,OAAO,CAACC,uBAAuB,CAACF,CAAC,CAACC,OAAO,CAAC,GAAGE,IAAI,CAACC,2BAA2B,IAAI,CAAA,GACvF,CAAA,GACA,EAAE;AACR;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"_signal-like-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/keyboard-event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/signal-like/signal-like.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 ignoreRepeat?: boolean;\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 Modifier {\n None = 0,\n Ctrl = 0b1,\n Shift = 0b10,\n Alt = 0b100,\n Meta = 0b1000,\n Any = 'Any',\n}\n\nexport type ModifierInputs = Modifier | Modifier[];\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 && Modifier.Ctrl) |\n (+event.shiftKey && Modifier.Shift) |\n (+event.altKey && Modifier.Alt) |\n (+event.metaKey && Modifier.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\n if (modifiersList.includes(Modifier.Any)) {\n return true;\n }\n\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 Modifier,\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 readonly options: EventHandlerOptions = {\n ignoreRepeat: true,\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>, options?: Partial<EventHandlerOptions>): this;\n\n /** Configures this event manager to handle events with a specific modifer and key combination. */\n on(\n modifiers: ModifierInputs,\n key: KeyCode,\n handler: EventHandler<T>,\n options?: Partial<EventHandlerOptions>,\n ): this;\n\n on(...args: any[]) {\n const {modifiers, key, handler, options} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler: handler,\n matcher: event => this._isMatch(event, key, modifiers, options),\n ...this.options,\n ...options,\n });\n\n return this;\n }\n\n private _normalizeInputs(...args: any[]) {\n const withModifiers = Array.isArray(args[0]) || args[0] in Modifier;\n const modifiers = withModifiers ? args[0] : Modifier.None;\n const key = withModifiers ? args[1] : args[0];\n const handler = withModifiers ? args[2] : args[1];\n const options = withModifiers ? args[3] : args[2];\n\n return {\n key: key as KeyCode,\n handler: handler as EventHandler<T>,\n modifiers: modifiers as ModifierInputs,\n options: (options ?? {}) as Partial<EventHandlerOptions>,\n };\n }\n\n private _isMatch(\n event: T,\n key: KeyCode,\n modifiers: ModifierInputs,\n options?: Partial<EventHandlerOptions>,\n ): boolean {\n if (!hasModifiers(event, modifiers)) {\n return false;\n }\n\n // Default is to ignore repeated key events unless explicitly set to false.\n if (event.repeat && options?.ignoreRepeat !== false) {\n return false;\n }\n\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();\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 createComputed,\n createLinkedSignal,\n createSignal,\n linkedSignalSetFn,\n linkedSignalUpdateFn,\n SIGNAL,\n untracked as primitiveUntracked,\n} from '@angular/core/primitives/signals';\n\nexport {primitiveUntracked as untracked};\n\nexport type SignalLike<T> = () => T;\n\nexport interface WritableSignalLike<T> extends SignalLike<T> {\n set(value: T): void;\n update(updateFn: (value: T) => T): void;\n asReadonly(): SignalLike<T>;\n}\n\n/** Converts a getter setter style signal to a WritableSignalLike. */\nexport function convertGetterSetterToWritableSignalLike<T>(\n getter: () => T,\n setter: (v: T) => void,\n): WritableSignalLike<T> {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: setter,\n update: (updateCallback: (v: T) => T) => setter(updateCallback(getter())),\n asReadonly: () => getter,\n });\n}\n\nexport function computed<T>(computation: () => T): SignalLike<T> {\n const computed = createComputed(computation);\n computed[SIGNAL].debugName = '';\n return computed;\n}\n\nexport function signal<T>(initialValue: T): WritableSignalLike<T> {\n const [get, set, update] = createSignal(initialValue);\n get[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(get, {set, update, asReadonly: () => get});\n}\n\nexport function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T> {\n const getter = createLinkedSignal(sourceFn, s => s);\n getter[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: (v: T) => linkedSignalSetFn(getter[SIGNAL], v),\n update: (updater: (v: T) => T) => linkedSignalUpdateFn(getter[SIGNAL], updater),\n asReadonly: () => getter,\n });\n}\n"],"names":["Modifier","EventManager","configs","handle","event","config","matcher","handler","preventDefault","stopPropagation","getModifiers","ctrlKey","Ctrl","shiftKey","Shift","altKey","Alt","metaKey","Meta","hasModifiers","modifiers","eventModifiers","modifiersList","Array","isArray","includes","Any","some","KeyboardEventManager","options","ignoreRepeat","on","args","key","_normalizeInputs","push","_isMatch","withModifiers","None","repeat","RegExp","test","keyStr","toLowerCase","convertGetterSetterToWritableSignalLike","getter","setter","Object","assign","set","update","updateCallback","asReadonly","computed","computation","createComputed","SIGNAL","debugName","signal","initialValue","get","createSignal","linkedSignal","sourceFn","createLinkedSignal","s","v","linkedSignalSetFn","updater","linkedSignalUpdateFn"],"mappings":";;IA4CYA;AAAZ,CAAA,UAAYA,QAAQ,EAAA;EAClBA,QAAA,CAAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;EACRA,QAAA,CAAAA,QAAA,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from '@angular/core';
|
|
2
|
-
import { inject, Renderer2, ElementRef, signal, input, booleanAttribute, model, computed, afterRenderEffect, Directive, InjectionToken } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/aria/private';
|
|
4
|
-
import { DeferredContentAware, SimpleComboboxPattern, DeferredContent, SimpleComboboxPopupPattern } from '@angular/aria/private';
|
|
5
|
-
export { DeferredContent as ɵɵDeferredContent, DeferredContentAware as ɵɵDeferredContentAware } from './_deferred-content-chunk.mjs';
|
|
6
|
-
|
|
7
|
-
class Combobox extends DeferredContentAware {
|
|
8
|
-
_renderer = inject(Renderer2);
|
|
9
|
-
_elementRef = inject(ElementRef);
|
|
10
|
-
element = this._elementRef.nativeElement;
|
|
11
|
-
_popup = signal(undefined, ...(ngDevMode ? [{
|
|
12
|
-
debugName: "_popup"
|
|
13
|
-
}] : []));
|
|
14
|
-
disabled = input(false, {
|
|
15
|
-
...(ngDevMode ? {
|
|
16
|
-
debugName: "disabled"
|
|
17
|
-
} : {}),
|
|
18
|
-
transform: booleanAttribute
|
|
19
|
-
});
|
|
20
|
-
alwaysExpanded = input(false, {
|
|
21
|
-
...(ngDevMode ? {
|
|
22
|
-
debugName: "alwaysExpanded"
|
|
23
|
-
} : {}),
|
|
24
|
-
transform: booleanAttribute
|
|
25
|
-
});
|
|
26
|
-
expanded = model(false, ...(ngDevMode ? [{
|
|
27
|
-
debugName: "expanded"
|
|
28
|
-
}] : []));
|
|
29
|
-
value = model('', ...(ngDevMode ? [{
|
|
30
|
-
debugName: "value"
|
|
31
|
-
}] : []));
|
|
32
|
-
inlineSuggestion = input(undefined, ...(ngDevMode ? [{
|
|
33
|
-
debugName: "inlineSuggestion"
|
|
34
|
-
}] : []));
|
|
35
|
-
_pattern = new SimpleComboboxPattern({
|
|
36
|
-
...this,
|
|
37
|
-
element: () => this.element,
|
|
38
|
-
expandable: () => true,
|
|
39
|
-
popup: computed(() => this._popup()?._pattern)
|
|
40
|
-
});
|
|
41
|
-
constructor() {
|
|
42
|
-
super();
|
|
43
|
-
afterRenderEffect(() => this._pattern.keyboardEventRelayEffect());
|
|
44
|
-
afterRenderEffect(() => this._pattern.closePopupOnBlurEffect());
|
|
45
|
-
afterRenderEffect(() => {
|
|
46
|
-
this.contentVisible.set(this._pattern.isExpanded());
|
|
47
|
-
});
|
|
48
|
-
if (this._pattern.isEditable()) {
|
|
49
|
-
afterRenderEffect(() => {
|
|
50
|
-
this._renderer.setProperty(this.element, 'value', this.value());
|
|
51
|
-
});
|
|
52
|
-
afterRenderEffect(() => {
|
|
53
|
-
this._pattern.highlightEffect();
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
ngOnInit() {
|
|
58
|
-
if (this.alwaysExpanded()) {
|
|
59
|
-
this.expanded.set(true);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
_registerPopup(popup) {
|
|
63
|
-
this._popup.set(popup);
|
|
64
|
-
}
|
|
65
|
-
_unregisterPopup() {
|
|
66
|
-
this._popup.set(undefined);
|
|
67
|
-
}
|
|
68
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
69
|
-
minVersion: "12.0.0",
|
|
70
|
-
version: "22.0.0-next.9",
|
|
71
|
-
ngImport: i0,
|
|
72
|
-
type: Combobox,
|
|
73
|
-
deps: [],
|
|
74
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
75
|
-
});
|
|
76
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
77
|
-
minVersion: "17.1.0",
|
|
78
|
-
version: "22.0.0-next.9",
|
|
79
|
-
type: Combobox,
|
|
80
|
-
isStandalone: true,
|
|
81
|
-
selector: "[ngCombobox]",
|
|
82
|
-
inputs: {
|
|
83
|
-
disabled: {
|
|
84
|
-
classPropertyName: "disabled",
|
|
85
|
-
publicName: "disabled",
|
|
86
|
-
isSignal: true,
|
|
87
|
-
isRequired: false,
|
|
88
|
-
transformFunction: null
|
|
89
|
-
},
|
|
90
|
-
alwaysExpanded: {
|
|
91
|
-
classPropertyName: "alwaysExpanded",
|
|
92
|
-
publicName: "alwaysExpanded",
|
|
93
|
-
isSignal: true,
|
|
94
|
-
isRequired: false,
|
|
95
|
-
transformFunction: null
|
|
96
|
-
},
|
|
97
|
-
expanded: {
|
|
98
|
-
classPropertyName: "expanded",
|
|
99
|
-
publicName: "expanded",
|
|
100
|
-
isSignal: true,
|
|
101
|
-
isRequired: false,
|
|
102
|
-
transformFunction: null
|
|
103
|
-
},
|
|
104
|
-
value: {
|
|
105
|
-
classPropertyName: "value",
|
|
106
|
-
publicName: "value",
|
|
107
|
-
isSignal: true,
|
|
108
|
-
isRequired: false,
|
|
109
|
-
transformFunction: null
|
|
110
|
-
},
|
|
111
|
-
inlineSuggestion: {
|
|
112
|
-
classPropertyName: "inlineSuggestion",
|
|
113
|
-
publicName: "inlineSuggestion",
|
|
114
|
-
isSignal: true,
|
|
115
|
-
isRequired: false,
|
|
116
|
-
transformFunction: null
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
outputs: {
|
|
120
|
-
expanded: "expandedChange",
|
|
121
|
-
value: "valueChange"
|
|
122
|
-
},
|
|
123
|
-
host: {
|
|
124
|
-
attributes: {
|
|
125
|
-
"role": "combobox"
|
|
126
|
-
},
|
|
127
|
-
listeners: {
|
|
128
|
-
"keydown": "_pattern.onKeydown($event)",
|
|
129
|
-
"focusin": "_pattern.onFocusin()",
|
|
130
|
-
"focusout": "_pattern.onFocusout($event)",
|
|
131
|
-
"click": "_pattern.onClick($event)",
|
|
132
|
-
"input": "_pattern.onInput($event)"
|
|
133
|
-
},
|
|
134
|
-
properties: {
|
|
135
|
-
"attr.aria-autocomplete": "_pattern.autocomplete()",
|
|
136
|
-
"attr.aria-disabled": "_pattern.disabled()",
|
|
137
|
-
"attr.aria-expanded": "_pattern.isExpanded()",
|
|
138
|
-
"attr.aria-activedescendant": "_pattern.activeDescendant()",
|
|
139
|
-
"attr.aria-controls": "_pattern.popupId()",
|
|
140
|
-
"attr.aria-haspopup": "_pattern.popupType()"
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
|
-
exportAs: ["ngCombobox"],
|
|
144
|
-
usesInheritance: true,
|
|
145
|
-
ngImport: i0
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
149
|
-
minVersion: "12.0.0",
|
|
150
|
-
version: "22.0.0-next.9",
|
|
151
|
-
ngImport: i0,
|
|
152
|
-
type: Combobox,
|
|
153
|
-
decorators: [{
|
|
154
|
-
type: Directive,
|
|
155
|
-
args: [{
|
|
156
|
-
selector: '[ngCombobox]',
|
|
157
|
-
exportAs: 'ngCombobox',
|
|
158
|
-
host: {
|
|
159
|
-
'role': 'combobox',
|
|
160
|
-
'[attr.aria-autocomplete]': '_pattern.autocomplete()',
|
|
161
|
-
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
162
|
-
'[attr.aria-expanded]': '_pattern.isExpanded()',
|
|
163
|
-
'[attr.aria-activedescendant]': '_pattern.activeDescendant()',
|
|
164
|
-
'[attr.aria-controls]': '_pattern.popupId()',
|
|
165
|
-
'[attr.aria-haspopup]': '_pattern.popupType()',
|
|
166
|
-
'(keydown)': '_pattern.onKeydown($event)',
|
|
167
|
-
'(focusin)': '_pattern.onFocusin()',
|
|
168
|
-
'(focusout)': '_pattern.onFocusout($event)',
|
|
169
|
-
'(click)': '_pattern.onClick($event)',
|
|
170
|
-
'(input)': '_pattern.onInput($event)'
|
|
171
|
-
}
|
|
172
|
-
}]
|
|
173
|
-
}],
|
|
174
|
-
ctorParameters: () => [],
|
|
175
|
-
propDecorators: {
|
|
176
|
-
disabled: [{
|
|
177
|
-
type: i0.Input,
|
|
178
|
-
args: [{
|
|
179
|
-
isSignal: true,
|
|
180
|
-
alias: "disabled",
|
|
181
|
-
required: false
|
|
182
|
-
}]
|
|
183
|
-
}],
|
|
184
|
-
alwaysExpanded: [{
|
|
185
|
-
type: i0.Input,
|
|
186
|
-
args: [{
|
|
187
|
-
isSignal: true,
|
|
188
|
-
alias: "alwaysExpanded",
|
|
189
|
-
required: false
|
|
190
|
-
}]
|
|
191
|
-
}],
|
|
192
|
-
expanded: [{
|
|
193
|
-
type: i0.Input,
|
|
194
|
-
args: [{
|
|
195
|
-
isSignal: true,
|
|
196
|
-
alias: "expanded",
|
|
197
|
-
required: false
|
|
198
|
-
}]
|
|
199
|
-
}, {
|
|
200
|
-
type: i0.Output,
|
|
201
|
-
args: ["expandedChange"]
|
|
202
|
-
}],
|
|
203
|
-
value: [{
|
|
204
|
-
type: i0.Input,
|
|
205
|
-
args: [{
|
|
206
|
-
isSignal: true,
|
|
207
|
-
alias: "value",
|
|
208
|
-
required: false
|
|
209
|
-
}]
|
|
210
|
-
}, {
|
|
211
|
-
type: i0.Output,
|
|
212
|
-
args: ["valueChange"]
|
|
213
|
-
}],
|
|
214
|
-
inlineSuggestion: [{
|
|
215
|
-
type: i0.Input,
|
|
216
|
-
args: [{
|
|
217
|
-
isSignal: true,
|
|
218
|
-
alias: "inlineSuggestion",
|
|
219
|
-
required: false
|
|
220
|
-
}]
|
|
221
|
-
}]
|
|
222
|
-
}
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
const SIMPLE_COMBOBOX_POPUP = new InjectionToken('SIMPLE_COMBOBOX_POPUP');
|
|
226
|
-
|
|
227
|
-
class ComboboxPopup {
|
|
228
|
-
_deferredContent = inject(DeferredContent);
|
|
229
|
-
combobox = input.required(...(ngDevMode ? [{
|
|
230
|
-
debugName: "combobox"
|
|
231
|
-
}] : []));
|
|
232
|
-
_widget = signal(undefined, ...(ngDevMode ? [{
|
|
233
|
-
debugName: "_widget"
|
|
234
|
-
}] : []));
|
|
235
|
-
controlTarget = computed(() => this._widget()?.element, ...(ngDevMode ? [{
|
|
236
|
-
debugName: "controlTarget"
|
|
237
|
-
}] : []));
|
|
238
|
-
popupId = computed(() => this._widget()?.popupId(), ...(ngDevMode ? [{
|
|
239
|
-
debugName: "popupId"
|
|
240
|
-
}] : []));
|
|
241
|
-
activeDescendant = computed(() => this._widget()?.activeDescendant(), ...(ngDevMode ? [{
|
|
242
|
-
debugName: "activeDescendant"
|
|
243
|
-
}] : []));
|
|
244
|
-
popupType = input('listbox', ...(ngDevMode ? [{
|
|
245
|
-
debugName: "popupType"
|
|
246
|
-
}] : []));
|
|
247
|
-
_pattern = new SimpleComboboxPopupPattern({
|
|
248
|
-
...this
|
|
249
|
-
});
|
|
250
|
-
ngOnInit() {
|
|
251
|
-
this.combobox()._registerPopup(this);
|
|
252
|
-
this._deferredContent.deferredContentAware.set(this.combobox());
|
|
253
|
-
}
|
|
254
|
-
ngOnDestroy() {
|
|
255
|
-
this.combobox()._unregisterPopup();
|
|
256
|
-
}
|
|
257
|
-
_registerWidget(widget) {
|
|
258
|
-
this._widget.set(widget);
|
|
259
|
-
}
|
|
260
|
-
_unregisterWidget() {
|
|
261
|
-
this._widget.set(undefined);
|
|
262
|
-
}
|
|
263
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
264
|
-
minVersion: "12.0.0",
|
|
265
|
-
version: "22.0.0-next.9",
|
|
266
|
-
ngImport: i0,
|
|
267
|
-
type: ComboboxPopup,
|
|
268
|
-
deps: [],
|
|
269
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
270
|
-
});
|
|
271
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
272
|
-
minVersion: "17.1.0",
|
|
273
|
-
version: "22.0.0-next.9",
|
|
274
|
-
type: ComboboxPopup,
|
|
275
|
-
isStandalone: true,
|
|
276
|
-
selector: "ng-template[ngComboboxPopup]",
|
|
277
|
-
inputs: {
|
|
278
|
-
combobox: {
|
|
279
|
-
classPropertyName: "combobox",
|
|
280
|
-
publicName: "combobox",
|
|
281
|
-
isSignal: true,
|
|
282
|
-
isRequired: true,
|
|
283
|
-
transformFunction: null
|
|
284
|
-
},
|
|
285
|
-
popupType: {
|
|
286
|
-
classPropertyName: "popupType",
|
|
287
|
-
publicName: "popupType",
|
|
288
|
-
isSignal: true,
|
|
289
|
-
isRequired: false,
|
|
290
|
-
transformFunction: null
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
providers: [{
|
|
294
|
-
provide: SIMPLE_COMBOBOX_POPUP,
|
|
295
|
-
useExisting: ComboboxPopup
|
|
296
|
-
}],
|
|
297
|
-
exportAs: ["ngComboboxPopup"],
|
|
298
|
-
hostDirectives: [{
|
|
299
|
-
directive: i1.DeferredContent
|
|
300
|
-
}],
|
|
301
|
-
ngImport: i0
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
305
|
-
minVersion: "12.0.0",
|
|
306
|
-
version: "22.0.0-next.9",
|
|
307
|
-
ngImport: i0,
|
|
308
|
-
type: ComboboxPopup,
|
|
309
|
-
decorators: [{
|
|
310
|
-
type: Directive,
|
|
311
|
-
args: [{
|
|
312
|
-
selector: 'ng-template[ngComboboxPopup]',
|
|
313
|
-
exportAs: 'ngComboboxPopup',
|
|
314
|
-
hostDirectives: [DeferredContent],
|
|
315
|
-
providers: [{
|
|
316
|
-
provide: SIMPLE_COMBOBOX_POPUP,
|
|
317
|
-
useExisting: ComboboxPopup
|
|
318
|
-
}]
|
|
319
|
-
}]
|
|
320
|
-
}],
|
|
321
|
-
propDecorators: {
|
|
322
|
-
combobox: [{
|
|
323
|
-
type: i0.Input,
|
|
324
|
-
args: [{
|
|
325
|
-
isSignal: true,
|
|
326
|
-
alias: "combobox",
|
|
327
|
-
required: true
|
|
328
|
-
}]
|
|
329
|
-
}],
|
|
330
|
-
popupType: [{
|
|
331
|
-
type: i0.Input,
|
|
332
|
-
args: [{
|
|
333
|
-
isSignal: true,
|
|
334
|
-
alias: "popupType",
|
|
335
|
-
required: false
|
|
336
|
-
}]
|
|
337
|
-
}]
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
class ComboboxWidget {
|
|
342
|
-
_elementRef = inject(ElementRef);
|
|
343
|
-
_popup = inject(SIMPLE_COMBOBOX_POPUP);
|
|
344
|
-
element = this._elementRef.nativeElement;
|
|
345
|
-
popupId = signal(undefined, ...(ngDevMode ? [{
|
|
346
|
-
debugName: "popupId"
|
|
347
|
-
}] : []));
|
|
348
|
-
activeDescendant = input(undefined, ...(ngDevMode ? [{
|
|
349
|
-
debugName: "activeDescendant"
|
|
350
|
-
}] : []));
|
|
351
|
-
_observer;
|
|
352
|
-
constructor() {
|
|
353
|
-
const el = this.element;
|
|
354
|
-
this._observer = new MutationObserver(mutations => {
|
|
355
|
-
for (const mutation of mutations) {
|
|
356
|
-
if (mutation.attributeName === 'id') {
|
|
357
|
-
this.popupId.set(el.id);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
this._observer.observe(el, {
|
|
362
|
-
attributes: true,
|
|
363
|
-
attributeFilter: ['id']
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
ngOnInit() {
|
|
367
|
-
this.popupId.set(this.element.id);
|
|
368
|
-
this._popup._registerWidget(this);
|
|
369
|
-
}
|
|
370
|
-
ngOnDestroy() {
|
|
371
|
-
this._observer?.disconnect();
|
|
372
|
-
this._popup._unregisterWidget();
|
|
373
|
-
}
|
|
374
|
-
onFocusin() {
|
|
375
|
-
this._popup._pattern.onFocusin();
|
|
376
|
-
}
|
|
377
|
-
onFocusout(event) {
|
|
378
|
-
this._popup._pattern.onFocusout(event);
|
|
379
|
-
}
|
|
380
|
-
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
381
|
-
minVersion: "12.0.0",
|
|
382
|
-
version: "22.0.0-next.9",
|
|
383
|
-
ngImport: i0,
|
|
384
|
-
type: ComboboxWidget,
|
|
385
|
-
deps: [],
|
|
386
|
-
target: i0.ɵɵFactoryTarget.Directive
|
|
387
|
-
});
|
|
388
|
-
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
389
|
-
minVersion: "17.1.0",
|
|
390
|
-
version: "22.0.0-next.9",
|
|
391
|
-
type: ComboboxWidget,
|
|
392
|
-
isStandalone: true,
|
|
393
|
-
selector: "[ngComboboxWidget]",
|
|
394
|
-
inputs: {
|
|
395
|
-
activeDescendant: {
|
|
396
|
-
classPropertyName: "activeDescendant",
|
|
397
|
-
publicName: "activeDescendant",
|
|
398
|
-
isSignal: true,
|
|
399
|
-
isRequired: false,
|
|
400
|
-
transformFunction: null
|
|
401
|
-
}
|
|
402
|
-
},
|
|
403
|
-
host: {
|
|
404
|
-
listeners: {
|
|
405
|
-
"focusin": "onFocusin()",
|
|
406
|
-
"focusout": "onFocusout($event)"
|
|
407
|
-
}
|
|
408
|
-
},
|
|
409
|
-
exportAs: ["ngComboboxWidget"],
|
|
410
|
-
ngImport: i0
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
414
|
-
minVersion: "12.0.0",
|
|
415
|
-
version: "22.0.0-next.9",
|
|
416
|
-
ngImport: i0,
|
|
417
|
-
type: ComboboxWidget,
|
|
418
|
-
decorators: [{
|
|
419
|
-
type: Directive,
|
|
420
|
-
args: [{
|
|
421
|
-
selector: '[ngComboboxWidget]',
|
|
422
|
-
exportAs: 'ngComboboxWidget',
|
|
423
|
-
host: {
|
|
424
|
-
'(focusin)': 'onFocusin()',
|
|
425
|
-
'(focusout)': 'onFocusout($event)'
|
|
426
|
-
}
|
|
427
|
-
}]
|
|
428
|
-
}],
|
|
429
|
-
ctorParameters: () => [],
|
|
430
|
-
propDecorators: {
|
|
431
|
-
activeDescendant: [{
|
|
432
|
-
type: i0.Input,
|
|
433
|
-
args: [{
|
|
434
|
-
isSignal: true,
|
|
435
|
-
alias: "activeDescendant",
|
|
436
|
-
required: false
|
|
437
|
-
}]
|
|
438
|
-
}]
|
|
439
|
-
}
|
|
440
|
-
});
|
|
441
|
-
|
|
442
|
-
export { Combobox, ComboboxPopup, ComboboxWidget };
|
|
443
|
-
//# sourceMappingURL=simple-combobox.mjs.map
|