@angular/aria 21.0.0-rc.0 → 21.0.0-rc.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.
Files changed (48) hide show
  1. package/_adev_assets/aria-accordion.json +443 -59
  2. package/_adev_assets/aria-combobox.json +345 -37
  3. package/_adev_assets/aria-grid.json +408 -71
  4. package/_adev_assets/aria-listbox.json +115 -35
  5. package/_adev_assets/aria-menu.json +492 -167
  6. package/_adev_assets/aria-tabs.json +272 -88
  7. package/_adev_assets/aria-toolbar.json +151 -133
  8. package/_adev_assets/aria-tree.json +182 -35
  9. package/fesm2022/_widget-chunk.mjs +643 -190
  10. package/fesm2022/_widget-chunk.mjs.map +1 -1
  11. package/fesm2022/accordion.mjs +129 -77
  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 +140 -27
  16. package/fesm2022/combobox.mjs.map +1 -1
  17. package/fesm2022/grid.mjs +254 -68
  18. package/fesm2022/grid.mjs.map +1 -1
  19. package/fesm2022/listbox.mjs +54 -44
  20. package/fesm2022/listbox.mjs.map +1 -1
  21. package/fesm2022/menu.mjs +270 -108
  22. package/fesm2022/menu.mjs.map +1 -1
  23. package/fesm2022/private.mjs +752 -785
  24. package/fesm2022/private.mjs.map +1 -1
  25. package/fesm2022/tabs.mjs +101 -71
  26. package/fesm2022/tabs.mjs.map +1 -1
  27. package/fesm2022/toolbar.mjs +87 -64
  28. package/fesm2022/toolbar.mjs.map +1 -1
  29. package/fesm2022/tree.mjs +105 -60
  30. package/fesm2022/tree.mjs.map +1 -1
  31. package/package.json +2 -10
  32. package/types/_grid-chunk.d.ts +326 -83
  33. package/types/accordion.d.ts +134 -35
  34. package/types/combobox.d.ts +146 -13
  35. package/types/grid.d.ts +159 -32
  36. package/types/listbox.d.ts +59 -28
  37. package/types/menu.d.ts +151 -55
  38. package/types/private.d.ts +449 -567
  39. package/types/tabs.d.ts +121 -41
  40. package/types/toolbar.d.ts +74 -51
  41. package/types/tree.d.ts +116 -45
  42. package/_adev_assets/aria-radio-group.json +0 -389
  43. package/fesm2022/deferred-content.mjs +0 -99
  44. package/fesm2022/deferred-content.mjs.map +0 -1
  45. package/fesm2022/radio-group.mjs +0 -338
  46. package/fesm2022/radio-group.mjs.map +0 -1
  47. package/types/deferred-content.d.ts +0 -38
  48. package/types/radio-group.d.ts +0 -84
package/fesm2022/grid.mjs CHANGED
@@ -1,19 +1,22 @@
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
+ import { Directionality } from '@angular/cdk/bidi';
4
5
  import { GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern } from './_widget-chunk.mjs';
5
6
 
6
7
  class Grid {
7
8
  _elementRef = inject(ElementRef);
9
+ element = this._elementRef.nativeElement;
8
10
  _rows = contentChildren(GridRow, ...(ngDevMode ? [{
9
- debugName: "_rows"
10
- }] : []));
11
+ debugName: "_rows",
12
+ descendants: true
13
+ }] : [{
14
+ descendants: true
15
+ }]));
11
16
  _rowPatterns = computed(() => this._rows().map(r => r._pattern), ...(ngDevMode ? [{
12
17
  debugName: "_rowPatterns"
13
18
  }] : []));
