@angular/aria 21.0.0 → 21.0.1
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-combobox.json +14 -10
- package/_adev_assets/aria-grid.json +7 -7
- package/_adev_assets/aria-listbox.json +8 -4
- package/fesm2022/accordion.mjs +122 -15
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +81 -20
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +282 -28
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +147 -11
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +203 -19
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +20 -7
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +123 -18
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +110 -12
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +184 -12
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/listbox.d.ts +2 -2
package/fesm2022/listbox.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, inject, ElementRef, contentChildren, computed, booleanAttribute, model, signal, afterRenderEffect, untracked, Directive } from '@angular/core';
|
|
2
|
+
import { input, inject, ElementRef, contentChildren, forwardRef, computed, booleanAttribute, model, signal, afterRenderEffect, untracked, Directive } from '@angular/core';
|
|
3
3
|
import { ComboboxListboxPattern, ListboxPattern, OptionPattern } from '@angular/aria/private';
|
|
4
4
|
import { Directionality } from '@angular/cdk/bidi';
|
|
5
5
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -16,7 +16,7 @@ class Listbox {
|
|
|
16
16
|
_elementRef = inject(ElementRef);
|
|
17
17
|
element = this._elementRef.nativeElement;
|
|
18
18
|
_directionality = inject(Directionality);
|
|
19
|
-
_options = contentChildren(Option, ...(ngDevMode ? [{
|
|
19
|
+
_options = contentChildren(forwardRef(() => Option), ...(ngDevMode ? [{
|
|
20
20
|
debugName: "_options",
|
|
21
21
|
descendants: true
|
|
22
22
|
}] : [{
|
|
@@ -132,7 +132,7 @@ class Listbox {
|
|
|
132
132
|
}
|
|
133
133
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
134
134
|
minVersion: "12.0.0",
|
|
135
|
-
version: "
|
|
135
|
+
version: "21.0.0",
|
|
136
136
|
ngImport: i0,
|
|
137
137
|
type: Listbox,
|
|
138
138
|
deps: [],
|
|
@@ -140,7 +140,7 @@ class Listbox {
|
|
|
140
140
|
});
|
|
141
141
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
142
142
|
minVersion: "17.2.0",
|
|
143
|
-
version: "
|
|
143
|
+
version: "21.0.0",
|
|
144
144
|
type: Listbox,
|
|
145
145
|
isStandalone: true,
|
|
146
146
|
selector: "[ngListbox]",
|
|
@@ -247,7 +247,7 @@ class Listbox {
|
|
|
247
247
|
},
|
|
248
248
|
queries: [{
|
|
249
249
|
propertyName: "_options",
|
|
250
|
-
predicate: Option,
|
|
250
|
+
predicate: i0.forwardRef(() => Option),
|
|
251
251
|
descendants: true,
|
|
252
252
|
isSignal: true
|
|
253
253
|
}],
|
|
@@ -260,7 +260,7 @@ class Listbox {
|
|
|
260
260
|
}
|
|
261
261
|
i0.ɵɵngDeclareClassMetadata({
|
|
262
262
|
minVersion: "12.0.0",
|
|
263
|
-
version: "
|
|
263
|
+
version: "21.0.0",
|
|
264
264
|
ngImport: i0,
|
|
265
265
|
type: Listbox,
|
|
266
266
|
decorators: [{
|
|
@@ -284,7 +284,109 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
284
284
|
hostDirectives: [ComboboxPopup]
|
|
285
285
|
}]
|
|
286
286
|
}],
|
|
287
|
-
ctorParameters: () => []
|
|
287
|
+
ctorParameters: () => [],
|
|
288
|
+
propDecorators: {
|
|
289
|
+
id: [{
|
|
290
|
+
type: i0.Input,
|
|
291
|
+
args: [{
|
|
292
|
+
isSignal: true,
|
|
293
|
+
alias: "id",
|
|
294
|
+
required: false
|
|
295
|
+
}]
|
|
296
|
+
}],
|
|
297
|
+
_options: [{
|
|
298
|
+
type: i0.ContentChildren,
|
|
299
|
+
args: [forwardRef(() => Option), {
|
|
300
|
+
...{
|
|
301
|
+
descendants: true
|
|
302
|
+
},
|
|
303
|
+
isSignal: true
|
|
304
|
+
}]
|
|
305
|
+
}],
|
|
306
|
+
orientation: [{
|
|
307
|
+
type: i0.Input,
|
|
308
|
+
args: [{
|
|
309
|
+
isSignal: true,
|
|
310
|
+
alias: "orientation",
|
|
311
|
+
required: false
|
|
312
|
+
}]
|
|
313
|
+
}],
|
|
314
|
+
multi: [{
|
|
315
|
+
type: i0.Input,
|
|
316
|
+
args: [{
|
|
317
|
+
isSignal: true,
|
|
318
|
+
alias: "multi",
|
|
319
|
+
required: false
|
|
320
|
+
}]
|
|
321
|
+
}],
|
|
322
|
+
wrap: [{
|
|
323
|
+
type: i0.Input,
|
|
324
|
+
args: [{
|
|
325
|
+
isSignal: true,
|
|
326
|
+
alias: "wrap",
|
|
327
|
+
required: false
|
|
328
|
+
}]
|
|
329
|
+
}],
|
|
330
|
+
softDisabled: [{
|
|
331
|
+
type: i0.Input,
|
|
332
|
+
args: [{
|
|
333
|
+
isSignal: true,
|
|
334
|
+
alias: "softDisabled",
|
|
335
|
+
required: false
|
|
336
|
+
}]
|
|
337
|
+
}],
|
|
338
|
+
focusMode: [{
|
|
339
|
+
type: i0.Input,
|
|
340
|
+
args: [{
|
|
341
|
+
isSignal: true,
|
|
342
|
+
alias: "focusMode",
|
|
343
|
+
required: false
|
|
344
|
+
}]
|
|
345
|
+
}],
|
|
346
|
+
selectionMode: [{
|
|
347
|
+
type: i0.Input,
|
|
348
|
+
args: [{
|
|
349
|
+
isSignal: true,
|
|
350
|
+
alias: "selectionMode",
|
|
351
|
+
required: false
|
|
352
|
+
}]
|
|
353
|
+
}],
|
|
354
|
+
typeaheadDelay: [{
|
|
355
|
+
type: i0.Input,
|
|
356
|
+
args: [{
|
|
357
|
+
isSignal: true,
|
|
358
|
+
alias: "typeaheadDelay",
|
|
359
|
+
required: false
|
|
360
|
+
}]
|
|
361
|
+
}],
|
|
362
|
+
disabled: [{
|
|
363
|
+
type: i0.Input,
|
|
364
|
+
args: [{
|
|
365
|
+
isSignal: true,
|
|
366
|
+
alias: "disabled",
|
|
367
|
+
required: false
|
|
368
|
+
}]
|
|
369
|
+
}],
|
|
370
|
+
readonly: [{
|
|
371
|
+
type: i0.Input,
|
|
372
|
+
args: [{
|
|
373
|
+
isSignal: true,
|
|
374
|
+
alias: "readonly",
|
|
375
|
+
required: false
|
|
376
|
+
}]
|
|
377
|
+
}],
|
|
378
|
+
values: [{
|
|
379
|
+
type: i0.Input,
|
|
380
|
+
args: [{
|
|
381
|
+
isSignal: true,
|
|
382
|
+
alias: "values",
|
|
383
|
+
required: false
|
|
384
|
+
}]
|
|
385
|
+
}, {
|
|
386
|
+
type: i0.Output,
|
|
387
|
+
args: ["valuesChange"]
|
|
388
|
+
}]
|
|
389
|
+
}
|
|
288
390
|
});
|
|
289
391
|
class Option {
|
|
290
392
|
_elementRef = inject(ElementRef);
|
|
@@ -327,7 +429,7 @@ class Option {
|
|
|
327
429
|
});
|
|
328
430
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
329
431
|
minVersion: "12.0.0",
|
|
330
|
-
version: "
|
|
432
|
+
version: "21.0.0",
|
|
331
433
|
ngImport: i0,
|
|
332
434
|
type: Option,
|
|
333
435
|
deps: [],
|
|
@@ -335,7 +437,7 @@ class Option {
|
|
|
335
437
|
});
|
|
336
438
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
337
439
|
minVersion: "17.1.0",
|
|
338
|
-
version: "
|
|
440
|
+
version: "21.0.0",
|
|
339
441
|
type: Option,
|
|
340
442
|
isStandalone: true,
|
|
341
443
|
selector: "[ngOption]",
|
|
@@ -387,7 +489,7 @@ class Option {
|
|
|
387
489
|
}
|
|
388
490
|
i0.ɵɵngDeclareClassMetadata({
|
|
389
491
|
minVersion: "12.0.0",
|
|
390
|
-
version: "
|
|
492
|
+
version: "21.0.0",
|
|
391
493
|
ngImport: i0,
|
|
392
494
|
type: Option,
|
|
393
495
|
decorators: [{
|
|
@@ -404,7 +506,41 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
404
506
|
'[attr.aria-disabled]': '_pattern.disabled()'
|
|
405
507
|
}
|
|
406
508
|
}]
|
|
407
|
-
}]
|
|
509
|
+
}],
|
|
510
|
+
propDecorators: {
|
|
511
|
+
id: [{
|
|
512
|
+
type: i0.Input,
|
|
513
|
+
args: [{
|
|
514
|
+
isSignal: true,
|
|
515
|
+
alias: "id",
|
|
516
|
+
required: false
|
|
517
|
+
}]
|
|
518
|
+
}],
|
|
519
|
+
value: [{
|
|
520
|
+
type: i0.Input,
|
|
521
|
+
args: [{
|
|
522
|
+
isSignal: true,
|
|
523
|
+
alias: "value",
|
|
524
|
+
required: true
|
|
525
|
+
}]
|
|
526
|
+
}],
|
|
527
|
+
disabled: [{
|
|
528
|
+
type: i0.Input,
|
|
529
|
+
args: [{
|
|
530
|
+
isSignal: true,
|
|
531
|
+
alias: "disabled",
|
|
532
|
+
required: false
|
|
533
|
+
}]
|
|
534
|
+
}],
|
|
535
|
+
label: [{
|
|
536
|
+
type: i0.Input,
|
|
537
|
+
args: [{
|
|
538
|
+
isSignal: true,
|
|
539
|
+
alias: "label",
|
|
540
|
+
required: false
|
|
541
|
+
}]
|
|
542
|
+
}]
|
|
543
|
+
}
|
|
408
544
|
});
|
|
409
545
|
|
|
410
546
|
export { Listbox, Option };
|
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/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 * Represents a container used to display a list of items for a user to select from.\n *\n * The `ngListbox` is meant to be used in conjunction with `ngOption` directives to create a\n * selectable list. It supports single and multiple selection modes, as well as various focus and\n * orientation strategies.\n *\n * ```html\n * <ul ngListbox [(value)]=\"selectedItems\" [multi]=\"true\" orientation=\"vertical\">\n * @for (item of items; track item.id) {\n * <li ngOption [value]=\"item.id\" [label]=\"item.name\" [disabled]=\"item.disabled\">\n * {{item.name}}\n * </li>\n * }\n * </ul>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngListbox]',\n exportAs: 'ngListbox',\n host: {\n 'role': '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: [ComboboxPopup],\n})\nexport class Listbox<V> {\n /** A unique identifier for the listbox. */\n readonly id = input(inject(_IdGenerator).getId('ng-listbox-', true));\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 host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\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 /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n softDisabled = input(true, {transform: booleanAttribute});\n\n /**\n * The focus strategy used by the list.\n * - `roving`: Focus is moved to the active item using `tabindex`.\n * - `activedescendant`: Focus remains on the listbox container, and `aria-activedescendant` is used to indicate the active item.\n */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /**\n * The selection strategy used by the list.\n * - `follow`: The focused item is automatically selected.\n * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).\n */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(500); // 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 currently selected items. */\n values = 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 values are always in sync with the available options.\n afterRenderEffect(() => {\n const items = inputs.items();\n const values = untracked(() => this.values());\n\n if (items && values.some(v => !items.some(i => i.value() === v))) {\n this.values.set(values.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 /** Navigates to the first item in the listbox. */\n gotoFirst() {\n this._pattern.listBehavior.first();\n }\n}\n\n/**\n * A selectable option in an `ngListbox`.\n *\n * This directive should be applied to an element (e.g., `<li>`, `<div>`) within an\n * `ngListbox`. The `value` input is used to identify the option, and the `label` input provides\n * the accessible name for the option.\n *\n * ```html\n * <li ngOption value=\"item-id\" label=\"Item Name\">\n * Item Name\n * </li>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngOption]',\n exportAs: 'ngOption',\n host: {\n 'role': 'option',\n '[attr.data-active]': '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 host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the option is currently active (focused). */\n active = computed(() => this._pattern.active());\n\n /** The parent Listbox. */\n private readonly _listbox = inject(Listbox);\n\n /** A unique identifier for the option. */\n readonly id = input(inject(_IdGenerator).getId('ng-option-', true));\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 private readonly _listboxPattern = computed(() => this._listbox._pattern);\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._listboxPattern,\n element: () => this.element,\n searchTerm: () => this.searchTerm() ?? '',\n });\n}\n"],"names":["Listbox","id","input","inject","_IdGenerator","getId","_popup","ComboboxPopup","optional","_elementRef","ElementRef","element","nativeElement","_directionality","Directionality","_options","contentChildren","Option","descendants","textDirection","toSignal","change","initialValue","value","items","computed","map","option","_pattern","ngDevMode","debugName","orientation","multi","transform","booleanAttribute","wrap","softDisabled","focusMode","selectionMode","typeaheadDelay","disabled","readonly","values","model","_hasFocused","signal","constructor","inputs","activeItem","undefined","combobox","ComboboxListboxPattern","ListboxPattern","_controls","set","afterRenderEffect","violations","validate","violation","console","error","setDefaultState","untracked","some","i","listBehavior","unfocus","v","filter","_onFocus","scrollActiveItemIntoView","options","block","scrollIntoView","gotoFirst","first","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","hostDirectives","directive","i1","ngImport","decorators","args","selector","host","active","_listbox","searchTerm","label","textContent","_listboxPattern","required","selected","OptionPattern","listbox","isStandalone","classPropertyName","publicName","isRequired","transformFunction","attributes","properties"],"mappings":";;;;;;;;MAgEaA,OAAO,CAAA;AAETC,EAAAA,EAAE,GAAGC,KAAK,CAACC,MAAM,CAACC,YAAY,CAAC,CAACC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC;;WAAC;AAGnDC,EAAAA,MAAM,GAAGH,MAAM,CAAmBI,aAAa,EAAE;AAChEC,IAAAA,QAAQ,EAAE;AACX,GAAA,CAAC;AAGeC,EAAAA,WAAW,GAAGN,MAAM,CAACO,UAAU,CAAC;AAGxCC,EAAAA,OAAO,GAAG,IAAI,CAACF,WAAW,CAACG,aAA4B;AAG/CC,EAAAA,eAAe,GAAGV,MAAM,CAACW,cAAc,CAAC;EAGxCC,QAAQ,GAAGC,eAAe,CAACC,MAAM;;AAAGC,IAAAA,WAAW,EAAE;GAAI,CAAA,GAAA,CAAlB;AAACA,IAAAA,WAAW,EAAE;GAAK,GAAC;EAG9DC,aAAa,GAAGC,QAAQ,CAAC,IAAI,CAACP,eAAe,CAACQ,MAAM,EAAE;AAC9DC,IAAAA,YAAY,EAAE,IAAI,CAACT,eAAe,CAACU;AACpC,GAAA,CAAC;EAGQC,KAAK,GAAGC,QAAQ,CAAC,MAAM,IAAI,CAACV,QAAQ,EAAE,CAACW,GAAG,CAACC,MAAM,IAAIA,MAAM,CAACC,QAAQ,CAAC,EAAA,IAAAC,SAAA,GAAA,CAAA;AAAAC,IAAAA,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAC;EAGhFC,WAAW,GAAG7B,KAAK,CAA4B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BAAA,EAAA,UAAA;AAAA,QAAA,SAAA,EAAA,eAAA;AAAA,QAAA,eAAA,EAAA,qBAAA;AAAA,QAAA,oBAAA,EAAA,qBAAA;AAAA,QAAA,oBAAA,EAAA;AAAA;KAAA;IAAAzB,QAAA,EAAA,CAAA,UAAA,CAAA;AAAAI,IAAAA,QAAA,EAAAb;AAAA,GAAA,CAAA;;;;;;QAAN7D,MAAM;AAAA2E,EAAAA,UAAA,EAAA,CAAA;UAZlBZ,SAAS;AAACa,IAAAA,IAAA,EAAA,CAAA;AACTC,MAAAA,QAAQ,EAAE,YAAY;AACtBP,MAAAA,QAAQ,EAAE,UAAU;AACpBQ,MAAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,oBAAoB,EAAE,UAAU;AAChC,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,iBAAiB,EAAE,qBAAqB;AACxC,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,sBAAsB,EAAE;AACzB;KACF;;;;;;"}
|
|
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 forwardRef,\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 * Represents a container used to display a list of items for a user to select from.\n *\n * The `ngListbox` is meant to be used in conjunction with `ngOption` directives to create a\n * selectable list. It supports single and multiple selection modes, as well as various focus and\n * orientation strategies.\n *\n * ```html\n * <ul ngListbox [(value)]=\"selectedItems\" [multi]=\"true\" orientation=\"vertical\">\n * @for (item of items; track item.id) {\n * <li ngOption [value]=\"item.id\" [label]=\"item.name\" [disabled]=\"item.disabled\">\n * {{item.name}}\n * </li>\n * }\n * </ul>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngListbox]',\n exportAs: 'ngListbox',\n host: {\n 'role': '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: [ComboboxPopup],\n})\nexport class Listbox<V> {\n /** A unique identifier for the listbox. */\n readonly id = input(inject(_IdGenerator).getId('ng-listbox-', true));\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 host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\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(\n // We need a `forwardRef` here, because the option class is declared further down\n // in the same file. When the reference is written to Angular's metadata this can\n // cause an attempt to access the class before it's defined.\n forwardRef(() => Option),\n {descendants: true},\n );\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 /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n softDisabled = input(true, {transform: booleanAttribute});\n\n /**\n * The focus strategy used by the list.\n * - `roving`: Focus is moved to the active item using `tabindex`.\n * - `activedescendant`: Focus remains on the listbox container, and `aria-activedescendant` is used to indicate the active item.\n */\n focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /**\n * The selection strategy used by the list.\n * - `follow`: The focused item is automatically selected.\n * - `explicit`: Items are selected explicitly by the user (e.g., via click or spacebar).\n */\n selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n typeaheadDelay = input<number>(500); // 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 currently selected items. */\n values = 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 values are always in sync with the available options.\n afterRenderEffect(() => {\n const items = inputs.items();\n const values = untracked(() => this.values());\n\n if (items && values.some(v => !items.some(i => i.value() === v))) {\n this.values.set(values.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 /** Navigates to the first item in the listbox. */\n gotoFirst() {\n this._pattern.listBehavior.first();\n }\n}\n\n/**\n * A selectable option in an `ngListbox`.\n *\n * This directive should be applied to an element (e.g., `<li>`, `<div>`) within an\n * `ngListbox`. The `value` input is used to identify the option, and the `label` input provides\n * the accessible name for the option.\n *\n * ```html\n * <li ngOption value=\"item-id\" label=\"Item Name\">\n * Item Name\n * </li>\n * ```\n *\n * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngOption]',\n exportAs: 'ngOption',\n host: {\n 'role': 'option',\n '[attr.data-active]': '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 host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the option is currently active (focused). */\n active = computed(() => this._pattern.active());\n\n /** The parent Listbox. */\n private readonly _listbox = inject(Listbox);\n\n /** A unique identifier for the option. */\n readonly id = input(inject(_IdGenerator).getId('ng-option-', true));\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 private readonly _listboxPattern = computed(() => this._listbox._pattern);\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._listboxPattern,\n element: () => this.element,\n searchTerm: () => this.searchTerm() ?? '',\n });\n}\n"],"names":["Listbox","id","input","inject","_IdGenerator","getId","_popup","ComboboxPopup","optional","_elementRef","ElementRef","element","nativeElement","_directionality","Directionality","_options","contentChildren","forwardRef","Option","ngDevMode","debugName","descendants","textDirection","toSignal","change","initialValue","value","items","computed","map","option","_pattern","orientation","multi","transform","booleanAttribute","wrap","softDisabled","focusMode","selectionMode","typeaheadDelay","disabled","readonly","values","model","_hasFocused","signal","constructor","inputs","activeItem","undefined","combobox","ComboboxListboxPattern","ListboxPattern","_controls","set","afterRenderEffect","violations","validate","violation","console","error","setDefaultState","untracked","some","i","listBehavior","unfocus","v","filter","_onFocus","scrollActiveItemIntoView","options","block","scrollIntoView","gotoFirst","first","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","hostDirectives","directive","i1","ngImport","decorators","args","selector","host","Input","alias","required","Output","active","_listbox","searchTerm","label","textContent","_listboxPattern","selected","OptionPattern","listbox","isStandalone","classPropertyName","publicName","isRequired","transformFunction","attributes","properties"],"mappings":";;;;;;;;MAiEaA,OAAO,CAAA;AAETC,EAAAA,EAAE,GAAGC,KAAK,CAACC,MAAM,CAACC,YAAY,CAAC,CAACC,KAAK,CAAC,aAAa,EAA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AACa,IAAAA,IAAA,EAAA,CAAA;AACTC,MAAAA,QAAQ,EAAE,YAAY;AACtBP,MAAAA,QAAQ,EAAE,UAAU;AACpBQ,MAAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,QAAQ;AAChB,QAAA,oBAAoB,EAAE,UAAU;AAChC,QAAA,WAAW,EAAE,eAAe;AAC5B,QAAA,iBAAiB,EAAE,qBAAqB;AACxC,QAAA,sBAAsB,EAAE,qBAAqB;AAC7C,QAAA,sBAAsB,EAAE;AACzB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/fesm2022/menu.mjs
CHANGED
|
@@ -49,7 +49,7 @@ class MenuTrigger {
|
|
|
49
49
|
}
|
|
50
50
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
51
51
|
minVersion: "12.0.0",
|
|
52
|
-
version: "
|
|
52
|
+
version: "21.0.0",
|
|
53
53
|
ngImport: i0,
|
|
54
54
|
type: MenuTrigger,
|
|
55
55
|
deps: [],
|
|
@@ -57,7 +57,7 @@ class MenuTrigger {
|
|
|
57
57
|
});
|
|
58
58
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
59
59
|
minVersion: "17.1.0",
|
|
60
|
-
version: "
|
|
60
|
+
version: "21.0.0",
|
|
61
61
|
type: MenuTrigger,
|
|
62
62
|
isStandalone: true,
|
|
63
63
|
selector: "button[ngMenuTrigger]",
|
|
@@ -106,7 +106,7 @@ class MenuTrigger {
|
|
|
106
106
|
}
|
|
107
107
|
i0.ɵɵngDeclareClassMetadata({
|
|
108
108
|
minVersion: "12.0.0",
|
|
109
|
-
version: "
|
|
109
|
+
version: "21.0.0",
|
|
110
110
|
ngImport: i0,
|
|
111
111
|
type: MenuTrigger,
|
|
112
112
|
decorators: [{
|
|
@@ -128,7 +128,33 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
128
128
|
}
|
|
129
129
|
}]
|
|
130
130
|
}],
|
|
131
|
-
ctorParameters: () => []
|
|
131
|
+
ctorParameters: () => [],
|
|
132
|
+
propDecorators: {
|
|
133
|
+
menu: [{
|
|
134
|
+
type: i0.Input,
|
|
135
|
+
args: [{
|
|
136
|
+
isSignal: true,
|
|
137
|
+
alias: "menu",
|
|
138
|
+
required: false
|
|
139
|
+
}]
|
|
140
|
+
}],
|
|
141
|
+
disabled: [{
|
|
142
|
+
type: i0.Input,
|
|
143
|
+
args: [{
|
|
144
|
+
isSignal: true,
|
|
145
|
+
alias: "disabled",
|
|
146
|
+
required: false
|
|
147
|
+
}]
|
|
148
|
+
}],
|
|
149
|
+
softDisabled: [{
|
|
150
|
+
type: i0.Input,
|
|
151
|
+
args: [{
|
|
152
|
+
isSignal: true,
|
|
153
|
+
alias: "softDisabled",
|
|
154
|
+
required: false
|
|
155
|
+
}]
|
|
156
|
+
}]
|
|
157
|
+
}
|
|
132
158
|
});
|
|
133
159
|
class Menu {
|
|
134
160
|
_deferredContentAware = inject(DeferredContentAware, {
|
|
@@ -218,7 +244,7 @@ class Menu {
|
|
|
218
244
|
}
|
|
219
245
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
220
246
|
minVersion: "12.0.0",
|
|
221
|
-
version: "
|
|
247
|
+
version: "21.0.0",
|
|
222
248
|
ngImport: i0,
|
|
223
249
|
type: Menu,
|
|
224
250
|
deps: [],
|
|
@@ -226,7 +252,7 @@ class Menu {
|
|
|
226
252
|
});
|
|
227
253
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
228
254
|
minVersion: "17.2.0",
|
|
229
|
-
version: "
|
|
255
|
+
version: "21.0.0",
|
|
230
256
|
type: Menu,
|
|
231
257
|
isStandalone: true,
|
|
232
258
|
selector: "[ngMenu]",
|
|
@@ -305,7 +331,7 @@ class Menu {
|
|
|
305
331
|
}
|
|
306
332
|
i0.ɵɵngDeclareClassMetadata({
|
|
307
333
|
minVersion: "12.0.0",
|
|
308
|
-
version: "
|
|
334
|
+
version: "21.0.0",
|
|
309
335
|
ngImport: i0,
|
|
310
336
|
type: Menu,
|
|
311
337
|
decorators: [{
|
|
@@ -332,7 +358,62 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
332
358
|
}]
|
|
333
359
|
}]
|
|
334
360
|
}],
|
|
335
|
-
ctorParameters: () => []
|
|
361
|
+
ctorParameters: () => [],
|
|
362
|
+
propDecorators: {
|
|
363
|
+
_allItems: [{
|
|
364
|
+
type: i0.ContentChildren,
|
|
365
|
+
args: [i0.forwardRef(() => MenuItem), {
|
|
366
|
+
...{
|
|
367
|
+
descendants: true
|
|
368
|
+
},
|
|
369
|
+
isSignal: true
|
|
370
|
+
}]
|
|
371
|
+
}],
|
|
372
|
+
id: [{
|
|
373
|
+
type: i0.Input,
|
|
374
|
+
args: [{
|
|
375
|
+
isSignal: true,
|
|
376
|
+
alias: "id",
|
|
377
|
+
required: false
|
|
378
|
+
}]
|
|
379
|
+
}],
|
|
380
|
+
wrap: [{
|
|
381
|
+
type: i0.Input,
|
|
382
|
+
args: [{
|
|
383
|
+
isSignal: true,
|
|
384
|
+
alias: "wrap",
|
|
385
|
+
required: false
|
|
386
|
+
}]
|
|
387
|
+
}],
|
|
388
|
+
typeaheadDelay: [{
|
|
389
|
+
type: i0.Input,
|
|
390
|
+
args: [{
|
|
391
|
+
isSignal: true,
|
|
392
|
+
alias: "typeaheadDelay",
|
|
393
|
+
required: false
|
|
394
|
+
}]
|
|
395
|
+
}],
|
|
396
|
+
disabled: [{
|
|
397
|
+
type: i0.Input,
|
|
398
|
+
args: [{
|
|
399
|
+
isSignal: true,
|
|
400
|
+
alias: "disabled",
|
|
401
|
+
required: false
|
|
402
|
+
}]
|
|
403
|
+
}],
|
|
404
|
+
onSelect: [{
|
|
405
|
+
type: i0.Output,
|
|
406
|
+
args: ["onSelect"]
|
|
407
|
+
}],
|
|
408
|
+
expansionDelay: [{
|
|
409
|
+
type: i0.Input,
|
|
410
|
+
args: [{
|
|
411
|
+
isSignal: true,
|
|
412
|
+
alias: "expansionDelay",
|
|
413
|
+
required: false
|
|
414
|
+
}]
|
|
415
|
+
}]
|
|
416
|
+
}
|
|
336
417
|
});
|
|
337
418
|
class MenuBar {
|
|
338
419
|
_allItems = contentChildren(MenuItem, ...(ngDevMode ? [{
|
|
@@ -401,7 +482,7 @@ class MenuBar {
|
|
|
401
482
|
}
|
|
402
483
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
403
484
|
minVersion: "12.0.0",
|
|
404
|
-
version: "
|
|
485
|
+
version: "21.0.0",
|
|
405
486
|
ngImport: i0,
|
|
406
487
|
type: MenuBar,
|
|
407
488
|
deps: [],
|
|
@@ -409,7 +490,7 @@ class MenuBar {
|
|
|
409
490
|
});
|
|
410
491
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
411
492
|
minVersion: "17.2.0",
|
|
412
|
-
version: "
|
|
493
|
+
version: "21.0.0",
|
|
413
494
|
type: MenuBar,
|
|
414
495
|
isStandalone: true,
|
|
415
496
|
selector: "[ngMenuBar]",
|
|
@@ -483,7 +564,7 @@ class MenuBar {
|
|
|
483
564
|
}
|
|
484
565
|
i0.ɵɵngDeclareClassMetadata({
|
|
485
566
|
minVersion: "12.0.0",
|
|
486
|
-
version: "
|
|
567
|
+
version: "21.0.0",
|
|
487
568
|
ngImport: i0,
|
|
488
569
|
type: MenuBar,
|
|
489
570
|
decorators: [{
|
|
@@ -504,7 +585,65 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
504
585
|
}
|
|
505
586
|
}]
|
|
506
587
|
}],
|
|
507
|
-
ctorParameters: () => []
|
|
588
|
+
ctorParameters: () => [],
|
|
589
|
+
propDecorators: {
|
|
590
|
+
_allItems: [{
|
|
591
|
+
type: i0.ContentChildren,
|
|
592
|
+
args: [i0.forwardRef(() => MenuItem), {
|
|
593
|
+
...{
|
|
594
|
+
descendants: true
|
|
595
|
+
},
|
|
596
|
+
isSignal: true
|
|
597
|
+
}]
|
|
598
|
+
}],
|
|
599
|
+
disabled: [{
|
|
600
|
+
type: i0.Input,
|
|
601
|
+
args: [{
|
|
602
|
+
isSignal: true,
|
|
603
|
+
alias: "disabled",
|
|
604
|
+
required: false
|
|
605
|
+
}]
|
|
606
|
+
}],
|
|
607
|
+
softDisabled: [{
|
|
608
|
+
type: i0.Input,
|
|
609
|
+
args: [{
|
|
610
|
+
isSignal: true,
|
|
611
|
+
alias: "softDisabled",
|
|
612
|
+
required: false
|
|
613
|
+
}]
|
|
614
|
+
}],
|
|
615
|
+
values: [{
|
|
616
|
+
type: i0.Input,
|
|
617
|
+
args: [{
|
|
618
|
+
isSignal: true,
|
|
619
|
+
alias: "values",
|
|
620
|
+
required: false
|
|
621
|
+
}]
|
|
622
|
+
}, {
|
|
623
|
+
type: i0.Output,
|
|
624
|
+
args: ["valuesChange"]
|
|
625
|
+
}],
|
|
626
|
+
wrap: [{
|
|
627
|
+
type: i0.Input,
|
|
628
|
+
args: [{
|
|
629
|
+
isSignal: true,
|
|
630
|
+
alias: "wrap",
|
|
631
|
+
required: false
|
|
632
|
+
}]
|
|
633
|
+
}],
|
|
634
|
+
typeaheadDelay: [{
|
|
635
|
+
type: i0.Input,
|
|
636
|
+
args: [{
|
|
637
|
+
isSignal: true,
|
|
638
|
+
alias: "typeaheadDelay",
|
|
639
|
+
required: false
|
|
640
|
+
}]
|
|
641
|
+
}],
|
|
642
|
+
onSelect: [{
|
|
643
|
+
type: i0.Output,
|
|
644
|
+
args: ["onSelect"]
|
|
645
|
+
}]
|
|
646
|
+
}
|
|
508
647
|
});
|
|
509
648
|
class MenuItem {
|
|
510
649
|
_elementRef = inject(ElementRef);
|
|
@@ -562,7 +701,7 @@ class MenuItem {
|
|
|
562
701
|
}
|
|
563
702
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
564
703
|
minVersion: "12.0.0",
|
|
565
|
-
version: "
|
|
704
|
+
version: "21.0.0",
|
|
566
705
|
ngImport: i0,
|
|
567
706
|
type: MenuItem,
|
|
568
707
|
deps: [],
|
|
@@ -570,7 +709,7 @@ class MenuItem {
|
|
|
570
709
|
});
|
|
571
710
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
572
711
|
minVersion: "17.1.0",
|
|
573
|
-
version: "
|
|
712
|
+
version: "21.0.0",
|
|
574
713
|
type: MenuItem,
|
|
575
714
|
isStandalone: true,
|
|
576
715
|
selector: "[ngMenuItem]",
|
|
@@ -636,7 +775,7 @@ class MenuItem {
|
|
|
636
775
|
}
|
|
637
776
|
i0.ɵɵngDeclareClassMetadata({
|
|
638
777
|
minVersion: "12.0.0",
|
|
639
|
-
version: "
|
|
778
|
+
version: "21.0.0",
|
|
640
779
|
ngImport: i0,
|
|
641
780
|
type: MenuItem,
|
|
642
781
|
decorators: [{
|
|
@@ -656,12 +795,57 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
656
795
|
}
|
|
657
796
|
}]
|
|
658
797
|
}],
|
|
659
|
-
ctorParameters: () => []
|
|
798
|
+
ctorParameters: () => [],
|
|
799
|
+
propDecorators: {
|
|
800
|
+
id: [{
|
|
801
|
+
type: i0.Input,
|
|
802
|
+
args: [{
|
|
803
|
+
isSignal: true,
|
|
804
|
+
alias: "id",
|
|
805
|
+
required: false
|
|
806
|
+
}]
|
|
807
|
+
}],
|
|
808
|
+
value: [{
|
|
809
|
+
type: i0.Input,
|
|
810
|
+
args: [{
|
|
811
|
+
isSignal: true,
|
|
812
|
+
alias: "value",
|
|
813
|
+
required: true
|
|
814
|
+
}]
|
|
815
|
+
}],
|
|
816
|
+
disabled: [{
|
|
817
|
+
type: i0.Input,
|
|
818
|
+
args: [{
|
|
819
|
+
isSignal: true,
|
|
820
|
+
alias: "disabled",
|
|
821
|
+
required: false
|
|
822
|
+
}]
|
|
823
|
+
}],
|
|
824
|
+
searchTerm: [{
|
|
825
|
+
type: i0.Input,
|
|
826
|
+
args: [{
|
|
827
|
+
isSignal: true,
|
|
828
|
+
alias: "searchTerm",
|
|
829
|
+
required: false
|
|
830
|
+
}]
|
|
831
|
+
}, {
|
|
832
|
+
type: i0.Output,
|
|
833
|
+
args: ["searchTermChange"]
|
|
834
|
+
}],
|
|
835
|
+
submenu: [{
|
|
836
|
+
type: i0.Input,
|
|
837
|
+
args: [{
|
|
838
|
+
isSignal: true,
|
|
839
|
+
alias: "submenu",
|
|
840
|
+
required: false
|
|
841
|
+
}]
|
|
842
|
+
}]
|
|
843
|
+
}
|
|
660
844
|
});
|
|
661
845
|
class MenuContent {
|
|
662
846
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
663
847
|
minVersion: "12.0.0",
|
|
664
|
-
version: "
|
|
848
|
+
version: "21.0.0",
|
|
665
849
|
ngImport: i0,
|
|
666
850
|
type: MenuContent,
|
|
667
851
|
deps: [],
|
|
@@ -669,7 +853,7 @@ class MenuContent {
|
|
|
669
853
|
});
|
|
670
854
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
671
855
|
minVersion: "14.0.0",
|
|
672
|
-
version: "
|
|
856
|
+
version: "21.0.0",
|
|
673
857
|
type: MenuContent,
|
|
674
858
|
isStandalone: true,
|
|
675
859
|
selector: "ng-template[ngMenuContent]",
|
|
@@ -682,7 +866,7 @@ class MenuContent {
|
|
|
682
866
|
}
|
|
683
867
|
i0.ɵɵngDeclareClassMetadata({
|
|
684
868
|
minVersion: "12.0.0",
|
|
685
|
-
version: "
|
|
869
|
+
version: "21.0.0",
|
|
686
870
|
ngImport: i0,
|
|
687
871
|
type: MenuContent,
|
|
688
872
|
decorators: [{
|