@angular/aria 21.1.0-next.1 → 21.1.0-next.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 (56) hide show
  1. package/fesm2022/_combobox-chunk.mjs +425 -0
  2. package/fesm2022/_combobox-chunk.mjs.map +1 -0
  3. package/fesm2022/_combobox-listbox-chunk.mjs +522 -0
  4. package/fesm2022/_combobox-listbox-chunk.mjs.map +1 -0
  5. package/fesm2022/_combobox-popup-chunk.mjs +46 -0
  6. package/fesm2022/_combobox-popup-chunk.mjs.map +1 -0
  7. package/fesm2022/_list-navigation-chunk.mjs +116 -0
  8. package/fesm2022/_list-navigation-chunk.mjs.map +1 -0
  9. package/fesm2022/_pointer-event-manager-chunk.mjs +134 -0
  10. package/fesm2022/_pointer-event-manager-chunk.mjs.map +1 -0
  11. package/fesm2022/_widget-chunk.mjs +4 -246
  12. package/fesm2022/_widget-chunk.mjs.map +1 -1
  13. package/fesm2022/accordion.mjs +64 -51
  14. package/fesm2022/accordion.mjs.map +1 -1
  15. package/fesm2022/aria.mjs +1 -1
  16. package/fesm2022/aria.mjs.map +1 -1
  17. package/fesm2022/combobox.mjs +120 -144
  18. package/fesm2022/combobox.mjs.map +1 -1
  19. package/fesm2022/grid.mjs +285 -261
  20. package/fesm2022/grid.mjs.map +1 -1
  21. package/fesm2022/listbox.mjs +205 -193
  22. package/fesm2022/listbox.mjs.map +1 -1
  23. package/fesm2022/menu.mjs +301 -283
  24. package/fesm2022/menu.mjs.map +1 -1
  25. package/fesm2022/private.mjs +13 -938
  26. package/fesm2022/private.mjs.map +1 -1
  27. package/fesm2022/tabs.mjs +209 -195
  28. package/fesm2022/tabs.mjs.map +1 -1
  29. package/fesm2022/toolbar.mjs +59 -47
  30. package/fesm2022/toolbar.mjs.map +1 -1
  31. package/fesm2022/tree.mjs +43 -41
  32. package/fesm2022/tree.mjs.map +1 -1
  33. package/package.json +2 -2
  34. package/types/_combobox-chunk.d.ts +98 -0
  35. package/types/_combobox-chunk.d2.ts +193 -0
  36. package/types/_grid-chunk.d.ts +3 -210
  37. package/types/_list-chunk.d.ts +212 -0
  38. package/types/_list-navigation-chunk.d.ts +212 -0
  39. package/types/_listbox-chunk.d.ts +106 -0
  40. package/types/accordion.d.ts +52 -49
  41. package/types/combobox.d.ts +25 -111
  42. package/types/grid.d.ts +37 -32
  43. package/types/listbox.d.ts +8 -5
  44. package/types/menu.d.ts +113 -113
  45. package/types/private.d.ts +10 -498
  46. package/types/tabs.d.ts +89 -84
  47. package/types/toolbar.d.ts +69 -66
  48. package/types/tree.d.ts +106 -103
  49. package/_adev_assets/aria-accordion.json +0 -743
  50. package/_adev_assets/aria-combobox.json +0 -603
  51. package/_adev_assets/aria-grid.json +0 -893
  52. package/_adev_assets/aria-listbox.json +0 -540
  53. package/_adev_assets/aria-menu.json +0 -1049
  54. package/_adev_assets/aria-tabs.json +0 -880
  55. package/_adev_assets/aria-toolbar.json +0 -545
  56. package/_adev_assets/aria-tree.json +0 -853
package/fesm2022/grid.mjs CHANGED
@@ -1,40 +1,45 @@
1
- import { _IdGenerator } from '@angular/cdk/a11y';
2
1
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, model, output } from '@angular/core';
2
+ import { InjectionToken, inject, ElementRef, contentChildren, computed, input, booleanAttribute, afterRenderEffect, Directive, output, model } from '@angular/core';
4
3
  import { Directionality } from '@angular/cdk/bidi';
