@angular/aria 22.1.0 → 22.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_accordion-chunk.mjs.map +1 -1
- package/fesm2022/_click-event-manager-chunk.mjs.map +1 -1
- package/fesm2022/_deferred-content-chunk.mjs +6 -6
- package/fesm2022/_deferred-content-chunk.mjs.map +1 -1
- package/fesm2022/_expansion-chunk.mjs.map +1 -1
- package/fesm2022/_list-chunk.mjs.map +1 -1
- package/fesm2022/_list-navigation-chunk.mjs.map +1 -1
- package/fesm2022/_list-typeahead-chunk.mjs.map +1 -1
- package/fesm2022/_menu-chunk.mjs.map +1 -1
- package/fesm2022/_option-chunk.mjs.map +1 -1
- package/fesm2022/_tabs-chunk.mjs.map +1 -1
- package/fesm2022/_toolbar-widget-group-chunk.mjs.map +1 -1
- package/fesm2022/_transforms-chunk.mjs.map +1 -1
- package/fesm2022/_tree-chunk.mjs.map +1 -1
- package/fesm2022/_violations-chunk.mjs.map +1 -1
- package/fesm2022/_widget-chunk.mjs.map +1 -1
- package/fesm2022/accordion-testing.mjs.map +1 -1
- package/fesm2022/accordion.mjs +12 -12
- package/fesm2022/accordion.mjs.map +1 -1
- package/fesm2022/aria.mjs +1 -1
- package/fesm2022/aria.mjs.map +1 -1
- package/fesm2022/combobox-testing.mjs.map +1 -1
- package/fesm2022/combobox.mjs +18 -10
- package/fesm2022/combobox.mjs.map +1 -1
- package/fesm2022/grid-testing.mjs.map +1 -1
- package/fesm2022/grid.mjs +12 -12
- package/fesm2022/grid.mjs.map +1 -1
- package/fesm2022/listbox-testing.mjs.map +1 -1
- package/fesm2022/listbox.mjs +6 -6
- package/fesm2022/listbox.mjs.map +1 -1
- package/fesm2022/menu-testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +15 -15
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/private.mjs.map +1 -1
- package/fesm2022/tabs-testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs +15 -15
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar-testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +9 -9
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tree-testing.mjs.map +1 -1
- package/fesm2022/tree.mjs +9 -9
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +2 -2
- package/types/combobox.d.ts +1 -0
package/fesm2022/grid.mjs
CHANGED
|
@@ -123,7 +123,7 @@ class Grid {
|
|
|
123
123
|
}
|
|
124
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
125
|
minVersion: "12.0.0",
|
|
126
|
-
version: "22.1.
|
|
126
|
+
version: "22.1.1",
|
|
127
127
|
ngImport: i0,
|
|
128
128
|
type: Grid,
|
|
129
129
|
deps: [],
|
|
@@ -131,7 +131,7 @@ class Grid {
|
|
|
131
131
|
});
|
|
132
132
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
133
133
|
minVersion: "17.1.0",
|
|
134
|
-
version: "22.1.
|
|
134
|
+
version: "22.1.1",
|
|
135
135
|
type: Grid,
|
|
136
136
|
isStandalone: true,
|
|
137
137
|
selector: "[ngGrid]",
|
|
@@ -227,7 +227,7 @@ class Grid {
|
|
|
227
227
|
}
|
|
228
228
|
i0.ɵɵngDeclareClassMetadata({
|
|
229
229
|
minVersion: "12.0.0",
|
|
230
|
-
version: "22.1.
|
|
230
|
+
version: "22.1.1",
|
|
231
231
|
ngImport: i0,
|
|
232
232
|
type: Grid,
|
|
233
233
|
decorators: [{
|
|
@@ -385,7 +385,7 @@ class GridCellWidget {
|
|
|
385
385
|
}
|
|
386
386
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
387
387
|
minVersion: "12.0.0",
|
|
388
|
-
version: "22.1.
|
|
388
|
+
version: "22.1.1",
|
|
389
389
|
ngImport: i0,
|
|
390
390
|
type: GridCellWidget,
|
|
391
391
|
deps: [],
|
|
@@ -393,7 +393,7 @@ class GridCellWidget {
|
|
|
393
393
|
});
|
|
394
394
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
395
395
|
minVersion: "17.1.0",
|
|
396
|
-
version: "22.1.
|
|
396
|
+
version: "22.1.1",
|
|
397
397
|
type: GridCellWidget,
|
|
398
398
|
isStandalone: true,
|
|
399
399
|
selector: "[ngGridCellWidget]",
|
|
@@ -452,7 +452,7 @@ class GridCellWidget {
|
|
|
452
452
|
}
|
|
453
453
|
i0.ɵɵngDeclareClassMetadata({
|
|
454
454
|
minVersion: "12.0.0",
|
|
455
|
-
version: "22.1.
|
|
455
|
+
version: "22.1.1",
|
|
456
456
|
ngImport: i0,
|
|
457
457
|
type: GridCellWidget,
|
|
458
458
|
decorators: [{
|
|
@@ -635,7 +635,7 @@ class GridCell {
|
|
|
635
635
|
}
|
|
636
636
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
637
637
|
minVersion: "12.0.0",
|
|
638
|
-
version: "22.1.
|
|
638
|
+
version: "22.1.1",
|
|
639
639
|
ngImport: i0,
|
|
640
640
|
type: GridCell,
|
|
641
641
|
deps: [],
|
|
@@ -643,7 +643,7 @@ class GridCell {
|
|
|
643
643
|
});
|
|
644
644
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
645
645
|
minVersion: "17.2.0",
|
|
646
|
-
version: "22.1.
|
|
646
|
+
version: "22.1.1",
|
|
647
647
|
type: GridCell,
|
|
648
648
|
isStandalone: true,
|
|
649
649
|
selector: "[ngGridCell]",
|
|
@@ -739,7 +739,7 @@ class GridCell {
|
|
|
739
739
|
}
|
|
740
740
|
i0.ɵɵngDeclareClassMetadata({
|
|
741
741
|
minVersion: "12.0.0",
|
|
742
|
-
version: "22.1.
|
|
742
|
+
version: "22.1.1",
|
|
743
743
|
ngImport: i0,
|
|
744
744
|
type: GridCell,
|
|
745
745
|
decorators: [{
|
|
@@ -883,7 +883,7 @@ class GridRow {
|
|
|
883
883
|
}
|
|
884
884
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
885
885
|
minVersion: "12.0.0",
|
|
886
|
-
version: "22.1.
|
|
886
|
+
version: "22.1.1",
|
|
887
887
|
ngImport: i0,
|
|
888
888
|
type: GridRow,
|
|
889
889
|
deps: [],
|
|
@@ -891,7 +891,7 @@ class GridRow {
|
|
|
891
891
|
});
|
|
892
892
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
893
893
|
minVersion: "17.1.0",
|
|
894
|
-
version: "22.1.
|
|
894
|
+
version: "22.1.1",
|
|
895
895
|
type: GridRow,
|
|
896
896
|
isStandalone: true,
|
|
897
897
|
selector: "[ngGridRow]",
|
|
@@ -922,7 +922,7 @@ class GridRow {
|
|
|
922
922
|
}
|
|
923
923
|
i0.ɵɵngDeclareClassMetadata({
|
|
924
924
|
minVersion: "12.0.0",
|
|
925
|
-
version: "22.1.
|
|
925
|
+
version: "22.1.1",
|
|
926
926
|
ngImport: i0,
|
|
927
927
|
type: GridRow,
|
|
928
928
|
decorators: [{
|
package/fesm2022/grid.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-tokens.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-cell-widget.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-cell.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-row.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 {InjectionToken} from '@angular/core';\nimport type {GridCell} from './grid-cell';\nimport type {GridRow} from './grid-row';\nimport type {Grid} from './grid';\n\n/** Token used to expose a `GridCell`. */\nexport const GRID_CELL = new InjectionToken<GridCell>('GRID_CELL');\n\n/** Token used to expose a `GridRow`. */\nexport const GRID_ROW = new InjectionToken<GridRow>('GRID_ROW');\n\n/** Token used to expose a `Grid`. */\nexport const GRID = new InjectionToken<Grid>('GRID');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n Signal,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n GridPattern,\n GridCellPattern,\n GridRowPattern,\n SortedCollection,\n tabIndexTransform,\n reportViolations,\n} from '../private';\nimport {GridRow} from './grid-row';\nimport {GRID} from './grid-tokens';\n\n/**\n * The container for a grid. It provides keyboard navigation and focus management for the grid's\n * rows and cells. It manages the overall behavior of the grid, including focus\n * wrapping, selection, and disabled states.\n *\n * ```html\n * <table ngGrid [multi]=\"true\" [enableSelection]=\"true\">\n * @for (row of gridData; track row) {\n * <tr ngGridRow>\n * @for (cell of row; track cell) {\n * <td ngGridCell [disabled]=\"cell.disabled\">\n * {{cell.value}}\n * </td>\n * }\n * </tr>\n * }\n * </table>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'role': 'grid',\n '[tabindex]': 'tabIndex() !== undefined ? tabIndex() : _pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-multiselectable]': '_pattern.multiSelectable()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n providers: [{provide: GRID, useExisting: Grid}],\n})\nexport class Grid implements OnDestroy {\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 collection of rows in the grid. */\n readonly _collection = new SortedCollection<GridRow>();\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._collection.orderedItems().map(r => r._pattern),\n );\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\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 /**\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 readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /**\n * The focus strategy used by the grid.\n * - `roving`: Focus is moved to the active cell using `tabindex`.\n * - `activedescendant`: Focus remains on the grid container, and `aria-activedescendant` is used to indicate the active cell.\n */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /**\n * The wrapping behavior for keyboard navigation along the row axis.\n * - `continuous`: Navigation wraps from the last row to the first, and vice-versa.\n * - `loop`: Navigation wraps within the current row.\n * - `nowrap`: Navigation stops at the first/last item in the row.\n */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /**\n * The wrapping behavior for keyboard navigation along the column axis.\n * - `continuous`: Navigation wraps from the last column to the first, and vice-versa.\n * - `loop`: Navigation wraps within the current column.\n * - `nowrap`: Navigation stops at the first/last item in the column.\n */\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 /**\n * The selection strategy used by the grid.\n * - `follow`: The focused cell is automatically selected.\n * - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).\n */\n readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The tabindex of the grid. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\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 element: () => this.element,\n });\n\n /** The ID of the active descendant in the grid. */\n readonly activeDescendant = computed(() => this._pattern.activeDescendant());\n\n constructor() {\n // Use Write mode for all direct DOM focus management actions.\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n afterRenderEffect({write: () => this._pattern.resetStateEffect()});\n afterRenderEffect({write: () => this._pattern.resetFocusEffect()});\n afterRenderEffect({write: () => this._pattern.restoreFocusEffect()});\n afterRenderEffect({write: () => this._pattern.focusEffect()});\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Scrolls the active cell into view. */\n scrollActiveCellIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {\n this._pattern.activeCell()?.element().scrollIntoView(options);\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element | null | undefined): GridCellPattern | undefined {\n let target = element;\n\n while (target) {\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (cell.element() === target) {\n return cell;\n }\n }\n }\n\n target = target.parentElement?.closest('[ngGridCell]');\n }\n\n return undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n output,\n Signal,\n} from '@angular/core';\nimport {GridCellWidgetPattern, ElementResolver} from '../private';\nimport {GRID_CELL} from './grid-tokens';\n\n/**\n * Represents an interactive element inside a `GridCell`. It allows for pausing grid navigation to\n * interact with the widget.\n *\n * When the user interacts with the widget (e.g., by typing in an input or opening a menu), grid\n * navigation is temporarily suspended to allow the widget to handle keyboard\n * events.\n *\n * ```html\n * <td ngGridCell>\n * <button ngGridCellWidget>Click Me</button>\n * </td>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n '[attr.data-active]': 'active()',\n '[attr.data-active-control]': 'isActivated() ? \"widget\" : \"cell\"',\n '[tabindex]': '_tabIndex()',\n '[attr.id]': 'id()',\n },\n})\nexport class GridCellWidget {\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 widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The parent cell. */\n private readonly _cell = inject(GRID_CELL);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true));\n\n /** The type of widget, which determines how it is activated. */\n readonly widgetType = input<'simple' | 'complex' | 'editable'>('simple');\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The target that will receive focus instead of the widget. */\n readonly focusTarget = input<ElementResolver<HTMLElement>>();\n\n /** Emits when the widget is activated. */\n readonly activated = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** Emits when the widget is deactivated. */\n readonly deactivated = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** The tabindex override. */\n readonly tabindex = input<number | undefined>();\n\n /**\n * The tabindex value set to the element.\n * If a focus target exists then return -1. Unless an override.\n */\n protected readonly _tabIndex: Signal<number> = computed(\n () => this.tabindex() ?? this._pattern.tabIndex(),\n );\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n element: () => this.element,\n cell: () => this._cell._pattern,\n onActivate: e => this.activated.emit(e),\n onDeactivate: e => this.deactivated.emit(e),\n });\n\n /** Whether the widget is activated. */\n get isActivated(): Signal<boolean> {\n return computed(() => this._pattern.isActivated());\n }\n\n constructor() {\n afterRenderEffect({\n write: () => this._pattern.activationEffect(),\n });\n\n afterRenderEffect({\n write: () => this._pattern.deactivationEffect(),\n });\n }\n\n /** Activates the widget. */\n activate(): void {\n this._pattern.activate();\n }\n\n /** Deactivates the widget. */\n deactivate(): void {\n this._pattern.deactivate();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n OnInit,\n Signal,\n Renderer2,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {GridCellPattern, GridCellWidgetPattern} from '../private';\nimport {GridCellWidget} from './grid-cell-widget';\nimport {GRID_CELL, GRID_ROW} from './grid-tokens';\n\n/**\n * Represents a cell within a grid row. It is the primary focusable element\n * within the grid. It can be disabled and can have its selection state managed\n * through the `selected` input.\n *\n * ```html\n * <td ngGridCell [disabled]=\"isDisabled\" [(selected)]=\"isSelected\">\n * Cell Content\n * </td>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n providers: [{provide: GRID_CELL, useExisting: GridCell}],\n})\nexport class GridCell implements OnInit, OnDestroy {\n private readonly _elementRef = inject(ElementRef);\n private readonly _renderer = inject(Renderer2);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the cell is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The widget contained within this cell, if any. */\n private readonly _widget = contentChild(GridCellWidget, {descendants: true});\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPattern: Signal<GridCellWidgetPattern | undefined> = computed(\n () => this._widget()?._pattern,\n );\n\n /** The parent row. */\n private readonly _row = inject(GRID_ROW);\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** A unique identifier for the cell. */\n readonly id = input(inject(_IdGenerator).getId('ng-grid-cell-', true));\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader' | 'rowheader'>('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 tabindex override. */\n readonly tabindex = input<number | undefined>();\n\n /**\n * The tabindex value set to the element.\n * If a focus target exists then return -1. Unless an override.\n */\n protected readonly _tabIndex: Signal<number> = computed(\n () => this.tabindex() ?? this._pattern.tabIndex(),\n );\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n grid: this._row._gridPattern,\n row: () => this._row._pattern,\n widget: this._widgetPattern,\n getWidget: e => this._getWidget(e),\n element: () => this.element,\n });\n\n constructor() {\n // Note: we don't go through host bindings for these, because the\n // effect allows us to batch the reads together which drastically\n // improves rendering performance in large grids (see #32759).\n afterRenderEffect({\n write: () => {\n const {_pattern: pattern, _toggleAttribute: toggle} = this;\n const rowSpan = pattern.rowSpan();\n const colSpan = pattern.colSpan();\n toggle('role', this.role());\n toggle('id', pattern.id());\n toggle('rowspan', rowSpan);\n toggle('colspan', colSpan);\n toggle('aria-rowspan', rowSpan);\n toggle('aria-colspan', colSpan);\n toggle('data-active', this.active());\n toggle('data-anchor', pattern.anchor());\n toggle('aria-disabled', pattern.disabled());\n toggle('aria-rowindex', pattern.ariaRowIndex());\n toggle('aria-colindex', pattern.ariaColIndex());\n toggle('aria-selected', pattern.ariaSelected());\n toggle('tabindex', this._tabIndex());\n },\n });\n }\n\n ngOnInit() {\n this._row._collection.register(this);\n }\n\n ngOnDestroy() {\n this._row._collection.unregister(this);\n }\n\n private _toggleAttribute = (name: string, value: unknown) => {\n if (value == null) {\n this._renderer.removeAttribute(this.element, name);\n } else {\n this._renderer.setAttribute(this.element, name, value as string);\n }\n };\n\n /** Gets the cell widget pattern for a given element. */\n private _getWidget(element: Element | null | undefined): any | undefined {\n let target = element;\n const widget = this._widgetPattern();\n\n if (!widget) return undefined;\n\n while (target) {\n if (widget.element() === target) {\n return widget;\n }\n\n target = target.parentElement?.closest('[ngGridCellWidget]');\n }\n\n return undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterNextRender,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n Signal,\n} from '@angular/core';\nimport {GridPattern, GridRowPattern, SortedCollection} from '../private';\nimport {GRID_ROW, GRID} from './grid-tokens';\nimport {GridCell} from './grid-cell';\n\n/**\n * Represents a row within a grid. It is a container for `ngGridCell` directives.\n *\n * ```html\n * <tr ngGridRow>\n * <!-- ... cells ... -->\n * </tr>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'role': 'row',\n '[attr.aria-rowindex]': '_pattern.rowIndex()',\n },\n providers: [{provide: GRID_ROW, useExisting: GridRow}],\n})\nexport class GridRow implements OnInit, OnDestroy {\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 collection of cells in this row. */\n readonly _collection = new SortedCollection<GridCell>();\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<any[]> = computed(() =>\n this._collection.orderedItems().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 _gridPattern = computed<GridPattern>(() => this._grid._pattern);\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 grid: this._gridPattern,\n });\n\n constructor() {\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnInit() {\n this._grid._collection.register(this);\n }\n\n ngOnDestroy() {\n this._grid._collection.unregister(this);\n this._collection.stopObserving();\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;AAcO,MAAM,SAAS,GAAG,IAAI,cAAc,CAAW,WAAW,CAAC;AAG3D,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAU,UAAU,CAAC;AAGxD,MAAM,IAAI,GAAG,IAAI,cAAc,CAAO,MAAM,CAAC;;MCiDvC,IAAI,CAAA;AAEE,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;AAGvD,EAAA,WAAW,GAAG,IAAI,gBAAgB,EAAW;EAGrC,YAAY,GAA6B,QAAQ,CAAC,MACjE,IAAI,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC;;WACrD;AAGQ,EAAA,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW;AAGlD,EAAA,eAAe,GAAG,KAAK,CAAC,KAAK;;;;AAAG,IAAA,SAAS,EAAE;AAAgB,GAAA,CAAE;AAG7D,EAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;;;;AAAG,IAAA,SAAS,EAAE;AAAgB,GAAA,CAAE;AAMtD,EAAA,YAAY,GAAG,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sB,EAAE;OACzB;AACD,MAAA,SAAS,EAAE,CAAC;AAAC,QAAA,OAAO,EAAE,QAAQ;AAAE,QAAA,WAAW,EAAA;OAAU;KACtD;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"grid.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-cell-widget.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-cell.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/grid/grid-row.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 {InjectionToken} from '@angular/core';\nimport type {GridCell} from './grid-cell';\nimport type {GridRow} from './grid-row';\nimport type {Grid} from './grid';\n\n/** Token used to expose a `GridCell`. */\nexport const GRID_CELL = new InjectionToken<GridCell>('GRID_CELL');\n\n/** Token used to expose a `GridRow`. */\nexport const GRID_ROW = new InjectionToken<GridRow>('GRID_ROW');\n\n/** Token used to expose a `Grid`. */\nexport const GRID = new InjectionToken<Grid>('GRID');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n Signal,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n GridPattern,\n GridCellPattern,\n GridRowPattern,\n SortedCollection,\n tabIndexTransform,\n reportViolations,\n} from '../private';\nimport {GridRow} from './grid-row';\nimport {GRID} from './grid-tokens';\n\n/**\n * The container for a grid. It provides keyboard navigation and focus management for the grid's\n * rows and cells. It manages the overall behavior of the grid, including focus\n * wrapping, selection, and disabled states.\n *\n * ```html\n * <table ngGrid [multi]=\"true\" [enableSelection]=\"true\">\n * @for (row of gridData; track row) {\n * <tr ngGridRow>\n * @for (cell of row; track cell) {\n * <td ngGridCell [disabled]=\"cell.disabled\">\n * {{cell.value}}\n * </td>\n * }\n * </tr>\n * }\n * </table>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'role': 'grid',\n '[tabindex]': 'tabIndex() !== undefined ? tabIndex() : _pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-multiselectable]': '_pattern.multiSelectable()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n providers: [{provide: GRID, useExisting: Grid}],\n})\nexport class Grid implements OnDestroy {\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 collection of rows in the grid. */\n readonly _collection = new SortedCollection<GridRow>();\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._collection.orderedItems().map(r => r._pattern),\n );\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\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 /**\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 readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /**\n * The focus strategy used by the grid.\n * - `roving`: Focus is moved to the active cell using `tabindex`.\n * - `activedescendant`: Focus remains on the grid container, and `aria-activedescendant` is used to indicate the active cell.\n */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /**\n * The wrapping behavior for keyboard navigation along the row axis.\n * - `continuous`: Navigation wraps from the last row to the first, and vice-versa.\n * - `loop`: Navigation wraps within the current row.\n * - `nowrap`: Navigation stops at the first/last item in the row.\n */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /**\n * The wrapping behavior for keyboard navigation along the column axis.\n * - `continuous`: Navigation wraps from the last column to the first, and vice-versa.\n * - `loop`: Navigation wraps within the current column.\n * - `nowrap`: Navigation stops at the first/last item in the column.\n */\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 /**\n * The selection strategy used by the grid.\n * - `follow`: The focused cell is automatically selected.\n * - `explicit`: Cells are selected explicitly by the user (e.g., via click or spacebar).\n */\n readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The tabindex of the grid. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\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 element: () => this.element,\n });\n\n /** The ID of the active descendant in the grid. */\n readonly activeDescendant = computed(() => this._pattern.activeDescendant());\n\n constructor() {\n // Use Write mode for all direct DOM focus management actions.\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n afterRenderEffect({write: () => this._pattern.resetStateEffect()});\n afterRenderEffect({write: () => this._pattern.resetFocusEffect()});\n afterRenderEffect({write: () => this._pattern.restoreFocusEffect()});\n afterRenderEffect({write: () => this._pattern.focusEffect()});\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Scrolls the active cell into view. */\n scrollActiveCellIntoView(options: ScrollIntoViewOptions = {block: 'nearest'}) {\n this._pattern.activeCell()?.element().scrollIntoView(options);\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element | null | undefined): GridCellPattern | undefined {\n let target = element;\n\n while (target) {\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (cell.element() === target) {\n return cell;\n }\n }\n }\n\n target = target.parentElement?.closest('[ngGridCell]');\n }\n\n return undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n output,\n Signal,\n} from '@angular/core';\nimport {GridCellWidgetPattern, ElementResolver} from '../private';\nimport {GRID_CELL} from './grid-tokens';\n\n/**\n * Represents an interactive element inside a `GridCell`. It allows for pausing grid navigation to\n * interact with the widget.\n *\n * When the user interacts with the widget (e.g., by typing in an input or opening a menu), grid\n * navigation is temporarily suspended to allow the widget to handle keyboard\n * events.\n *\n * ```html\n * <td ngGridCell>\n * <button ngGridCellWidget>Click Me</button>\n * </td>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n '[attr.data-active]': 'active()',\n '[attr.data-active-control]': 'isActivated() ? \"widget\" : \"cell\"',\n '[tabindex]': '_tabIndex()',\n '[attr.id]': 'id()',\n },\n})\nexport class GridCellWidget {\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 widget is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The parent cell. */\n private readonly _cell = inject(GRID_CELL);\n\n /** A unique identifier for the widget. */\n readonly id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true));\n\n /** The type of widget, which determines how it is activated. */\n readonly widgetType = input<'simple' | 'complex' | 'editable'>('simple');\n\n /** Whether the widget is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The target that will receive focus instead of the widget. */\n readonly focusTarget = input<ElementResolver<HTMLElement>>();\n\n /** Emits when the widget is activated. */\n readonly activated = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** Emits when the widget is deactivated. */\n readonly deactivated = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** The tabindex override. */\n readonly tabindex = input<number | undefined>();\n\n /**\n * The tabindex value set to the element.\n * If a focus target exists then return -1. Unless an override.\n */\n protected readonly _tabIndex: Signal<number> = computed(\n () => this.tabindex() ?? this._pattern.tabIndex(),\n );\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n element: () => this.element,\n cell: () => this._cell._pattern,\n onActivate: e => this.activated.emit(e),\n onDeactivate: e => this.deactivated.emit(e),\n });\n\n /** Whether the widget is activated. */\n get isActivated(): Signal<boolean> {\n return computed(() => this._pattern.isActivated());\n }\n\n constructor() {\n afterRenderEffect({\n write: () => this._pattern.activationEffect(),\n });\n\n afterRenderEffect({\n write: () => this._pattern.deactivationEffect(),\n });\n }\n\n /** Activates the widget. */\n activate(): void {\n this._pattern.activate();\n }\n\n /** Deactivates the widget. */\n deactivate(): void {\n this._pattern.deactivate();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n OnInit,\n Signal,\n Renderer2,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {GridCellPattern, GridCellWidgetPattern} from '../private';\nimport {GridCellWidget} from './grid-cell-widget';\nimport {GRID_CELL, GRID_ROW} from './grid-tokens';\n\n/**\n * Represents a cell within a grid row. It is the primary focusable element\n * within the grid. It can be disabled and can have its selection state managed\n * through the `selected` input.\n *\n * ```html\n * <td ngGridCell [disabled]=\"isDisabled\" [(selected)]=\"isSelected\">\n * Cell Content\n * </td>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n providers: [{provide: GRID_CELL, useExisting: GridCell}],\n})\nexport class GridCell implements OnInit, OnDestroy {\n private readonly _elementRef = inject(ElementRef);\n private readonly _renderer = inject(Renderer2);\n\n /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** Whether the cell is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The widget contained within this cell, if any. */\n private readonly _widget = contentChild(GridCellWidget, {descendants: true});\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPattern: Signal<GridCellWidgetPattern | undefined> = computed(\n () => this._widget()?._pattern,\n );\n\n /** The parent row. */\n private readonly _row = inject(GRID_ROW);\n\n /** Text direction. */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** A unique identifier for the cell. */\n readonly id = input(inject(_IdGenerator).getId('ng-grid-cell-', true));\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader' | 'rowheader'>('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 tabindex override. */\n readonly tabindex = input<number | undefined>();\n\n /**\n * The tabindex value set to the element.\n * If a focus target exists then return -1. Unless an override.\n */\n protected readonly _tabIndex: Signal<number> = computed(\n () => this.tabindex() ?? this._pattern.tabIndex(),\n );\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n grid: this._row._gridPattern,\n row: () => this._row._pattern,\n widget: this._widgetPattern,\n getWidget: e => this._getWidget(e),\n element: () => this.element,\n });\n\n constructor() {\n // Note: we don't go through host bindings for these, because the\n // effect allows us to batch the reads together which drastically\n // improves rendering performance in large grids (see #32759).\n afterRenderEffect({\n write: () => {\n const {_pattern: pattern, _toggleAttribute: toggle} = this;\n const rowSpan = pattern.rowSpan();\n const colSpan = pattern.colSpan();\n toggle('role', this.role());\n toggle('id', pattern.id());\n toggle('rowspan', rowSpan);\n toggle('colspan', colSpan);\n toggle('aria-rowspan', rowSpan);\n toggle('aria-colspan', colSpan);\n toggle('data-active', this.active());\n toggle('data-anchor', pattern.anchor());\n toggle('aria-disabled', pattern.disabled());\n toggle('aria-rowindex', pattern.ariaRowIndex());\n toggle('aria-colindex', pattern.ariaColIndex());\n toggle('aria-selected', pattern.ariaSelected());\n toggle('tabindex', this._tabIndex());\n },\n });\n }\n\n ngOnInit() {\n this._row._collection.register(this);\n }\n\n ngOnDestroy() {\n this._row._collection.unregister(this);\n }\n\n private _toggleAttribute = (name: string, value: unknown) => {\n if (value == null) {\n this._renderer.removeAttribute(this.element, name);\n } else {\n this._renderer.setAttribute(this.element, name, value as string);\n }\n };\n\n /** Gets the cell widget pattern for a given element. */\n private _getWidget(element: Element | null | undefined): any | undefined {\n let target = element;\n const widget = this._widgetPattern();\n\n if (!widget) return undefined;\n\n while (target) {\n if (widget.element() === target) {\n return widget;\n }\n\n target = target.parentElement?.closest('[ngGridCellWidget]');\n }\n\n return undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterNextRender,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n Signal,\n} from '@angular/core';\nimport {GridPattern, GridRowPattern, SortedCollection} from '../private';\nimport {GRID_ROW, GRID} from './grid-tokens';\nimport {GridCell} from './grid-cell';\n\n/**\n * Represents a row within a grid. It is a container for `ngGridCell` directives.\n *\n * ```html\n * <tr ngGridRow>\n * <!-- ... cells ... -->\n * </tr>\n * ```\n *\n * @see [Grid](guide/aria/grid)\n */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'role': 'row',\n '[attr.aria-rowindex]': '_pattern.rowIndex()',\n },\n providers: [{provide: GRID_ROW, useExisting: GridRow}],\n})\nexport class GridRow implements OnInit, OnDestroy {\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 collection of cells in this row. */\n readonly _collection = new SortedCollection<GridCell>();\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<any[]> = computed(() =>\n this._collection.orderedItems().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 _gridPattern = computed<GridPattern>(() => this._grid._pattern);\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 grid: this._gridPattern,\n });\n\n constructor() {\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n }\n\n ngOnInit() {\n this._grid._collection.register(this);\n }\n\n ngOnDestroy() {\n this._grid._collection.unregister(this);\n this._collection.stopObserving();\n }\n}\n"],"names":[],"mappings":";;;;;;;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AA,IAAA,MAAA,EAAA;AAAA,MAAA,QAAA,EAAA;AAAA,QAAA,iBAAA,EAAA,UAAA;AAAA,QAAA,UAAA,EAAA,UAAA;AAAA,QAAA,QAAA,EAAA,IAAA;AAAA,QAAA,UAAA,EAAA,KAAA;AAAA,QAAA,iBAAA,EAAA;AAAA;KAAA;AAAA,IAAA,IAAA,EAAA;AAAA,MAAA,UAAA,EAAA;AAAA,QAAA,MAAA,EAAA;OAAA;AAAA,MAAA,UAAA,EAAA;AAAA,QAAA,oBAAA,EAAA;AAAA;KAAA;AAAA,IAAA,SAAA,EAFP,CAAC;AAAC,MAAA,OAAO,EAAE,QAAQ;AAAE,MAAA,WAAW,EAAE;AAAO,KAAC,CAAC;IAAA,QAAA,EAAA,CAAA,WAAA,CAAA;AAAA,IAAA,QAAA,EAAA;AAAA,GAAA,CAAA;;;;;;QAE3C,OAAO;AAAA,EAAA,UAAA,EAAA,CAAA;UATnB,SAAS;AAAC,IAAA,IAAA,EAAA,CAAA;AACT,MAAA,QAAQ,EAAE,aAAa;AACvB,MAAA,QAAQ,EAAE,WAAW;AACrB,MAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,KAAK;AACb,QAAA,sBAAsB,EAAE;OACzB;AACD,MAAA,SAAS,EAAE,CAAC;AAAC,QAAA,OAAO,EAAE,QAAQ;AAAE,QAAA,WAAW,EAAA;OAAU;KACtD;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox-testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"listbox-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/listbox/testing/listbox-harness.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 {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {ListboxHarnessFilters, ListboxOptionHarnessFilters} from './listbox-harness-filters';\n\n/** Harness for interacting with a standard ngOption in tests. */\nexport class ListboxOptionHarness extends ComponentHarness {\n static hostSelector = '[ngOption]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an option\n * with specific attributes.\n * @param options Options for filtering which option instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListboxOptionHarnessFilters = {}): HarnessPredicate<ListboxOptionHarness> {\n return new HarnessPredicate(ListboxOptionHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'selected',\n options.selected,\n async (harness, selected) => (await harness.isSelected()) === selected,\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Whether the option is selected. */\n async isSelected(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-selected')) === 'true';\n }\n\n /** Whether the option is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (\n (await host.getAttribute('aria-disabled')) === 'true' ||\n (await host.getProperty('disabled')) === true\n );\n }\n\n /** Gets the option's text. */\n async getText(): Promise<string> {\n const host = await this.host();\n return host.text();\n }\n\n /** Clicks the option to toggle its selected state. */\n async click(): Promise<void> {\n const host = await this.host();\n return host.click();\n }\n}\n\n/** Harness for interacting with a standard ngListbox in tests. */\nexport class ListboxHarness extends ComponentHarness {\n static hostSelector = '[ngListbox]';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a listbox\n * with specific attributes.\n * @param options Options for filtering which listbox instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: ListboxHarnessFilters = {}): HarnessPredicate<ListboxHarness> {\n return new HarnessPredicate(ListboxHarness, options).addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n );\n }\n\n /** Gets the orientation of the listbox. */\n async getOrientation(): Promise<'vertical' | 'horizontal'> {\n const host = await this.host();\n const orientation = await host.getAttribute('aria-orientation');\n return orientation === 'horizontal' ? 'horizontal' : 'vertical';\n }\n\n /** Whether the listbox is multiselectable. */\n async isMulti(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-multiselectable')) === 'true';\n }\n\n /** Whether the listbox is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Gets the options inside the listbox. */\n async getOptions(filters: ListboxOptionHarnessFilters = {}): Promise<ListboxOptionHarness[]> {\n return this.locatorForAll(ListboxOptionHarness.with(filters))();\n }\n\n /** Focuses the listbox container. */\n async focus(): Promise<void> {\n await (await this.host()).focus();\n }\n\n /** Blurs the listbox container. */\n async blur(): Promise<void> {\n await (await this.host()).blur();\n }\n\n /** Gets the ID of the active option. */\n async getActiveDescendantId(): Promise<string | null> {\n const host = await this.host();\n return host.getAttribute('aria-activedescendant');\n }\n}\n"],"names":[],"mappings":";;AAYM,MAAO,oBAAqB,SAAQ,gBAAgB,CAAA;EACxD,OAAO,YAAY,GAAG,YAAY;AAQlC,EAAA,OAAO,IAAI,CAAC,OAAA,GAAuC,EAAE,EAAA;AACnD,IAAA,OAAO,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,OAAO,CAAA,CACtD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KAC7C,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAA,CAExD,SAAS,CACR,UAAU,EACV,OAAO,CAAC,QAAQ,EAChB,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ,CAAA,CAEvE,SAAS,CACR,UAAU,EACV,OAAO,CAAC,QAAQ,EAChB,OAAO,OAAO,EAAE,QAAQ,KAAK,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MA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AC;AAC/D,IAAA,OAAO,WAAW,KAAK,YAAY,GAAG,YAAY,GAAG,UAAU;AACjE,EAAA;AAGA,EAAA,MAAM,OAAO,GAAA;AACX,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;IAC9B,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,MAAM,MAAM;AACrE,EAAA;AAGA,EAAA,MAAM,UAAU,GAAA;AACd,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;IAC9B,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,MAAM;AAC9D,EAAA;AAGA,EAAA,MAAM,UAAU,CAAC,OAAA,GAAuC,EAAE,EAAA;AACxD,IAAA,OAAO,IAAI,CAAC,aAAa,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE;AACjE,EAAA;AAGA,EAAA,MAAM,KAAK,GAAA;IACT,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE;AACnC,EAAA;AAGA,EAAA,MAAM,IAAI,GAAA;IACR,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;AAClC,EAAA;AAGA,EAAA,MAAM,qBAAqB,GAAA;AACzB,IAAA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE;AAC9B,IAAA,OAAO,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC;AACnD,EAAA;;;;;"}
|
package/fesm2022/listbox.mjs
CHANGED
|
@@ -144,7 +144,7 @@ class Listbox {
|
|
|
144
144
|
}
|
|
145
145
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
146
146
|
minVersion: "12.0.0",
|
|
147
|
-
version: "22.1.
|
|
147
|
+
version: "22.1.1",
|
|
148
148
|
ngImport: i0,
|
|
149
149
|
type: Listbox,
|
|
150
150
|
deps: [],
|
|
@@ -152,7 +152,7 @@ class Listbox {
|
|
|
152
152
|
});
|
|
153
153
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
154
154
|
minVersion: "17.1.0",
|
|
155
|
-
version: "22.1.
|
|
155
|
+
version: "22.1.1",
|
|
156
156
|
type: Listbox,
|
|
157
157
|
isStandalone: true,
|
|
158
158
|
selector: "[ngListbox]",
|
|
@@ -274,7 +274,7 @@ class Listbox {
|
|
|
274
274
|
}
|
|
275
275
|
i0.ɵɵngDeclareClassMetadata({
|
|
276
276
|
minVersion: "12.0.0",
|
|
277
|
-
version: "22.1.
|
|
277
|
+
version: "22.1.1",
|
|
278
278
|
ngImport: i0,
|
|
279
279
|
type: Listbox,
|
|
280
280
|
decorators: [{
|
|
@@ -448,7 +448,7 @@ class Option {
|
|
|
448
448
|
}
|
|
449
449
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
450
450
|
minVersion: "12.0.0",
|
|
451
|
-
version: "22.1.
|
|
451
|
+
version: "22.1.1",
|
|
452
452
|
ngImport: i0,
|
|
453
453
|
type: Option,
|
|
454
454
|
deps: [],
|
|
@@ -456,7 +456,7 @@ class Option {
|
|
|
456
456
|
});
|
|
457
457
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
458
458
|
minVersion: "17.1.0",
|
|
459
|
-
version: "22.1.
|
|
459
|
+
version: "22.1.1",
|
|
460
460
|
type: Option,
|
|
461
461
|
isStandalone: true,
|
|
462
462
|
selector: "[ngOption]",
|
|
@@ -508,7 +508,7 @@ class Option {
|
|
|
508
508
|
}
|
|
509
509
|
i0.ɵɵngDeclareClassMetadata({
|
|
510
510
|
minVersion: "12.0.0",
|
|
511
|
-
version: "22.1.
|
|
511
|
+
version: "22.1.1",
|
|
512
512
|
ngImport: i0,
|
|
513
513
|
type: Option,
|
|
514
514
|
decorators: [{
|
package/fesm2022/listbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.mjs","sources":["../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/listbox/tokens.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/listbox/listbox.ts","../../../../../k8-fastbuild-ST-fdfa778d11ba/bin/src/aria/listbox/option.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {Listbox} from './listbox';\n\nexport const LISTBOX = new InjectionToken<Listbox<any>>('LISTBOX');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n afterNextRender,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n signal,\n Signal,\n untracked,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {ListboxPattern, SortedCollection, tabIndexTransform, reportViolations} from '../private';\nimport {Option} from './option';\nimport {LISTBOX} from './tokens';\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 * @see [Listbox](guide/aria/listbox)\n * @see [Autocomplete](guide/aria/autocomplete)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n */\n@Directive({\n selector: '[ngListbox]',\n exportAs: 'ngListbox',\n host: {\n 'role': 'listbox',\n '[attr.id]': 'id()',\n '[attr.tabindex]': 'tabIndex() !== undefined ? 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 '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n providers: [{provide: LISTBOX, useExisting: Listbox}],\n})\nexport class Listbox<V> implements OnDestroy {\n /** A unique identifier for the listbox. */\n readonly id = input(inject(_IdGenerator).getId('ng-listbox-', true));\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 collection of Options. */\n readonly _collection = new SortedCollection<Option<V>>();\n\n /** A signal wrapper for directionality. */\n protected readonly textDirection = inject(Directionality).valueSignal.asReadonly();\n\n /** Whether the list is vertically or horizontally oriented. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n readonly 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 readonly 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 readonly 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 readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n readonly typeaheadDelay = input<number>(500); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly readonly = input(false, {transform: booleanAttribute});\n\n /** The tabindex of the listbox. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\n\n /** The values of the currently selected items. */\n readonly value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n readonly _pattern: ListboxPattern<V>;\n\n /** The ID of the active descendant in the listbox. */\n readonly activeDescendant: Signal<string | undefined>;\n\n private readonly _orderedItemPatterns = computed(() =>\n this._collection.orderedItems().map(option => option._pattern),\n );\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n items: this._orderedItemPatterns,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n };\n\n this._pattern = new ListboxPattern<V>(inputs);\n\n this.activeDescendant = computed(() => this._pattern.activeDescendant());\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n // Ensure that if the active item is removed from\n // the list, the listbox updates it's focus state.\n afterRenderEffect({\n write: () => {\n const items = inputs.items();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (activeItem && !items.some(i => i === activeItem)) {\n this._pattern.listBehavior.unfocus();\n this._pattern.setDefaultState();\n }\n },\n });\n\n // Ensure that the value is always in sync with the available options.\n // This needs to be after the render for the value to always be available.\n afterRenderEffect({\n write: () => {\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\n ngOnDestroy() {\n this._collection.stopObserving();\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 /** Navigates to an item at a specific index in the listbox. */\n gotoIndex(index: number) {\n const patterns = this._orderedItemPatterns();\n const item = patterns[Math.min(Math.max(index, 0), patterns.length - 1)];\n\n if (item) {\n this._pattern.listBehavior.goto(item);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {OptionPattern} from '../private';\nimport {LISTBOX} from './tokens';\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 * @see [Listbox](guide/aria/listbox)\n * @see [Autocomplete](guide/aria/autocomplete)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\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> implements OnInit, OnDestroy {\n /** A reference to the host element. */\n readonly element = inject(ElementRef).nativeElement as HTMLElement;\n\n /** Whether the option is currently active (focused). */\n readonly 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 /** The parent Listbox UIPattern. */\n private readonly _listboxPattern = computed(() => this._listbox._pattern);\n\n /** The value of the option. */\n readonly value = input.required<V>();\n\n /** Whether an item is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n readonly 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.label() ?? '',\n });\n\n ngOnInit() {\n this._listbox._collection.register(this);\n }\n\n ngOnDestroy() {\n this._listbox._collection.unregister(this);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAWO,MAAM,OAAO,GAAG,IAAI,cAAc,CAAe,SAAS,CAAC;;MC0DrD,OAAO,CAAA;AAET,EAAA,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC;;WAAC;AAGnD,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;AAGvD,EAAA,WAAW,GAAG,IAAI,gBAAgB,EAAa;EAGrC,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,CAAC,UAAU,EAAE;EAGzE,WAAW,GAAG,KAAK,CAA4B,UAAU;;WAAC;AAG1D,EAAA,KAAK,GAAG,KAAK,CAAC,KAAK;;;;AAAG,IAAA,SAAS,EAAE;AAAgB,GAAA,CAAE;AAGnD,EAAA,IAAI,GAAG,KAAK,CAAC,IAAI;;;;AAAG,IAAA,SAAS,EAAE;AAAgB,GAAA,CAAE;AAMjD,EAAA,YAAY,GAAG,KAAK,CAAC,IAAI;;;;AAAG,IAAA,SAAS,EAAE;AAAgB,GAA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CAAA;AACT,MAAA,QAAQ,EAAE,YAAY;AACtB,MAAA,QAAQ,EAAE,UAAU;AACpB,MAAA,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-fdfa778d11ba/bin/src/aria/listbox/tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/listbox/listbox.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/listbox/option.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {Listbox} from './listbox';\n\nexport const LISTBOX = new InjectionToken<Listbox<any>>('LISTBOX');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n afterRenderEffect,\n afterNextRender,\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n OnDestroy,\n signal,\n Signal,\n untracked,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {ListboxPattern, SortedCollection, tabIndexTransform, reportViolations} from '../private';\nimport {Option} from './option';\nimport {LISTBOX} from './tokens';\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 * @see [Listbox](guide/aria/listbox)\n * @see [Autocomplete](guide/aria/autocomplete)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\n */\n@Directive({\n selector: '[ngListbox]',\n exportAs: 'ngListbox',\n host: {\n 'role': 'listbox',\n '[attr.id]': 'id()',\n '[attr.tabindex]': 'tabIndex() !== undefined ? 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 '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocusIn()',\n },\n providers: [{provide: LISTBOX, useExisting: Listbox}],\n})\nexport class Listbox<V> implements OnDestroy {\n /** A unique identifier for the listbox. */\n readonly id = input(inject(_IdGenerator).getId('ng-listbox-', true));\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 collection of Options. */\n readonly _collection = new SortedCollection<Option<V>>();\n\n /** A signal wrapper for directionality. */\n protected readonly textDirection = inject(Directionality).valueSignal.asReadonly();\n\n /** Whether the list is vertically or horizontally oriented. */\n readonly orientation = input<'vertical' | 'horizontal'>('vertical');\n\n /** Whether multiple items in the list can be selected at once. */\n readonly multi = input(false, {transform: booleanAttribute});\n\n /** Whether focus should wrap when navigating. */\n readonly 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 readonly 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 readonly 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 readonly selectionMode = input<'follow' | 'explicit'>('follow');\n\n /** The amount of time before the typeahead search is reset. */\n readonly typeaheadDelay = input<number>(500); // Picked arbitrarily.\n\n /** Whether the listbox is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the listbox is readonly. */\n readonly readonly = input(false, {transform: booleanAttribute});\n\n /** The tabindex of the listbox. */\n readonly tabIndex = input(undefined, {\n alias: 'tabindex',\n transform: tabIndexTransform,\n });\n\n /** The values of the currently selected items. */\n readonly value = model<V[]>([]);\n\n /** The Listbox UIPattern. */\n readonly _pattern: ListboxPattern<V>;\n\n /** The ID of the active descendant in the listbox. */\n readonly activeDescendant: Signal<string | undefined>;\n\n private readonly _orderedItemPatterns = computed(() =>\n this._collection.orderedItems().map(option => option._pattern),\n );\n\n constructor() {\n const inputs = {\n ...this,\n id: this.id,\n items: this._orderedItemPatterns,\n activeItem: signal(undefined),\n textDirection: this.textDirection,\n element: () => this._elementRef.nativeElement,\n };\n\n this._pattern = new ListboxPattern<V>(inputs);\n\n this.activeDescendant = computed(() => this._pattern.activeDescendant());\n\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n\n afterRenderEffect({write: () => this._pattern.setDefaultStateEffect()});\n\n // Ensure that if the active item is removed from\n // the list, the listbox updates it's focus state.\n afterRenderEffect({\n write: () => {\n const items = inputs.items();\n const activeItem = untracked(() => inputs.activeItem());\n\n if (activeItem && !items.some(i => i === activeItem)) {\n this._pattern.listBehavior.unfocus();\n this._pattern.setDefaultState();\n }\n },\n });\n\n // Ensure that the value is always in sync with the available options.\n // This needs to be after the render for the value to always be available.\n afterRenderEffect({\n write: () => {\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\n ngOnDestroy() {\n this._collection.stopObserving();\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 /** Navigates to an item at a specific index in the listbox. */\n gotoIndex(index: number) {\n const patterns = this._orderedItemPatterns();\n const item = patterns[Math.min(Math.max(index, 0), patterns.length - 1)];\n\n if (item) {\n this._pattern.listBehavior.goto(item);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n OnInit,\n OnDestroy,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {OptionPattern} from '../private';\nimport {LISTBOX} from './tokens';\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 * @see [Listbox](guide/aria/listbox)\n * @see [Autocomplete](guide/aria/autocomplete)\n * @see [Select](guide/aria/select)\n * @see [Multiselect](guide/aria/multiselect)\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> implements OnInit, OnDestroy {\n /** A reference to the host element. */\n readonly element = inject(ElementRef).nativeElement as HTMLElement;\n\n /** Whether the option is currently active (focused). */\n readonly 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 /** The parent Listbox UIPattern. */\n private readonly _listboxPattern = computed(() => this._listbox._pattern);\n\n /** The value of the option. */\n readonly value = input.required<V>();\n\n /** Whether an item is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** The text used by the typeahead search. */\n readonly 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.label() ?? '',\n });\n\n ngOnInit() {\n this._listbox._collection.register(this);\n }\n\n ngOnDestroy() {\n this._listbox._collection.unregister(this);\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAWO,MAAM,OAAO,GAAG,IAAI,cAAc,CAAe,SAAS,CAAC;;MC0DrD,OAAO,CAAA;AAET,EAAA,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC;;WAAC;AAGnD,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;AAGvD,EAAA,WAA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EAAA;AAAA,MAAA,UAAA,EAAA;AAAA,QAAA,MAAA,EAAA;OAAA;AAAA,MAAA,UAAA,EAAA;AAAA,QAAA,kBAAA,EAAA,UAAA;AAAA,QAAA,SAAA,EAAA,eAAA;AAAA,QAAA,eAAA,EAAA,qBAAA;AAAA,QAAA,oBAAA,EAAA,qBAAA;AAAA,QAAA,oBAAA,EAAA;AAAA;KAAA;IAAA,QAAA,EAAA,CAAA,UAAA,CAAA;AAAA,IAAA,QAAA,EAAA;AAAA,GAAA,CAAA;;;;;;QAAN,MAAM;AAAA,EAAA,UAAA,EAAA,CAAA;UAZlB,SAAS;AAAC,IAAA,IAAA,EAAA,CAAA;AACT,MAAA,QAAQ,EAAE,YAAY;AACtB,MAAA,QAAQ,EAAE,UAAU;AACpB,MAAA,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-testing.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"menu-testing.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/menu/testing/menu-harness.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 {ComponentHarness, HarnessPredicate, TestElement} from '@angular/cdk/testing';\nimport {MenuHarnessFilters, MenuItemHarnessFilters} from './menu-harness-filters';\n\n/** Harness for interacting with a standard ngMenuItem in tests. */\nexport class MenuItemHarness extends ComponentHarness {\n static hostSelector = '[ngMenuItem]';\n\n static with(options: MenuItemHarnessFilters = {}): HarnessPredicate<MenuItemHarness> {\n return new HarnessPredicate(MenuItemHarness, options)\n .addOption('text', options.text, (harness, text) =>\n HarnessPredicate.stringMatches(harness.getText(), text),\n )\n .addOption(\n 'disabled',\n options.disabled,\n async (harness, disabled) => (await harness.isDisabled()) === disabled,\n )\n .addOption(\n 'expanded',\n options.expanded,\n async (harness, expanded) => (await harness.isExpanded()) === expanded,\n );\n }\n\n /** Gets the text content of the menu item. */\n async getText(): Promise<string> {\n return (await this.host()).text();\n }\n\n /** Whether the menu item is disabled. */\n async isDisabled(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-disabled')) === 'true';\n }\n\n /** Whether the menu item is expanded (contains an open submenu). */\n async isExpanded(): Promise<boolean> {\n const host = await this.host();\n return (await host.getAttribute('aria-expanded')) === 'true';\n }\n\n /** Clicks the menu item to trigger its action or toggle its submenu. */\n async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /** Resolves the nested submenu panel associated with this menu item, if any exists. */\n async getSubmenu(): Promise<MenuHarness | null> {\n const controlsId = await (await this.host()).getAttribute('aria-controls');\n if (controlsId) {\n return this.documentRootLocatorFactory().locatorFor(\n MenuHarness.with({selector: `#${controlsId}`}),\n )();\n }\n return null;\n }\n\n /** Whether the menu item has focus. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Whether the menu item acts as a submenu trigger. */\n async hasSubmenu(): Promise<boolean> {\n const host = await this.host();\n return (\n (await host.getAttribute('aria-haspopup')) === 'true' ||\n !!(await host.getAttribute('aria-controls'))\n );\n }\n}\n\n/** Harness for interacting with a standard ngMenu or ngMenuBar in tests. */\nexport class MenuHarness extends ComponentHarness {\n static hostSelector = '[ngMenu], [ngMenuBar]';\n\n static with(options: MenuHarnessFilters = {}): HarnessPredicate<MenuHarness> {\n return new HarnessPredicate(MenuHarness, options).addOption(\n 'triggerText',\n options.triggerText,\n async (harness, text) => {\n const trigger = await harness._getTrigger();\n if (!trigger) return false;\n return HarnessPredicate.stringMatches(await trigger.text(), text);\n },\n );\n }\n\n /** Resolves the trigger associated with this menu container via aria-controls inversion. */\n async _getTrigger(): Promise<TestElement | null> {\n const id = await (await this.host()).getAttribute('id');\n if (!id) return null;\n return this.documentRootLocatorFactory().locatorForOptional(`[aria-controls=\"${id}\"]`)();\n }\n\n /** Checks whether the menu container is visible. */\n async isOpen(): Promise<boolean> {\n const host = await this.host();\n // Menu bars are always visible persistently.\n if (await host.matchesSelector('[ngMenuBar]')) {\n return true;\n }\n return (await host.getAttribute('data-visible')) === 'true';\n }\n\n /** Whether the menu is a menu bar. */\n async isMenuBar(): Promise<boolean> {\n const host = await this.host();\n return host.matchesSelector('[ngMenuBar]');\n }\n\n /** Opens the menu if it is currently closed. */\n async open(): Promise<void> {\n if (!(await this.isOpen())) {\n const trigger = await this._getTrigger();\n if (trigger) {\n await trigger.click();\n }\n }\n }\n\n /** Closes the menu if it is currently open. */\n async close(): Promise<void> {\n if (await this.isOpen()) {\n const trigger = await this._getTrigger();\n if (trigger) {\n await trigger.click();\n }\n }\n }\n\n /** Queries all menu items inside this menu container. */\n async getItems(filters: MenuItemHarnessFilters = {}): Promise<MenuItemHarness[]> {\n return this.locatorForAll(MenuItemHarness.with(filters))();\n }\n}\n"],"names":[],"mappings":";;AAYM,MAAO,eAAgB,SAAQ,gBAAgB,CAAA;EACnD,OAAO,YAAY,GAAG,cAAc;AAEpC,EAAA,OAAO,IAAI,CAAC,OAAA,GAAkC,EAAE,EAAA;AAC9C,IAAA,OAAO,IAAI,gBAAgB,CAAC,eAAe,EAAE,OAAO,CAAA,CACjD,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE,IAAI,KAC7C,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,CAAA,CAExD,SAAS,CACR,UAAU,EACV,OAAO,CAAC,QAAQ,EAChB,OAAO,OAAO,EAAE,QA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