@angular/aria 21.0.0-rc.1 → 21.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/_adev_assets/aria-accordion.json +429 -59
  2. package/_adev_assets/aria-combobox.json +261 -41
  3. package/_adev_assets/aria-grid.json +339 -85
  4. package/_adev_assets/aria-listbox.json +99 -70
  5. package/_adev_assets/aria-menu.json +355 -158
  6. package/_adev_assets/aria-tabs.json +198 -305
  7. package/_adev_assets/aria-toolbar.json +70 -221
  8. package/_adev_assets/aria-tree.json +153 -363
  9. package/fesm2022/_widget-chunk.mjs +388 -57
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +125 -72
  12. package/fesm2022/accordion.mjs.map +1 -1
  13. package/fesm2022/aria.mjs +1 -1
  14. package/fesm2022/aria.mjs.map +1 -1
  15. package/fesm2022/combobox.mjs +129 -24
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +203 -65
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +50 -39
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +179 -71
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +418 -440
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +105 -73
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +52 -44
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +106 -63
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -2
  32. package/types/_grid-chunk.d.ts +216 -35
  33. package/types/accordion.d.ts +134 -35
  34. package/types/combobox.d.ts +141 -12
  35. package/types/grid.d.ts +150 -32
  36. package/types/listbox.d.ts +60 -28
  37. package/types/menu.d.ts +133 -49
  38. package/types/private.d.ts +210 -250
  39. package/types/tabs.d.ts +124 -44
  40. package/types/toolbar.d.ts +58 -36
  41. package/types/tree.d.ts +121 -49
package/fesm2022/grid.mjs CHANGED
@@ -1,11 +1,12 @@
1
1
  import { _IdGenerator } from '@angular/cdk/a11y';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, contentChild, model } from '@angular/core';
3
+ import { inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, model, output } from '@angular/core';
4
4
  import { Directionality } from '@angular/cdk/bidi';
5
5
  import { GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern } from './_widget-chunk.mjs';
6
6
 