14
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
15
- debugName: "element"
16
- }] : []));
19
+ textDirection = inject(Directionality).valueSignal;
17
20
  enableSelection = input(false, ...(ngDevMode ? [{
18
21
  debugName: "enableSelection",
19
22
  transform: booleanAttribute
@@ -26,8 +29,8 @@ class Grid {
26
29
  }] : [{
27
30
  transform: booleanAttribute
28
31
  }]));
29
- skipDisabled = input(true, ...(ngDevMode ? [{
30
- debugName: "skipDisabled",
32
+ softDisabled = input(true, ...(ngDevMode ? [{
33
+ debugName: "softDisabled",
31
34
  transform: booleanAttribute
32
35
  }] : [{
33
36
  transform: booleanAttribute
@@ -41,27 +44,47 @@ class Grid {
41
44
  colWrap = input('loop', ...(ngDevMode ? [{
42
45
  debugName: "colWrap"
43
46
  }] : []));
47
+ multi = input(false, ...(ngDevMode ? [{
48
+ debugName: "multi",
49
+ transform: booleanAttribute
50
+ }] : [{
51
+ transform: booleanAttribute
52
+ }]));
53
+ selectionMode = input('follow', ...(ngDevMode ? [{
54
+ debugName: "selectionMode"
55
+ }] : []));
56
+ enableRangeSelection = input(false, ...(ngDevMode ? [{
57
+ debugName: "enableRangeSelection",
58
+ transform: booleanAttribute
59
+ }] : [{
60
+ transform: booleanAttribute
61
+ }]));
44
62
  _pattern = new GridPattern({
45
63
  ...this,
46
64
  rows: this._rowPatterns,
47
- getCell: e => this._getCell(e)
65
+ getCell: e => this._getCell(e),
66
+ element: () => this.element
48
67
  });
49
68
  constructor() {
69
+ afterRenderEffect(() => this._pattern.setDefaultStateEffect());
50
70
  afterRenderEffect(() => this._pattern.resetStateEffect());
71
+ afterRenderEffect(() => this._pattern.resetFocusEffect());
72
+ afterRenderEffect(() => this._pattern.restoreFocusEffect());
51
73
  afterRenderEffect(() => this._pattern.focusEffect());
52
74
  }
53
75
  _getCell(element) {
54
- const cellElement = element.closest('[ngGridCell]');
55
- if (cellElement === undefined) return;
56
- const widgetElement = element.closest('[ngGridCellWidget]');
57
- for (const row of this._rowPatterns()) {
58
- for (const cell of row.inputs.cells()) {
59
- if (cell.element() === cellElement || widgetElement !== undefined && cell.element() === widgetElement) {
60
- 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
+ }
61
83
  }
62
84
  }
85
+ target = target.parentElement?.closest('[ngGridCell]');
63
86
  }
64
- return;
87
+ return undefined;
65
88
  }
66
89
  static ɵfac = i0.ɵɵngDeclareFactory({
67
90
  minVersion: "12.0.0",
@@ -92,9 +115,9 @@ class Grid {
92
115
  isRequired: false,
93
116
  transformFunction: null
94
117
  },
95
- skipDisabled: {
96
- classPropertyName: "skipDisabled",
97
- publicName: "skipDisabled",
118
+ softDisabled: {
119
+ classPropertyName: "softDisabled",
120
+ publicName: "softDisabled",
98
121
  isSignal: true,
99
122
  isRequired: false,
100
123
  transformFunction: null
@@ -119,6 +142,27 @@ class Grid {
119
142
  isSignal: true,
120
143
  isRequired: false,
121
144
  transformFunction: null
145
+ },
146
+ multi: {
147
+ classPropertyName: "multi",
148
+ publicName: "multi",
149
+ isSignal: true,
150
+ isRequired: false,
151
+ transformFunction: null
152
+ },
153
+ selectionMode: {
154
+ classPropertyName: "selectionMode",
155
+ publicName: "selectionMode",
156
+ isSignal: true,
157
+ isRequired: false,
158
+ transformFunction: null
159
+ },
160
+ enableRangeSelection: {
161
+ classPropertyName: "enableRangeSelection",
162
+ publicName: "enableRangeSelection",
163
+ isSignal: true,
164
+ isRequired: false,
165
+ transformFunction: null
122
166
  }
123
167
  },
124
168
  host: {
@@ -143,6 +187,7 @@ class Grid {
143
187
  queries: [{
144
188
  propertyName: "_rows",
145
189
  predicate: GridRow,
190
+ descendants: true,
146
191
  isSignal: true
147
192
  }],
148
193
  exportAs: ["ngGrid"],
@@ -178,9 +223,13 @@ i0.ɵɵngDeclareClassMetadata({
178
223
  });
179
224
  class GridRow {
180
225
  _elementRef = inject(ElementRef);
226
+ element = this._elementRef.nativeElement;
181
227
  _cells = contentChildren(GridCell, ...(ngDevMode ? [{
182
- debugName: "_cells"
183
- }] : []));
228
+ debugName: "_cells",
229
+ descendants: true
230
+ }] : [{
231
+ descendants: true
232
+ }]));
184
233
  _cellPatterns = computed(() => this._cells().map(c => c._pattern), ...(ngDevMode ? [{
185
234
  debugName: "_cellPatterns"
186
235
  }] : []));
@@ -188,12 +237,6 @@ class GridRow {
188
237
  grid = computed(() => this._grid._pattern, ...(ngDevMode ? [{
189
238
  debugName: "grid"
190
239
  }] : []));
191
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
192
- debugName: "element"
193
- }] : []));
194
- role = input('row', ...(ngDevMode ? [{
195
- debugName: "role"
196
- }] : []));
197
240
  rowIndex = input(...(ngDevMode ? [undefined, {
198
241
  debugName: "rowIndex"
199
242
  }] : []));
@@ -216,13 +259,6 @@ class GridRow {
216
259
  isStandalone: true,
217
260
  selector: "[ngGridRow]",
218
261
  inputs: {
219
- role: {
220
- classPropertyName: "role",
221
- publicName: "role",
222
- isSignal: true,
223
- isRequired: false,
224
- transformFunction: null
225
- },
226
262
  rowIndex: {
227
263
  classPropertyName: "rowIndex",
228
264
  publicName: "rowIndex",
@@ -232,14 +268,18 @@ class GridRow {
232
268
  }
233
269
  },
234
270
  host: {
271
+ attributes: {
272
+ "role": "row"
273
+ },
235
274
  properties: {
236
- "attr.role": "role()"
275
+ "attr.aria-rowindex": "_pattern.rowIndex()"
237
276
  },
238
277
  classAttribute: "grid-row"
239
278
  },
240
279
  queries: [{
241
280
  propertyName: "_cells",
242
281
  predicate: GridCell,
282
+ descendants: true,
243
283
  isSignal: true
244
284
  }],
245
285
  exportAs: ["ngGridRow"],
@@ -258,23 +298,31 @@ i0.ɵɵngDeclareClassMetadata({
258
298
  exportAs: 'ngGridRow',
259
299
  host: {
260
300
  'class': 'grid-row',
261
- '[attr.role]': 'role()'
301
+ 'role': 'row',
302
+ '[attr.aria-rowindex]': '_pattern.rowIndex()'
262
303
  }
263
304
  }]
264
305
  }]
265
306
  });
266
307
  class GridCell {
267
308
  _elementRef = inject(ElementRef);
268
- _widgets = contentChild(GridCellWidget, ...(ngDevMode ? [{
269
- debugName: "_widgets"
309
+ element = this._elementRef.nativeElement;
310
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
311
+ debugName: "active"
270
312
  }] : []));
271
- _widgetPattern = computed(() => this._widgets()?._pattern, ...(ngDevMode ? [{
272
- debugName: "_widgetPattern"
313
+ _widgets = contentChildren(GridCellWidget, ...(ngDevMode ? [{
314
+ debugName: "_widgets",
315
+ descendants: true
316
+ }] : [{
317
+ descendants: true
318
+ }]));
319
+ _widgetPatterns = computed(() => this._widgets().map(w => w._pattern), ...(ngDevMode ? [{
320
+ debugName: "_widgetPatterns"
273
321
  }] : []));
274
322
  _row = inject(GridRow);
275
- _id = inject(_IdGenerator).getId('ng-grid-cell-');
276
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
277
- debugName: "element"
323
+ textDirection = inject(Directionality).valueSignal;
324
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-', true), ...(ngDevMode ? [{
325
+ debugName: "id"
278
326
  }] : []));
279
327
  role = input('gridcell', ...(ngDevMode ? [{
280
328
  debugName: "role"
@@ -303,13 +351,41 @@ class GridCell {
303
351
  selectable = input(true, ...(ngDevMode ? [{
304
352
  debugName: "selectable"
305
353
  }] : []));
354
+ orientation = input('horizontal', ...(ngDevMode ? [{
355
+ debugName: "orientation"
356
+ }] : []));
357
+ wrap = input(true, ...(ngDevMode ? [{
358
+ debugName: "wrap",
359
+ transform: booleanAttribute
360
+ }] : [{
361
+ transform: booleanAttribute
362
+ }]));
363
+ tabindex = input(...(ngDevMode ? [undefined, {
364
+ debugName: "tabindex"
365
+ }] : []));
366
+ _tabIndex = computed(() => this.tabindex() ?? this._pattern.tabIndex(), ...(ngDevMode ? [{
367
+ debugName: "_tabIndex"
368
+ }] : []));
306
369
  _pattern = new GridCellPattern({
307
370
  ...this,
308
- id: () => this._id,
309
371
  grid: this._row.grid,
310
372
  row: () => this._row._pattern,
311
- widget: this._widgetPattern
373
+ widgets: this._widgetPatterns,
374
+ getWidget: e => this._getWidget(e),
375
+ element: () => this.element
312
376
  });
377
+ constructor() {}
378
+ _getWidget(element) {
379
+ let target = element;
380
+ while (target) {
381
+ const pattern = this._widgetPatterns().find(w => w.element() === target);
382
+ if (pattern) {
383
+ return pattern;
384
+ }
385
+ target = target.parentElement?.closest('[ngGridCellWidget]');
386
+ }
387
+ return undefined;
388
+ }
313
389
  static ɵfac = i0.ɵɵngDeclareFactory({
314
390
  minVersion: "12.0.0",
315
391
  version: "20.2.0-next.2",
@@ -325,6 +401,13 @@ class GridCell {
325
401
  isStandalone: true,
326
402
  selector: "[ngGridCell]",
327
403
  inputs: {
404
+ id: {
405
+ classPropertyName: "id",
406
+ publicName: "id",
407
+ isSignal: true,
408
+ isRequired: false,
409
+ transformFunction: null
410
+ },
328
411
  role: {
329
412
  classPropertyName: "role",
330
413
  publicName: "role",
@@ -380,6 +463,27 @@ class GridCell {
380
463
  isSignal: true,
381
464
  isRequired: false,
382
465
  transformFunction: null
466
+ },
467
+ orientation: {
468
+ classPropertyName: "orientation",
469
+ publicName: "orientation",
470
+ isSignal: true,
471
+ isRequired: false,
472
+ transformFunction: null
473
+ },
474
+ wrap: {
475
+ classPropertyName: "wrap",
476
+ publicName: "wrap",
477
+ isSignal: true,
478
+ isRequired: false,
479
+ transformFunction: null
480
+ },
481
+ tabindex: {
482
+ classPropertyName: "tabindex",
483
+ publicName: "tabindex",
484
+ isSignal: true,
485
+ isRequired: false,
486
+ transformFunction: null
383
487
  }
384
488
  },
385
489
  outputs: {
@@ -391,20 +495,20 @@ class GridCell {
391
495
  "attr.id": "_pattern.id()",
392
496
  "attr.rowspan": "_pattern.rowSpan()",
393
497
  "attr.colspan": "_pattern.colSpan()",
394
- "attr.data-active": "_pattern.active()",
498
+ "attr.data-active": "active()",
499
+ "attr.data-anchor": "_pattern.anchor()",
395
500
  "attr.aria-disabled": "_pattern.disabled()",
396
501
  "attr.aria-rowspan": "_pattern.rowSpan()",
397
502
  "attr.aria-colspan": "_pattern.colSpan()",
398
503
  "attr.aria-rowindex": "_pattern.ariaRowIndex()",
399
504
  "attr.aria-colindex": "_pattern.ariaColIndex()",
400
505
  "attr.aria-selected": "_pattern.ariaSelected()",
401
- "tabindex": "_pattern.tabIndex()"
506
+ "tabindex": "_tabIndex()"
402
507
  },
403
508
  classAttribute: "grid-cell"
404
509
  },
405
510
  queries: [{
406
511
  propertyName: "_widgets",
407
- first: true,
408
512
  predicate: GridCellWidget,
409
513
  descendants: true,
410
514
  isSignal: true
@@ -429,33 +533,83 @@ i0.ɵɵngDeclareClassMetadata({
429
533
  '[attr.id]': '_pattern.id()',
430
534
  '[attr.rowspan]': '_pattern.rowSpan()',
431
535
  '[attr.colspan]': '_pattern.colSpan()',
432
- '[attr.data-active]': '_pattern.active()',
536
+ '[attr.data-active]': 'active()',
537
+ '[attr.data-anchor]': '_pattern.anchor()',
433
538
  '[attr.aria-disabled]': '_pattern.disabled()',
434
539
  '[attr.aria-rowspan]': '_pattern.rowSpan()',
435
540
  '[attr.aria-colspan]': '_pattern.colSpan()',
436
541
  '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',
437
542
  '[attr.aria-colindex]': '_pattern.ariaColIndex()',
438
543
  '[attr.aria-selected]': '_pattern.ariaSelected()',
439
- '[tabindex]': '_pattern.tabIndex()'
544
+ '[tabindex]': '_tabIndex()'
440
545
  }
441
546
  }]
442
- }]
547
+ }],
548
+ ctorParameters: () => []
443
549
  });
444
550
  class GridCellWidget {
445
551
  _elementRef = inject(ElementRef);
552
+ element = this._elementRef.nativeElement;
553
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
554
+ debugName: "active"
555
+ }] : []));
446
556
  _cell = inject(GridCell);
447
- element = computed(() => this._elementRef.nativeElement, ...(ngDevMode ? [{
448
- debugName: "element"
557
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true), ...(ngDevMode ? [{
558
+ debugName: "id"
559
+ }] : []));
560
+ widgetType = input('simple', ...(ngDevMode ? [{
561
+ debugName: "widgetType"
562
+ }] : []));
563
+ disabled = input(false, ...(ngDevMode ? [{
564
+ debugName: "disabled",
565
+ transform: booleanAttribute
566
+ }] : [{
567
+ transform: booleanAttribute
568
+ }]));
569
+ focusTarget = input(...(ngDevMode ? [undefined, {
570
+ debugName: "focusTarget"
571
+ }] : []));
572
+ onActivate = output();
573
+ onDeactivate = output();
574
+ tabindex = input(...(ngDevMode ? [undefined, {
575
+ debugName: "tabindex"
449
576
  }] : []));
450
- activate = model(false, ...(ngDevMode ? [{
451
- debugName: "activate"
577
+ _tabIndex = computed(() => this.tabindex() ?? (this.focusTarget() ? -1 : this._pattern.tabIndex()), ...(ngDevMode ? [{
578
+ debugName: "_tabIndex"
452
579
  }] : []));
453
580
  _pattern = new GridCellWidgetPattern({
454
581
  ...this,
455
- cell: () => this._cell._pattern
582
+ element: () => this.element,
583
+ cell: () => this._cell._pattern,
584
+ focusTarget: computed(() => {
585
+ if (this.focusTarget() instanceof ElementRef) {
586
+ return this.focusTarget().nativeElement;
587
+ }
588
+ return this.focusTarget();
589
+ })
456
590
  });
457
- focus() {
458
- this.element().focus();
591
+ get isActivated() {
592
+ return this._pattern.isActivated.asReadonly();
593
+ }
594
+ constructor() {
595
+ afterRenderEffect(() => {
596
+ const activateEvent = this._pattern.lastActivateEvent();
597
+ if (activateEvent) {
598
+ this.onActivate.emit(activateEvent);
599
+ }
600
+ });
601
+ afterRenderEffect(() => {
602
+ const deactivateEvent = this._pattern.lastDeactivateEvent();
603
+ if (deactivateEvent) {
604
+ this.onDeactivate.emit(deactivateEvent);
605
+ }
606
+ });
607
+ }
608
+ activate() {
609
+ this._pattern.activate();
610
+ }
611
+ deactivate() {
612
+ this._pattern.deactivate();
459
613
  }
460
614
  static ɵfac = i0.ɵɵngDeclareFactory({
461
615
  minVersion: "12.0.0",
@@ -472,21 +626,51 @@ class GridCellWidget {
472
626
  isStandalone: true,
473
627
  selector: "[ngGridCellWidget]",
474
628
  inputs: {
475
- activate: {
476
- classPropertyName: "activate",
477
- publicName: "activate",
629
+ id: {
630
+ classPropertyName: "id",
631
+ publicName: "id",
632
+ isSignal: true,
633
+ isRequired: false,
634
+ transformFunction: null
635
+ },
636
+ widgetType: {
637
+ classPropertyName: "widgetType",
638
+ publicName: "widgetType",
639
+ isSignal: true,
640
+ isRequired: false,
641
+ transformFunction: null
642
+ },
643
+ disabled: {
644
+ classPropertyName: "disabled",
645
+ publicName: "disabled",
646
+ isSignal: true,
647
+ isRequired: false,
648
+ transformFunction: null
649
+ },
650
+ focusTarget: {
651
+ classPropertyName: "focusTarget",
652
+ publicName: "focusTarget",
653
+ isSignal: true,
654
+ isRequired: false,
655
+ transformFunction: null
656
+ },
657
+ tabindex: {
658
+ classPropertyName: "tabindex",
659
+ publicName: "tabindex",
478
660
  isSignal: true,
479
661
  isRequired: false,
480
662
  transformFunction: null
481
663
  }
482
664
  },
483
665
  outputs: {
484
- activate: "activateChange"
666
+ onActivate: "onActivate",
667
+ onDeactivate: "onDeactivate"
485
668
  },
486
669
  host: {
487
670
  properties: {
488
- "attr.data-active": "_pattern.active()",
489
- "tabindex": "_pattern.tabIndex()"
671
+ "attr.data-active": "active()",
672
+ "attr.data-active-control": "isActivated() ? \"widget\" : \"cell\"",
673
+ "tabindex": "_tabIndex()"
490
674
  },
491
675
  classAttribute: "grid-cell-widget"
492
676
  },
@@ -506,11 +690,13 @@ i0.ɵɵngDeclareClassMetadata({
506
690
  exportAs: 'ngGridCellWidget',
507
691
  host: {
508
692
  'class': 'grid-cell-widget',
509
- '[attr.data-active]': '_pattern.active()',
510
- '[tabindex]': '_pattern.tabIndex()'
693
+ '[attr.data-active]': 'active()',
694
+ '[attr.data-active-control]': 'isActivated() ? "widget" : "cell"',
695
+ '[tabindex]': '_tabIndex()'
511
696
  }
512
697
  }]
513
- }]
698
+ }],
699
+ ctorParameters: () => []
514
700
  });
515
701
 
516
702
  export { Grid, GridCell, GridCellWidget, GridRow };
@@ -1 +1 @@
1
- {"version":3,"file":"grid.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/grid/grid.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n contentChild,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n Signal,\n} from '@angular/core';\nimport {GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern} from '../private';\n\n/** A directive that provides grid-based navigation and selection behavior. */\n@Directive({\n selector: '[ngGrid]',\n exportAs: 'ngGrid',\n host: {\n 'class': 'grid',\n 'role': 'grid',\n '[tabindex]': '_pattern.tabIndex()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-activedescendant]': '_pattern.activeDescendant()',\n '(keydown)': '_pattern.onKeydown($event)',\n '(pointerdown)': '_pattern.onPointerdown($event)',\n '(pointermove)': '_pattern.onPointermove($event)',\n '(pointerup)': '_pattern.onPointerup($event)',\n '(focusin)': '_pattern.onFocusIn($event)',\n '(focusout)': '_pattern.onFocusOut($event)',\n },\n})\nexport class Grid {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The rows that make up the grid. */\n private readonly _rows = contentChildren(GridRow);\n\n /** The UI patterns for the rows in the grid. */\n private readonly _rowPatterns: Signal<GridRowPattern[]> = computed(() =>\n this._rows().map(r => r._pattern),\n );\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether selection is enabled for the grid. */\n readonly enableSelection = input(false, {transform: booleanAttribute});\n\n /** Whether the grid is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether to skip disabled items during navigation. */\n readonly skipDisabled = input(true, {transform: booleanAttribute});\n\n /** The focus strategy used by the grid. */\n readonly focusMode = input<'roving' | 'activedescendant'>('roving');\n\n /** The wrapping behavior for keyboard navigation along the row axis. */\n readonly rowWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** The wrapping behavior for keyboard navigation along the column axis. */\n readonly colWrap = input<'continuous' | 'loop' | 'nowrap'>('loop');\n\n /** The UI pattern for the grid. */\n readonly _pattern = new GridPattern({\n ...this,\n rows: this._rowPatterns,\n getCell: e => this._getCell(e),\n });\n\n constructor() {\n afterRenderEffect(() => this._pattern.resetStateEffect());\n afterRenderEffect(() => this._pattern.focusEffect());\n }\n\n /** Gets the cell pattern for a given element. */\n private _getCell(element: Element): GridCellPattern | undefined {\n const cellElement = element.closest('[ngGridCell]');\n if (cellElement === undefined) return;\n\n const widgetElement = element.closest('[ngGridCellWidget]');\n for (const row of this._rowPatterns()) {\n for (const cell of row.inputs.cells()) {\n if (\n cell.element() === cellElement ||\n (widgetElement !== undefined && cell.element() === widgetElement)\n ) {\n return cell;\n }\n }\n }\n return;\n }\n}\n\n/** A directive that represents a row in a grid. */\n@Directive({\n selector: '[ngGridRow]',\n exportAs: 'ngGridRow',\n host: {\n 'class': 'grid-row',\n '[attr.role]': 'role()',\n },\n})\nexport class GridRow {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The cells that make up this row. */\n private readonly _cells = contentChildren(GridCell);\n\n /** The UI patterns for the cells in this row. */\n private readonly _cellPatterns: Signal<GridCellPattern[]> = computed(() =>\n this._cells().map(c => c._pattern),\n );\n\n /** The parent grid. */\n private readonly _grid = inject(Grid);\n\n /** The parent grid UI pattern. */\n readonly grid = computed(() => this._grid._pattern);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the row. */\n readonly role = input<'row' | 'rowheader'>('row');\n\n /** The index of this row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The UI pattern for the grid row. */\n readonly _pattern = new GridRowPattern({\n ...this,\n cells: this._cellPatterns,\n });\n}\n\n/** A directive that represents a cell in a grid. */\n@Directive({\n selector: '[ngGridCell]',\n exportAs: 'ngGridCell',\n host: {\n 'class': 'grid-cell',\n '[attr.role]': 'role()',\n '[attr.id]': '_pattern.id()',\n '[attr.rowspan]': '_pattern.rowSpan()',\n '[attr.colspan]': '_pattern.colSpan()',\n '[attr.data-active]': '_pattern.active()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.aria-rowspan]': '_pattern.rowSpan()',\n '[attr.aria-colspan]': '_pattern.colSpan()',\n '[attr.aria-rowindex]': '_pattern.ariaRowIndex()',\n '[attr.aria-colindex]': '_pattern.ariaColIndex()',\n '[attr.aria-selected]': '_pattern.ariaSelected()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCell {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The widget contained within this cell, if any. */\n private readonly _widgets = contentChild(GridCellWidget);\n\n /** The UI pattern for the widget in this cell. */\n private readonly _widgetPattern: Signal<GridCellWidgetPattern | undefined> = computed(\n () => this._widgets()?._pattern,\n );\n\n /** The parent row. */\n private readonly _row = inject(GridRow);\n\n /** A unique identifier for the cell. */\n private readonly _id = inject(_IdGenerator).getId('ng-grid-cell-');\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** The ARIA role for the cell. */\n readonly role = input<'gridcell' | 'columnheader'>('gridcell');\n\n /** The number of rows the cell should span. */\n readonly rowSpan = input<number>(1);\n\n /** The number of columns the cell should span. */\n readonly colSpan = input<number>(1);\n\n /** The index of this cell's row within the grid. */\n readonly rowIndex = input<number>();\n\n /** The index of this cell's column within the grid. */\n readonly colIndex = input<number>();\n\n /** Whether the cell is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the cell is selected. */\n readonly selected = model<boolean>(false);\n\n /** Whether the cell is selectable. */\n readonly selectable = input<boolean>(true);\n\n /** The UI pattern for the grid cell. */\n readonly _pattern = new GridCellPattern({\n ...this,\n id: () => this._id,\n grid: this._row.grid,\n row: () => this._row._pattern,\n widget: this._widgetPattern,\n });\n}\n\n/** A directive that represents a widget inside a grid cell. */\n@Directive({\n selector: '[ngGridCellWidget]',\n exportAs: 'ngGridCellWidget',\n host: {\n 'class': 'grid-cell-widget',\n '[attr.data-active]': '_pattern.active()',\n '[tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class GridCellWidget {\n /** A reference to the host element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** The parent cell. */\n private readonly _cell = inject(GridCell);\n\n /** The host native element. */\n readonly element = computed(() => this._elementRef.nativeElement);\n\n /** Whether the widget is activated and the grid navigation should be paused. */\n readonly activate = model<boolean>(false);\n\n /** The UI pattern for the grid cell widget. */\n readonly _pattern = new GridCellWidgetPattern({\n ...this,\n cell: () => this._cell._pattern,\n });\n\n /** Focuses the widget. */\n focus(): void {\n this.element().focus();\n }\n}\n"],"names":["inject","ElementRef","contentChildren","GridRow","ngDevMode","debugName","nativeElement","enableSelection","input","transform","booleanAttribute","focusMode","rowWrap","colWrap","_pattern","GridPattern","rows","_rowPatterns","getCell","e","_getCell","constructor","afterRenderEffect","resetStateEffect","focusEffect","element","cellElement","closest","widgetElement","cell","undefined","ɵɵngDeclareFactory","minVersion","version","ɵɵngDeclareDirective","type","Grid","isStandalone","selector","inputs","classPropertyName","publicName","isSignal","isRequired","transformFunction","disabled","skipDisabled","host","attributes","listeners","properties","classAttribute","queries","propertyName","predicate","exportAs","ngImport","i0","args","ctorParameters","_cellPatterns","computed","_cells","map","c","_grid","rowIndex","cells","deps","target","ɵɵFactoryTarget","Directive","ɵdir","decorators","GridCellWidget","_row","role","selected","model","selectable","GridCellPattern","GridCell"],"mappings":";;;;;;aA8CwC,GAAAA,MAAA,CAAAC,UAAA,CAAA;OAuBkC,GAAAC,eAAA,CAAAC,OAAA,EAAA,IAAAC,SAAA,GAAA,CAAA;IAAAC,SAAA,EAAA;AAAA,GAAA,IAAA,EAAA,CAAA,CAAA;gFAGG,GAAA,CAAA;IAAAA,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAA;2CAsB1C,CAAAC,aAAA,MAAAF,SAAA,GAAA,CAAA;IAAAC,SAAA,EAAA;AAAA,GAAA,CAAA,GAAA,EAAA,CAAA,CAAA;EAKzBE,eAAA,GAAAC,KAAA,CAAA,KAAA,EAAA,IAAAJ,SAAW,GAAA,CAAA;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,WAAA,EAAA,eAAA;AAAA,QAAA,gBAAA,EAAA,oBAAA;;;;QAnBF,qBAAA,EAAA,oBAAA;AACT,QAAA,qBAAA,EAAA,oBAAA;AACA,QAAA,sBAAA,EAAsB,yBAAA;AACtB,QAAA,sBAAA,EAAM,yBAAA;AACJ,QAAA,sBAAA,EAAoB,yBAAA;AACpB,QAAA,YAAA,EAAA;;;;;AAKA,MAAA,cAAA,CAAA;AAEA,EAAA,WAAA,GAAA,MAAA,CAAA/E,UAAA,CAAA;AAEA,EAAA,KAAA,GAAA,MAAA,CAAAgF,QAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"grid.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/src/aria/grid/grid.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {\n afterRenderEffect,\n booleanAttribute,\n computed,\n 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 grid = 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 });\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.grid,\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","grid","rowIndex","GridRowPattern","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":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