@angular/aria 21.0.0-rc.0 → 21.0.0-rc.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-accordion.json +14 -14
- package/_adev_assets/aria-combobox.json +10 -10
- package/_adev_assets/aria-grid.json +81 -12
- package/_adev_assets/aria-listbox.json +3 -3
- package/_adev_assets/aria-menu.json +174 -74
- package/_adev_assets/aria-tabs.json +22 -22
- package/_adev_assets/aria-toolbar.json +99 -120
- package/_adev_assets/aria-tree.json +20 -16
- package/fesm2022/_widget-chunk.mjs +266 -144
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion.mjs +12 -13
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox.mjs +9 -7
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid.mjs +61 -12
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox.mjs +14 -15
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu.mjs +117 -61
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs +390 -399
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs.mjs +16 -17
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +79 -44
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree.mjs +22 -19
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -10
- package/types/_grid-chunk.d.ts +115 -53
- package/types/accordion.d.ts +4 -4
- package/types/combobox.d.ts +2 -2
- package/types/grid.d.ts +12 -3
- package/types/listbox.d.ts +3 -4
- package/types/menu.d.ts +33 -21
- package/types/private.d.ts +263 -341
- package/types/tabs.d.ts +4 -4
- package/types/toolbar.d.ts +29 -26
- package/types/tree.d.ts +5 -6
- package/_adev_assets/aria-radio-group.json +0 -389
- package/fesm2022/deferred-content.mjs +0 -99
- package/fesm2022/deferred-content.mjs.map +0 -1
- package/fesm2022/radio-group.mjs +0 -338
- package/fesm2022/radio-group.mjs.map +0 -1
- package/types/deferred-content.d.ts +0 -38
- package/types/radio-group.d.ts +0 -84
package/fesm2022/aria.mjs
CHANGED
package/fesm2022/aria.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aria.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"aria.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/version.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 {Version} from '@angular/core';\n\n/** Current version of the CDK Experimental package. */\nexport const VERSION = new Version('21.0.0-rc.1');\n"],"names":["VERSION","Version"],"mappings":";;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;;;"}
|
package/fesm2022/combobox.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, ElementRef, contentChild, input, signal, computed, afterRenderEffect, Directive, model, untracked } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/aria/
|
|
4
|
-
import { DeferredContentAware, DeferredContent } from '@angular/aria/
|
|
5
|
-
import { ComboboxPattern } from '@angular/aria/private';
|
|
3
|
+
import * as i1 from '@angular/aria/private';
|
|
4
|
+
import { DeferredContentAware, ComboboxPattern, DeferredContent } from '@angular/aria/private';
|
|
6
5
|
import { Directionality } from '@angular/cdk/bidi';
|
|
7
6
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
8
7
|
|
|
@@ -171,6 +170,7 @@ class ComboboxInput {
|
|
|
171
170
|
this.combobox._pattern.inputs.inputEl.set(this._elementRef.nativeElement);
|
|
172
171
|
this.combobox._pattern.inputs.inputValue = this.value;
|
|
173
172
|
afterRenderEffect(() => {
|
|
173
|
+
this.value();
|
|
174
174
|
this.combobox.popup()?.controls()?.items();
|
|
175
175
|
untracked(() => this.combobox._pattern.onFilter());
|
|
176
176
|
});
|
|
@@ -208,10 +208,11 @@ class ComboboxInput {
|
|
|
208
208
|
properties: {
|
|
209
209
|
"value": "value()",
|
|
210
210
|
"attr.aria-expanded": "combobox._pattern.expanded()",
|
|
211
|
-
"attr.aria-activedescendant": "combobox._pattern.
|
|
211
|
+
"attr.aria-activedescendant": "combobox._pattern.activeDescendant()",
|
|
212
212
|
"attr.aria-controls": "combobox._pattern.popupId()",
|
|
213
213
|
"attr.aria-haspopup": "combobox._pattern.hasPopup()",
|
|
214
|
-
"attr.aria-autocomplete": "combobox._pattern.autocomplete()"
|
|
214
|
+
"attr.aria-autocomplete": "combobox._pattern.autocomplete()",
|
|
215
|
+
"attr.readonly": "combobox._pattern.readonly()"
|
|
215
216
|
}
|
|
216
217
|
},
|
|
217
218
|
exportAs: ["ngComboboxInput"],
|
|
@@ -232,10 +233,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
232
233
|
'role': 'combobox',
|
|
233
234
|
'[value]': 'value()',
|
|
234
235
|
'[attr.aria-expanded]': 'combobox._pattern.expanded()',
|
|
235
|
-
'[attr.aria-activedescendant]': 'combobox._pattern.
|
|
236
|
+
'[attr.aria-activedescendant]': 'combobox._pattern.activeDescendant()',
|
|
236
237
|
'[attr.aria-controls]': 'combobox._pattern.popupId()',
|
|
237
238
|
'[attr.aria-haspopup]': 'combobox._pattern.hasPopup()',
|
|
238
|
-
'[attr.aria-autocomplete]': 'combobox._pattern.autocomplete()'
|
|
239
|
+
'[attr.aria-autocomplete]': 'combobox._pattern.autocomplete()',
|
|
240
|
+
'[attr.readonly]': 'combobox._pattern.readonly()'
|
|
239
241
|
}
|
|
240
242
|
}]
|
|
241
243
|
}],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/combobox/combobox.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 contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n untracked,\n WritableSignal,\n} from '@angular/core';\nimport {DeferredContent, DeferredContentAware} from '@angular/aria/deferred-content';\nimport {\n ComboboxPattern,\n ComboboxListboxControls,\n ComboboxTreeControls,\n} from '@angular/aria/private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\n\n@Directive({\n selector: '[ngCombobox]',\n exportAs: 'ngCombobox',\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n host: {\n '[attr.data-expanded]': 'expanded()',\n '(input)': '_pattern.onInput($event)',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Combobox<V> {\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 protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The combobox popup. */\n readonly popup = contentChild<ComboboxPopup<V>>(ComboboxPopup);\n\n /** The filter mode for the combobox. */\n filterMode = input<'manual' | 'auto-select' | 'highlight'>('manual');\n\n /** Whether the combobox is focused. */\n readonly isFocused = signal(false);\n\n /** Whether the listbox has received focus yet. */\n private _hasBeenFocused = signal(false);\n\n /** Whether the combobox is disabled. */\n readonly disabled = input(false);\n\n /** Whether the combobox is read-only. */\n readonly readonly = input(false);\n\n /** The value of the first matching item in the popup. */\n readonly firstMatch = input<V | undefined>(undefined);\n\n /** Whether the combobox is expanded. */\n readonly expanded = computed(() => this._pattern.expanded());\n\n /** Input element connected to the combobox, if any. */\n readonly inputElement = computed(() => this._pattern.inputs.inputEl());\n\n /** The combobox ui pattern. */\n readonly _pattern = new ComboboxPattern<any, V>({\n ...this,\n textDirection: this.textDirection,\n disabled: this.disabled,\n readonly: this.readonly,\n inputValue: signal(''),\n inputEl: signal(undefined),\n containerEl: () => this._elementRef.nativeElement,\n popupControls: () => this.popup()?.controls(),\n });\n\n constructor() {\n afterRenderEffect(() => {\n if (!this._deferredContentAware?.contentVisible() && this._pattern.isFocused()) {\n this._deferredContentAware?.contentVisible.set(true);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasBeenFocused() && this._pattern.isFocused()) {\n this._hasBeenFocused.set(true);\n }\n });\n }\n}\n\n@Directive({\n selector: 'input[ngComboboxInput]',\n exportAs: 'ngComboboxInput',\n host: {\n 'role': 'combobox',\n '[value]': 'value()',\n '[attr.aria-expanded]': 'combobox._pattern.expanded()',\n '[attr.aria-activedescendant]': 'combobox._pattern.activedescendant()',\n '[attr.aria-controls]': 'combobox._pattern.popupId()',\n '[attr.aria-haspopup]': 'combobox._pattern.hasPopup()',\n '[attr.aria-autocomplete]': 'combobox._pattern.autocomplete()',\n },\n})\nexport class ComboboxInput {\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n /** The combobox that the input belongs to. */\n readonly combobox = inject(Combobox);\n\n /** The value of the input. */\n value = model<string>('');\n\n constructor() {\n (this.combobox._pattern.inputs.inputEl as WritableSignal<HTMLInputElement>).set(\n this._elementRef.nativeElement,\n );\n this.combobox._pattern.inputs.inputValue = this.value;\n\n /** Focuses & selects the first item in the combobox if the user changes the input value. */\n afterRenderEffect(() => {\n this.combobox.popup()?.controls()?.items();\n untracked(() => this.combobox._pattern.onFilter());\n });\n }\n}\n\n@Directive({\n selector: 'ng-template[ngComboboxPopupContainer]',\n exportAs: 'ngComboboxPopupContainer',\n hostDirectives: [DeferredContent],\n})\nexport class ComboboxPopupContainer {}\n\n@Directive({\n selector: '[ngComboboxPopup]',\n exportAs: 'ngComboboxPopup',\n})\nexport class ComboboxPopup<V> {\n /** The combobox that the popup belongs to. */\n readonly combobox = inject<Combobox<V>>(Combobox, {optional: true});\n\n /** The controls the popup exposes to the combobox. */\n readonly controls = signal<\n ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | undefined\n >(undefined);\n}\n"],"names":["Combobox","inject","toSignal","_directionality","change","_elementRef","ElementRef","_deferredContentAware","DeferredContentAware","optional","contentChild","ComboboxPopup","ngDevMode","debugName","filterMode","input","isFocused","signal","disabled","readonly","firstMatch","undefined","expanded","computed","_pattern","inputElement","inputs","inputEl","ComboboxPattern","inputValue","containerEl","nativeElement","popupControls","popup","controls","contentVisible","set","ɵfac","i0","ɵɵngDeclareFactory","minVersion","version","ngImport","type","deps","target","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","isStandalone","selector","classPropertyName","publicName","isSignal","isRequired","transformFunction","host","listeners","properties","queries","propertyName","first","predicate","descendants","exportAs","hostDirectives","directive","i1","decorators","args","constructor","combobox","value","ComboboxPopupContainer","DeferredContent"],"mappings":";;;;;;;;AAiDyF,MACtEA,QAAA,CAAA;iBAoBR,GAAAC,qBAK+B,CAAA;eAGC,GAAAC,QAAA,CAAAC,IAAAA,CAAAA,eAAA,CAAAC,MAAA,EAAA;;;EA0BrCC,WAAA,GAAAJ,MAAA,CAAAK,UAAA,CAAA;EAGFC,qBAAA,GAAAN,MAAA,CAAAO,oBAAE,EAAA;IAAAC,QAAA,EAAA;AAAA,GAAA,CAAA;AAGA,EAAA,KAAA,GAAAC,YAAK,CAAAC,aAAK,EAAA,IAAiBC,SAAQ,GAAA,CAAA;IAAAC,SAAA,EAAA;AAA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AA,EAAA,IAAA;IAAAC,QAAA,EAAA,uCAAA;IAAAc,QAAA,EAAA,CAAA,0BAAA,CAAA;IAAAC,cAAA,EAAA,CAAA;MAAAC,SAAA,EAAAC,EAAA,CAAAO;AAAA,KAAA,CAAA;AAAAjC,IAAAA,QAAA,EAAAJ;AAAA,GAAA,CAAA;;AAErC,EAAA,CAAA,wBAAA,CAAA;EAAAE,UAAA,EAAA,QAAA;EAAAC,OAAA,EAAA,eAAA;AAAAC,EAAAA,QAAA,EAAAJ,EAAA;AAAAK,EAAAA,IAAA,EAAA+B,sBAAA;EAAAL,UAAA,EAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"combobox.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/combobox/combobox.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 contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n signal,\n untracked,\n WritableSignal,\n} from '@angular/core';\nimport {\n DeferredContent,\n DeferredContentAware,\n ComboboxPattern,\n ComboboxListboxControls,\n ComboboxTreeControls,\n} from '@angular/aria/private';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {toSignal} from '@angular/core/rxjs-interop';\n\n@Directive({\n selector: '[ngCombobox]',\n exportAs: 'ngCombobox',\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n host: {\n '[attr.data-expanded]': 'expanded()',\n '(input)': '_pattern.onInput($event)',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Combobox<V> {\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 protected textDirection = toSignal(this._directionality.change, {\n initialValue: this._directionality.value,\n });\n\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware, {optional: true});\n\n /** The combobox popup. */\n readonly popup = contentChild<ComboboxPopup<V>>(ComboboxPopup);\n\n /** The filter mode for the combobox. */\n filterMode = input<'manual' | 'auto-select' | 'highlight'>('manual');\n\n /** Whether the combobox is focused. */\n readonly isFocused = signal(false);\n\n /** Whether the combobox has received focus yet. */\n private _hasBeenFocused = signal(false);\n\n /** Whether the combobox is disabled. */\n readonly disabled = input(false);\n\n /** Whether the combobox is read-only. */\n readonly readonly = input(false);\n\n /** The value of the first matching item in the popup. */\n readonly firstMatch = input<V | undefined>(undefined);\n\n /** Whether the combobox is expanded. */\n readonly expanded = computed(() => this._pattern.expanded());\n\n /** Input element connected to the combobox, if any. */\n readonly inputElement = computed(() => this._pattern.inputs.inputEl());\n\n /** The combobox ui pattern. */\n readonly _pattern = new ComboboxPattern<any, V>({\n ...this,\n textDirection: this.textDirection,\n disabled: this.disabled,\n readonly: this.readonly,\n inputValue: signal(''),\n inputEl: signal(undefined),\n containerEl: () => this._elementRef.nativeElement,\n popupControls: () => this.popup()?.controls(),\n });\n\n constructor() {\n afterRenderEffect(() => {\n if (!this._deferredContentAware?.contentVisible() && this._pattern.isFocused()) {\n this._deferredContentAware?.contentVisible.set(true);\n }\n });\n\n afterRenderEffect(() => {\n if (!this._hasBeenFocused() && this._pattern.isFocused()) {\n this._hasBeenFocused.set(true);\n }\n });\n }\n}\n\n@Directive({\n selector: 'input[ngComboboxInput]',\n exportAs: 'ngComboboxInput',\n host: {\n 'role': 'combobox',\n '[value]': 'value()',\n '[attr.aria-expanded]': 'combobox._pattern.expanded()',\n '[attr.aria-activedescendant]': 'combobox._pattern.activeDescendant()',\n '[attr.aria-controls]': 'combobox._pattern.popupId()',\n '[attr.aria-haspopup]': 'combobox._pattern.hasPopup()',\n '[attr.aria-autocomplete]': 'combobox._pattern.autocomplete()',\n '[attr.readonly]': 'combobox._pattern.readonly()',\n },\n})\nexport class ComboboxInput {\n /** The element that the combobox is attached to. */\n private readonly _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n /** The combobox that the input belongs to. */\n readonly combobox = inject(Combobox);\n\n /** The value of the input. */\n value = model<string>('');\n\n constructor() {\n (this.combobox._pattern.inputs.inputEl as WritableSignal<HTMLInputElement>).set(\n this._elementRef.nativeElement,\n );\n this.combobox._pattern.inputs.inputValue = this.value;\n\n /** Focuses & selects the first item in the combobox if the user changes the input value. */\n afterRenderEffect(() => {\n this.value();\n this.combobox.popup()?.controls()?.items();\n untracked(() => this.combobox._pattern.onFilter());\n });\n }\n}\n\n@Directive({\n selector: 'ng-template[ngComboboxPopupContainer]',\n exportAs: 'ngComboboxPopupContainer',\n hostDirectives: [DeferredContent],\n})\nexport class ComboboxPopupContainer {}\n\n@Directive({\n selector: '[ngComboboxPopup]',\n exportAs: 'ngComboboxPopup',\n})\nexport class ComboboxPopup<V> {\n /** The combobox that the popup belongs to. */\n readonly combobox = inject<Combobox<V>>(Combobox, {optional: true});\n\n /** The controls the popup exposes to the combobox. */\n readonly controls = signal<\n ComboboxListboxControls<any, V> | ComboboxTreeControls<any, V> | undefined\n >(undefined);\n}\n"],"names":["Combobox","_directionality","inject","Directionality","textDirection","toSignal","change","initialValue","value","_elementRef","ElementRef","_deferredContentAware","DeferredContentAware","optional","popup","contentChild","ComboboxPopup","filterMode","input","isFocused","signal","_hasBeenFocused","disabled","readonly","firstMatch","undefined","expanded","computed","_pattern","inputElement","inputs","inputEl","ComboboxPattern","inputValue","containerEl","nativeElement","popupControls","controls","constructor","afterRenderEffect","contentVisible","set","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","descendants","isSignal","exportAs","hostDirectives","directive","i1","ngImport","decorators","args","selector","host","ComboboxInput","combobox","model","items","untracked","onFilter","isStandalone","classPropertyName","publicName","isRequired","transformFunction","outputs","attributes","properties","ComboboxPopupContainer","DeferredContent"],"mappings":";;;;;;;MAiDaA,QAAQ,CAAA;AAEFC,EAAAA,eAAe,GAAGC,MAAM,CAACC,cAAc,CAAC;EAG/CC,aAAa,GAAGC,QAAQ,CAAC,IAAI,CAACJ,eAAe,CAACK,MAAM,EAAE;AAC9DC,IAAAA,YAAY,EAAE,IAAI,CAACN,eAAe,CAACO;AACpC,GAAA,CAAC;AAGeC,EAAAA,WAAW,GAAGP,MAAM,CAACQ,UAAU,CAAC;AAGhCC,EAAAA,qBAAqB,GAAGT,MAAM,CAACU,oBAAoB,EAAE;AAACC,IAAAA,QAAQ,EAAE;AAAK,GAAA,CAAC;EAG9EC,KAAK,GAAGC,YAAY,CAAmBC,aAAa;;WAAC;EAG9DC,UAAU,GAAGC,KAAK,CAAyC,QAAQ;;WAAC;EAG3DC,SAAS,GAAGC,MAAM,CAAC,KAAK;;WAAC;EAG1BC,eAAe,GAAGD,MAAM,CAAC,KAAK;;WAAC;EAG9BE,QAAQ,GAAGJ,KAAK,CAAC,KAAK;;WAAC;EAGvBK,QAAQ,GAAGL,KAAK,CAAC,KAAK;;WAAC;EAGvBM,UAAU,GAAGN,KAAK,CAAgBO,SAAS;;WAAC;AAG5CC,EAAAA,QAAQ,GAAGC,QAAQ,CAAC,MAAM,IAAI,CAACC,QAAQ,CAACF,QAAQ,EAAE;;WAAC;AAGnDG,EAAAA,YAAY,GAAGF,QAAQ,CAAC,MAAM,IAAI,CAACC,QAAQ,CAACE,MAAM,CAACC,OAAO,EAAE;;WAAC;EAG7DH,QAAQ,GAAG,IAAII,eAAe,CAAS;AAC9C,IAAA,GAAG,IAAI;IACP5B,aAAa,EAAE,IAAI,CAACA,aAAa;IACjCkB,QAAQ,EAAE,IAAI,CAACA,QAAQ;IACvBC,QAAQ,EAAE,IAAI,CAAC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A,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;;;;UAAb9B,aAAa;AAAAqD,IAAAA,YAAA,EAAA,IAAA;AAAAR,IAAAA,QAAA,EAAA,mBAAA;IAAAP,QAAA,EAAA,CAAA,iBAAA,CAAA;AAAAI,IAAAA,QAAA,EAAAd;AAAA,GAAA,CAAA;;;;;;QAAb5B,aAAa;AAAA2C,EAAAA,UAAA,EAAA,CAAA;UAJzBb,SAAS;AAACc,IAAAA,IAAA,EAAA,CAAA;AACTC,MAAAA,QAAQ,EAAE,mBAAmB;AAC7BP,MAAAA,QAAQ,EAAE;KACX;;;;;;"}
|
package/fesm2022/grid.mjs
CHANGED
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, contentChild, model } from '@angular/core';
|
|
4
|
+
import { Directionality } from '@angular/cdk/bidi';
|
|
4
5
|
import { GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern } from './_widget-chunk.mjs';
|
|
5
6
|
|
|
6
7
|
class Grid {
|
|
7
8
|
_elementRef = inject(ElementRef);
|
|
8
9
|
_rows = contentChildren(GridRow, ...(ngDevMode ? [{
|
|
9
|
-
debugName: "_rows"
|
|
10
|
-
|
|
10
|
+
debugName: "_rows",
|
|
11
|
+
descendants: true
|
|
12
|
+
}] : [{
|
|
13
|
+
descendants: true
|
|
14
|
+
}]));
|
|
11
15
|
_rowPatterns = computed(() => this._rows().map(r => r._pattern), ...(ngDevMode ? [{
|
|
12
16
|
debugName: "_rowPatterns"
|
|
13
17
|
}] : []));
|
|
18
|
+
textDirection = inject(Directionality).valueSignal;
|
|
14
19
|
element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
|
|
15
20
|
debugName: "element"
|
|
16
21
|
}] : []));
|
|
@@ -26,8 +31,8 @@ class Grid {
|
|
|
26
31
|
}] : [{
|
|
27
32
|
transform: booleanAttribute
|
|
28
33
|
}]));
|
|
29
|
-
|
|
30
|
-
debugName: "
|
|
34
|
+
softDisabled = input(true, ...(ngDevMode ? [{
|
|
35
|
+
debugName: "softDisabled",
|
|
31
36
|
transform: booleanAttribute
|
|
32
37
|
}] : [{
|
|
33
38
|
transform: booleanAttribute
|
|
@@ -41,12 +46,28 @@ class Grid {
|
|
|
41
46
|
colWrap = input('loop', ...(ngDevMode ? [{
|
|
42
47
|
debugName: "colWrap"
|
|
43
48
|
}] : []));
|
|
49
|
+
multi = input(false, ...(ngDevMode ? [{
|
|
50
|
+
debugName: "multi",
|
|
51
|
+
transform: booleanAttribute
|
|
52
|
+
}] : [{
|
|
53
|
+
transform: booleanAttribute
|
|
54
|
+
}]));
|
|
55
|
+
selectionMode = input('follow', ...(ngDevMode ? [{
|
|
56
|
+
debugName: "selectionMode"
|
|
57
|
+
}] : []));
|
|
58
|
+
enableRangeSelection = input(false, ...(ngDevMode ? [{
|
|
59
|
+
debugName: "enableRangeSelection",
|
|
60
|
+
transform: booleanAttribute
|
|
61
|
+
}] : [{
|
|
62
|
+
transform: booleanAttribute
|
|
63
|
+
}]));
|
|
44
64
|
_pattern = new GridPattern({
|
|
45
65
|
...this,
|
|
46
66
|
rows: this._rowPatterns,
|
|
47
67
|
getCell: e => this._getCell(e)
|
|
48
68
|
});
|
|
49
69
|
constructor() {
|
|
70
|
+
afterRenderEffect(() => this._pattern.setDefaultStateEffect());
|
|
50
71
|
afterRenderEffect(() => this._pattern.resetStateEffect());
|
|
51
72
|
afterRenderEffect(() => this._pattern.focusEffect());
|
|
52
73
|
}
|
|
@@ -92,9 +113,9 @@ class Grid {
|
|
|
92
113
|
isRequired: false,
|
|
93
114
|
transformFunction: null
|
|
94
115
|
},
|
|
95
|
-
|
|
96
|
-
classPropertyName: "
|
|
97
|
-
publicName: "
|
|
116
|
+
softDisabled: {
|
|
117
|
+
classPropertyName: "softDisabled",
|
|
118
|
+
publicName: "softDisabled",
|
|
98
119
|
isSignal: true,
|
|
99
120
|
isRequired: false,
|
|
100
121
|
transformFunction: null
|
|
@@ -119,6 +140,27 @@ class Grid {
|
|
|
119
140
|
isSignal: true,
|
|
120
141
|
isRequired: false,
|
|
121
142
|
transformFunction: null
|
|
143
|
+
},
|
|
144
|
+
multi: {
|
|
145
|
+
classPropertyName: "multi",
|
|
146
|
+
publicName: "multi",
|
|
147
|
+
isSignal: true,
|
|
148
|
+
isRequired: false,
|
|
149
|
+
transformFunction: null
|
|
150
|
+
},
|
|
151
|
+
selectionMode: {
|
|
152
|
+
classPropertyName: "selectionMode",
|
|
153
|
+
publicName: "selectionMode",
|
|
154
|
+
isSignal: true,
|
|
155
|
+
isRequired: false,
|
|
156
|
+
transformFunction: null
|
|
157
|
+
},
|
|
158
|
+
enableRangeSelection: {
|
|
159
|
+
classPropertyName: "enableRangeSelection",
|
|
160
|
+
publicName: "enableRangeSelection",
|
|
161
|
+
isSignal: true,
|
|
162
|
+
isRequired: false,
|
|
163
|
+
transformFunction: null
|
|
122
164
|
}
|
|
123
165
|
},
|
|
124
166
|
host: {
|
|
@@ -130,7 +172,7 @@ class Grid {
|
|
|
130
172
|
"pointerdown": "_pattern.onPointerdown($event)",
|
|
131
173
|
"pointermove": "_pattern.onPointermove($event)",
|
|
132
174
|
"pointerup": "_pattern.onPointerup($event)",
|
|
133
|
-
"focusin": "_pattern.onFocusIn(
|
|
175
|
+
"focusin": "_pattern.onFocusIn()",
|
|
134
176
|
"focusout": "_pattern.onFocusOut($event)"
|
|
135
177
|
},
|
|
136
178
|
properties: {
|
|
@@ -143,6 +185,7 @@ class Grid {
|
|
|
143
185
|
queries: [{
|
|
144
186
|
propertyName: "_rows",
|
|
145
187
|
predicate: GridRow,
|
|
188
|
+
descendants: true,
|
|
146
189
|
isSignal: true
|
|
147
190
|
}],
|
|
148
191
|
exportAs: ["ngGrid"],
|
|
@@ -169,7 +212,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
169
212
|
'(pointerdown)': '_pattern.onPointerdown($event)',
|
|
170
213
|
'(pointermove)': '_pattern.onPointermove($event)',
|
|
171
214
|
'(pointerup)': '_pattern.onPointerup($event)',
|
|
172
|
-
'(focusin)': '_pattern.onFocusIn(
|
|
215
|
+
'(focusin)': '_pattern.onFocusIn()',
|
|
173
216
|
'(focusout)': '_pattern.onFocusOut($event)'
|
|
174
217
|
}
|
|
175
218
|
}]
|
|
@@ -179,8 +222,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
179
222
|
class GridRow {
|
|
180
223
|
_elementRef = inject(ElementRef);
|
|
181
224
|
_cells = contentChildren(GridCell, ...(ngDevMode ? [{
|
|
182
|
-
debugName: "_cells"
|
|
183
|
-
|
|
225
|
+
debugName: "_cells",
|
|
226
|
+
descendants: true
|
|
227
|
+
}] : [{
|
|
228
|
+
descendants: true
|
|
229
|
+
}]));
|
|
184
230
|
_cellPatterns = computed(() => this._cells().map(c => c._pattern), ...(ngDevMode ? [{
|
|
185
231
|
debugName: "_cellPatterns"
|
|
186
232
|
}] : []));
|
|
@@ -240,6 +286,7 @@ class GridRow {
|
|
|
240
286
|
queries: [{
|
|
241
287
|
propertyName: "_cells",
|
|
242
288
|
predicate: GridCell,
|
|
289
|
+
descendants: true,
|
|
243
290
|
isSignal: true
|
|
244
291
|
}],
|
|
245
292
|
exportAs: ["ngGridRow"],
|
|
@@ -272,7 +319,7 @@ class GridCell {
|
|
|
272
319
|
debugName: "_widgetPattern"
|
|
273
320
|
}] : []));
|
|
274
321
|
_row = inject(GridRow);
|
|
275
|
-
_id = inject(_IdGenerator).getId('ng-grid-cell-');
|
|
322
|
+
_id = inject(_IdGenerator).getId('ng-grid-cell-', true);
|
|
276
323
|
element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
|
|
277
324
|
debugName: "element"
|
|
278
325
|
}] : []));
|
|
@@ -392,6 +439,7 @@ class GridCell {
|
|
|
392
439
|
"attr.rowspan": "_pattern.rowSpan()",
|
|
393
440
|
"attr.colspan": "_pattern.colSpan()",
|
|
394
441
|
"attr.data-active": "_pattern.active()",
|
|
442
|
+
"attr.data-anchor": "_pattern.anchor()",
|
|
395
443
|
"attr.aria-disabled": "_pattern.disabled()",
|
|
396
444
|
"attr.aria-rowspan": "_pattern.rowSpan()",
|
|
397
445
|
"attr.aria-colspan": "_pattern.colSpan()",
|
|
@@ -430,6 +478,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
430
478
|
'[attr.rowspan]': '_pattern.rowSpan()',
|
|
431
479
|
'[attr.colspan]': '_pattern.colSpan()',
|
|
432
480
|
'[attr.data-active]': '_pattern.active()',
|
|
481
|
+
'[attr.data-anchor]': '_pattern.anchor()',
|
|
433
482
|
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
434
483
|
'[attr.aria-rowspan]': '_pattern.rowSpan()',
|
|
435
484
|
'[attr.aria-colspan]': '_pattern.colSpan()',
|
package/fesm2022/grid.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/grid/grid.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 {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n Signal,\n} from '@angular/core';\nimport {GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern} from '../private';\n\n/** A directive that provides grid-based navigation and selection behavior. */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'class': 'grid',\n 'role': 'grid',\n '[tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(pointermove)': '_pattern.onPointermove($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Grid {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The rows that make up the grid. */\n private readonly _rows = contentChildren(GridRow);\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._rows().map(r => r._pattern),\n );\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether selection is enabled for the grid. */\n readonly enableSelection = input(false, {transform: booleanAttribute});\n\n /** Whether the grid is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether to skip disabled items during navigation. */\n readonly skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the grid. */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The wrapping behavior for keyboard navigation along the row axis. */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** The wrapping behavior for keyboard navigation along the column axis. */\n readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** The UI pattern for the grid. */\n readonly _pattern = new GridPattern({\n ...this,\n rows: this._rowPatterns,\n getCell: e => this._getCell(e),\n });\n\n constructor() {\n afterRenderEffect(() => this._pattern.resetStateEffect());\n afterRenderEffect(() => this._pattern.focusEffect());\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element): GridCellPattern | undefined {\n const cellElement = element.closest('[ngGridCell]');\n if (cellElement === undefined) return;\n\n const widgetElement = element.closest('[ngGridCellWidget]');\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (\n cell.element() === cellElement ||\n (widgetElement !== undefined && cell.element() === widgetElement)\n ) {\n return cell;\n }\n }\n }\n return;\n }\n}\n\n/** A directive that represents a row in a grid. */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'class': 'grid-row',\n '[attr.role]': 'role()',\n },\n})\nexport class GridRow {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The cells that make up this row. */\n private readonly _cells = contentChildren(GridCell);\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<GridCellPattern[]> = computed(() =>\n this._cells().map(c => c._pattern),\n );\n\n /** The parent grid. */\n private readonly _grid = inject(Grid);\n\n /** The parent grid UI pattern. */\n readonly grid = computed(() => this._grid._pattern);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the row. */\n readonly role = input<'row' | 'rowheader'>('row');\n\n /** The index of this row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The UI pattern for the grid row. */\n readonly _pattern = new GridRowPattern({\n ...this,\n cells: this._cellPatterns,\n });\n}\n\n/** A directive that represents a cell in a grid. */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n host: {\n 'class': 'grid-cell',\n '[attr.role]': 'role()',\n '[attr.id]': '_pattern.id()',\n '[attr.rowspan]': '_pattern.rowSpan()',\n '[attr.colspan]': '_pattern.colSpan()',\n '[attr.data-active]': '_pattern.active()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-rowspan]': '_pattern.rowSpan()',\n '[attr.aria-colspan]': '_pattern.colSpan()',\n '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',\n '[attr.aria-colindex]': '_pattern.ariaColIndex()',\n '[attr.aria-selected]': '_pattern.ariaSelected()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCell {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The widget contained within this cell, if any. */\n private readonly _widgets = contentChild(GridCellWidget);\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPattern: Signal<GridCellWidgetPattern | undefined> = computed(\n () => this._widgets()?._pattern,\n );\n\n /** The parent row. */\n private readonly _row = inject(GridRow);\n\n /** A unique identifier for the cell. */\n private readonly _id = inject(_IdGenerator).getId('ng-grid-cell-');\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader'>('gridcell');\n\n /** The number of rows the cell should span. */\n readonly rowSpan = input<number>(1);\n\n /** The number of columns the cell should span. */\n readonly colSpan = input<number>(1);\n\n /** The index of this cell's row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The index of this cell's column within the grid. */\n readonly colIndex = input<number>();\n\n /** Whether the cell is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the cell is selected. */\n readonly selected = model<boolean>(false);\n\n /** Whether the cell is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n id: () => this._id,\n grid: this._row.grid,\n row: () => this._row._pattern,\n widget: this._widgetPattern,\n });\n}\n\n/** A directive that represents a widget inside a grid cell. */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n 'class': 'grid-cell-widget',\n '[attr.data-active]': '_pattern.active()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCellWidget {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent cell. */\n private readonly _cell = inject(GridCell);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether the widget is activated and the grid navigation should be paused. */\n readonly activate = model<boolean>(false);\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n cell: () => this._cell._pattern,\n });\n\n /** Focuses the widget. */\n focus(): void {\n this.element().focus();\n }\n}\n"],"names":["inject","ElementRef","contentChildren","GridRow","ngDevMode","debugName","nativeElement","enableSelection","input","transform","booleanAttribute","focusMode","rowWrap","colWrap","_pattern","GridPattern","rows","_rowPatterns","getCell","e","_getCell","constructor","afterRenderEffect","resetStateEffect","focusEffect","element","cellElement","closest","widgetElement","cell","undefined","ɵɵngDeclareFactory","minVersion","version","ɵɵngDeclareDirective","type","Grid","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","disabled","skipDisabled","host","attributes","listeners","properties","classAttribute","queries","propertyName","predicate","exportAs","ngImport","i0","args","ctorParameters","_cellPatterns","computed","_cells","map","c","_grid","rowIndex","cells","deps","target","ɵɵFactoryTarget","Directive","ɵdir","decorators","GridCellWidget","_row","role","selected","model","selectable","GridCellPattern","GridCell"],"mappings":";;;;;;aA8CwC,GAAAA,MAAA,CAAAC,UAAA,CAAA;OAuBkC,GAAAC,eAAA,CAAAC,OAAA,EAAA,IAAAC,SAAA,GAAA,CAAA;IAAAC,SAAA,EAAA;AAAA,GAAA,IAAA,EAAA,CAAA,CAAA;gFAGG,GAAA,CAAA;IAAAA,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAA;2CAsB1C,CAAAC,aAAA,MAAAF,SAAA,GAAA,CAAA;IAAAC,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAA;EAKzBE,eAAA,GAAAC,KAAA,CAAA,KAAA,EAAA,IAAAJ,SAAW,GAAA,CAAA;IAAAC,SAAA,EAAA,iBAAA;AAAAI,IAAAA,SAAA,EAAAC;AAAA,GAAA,CAAA,GAAA,CAAA;AAAAD,IAAAA,SAAA,EAAAC;AAAA,GAAA,CAAA,CAAA,CAAA;;aAGjB,EAAA,UAAA;AAAAD,IAAAA,SAAA,EAAAC;AAAA,GAAA,CAAA,GAAA,CAAA;AAAAD,IAAAA,SAAA,EAAAC;AAAA,GAAA,CAAA,CAAA,CAAA;;;;;;;EA7EOC,SAAA,GAAAH,KAAA,CAAA,QAAA,EAAA,IAAAJ,SAAA,GAAA,CAAA;IAAAC,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A;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"grid.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/src/aria/grid/grid.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 {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n Signal,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern} from '../private';\n\n/** A directive that provides grid-based navigation and selection behavior. */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'class': 'grid',\n 'role': 'grid',\n '[tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(pointermove)': '_pattern.onPointermove($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn()',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Grid {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The rows that make up the grid. */\n private readonly _rows = contentChildren(GridRow, {descendants: true});\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._rows().map(r => r._pattern),\n );\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether selection is enabled for the grid. */\n readonly enableSelection = input(false, {transform: booleanAttribute});\n\n /** Whether the grid is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether to allow disabled items to receive focus. */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the grid. */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The wrapping behavior for keyboard navigation along the row axis. */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** The wrapping behavior for keyboard navigation along the column axis. */\n readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** Whether multiple cells in the grid can be selected. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** The selection strategy used by the grid. */\n readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** Whether enable range selections (with modifier keys or dragging). */\n readonly enableRangeSelection = input(false, {transform: booleanAttribute});\n\n /** The UI pattern for the grid. */\n readonly _pattern = new GridPattern({\n ...this,\n rows: this._rowPatterns,\n getCell: e => this._getCell(e),\n });\n\n constructor() {\n afterRenderEffect(() => this._pattern.setDefaultStateEffect());\n afterRenderEffect(() => this._pattern.resetStateEffect());\n afterRenderEffect(() => this._pattern.focusEffect());\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element): GridCellPattern | undefined {\n const cellElement = element.closest('[ngGridCell]');\n if (cellElement === undefined) return;\n\n const widgetElement = element.closest('[ngGridCellWidget]');\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (\n cell.element() === cellElement ||\n (widgetElement !== undefined && cell.element() === widgetElement)\n ) {\n return cell;\n }\n }\n }\n return;\n }\n}\n\n/** A directive that represents a row in a grid. */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'class': 'grid-row',\n '[attr.role]': 'role()',\n },\n})\nexport class GridRow {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The cells that make up this row. */\n private readonly _cells = contentChildren(GridCell, {descendants: true});\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<GridCellPattern[]> = computed(() =>\n this._cells().map(c => c._pattern),\n );\n\n /** The parent grid. */\n private readonly _grid = inject(Grid);\n\n /** The parent grid UI pattern. */\n readonly grid = computed(() => this._grid._pattern);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the row. */\n readonly role = input<'row' | 'rowheader'>('row');\n\n /** The index of this row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The UI pattern for the grid row. */\n readonly _pattern = new GridRowPattern({\n ...this,\n cells: this._cellPatterns,\n });\n}\n\n/** A directive that represents a cell in a grid. */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n host: {\n 'class': 'grid-cell',\n '[attr.role]': 'role()',\n '[attr.id]': '_pattern.id()',\n '[attr.rowspan]': '_pattern.rowSpan()',\n '[attr.colspan]': '_pattern.colSpan()',\n '[attr.data-active]': '_pattern.active()',\n '[attr.data-anchor]': '_pattern.anchor()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-rowspan]': '_pattern.rowSpan()',\n '[attr.aria-colspan]': '_pattern.colSpan()',\n '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',\n '[attr.aria-colindex]': '_pattern.ariaColIndex()',\n '[attr.aria-selected]': '_pattern.ariaSelected()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCell {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The widget contained within this cell, if any. */\n private readonly _widgets = contentChild(GridCellWidget);\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPattern: Signal<GridCellWidgetPattern | undefined> = computed(\n () => this._widgets()?._pattern,\n );\n\n /** The parent row. */\n private readonly _row = inject(GridRow);\n\n /** A unique identifier for the cell. */\n private readonly _id = inject(_IdGenerator).getId('ng-grid-cell-', true);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader'>('gridcell');\n\n /** The number of rows the cell should span. */\n readonly rowSpan = input<number>(1);\n\n /** The number of columns the cell should span. */\n readonly colSpan = input<number>(1);\n\n /** The index of this cell's row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The index of this cell's column within the grid. */\n readonly colIndex = input<number>();\n\n /** Whether the cell is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the cell is selected. */\n readonly selected = model<boolean>(false);\n\n /** Whether the cell is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n id: () => this._id,\n grid: this._row.grid,\n row: () => this._row._pattern,\n widget: this._widgetPattern,\n });\n}\n\n/** A directive that represents a widget inside a grid cell. */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n 'class': 'grid-cell-widget',\n '[attr.data-active]': '_pattern.active()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCellWidget {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent cell. */\n private readonly _cell = inject(GridCell);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether the widget is activated and the grid navigation should be paused. */\n readonly activate = model<boolean>(false);\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n cell: () => this._cell._pattern,\n });\n\n /** Focuses the widget. */\n focus(): void {\n this.element().focus();\n }\n}\n"],"names":["Grid","_elementRef","inject","ElementRef","_rows","contentChildren","GridRow","descendants","_rowPatterns","computed","map","r","_pattern","ngDevMode","debugName","textDirection","Directionality","valueSignal","element","nativeElement","enableSelection","input","transform","booleanAttribute","disabled","softDisabled","focusMode","rowWrap","colWrap","multi","selectionMode","enableRangeSelection","GridPattern","rows","getCell","e","_getCell","constructor","afterRenderEffect","setDefaultStateEffect","resetStateEffect","focusEffect","cellElement","closest","undefined","widgetElement","row","cell","inputs","cells","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","ngImport","decorators","args","selector","host","_cells","GridCell","_cellPatterns","c","_grid","grid","role","rowIndex","GridRowPattern","_widgets","contentChild","GridCellWidget","_widgetPattern","_row","_id","_IdGenerator","getId","rowSpan","colSpan","colIndex","selected","model","selectable","GridCellPattern","id","widget","_cell","activate","GridCellWidgetPattern","focus","isStandalone","classPropertyName","publicName","isRequired","transformFunction","outputs","properties","classAttribute"],"mappings":";;;;;;MA2CaA,IAAI,CAAA;AAEEC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;EAGhCC,KAAK,GAAGC,eAAe,CAACC,OAAO;;AAAGC,IAAAA,WAAW,EAAE;GAAI,CAAA,GAAA,CAAlB;AAACA,IAAAA,WAAW,EAAE;GAAK,GAAC;EAGrDC,YAAY,GAA6BC,QAAQ,CAAC,MACjE,IAAI,CAACL,KAAK,EAAE,CAACM,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,EAAA,IAAAC,SAAA,GAAA,CAAA;AAAAC,IAAAA,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAClC;AAGQC,EAAAA,aAAa,GAAGb,MAAM,CAACc,cAAc,CAAC,CAACC,WAAW;AAGlDC,EAAAA,OAAO,GAAGT,QAAQ,CAAC,MAAM,IAAI,CAACR,WAAW,CAACkB,aAAa,EAAA,IAAAN,SAAA,GAAA,CAAA;AAAAC,IAAAA,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAC;EAGxDM,eAAe,GAAGC,KAAK,CAAC,KAAK;;AAAGC,IAAAA,SAAS,EAAEC;GAAgB,CAAA,GAAA,CAA5B;AAACD,IAAAA,SAAS,EAAEC;GAAiB,GAAC;EAG7DC,QAAQ,GAAGH,KAAK,CAAC,KAAK;;AAAGC,IAAAA,SAAS,EAAE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IAAA,EAAA;AAAAqC,MAAAA,UAAA,EAAA;AAAA,QAAA,kBAAA,EAAA,mBAAA;AAAA,QAAA,UAAA,EAAA;OAAA;AAAAC,MAAAA,cAAA,EAAA;KAAA;IAAA3C,QAAA,EAAA,CAAA,kBAAA,CAAA;AAAAC,IAAAA,QAAA,EAAAV;AAAA,GAAA,CAAA;;;;;;QAAd0B,cAAc;AAAAf,EAAAA,UAAA,EAAA,CAAA;UAT1BT,SAAS;AAACU,IAAAA,IAAA,EAAA,CAAA;AACTC,MAAAA,QAAQ,EAAE,oBAAoB;AAC9BJ,MAAAA,QAAQ,EAAE,kBAAkB;AAC5BK,MAAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,kBAAkB;AAC3B,QAAA,oBAAoB,EAAE,mBAAmB;AACzC,QAAA,YAAY,EAAE;AACf;KACF;;;;;;"}
|
package/fesm2022/listbox.mjs
CHANGED
|
@@ -5,10 +5,9 @@ import { Directionality } from '@angular/cdk/bidi';
|
|
|
5
5
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { _IdGenerator } from '@angular/cdk/a11y';
|
|
7
7
|
import { ComboboxPopup } from './combobox.mjs';
|
|
8
|
-
import '@angular/aria/deferred-content';
|
|
9
8
|
|
|
10
9
|
class Listbox {
|
|
11
|
-
_generatedId = inject(_IdGenerator).getId('ng-listbox-');
|
|
10
|
+
_generatedId = inject(_IdGenerator).getId('ng-listbox-', true);
|
|
12
11
|
id = computed(() => this._generatedId, ...(ngDevMode ? [{
|
|
13
12
|
debugName: "id"
|
|
14
13
|
}] : []));
|
|
@@ -44,8 +43,8 @@ class Listbox {
|
|
|
44
43
|
}] : [{
|
|
45
44
|
transform: booleanAttribute
|
|
46
45
|
}]));
|
|
47
|
-
|
|
48
|
-
debugName: "
|
|
46
|
+
softDisabled = input(true, ...(ngDevMode ? [{
|
|
47
|
+
debugName: "softDisabled",
|
|
49
48
|
transform: booleanAttribute
|
|
50
49
|
}] : [{
|
|
51
50
|
transform: booleanAttribute
|
|
@@ -126,7 +125,7 @@ class Listbox {
|
|
|
126
125
|
scrollActiveItemIntoView(options = {
|
|
127
126
|
block: 'nearest'
|
|
128
127
|
}) {
|
|
129
|
-
this._pattern.inputs.activeItem()?.element()
|
|
128
|
+
this._pattern.inputs.activeItem()?.element()?.scrollIntoView(options);
|
|
130
129
|
}
|
|
131
130
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
132
131
|
minVersion: "12.0.0",
|
|
@@ -164,9 +163,9 @@ class Listbox {
|
|
|
164
163
|
isRequired: false,
|
|
165
164
|
transformFunction: null
|
|
166
165
|
},
|
|
167
|
-
|
|
168
|
-
classPropertyName: "
|
|
169
|
-
publicName: "
|
|
166
|
+
softDisabled: {
|
|
167
|
+
classPropertyName: "softDisabled",
|
|
168
|
+
publicName: "softDisabled",
|
|
170
169
|
isSignal: true,
|
|
171
170
|
isRequired: false,
|
|
172
171
|
transformFunction: null
|
|
@@ -228,12 +227,12 @@ class Listbox {
|
|
|
228
227
|
},
|
|
229
228
|
properties: {
|
|
230
229
|
"attr.id": "id()",
|
|
231
|
-
"attr.tabindex": "_pattern.
|
|
230
|
+
"attr.tabindex": "_pattern.tabIndex()",
|
|
232
231
|
"attr.aria-readonly": "_pattern.readonly()",
|
|
233
232
|
"attr.aria-disabled": "_pattern.disabled()",
|
|
234
233
|
"attr.aria-orientation": "_pattern.orientation()",
|
|
235
234
|
"attr.aria-multiselectable": "_pattern.multi()",
|
|
236
|
-
"attr.aria-activedescendant": "_pattern.
|
|
235
|
+
"attr.aria-activedescendant": "_pattern.activeDescendant()"
|
|
237
236
|
},
|
|
238
237
|
classAttribute: "ng-listbox"
|
|
239
238
|
},
|
|
@@ -264,12 +263,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
264
263
|
'role': 'listbox',
|
|
265
264
|
'class': 'ng-listbox',
|
|
266
265
|
'[attr.id]': 'id()',
|
|
267
|
-
'[attr.tabindex]': '_pattern.
|
|
266
|
+
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
268
267
|
'[attr.aria-readonly]': '_pattern.readonly()',
|
|
269
268
|
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
270
269
|
'[attr.aria-orientation]': '_pattern.orientation()',
|
|
271
270
|
'[attr.aria-multiselectable]': '_pattern.multi()',
|
|
272
|
-
'[attr.aria-activedescendant]': '_pattern.
|
|
271
|
+
'[attr.aria-activedescendant]': '_pattern.activeDescendant()',
|
|
273
272
|
'(keydown)': '_pattern.onKeydown($event)',
|
|
274
273
|
'(pointerdown)': '_pattern.onPointerdown($event)',
|
|
275
274
|
'(focusin)': 'onFocus()'
|
|
@@ -284,7 +283,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
284
283
|
class Option {
|
|
285
284
|
_elementRef = inject(ElementRef);
|
|
286
285
|
_listbox = inject(Listbox);
|
|
287
|
-
_generatedId = inject(_IdGenerator).getId('ng-option-');
|
|
286
|
+
_generatedId = inject(_IdGenerator).getId('ng-option-', true);
|
|
288
287
|
id = computed(() => this._generatedId, ...(ngDevMode ? [{
|
|
289
288
|
debugName: "id"
|
|
290
289
|
}] : []));
|
|
@@ -364,7 +363,7 @@ class Option {
|
|
|
364
363
|
properties: {
|
|
365
364
|
"attr.data-active": "_pattern.active()",
|
|
366
365
|
"attr.id": "_pattern.id()",
|
|
367
|
-
"attr.tabindex": "_pattern.
|
|
366
|
+
"attr.tabindex": "_pattern.tabIndex()",
|
|
368
367
|
"attr.aria-selected": "_pattern.selected()",
|
|
369
368
|
"attr.aria-disabled": "_pattern.disabled()"
|
|
370
369
|
},
|
|
@@ -389,7 +388,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
389
388
|
'class': 'ng-option',
|
|
390
389
|
'[attr.data-active]': '_pattern.active()',
|
|
391
390
|
'[attr.id]': '_pattern.id()',
|
|
392
|
-
'[attr.tabindex]': '_pattern.
|
|
391
|
+
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
393
392
|
'[attr.aria-selected]': '_pattern.selected()',
|
|
394
393
|
'[attr.aria-disabled]': '_pattern.disabled()'
|
|
395
394
|
}
|
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 * 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,IAA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AACA,QAAA,iBAAA,EAAA,qBAAA;QACA,sBAAA,EAAA,qBAAA;QACA,sBAAA,EAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"listbox.mjs","sources":["../../../../../k8-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-', true);\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 to allow disabled items in the list to receive focus. */\n softDisabled = 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-', true);\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":["Listbox","_generatedId","inject","_IdGenerator","getId","id","computed","ngDevMode","debugName","_popup","ComboboxPopup","optional","_elementRef","ElementRef","_directionality","Directionality","_options","contentChildren","Option","descendants","textDirection","toSignal","change","initialValue","value","items","map","option","_pattern","orientation","input","multi","transform","booleanAttribute","wrap","softDisabled","focusMode","selectionMode","typeaheadDelay","disabled","readonly","model","_hasFocused","signal","constructor","inputs","activeItem","undefined","element","nativeElement","combobox","ComboboxListboxPattern","ListboxPattern","controls","set","afterRenderEffect","violations","validate","violation","console","error","setDefaultState","untracked","some","i","listBehavior","unfocus","v","filter","onFocus","scrollActiveItemIntoView","options","block","scrollIntoView","deps","target","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","hostDirectives","directive","i1","ngImport","decorators","args","selector","host","_listbox","searchTerm","label","textContent","listbox","required","selected","OptionPattern","isStandalone","classPropertyName","publicName","isRequired","transformFunction","attributes","properties","classAttribute"],"mappings":";;;;;;;;MA4DaA,OAAO,CAAA;EA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