7
7
  class Grid {
8
8
  _elementRef = inject(ElementRef);
9
+ element = this._elementRef.nativeElement;
9
10
  _rows = contentChildren(GridRow, ...(ngDevMode ? [{
10
11
  debugName: "_rows",
11
12
  descendants: true
@@ -16,9 +17,6 @@ class Grid {
16
17
  debugName: "_rowPatterns"
17
18
  }] : []));
18
19
  textDirection = inject(Directionality).valueSignal;
19
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
20
- debugName: "element"
21
- }] : []));
22
20
  enableSelection = input(false, ...(ngDevMode ? [{
23
21
  debugName: "enableSelection",
24
22
  transform: booleanAttribute
@@ -64,25 +62,29 @@ class Grid {
64
62
  _pattern = new GridPattern({
65
63
  ...this,
66
64
  rows: this._rowPatterns,
67
- getCell: e => this._getCell(e)
65
+ getCell: e => this._getCell(e),
66
+ element: () => this.element
68
67
  });
69
68
  constructor() {
70
69
  afterRenderEffect(() => this._pattern.setDefaultStateEffect());
71
70
  afterRenderEffect(() => this._pattern.resetStateEffect());
71
+ afterRenderEffect(() => this._pattern.resetFocusEffect());
72
+ afterRenderEffect(() => this._pattern.restoreFocusEffect());
72
73
  afterRenderEffect(() => this._pattern.focusEffect());
73
74
  }
74
75
  _getCell(element) {
75
- const cellElement = element.closest('[ngGridCell]');
76
- if (cellElement === undefined) return;
77
- const widgetElement = element.closest('[ngGridCellWidget]');
78
- for (const row of this._rowPatterns()) {
79
- for (const cell of row.inputs.cells()) {
80
- if (cell.element() === cellElement || widgetElement !== undefined && cell.element() === widgetElement) {
81
- return cell;
76
+ let target = element;
77
+ while (target) {
78
+ for (const row of this._rowPatterns()) {
79
+ for (const cell of row.inputs.cells()) {
80
+ if (cell.element() === target) {
81
+ return cell;
82
+ }
82
83
  }
83
84
  }
85
+ target = target.parentElement?.closest('[ngGridCell]');
84
86
  }
85
- return;
87
+ return undefined;
86
88
  }
87
89
  static ɵfac = i0.ɵɵngDeclareFactory({
88
90
  minVersion: "12.0.0",
@@ -172,7 +174,7 @@ class Grid {
172
174
  "pointerdown": "_pattern.onPointerdown($event)",
173
175
  "pointermove": "_pattern.onPointermove($event)",
174
176
  "pointerup": "_pattern.onPointerup($event)",
175
- "focusin": "_pattern.onFocusIn()",
177
+ "focusin": "_pattern.onFocusIn($event)",
176
178
  "focusout": "_pattern.onFocusOut($event)"
177
179
  },
178
180
  properties: {
@@ -212,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({
212
214
  '(pointerdown)': '_pattern.onPointerdown($event)',
213
215
  '(pointermove)': '_pattern.onPointermove($event)',
214
216
  '(pointerup)': '_pattern.onPointerup($event)',
215
- '(focusin)': '_pattern.onFocusIn()',
217
+ '(focusin)': '_pattern.onFocusIn($event)',
216
218
  '(focusout)': '_pattern.onFocusOut($event)'
217
219
  }
218
220
  }]
@@ -221,6 +223,7 @@ i0.ɵɵngDeclareClassMetadata({
221
223
  });
222
224
  class GridRow {
223
225
  _elementRef = inject(ElementRef);
226
+ element = this._elementRef.nativeElement;
224
227
  _cells = contentChildren(GridCell, ...(ngDevMode ? [{
225
228
  debugName: "_cells",
226
229
  descendants: true
@@ -231,21 +234,16 @@ class GridRow {
231
234
  debugName: "_cellPatterns"
232
235
  }] : []));
233
236
  _grid = inject(Grid);
234
- grid = computed(() => this._grid._pattern, ...(ngDevMode ? [{
235
- debugName: "grid"
236
- }] : []));
237
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
238
- debugName: "element"
239
- }] : []));
240
- role = input('row', ...(ngDevMode ? [{
241
- debugName: "role"
237
+ _gridPattern = computed(() => this._grid._pattern, ...(ngDevMode ? [{
238
+ debugName: "_gridPattern"
242
239
  }] : []));
243
240
  rowIndex = input(...(ngDevMode ? [undefined, {
244
241
  debugName: "rowIndex"
245
242
  }] : []));
246
243
  _pattern = new GridRowPattern({
247
244
  ...this,
248
- cells: this._cellPatterns
245
+ cells: this._cellPatterns,
246
+ grid: this._gridPattern
249
247
  });
250
248
  static ɵfac = i0.ɵɵngDeclareFactory({
251
249
  minVersion: "12.0.0",
@@ -262,13 +260,6 @@ class GridRow {
262
260
  isStandalone: true,
263
261
  selector: "[ngGridRow]",
264
262
  inputs: {
265
- role: {
266
- classPropertyName: "role",
267
- publicName: "role",
268
- isSignal: true,
269
- isRequired: false,
270
- transformFunction: null
271
- },
272
263
  rowIndex: {
273
264
  classPropertyName: "rowIndex",
274
265
  publicName: "rowIndex",
@@ -278,8 +269,11 @@ class GridRow {
278
269
  }
279
270
  },
280
271
  host: {
272
+ attributes: {
273
+ "role": "row"
274
+ },
281
275
  properties: {
282
- "attr.role": "role()"
276
+ "attr.aria-rowindex": "_pattern.rowIndex()"
283
277
  },
284
278
  classAttribute: "grid-row"
285
279
  },
@@ -305,23 +299,31 @@ i0.ɵɵngDeclareClassMetadata({
305
299
  exportAs: 'ngGridRow',
306
300
  host: {
307
301
  'class': 'grid-row',
308
- '[attr.role]': 'role()'
302
+ 'role': 'row',
303
+ '[attr.aria-rowindex]': '_pattern.rowIndex()'
309
304
  }
310
305
  }]
311
306
  }]
312
307
  });
313
308
  class GridCell {
314
309
  _elementRef = inject(ElementRef);
315
- _widgets = contentChild(GridCellWidget, ...(ngDevMode ? [{
316
- debugName: "_widgets"
310
+ element = this._elementRef.nativeElement;
311
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
312
+ debugName: "active"
317
313
  }] : []));
318
- _widgetPattern = computed(() => this._widgets()?._pattern, ...(ngDevMode ? [{
319
- debugName: "_widgetPattern"
314
+ _widgets = contentChildren(GridCellWidget, ...(ngDevMode ? [{
315
+ debugName: "_widgets",
316
+ descendants: true
317
+ }] : [{
318
+ descendants: true
319
+ }]));
320
+ _widgetPatterns = computed(() => this._widgets().map(w => w._pattern), ...(ngDevMode ? [{
321
+ debugName: "_widgetPatterns"
320
322
  }] : []));
321
323
  _row = inject(GridRow);
322
- _id = inject(_IdGenerator).getId('ng-grid-cell-', true);
323
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
324
- debugName: "element"
324
+ textDirection = inject(Directionality).valueSignal;
325
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-', true), ...(ngDevMode ? [{
326
+ debugName: "id"
325
327
  }] : []));
326
328
  role = input('gridcell', ...(ngDevMode ? [{
327
329
  debugName: "role"
@@ -350,13 +352,41 @@ class GridCell {
350
352
  selectable = input(true, ...(ngDevMode ? [{
351
353
  debugName: "selectable"
352
354
  }] : []));
355
+ orientation = input('horizontal', ...(ngDevMode ? [{
356
+ debugName: "orientation"
357
+ }] : []));
358
+ wrap = input(true, ...(ngDevMode ? [{
359
+ debugName: "wrap",
360
+ transform: booleanAttribute
361
+ }] : [{
362
+ transform: booleanAttribute
363
+ }]));
364
+ tabindex = input(...(ngDevMode ? [undefined, {
365
+ debugName: "tabindex"
366
+ }] : []));
367
+ _tabIndex = computed(() => this.tabindex() ?? this._pattern.tabIndex(), ...(ngDevMode ? [{
368
+ debugName: "_tabIndex"
369
+ }] : []));
353
370
  _pattern = new GridCellPattern({
354
371
  ...this,
355
- id: () => this._id,
356
- grid: this._row.grid,
372
+ grid: this._row._gridPattern,
357
373
  row: () => this._row._pattern,
358
- widget: this._widgetPattern
374
+ widgets: this._widgetPatterns,
375
+ getWidget: e => this._getWidget(e),
376
+ element: () => this.element
359
377
  });
378
+ constructor() {}
379
+ _getWidget(element) {
380
+ let target = element;
381
+ while (target) {
382
+ const pattern = this._widgetPatterns().find(w => w.element() === target);
383
+ if (pattern) {
384
+ return pattern;
385
+ }
386
+ target = target.parentElement?.closest('[ngGridCellWidget]');
387
+ }
388
+ return undefined;
389
+ }
360
390
  static ɵfac = i0.ɵɵngDeclareFactory({
361
391
  minVersion: "12.0.0",
362
392
  version: "20.2.0-next.2",
@@ -372,6 +402,13 @@ class GridCell {
372
402
  isStandalone: true,
373
403
  selector: "[ngGridCell]",
374
404
  inputs: {
405
+ id: {
406
+ classPropertyName: "id",
407
+ publicName: "id",
408
+ isSignal: true,
409
+ isRequired: false,
410
+ transformFunction: null
411
+ },
375
412
  role: {
376
413
  classPropertyName: "role",
377
414
  publicName: "role",
@@ -427,6 +464,27 @@ class GridCell {
427
464
  isSignal: true,
428
465
  isRequired: false,
429
466
  transformFunction: null
467
+ },
468
+ orientation: {
469
+ classPropertyName: "orientation",
470
+ publicName: "orientation",
471
+ isSignal: true,
472
+ isRequired: false,
473
+ transformFunction: null
474
+ },
475
+ wrap: {
476
+ classPropertyName: "wrap",
477
+ publicName: "wrap",
478
+ isSignal: true,
479
+ isRequired: false,
480
+ transformFunction: null
481
+ },
482
+ tabindex: {
483
+ classPropertyName: "tabindex",
484
+ publicName: "tabindex",
485
+ isSignal: true,
486
+ isRequired: false,
487
+ transformFunction: null
430
488
  }
431
489
  },
432
490
  outputs: {
@@ -438,7 +496,7 @@ class GridCell {
438
496
  "attr.id": "_pattern.id()",
439
497
  "attr.rowspan": "_pattern.rowSpan()",
440
498
  "attr.colspan": "_pattern.colSpan()",
441
- "attr.data-active": "_pattern.active()",
499
+ "attr.data-active": "active()",
442
500
  "attr.data-anchor": "_pattern.anchor()",
443
501
  "attr.aria-disabled": "_pattern.disabled()",
444
502
  "attr.aria-rowspan": "_pattern.rowSpan()",
@@ -446,13 +504,12 @@ class GridCell {
446
504
  "attr.aria-rowindex": "_pattern.ariaRowIndex()",
447
505
  "attr.aria-colindex": "_pattern.ariaColIndex()",
448
506
  "attr.aria-selected": "_pattern.ariaSelected()",
449
- "tabindex": "_pattern.tabIndex()"
507
+ "tabindex": "_tabIndex()"
450
508
  },
451
509
  classAttribute: "grid-cell"
452
510
  },
453
511
  queries: [{
454
512
  propertyName: "_widgets",
455
- first: true,
456
513
  predicate: GridCellWidget,
457
514
  descendants: true,
458
515
  isSignal: true
@@ -477,7 +534,7 @@ i0.ɵɵngDeclareClassMetadata({
477
534
  '[attr.id]': '_pattern.id()',
478
535
  '[attr.rowspan]': '_pattern.rowSpan()',
479
536
  '[attr.colspan]': '_pattern.colSpan()',
480
- '[attr.data-active]': '_pattern.active()',
537
+ '[attr.data-active]': 'active()',
481
538
  '[attr.data-anchor]': '_pattern.anchor()',
482
539
  '[attr.aria-disabled]': '_pattern.disabled()',
483
540
  '[attr.aria-rowspan]': '_pattern.rowSpan()',
@@ -485,26 +542,75 @@ i0.ɵɵngDeclareClassMetadata({
485
542
  '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',
486
543
  '[attr.aria-colindex]': '_pattern.ariaColIndex()',
487
544
  '[attr.aria-selected]': '_pattern.ariaSelected()',
488
- '[tabindex]': '_pattern.tabIndex()'
545
+ '[tabindex]': '_tabIndex()'
489
546
  }
490
547
  }]
491
- }]
548
+ }],
549
+ ctorParameters: () => []
492
550
  });
493
551
  class GridCellWidget {
494
552
  _elementRef = inject(ElementRef);
553
+ element = this._elementRef.nativeElement;
554
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
555
+ debugName: "active"
556
+ }] : []));
495
557
  _cell = inject(GridCell);
496
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
497
- debugName: "element"
558
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true), ...(ngDevMode ? [{
559
+ debugName: "id"
560
+ }] : []));
561
+ widgetType = input('simple', ...(ngDevMode ? [{
562
+ debugName: "widgetType"
563
+ }] : []));
564
+ disabled = input(false, ...(ngDevMode ? [{
565
+ debugName: "disabled",
566
+ transform: booleanAttribute
567
+ }] : [{
568
+ transform: booleanAttribute
569
+ }]));
570
+ focusTarget = input(...(ngDevMode ? [undefined, {
571
+ debugName: "focusTarget"
572
+ }] : []));
573
+ onActivate = output();
574
+ onDeactivate = output();
575
+ tabindex = input(...(ngDevMode ? [undefined, {
576
+ debugName: "tabindex"
498
577
  }] : []));
499
- activate = model(false, ...(ngDevMode ? [{
500
- debugName: "activate"
578
+ _tabIndex = computed(() => this.tabindex() ?? (this.focusTarget() ? -1 : this._pattern.tabIndex()), ...(ngDevMode ? [{
579
+ debugName: "_tabIndex"
501
580
  }] : []));
502
581
  _pattern = new GridCellWidgetPattern({
503
582
  ...this,
504
- cell: () => this._cell._pattern
583
+ element: () => this.element,
584
+ cell: () => this._cell._pattern,
585
+ focusTarget: computed(() => {
586
+ if (this.focusTarget() instanceof ElementRef) {
587
+ return this.focusTarget().nativeElement;
588
+ }
589
+ return this.focusTarget();
590
+ })
505
591
  });
506
- focus() {
507
- this.element().focus();
592
+ get isActivated() {
593
+ return this._pattern.isActivated.asReadonly();
594
+ }
595
+ constructor() {
596
+ afterRenderEffect(() => {
597
+ const activateEvent = this._pattern.lastActivateEvent();
598
+ if (activateEvent) {
599
+ this.onActivate.emit(activateEvent);
600
+ }
601
+ });
602
+ afterRenderEffect(() => {
603
+ const deactivateEvent = this._pattern.lastDeactivateEvent();
604
+ if (deactivateEvent) {
605
+ this.onDeactivate.emit(deactivateEvent);
606
+ }
607
+ });
608
+ }
609
+ activate() {
610
+ this._pattern.activate();
611
+ }
612
+ deactivate() {
613
+ this._pattern.deactivate();
508
614
  }
509
615
  static ɵfac = i0.ɵɵngDeclareFactory({
510
616
  minVersion: "12.0.0",
@@ -521,21 +627,51 @@ class GridCellWidget {
521
627
  isStandalone: true,
522
628
  selector: "[ngGridCellWidget]",
523
629
  inputs: {
524
- activate: {
525
- classPropertyName: "activate",
526
- publicName: "activate",
630
+ id: {
631
+ classPropertyName: "id",
632
+ publicName: "id",
633
+ isSignal: true,
634
+ isRequired: false,
635
+ transformFunction: null
636
+ },
637
+ widgetType: {
638
+ classPropertyName: "widgetType",
639
+ publicName: "widgetType",
640
+ isSignal: true,
641
+ isRequired: false,
642
+ transformFunction: null
643
+ },
644
+ disabled: {
645
+ classPropertyName: "disabled",
646
+ publicName: "disabled",
647
+ isSignal: true,
648
+ isRequired: false,
649
+ transformFunction: null
650
+ },
651
+ focusTarget: {
652
+ classPropertyName: "focusTarget",
653
+ publicName: "focusTarget",
654
+ isSignal: true,
655
+ isRequired: false,
656
+ transformFunction: null
657
+ },
658
+ tabindex: {
659
+ classPropertyName: "tabindex",
660
+ publicName: "tabindex",
527
661
  isSignal: true,
528
662
  isRequired: false,
529
663
  transformFunction: null
530
664
  }
531
665
  },
532
666
  outputs: {
533
- activate: "activateChange"
667
+ onActivate: "onActivate",
668
+ onDeactivate: "onDeactivate"
534
669
  },
535
670
  host: {
536
671
  properties: {
537
- "attr.data-active": "_pattern.active()",
538
- "tabindex": "_pattern.tabIndex()"
672
+ "attr.data-active": "active()",
673
+ "attr.data-active-control": "isActivated() ? \"widget\" : \"cell\"",
674
+ "tabindex": "_tabIndex()"
539
675
  },
540
676
  classAttribute: "grid-cell-widget"
541
677
  },
@@ -555,11 +691,13 @@ i0.ɵɵngDeclareClassMetadata({
555
691
  exportAs: 'ngGridCellWidget',
556
692
  host: {
557
693
  'class': 'grid-cell-widget',
558
- '[attr.data-active]': '_pattern.active()',
559
- '[tabindex]': '_pattern.tabIndex()'
694
+ '[attr.data-active]': 'active()',
695
+ '[attr.data-active-control]': 'isActivated() ? "widget" : "cell"',
696
+ '[tabindex]': '_tabIndex()'
560
697
  }
561
698
  }]
562
- }]
699
+ }],
700
+ ctorParameters: () => []
563
701
  });
564
702
 
565
703
  export { Grid, GridCell, GridCellWidget, GridRow };
@@ -1 +1 @@
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,EAAEC;GAAgB,CAAA,GAAA,CAA5B;AAACD,IAAAA,SAAS,EAAEC;GAAiB,GAAC;EAGtDE,YAAY,GAAGJ,KAAK,CAAC,IAAI;;AAAGC,IAAAA,SAAS,EAAEC;GAAgB,CAAA,GAAA,CAA5B;AAACD,IAAAA,SAAS,EAAEC;GAAiB,GAAC;EAGzD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AA,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;;;;;;"}
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 contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n output,\n model,\n Signal,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern} from '../private';\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 * @developerPreview 21.0\n */\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 /** A reference to the host element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\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 /** 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 /** 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 element: () => this.element,\n });\n\n constructor() {\n afterRenderEffect(() => this._pattern.setDefaultStateEffect());\n afterRenderEffect(() => this._pattern.resetStateEffect());\n afterRenderEffect(() => this._pattern.resetFocusEffect());\n afterRenderEffect(() => this._pattern.restoreFocusEffect());\n afterRenderEffect(() => this._pattern.focusEffect());\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/**\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 * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'class': 'grid-row',\n 'role': 'row',\n '[attr.aria-rowindex]': '_pattern.rowIndex()',\n },\n})\nexport class GridRow {\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 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 _gridPattern = computed(() => 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\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 * @developerPreview 21.0\n */\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]': '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]': '_tabIndex()',\n },\n})\nexport class GridCell {\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 cell is currently active (focused). */\n readonly active = computed(() => this._pattern.active());\n\n /** The widgets contained within this cell, if any. */\n private readonly _widgets = contentChildren(GridCellWidget, {descendants: true});\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPatterns: Signal<GridCellWidgetPattern[]> = computed(() =>\n this._widgets().map(w => w._pattern),\n );\n\n /** The parent row. */\n private readonly _row = inject(GridRow);\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 /** Orientation of the widgets in the cell. */\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** Whether widgets navigation wraps. */\n readonly wrap = input(true, {transform: booleanAttribute});\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 widgets: this._widgetPatterns,\n getWidget: e => this._getWidget(e),\n element: () => this.element,\n });\n\n constructor() {}\n\n /** Gets the cell widget pattern for a given element. */\n private _getWidget(element: Element | null | undefined): GridCellWidgetPattern | undefined {\n let target = element;\n\n while (target) {\n const pattern = this._widgetPatterns().find(w => w.element() === target);\n if (pattern) {\n return pattern;\n }\n\n target = target.parentElement?.closest('[ngGridCellWidget]');\n }\n\n return undefined;\n }\n}\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 * @developerPreview 21.0\n */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n 'class': 'grid-cell-widget',\n '[attr.data-active]': 'active()',\n '[attr.data-active-control]': 'isActivated() ? \"widget\" : \"cell\"',\n '[tabindex]': '_tabIndex()',\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(GridCell);\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<ElementRef | HTMLElement | undefined>();\n\n /** Emits when the widget is activated. */\n readonly onActivate = output<KeyboardEvent | FocusEvent | undefined>();\n\n /** Emits when the widget is deactivated. */\n readonly onDeactivate = 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.focusTarget() ? -1 : 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 focusTarget: computed(() => {\n if (this.focusTarget() instanceof ElementRef) {\n return (this.focusTarget() as ElementRef).nativeElement;\n }\n return this.focusTarget();\n }),\n });\n\n /** Whether the widget is activated. */\n get isActivated(): Signal<boolean> {\n return this._pattern.isActivated.asReadonly();\n }\n\n constructor() {\n afterRenderEffect(() => {\n const activateEvent = this._pattern.lastActivateEvent();\n if (activateEvent) {\n this.onActivate.emit(activateEvent);\n }\n });\n\n afterRenderEffect(() => {\n const deactivateEvent = this._pattern.lastDeactivateEvent();\n if (deactivateEvent) {\n this.onDeactivate.emit(deactivateEvent);\n }\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"],"names":["Grid","_elementRef","inject","ElementRef","element","nativeElement","_rows","contentChildren","GridRow","descendants","_rowPatterns","computed","map","r","_pattern","ngDevMode","debugName","textDirection","Directionality","valueSignal","enableSelection","input","transform","booleanAttribute","disabled","softDisabled","focusMode","rowWrap","colWrap","multi","selectionMode","enableRangeSelection","GridPattern","rows","getCell","e","_getCell","constructor","afterRenderEffect","setDefaultStateEffect","resetStateEffect","resetFocusEffect","restoreFocusEffect","focusEffect","target","row","cell","inputs","cells","parentElement","closest","undefined","deps","i0","ɵɵFactoryTarget","Directive","ɵdir","ɵɵngDeclareDirective","minVersion","version","type","isSignal","exportAs","ngImport","decorators","args","selector","host","_cells","GridCell","_cellPatterns","c","_grid","_gridPattern","rowIndex","GridRowPattern","grid","active","_widgets","GridCellWidget","_widgetPatterns","w","_row","id","_IdGenerator","getId","role","rowSpan","colSpan","colIndex","selected","model","selectable","orientation","wrap","tabindex","_tabIndex","tabIndex","GridCellPattern","widgets","getWidget","_getWidget","pattern","find","_cell","widgetType","focusTarget","onActivate","output","onDeactivate","GridCellWidgetPattern","isActivated","asReadonly","activateEvent","lastActivateEvent","emit","deactivateEvent","lastDeactivateEvent","activate","deactivate","isStandalone","classPropertyName","publicName","isRequired","transformFunction","outputs","properties","classAttribute"],"mappings":";;;;;;MA+DaA,IAAI,CAAA;AAEEC,EAAAA,WAAW,GAAGC,MAAM,CAACC,UAAU,CAAC;AAGxCC,EAAAA,OAAO,GAAG,I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