5
- import { GridPattern, GridRowPattern, GridCellPattern, GridCellWidgetPattern } from './_widget-chunk.mjs';
4
+ import { GridPattern, GridCellWidgetPattern, GridCellPattern, GridRowPattern } from './_widget-chunk.mjs';
5
+ import { _IdGenerator } from '@angular/cdk/a11y';
6
+ import './_pointer-event-manager-chunk.mjs';
7
+ import './_list-navigation-chunk.mjs';
8
+
9
+ const GRID_CELL = new InjectionToken('GRID_CELL');
10
+ const GRID_ROW = new InjectionToken('GRID_ROW');
6
11
 
7
12
  class Grid {
8
13
  _elementRef = inject(ElementRef);
9
14
  element = this._elementRef.nativeElement;
10
- _rows = contentChildren(GridRow, ...(ngDevMode ? [{
11
- debugName: "_rows",
12
- descendants: true
13
- }] : [{
15
+ _rows = contentChildren(GRID_ROW, {
16
+ ...(ngDevMode ? {
17
+ debugName: "_rows"
18
+ } : {}),
14
19
  descendants: true
15
- }]));
20
+ });
16
21
  _rowPatterns = computed(() => this._rows().map(r => r._pattern), ...(ngDevMode ? [{
17
22
  debugName: "_rowPatterns"
18
23
  }] : []));
19
24
  textDirection = inject(Directionality).valueSignal;
20
- enableSelection = input(false, ...(ngDevMode ? [{
21
- debugName: "enableSelection",
22
- transform: booleanAttribute
23
- }] : [{
24
- transform: booleanAttribute
25
- }]));
26
- disabled = input(false, ...(ngDevMode ? [{
27
- debugName: "disabled",
25
+ enableSelection = input(false, {
26
+ ...(ngDevMode ? {
27
+ debugName: "enableSelection"
28
+ } : {}),
28
29
  transform: booleanAttribute
29
- }] : [{
30
- transform: booleanAttribute
31
- }]));
32
- softDisabled = input(true, ...(ngDevMode ? [{
33
- debugName: "softDisabled",
30
+ });
31
+ disabled = input(false, {
32
+ ...(ngDevMode ? {
33
+ debugName: "disabled"
34
+ } : {}),
34
35
  transform: booleanAttribute
35
- }] : [{
36
+ });
37
+ softDisabled = input(true, {
38
+ ...(ngDevMode ? {
39
+ debugName: "softDisabled"
40
+ } : {}),
36
41
  transform: booleanAttribute
37
- }]));
42
+ });
38
43
  focusMode = input('roving', ...(ngDevMode ? [{
39
44
  debugName: "focusMode"
40
45
  }] : []));
@@ -44,21 +49,21 @@ class Grid {
44
49
  colWrap = input('loop', ...(ngDevMode ? [{
45
50
  debugName: "colWrap"
46
51
  }] : []));
47
- multi = input(false, ...(ngDevMode ? [{
48
- debugName: "multi",
49
- transform: booleanAttribute
50
- }] : [{
52
+ multi = input(false, {
53
+ ...(ngDevMode ? {
54
+ debugName: "multi"
55
+ } : {}),
51
56
  transform: booleanAttribute
52
- }]));
57
+ });
53
58
  selectionMode = input('follow', ...(ngDevMode ? [{
54
59
  debugName: "selectionMode"
55
60
  }] : []));
56
- enableRangeSelection = input(false, ...(ngDevMode ? [{
57
- debugName: "enableRangeSelection",
61
+ enableRangeSelection = input(false, {
62
+ ...(ngDevMode ? {
63
+ debugName: "enableRangeSelection"
64
+ } : {}),
58
65
  transform: booleanAttribute
59
- }] : [{
60
- transform: booleanAttribute
61
- }]));
66
+ });
62
67
  _pattern = new GridPattern({
63
68
  ...this,
64
69
  rows: this._rowPatterns,
@@ -88,7 +93,7 @@ class Grid {
88
93
  }
89
94
  static ɵfac = i0.ɵɵngDeclareFactory({
90
95
  minVersion: "12.0.0",
91
- version: "21.0.0",
96
+ version: "21.0.3",
92
97
  ngImport: i0,
93
98
  type: Grid,
94
99
  deps: [],
@@ -96,7 +101,7 @@ class Grid {
96
101
  });
97
102
  static ɵdir = i0.ɵɵngDeclareDirective({
98
103
  minVersion: "17.2.0",
99
- version: "21.0.0",
104
+ version: "21.0.3",
100
105
  type: Grid,
101
106
  isStandalone: true,
102
107
  selector: "[ngGrid]",
@@ -185,7 +190,7 @@ class Grid {
185
190
  },
186
191
  queries: [{
187
192
  propertyName: "_rows",
188
- predicate: GridRow,
193
+ predicate: GRID_ROW,
189
194
  descendants: true,
190
195
  isSignal: true
191
196
  }],
@@ -195,7 +200,7 @@ class Grid {
195
200
  }
196
201
  i0.ɵɵngDeclareClassMetadata({
197
202
  minVersion: "12.0.0",
198
- version: "21.0.0",
203
+ version: "21.0.3",
199
204
  ngImport: i0,
200
205
  type: Grid,
201
206
  decorators: [{
@@ -221,7 +226,7 @@ i0.ɵɵngDeclareClassMetadata({
221
226
  propDecorators: {
222
227
  _rows: [{
223
228
  type: i0.ContentChildren,
224
- args: [i0.forwardRef(() => GridRow), {
229
+ args: [i0.forwardRef(() => GRID_ROW), {
225
230
  ...{
226
231
  descendants: true
227
232
  },
@@ -302,123 +307,223 @@ i0.ɵɵngDeclareClassMetadata({
302
307
  }]
303
308
  }
304
309
  });
305
- class GridRow {
310
+
311
+ class GridCellWidget {
306
312
  _elementRef = inject(ElementRef);
307
313
  element = this._elementRef.nativeElement;
308
- _cells = contentChildren(GridCell, ...(ngDevMode ? [{
309
- debugName: "_cells",
310
- descendants: true
311
- }] : [{
312
- descendants: true
313
- }]));
314
- _cellPatterns = computed(() => this._cells().map(c => c._pattern), ...(ngDevMode ? [{
315
- debugName: "_cellPatterns"
314
+ active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
315
+ debugName: "active"
316
316
  }] : []));
317
- _grid = inject(Grid);
318
- _gridPattern = computed(() => this._grid._pattern, ...(ngDevMode ? [{
319
- debugName: "_gridPattern"
317
+ _cell = inject(GRID_CELL);
318
+ id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true), ...(ngDevMode ? [{
319
+ debugName: "id"
320
320
  }] : []));
321
- rowIndex = input(...(ngDevMode ? [undefined, {
322
- debugName: "rowIndex"
321
+ widgetType = input('simple', ...(ngDevMode ? [{
322
+ debugName: "widgetType"
323
323
  }] : []));
324
- _pattern = new GridRowPattern({
324
+ disabled = input(false, {
325
+ ...(ngDevMode ? {
326
+ debugName: "disabled"
327
+ } : {}),
328
+ transform: booleanAttribute
329
+ });
330
+ focusTarget = input(...(ngDevMode ? [undefined, {
331
+ debugName: "focusTarget"
332
+ }] : []));
333
+ onActivate = output();
334
+ onDeactivate = output();
335
+ tabindex = input(...(ngDevMode ? [undefined, {
336
+ debugName: "tabindex"
337
+ }] : []));
338
+ _tabIndex = computed(() => this.tabindex() ?? (this.focusTarget() ? -1 : this._pattern.tabIndex()), ...(ngDevMode ? [{
339
+ debugName: "_tabIndex"
340
+ }] : []));
341
+ _pattern = new GridCellWidgetPattern({
325
342
  ...this,
326
- cells: this._cellPatterns,
327
- grid: this._gridPattern
343
+ element: () => this.element,
344
+ cell: () => this._cell._pattern,
345
+ focusTarget: computed(() => {
346
+ if (this.focusTarget() instanceof ElementRef) {
347
+ return this.focusTarget().nativeElement;
348
+ }
349
+ return this.focusTarget();
350
+ })
328
351
  });
352
+ get isActivated() {
353
+ return this._pattern.isActivated.asReadonly();
354
+ }
355
+ constructor() {
356
+ afterRenderEffect(() => {
357
+ const activateEvent = this._pattern.lastActivateEvent();
358
+ if (activateEvent) {
359
+ this.onActivate.emit(activateEvent);
360
+ }
361
+ });
362
+ afterRenderEffect(() => {
363
+ const deactivateEvent = this._pattern.lastDeactivateEvent();
364
+ if (deactivateEvent) {
365
+ this.onDeactivate.emit(deactivateEvent);
366
+ }
367
+ });
368
+ }
369
+ activate() {
370
+ this._pattern.activate();
371
+ }
372
+ deactivate() {
373
+ this._pattern.deactivate();
374
+ }
329
375
  static ɵfac = i0.ɵɵngDeclareFactory({
330
376
  minVersion: "12.0.0",
331
- version: "21.0.0",
377
+ version: "21.0.3",
332
378
  ngImport: i0,
333
- type: GridRow,
379
+ type: GridCellWidget,
334
380
  deps: [],
335
381
  target: i0.ɵɵFactoryTarget.Directive
336
382
  });
337
383
  static ɵdir = i0.ɵɵngDeclareDirective({
338
- minVersion: "17.2.0",
339
- version: "21.0.0",
340
- type: GridRow,
384
+ minVersion: "17.1.0",
385
+ version: "21.0.3",
386
+ type: GridCellWidget,
341
387
  isStandalone: true,
342
- selector: "[ngGridRow]",
388
+ selector: "[ngGridCellWidget]",
343
389
  inputs: {
344
- rowIndex: {
345
- classPropertyName: "rowIndex",
346
- publicName: "rowIndex",
390
+ id: {
391
+ classPropertyName: "id",
392
+ publicName: "id",
393
+ isSignal: true,
394
+ isRequired: false,
395
+ transformFunction: null
396
+ },
397
+ widgetType: {
398
+ classPropertyName: "widgetType",
399
+ publicName: "widgetType",
400
+ isSignal: true,
401
+ isRequired: false,
402
+ transformFunction: null
403
+ },
404
+ disabled: {
405
+ classPropertyName: "disabled",
406
+ publicName: "disabled",
407
+ isSignal: true,
408
+ isRequired: false,
409
+ transformFunction: null
410
+ },
411
+ focusTarget: {
412
+ classPropertyName: "focusTarget",
413
+ publicName: "focusTarget",
414
+ isSignal: true,
415
+ isRequired: false,
416
+ transformFunction: null
417
+ },
418
+ tabindex: {
419
+ classPropertyName: "tabindex",
420
+ publicName: "tabindex",
347
421
  isSignal: true,
348
422
  isRequired: false,
349
423
  transformFunction: null
350
424
  }
351
425
  },
426
+ outputs: {
427
+ onActivate: "onActivate",
428
+ onDeactivate: "onDeactivate"
429
+ },
352
430
  host: {
353
- attributes: {
354
- "role": "row"
355
- },
356
431
  properties: {
357
- "attr.aria-rowindex": "_pattern.rowIndex()"
432
+ "attr.data-active": "active()",
433
+ "attr.data-active-control": "isActivated() ? \"widget\" : \"cell\"",
434
+ "tabindex": "_tabIndex()"
358
435
  }
359
436
  },
360
- queries: [{
361
- propertyName: "_cells",
362
- predicate: GridCell,
363
- descendants: true,
364
- isSignal: true
365
- }],
366
- exportAs: ["ngGridRow"],
437
+ exportAs: ["ngGridCellWidget"],
367
438
  ngImport: i0
368
439
  });
369
440
  }
370
441
  i0.ɵɵngDeclareClassMetadata({
371
442
  minVersion: "12.0.0",
372
- version: "21.0.0",
443
+ version: "21.0.3",
373
444
  ngImport: i0,
374
- type: GridRow,
445
+ type: GridCellWidget,
375
446
  decorators: [{
376
447
  type: Directive,
377
448
  args: [{
378
- selector: '[ngGridRow]',
379
- exportAs: 'ngGridRow',
449
+ selector: '[ngGridCellWidget]',
450
+ exportAs: 'ngGridCellWidget',
380
451
  host: {
381
- 'role': 'row',
382
- '[attr.aria-rowindex]': '_pattern.rowIndex()'
452
+ '[attr.data-active]': 'active()',
453
+ '[attr.data-active-control]': 'isActivated() ? "widget" : "cell"',
454
+ '[tabindex]': '_tabIndex()'
383
455
  }
384
456
  }]
385
457
  }],
458
+ ctorParameters: () => [],
386
459
  propDecorators: {
387
- _cells: [{
388
- type: i0.ContentChildren,
389
- args: [i0.forwardRef(() => GridCell), {
390
- ...{
391
- descendants: true
392
- },
393
- isSignal: true
460
+ id: [{
461
+ type: i0.Input,
462
+ args: [{
463
+ isSignal: true,
464
+ alias: "id",
465
+ required: false
394
466
  }]
395
467
  }],
396
- rowIndex: [{
468
+ widgetType: [{
397
469
  type: i0.Input,
398
470
  args: [{
399
471
  isSignal: true,
400
- alias: "rowIndex",
472
+ alias: "widgetType",
473
+ required: false
474
+ }]
475
+ }],
476
+ disabled: [{
477
+ type: i0.Input,
478
+ args: [{
479
+ isSignal: true,
480
+ alias: "disabled",
481
+ required: false
482
+ }]
483
+ }],
484
+ focusTarget: [{
485
+ type: i0.Input,
486
+ args: [{
487
+ isSignal: true,
488
+ alias: "focusTarget",
489
+ required: false
490
+ }]
491
+ }],
492
+ onActivate: [{
493
+ type: i0.Output,
494
+ args: ["onActivate"]
495
+ }],
496
+ onDeactivate: [{
497
+ type: i0.Output,
498
+ args: ["onDeactivate"]
499
+ }],
500
+ tabindex: [{
501
+ type: i0.Input,
502
+ args: [{
503
+ isSignal: true,
504
+ alias: "tabindex",
401
505
  required: false
402
506
  }]
403
507
  }]
404
508
  }
405
509
  });
510
+
406
511
  class GridCell {
407
512
  _elementRef = inject(ElementRef);
408
513
  element = this._elementRef.nativeElement;
409
514
  active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
410
515
  debugName: "active"
411
516
  }] : []));
412
- _widgets = contentChildren(GridCellWidget, ...(ngDevMode ? [{
413
- debugName: "_widgets",
414
- descendants: true
415
- }] : [{
517
+ _widgets = contentChildren(GridCellWidget, {
518
+ ...(ngDevMode ? {
519
+ debugName: "_widgets"
520
+ } : {}),
416
521
  descendants: true
417
- }]));
522
+ });
418
523
  _widgetPatterns = computed(() => this._widgets().map(w => w._pattern), ...(ngDevMode ? [{
419
524
  debugName: "_widgetPatterns"
420
525
  }] : []));
421
- _row = inject(GridRow);
526
+ _row = inject(GRID_ROW);
422
527
  textDirection = inject(Directionality).valueSignal;
423
528
  id = input(inject(_IdGenerator).getId('ng-grid-cell-', true), ...(ngDevMode ? [{
424
529
  debugName: "id"
@@ -438,12 +543,12 @@ class GridCell {
438
543
  colIndex = input(...(ngDevMode ? [undefined, {
439
544
  debugName: "colIndex"
440
545
  }] : []));
441
- disabled = input(false, ...(ngDevMode ? [{
442
- debugName: "disabled",
443
- transform: booleanAttribute
444
- }] : [{
546
+ disabled = input(false, {
547
+ ...(ngDevMode ? {
548
+ debugName: "disabled"
549
+ } : {}),
445
550
  transform: booleanAttribute
446
- }]));
551
+ });
447
552
  selected = model(false, ...(ngDevMode ? [{
448
553
  debugName: "selected"
449
554
  }] : []));
@@ -453,12 +558,12 @@ class GridCell {
453
558
  orientation = input('horizontal', ...(ngDevMode ? [{
454
559
  debugName: "orientation"
455
560
  }] : []));
456
- wrap = input(true, ...(ngDevMode ? [{
457
- debugName: "wrap",
458
- transform: booleanAttribute
459
- }] : [{
561
+ wrap = input(true, {
562
+ ...(ngDevMode ? {
563
+ debugName: "wrap"
564
+ } : {}),
460
565
  transform: booleanAttribute
461
- }]));
566
+ });
462
567
  tabindex = input(...(ngDevMode ? [undefined, {
463
568
  debugName: "tabindex"
464
569
  }] : []));
@@ -487,7 +592,7 @@ class GridCell {
487
592
  }
488
593
  static ɵfac = i0.ɵɵngDeclareFactory({
489
594
  minVersion: "12.0.0",
490
- version: "21.0.0",
595
+ version: "21.0.3",
491
596
  ngImport: i0,
492
597
  type: GridCell,
493
598
  deps: [],
@@ -495,7 +600,7 @@ class GridCell {
495
600
  });
496
601
  static ɵdir = i0.ɵɵngDeclareDirective({
497
602
  minVersion: "17.2.0",
498
- version: "21.0.0",
603
+ version: "21.0.3",
499
604
  type: GridCell,
500
605
  isStandalone: true,
501
606
  selector: "[ngGridCell]",
@@ -605,6 +710,10 @@ class GridCell {
605
710
  "tabindex": "_tabIndex()"
606
711
  }
607
712
  },
713
+ providers: [{
714
+ provide: GRID_CELL,
715
+ useExisting: GridCell
716
+ }],
608
717
  queries: [{
609
718
  propertyName: "_widgets",
610
719
  predicate: GridCellWidget,
@@ -617,7 +726,7 @@ class GridCell {
617
726
  }
618
727
  i0.ɵɵngDeclareClassMetadata({
619
728
  minVersion: "12.0.0",
620
- version: "21.0.0",
729
+ version: "21.0.3",
621
730
  ngImport: i0,
622
731
  type: GridCell,
623
732
  decorators: [{
@@ -639,7 +748,11 @@ i0.ɵɵngDeclareClassMetadata({
639
748
  '[attr.aria-colindex]': '_pattern.ariaColIndex()',
640
749
  '[attr.aria-selected]': '_pattern.ariaSelected()',
641
750
  '[tabindex]': '_tabIndex()'
642
- }
751
+ },
752
+ providers: [{
753
+ provide: GRID_CELL,
754
+ useExisting: GridCell
755
+ }]
643
756
  }]
644
757
  }],
645
758
  ctorParameters: () => [],
@@ -754,200 +867,111 @@ i0.ɵɵngDeclareClassMetadata({
754
867
  }]
755
868
  }
756
869
  });
757
- class GridCellWidget {
870
+
871
+ class GridRow {
758
872
  _elementRef = inject(ElementRef);
759
873
  element = this._elementRef.nativeElement;
760
- active = computed(() => this._pattern.active(), ...(ngDevMode ? [{
761
- debugName: "active"
762
- }] : []));
763
- _cell = inject(GridCell);
764
- id = input(inject(_IdGenerator).getId('ng-grid-cell-widget-', true), ...(ngDevMode ? [{
765
- debugName: "id"
766
- }] : []));
767
- widgetType = input('simple', ...(ngDevMode ? [{
768
- debugName: "widgetType"
769
- }] : []));
770
- disabled = input(false, ...(ngDevMode ? [{
771
- debugName: "disabled",
772
- transform: booleanAttribute
773
- }] : [{
774
- transform: booleanAttribute
775
- }]));
776
- focusTarget = input(...(ngDevMode ? [undefined, {
777
- debugName: "focusTarget"
874
+ _cells = contentChildren(GRID_CELL, {
875
+ ...(ngDevMode ? {
876
+ debugName: "_cells"
877
+ } : {}),
878
+ descendants: true
879
+ });
880
+ _cellPatterns = computed(() => this._cells().map(c => c._pattern), ...(ngDevMode ? [{
881
+ debugName: "_cellPatterns"
778
882
  }] : []));
779
- onActivate = output();
780
- onDeactivate = output();
781
- tabindex = input(...(ngDevMode ? [undefined, {
782
- debugName: "tabindex"
883
+ _grid = inject(Grid);
884
+ _gridPattern = computed(() => this._grid._pattern, ...(ngDevMode ? [{
885
+ debugName: "_gridPattern"
783
886
  }] : []));
784
- _tabIndex = computed(() => this.tabindex() ?? (this.focusTarget() ? -1 : this._pattern.tabIndex()), ...(ngDevMode ? [{
785
- debugName: "_tabIndex"
887
+ rowIndex = input(...(ngDevMode ? [undefined, {
888
+ debugName: "rowIndex"
786
889
  }] : []));
787
- _pattern = new GridCellWidgetPattern({
890
+ _pattern = new GridRowPattern({
788
891
  ...this,
789
- element: () => this.element,
790
- cell: () => this._cell._pattern,
791
- focusTarget: computed(() => {
792
- if (this.focusTarget() instanceof ElementRef) {
793
- return this.focusTarget().nativeElement;
794
- }
795
- return this.focusTarget();
796
- })
892
+ cells: this._cellPatterns,
893
+ grid: this._gridPattern
797
894
  });
798
- get isActivated() {
799
- return this._pattern.isActivated.asReadonly();
800
- }
801
- constructor() {
802
- afterRenderEffect(() => {
803
- const activateEvent = this._pattern.lastActivateEvent();
804
- if (activateEvent) {
805
- this.onActivate.emit(activateEvent);
806
- }
807
- });
808
- afterRenderEffect(() => {
809
- const deactivateEvent = this._pattern.lastDeactivateEvent();
810
- if (deactivateEvent) {
811
- this.onDeactivate.emit(deactivateEvent);
812
- }
813
- });
814
- }
815
- activate() {
816
- this._pattern.activate();
817
- }
818
- deactivate() {
819
- this._pattern.deactivate();
820
- }
821
895
  static ɵfac = i0.ɵɵngDeclareFactory({
822
896
  minVersion: "12.0.0",
823
- version: "21.0.0",
897
+ version: "21.0.3",
824
898
  ngImport: i0,
825
- type: GridCellWidget,
899
+ type: GridRow,
826
900
  deps: [],
827
901
  target: i0.ɵɵFactoryTarget.Directive
828
902
  });
829
903
  static ɵdir = i0.ɵɵngDeclareDirective({
830
- minVersion: "17.1.0",
831
- version: "21.0.0",
832
- type: GridCellWidget,
904
+ minVersion: "17.2.0",
905
+ version: "21.0.3",
906
+ type: GridRow,
833
907
  isStandalone: true,
834
- selector: "[ngGridCellWidget]",
908
+ selector: "[ngGridRow]",
835
909
  inputs: {
836
- id: {
837
- classPropertyName: "id",
838
- publicName: "id",
839
- isSignal: true,
840
- isRequired: false,
841
- transformFunction: null
842
- },
843
- widgetType: {
844
- classPropertyName: "widgetType",
845
- publicName: "widgetType",
846
- isSignal: true,
847
- isRequired: false,
848
- transformFunction: null
849
- },
850
- disabled: {
851
- classPropertyName: "disabled",
852
- publicName: "disabled",
853
- isSignal: true,
854
- isRequired: false,
855
- transformFunction: null
856
- },
857
- focusTarget: {
858
- classPropertyName: "focusTarget",
859
- publicName: "focusTarget",
860
- isSignal: true,
861
- isRequired: false,
862
- transformFunction: null
863
- },
864
- tabindex: {
865
- classPropertyName: "tabindex",
866
- publicName: "tabindex",
910
+ rowIndex: {
911
+ classPropertyName: "rowIndex",
912
+ publicName: "rowIndex",
867
913
  isSignal: true,
868
914
  isRequired: false,
869
915
  transformFunction: null
870
916
  }
871
917
  },
872
- outputs: {
873
- onActivate: "onActivate",
874
- onDeactivate: "onDeactivate"
875
- },
876
918
  host: {
919
+ attributes: {
920
+ "role": "row"
921
+ },
877
922
  properties: {
878
- "attr.data-active": "active()",
879
- "attr.data-active-control": "isActivated() ? \"widget\" : \"cell\"",
880
- "tabindex": "_tabIndex()"
923
+ "attr.aria-rowindex": "_pattern.rowIndex()"
881
924
  }
882
925
  },
883
- exportAs: ["ngGridCellWidget"],
926
+ providers: [{
927
+ provide: GRID_ROW,
928
+ useExisting: GridRow
929
+ }],
930
+ queries: [{
931
+ propertyName: "_cells",
932
+ predicate: GRID_CELL,
933
+ descendants: true,
934
+ isSignal: true
935
+ }],
936
+ exportAs: ["ngGridRow"],
884
937
  ngImport: i0
885
938
  });
886
939
  }
887
940
  i0.ɵɵngDeclareClassMetadata({
888
941
  minVersion: "12.0.0",
889
- version: "21.0.0",
942
+ version: "21.0.3",
890
943
  ngImport: i0,
891
- type: GridCellWidget,
944
+ type: GridRow,
892
945
  decorators: [{
893
946
  type: Directive,
894
947
  args: [{
895
- selector: '[ngGridCellWidget]',
896
- exportAs: 'ngGridCellWidget',
948
+ selector: '[ngGridRow]',
949
+ exportAs: 'ngGridRow',
897
950
  host: {
898
- '[attr.data-active]': 'active()',
899
- '[attr.data-active-control]': 'isActivated() ? "widget" : "cell"',
900
- '[tabindex]': '_tabIndex()'
901
- }
951
+ 'role': 'row',
952
+ '[attr.aria-rowindex]': '_pattern.rowIndex()'
953
+ },
954
+ providers: [{
955
+ provide: GRID_ROW,
956
+ useExisting: GridRow
957
+ }]
902
958
  }]
903
959
  }],
904
- ctorParameters: () => [],
905
960
  propDecorators: {
906
- id: [{
907
- type: i0.Input,
908
- args: [{
909
- isSignal: true,
910
- alias: "id",
911
- required: false
912
- }]
913
- }],
914
- widgetType: [{
915
- type: i0.Input,
916
- args: [{
917
- isSignal: true,
918
- alias: "widgetType",
919
- required: false
920
- }]
921
- }],
922
- disabled: [{
923
- type: i0.Input,
924
- args: [{
925
- isSignal: true,
926
- alias: "disabled",
927
- required: false
928
- }]
929
- }],
930
- focusTarget: [{
931
- type: i0.Input,
932
- args: [{
933
- isSignal: true,
934
- alias: "focusTarget",
935
- required: false
961
+ _cells: [{
962
+ type: i0.ContentChildren,
963
+ args: [i0.forwardRef(() => GRID_CELL), {
964
+ ...{
965
+ descendants: true
966
+ },
967
+ isSignal: true
936
968
  }]
937
969
  }],
938
- onActivate: [{
939
- type: i0.Output,
940
- args: ["onActivate"]
941
- }],
942
- onDeactivate: [{
943
- type: i0.Output,
944
- args: ["onDeactivate"]
945
- }],
946
- tabindex: [{
970
+ rowIndex: [{
947
971
  type: i0.Input,
948
972
  args: [{
949
973
  isSignal: true,
950
- alias: "tabindex",
974
+ alias: "rowIndex",
951
975
  required: false
952
976
  }]
953
977
  }]