@angular/aria 21.0.0-next.9 → 21.0.0-rc.0
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/_adev_assets/aria-accordion.json +373 -0
- package/_adev_assets/aria-combobox.json +383 -0
- package/_adev_assets/aria-grid.json +578 -0
- package/_adev_assets/aria-listbox.json +511 -0
- package/_adev_assets/aria-menu.json +752 -0
- package/_adev_assets/aria-radio-group.json +389 -0
- package/_adev_assets/aria-tabs.json +987 -0
- package/_adev_assets/aria-toolbar.json +717 -0
- package/_adev_assets/aria-tree.json +1067 -0
- package/fesm2022/_widget-chunk.mjs +827 -0
- package/fesm2022/_widget-chunk.mjs.map +1 -0
- package/fesm2022/accordion.mjs +371 -172
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -2
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +304 -114
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/deferred-content.mjs +89 -50
- package/fesm2022/deferred-content.mjs.map +1 -1
- package/fesm2022/grid.mjs +517 -0
- package/fesm2022/grid.mjs.map +1 -0
- package/fesm2022/listbox.mjs +384 -183
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +535 -0
- package/fesm2022/menu.mjs.map +1 -0
- package/fesm2022/private.mjs +2347 -0
- package/fesm2022/private.mjs.map +1 -0
- package/fesm2022/radio-group.mjs +320 -179
- package/fesm2022/radio-group.mjs.map +1 -1
- package/fesm2022/tabs.mjs +483 -274
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +330 -199
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +509 -264
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +14 -6
- package/types/_grid-chunk.d.ts +546 -0
- package/types/accordion.d.ts +4 -4
- package/types/combobox.d.ts +18 -5
- package/types/grid.d.ts +111 -0
- package/types/listbox.d.ts +6 -3
- package/types/menu.d.ts +158 -0
- package/types/{ui-patterns.d.ts → private.d.ts} +333 -133
- package/types/radio-group.d.ts +5 -3
- package/types/tabs.d.ts +4 -4
- package/types/toolbar.d.ts +4 -4
- package/types/tree.d.ts +7 -4
- package/fesm2022/ui-patterns.mjs +0 -2504
- package/fesm2022/ui-patterns.mjs.map +0 -1
package/fesm2022/listbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/listbox/listbox.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 {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport {ComboboxListboxPattern, ListboxPattern, OptionPattern} from '@angular/aria/ui-patterns';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {ComboboxPopup} from '../combobox';\n\n/**\n * A listbox container.\n *\n * Listboxes are used to display a list of items for a user to select from. The Listbox is meant\n * to be used in conjunction with Option as follows:\n *\n * ```html\n * <ul ngListbox>\n * <li [value]=\"1\" ngOption>Item 1</li>\n * <li [value]=\"2\" ngOption>Item 2</li>\n * <li [value]=\"3\" ngOption>Item 3</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[ngListbox]',\n exportAs: 'ngListbox',\n host: {\n 'role': 'listbox',\n 'class': 'ng-listbox',\n '[attr.id]': 'id()',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-readonly]': 'pattern.readonly()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n '[attr.aria-orientation]': 'pattern.orientation()',\n '[attr.aria-multiselectable]': 'pattern.multi()',\n '[attr.aria-activedescendant]': 'pattern.activedescendant()',\n '(keydown)': 'pattern.onKeydown($event)',\n '(pointerdown)': 'pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n hostDirectives: [{directive: ComboboxPopup}],\n})\nexport class Listbox<V> {\n /** A unique identifier for the listbox. */\n private readonly _generatedId = inject(_IdGenerator).getId('ng-listbox-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the listbox. */\n protected id = computed(() => this._generatedId);\n\n /** A reference to the parent combobox popup, if one exists. */\n private readonly _popup = inject<ComboboxPopup<V>>(ComboboxPopup, {\n optional: true,\n });\n\n /** A reference to the listbox element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** The Options nested inside of the Listbox. */\n private readonly _options = contentChildren(Option, {descendants: true});\n\n /** A signal wrapper for directionality. */\n protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The Option UIPatterns of the child Options. */\n protected items = computed(() => this._options().map(option => option.pattern));\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n wrap = input(true, {transform: booleanAttribute});\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the list. */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The selection strategy used by the list. */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly = input(false, {transform: booleanAttribute});\n\n /** The values of the current selected items. */\n value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n pattern: ListboxPattern<V>;\n\n /** Whether the listbox has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n items: this.items,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n combobox: () => this._popup?.combobox?.pattern,\n };\n\n this.pattern = this._popup?.combobox\n ? new ComboboxListboxPattern<V>(inputs)\n : new ListboxPattern<V>(inputs);\n\n if (this._popup) {\n this._popup.controls.set(this.pattern as ComboboxListboxPattern<V>);\n }\n\n afterRenderEffect(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const violations = this.pattern.validate();\n for (const violation of violations) {\n console.error(violation);\n }\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this.pattern.setDefaultState();\n }\n });\n\n // Ensure that if the active item is removed from\n // the list, the listbox updates it's focus state.\n afterRenderEffect(() => {\n const items = inputs.items();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (!items.some(i => i === activeItem) && activeItem) {\n this.pattern.listBehavior.unfocus();\n }\n });\n\n // Ensure that the value is always in sync with the available options.\n afterRenderEffect(() => {\n const items = inputs.items();\n const value = untracked(() => this.value());\n\n if (items && value.some(v => !items.some(i => i.value() === v))) {\n this.value.set(value.filter(v => items.some(i => i.value() === v)));\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n}\n\n/** A selectable option in a Listbox. */\n@Directive({\n selector: '[ngOption]',\n exportAs: 'ngOption',\n host: {\n 'role': 'option',\n 'class': 'ng-option',\n '[attr.data-active]': 'pattern.active()',\n '[attr.id]': 'pattern.id()',\n '[attr.tabindex]': 'pattern.tabindex()',\n '[attr.aria-selected]': 'pattern.selected()',\n '[attr.aria-disabled]': 'pattern.disabled()',\n },\n})\nexport class Option<V> {\n /** A reference to the option element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent Listbox. */\n private readonly _listbox = inject(Listbox);\n\n /** A unique identifier for the option. */\n private readonly _generatedId = inject(_IdGenerator).getId('ng-option-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the option. */\n protected id = computed(() => this._generatedId);\n\n // TODO(wagnermaciel): See if we want to change how we handle this since textContent is not\n // reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.\n /** The text used by the typeahead search. */\n protected searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The parent Listbox UIPattern. */\n protected listbox = computed(() => this._listbox.pattern);\n\n /** A reference to the option element to be focused on navigation. */\n protected element = computed(() => this._elementRef.nativeElement);\n\n /** The value of the option. */\n value = input.required<V>();\n\n /** Whether an item is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n label = input<string>();\n\n /** The Option UIPattern. */\n pattern = new OptionPattern<V>({\n ...this,\n id: this.id,\n value: this.value,\n listbox: this.listbox,\n element: this.element,\n searchTerm: this.searchTerm,\n });\n}\n"],"names":["i1.ComboboxPopup"],"mappings":";;;;;;;;;AA2BA;;;;;;;;;;;;;AAaG;MAoBU,OAAO,CAAA;;IAED,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC;;;IAI/D,EAAE,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,YAAY,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,IAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC;;AAG/B,IAAA,MAAM,GAAG,MAAM,CAAmB,aAAa,EAAE;AAChE,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;;AAGe,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;;AAGhC,IAAA,eAAe,GAAG,MAAM,CAAC,cAAc,CAAC;;AAGxC,IAAA,QAAQ,GAAG,eAAe,CAAC,MAAM,4CAAG,WAAW,EAAE,IAAI,EAAA,CAAA,GAAA,CAAlB,EAAC,W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
+
{"version":3,"file":"listbox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/listbox/listbox.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 {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport {ComboboxListboxPattern, ListboxPattern, OptionPattern} from '@angular/aria/private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {ComboboxPopup} from '../combobox';\n\n/**\n * A listbox container.\n *\n * Listboxes are used to display a list of items for a user to select from. The Listbox is meant\n * to be used in conjunction with Option as follows:\n *\n * ```html\n * <ul ngListbox>\n * <li [value]=\"1\" ngOption>Item 1</li>\n * <li [value]=\"2\" ngOption>Item 2</li>\n * <li [value]=\"3\" ngOption>Item 3</li>\n * </ul>\n * ```\n */\n@Directive({\n selector: '[ngListbox]',\n exportAs: 'ngListbox',\n host: {\n 'role': 'listbox',\n 'class': 'ng-listbox',\n '[attr.id]': 'id()',\n '[attr.tabindex]': '_pattern.tabindex()',\n '[attr.aria-readonly]': '_pattern.readonly()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-orientation]': '_pattern.orientation()',\n '[attr.aria-multiselectable]': '_pattern.multi()',\n '[attr.aria-activedescendant]': '_pattern.activedescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(focusin)': 'onFocus()',\n },\n hostDirectives: [{directive: ComboboxPopup}],\n})\nexport class Listbox<V> {\n /** A unique identifier for the listbox. */\n private readonly _generatedId = inject(_IdGenerator).getId('ng-listbox-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the listbox. */\n protected id = computed(() => this._generatedId);\n\n /** A reference to the parent combobox popup, if one exists. */\n private readonly _popup = inject<ComboboxPopup<V>>(ComboboxPopup, {\n optional: true,\n });\n\n /** A reference to the listbox element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** The Options nested inside of the Listbox. */\n private readonly _options = contentChildren(Option, {descendants: true});\n\n /** A signal wrapper for directionality. */\n protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The Option UIPatterns of the child Options. */\n protected items = computed(() => this._options().map(option => option._pattern));\n\n /** Whether the list is vertically or horizontally oriented. */\n orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n wrap = input(true, {transform: booleanAttribute});\n\n /** Whether disabled items in the list should be skipped when navigating. */\n skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the list. */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The selection strategy used by the list. */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly = input(false, {transform: booleanAttribute});\n\n /** The values of the current selected items. */\n value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n readonly _pattern: ListboxPattern<V>;\n\n /** Whether the listbox has received focus yet. */\n private _hasFocused = signal(false);\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n items: this.items,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n combobox: () => this._popup?.combobox?._pattern,\n };\n\n this._pattern = this._popup?.combobox\n ? new ComboboxListboxPattern<V>(inputs)\n : new ListboxPattern<V>(inputs);\n\n if (this._popup) {\n this._popup.controls.set(this._pattern as ComboboxListboxPattern<V>);\n }\n\n afterRenderEffect(() => {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const violations = this._pattern.validate();\n for (const violation of violations) {\n console.error(violation);\n }\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasFocused()) {\n this._pattern.setDefaultState();\n }\n });\n\n // Ensure that if the active item is removed from\n // the list, the listbox updates it's focus state.\n afterRenderEffect(() => {\n const items = inputs.items();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (!items.some(i => i === activeItem) && activeItem) {\n this._pattern.listBehavior.unfocus();\n }\n });\n\n // Ensure that the value is always in sync with the available options.\n afterRenderEffect(() => {\n const items = inputs.items();\n const value = untracked(() => this.value());\n\n if (items && value.some(v => !items.some(i => i.value() === v))) {\n this.value.set(value.filter(v => items.some(i => i.value() === v)));\n }\n });\n }\n\n onFocus() {\n this._hasFocused.set(true);\n }\n\n scrollActiveItemIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {\n this._pattern.inputs.activeItem()?.element().scrollIntoView(options);\n }\n}\n\n/** A selectable option in a Listbox. */\n@Directive({\n selector: '[ngOption]',\n exportAs: 'ngOption',\n host: {\n 'role': 'option',\n 'class': 'ng-option',\n '[attr.data-active]': '_pattern.active()',\n '[attr.id]': '_pattern.id()',\n '[attr.tabindex]': '_pattern.tabindex()',\n '[attr.aria-selected]': '_pattern.selected()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n },\n})\nexport class Option<V> {\n /** A reference to the option element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent Listbox. */\n private readonly _listbox = inject(Listbox);\n\n /** A unique identifier for the option. */\n private readonly _generatedId = inject(_IdGenerator).getId('ng-option-');\n\n // TODO(wagnermaciel): https://github.com/angular/components/pull/30495#discussion_r1972601144.\n /** A unique identifier for the option. */\n protected id = computed(() => this._generatedId);\n\n // TODO(wagnermaciel): See if we want to change how we handle this since textContent is not\n // reactive. See https://github.com/angular/components/pull/30495#discussion_r1961260216.\n /** The text used by the typeahead search. */\n protected searchTerm = computed(() => this.label() ?? this.element().textContent);\n\n /** The parent Listbox UIPattern. */\n protected listbox = computed(() => this._listbox._pattern);\n\n /** A reference to the option element to be focused on navigation. */\n protected element = computed(() => this._elementRef.nativeElement);\n\n /** The value of the option. */\n value = input.required<V>();\n\n /** Whether an item is disabled. */\n disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n label = input<string>();\n\n /** Whether the option is selected. */\n readonly selected = computed(() => this._pattern.selected());\n\n /** The Option UIPattern. */\n readonly _pattern = new OptionPattern<V>({\n ...this,\n id: this.id,\n value: this.value,\n listbox: this.listbox,\n element: this.element,\n searchTerm: this.searchTerm,\n });\n}\n"],"names":["inject","ComboboxPopup","optional","_elementRef","ElementRef","_directionality","Directionality","contentChildren","Option","ngDevMode","debugName","descendants","textDirection","toSignal","change","initialValue","value","items","computed","_options","map","option","_pattern","transform","booleanAttribute","wrap","input","focusMode","selectionMode","disabled","readonly","model","constructor","element","nativeElement","combobox","_popup","ComboboxListboxPattern","inputs","ListboxPattern","controls","set","violations","validate","violation","console","error","_hasFocused","setDefaultState","afterRenderEffect","activeItem","untracked","some","i","listBehavior","unfocus","v","filter","scrollActiveItemIntoView","options","block","args","selector","directive","ctorParameters","Listbox","_generatedId","_IdGenerator","getId"],"mappings":";;;;;;;;;;;;;;QAkHyC,GAAAA,MAAA,CAAAC,aAAA,EAAA;IACvCC,QAAA,EAAA;AAEgD,GAAA,CAAA;EAIvCC,WAAA,GAAAH,MAAA,CAAAI,UAAA,CAAA;EAKTC,eAAA,GAAAL,MAAA,CAAAM,cAAA,CAAA;AAEI,EAAA,QAAA,GAAAC,eAAO,CAAAC,MAAA,EAAA,IAAAC,SAAA,GAAA,CAAA;IAAAC,SAAA,EAAA,UAAA;IAAAC,WAAA,EAAA;AAAA,GAAA,CAAA,GAAA,CAAA;IAAAA,WAAA,EAAA;AAAA,G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+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, input, output, computed, Directive, contentChildren, signal, afterRenderEffect, untracked, model } from '@angular/core';
|
|
3
|
+
import { MenuTriggerPattern, MenuPattern, MenuBarPattern, MenuItemPattern } from '@angular/aria/private';
|
|
4
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
6
|
+
|
|
7
|
+
class MenuTrigger {
|
|
8
|
+
_elementRef = inject(ElementRef);
|
|
9
|
+
element = this._elementRef.nativeElement;
|
|
10
|
+
submenu = input(undefined, ...(ngDevMode ? [{
|
|
11
|
+
debugName: "submenu"
|
|
12
|
+
}] : []));
|
|
13
|
+
onSubmit = output();
|
|
14
|
+
_pattern = new MenuTriggerPattern({
|
|
15
|
+
onSubmit: value => this.onSubmit.emit(value),
|
|
16
|
+
element: computed(() => this._elementRef.nativeElement),
|
|
17
|
+
submenu: computed(() => this.submenu()?._pattern)
|
|
18
|
+
});
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
20
|
+
minVersion: "12.0.0",
|
|
21
|
+
version: "20.2.0-next.2",
|
|
22
|
+
ngImport: i0,
|
|
23
|
+
type: MenuTrigger,
|
|
24
|
+
deps: [],
|
|
25
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
26
|
+
});
|
|
27
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
28
|
+
minVersion: "17.1.0",
|
|
29
|
+
version: "20.2.0-next.2",
|
|
30
|
+
type: MenuTrigger,
|
|
31
|
+
isStandalone: true,
|
|
32
|
+
selector: "button[ngMenuTrigger]",
|
|
33
|
+
inputs: {
|
|
34
|
+
submenu: {
|
|
35
|
+
classPropertyName: "submenu",
|
|
36
|
+
publicName: "submenu",
|
|
37
|
+
isSignal: true,
|
|
38
|
+
isRequired: false,
|
|
39
|
+
transformFunction: null
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
outputs: {
|
|
43
|
+
onSubmit: "onSubmit"
|
|
44
|
+
},
|
|
45
|
+
host: {
|
|
46
|
+
listeners: {
|
|
47
|
+
"click": "_pattern.onClick()",
|
|
48
|
+
"keydown": "_pattern.onKeydown($event)",
|
|
49
|
+
"focusout": "_pattern.onFocusOut($event)"
|
|
50
|
+
},
|
|
51
|
+
properties: {
|
|
52
|
+
"attr.tabindex": "_pattern.tabindex()",
|
|
53
|
+
"attr.aria-haspopup": "_pattern.hasPopup()",
|
|
54
|
+
"attr.aria-expanded": "_pattern.expanded()",
|
|
55
|
+
"attr.aria-controls": "_pattern.submenu()?.id()"
|
|
56
|
+
},
|
|
57
|
+
classAttribute: "ng-menu-trigger"
|
|
58
|
+
},
|
|
59
|
+
exportAs: ["ngMenuTrigger"],
|
|
60
|
+
ngImport: i0
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "20.2.0-next.2",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: MenuTrigger,
|
|
68
|
+
decorators: [{
|
|
69
|
+
type: Directive,
|
|
70
|
+
args: [{
|
|
71
|
+
selector: 'button[ngMenuTrigger]',
|
|
72
|
+
exportAs: 'ngMenuTrigger',
|
|
73
|
+
host: {
|
|
74
|
+
'class': 'ng-menu-trigger',
|
|
75
|
+
'[attr.tabindex]': '_pattern.tabindex()',
|
|
76
|
+
'[attr.aria-haspopup]': '_pattern.hasPopup()',
|
|
77
|
+
'[attr.aria-expanded]': '_pattern.expanded()',
|
|
78
|
+
'[attr.aria-controls]': '_pattern.submenu()?.id()',
|
|
79
|
+
'(click)': '_pattern.onClick()',
|
|
80
|
+
'(keydown)': '_pattern.onKeydown($event)',
|
|
81
|
+
'(focusout)': '_pattern.onFocusOut($event)'
|
|
82
|
+
}
|
|
83
|
+
}]
|
|
84
|
+
}]
|
|
85
|
+
});
|
|
86
|
+
class Menu {
|
|
87
|
+
_allItems = contentChildren(MenuItem, ...(ngDevMode ? [{
|
|
88
|
+
debugName: "_allItems",
|
|
89
|
+
descendants: true
|
|
90
|
+
}] : [{
|
|
91
|
+
descendants: true
|
|
92
|
+
}]));
|
|
93
|
+
_items = computed(() => this._allItems().filter(i => i.parent === this), ...(ngDevMode ? [{
|
|
94
|
+
debugName: "_items"
|
|
95
|
+
}] : []));
|
|
96
|
+
_elementRef = inject(ElementRef);
|
|
97
|
+
element = this._elementRef.nativeElement;
|
|
98
|
+
_directionality = inject(Directionality);
|
|
99
|
+
textDirection = toSignal(this._directionality.change, {
|
|
100
|
+
initialValue: this._directionality.value
|
|
101
|
+
});
|
|
102
|
+
submenu = input(undefined, ...(ngDevMode ? [{
|
|
103
|
+
debugName: "submenu"
|
|
104
|
+
}] : []));
|
|
105
|
+
id = input(Math.random().toString(36).substring(2, 10), ...(ngDevMode ? [{
|
|
106
|
+
debugName: "id"
|
|
107
|
+
}] : []));
|
|
108
|
+
wrap = input(true, ...(ngDevMode ? [{
|
|
109
|
+
debugName: "wrap"
|
|
110
|
+
}] : []));
|
|
111
|
+
typeaheadDelay = input(0.5, ...(ngDevMode ? [{
|
|
112
|
+
debugName: "typeaheadDelay"
|
|
113
|
+
}] : []));
|
|
114
|
+
parent = input(...(ngDevMode ? [undefined, {
|
|
115
|
+
debugName: "parent"
|
|
116
|
+
}] : []));
|
|
117
|
+
_pattern;
|
|
118
|
+
items = () => this._items().map(i => i._pattern);
|
|
119
|
+
isVisible = computed(() => this._pattern.isVisible(), ...(ngDevMode ? [{
|
|
120
|
+
debugName: "isVisible"
|
|
121
|
+
}] : []));
|
|
122
|
+
onSubmit = output();
|
|
123
|
+
constructor() {
|
|
124
|
+
this._pattern = new MenuPattern({
|
|
125
|
+
...this,
|
|
126
|
+
parent: computed(() => this.parent()?._pattern),
|
|
127
|
+
multi: () => false,
|
|
128
|
+
skipDisabled: () => false,
|
|
129
|
+
focusMode: () => 'roving',
|
|
130
|
+
orientation: () => 'vertical',
|
|
131
|
+
selectionMode: () => 'explicit',
|
|
132
|
+
activeItem: signal(undefined),
|
|
133
|
+
element: computed(() => this._elementRef.nativeElement),
|
|
134
|
+
onSubmit: value => this.onSubmit.emit(value)
|
|
135
|
+
});
|
|
136
|
+
afterRenderEffect(() => {
|
|
137
|
+
if (this._pattern.isVisible()) {
|
|
138
|
+
const activeItem = untracked(() => this._pattern.inputs.activeItem());
|
|
139
|
+
this._pattern.listBehavior.goto(activeItem);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
afterRenderEffect(() => {
|
|
143
|
+
if (!this._pattern.hasBeenFocused()) {
|
|
144
|
+
this._pattern.setDefaultState();
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
close(opts) {
|
|
149
|
+
this._pattern.inputs.parent()?.close(opts);
|
|
150
|
+
}
|
|
151
|
+
closeAll(opts) {
|
|
152
|
+
const root = this._pattern.root();
|
|
153
|
+
if (root instanceof MenuTriggerPattern) {
|
|
154
|
+
root.close(opts);
|
|
155
|
+
}
|
|
156
|
+
if (root instanceof MenuPattern || root instanceof MenuBarPattern) {
|
|
157
|
+
root.inputs.activeItem()?.close(opts);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
161
|
+
minVersion: "12.0.0",
|
|
162
|
+
version: "20.2.0-next.2",
|
|
163
|
+
ngImport: i0,
|
|
164
|
+
type: Menu,
|
|
165
|
+
deps: [],
|
|
166
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
167
|
+
});
|
|
168
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
169
|
+
minVersion: "17.2.0",
|
|
170
|
+
version: "20.2.0-next.2",
|
|
171
|
+
type: Menu,
|
|
172
|
+
isStandalone: true,
|
|
173
|
+
selector: "[ngMenu]",
|
|
174
|
+
inputs: {
|
|
175
|
+
submenu: {
|
|
176
|
+
classPropertyName: "submenu",
|
|
177
|
+
publicName: "submenu",
|
|
178
|
+
isSignal: true,
|
|
179
|
+
isRequired: false,
|
|
180
|
+
transformFunction: null
|
|
181
|
+
},
|
|
182
|
+
id: {
|
|
183
|
+
classPropertyName: "id",
|
|
184
|
+
publicName: "id",
|
|
185
|
+
isSignal: true,
|
|
186
|
+
isRequired: false,
|
|
187
|
+
transformFunction: null
|
|
188
|
+
},
|
|
189
|
+
wrap: {
|
|
190
|
+
classPropertyName: "wrap",
|
|
191
|
+
publicName: "wrap",
|
|
192
|
+
isSignal: true,
|
|
193
|
+
isRequired: false,
|
|
194
|
+
transformFunction: null
|
|
195
|
+
},
|
|
196
|
+
typeaheadDelay: {
|
|
197
|
+
classPropertyName: "typeaheadDelay",
|
|
198
|
+
publicName: "typeaheadDelay",
|
|
199
|
+
isSignal: true,
|
|
200
|
+
isRequired: false,
|
|
201
|
+
transformFunction: null
|
|
202
|
+
},
|
|
203
|
+
parent: {
|
|
204
|
+
classPropertyName: "parent",
|
|
205
|
+
publicName: "parent",
|
|
206
|
+
isSignal: true,
|
|
207
|
+
isRequired: false,
|
|
208
|
+
transformFunction: null
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
outputs: {
|
|
212
|
+
onSubmit: "onSubmit"
|
|
213
|
+
},
|
|
214
|
+
host: {
|
|
215
|
+
attributes: {
|
|
216
|
+
"role": "menu"
|
|
217
|
+
},
|
|
218
|
+
listeners: {
|
|
219
|
+
"keydown": "_pattern.onKeydown($event)",
|
|
220
|
+
"mouseover": "_pattern.onMouseOver($event)",
|
|
221
|
+
"mouseout": "_pattern.onMouseOut($event)",
|
|
222
|
+
"focusout": "_pattern.onFocusOut($event)",
|
|
223
|
+
"focusin": "_pattern.onFocusIn()",
|
|
224
|
+
"click": "_pattern.onClick($event)"
|
|
225
|
+
},
|
|
226
|
+
properties: {
|
|
227
|
+
"attr.id": "_pattern.id()",
|
|
228
|
+
"attr.data-visible": "_pattern.isVisible()"
|
|
229
|
+
},
|
|
230
|
+
classAttribute: "ng-menu"
|
|
231
|
+
},
|
|
232
|
+
queries: [{
|
|
233
|
+
propertyName: "_allItems",
|
|
234
|
+
predicate: MenuItem,
|
|
235
|
+
descendants: true,
|
|
236
|
+
isSignal: true
|
|
237
|
+
}],
|
|
238
|
+
exportAs: ["ngMenu"],
|
|
239
|
+
ngImport: i0
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
243
|
+
minVersion: "12.0.0",
|
|
244
|
+
version: "20.2.0-next.2",
|
|
245
|
+
ngImport: i0,
|
|
246
|
+
type: Menu,
|
|
247
|
+
decorators: [{
|
|
248
|
+
type: Directive,
|
|
249
|
+
args: [{
|
|
250
|
+
selector: '[ngMenu]',
|
|
251
|
+
exportAs: 'ngMenu',
|
|
252
|
+
host: {
|
|
253
|
+
'role': 'menu',
|
|
254
|
+
'class': 'ng-menu',
|
|
255
|
+
'[attr.id]': '_pattern.id()',
|
|
256
|
+
'[attr.data-visible]': '_pattern.isVisible()',
|
|
257
|
+
'(keydown)': '_pattern.onKeydown($event)',
|
|
258
|
+
'(mouseover)': '_pattern.onMouseOver($event)',
|
|
259
|
+
'(mouseout)': '_pattern.onMouseOut($event)',
|
|
260
|
+
'(focusout)': '_pattern.onFocusOut($event)',
|
|
261
|
+
'(focusin)': '_pattern.onFocusIn()',
|
|
262
|
+
'(click)': '_pattern.onClick($event)'
|
|
263
|
+
}
|
|
264
|
+
}]
|
|
265
|
+
}],
|
|
266
|
+
ctorParameters: () => []
|
|
267
|
+
});
|
|
268
|
+
class MenuBar {
|
|
269
|
+
_allItems = contentChildren(MenuItem, ...(ngDevMode ? [{
|
|
270
|
+
debugName: "_allItems",
|
|
271
|
+
descendants: true
|
|
272
|
+
}] : [{
|
|
273
|
+
descendants: true
|
|
274
|
+
}]));
|
|
275
|
+
_items = () => this._allItems().filter(i => i.parent === this);
|
|
276
|
+
_elementRef = inject(ElementRef);
|
|
277
|
+
element = this._elementRef.nativeElement;
|
|
278
|
+
_directionality = inject(Directionality);
|
|
279
|
+
textDirection = toSignal(this._directionality.change, {
|
|
280
|
+
initialValue: this._directionality.value
|
|
281
|
+
});
|
|
282
|
+
value = model([], ...(ngDevMode ? [{
|
|
283
|
+
debugName: "value"
|
|
284
|
+
}] : []));
|
|
285
|
+
wrap = input(true, ...(ngDevMode ? [{
|
|
286
|
+
debugName: "wrap"
|
|
287
|
+
}] : []));
|
|
288
|
+
typeaheadDelay = input(0.5, ...(ngDevMode ? [{
|
|
289
|
+
debugName: "typeaheadDelay"
|
|
290
|
+
}] : []));
|
|
291
|
+
_pattern;
|
|
292
|
+
items = signal([], ...(ngDevMode ? [{
|
|
293
|
+
debugName: "items"
|
|
294
|
+
}] : []));
|
|
295
|
+
onSubmit = output();
|
|
296
|
+
constructor() {
|
|
297
|
+
this._pattern = new MenuBarPattern({
|
|
298
|
+
...this,
|
|
299
|
+
multi: () => false,
|
|
300
|
+
skipDisabled: () => false,
|
|
301
|
+
focusMode: () => 'roving',
|
|
302
|
+
orientation: () => 'horizontal',
|
|
303
|
+
selectionMode: () => 'explicit',
|
|
304
|
+
onSubmit: value => this.onSubmit.emit(value),
|
|
305
|
+
activeItem: signal(undefined),
|
|
306
|
+
element: computed(() => this._elementRef.nativeElement)
|
|
307
|
+
});
|
|
308
|
+
afterRenderEffect(() => {
|
|
309
|
+
this.items.set(this._items().map(i => i._pattern));
|
|
310
|
+
});
|
|
311
|
+
afterRenderEffect(() => {
|
|
312
|
+
if (!this._pattern.hasBeenFocused()) {
|
|
313
|
+
this._pattern.setDefaultState();
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
318
|
+
minVersion: "12.0.0",
|
|
319
|
+
version: "20.2.0-next.2",
|
|
320
|
+
ngImport: i0,
|
|
321
|
+
type: MenuBar,
|
|
322
|
+
deps: [],
|
|
323
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
324
|
+
});
|
|
325
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
326
|
+
minVersion: "17.2.0",
|
|
327
|
+
version: "20.2.0-next.2",
|
|
328
|
+
type: MenuBar,
|
|
329
|
+
isStandalone: true,
|
|
330
|
+
selector: "[ngMenuBar]",
|
|
331
|
+
inputs: {
|
|
332
|
+
value: {
|
|
333
|
+
classPropertyName: "value",
|
|
334
|
+
publicName: "value",
|
|
335
|
+
isSignal: true,
|
|
336
|
+
isRequired: false,
|
|
337
|
+
transformFunction: null
|
|
338
|
+
},
|
|
339
|
+
wrap: {
|
|
340
|
+
classPropertyName: "wrap",
|
|
341
|
+
publicName: "wrap",
|
|
342
|
+
isSignal: true,
|
|
343
|
+
isRequired: false,
|
|
344
|
+
transformFunction: null
|
|
345
|
+
},
|
|
346
|
+
typeaheadDelay: {
|
|
347
|
+
classPropertyName: "typeaheadDelay",
|
|
348
|
+
publicName: "typeaheadDelay",
|
|
349
|
+
isSignal: true,
|
|
350
|
+
isRequired: false,
|
|
351
|
+
transformFunction: null
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
outputs: {
|
|
355
|
+
value: "valueChange",
|
|
356
|
+
onSubmit: "onSubmit"
|
|
357
|
+
},
|
|
358
|
+
host: {
|
|
359
|
+
attributes: {
|
|
360
|
+
"role": "menubar"
|
|
361
|
+
},
|
|
362
|
+
listeners: {
|
|
363
|
+
"keydown": "_pattern.onKeydown($event)",
|
|
364
|
+
"mouseover": "_pattern.onMouseOver($event)",
|
|
365
|
+
"click": "_pattern.onClick($event)",
|
|
366
|
+
"focusin": "_pattern.onFocusIn()",
|
|
367
|
+
"focusout": "_pattern.onFocusOut($event)"
|
|
368
|
+
},
|
|
369
|
+
classAttribute: "ng-menu-bar"
|
|
370
|
+
},
|
|
371
|
+
queries: [{
|
|
372
|
+
propertyName: "_allItems",
|
|
373
|
+
predicate: MenuItem,
|
|
374
|
+
descendants: true,
|
|
375
|
+
isSignal: true
|
|
376
|
+
}],
|
|
377
|
+
exportAs: ["ngMenuBar"],
|
|
378
|
+
ngImport: i0
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
382
|
+
minVersion: "12.0.0",
|
|
383
|
+
version: "20.2.0-next.2",
|
|
384
|
+
ngImport: i0,
|
|
385
|
+
type: MenuBar,
|
|
386
|
+
decorators: [{
|
|
387
|
+
type: Directive,
|
|
388
|
+
args: [{
|
|
389
|
+
selector: '[ngMenuBar]',
|
|
390
|
+
exportAs: 'ngMenuBar',
|
|
391
|
+
host: {
|
|
392
|
+
'role': 'menubar',
|
|
393
|
+
'class': 'ng-menu-bar',
|
|
394
|
+
'(keydown)': '_pattern.onKeydown($event)',
|
|
395
|
+
'(mouseover)': '_pattern.onMouseOver($event)',
|
|
396
|
+
'(click)': '_pattern.onClick($event)',
|
|
397
|
+
'(focusin)': '_pattern.onFocusIn()',
|
|
398
|
+
'(focusout)': '_pattern.onFocusOut($event)'
|
|
399
|
+
}
|
|
400
|
+
}]
|
|
401
|
+
}],
|
|
402
|
+
ctorParameters: () => []
|
|
403
|
+
});
|
|
404
|
+
class MenuItem {
|
|
405
|
+
_elementRef = inject(ElementRef);
|
|
406
|
+
element = this._elementRef.nativeElement;
|
|
407
|
+
id = input(Math.random().toString(36).substring(2, 10), ...(ngDevMode ? [{
|
|
408
|
+
debugName: "id"
|
|
409
|
+
}] : []));
|
|
410
|
+
value = input.required(...(ngDevMode ? [{
|
|
411
|
+
debugName: "value"
|
|
412
|
+
}] : []));
|
|
413
|
+
disabled = input(false, ...(ngDevMode ? [{
|
|
414
|
+
debugName: "disabled"
|
|
415
|
+
}] : []));
|
|
416
|
+
searchTerm = model('', ...(ngDevMode ? [{
|
|
417
|
+
debugName: "searchTerm"
|
|
418
|
+
}] : []));
|
|
419
|
+
_menu = inject(Menu, {
|
|
420
|
+
optional: true
|
|
421
|
+
});
|
|
422
|
+
_menuBar = inject(MenuBar, {
|
|
423
|
+
optional: true
|
|
424
|
+
});
|
|
425
|
+
parent = this._menu ?? this._menuBar;
|
|
426
|
+
submenu = input(undefined, ...(ngDevMode ? [{
|
|
427
|
+
debugName: "submenu"
|
|
428
|
+
}] : []));
|
|
429
|
+
_pattern = new MenuItemPattern({
|
|
430
|
+
id: this.id,
|
|
431
|
+
value: this.value,
|
|
432
|
+
element: computed(() => this._elementRef.nativeElement),
|
|
433
|
+
disabled: this.disabled,
|
|
434
|
+
searchTerm: this.searchTerm,
|
|
435
|
+
parent: computed(() => this.parent?._pattern),
|
|
436
|
+
submenu: computed(() => this.submenu()?._pattern)
|
|
437
|
+
});
|
|
438
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
439
|
+
minVersion: "12.0.0",
|
|
440
|
+
version: "20.2.0-next.2",
|
|
441
|
+
ngImport: i0,
|
|
442
|
+
type: MenuItem,
|
|
443
|
+
deps: [],
|
|
444
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
445
|
+
});
|
|
446
|
+
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
447
|
+
minVersion: "17.1.0",
|
|
448
|
+
version: "20.2.0-next.2",
|
|
449
|
+
type: MenuItem,
|
|
450
|
+
isStandalone: true,
|
|
451
|
+
selector: "[ngMenuItem]",
|
|
452
|
+
inputs: {
|
|
453
|
+
id: {
|
|
454
|
+
classPropertyName: "id",
|
|
455
|
+
publicName: "id",
|
|
456
|
+
isSignal: true,
|
|
457
|
+
isRequired: false,
|
|
458
|
+
transformFunction: null
|
|
459
|
+
},
|
|
460
|
+
value: {
|
|
461
|
+
classPropertyName: "value",
|
|
462
|
+
publicName: "value",
|
|
463
|
+
isSignal: true,
|
|
464
|
+
isRequired: true,
|
|
465
|
+
transformFunction: null
|
|
466
|
+
},
|
|
467
|
+
disabled: {
|
|
468
|
+
classPropertyName: "disabled",
|
|
469
|
+
publicName: "disabled",
|
|
470
|
+
isSignal: true,
|
|
471
|
+
isRequired: false,
|
|
472
|
+
transformFunction: null
|
|
473
|
+
},
|
|
474
|
+
searchTerm: {
|
|
475
|
+
classPropertyName: "searchTerm",
|
|
476
|
+
publicName: "searchTerm",
|
|
477
|
+
isSignal: true,
|
|
478
|
+
isRequired: false,
|
|
479
|
+
transformFunction: null
|
|
480
|
+
},
|
|
481
|
+
submenu: {
|
|
482
|
+
classPropertyName: "submenu",
|
|
483
|
+
publicName: "submenu",
|
|
484
|
+
isSignal: true,
|
|
485
|
+
isRequired: false,
|
|
486
|
+
transformFunction: null
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
outputs: {
|
|
490
|
+
searchTerm: "searchTermChange"
|
|
491
|
+
},
|
|
492
|
+
host: {
|
|
493
|
+
attributes: {
|
|
494
|
+
"role": "menuitem"
|
|
495
|
+
},
|
|
496
|
+
properties: {
|
|
497
|
+
"attr.tabindex": "_pattern.tabindex()",
|
|
498
|
+
"attr.data-active": "_pattern.isActive()",
|
|
499
|
+
"attr.aria-haspopup": "_pattern.hasPopup()",
|
|
500
|
+
"attr.aria-expanded": "_pattern.expanded()",
|
|
501
|
+
"attr.aria-disabled": "_pattern.disabled()",
|
|
502
|
+
"attr.aria-controls": "_pattern.submenu()?.id()"
|
|
503
|
+
},
|
|
504
|
+
classAttribute: "ng-menu-item"
|
|
505
|
+
},
|
|
506
|
+
exportAs: ["ngMenuItem"],
|
|
507
|
+
ngImport: i0
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
511
|
+
minVersion: "12.0.0",
|
|
512
|
+
version: "20.2.0-next.2",
|
|
513
|
+
ngImport: i0,
|
|
514
|
+
type: MenuItem,
|
|
515
|
+
decorators: [{
|
|
516
|
+
type: Directive,
|
|
517
|
+
args: [{
|
|
518
|
+
selector: '[ngMenuItem]',
|
|
519
|
+
exportAs: 'ngMenuItem',
|
|
520
|
+
host: {
|
|
521
|
+
'role': 'menuitem',
|
|
522
|
+
'class': 'ng-menu-item',
|
|
523
|
+
'[attr.tabindex]': '_pattern.tabindex()',
|
|
524
|
+
'[attr.data-active]': '_pattern.isActive()',
|
|
525
|
+
'[attr.aria-haspopup]': '_pattern.hasPopup()',
|
|
526
|
+
'[attr.aria-expanded]': '_pattern.expanded()',
|
|
527
|
+
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
528
|
+
'[attr.aria-controls]': '_pattern.submenu()?.id()'
|
|
529
|
+
}
|
|
530
|
+
}]
|
|
531
|
+
}]
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
export { Menu, MenuBar, MenuItem, MenuTrigger };
|
|
535
|
+
//# sourceMappingURL=menu.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/menu/menu.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 {\n afterRenderEffect,\n computed,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n output,\n Signal,\n signal,\n untracked,\n} from '@angular/core';\nimport {\n SignalLike,\n MenuBarPattern,\n MenuItemPattern,\n MenuPattern,\n MenuTriggerPattern,\n} from '@angular/aria/private';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {Directionality} from '@angular/cdk/bidi';\n\n/**\n * A trigger for a menu.\n *\n * The menu trigger is used to open and close menus, and can be placed on menu items to connect\n * sub-menus.\n */\n@Directive({\n selector: 'button[ngMenuTrigger]',\n exportAs: 'ngMenuTrigger',\n host: {\n 'class': 'ng-menu-trigger',\n '[attr.tabindex]': '_pattern.tabindex()',\n '[attr.aria-haspopup]': '_pattern.hasPopup()',\n '[attr.aria-expanded]': '_pattern.expanded()',\n '[attr.aria-controls]': '_pattern.submenu()?.id()',\n '(click)': '_pattern.onClick()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class MenuTrigger<V> {\n /** A reference to the menu trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLButtonElement = this._elementRef.nativeElement;\n\n // TODO(wagnermaciel): See we can remove the need to pass in a submenu.\n\n /** The submenu associated with the menu trigger. */\n submenu = input<Menu<V> | undefined>(undefined);\n\n /** A callback function triggered when a menu item is selected. */\n onSubmit = output<V>();\n\n /** The menu trigger ui pattern instance. */\n readonly _pattern: MenuTriggerPattern<V> = new MenuTriggerPattern({\n onSubmit: (value: V) => this.onSubmit.emit(value),\n element: computed(() => this._elementRef.nativeElement),\n submenu: computed(() => this.submenu()?._pattern),\n });\n}\n\n/**\n * A list of menu items.\n *\n * A menu is used to offer a list of menu item choices to users. Menus can be nested within other\n * menus to create sub-menus.\n *\n * ```html\n * <button ngMenuTrigger menu=\"menu\">Options</button>\n *\n * <div ngMenu #menu=\"ngMenu\">\n * <div ngMenuItem>Star</div>\n * <div ngMenuItem>Edit</div>\n * <div ngMenuItem>Delete</div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[ngMenu]',\n exportAs: 'ngMenu',\n host: {\n 'role': 'menu',\n 'class': 'ng-menu',\n '[attr.id]': '_pattern.id()',\n '[attr.data-visible]': '_pattern.isVisible()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(mouseout)': '_pattern.onMouseOut($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(click)': '_pattern.onClick($event)',\n },\n})\nexport class Menu<V> {\n /** The menu items contained in the menu. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n /** The menu items that are direct children of this menu. */\n readonly _items: Signal<MenuItem<V>[]> = computed(() =>\n this._allItems().filter(i => i.parent === this),\n );\n\n /** A reference to the menu element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** A signal wrapper for directionality. */\n readonly textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The submenu associated with the menu. */\n readonly submenu = input<Menu<V> | undefined>(undefined);\n\n /** The unique ID of the menu. */\n readonly id = input<string>(Math.random().toString(36).substring(2, 10));\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input<boolean>(true);\n\n /** The delay in seconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(0.5); // Picked arbitrarily.\n\n /** A reference to the parent menu item or menu trigger. */\n readonly parent = input<MenuTrigger<V> | MenuItem<V>>();\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuPattern<V>;\n\n /**\n * The menu items as a writable signal.\n *\n * TODO(wagnermaciel): This would normally be a computed, but using a computed causes a bug where\n * sometimes the items array is empty. The bug can be reproduced by switching this to use a\n * computed and then quickly opening and closing menus in the dev app.\n */\n readonly items = () => this._items().map(i => i._pattern);\n\n /** Whether the menu is visible. */\n isVisible = computed(() => this._pattern.isVisible());\n\n /** A callback function triggered when a menu item is selected. */\n onSubmit = output<V>();\n\n constructor() {\n this._pattern = new MenuPattern({\n ...this,\n parent: computed(() => this.parent()?._pattern),\n multi: () => false,\n skipDisabled: () => false,\n focusMode: () => 'roving',\n orientation: () => 'vertical',\n selectionMode: () => 'explicit',\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n onSubmit: (value: V) => this.onSubmit.emit(value),\n });\n\n // TODO(wagnermaciel): This is a redundancy needed for if the user uses display: none to hide\n // submenus. In those cases, the ui pattern is calling focus() before the ui has a chance to\n // update the display property. The result is focus() being called on an element that is not\n // focusable. This simply retries focusing the element after render.\n afterRenderEffect(() => {\n if (this._pattern.isVisible()) {\n const activeItem = untracked(() => this._pattern.inputs.activeItem());\n this._pattern.listBehavior.goto(activeItem!);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n\n // TODO(wagnermaciel): Author close, closeAll, and open methods for each directive.\n\n /** Closes the menu. */\n close(opts?: {refocus?: boolean}) {\n this._pattern.inputs.parent()?.close(opts);\n }\n\n /** Closes all parent menus. */\n closeAll(opts?: {refocus?: boolean}) {\n const root = this._pattern.root();\n\n if (root instanceof MenuTriggerPattern) {\n root.close(opts);\n }\n\n if (root instanceof MenuPattern || root instanceof MenuBarPattern) {\n root.inputs.activeItem()?.close(opts);\n }\n }\n}\n\n/**\n * A menu bar of menu items.\n *\n * Like the menu, a menubar is used to offer a list of menu item choices to users. However, a\n * menubar is used to display a persistent, top-level,\n * always-visible set of menu item choices.\n */\n@Directive({\n selector: '[ngMenuBar]',\n exportAs: 'ngMenuBar',\n host: {\n 'role': 'menubar',\n 'class': 'ng-menu-bar',\n '(keydown)': '_pattern.onKeydown($event)',\n '(mouseover)': '_pattern.onMouseOver($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class MenuBar<V> {\n /** The menu items contained in the menubar. */\n readonly _allItems = contentChildren<MenuItem<V>>(MenuItem, {descendants: true});\n\n readonly _items: SignalLike<MenuItem<V>[]> = () =>\n this._allItems().filter(i => i.parent === this);\n\n /** A reference to the menu element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menubar element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The directionality (LTR / RTL) context for the application (or a subtree of it). */\n private readonly _directionality = inject(Directionality);\n\n /** A signal wrapper for directionality. */\n readonly textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The value of the menu. */\n readonly value = model<V[]>([]);\n\n /** Whether the menu should wrap its items. */\n readonly wrap = input<boolean>(true);\n\n /** The delay in seconds before the typeahead buffer is cleared. */\n readonly typeaheadDelay = input<number>(0.5);\n\n /** The menu ui pattern instance. */\n readonly _pattern: MenuBarPattern<V>;\n\n /** The menu items as a writable signal. */\n readonly items = signal<MenuItemPattern<V>[]>([]);\n\n /** A callback function triggered when a menu item is selected. */\n onSubmit = output<V>();\n\n constructor() {\n this._pattern = new MenuBarPattern({\n ...this,\n multi: () => false,\n skipDisabled: () => false,\n focusMode: () => 'roving',\n orientation: () => 'horizontal',\n selectionMode: () => 'explicit',\n onSubmit: (value: V) => this.onSubmit.emit(value),\n activeItem: signal(undefined),\n element: computed(() => this._elementRef.nativeElement),\n });\n\n afterRenderEffect(() => {\n this.items.set(this._items().map(i => i._pattern));\n });\n\n afterRenderEffect(() => {\n if (!this._pattern.hasBeenFocused()) {\n this._pattern.setDefaultState();\n }\n });\n }\n}\n\n/**\n * An item in a Menu.\n *\n * Menu items can be used in menus and menubars to represent a choice or action a user can take.\n */\n@Directive({\n selector: '[ngMenuItem]',\n exportAs: 'ngMenuItem',\n host: {\n 'role': 'menuitem',\n 'class': 'ng-menu-item',\n '[attr.tabindex]': '_pattern.tabindex()',\n '[attr.data-active]': '_pattern.isActive()',\n '[attr.aria-haspopup]': '_pattern.hasPopup()',\n '[attr.aria-expanded]': '_pattern.expanded()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-controls]': '_pattern.submenu()?.id()',\n },\n})\nexport class MenuItem<V> {\n /** A reference to the menu item element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the menu element. */\n readonly element: HTMLElement = this._elementRef.nativeElement;\n\n /** The unique ID of the menu item. */\n readonly id = input<string>(Math.random().toString(36).substring(2, 10));\n\n /** The value of the menu item. */\n readonly value = input.required<V>();\n\n /** Whether the menu item is disabled. */\n readonly disabled = input<boolean>(false);\n\n // TODO(wagnermaciel): Discuss whether all inputs should be models.\n\n /** The search term associated with the menu item. */\n readonly searchTerm = model<string>('');\n\n /** A reference to the parent menu. */\n private readonly _menu = inject<Menu<V>>(Menu, {optional: true});\n\n /** A reference to the parent menu bar. */\n private readonly _menuBar = inject<MenuBar<V>>(MenuBar, {optional: true});\n\n /** A reference to the parent menu or menubar. */\n readonly parent = this._menu ?? this._menuBar;\n\n /** The submenu associated with the menu item. */\n readonly submenu = input<Menu<V> | undefined>(undefined);\n\n /** The menu item ui pattern instance. */\n readonly _pattern: MenuItemPattern<V> = new MenuItemPattern<V>({\n id: this.id,\n value: this.value,\n element: computed(() => this._elementRef.nativeElement),\n disabled: this.disabled,\n searchTerm: this.searchTerm,\n parent: computed(() => this.parent?._pattern),\n submenu: computed(() => this.submenu()?._pattern),\n });\n}\n"],"names":["submenu","computed","_pattern","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","MenuTrigger","deps","target","ɵɵFactoryTarget","Directive","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","outputs","onSubmit","host","listeners","properties","classAttribute","exportAs","decorators","args","_elementRef","inject","ElementRef","element","nativeElement","_directionality","Directionality","change","initialValue","value","ngDevMode","debugName","input","parent","undefined","MenuPattern","multi","skipDisabled","focusMode","orientation","selectionMode","activeItem","signal","isVisible","listBehavior","goto","afterRenderEffect","hasBeenFocused","setDefaultState","MenuTriggerPattern","root","Menu","ɵɵngDeclareDirective","id","wrap","typeaheadDelay","attributes","queries","propertyName","predicate","MenuItem","descendants","ctorParameters","constructor","emit","MenuBar","ɵdir"],"mappings":";;;;;;;;;;;;;;;;AA0FGA,IAAAA,OAAA,EAAAC,QAAA,CAAA,MAAA,IAAAD,CAAAA,OAAA,IAAAE,QAAA;;AAmBQ,EAAA,OAAAC,IAAS,GAAAC,EAAA,CAAGC,kBAAA,CAAA;IAAAC,UAAA,EAAA,QAAA;IAAAC,OAAA,EAAA,eAAA;AAAAC,IAAAA,QAAA,EAAAJ,EAAA;AAAAK,IAAAA,IAAA,EAAAC,WAAA;IAAAC,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAR,EAAA,CAAAS,eAAA,CAAAC;AAAA,GAAA,CAAA;;cAIF,EAAA,QAAA;IAAAP,OAAA,EAAA,eAAA;AAAAE,IAAAA,IAAA,EAAAC,WAAA;IAAA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