@angular/cdk-experimental 20.2.0-next.1 → 20.2.0-next.3
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/accordion/index.d.ts +3 -3
- package/{accordion.d-CC6dGMlv.d.ts → accordion.d.d.ts} +7 -5
- package/{expansion.d-Zkcf-XJU.d.ts → expansion.d.d.ts} +3 -3
- package/fesm2022/accordion.mjs +17 -17
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/{accordion-D9JoxtzT.mjs → accordion2.mjs} +8 -6
- package/fesm2022/accordion2.mjs.map +1 -0
- package/fesm2022/cdk-experimental.mjs +1 -1
- package/fesm2022/cdk-experimental.mjs.map +1 -1
- package/fesm2022/column-resize.mjs +54 -54
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/combobox.mjs +10 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +6 -6
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/{expansion-C9iQLHOG.mjs → expansion.mjs} +2 -2
- package/fesm2022/expansion.mjs.map +1 -0
- package/fesm2022/{list-focus-Czul8jzR.mjs → list-navigation.mjs} +63 -62
- package/fesm2022/list-navigation.mjs.map +1 -0
- package/fesm2022/list.mjs +355 -0
- package/fesm2022/list.mjs.map +1 -0
- package/fesm2022/listbox.mjs +12 -13
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/option.mjs +231 -0
- package/fesm2022/option.mjs.map +1 -0
- package/fesm2022/{polyfill-CXksG4af.mjs → polyfill.mjs} +2 -2
- package/fesm2022/polyfill.mjs.map +1 -0
- package/fesm2022/popover-edit.mjs +44 -44
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/{radio-button-92xc4w-A.mjs → radio-button.mjs} +33 -70
- package/fesm2022/radio-button.mjs.map +1 -0
- package/fesm2022/radio-group.mjs +10 -10
- package/fesm2022/radio-group.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 +7 -7
- package/fesm2022/table-scroll-container.mjs.map +1 -1
- package/fesm2022/tabs.mjs +20 -20
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/{tabs-hMdwtXv2.mjs → tabs2.mjs} +34 -70
- package/fesm2022/tabs2.mjs.map +1 -0
- package/fesm2022/tree.mjs +87 -159
- package/fesm2022/tree.mjs.map +1 -1
- package/fesm2022/ui-patterns.mjs +7 -8
- package/fesm2022/ui-patterns.mjs.map +1 -1
- package/list.d.d.ts +207 -0
- package/listbox/index.d.ts +5 -6
- package/{listbox.d-Ckp1is82.d.ts → listbox.d.d.ts} +9 -62
- package/package.json +2 -2
- package/{pointer-event-manager.d-BqSm9Jh5.d.ts → pointer-event-manager.d.d.ts} +12 -8
- package/radio-group/index.d.ts +4 -4
- package/{radio-group.d-CFC0aKQM.d.ts → radio-group.d.d.ts} +12 -31
- package/tabs/index.d.ts +4 -4
- package/{tabs.d-Db8oTrMB.d.ts → tabs.d.d.ts} +15 -30
- package/tree/index.d.ts +10 -39
- package/ui-patterns/index.d.ts +7 -8
- package/fesm2022/accordion-D9JoxtzT.mjs.map +0 -1
- package/fesm2022/expansion-C9iQLHOG.mjs.map +0 -1
- package/fesm2022/list-focus-Czul8jzR.mjs.map +0 -1
- package/fesm2022/list-selection-C41ApAbt.mjs +0 -136
- package/fesm2022/list-selection-C41ApAbt.mjs.map +0 -1
- package/fesm2022/list-typeahead-DIIbNJrP.mjs +0 -64
- package/fesm2022/list-typeahead-DIIbNJrP.mjs.map +0 -1
- package/fesm2022/option-CgeKz9_Q.mjs +0 -321
- package/fesm2022/option-CgeKz9_Q.mjs.map +0 -1
- package/fesm2022/polyfill-CXksG4af.mjs.map +0 -1
- package/fesm2022/radio-button-92xc4w-A.mjs.map +0 -1
- package/fesm2022/tabs-hMdwtXv2.mjs.map +0 -1
- package/list-selection.d-fbAPr_N_.d.ts +0 -69
- package/list-typeahead.d-ljh3nJ9y.d.ts +0 -48
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"option-CgeKz9_Q.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/listbox/listbox.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/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\nimport {OptionPattern} from './option';\nimport {KeyboardEventManager, PointerEventManager, Modifier} from '../behaviors/event-manager';\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, signal} from '@angular/core';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\n\n/** The selection operations that the listbox 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 listbox. */\nexport type ListboxInputs<V> = ListNavigationInputs<OptionPattern<V>> &\n ListSelectionInputs<OptionPattern<V>, V> &\n ListTypeaheadInputs<OptionPattern<V>> &\n ListFocusInputs<OptionPattern<V>> & {\n readonly: SignalLike<boolean>;\n };\n\n/** Controls the state of a listbox. */\nexport class ListboxPattern<V> {\n /** Controls navigation for the listbox. */\n navigation: ListNavigation<OptionPattern<V>>;\n\n /** Controls selection for the listbox. */\n selection: ListSelection<OptionPattern<V>, V>;\n\n /** Controls typeahead for the listbox. */\n typeahead: ListTypeahead<OptionPattern<V>>;\n\n /** Controls focus for the listbox. */\n focusManager: ListFocus<OptionPattern<V>>;\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation: SignalLike<'vertical' | 'horizontal'>;\n\n /** Whether the listbox is disabled. */\n disabled = computed(() => this.focusManager.isListDisabled());\n\n /** Whether the listbox is readonly. */\n readonly: 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 multi: 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 /** Whether the listbox should wrap. Used to disable wrapping while range selecting. */\n wrap = signal(true);\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 /** Represents the space key. Does nothing when the user is actively using typeahead. */\n dynamicSpaceKey = computed(() => (this.typeahead.isTyping() ? '' : ' '));\n\n /** The regexp used to decide if a key should trigger typeahead. */\n typeaheadRegexp = /^.$/; // TODO: Ignore spaces?\n\n /**\n * The uncommitted index for selecting a range of options.\n *\n * NOTE: This is subtly distinct from the \"rangeStartIndex\" in the ListSelection behavior.\n * The anchorIndex does not necessarily represent the start of a range, but represents the most\n * recent index where the user showed intent to begin a range selection. Usually, this is wherever\n * the user most recently pressed the \"Shift\" key, but if the user presses shift + space to select\n * from the anchor, the user is not intending to start a new range from this index.\n *\n * In other words, \"rangeStartIndex\" is only set when a user commits to starting a range selection\n * while \"anchorIndex\" is set whenever a user indicates they may be starting a range selection.\n */\n anchorIndex = signal(0);\n\n /** The keydown event manager for the listbox. */\n keydown = computed(() => {\n const manager = new KeyboardEventManager();\n\n if (this.readonly()) {\n return 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())\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.multi()) {\n manager\n .on(Modifier.Any, 'Shift', () => this.anchorIndex.set(this.inputs.activeIndex()))\n .on(Modifier.Shift, this.prevKey, () => this.prev({selectRange: true}))\n .on(Modifier.Shift, this.nextKey, () => this.next({selectRange: true}))\n .on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'Home', () =>\n this.first({selectRange: true, anchor: false}),\n )\n .on([Modifier.Ctrl | Modifier.Shift, Modifier.Meta | Modifier.Shift], 'End', () =>\n this.last({selectRange: true, anchor: false}),\n )\n .on(Modifier.Shift, 'Enter', () =>\n this._updateSelection({selectRange: true, anchor: false}),\n )\n .on(Modifier.Shift, this.dynamicSpaceKey, () =>\n this._updateSelection({selectRange: true, anchor: false}),\n );\n }\n\n if (!this.followFocus() && this.inputs.multi()) {\n manager\n .on(this.dynamicSpaceKey, () => this.selection.toggle())\n .on('Enter', () => this.selection.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'A', () => this.selection.toggleAll());\n }\n\n if (!this.followFocus() && !this.inputs.multi()) {\n manager.on(this.dynamicSpaceKey, () => this.selection.toggleOne());\n manager.on('Enter', () => this.selection.toggleOne());\n }\n\n if (this.inputs.multi() && this.followFocus()) {\n manager\n .on([Modifier.Ctrl, Modifier.Meta], this.prevKey, () => this.prev())\n .on([Modifier.Ctrl, Modifier.Meta], this.nextKey, () => this.next())\n .on([Modifier.Ctrl, Modifier.Meta], ' ', () => this.selection.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'Enter', () => this.selection.toggle())\n .on([Modifier.Ctrl, Modifier.Meta], 'Home', () => this.first())\n .on([Modifier.Ctrl, Modifier.Meta], 'End', () => this.last())\n .on([Modifier.Ctrl, Modifier.Meta], 'A', () => {\n this.selection.toggleAll();\n this.selection.select(); // Ensure the currect option remains selected.\n });\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.readonly()) {\n return manager.on(e => this.goto(e));\n }\n\n if (this.multi()) {\n manager.on(Modifier.Shift, e => this.goto(e, {selectRange: true}));\n }\n\n if (!this.multi() && this.followFocus()) {\n return manager.on(e => this.goto(e, {selectOne: true}));\n }\n\n if (!this.multi() && !this.followFocus()) {\n return manager.on(e => this.goto(e, {toggle: true}));\n }\n\n if (this.multi() && this.followFocus()) {\n return manager\n .on(e => this.goto(e, {selectOne: true}))\n .on(Modifier.Ctrl, e => this.goto(e, {toggle: true}));\n }\n\n if (this.multi() && !this.followFocus()) {\n return manager.on(e => this.goto(e, {toggle: true}));\n }\n\n return manager;\n });\n\n constructor(readonly inputs: ListboxInputs<V>) {\n this.readonly = inputs.readonly;\n this.orientation = inputs.orientation;\n this.multi = inputs.multi;\n\n this.focusManager = new ListFocus(inputs);\n this.selection = new ListSelection({...inputs, focusManager: this.focusManager});\n this.typeahead = new ListTypeahead({...inputs, focusManager: this.focusManager});\n this.navigation = new ListNavigation({\n ...inputs,\n focusManager: this.focusManager,\n wrap: computed(() => this.wrap() && this.inputs.wrap()),\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 listbox should not have multiple selected options. Selected options: ${this.inputs.value().join(', ')}`,\n );\n }\n\n if (\n this.inputs.items.length &&\n (this.inputs.activeIndex() < 0 || this.inputs.activeIndex() >= this.inputs.items().length)\n ) {\n violations.push(\n `The active index is out of bounds. Number of options: ${this.inputs.items().length} Active index: ${this.inputs.activeIndex()}.`,\n );\n }\n\n return violations;\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._navigate(opts, () => this.navigation.first());\n }\n\n /** Navigates to the last option in the listbox. */\n last(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.last());\n }\n\n /** Navigates to the next option in the listbox. */\n next(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.next());\n }\n\n /** Navigates to the previous option in the listbox. */\n prev(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.prev());\n }\n\n /** Navigates to the given item in the listbox. */\n goto(event: PointerEvent, opts?: SelectOptions) {\n const item = this._getItem(event);\n this._navigate(opts, () => this.navigation.goto(item));\n }\n\n /** Handles typeahead search navigation for the listbox. */\n search(char: string, opts?: SelectOptions) {\n this._navigate(opts, () => this.typeahead.search(char));\n }\n\n /**\n * Sets the listbox to it's default initial state.\n *\n * Sets the active index of the listbox to the first focusable selected\n * item if one exists. Otherwise, sets focus to the first focusable item.\n *\n * This method should be called once the listbox and it's options are properly initialized,\n * meaning the ListboxPattern and OptionPatterns should have references to each other before this\n * is called.\n */\n setDefaultState() {\n let firstItem: OptionPattern<V> | null = null;\n\n for (const item of this.inputs.items()) {\n if (this.focusManager.isFocusable(item)) {\n if (!firstItem) {\n firstItem = item;\n }\n if (item.selected()) {\n this.inputs.activeIndex.set(item.index());\n return;\n }\n }\n }\n\n if (firstItem) {\n this.inputs.activeIndex.set(firstItem.index());\n }\n }\n\n /**\n * Safely performs a navigation operation.\n *\n * Handles conditionally disabling wrapping for when a navigation\n * operation is occurring while the user is selecting a range of options.\n *\n * Handles boilerplate calling of focus & selection operations. Also ensures these\n * additional operations are only called if the navigation operation moved focus to a new option.\n */\n private _navigate(opts: SelectOptions = {}, operation: () => boolean) {\n if (opts?.selectRange) {\n this.wrap.set(false);\n this.selection.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 /** Handles updating selection for the listbox. */\n private _updateSelection(opts: SelectOptions = {anchor: true}) {\n if (opts.toggle) {\n this.selection.toggle();\n }\n if (opts.selectOne) {\n this.selection.selectOne();\n }\n if (opts.selectRange) {\n this.selection.selectRange();\n }\n if (!opts.anchor) {\n this.anchorIndex.set(this.selection.rangeStartIndex());\n }\n }\n\n private _getItem(e: PointerEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n\n const element = e.target.closest('[role=\"option\"]');\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<V> {\n focusManager: ListFocus<OptionPattern<V>>;\n selection: ListSelection<OptionPattern<V>, V>;\n navigation: ListNavigation<OptionPattern<V>>;\n}\n\n/** Represents the required inputs for an option in a listbox. */\nexport interface OptionInputs<V>\n extends ListNavigationItem,\n ListSelectionItem<V>,\n ListTypeaheadItem,\n ListFocusItem {\n listbox: SignalLike<ListboxPattern<V> | undefined>;\n}\n\n/** Represents an option in a listbox. */\nexport class OptionPattern<V> {\n /** A unique identifier for the option. */\n id: SignalLike<string>;\n\n /** The value of the option. */\n value: SignalLike<V>;\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 active. */\n active = computed(() => this.listbox()?.focusManager.activeItem() === this);\n\n /** Whether the option is selected. */\n selected = computed(() => this.listbox()?.selection.inputs.value().includes(this.value()));\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<V> | undefined>;\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<V>) {\n this.id = args.id;\n this.value = args.value;\n this.listbox = args.listbox;\n this.element = args.element;\n this.disabled = args.disabled;\n this.searchTerm = args.searchTerm;\n }\n}\n"],"names":[],"mappings":";;;;;AAiCA;MACa,cAAc,CAAA;AA4LJ,IAAA,MAAA;;AA1LrB,IAAA,UAAU;;AAGV,IAAA,SAAS;;AAGT,IAAA,SAAS;;AAGT,IAAA,YAAY;;AAGZ,IAAA,WAAW;;AAGX,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;;AAG7D,IAAA,QAAQ;;AAGR,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAA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,EAAE,YAAY,CAAC,UAAU,EAAE,KAAK,IAAI,CAAC;;IAG3E,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;;AAG1F,IAAA,QAAQ;;AAGR,IAAA,UAAU;;AAGV,IAAA,OAAO;;AAGP,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;;AAG7E,IAAA,OAAO;AAEP,IAAA,WAAA,CAAY,IAAqB,EAAA;AAC/B,QAAA,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE;AACjB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK;AACvB,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;AAC3B,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;AAC3B,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ;AAC7B,QAAA,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU;;AAEpC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polyfill-CXksG4af.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/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;;IAGb,IAAI,IAAI,GAAgB,OAAO;IAC/B,OAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,YAAY,OAAO,CAAC,EAAE;AACjD,QAAA,IAAI,GAAG,IAAI,CAAC,UAAU;;IAGxB,OAAO,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI;AACxC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button-92xc4w-A.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/radio-group/radio-group.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/radio-group/radio-button.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} from '@angular/core';\nimport {KeyboardEventManager, PointerEventManager} from '../behaviors/event-manager';\nimport {ListFocus, ListFocusInputs} from '../behaviors/list-focus/list-focus';\nimport {ListNavigation, ListNavigationInputs} from '../behaviors/list-navigation/list-navigation';\nimport {ListSelection, ListSelectionInputs} from '../behaviors/list-selection/list-selection';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\nimport {RadioButtonPattern} from './radio-button';\n\n/** The selection operations that the radio group can perform. */\ninterface SelectOptions {\n selectOne?: boolean;\n}\n\n/** Represents the required inputs for a radio group. */\nexport type RadioGroupInputs<V> = Omit<ListNavigationInputs<RadioButtonPattern<V>>, 'wrap'> &\n // Radio groups are always single-select.\n Omit<ListSelectionInputs<RadioButtonPattern<V>, V>, 'multi' | 'selectionMode'> &\n ListFocusInputs<RadioButtonPattern<V>> & {\n /** Whether the radio group is disabled. */\n disabled: SignalLike<boolean>;\n /** Whether the radio group is readonly. */\n readonly: SignalLike<boolean>;\n };\n\n/** Controls the state of a radio group. */\nexport class RadioGroupPattern<V> {\n /** Controls navigation for the radio group. */\n navigation: ListNavigation<RadioButtonPattern<V>>;\n\n /** Controls selection for the radio group. */\n selection: ListSelection<RadioButtonPattern<V>, V>;\n\n /** Controls focus for the radio group. */\n focusManager: ListFocus<RadioButtonPattern<V>>;\n\n /** Whether the radio group is vertically or horizontally oriented. */\n orientation: SignalLike<'vertical' | 'horizontal'>;\n\n /** Whether the radio group is disabled. */\n disabled = computed(() => this.inputs.disabled() || this.focusManager.isListDisabled());\n\n /** The currently selected radio button. */\n selectedItem = computed(() => this.selection.selectedItems()[0]);\n\n /** Whether the radio group is readonly. */\n readonly = computed(() => this.selectedItem()?.disabled() || this.inputs.readonly());\n\n /** The tabindex of the radio group (if using activedescendant). */\n tabindex = computed(() => this.focusManager.getListTabindex());\n\n /** The id of the current active radio button (if using activedescendant). */\n activedescendant = computed(() => this.focusManager.getActiveDescendant());\n\n /** The key used to navigate to the previous radio button. */\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 radio button. */\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 keydown event manager for the radio group. */\n keydown = computed(() => {\n const manager = new KeyboardEventManager();\n\n // Readonly mode allows navigation but not selection changes.\n if (this.readonly()) {\n return manager\n .on(this.prevKey, () => this.prev())\n .on(this.nextKey, () => this.next())\n .on('Home', () => this.first())\n .on('End', () => this.last());\n }\n\n // Default behavior: navigate and select on arrow keys, home, end.\n // Space/Enter also select the focused item.\n return 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.selection.selectOne())\n .on('Enter', () => this.selection.selectOne());\n });\n\n /** The pointerdown event manager for the radio group. */\n pointerdown = computed(() => {\n const manager = new PointerEventManager();\n\n if (this.readonly()) {\n // Navigate focus only in readonly mode.\n return manager.on(e => this.goto(e));\n }\n\n // Default behavior: navigate and select on click.\n return manager.on(e => this.goto(e, {selectOne: true}));\n });\n\n constructor(readonly inputs: RadioGroupInputs<V>) {\n this.orientation = inputs.orientation;\n\n this.focusManager = new ListFocus(inputs);\n this.navigation = new ListNavigation({\n ...inputs,\n wrap: () => false,\n focusManager: this.focusManager,\n });\n this.selection = new ListSelection({\n ...inputs,\n multi: () => false,\n selectionMode: () => 'follow',\n focusManager: this.focusManager,\n });\n }\n\n /** Handles keydown events for the radio group. */\n onKeydown(event: KeyboardEvent) {\n if (!this.disabled()) {\n this.keydown().handle(event);\n }\n }\n\n /** Handles pointerdown events for the radio group. */\n onPointerdown(event: PointerEvent) {\n if (!this.disabled()) {\n this.pointerdown().handle(event);\n }\n }\n\n /** Navigates to the first enabled radio button in the group. */\n first(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.first());\n }\n\n /** Navigates to the last enabled radio button in the group. */\n last(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.last());\n }\n\n /** Navigates to the next enabled radio button in the group. */\n next(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.next());\n }\n\n /** Navigates to the previous enabled radio button in the group. */\n prev(opts?: SelectOptions) {\n this._navigate(opts, () => this.navigation.prev());\n }\n\n /** Navigates to the radio button associated with the given pointer event. */\n goto(event: PointerEvent, opts?: SelectOptions) {\n const item = this._getItem(event);\n this._navigate(opts, () => this.navigation.goto(item));\n }\n\n /**\n * Sets the radio group to its default initial state.\n *\n * Sets the active index to the selected radio button if one exists and is focusable.\n * Otherwise, sets the active index to the first focusable radio button.\n */\n setDefaultState() {\n let firstItem: RadioButtonPattern<V> | null = null;\n\n for (const item of this.inputs.items()) {\n if (this.focusManager.isFocusable(item)) {\n if (!firstItem) {\n firstItem = item;\n }\n if (item.selected()) {\n this.inputs.activeIndex.set(item.index());\n return;\n }\n }\n }\n\n if (firstItem) {\n this.inputs.activeIndex.set(firstItem.index());\n }\n }\n\n /** Validates the state of the radio group and returns a list of accessibility violations. */\n validate(): string[] {\n const violations: string[] = [];\n\n if (this.selectedItem()?.disabled() && this.inputs.skipDisabled()) {\n violations.push(\n \"Accessibility Violation: The selected radio button is disabled while 'skipDisabled' is true, making the selection unreachable via keyboard.\",\n );\n }\n\n return violations;\n }\n\n /** Safely performs a navigation operation and updates selection if needed. */\n private _navigate(opts: SelectOptions = {}, operation: () => boolean) {\n const moved = operation();\n if (moved && opts.selectOne) {\n this.selection.selectOne();\n }\n }\n\n /** Finds the RadioButtonPattern associated with a pointer event target. */\n private _getItem(e: PointerEvent): RadioButtonPattern<V> | undefined {\n if (!(e.target instanceof HTMLElement)) {\n return undefined;\n }\n\n // Assumes the target or its ancestor has role=\"radio\"\n const element = e.target.closest('[role=\"radio\"]');\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 {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 radio group that need to be accessed by a radio button.\n * This exists to avoid circular dependency errors between the radio group and radio button.\n */\ninterface RadioGroupLike<V> {\n focusManager: ListFocus<RadioButtonPattern<V>>;\n selection: ListSelection<RadioButtonPattern<V>, V>;\n navigation: ListNavigation<RadioButtonPattern<V>>;\n}\n\n/** Represents the required inputs for a radio button in a radio group. */\nexport interface RadioButtonInputs<V>\n extends ListNavigationItem,\n ListSelectionItem<V>,\n ListFocusItem {\n /** A reference to the parent radio group. */\n group: SignalLike<RadioGroupLike<V> | undefined>;\n}\n\n/** Represents a radio button within a radio group. */\nexport class RadioButtonPattern<V> {\n /** A unique identifier for the radio button. */\n id: SignalLike<string>;\n\n /** The value associated with the radio button. */\n value: SignalLike<V>;\n\n /** The position of the radio button within the group. */\n index = computed(\n () =>\n this.group()\n ?.navigation.inputs.items()\n .findIndex(i => i.id() === this.id()) ?? -1,\n );\n\n /** Whether the radio button is currently the active one (focused). */\n active = computed(() => this.group()?.focusManager.activeItem() === this);\n\n /** Whether the radio button is selected. */\n selected: SignalLike<boolean> = computed(\n () => !!this.group()?.selection.inputs.value().includes(this.value()),\n );\n\n /** Whether the radio button is disabled. */\n disabled: SignalLike<boolean>;\n\n /** A reference to the parent radio group. */\n group: SignalLike<RadioGroupLike<V> | undefined>;\n\n /** The tabindex of the radio button. */\n tabindex = computed(() => this.group()?.focusManager.getItemTabindex(this));\n\n /** The HTML element associated with the radio button. */\n element: SignalLike<HTMLElement>;\n\n constructor(readonly inputs: RadioButtonInputs<V>) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.group = inputs.group;\n this.element = inputs.element;\n this.disabled = inputs.disabled;\n }\n}\n"],"names":[],"mappings":";;;;AAgCA;MACa,iBAAiB,CAAA;AAiFP,IAAA,MAAA;;AA/ErB,IAAA,UAAU;;AAGV,IAAA,SAAS;;AAGT,IAAA,YAAY;;AAGZ,IAAA,WAAW;;IAGX,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC;;AAGvF,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;;IAGhE,QAAQ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A,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;AACzB,QAAA,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK;AACzB,QAAA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO;AAC7B,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ;;AAElC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tabs-hMdwtXv2.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/behaviors/label/label.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk-experimental/ui-patterns/tabs/tabs.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 */\nimport {computed} from '@angular/core';\nimport {SignalLike} from '../signal-like/signal-like';\n\n/** Represents the required inputs for the label control. */\nexport interface LabelControlInputs {\n /** The default `aria-labelledby` ids. */\n defaultLabelledBy: SignalLike<string[]>;\n}\n\n/** Represents the optional inputs for the label control. */\nexport interface LabelControlOptionalInputs {\n /** The `aria-label`. */\n label?: SignalLike<string | undefined>;\n\n /** The user-provided `aria-labelledby` ids. */\n labelledBy?: SignalLike<string[]>;\n}\n\n/** Controls label and description of an element. */\nexport class LabelControl {\n /** The `aria-label`. */\n readonly label = computed(() => this.inputs.label?.());\n\n /** The `aria-labelledby` ids. */\n readonly labelledBy = computed(() => {\n const label = this.label();\n const labelledBy = this.inputs.labelledBy?.();\n const defaultLabelledBy = this.inputs.defaultLabelledBy();\n\n if (labelledBy && labelledBy.length > 0) {\n return labelledBy;\n }\n\n // If an aria-label is provided by developers, do not set aria-labelledby with the\n // defaultLabelledBy value because if both attributes are set, aria-labelledby will be used.\n if (label) {\n return [];\n }\n\n return defaultLabelledBy;\n });\n\n constructor(readonly inputs: LabelControlInputs & LabelControlOptionalInputs) {}\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 {KeyboardEventManager, PointerEventManager} from '../behaviors/event-manager';\nimport {ListFocus, ListFocusInputs, ListFocusItem} from '../behaviors/list-focus/list-focus';\nimport {\n ListNavigation,\n ListNavigationInputs,\n ListNavigationItem,\n} from '../behaviors/list-navigation/list-navigation';\nimport {\n ListSelection,\n ListSelectionInputs,\n ListSelectionItem,\n} from '../behaviors/list-selection/list-selection';\nimport {\n ExpansionItem,\n ExpansionControl,\n ListExpansionInputs,\n ListExpansion,\n} from '../behaviors/expansion/expansion';\nimport {SignalLike} from '../behaviors/signal-like/signal-like';\nimport {LabelControl, LabelControlOptionalInputs} from '../behaviors/label/label';\n\n/** The required inputs to tabs. */\nexport interface TabInputs\n extends ListNavigationItem,\n ListSelectionItem<string>,\n ListFocusItem,\n Omit<ExpansionItem, 'expansionId' | 'expandable'> {\n /** The parent tablist that controls the tab. */\n tablist: SignalLike<TabListPattern>;\n\n /** The remote tabpanel controlled by the tab. */\n tabpanel: SignalLike<TabPanelPattern | undefined>;\n}\n\n/** A tab in a tablist. */\nexport class TabPattern {\n /** Controls expansion for this tab. */\n readonly expansion: ExpansionControl;\n\n /** A global unique identifier for the tab. */\n readonly id: SignalLike<string>;\n\n /** A local unique identifier for the tab. */\n readonly value: SignalLike<string>;\n\n /** Whether the tab is disabled. */\n readonly disabled: SignalLike<boolean>;\n\n /** The html element that should receive focus. */\n readonly element: SignalLike<HTMLElement>;\n\n /** Whether this tab has expandable content. */\n readonly expandable = computed(() => this.expansion.expandable());\n\n /** The unique identifier used by the expansion behavior. */\n readonly expansionId = computed(() => this.expansion.expansionId());\n\n /** Whether the tab is expanded. */\n readonly expanded = computed(() => this.expansion.isExpanded());\n\n /** Whether the tab is active. */\n readonly active = computed(() => this.inputs.tablist().focusManager.activeItem() === this);\n\n /** Whether the tab is selected. */\n readonly selected = computed(\n () => !!this.inputs.tablist().selection.inputs.value().includes(this.value()),\n );\n\n /** The tabindex of the tab. */\n readonly tabindex = computed(() => this.inputs.tablist().focusManager.getItemTabindex(this));\n\n /** The id of the tabpanel associated with the tab. */\n readonly controls = computed(() => this.inputs.tabpanel()?.id());\n\n constructor(readonly inputs: TabInputs) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.disabled = inputs.disabled;\n this.element = inputs.element;\n this.expansion = new ExpansionControl({\n ...inputs,\n expansionId: inputs.value,\n expandable: () => true,\n expansionManager: inputs.tablist().expansionManager,\n });\n }\n}\n\n/** The required inputs for the tabpanel. */\nexport interface TabPanelInputs extends LabelControlOptionalInputs {\n id: SignalLike<string>;\n tab: SignalLike<TabPattern | undefined>;\n value: SignalLike<string>;\n}\n\n/** A tabpanel associated with a tab. */\nexport class TabPanelPattern {\n /** A global unique identifier for the tabpanel. */\n readonly id: SignalLike<string>;\n\n /** A local unique identifier for the tabpanel. */\n readonly value: SignalLike<string>;\n\n /** Controls label for this tabpanel. */\n readonly labelManager: LabelControl;\n\n /** Whether the tabpanel is hidden. */\n readonly hidden = computed(() => this.inputs.tab()?.expanded() === false);\n\n /** The tabindex of this tabpanel. */\n readonly tabindex = computed(() => (this.hidden() ? -1 : 0));\n\n /** The aria-labelledby value for this tabpanel. */\n readonly labelledBy = computed(() =>\n this.labelManager.labelledBy().length > 0\n ? this.labelManager.labelledBy().join(' ')\n : undefined,\n );\n\n constructor(readonly inputs: TabPanelInputs) {\n this.id = inputs.id;\n this.value = inputs.value;\n this.labelManager = new LabelControl({\n ...inputs,\n defaultLabelledBy: computed(() => (this.inputs.tab() ? [this.inputs.tab()!.id()] : [])),\n });\n }\n}\n\n/** The selection operations that the tablist can perform. */\ninterface SelectOptions {\n select?: boolean;\n}\n\n/** The required inputs for the tablist. */\nexport type TabListInputs = ListNavigationInputs<TabPattern> &\n Omit<ListSelectionInputs<TabPattern, string>, 'multi'> &\n ListFocusInputs<TabPattern> &\n Omit<ListExpansionInputs, 'multiExpandable' | 'expandedIds' | 'items'>;\n\n/** Controls the state of a tablist. */\nexport class TabListPattern {\n /** Controls navigation for the tablist. */\n readonly navigation: ListNavigation<TabPattern>;\n\n /** Controls selection for the tablist. */\n readonly selection: ListSelection<TabPattern, string>;\n\n /** Controls focus for the tablist. */\n readonly focusManager: ListFocus<TabPattern>;\n\n /** Controls expansion for the tablist. */\n readonly expansionManager: ListExpansion;\n\n /** Whether the tablist is vertically or horizontally oriented. */\n readonly orientation: SignalLike<'vertical' | 'horizontal'>;\n\n /** Whether the tablist is disabled. */\n readonly disabled: SignalLike<boolean>;\n\n /** The tabindex of the tablist. */\n readonly tabindex = computed(() => this.focusManager.getListTabindex());\n\n /** The id of the current active tab. */\n readonly activedescendant = computed(() => this.focusManager.getActiveDescendant());\n\n /** Whether selection should follow focus. */\n readonly followFocus = computed(() => this.inputs.selectionMode() === 'follow');\n\n /** The key used to navigate to the previous tab in the tablist. */\n readonly 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 readonly nextKey = computed(() => {\n if (this.inputs.orientation() === 'vertical') {\n return 'ArrowDown';\n }\n return this.inputs.textDirection() === 'rtl' ? 'ArrowLeft' : 'ArrowRight';\n });\n\n /** The keydown event manager for the tablist. */\n readonly keydown = computed(() => {\n return new KeyboardEventManager()\n .on(this.prevKey, () => this.prev({select: this.followFocus()}))\n .on(this.nextKey, () => this.next({select: this.followFocus()}))\n .on('Home', () => this.first({select: this.followFocus()}))\n .on('End', () => this.last({select: this.followFocus()}))\n .on(' ', () => this._select({select: true}))\n .on('Enter', () => this._select({select: true}));\n });\n\n /** The pointerdown event manager for the tablist. */\n readonly pointerdown = computed(() => {\n return new PointerEventManager().on(e => this.goto(e, {select: true}));\n });\n\n constructor(readonly inputs: TabListInputs) {\n this.disabled = inputs.disabled;\n this.orientation = inputs.orientation;\n\n this.focusManager = new ListFocus(inputs);\n this.navigation = new ListNavigation({...inputs, focusManager: this.focusManager});\n\n this.selection = new ListSelection({\n ...inputs,\n multi: () => false,\n focusManager: this.focusManager,\n });\n\n this.expansionManager = new ListExpansion({\n ...inputs,\n multiExpandable: () => false,\n expandedIds: this.inputs.value,\n });\n }\n\n /**\n * Sets the tablist to its default initial state.\n *\n * Sets the active index of the tablist to the first focusable selected\n * tab if one exists. Otherwise, sets focus to the first focusable tab.\n *\n * This method should be called once the tablist and its tabs are properly initialized.\n */\n setDefaultState() {\n let firstItemIndex: number | undefined;\n\n for (const [index, item] of this.inputs.items().entries()) {\n if (!this.focusManager.isFocusable(item)) continue;\n\n if (firstItemIndex === undefined) {\n firstItemIndex = index;\n }\n\n if (item.selected()) {\n this.inputs.activeIndex.set(index);\n return;\n }\n }\n if (firstItemIndex !== undefined) {\n this.inputs.activeIndex.set(firstItemIndex);\n }\n }\n\n /** Handles keydown events for the tablist. */\n onKeydown(event: KeyboardEvent) {\n if (!this.disabled()) {\n this.keydown().handle(event);\n }\n }\n\n /** The pointerdown event manager for the tablist. */\n onPointerdown(event: PointerEvent) {\n if (!this.disabled()) {\n this.pointerdown().handle(event);\n }\n }\n\n /** Navigates to the first option in the tablist. */\n first(opts?: SelectOptions) {\n this.navigation.first();\n this._select(opts);\n }\n\n /** Navigates to the last option in the tablist. */\n last(opts?: SelectOptions) {\n this.navigation.last();\n this._select(opts);\n }\n\n /** Navigates to the next option in the tablist. */\n next(opts?: SelectOptions) {\n this.navigation.next();\n this._select(opts);\n }\n\n /** Navigates to the previous option in the tablist. */\n prev(opts?: SelectOptions) {\n this.navigation.prev();\n this._select(opts);\n }\n\n /** Navigates to the given item in the tablist. */\n goto(event: PointerEvent, opts?: SelectOptions) {\n const item = this._getItem(event);\n\n if (item) {\n this.navigation.goto(item);\n this._select(opts);\n }\n }\n\n /** Handles updating selection for the tablist. */\n private _select(opts?: SelectOptions) {\n if (opts?.select) {\n this.selection.selectOne();\n this.expansionManager.open(this.focusManager.activeItem());\n }\n }\n\n private _getItem(e: PointerEvent) {\n if (!(e.target instanceof HTMLElement)) {\n return;\n }\n\n const element = e.target.closest('[role=\"tab\"]');\n return this.inputs.items().find(i => i.element() === element);\n }\n}\n"],"names":[],"mappings":";;;;;AAyBA;MACa,YAAY,CAAA;AAuBF,IAAA,MAAA;;AArBZ,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;;AAG7C,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AAClC,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE;QAC1B,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,IAAI;QAC7C,MAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE;QAEzD,IAAI,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;AACvC,YAAA,OAAO,UAAU;;;;QAKnB,IAAI,KAAK,EAAE;AACT,YAAA,OAAO,EAAE;;AAGX,QAAA,OAAO,iBAAiB;AAC1B,KAAC,CAAC;AAEF,IAAA,WAAA,CAAqB,MAAuD,EAAA;QAAvD,IAAM,CAAA,MAAA,GAAN,MAAM;;AAC5B;;ACPD;MACa,UAAU,CAAA;AAuCA,IAAA,MAAA;;AArCZ,IAAA,SAAS;;AAGT,IAAA,EAAE;;AAGF,IAAA,KAAK;;AAGL,IAAA,QAAQ;;AAGR,IAAA,OAAO;;AAGP,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;;AAGxD,IAAA,WAAW,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;;AAG1D,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;;IAGt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AAC;;;IAIpB,IAAI,CAAC,KAAmB,EAAE,IAAoB,EAAA;QAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAEjC,IAAI,IAAI,EAAE;AACR,YAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;AAC1B,YAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;;;;AAKd,IAAA,OAAO,CAAC,IAAoB,EAAA;AAClC,QAAA,IAAI,IAAI,EAAE,MAAM,EAAE;AAChB,YAAA,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;AAC1B,YAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;;;AAItD,IAAA,QAAQ,CAAC,CAAe,EAAA;QAC9B,IAAI,EAAE,CAAC,CAAC,MAAM,YAAY,WAAW,CAAC,EAAE;YACtC;;QAGF,MAAM,OAAO,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,OAAO,CAAC;;AAEhE;;;;"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { f as ListFocusItem, S as SignalLike, a as ListFocusInputs, W as WritableSignalLike, d as ListFocus } from './pointer-event-manager.d-BqSm9Jh5.js';
|
|
3
|
-
|
|
4
|
-
/** Represents an item in a collection, such as a listbox option, than can be selected. */
|
|
5
|
-
interface ListSelectionItem<V> extends ListFocusItem {
|
|
6
|
-
/** The value of the item. */
|
|
7
|
-
value: SignalLike<V>;
|
|
8
|
-
}
|
|
9
|
-
/** Represents the required inputs for a collection that contains selectable items. */
|
|
10
|
-
interface ListSelectionInputs<T extends ListSelectionItem<V>, V> extends ListFocusInputs<T> {
|
|
11
|
-
/** Whether multiple items in the list can be selected at once. */
|
|
12
|
-
multi: SignalLike<boolean>;
|
|
13
|
-
/** The current value of the list selection. */
|
|
14
|
-
value: WritableSignalLike<V[]>;
|
|
15
|
-
/** The selection strategy used by the list. */
|
|
16
|
-
selectionMode: SignalLike<'follow' | 'explicit'>;
|
|
17
|
-
}
|
|
18
|
-
/** Controls selection for a list of items. */
|
|
19
|
-
declare class ListSelection<T extends ListSelectionItem<V>, V> {
|
|
20
|
-
readonly inputs: ListSelectionInputs<T, V> & {
|
|
21
|
-
focusManager: ListFocus<T>;
|
|
22
|
-
};
|
|
23
|
-
/** The start index to use for range selection. */
|
|
24
|
-
rangeStartIndex: _angular_core.WritableSignal<number>;
|
|
25
|
-
/** The end index to use for range selection. */
|
|
26
|
-
rangeEndIndex: _angular_core.WritableSignal<number>;
|
|
27
|
-
/** The currently selected items. */
|
|
28
|
-
selectedItems: _angular_core.Signal<T[]>;
|
|
29
|
-
constructor(inputs: ListSelectionInputs<T, V> & {
|
|
30
|
-
focusManager: ListFocus<T>;
|
|
31
|
-
});
|
|
32
|
-
/** Selects the item at the current active index. */
|
|
33
|
-
select(item?: ListSelectionItem<V>, opts?: {
|
|
34
|
-
anchor: boolean;
|
|
35
|
-
}): void;
|
|
36
|
-
/** Deselects the item at the current active index. */
|
|
37
|
-
deselect(item?: T): void;
|
|
38
|
-
/** Toggles the item at the current active index. */
|
|
39
|
-
toggle(): void;
|
|
40
|
-
/** Toggles only the item at the current active index. */
|
|
41
|
-
toggleOne(): void;
|
|
42
|
-
/** Selects all items in the list. */
|
|
43
|
-
selectAll(): void;
|
|
44
|
-
/** Deselects all items in the list. */
|
|
45
|
-
deselectAll(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Selects all items in the list or deselects all
|
|
48
|
-
* items in the list if all items are already selected.
|
|
49
|
-
*/
|
|
50
|
-
toggleAll(): void;
|
|
51
|
-
/** Sets the selection to only the current active item. */
|
|
52
|
-
selectOne(): void;
|
|
53
|
-
/**
|
|
54
|
-
* Selects all items in the list up to the anchor item.
|
|
55
|
-
*
|
|
56
|
-
* Deselects all items that were previously within the
|
|
57
|
-
* selected range that are now outside of the selected range
|
|
58
|
-
*/
|
|
59
|
-
selectRange(opts?: {
|
|
60
|
-
anchor: boolean;
|
|
61
|
-
}): void;
|
|
62
|
-
/** Marks the given index as the start of a range selection. */
|
|
63
|
-
beginRangeSelection(index?: number): void;
|
|
64
|
-
/** Returns the items in the list starting from the given index. */
|
|
65
|
-
private _getItemsFromIndex;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { ListSelection as L };
|
|
69
|
-
export type { ListSelectionItem as a, ListSelectionInputs as b };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { f as ListFocusItem, S as SignalLike, a as ListFocusInputs, d as ListFocus } from './pointer-event-manager.d-BqSm9Jh5.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Represents an item in a collection, such as a listbox option, than can be navigated to by
|
|
6
|
-
* typeahead.
|
|
7
|
-
*/
|
|
8
|
-
interface ListTypeaheadItem extends ListFocusItem {
|
|
9
|
-
/** The text used by the typeahead search. */
|
|
10
|
-
searchTerm: SignalLike<string>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Represents the required inputs for a collection that contains items that can be navigated to by
|
|
14
|
-
* typeahead.
|
|
15
|
-
*/
|
|
16
|
-
interface ListTypeaheadInputs<T extends ListTypeaheadItem> extends ListFocusInputs<T> {
|
|
17
|
-
/** The amount of time before the typeahead search is reset. */
|
|
18
|
-
typeaheadDelay: SignalLike<number>;
|
|
19
|
-
}
|
|
20
|
-
/** Controls typeahead for a list of items. */
|
|
21
|
-
declare class ListTypeahead<T extends ListTypeaheadItem> {
|
|
22
|
-
readonly inputs: ListTypeaheadInputs<T> & {
|
|
23
|
-
focusManager: ListFocus<T>;
|
|
24
|
-
};
|
|
25
|
-
/** A reference to the timeout for resetting the typeahead search. */
|
|
26
|
-
timeout?: ReturnType<typeof setTimeout> | undefined;
|
|
27
|
-
/** The focus controller of the parent list. */
|
|
28
|
-
focusManager: ListFocus<T>;
|
|
29
|
-
/** Whether the user is actively typing a typeahead search query. */
|
|
30
|
-
isTyping: _angular_core.Signal<boolean>;
|
|
31
|
-
/** Keeps track of the characters that typeahead search is being called with. */
|
|
32
|
-
private _query;
|
|
33
|
-
/** The index where that the typeahead search was initiated from. */
|
|
34
|
-
private _startIndex;
|
|
35
|
-
constructor(inputs: ListTypeaheadInputs<T> & {
|
|
36
|
-
focusManager: ListFocus<T>;
|
|
37
|
-
});
|
|
38
|
-
/** Performs a typeahead search, appending the given character to the search string. */
|
|
39
|
-
search(char: string): boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Returns the first item whose search term matches the
|
|
42
|
-
* current query starting from the the current anchor index.
|
|
43
|
-
*/
|
|
44
|
-
private _getItem;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { ListTypeahead as L };
|
|
48
|
-
export type { ListTypeaheadItem as a, ListTypeaheadInputs as b };
|