@clr/angular 13.4.2 → 13.7.0

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 (44) hide show
  1. package/clarity.api.md +14 -11
  2. package/data/datagrid/datagrid-action-overflow.d.ts +2 -1
  3. package/data/datagrid/datagrid-row.d.ts +12 -1
  4. package/data/datagrid/datagrid.d.ts +4 -2
  5. package/data/datagrid/datagrid.module.d.ts +4 -3
  6. package/data/datagrid/providers/selection.d.ts +8 -0
  7. package/esm2020/accordion/stepper/stepper.mjs +16 -5
  8. package/esm2020/data/data.module.mjs +4 -2
  9. package/esm2020/data/datagrid/datagrid-action-overflow.mjs +24 -15
  10. package/esm2020/data/datagrid/datagrid-row.mjs +68 -14
  11. package/esm2020/data/datagrid/datagrid.mjs +24 -5
  12. package/esm2020/data/datagrid/datagrid.module.mjs +5 -2
  13. package/esm2020/data/datagrid/providers/selection.mjs +5 -1
  14. package/esm2020/emphasis/emphasis.module.mjs +4 -2
  15. package/esm2020/forms/checkbox/checkbox.module.mjs +1 -2
  16. package/esm2020/forms/common/common.module.mjs +1 -2
  17. package/esm2020/forms/datepicker/datepicker.module.mjs +1 -2
  18. package/esm2020/forms/datepicker/day.mjs +15 -5
  19. package/esm2020/forms/input/input.module.mjs +1 -2
  20. package/esm2020/forms/password/password.module.mjs +1 -2
  21. package/esm2020/forms/radio/radio.module.mjs +1 -2
  22. package/esm2020/forms/range/range.module.mjs +1 -2
  23. package/esm2020/forms/select/select.module.mjs +1 -2
  24. package/esm2020/forms/textarea/textarea.module.mjs +1 -2
  25. package/esm2020/icon/icon.module.mjs +6 -2
  26. package/esm2020/layout/layout.module.mjs +4 -2
  27. package/esm2020/popover/popover.module.mjs +4 -2
  28. package/esm2020/utils/conditional/conditional.module.mjs +6 -2
  29. package/esm2020/utils/drag-and-drop/drag-and-drop.module.mjs +1 -2
  30. package/esm2020/utils/focus/key-focus/index.mjs +8 -0
  31. package/esm2020/utils/host-wrapping/host-wrapping.module.mjs +5 -2
  32. package/esm2020/utils/i18n/common-strings.default.mjs +2 -1
  33. package/esm2020/utils/i18n/common-strings.interface.mjs +1 -1
  34. package/esm2020/utils/loading/loading.module.mjs +6 -2
  35. package/esm2020/utils/outside-click/outside-click.module.mjs +6 -2
  36. package/esm2020/utils/template-ref/template-ref.module.mjs +1 -2
  37. package/fesm2015/clr-angular.mjs +172 -45
  38. package/fesm2015/clr-angular.mjs.map +1 -1
  39. package/fesm2020/clr-angular.mjs +170 -45
  40. package/fesm2020/clr-angular.mjs.map +1 -1
  41. package/forms/datepicker/day.d.ts +4 -2
  42. package/package.json +5 -5
  43. package/utils/focus/key-focus/index.d.ts +2 -0
  44. package/utils/i18n/common-strings.interface.d.ts +1 -0
@@ -5,7 +5,7 @@ import { CommonModule, isPlatformBrowser, DOCUMENT, NgForOf, getLocaleDayNames,
5
5
  import { ClarityIcons, angleIcon, exclamationCircleIcon, checkCircleIcon, ellipsisHorizontalIcon, windowCloseIcon, eventIcon, calendarIcon, eyeHideIcon, eyeIcon, ellipsisVerticalIcon, viewColumnsIcon, arrowIcon, timesIcon, stepForward2Icon, angleDoubleIcon, filterGridCircleIcon, filterGridIcon, infoCircleIcon, exclamationTriangleIcon, circleIcon, dotCircleIcon, errorStandardIcon, successStandardIcon } from '@cds/core/icon';
6
6
  import { map, tap, startWith, distinctUntilChanged, pairwise, filter, debounceTime, takeUntil, take, first, switchMap } from 'rxjs/operators';
7
7
  import * as i3 from 'rxjs';
8
- import { Subject, BehaviorSubject, fromEvent, isObservable, of, ReplaySubject, combineLatest, Observable } from 'rxjs';
8
+ import { Subject, BehaviorSubject, Observable, fromEvent, isObservable, of, ReplaySubject, combineLatest } from 'rxjs';
9
9
  import { trigger, transition, style, animate, keyframes, state } from '@angular/animations';
10
10
  import * as i1 from '@angular/forms';
11
11
  import { FormControl, FormGroup, FormsModule, SelectMultipleControlValueAccessor } from '@angular/forms';
@@ -53,7 +53,11 @@ ClrIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
53
53
  ClrIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrIconModule, imports: [[CommonModule]] });
54
54
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrIconModule, decorators: [{
55
55
  type: NgModule,
56
- args: [{ imports: [CommonModule], declarations: [CLR_ICON_DIRECTIVES], exports: [CLR_ICON_DIRECTIVES] }]
56
+ args: [{
57
+ imports: [CommonModule],
58
+ declarations: [CLR_ICON_DIRECTIVES],
59
+ exports: [CLR_ICON_DIRECTIVES],
60
+ }]
57
61
  }] });
58
62
 
59
63
  /*
@@ -324,6 +328,7 @@ const commonStringsDefault = {
324
328
  datepickerCurrentDecade: 'Current decade',
325
329
  datepickerSelectMonthText: 'Select month, the current month is {CALENDAR_MONTH}',
326
330
  datepickerSelectYearText: 'Select year, the current year is {CALENDAR_YEAR}',
331
+ datepickerSelectedLabel: '{FULL_DATE} - Selected',
327
332
  // Stack View
328
333
  stackViewChanged: 'Value changed.',
329
334
  // Responsive Nav
@@ -1192,9 +1197,7 @@ class ClrStepper {
1192
1197
  this.subscriptions.forEach(s => s.unsubscribe());
1193
1198
  }
1194
1199
  listenForFormResetChanges() {
1195
- return this.form.statusChanges
1196
- .pipe(filter(() => this.form.pristine)) // https://github.com/angular/angular/issues/10887
1197
- .subscribe(() => this.stepperService.resetPanels());
1200
+ return fromControlReset(this.form.form).subscribe(() => this.stepperService.resetPanels());
1198
1201
  }
1199
1202
  listenForPanelsCompleted() {
1200
1203
  return this.stepperService.panelsCompleted.subscribe(panelsCompleted => {
@@ -1244,6 +1247,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
1244
1247
  type: ContentChildren,
1245
1248
  args: [ClrStepperPanel, { descendants: true }]
1246
1249
  }] } });
1250
+ function fromControlReset(control) {
1251
+ return new Observable(observer => {
1252
+ const unpatchedControlReset = control.reset;
1253
+ control.reset = () => {
1254
+ observer.next();
1255
+ unpatchedControlReset.apply(control);
1256
+ };
1257
+ return () => {
1258
+ control.reset = unpatchedControlReset;
1259
+ };
1260
+ });
1261
+ }
1247
1262
 
1248
1263
  /*
1249
1264
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -2962,7 +2977,10 @@ ClrHostWrappingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", v
2962
2977
  ClrHostWrappingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrHostWrappingModule });
2963
2978
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrHostWrappingModule, decorators: [{
2964
2979
  type: NgModule,
2965
- args: [{ declarations: [EmptyAnchor], exports: [EmptyAnchor], entryComponents: [EmptyAnchor] }]
2980
+ args: [{
2981
+ declarations: [EmptyAnchor],
2982
+ exports: [EmptyAnchor],
2983
+ }]
2966
2984
  }] });
2967
2985
 
2968
2986
  /*
@@ -4108,7 +4126,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
4108
4126
  ClrControlContainer,
4109
4127
  ClrControl,
4110
4128
  ],
4111
- entryComponents: [ClrControlContainer],
4112
4129
  }]
4113
4130
  }], ctorParameters: function () { return []; } });
4114
4131
 
@@ -4343,7 +4360,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
4343
4360
  imports: [CommonModule, ClrIconModule, ClrCommonFormsModule, ClrHostWrappingModule],
4344
4361
  declarations: [ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],
4345
4362
  exports: [ClrCommonFormsModule, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],
4346
- entryComponents: [ClrCheckboxWrapper],
4347
4363
  }]
4348
4364
  }], ctorParameters: function () { return []; } });
4349
4365
 
@@ -4831,7 +4847,11 @@ ClrConditionalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
4831
4847
  ClrConditionalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrConditionalModule, imports: [[CommonModule]] });
4832
4848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrConditionalModule, decorators: [{
4833
4849
  type: NgModule,
4834
- args: [{ imports: [CommonModule], declarations: [CONDITIONAL_DIRECTIVES], exports: [CONDITIONAL_DIRECTIVES] }]
4850
+ args: [{
4851
+ imports: [CommonModule],
4852
+ declarations: [CONDITIONAL_DIRECTIVES],
4853
+ exports: [CONDITIONAL_DIRECTIVES],
4854
+ }]
4835
4855
  }] });
4836
4856
 
4837
4857
  /*
@@ -6734,7 +6754,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
6734
6754
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
6735
6755
  declarations: [ClrInput, ClrInputContainer],
6736
6756
  exports: [ClrCommonFormsModule, ClrInput, ClrInputContainer],
6737
- entryComponents: [ClrInputContainer],
6738
6757
  }]
6739
6758
  }], ctorParameters: function () { return []; } });
6740
6759
 
@@ -8067,21 +8086,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8067
8086
  * The full license information can be found in LICENSE in the root directory of this project.
8068
8087
  */
8069
8088
  class ClrDay {
8070
- constructor(_dateNavigationService, _toggleService, dateFormControlService) {
8089
+ constructor(_dateNavigationService, _toggleService, dateFormControlService, commonStrings) {
8071
8090
  this._dateNavigationService = _dateNavigationService;
8072
8091
  this._toggleService = _toggleService;
8073
8092
  this.dateFormControlService = dateFormControlService;
8093
+ this.commonStrings = commonStrings;
8074
8094
  }
8075
8095
  /**
8076
8096
  * DayViewModel input which is used to build the Day View.
8077
8097
  */
8078
8098
  set dayView(day) {
8079
8099
  this._dayView = day;
8080
- this.dayString = this._dayView.dayModel.toDateString();
8081
8100
  }
8082
8101
  get dayView() {
8083
8102
  return this._dayView;
8084
8103
  }
8104
+ get dayString() {
8105
+ return this.dayView.isSelected
8106
+ ? this.commonStrings.parse(this.commonStrings.keys.datepickerSelectedLabel, {
8107
+ FULL_DATE: this._dayView.dayModel.toDateString(),
8108
+ })
8109
+ : this._dayView.dayModel.toDateString();
8110
+ }
8085
8111
  /**
8086
8112
  * Updates the focusedDay in the DateNavigationService when the ClrDay is focused.
8087
8113
  */
@@ -8098,7 +8124,7 @@ class ClrDay {
8098
8124
  this._toggleService.open = false;
8099
8125
  }
8100
8126
  }
8101
- ClrDay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDay, deps: [{ token: DateNavigationService }, { token: ClrPopoverToggleService }, { token: DateFormControlService }], target: i0.ɵɵFactoryTarget.Component });
8127
+ ClrDay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDay, deps: [{ token: DateNavigationService }, { token: ClrPopoverToggleService }, { token: DateFormControlService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
8102
8128
  ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDay, selector: "clr-day", inputs: { dayView: ["clrDayView", "dayView"] }, host: { properties: { "class.day": "true" } }, ngImport: i0, template: `
8103
8129
  <button
8104
8130
  class="day-btn"
@@ -8110,6 +8136,7 @@ ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
8110
8136
  [attr.tabindex]="dayView.tabIndex"
8111
8137
  (click)="selectDay()"
8112
8138
  (focus)="onDayViewFocus()"
8139
+ [attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
8113
8140
  [attr.aria-label]="dayString"
8114
8141
  [attr.aria-selected]="dayView.isSelected"
8115
8142
  >
@@ -8131,6 +8158,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8131
8158
  [attr.tabindex]="dayView.tabIndex"
8132
8159
  (click)="selectDay()"
8133
8160
  (focus)="onDayViewFocus()"
8161
+ [attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
8134
8162
  [attr.aria-label]="dayString"
8135
8163
  [attr.aria-selected]="dayView.isSelected"
8136
8164
  >
@@ -8139,7 +8167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8139
8167
  `,
8140
8168
  host: { '[class.day]': 'true' },
8141
8169
  }]
8142
- }], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }]; }, propDecorators: { dayView: [{
8170
+ }], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }, { type: ClrCommonStringsService }]; }, propDecorators: { dayView: [{
8143
8171
  type: Input,
8144
8172
  args: ['clrDayView']
8145
8173
  }] } });
@@ -9433,7 +9461,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9433
9461
  ],
9434
9462
  declarations: [CLR_DATEPICKER_DIRECTIVES],
9435
9463
  exports: [CLR_DATEPICKER_DIRECTIVES],
9436
- entryComponents: [ClrDateContainer],
9437
9464
  }]
9438
9465
  }], ctorParameters: function () { return []; } });
9439
9466
 
@@ -9667,7 +9694,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9667
9694
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
9668
9695
  declarations: [ClrPassword, ClrPasswordContainer],
9669
9696
  exports: [ClrCommonFormsModule, ClrPassword, ClrPasswordContainer],
9670
- entryComponents: [ClrPasswordContainer],
9671
9697
  }]
9672
9698
  }], ctorParameters: function () { return []; } });
9673
9699
 
@@ -9868,7 +9894,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9868
9894
  imports: [CommonModule, ClrCommonFormsModule, ClrHostWrappingModule, ClrIconModule],
9869
9895
  declarations: [ClrRadio, ClrRadioContainer, ClrRadioWrapper],
9870
9896
  exports: [ClrCommonFormsModule, ClrRadio, ClrRadioContainer, ClrRadioWrapper],
9871
- entryComponents: [ClrRadioWrapper],
9872
9897
  }]
9873
9898
  }], ctorParameters: function () { return []; } });
9874
9899
 
@@ -10024,7 +10049,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10024
10049
  imports: [CommonModule, ClrCommonFormsModule, ClrHostWrappingModule, ClrIconModule],
10025
10050
  declarations: [ClrRange, ClrRangeContainer],
10026
10051
  exports: [ClrCommonFormsModule, ClrRange, ClrRangeContainer],
10027
- entryComponents: [ClrRangeContainer],
10028
10052
  }]
10029
10053
  }], ctorParameters: function () { return []; } });
10030
10054
 
@@ -10170,7 +10194,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10170
10194
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
10171
10195
  declarations: [ClrSelect, ClrSelectContainer],
10172
10196
  exports: [ClrCommonFormsModule, ClrSelect, ClrSelectContainer],
10173
- entryComponents: [ClrSelectContainer],
10174
10197
  }]
10175
10198
  }], ctorParameters: function () { return []; } });
10176
10199
 
@@ -10291,7 +10314,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10291
10314
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
10292
10315
  declarations: [ClrTextarea, ClrTextareaContainer],
10293
10316
  exports: [ClrCommonFormsModule, ClrTextarea, ClrTextareaContainer],
10294
- entryComponents: [ClrTextareaContainer],
10295
10317
  }]
10296
10318
  }], ctorParameters: function () { return []; } });
10297
10319
 
@@ -11412,7 +11434,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
11412
11434
  args: [{
11413
11435
  imports: [CommonModule],
11414
11436
  declarations: [CLR_DRAG_AND_DROP_DIRECTIVES],
11415
- entryComponents: [ClrDraggableGhost],
11416
11437
  exports: [CLR_DRAG_AND_DROP_DIRECTIVES],
11417
11438
  }]
11418
11439
  }] });
@@ -11547,7 +11568,11 @@ ClrLoadingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
11547
11568
  ClrLoadingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLoadingModule, imports: [[CommonModule]] });
11548
11569
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLoadingModule, decorators: [{
11549
11570
  type: NgModule,
11550
- args: [{ imports: [CommonModule], declarations: [CLR_LOADING_DIRECTIVES], exports: [CLR_LOADING_DIRECTIVES] }]
11571
+ args: [{
11572
+ imports: [CommonModule],
11573
+ declarations: [CLR_LOADING_DIRECTIVES],
11574
+ exports: [CLR_LOADING_DIRECTIVES],
11575
+ }]
11551
11576
  }] });
11552
11577
 
11553
11578
  /*
@@ -11615,7 +11640,11 @@ ClrOutsideClickModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", v
11615
11640
  ClrOutsideClickModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrOutsideClickModule, imports: [[CommonModule]] });
11616
11641
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrOutsideClickModule, decorators: [{
11617
11642
  type: NgModule,
11618
- args: [{ imports: [CommonModule], declarations: [OUSTIDE_CLICK_DIRECTIVES], exports: [OUSTIDE_CLICK_DIRECTIVES] }]
11643
+ args: [{
11644
+ imports: [CommonModule],
11645
+ declarations: [OUSTIDE_CLICK_DIRECTIVES],
11646
+ exports: [OUSTIDE_CLICK_DIRECTIVES],
11647
+ }]
11619
11648
  }] });
11620
11649
 
11621
11650
  /*
@@ -14505,6 +14534,10 @@ class Selection {
14505
14534
  * Subscriptions to the other providers changes.
14506
14535
  */
14507
14536
  this.subscriptions = [];
14537
+ /**
14538
+ * Shift key state, for use in range selection.
14539
+ */
14540
+ this.shiftPressed = false;
14508
14541
  this.valueCollector = new Subject();
14509
14542
  /**
14510
14543
  * The Observable that lets other classes subscribe to selection changes
@@ -14887,7 +14920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
14887
14920
  */
14888
14921
  let nbRow = 0;
14889
14922
  class ClrDatagridRow {
14890
- constructor(selection, rowActionService, globalExpandable, expand, detailService, displayMode, vcr, renderer, el, commonStrings) {
14923
+ constructor(selection, rowActionService, globalExpandable, expand, detailService, displayMode, vcr, renderer, el, commonStrings, items, document) {
14891
14924
  this.selection = selection;
14892
14925
  this.rowActionService = rowActionService;
14893
14926
  this.globalExpandable = globalExpandable;
@@ -14898,6 +14931,8 @@ class ClrDatagridRow {
14898
14931
  this.renderer = renderer;
14899
14932
  this.el = el;
14900
14933
  this.commonStrings = commonStrings;
14934
+ this.items = items;
14935
+ this.document = document;
14901
14936
  /* reference to the enum so that template can access */
14902
14937
  this.SELECTION_TYPE = SelectionType;
14903
14938
  this.expandAnimationTrigger = false;
@@ -14928,6 +14963,24 @@ class ClrDatagridRow {
14928
14963
  }
14929
14964
  }));
14930
14965
  }
14966
+ /**
14967
+ * The default behavior in Chrome and Firefox for shift-clicking on a label is to perform text-selection.
14968
+ * This prevents our intended range-selection, because this text-selection overrides our shift-click event.
14969
+ * We need to clear the stored selection range when shift-clicking. This will override the mostly unused shift-click
14970
+ * selection browser functionality, which is inconsistently implemented in browsers anyway.
14971
+ */
14972
+ clearRanges(event) {
14973
+ if (event.shiftKey) {
14974
+ this.document.getSelection().removeAllRanges();
14975
+ // Firefox is too persistent about its text-selection behaviour. So we need to add a preventDefault();
14976
+ // We should not try to enforce this on the other browsers, though, because their toggle cycle does not get canceled by
14977
+ // the preventDefault() and they toggle the checkbox second time, effectively retrurning it to not-selected.
14978
+ if (window.navigator.userAgent.indexOf('Firefox') !== -1) {
14979
+ event.preventDefault();
14980
+ this.toggle(true);
14981
+ }
14982
+ }
14983
+ }
14931
14984
  /**
14932
14985
  * Indicates if the row is selected
14933
14986
  */
@@ -14944,6 +14997,12 @@ class ClrDatagridRow {
14944
14997
  this._selected = value;
14945
14998
  }
14946
14999
  else {
15000
+ if (value && this.selection.selectionType === SelectionType.Multi) {
15001
+ this.rangeSelect();
15002
+ }
15003
+ else {
15004
+ this.selection.rangeStart = null;
15005
+ }
14947
15006
  this.selection.setSelected(this.item, value);
14948
15007
  }
14949
15008
  }
@@ -15031,6 +15090,29 @@ class ClrDatagridRow {
15031
15090
  this.expandAnimationTrigger = !this.expandAnimationTrigger;
15032
15091
  }));
15033
15092
  }
15093
+ rangeSelect() {
15094
+ const items = this.items.displayed;
15095
+ if (!items) {
15096
+ return;
15097
+ }
15098
+ const startIx = items.indexOf(this.selection.rangeStart);
15099
+ if (this.selection.rangeStart &&
15100
+ this.selection.current.includes(this.selection.rangeStart) &&
15101
+ this.selection.shiftPressed &&
15102
+ startIx !== -1) {
15103
+ const endIx = items.indexOf(this.item);
15104
+ // Using Set to remove duplicates
15105
+ const newSelection = new Set(this.selection.current.concat(items.slice(Math.min(startIx, endIx), Math.max(startIx, endIx) + 1)));
15106
+ this.selection.clearSelection();
15107
+ this.selection.current.push(...newSelection);
15108
+ }
15109
+ else {
15110
+ // page number has changed or
15111
+ // no Shift was pressed or
15112
+ // rangeStart not yet set
15113
+ this.selection.rangeStart = this.item;
15114
+ }
15115
+ }
15034
15116
  ngOnDestroy() {
15035
15117
  this.subscriptions.forEach((sub) => sub.unsubscribe());
15036
15118
  }
@@ -15042,12 +15124,12 @@ class ClrDatagridRow {
15042
15124
  return this.wrappedInjector.get(WrappedRow, this.vcr).rowView;
15043
15125
  }
15044
15126
  }
15045
- ClrDatagridRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridRow, deps: [{ token: Selection }, { token: RowActionService }, { token: ExpandableRowsCount }, { token: DatagridIfExpandService }, { token: DetailService }, { token: DisplayModeService }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
15127
+ ClrDatagridRow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridRow, deps: [{ token: Selection }, { token: RowActionService }, { token: ExpandableRowsCount }, { token: DatagridIfExpandService }, { token: DetailService }, { token: DisplayModeService }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: ClrCommonStringsService }, { token: Items }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
15046
15128
  ClrDatagridRow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDatagridRow, selector: "clr-dg-row", inputs: { item: ["clrDgItem", "item"], selected: ["clrDgSelected", "selected"], clrDgSelectable: "clrDgSelectable", expanded: ["clrDgExpanded", "expanded"], clrDgDetailOpenLabel: "clrDgDetailOpenLabel", clrDgDetailCloseLabel: "clrDgDetailCloseLabel", clrDgRowAriaLabel: "clrDgRowAriaLabel" }, outputs: { selectedChanged: "clrDgSelectedChange", expandedChange: "clrDgExpandedChange" }, host: { attributes: { "role": "rowgroup" }, properties: { "class.datagrid-row": "true", "class.datagrid-selected": "selected", "attr.aria-owns": "id" } }, providers: [
15047
15129
  DatagridIfExpandService,
15048
15130
  { provide: IfExpandService, useExisting: DatagridIfExpandService },
15049
15131
  { provide: LoadingListener, useExisting: DatagridIfExpandService },
15050
- ], queries: [{ propertyName: "dgCells", predicate: ClrDatagridCell }], viewQueries: [{ propertyName: "expandAnimation", first: true, predicate: ClrExpandableAnimation, descendants: true }, { propertyName: "detailButton", first: true, predicate: ["detailButton"], descendants: true }, { propertyName: "_stickyCells", first: true, predicate: ["stickyCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_scrollableCells", first: true, predicate: ["scrollableCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_calculatedCells", first: true, predicate: ["calculatedCells"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<label class=\"datagrid-row-clickable\" *ngIf=\"selection.rowSelectionMode\">\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</label>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n >\n <!-- TODO: it would be better if in addition to the generic \"Select\" label, we could add aria-labelledby\n to label the radio by the first cell in the row (typically an id or name).\n It's pretty easy to label it with the whole row since we already have an id for it, but in most\n cases the row is far too long to serve as a label, the screenreader reads every single cell content. -->\n <input\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div *ngIf=\"detailService.enabled\" class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\">\n <button\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isOpen\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n", components: [{ type: ClrExpandableAnimation, selector: "clr-expandable-animation", inputs: ["clrExpandTrigger"] }, { type: ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClrLabel, selector: "label", inputs: ["for"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: ClrRadio, selector: "[clrRadio]" }, { type: CdsIconCustomTag, selector: "cds-icon" }] });
15132
+ ], queries: [{ propertyName: "dgCells", predicate: ClrDatagridCell }], viewQueries: [{ propertyName: "expandAnimation", first: true, predicate: ClrExpandableAnimation, descendants: true }, { propertyName: "detailButton", first: true, predicate: ["detailButton"], descendants: true }, { propertyName: "_stickyCells", first: true, predicate: ["stickyCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_scrollableCells", first: true, predicate: ["scrollableCells"], descendants: true, read: ViewContainerRef }, { propertyName: "_calculatedCells", first: true, predicate: ["calculatedCells"], descendants: true, read: ViewContainerRef }], ngImport: i0, template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<label class=\"datagrid-row-clickable\" *ngIf=\"selection.rowSelectionMode\" (mousedown)=\"clearRanges($event)\">\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</label>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\" (click)=\"clearRanges($event)\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n >\n <!-- TODO: it would be better if in addition to the generic \"Select\" label, we could add aria-labelledby\n to label the radio by the first cell in the row (typically an id or name).\n It's pretty easy to label it with the whole row since we already have an id for it, but in most\n cases the row is far too long to serve as a label, the screenreader reads every single cell content. -->\n <input\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div *ngIf=\"detailService.enabled\" class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\">\n <button\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isOpen\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n", components: [{ type: ClrExpandableAnimation, selector: "clr-expandable-animation", inputs: ["clrExpandTrigger"] }, { type: ClrSpinner, selector: "clr-spinner", inputs: ["clrInline", "clrInverse", "clrSmall", "clrMedium"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: ClrLabel, selector: "label", inputs: ["for"] }, { type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: ClrRadio, selector: "[clrRadio]" }, { type: CdsIconCustomTag, selector: "cds-icon" }] });
15051
15133
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridRow, decorators: [{
15052
15134
  type: Component,
15053
15135
  args: [{ selector: 'clr-dg-row', host: {
@@ -15059,8 +15141,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15059
15141
  DatagridIfExpandService,
15060
15142
  { provide: IfExpandService, useExisting: DatagridIfExpandService },
15061
15143
  { provide: LoadingListener, useExisting: DatagridIfExpandService },
15062
- ], template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<label class=\"datagrid-row-clickable\" *ngIf=\"selection.rowSelectionMode\">\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</label>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n >\n <!-- TODO: it would be better if in addition to the generic \"Select\" label, we could add aria-labelledby\n to label the radio by the first cell in the row (typically an id or name).\n It's pretty easy to label it with the whole row since we already have an id for it, but in most\n cases the row is far too long to serve as a label, the screenreader reads every single cell content. -->\n <input\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div *ngIf=\"detailService.enabled\" class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\">\n <button\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isOpen\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n" }]
15063
- }], ctorParameters: function () { return [{ type: Selection }, { type: RowActionService }, { type: ExpandableRowsCount }, { type: DatagridIfExpandService }, { type: DetailService }, { type: DisplayModeService }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ClrCommonStringsService }]; }, propDecorators: { expandAnimation: [{
15144
+ ], template: "<!--\n We need to wrap the #rowContent in label element if we are in rowSelectionMode.\n Clicking of that wrapper label will equate to clicking on the whole row, which triggers the checkbox to toggle.\n-->\n<label class=\"datagrid-row-clickable\" *ngIf=\"selection.rowSelectionMode\" (mousedown)=\"clearRanges($event)\">\n <clr-expandable-animation [clrExpandTrigger]=\"expandAnimationTrigger\" *ngIf=\"expand.expandable\">\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n </clr-expandable-animation>\n <ng-template [ngTemplateOutlet]=\"rowContent\" *ngIf=\"!expand.expandable\"></ng-template>\n</label>\n\n<clr-expandable-animation\n *ngIf=\"!selection.rowSelectionMode && expand.expandable\"\n [clrExpandTrigger]=\"expandAnimationTrigger\"\n>\n <ng-template [ngTemplateOutlet]=\"rowContent\"></ng-template>\n</clr-expandable-animation>\n\n<ng-template *ngIf=\"!selection.rowSelectionMode && !expand.expandable\" [ngTemplateOutlet]=\"rowContent\"></ng-template>\n\n<!--\n We need the \"project into template\" hacks because we need this in 2 different places\n depending on whether the details replace the row or not.\n-->\n<ng-template #detail>\n <ng-content select=\"clr-dg-row-detail\"></ng-content>\n</ng-template>\n\n<ng-template #rowContent>\n <div\n role=\"row\"\n [id]=\"id\"\n class=\"datagrid-row-master datagrid-row-flex\"\n [class.datagrid-row-detail-open]=\"detailService.isRowOpen(item)\"\n >\n <div class=\"datagrid-row-sticky\">\n <!-- Sticky elements here -->\n <ng-container #stickyCells>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n role=\"gridcell\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n type=\"checkbox\"\n [ngModel]=\"selected\"\n (ngModelChange)=\"toggle($event)\"\n [id]=\"checkboxId\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n <!-- Usage of class clr-col-null here prevents clr-col-* classes from being added when a datagrid is wrapped inside clrForm -->\n <label [for]=\"checkboxId\" class=\"clr-control-label clr-col-null\" (click)=\"clearRanges($event)\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.select}}</span>\n </label>\n </div>\n </div>\n <div\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n class=\"datagrid-select datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n [ngClass]=\"{ 'clr-form-control-disabled': !clrDgSelectable }\"\n >\n <!-- TODO: it would be better if in addition to the generic \"Select\" label, we could add aria-labelledby\n to label the radio by the first cell in the row (typically an id or name).\n It's pretty easy to label it with the whole row since we already have an id for it, but in most\n cases the row is far too long to serve as a label, the screenreader reads every single cell content. -->\n <input\n type=\"radio\"\n clrRadio\n [id]=\"radioId\"\n [name]=\"selection.id + '-radio'\"\n [value]=\"item\"\n [(ngModel)]=\"selection.currentSingle\"\n [checked]=\"selection.currentSingle === item\"\n [attr.disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-disabled]=\"clrDgSelectable ? null : true\"\n [attr.aria-label]=\"clrDgRowAriaLabel\"\n />\n </div>\n <div\n *ngIf=\"rowActionService.hasActionableRow\"\n class=\"datagrid-row-actions datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-content select=\"clr-dg-action-overflow\"></ng-content>\n </div>\n <div\n *ngIf=\"globalExpandable.hasExpandableRow\"\n class=\"datagrid-expandable-caret datagrid-fixed-column datagrid-cell\"\n role=\"gridcell\"\n >\n <ng-container *ngIf=\"expand.expandable\">\n <button\n *ngIf=\"!expand.loading\"\n (click)=\"toggleExpand()\"\n type=\"button\"\n class=\"datagrid-expandable-caret-button\"\n [attr.aria-expanded]=\"expand.expanded\"\n [attr.aria-label]=\"expand.expanded ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-controls]=\"expandableId\"\n >\n <cds-icon\n shape=\"angle\"\n class=\"datagrid-expandable-caret-icon\"\n [attr.direction]=\"expand.expanded ? 'down' : 'right'\"\n [attr.title]=\"expand.expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n <clr-spinner *ngIf=\"expand.loading\" clrSmall>{{ commonStrings.keys.loading }}</clr-spinner>\n </ng-container>\n </div>\n <div *ngIf=\"detailService.enabled\" class=\"datagrid-detail-caret datagrid-fixed-column datagrid-cell\">\n <button\n (click)=\"detailService.toggle(item, detailButton)\"\n type=\"button\"\n #detailButton\n class=\"datagrid-detail-caret-button\"\n [class.is-open]=\"detailService.isRowOpen(item)\"\n [attr.aria-label]=\"detailService.isRowOpen(item) ? clrDgDetailCloseLabel : clrDgDetailOpenLabel\"\n [attr.aria-expanded]=\"detailService.isOpen\"\n [attr.aria-controls]=\"detailService.id\"\n aria-haspopup=\"dialog\"\n >\n <cds-icon\n shape=\"angle-double\"\n [attr.direction]=\"detailService.isRowOpen(item) ? 'left' : 'right'\"\n class=\"datagrid-detail-caret-icon\"\n [attr.title]=\"detailService.isRowOpen(item) ? commonStrings.keys.close: commonStrings.keys.open\"\n ></cds-icon>\n </button>\n </div>\n </ng-container>\n <!-- placeholder for projecting other sticky cells as pinned-->\n </div>\n <div class=\"datagrid-row-scrollable\" [ngClass]=\"{'is-replaced': replaced && expanded}\">\n <div class=\"datagrid-scrolling-cells\">\n <ng-content select=\"clr-dg-cell\"></ng-content>\n <ng-container #scrollableCells></ng-container>\n </div>\n <!-- details here when replace, re-visit when sticky container is used for pinned cells -->\n <ng-template *ngIf=\"replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n <ng-template *ngIf=\"!replaced && !expand.loading\" [ngTemplateOutlet]=\"detail\"></ng-template>\n </div>\n </div>\n</ng-template>\n\n<ng-container #calculatedCells></ng-container>\n" }]
15145
+ }], ctorParameters: function () { return [{ type: Selection }, { type: RowActionService }, { type: ExpandableRowsCount }, { type: DatagridIfExpandService }, { type: DetailService }, { type: DisplayModeService }, { type: i0.ViewContainerRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: ClrCommonStringsService }, { type: Items }, { type: undefined, decorators: [{
15146
+ type: Inject,
15147
+ args: [DOCUMENT]
15148
+ }] }]; }, propDecorators: { expandAnimation: [{
15064
15149
  type: ViewChild,
15065
15150
  args: [ClrExpandableAnimation]
15066
15151
  }], item: [{
@@ -15408,7 +15493,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15408
15493
  * The full license information can be found in LICENSE in the root directory of this project.
15409
15494
  */
15410
15495
  class ClrDatagrid {
15411
- constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, el, page, commonStrings, columnsService, keyNavigation) {
15496
+ constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, document, el, page, commonStrings, columnsService, keyNavigation, zone) {
15412
15497
  this.organizer = organizer;
15413
15498
  this.items = items;
15414
15499
  this.expandableRows = expandableRows;
@@ -15418,11 +15503,13 @@ class ClrDatagrid {
15418
15503
  this.displayMode = displayMode;
15419
15504
  this.renderer = renderer;
15420
15505
  this.detailService = detailService;
15506
+ this.document = document;
15421
15507
  this.el = el;
15422
15508
  this.page = page;
15423
15509
  this.commonStrings = commonStrings;
15424
15510
  this.columnsService = columnsService;
15425
15511
  this.keyNavigation = keyNavigation;
15512
+ this.zone = zone;
15426
15513
  /* reference to the enum so that template can access */
15427
15514
  this.SELECTION_TYPE = SelectionType;
15428
15515
  /**
@@ -15607,6 +15694,19 @@ class ClrDatagrid {
15607
15694
  });
15608
15695
  }
15609
15696
  }));
15697
+ // We need to preserve shift state, so it can be used on selection change, regardless of the input event
15698
+ // that triggered the change. This helps us to easily resolve the k/b only case together with the mouse selection case.
15699
+ this.zone.runOutsideAngular(() => {
15700
+ this._subscriptions.push(fromEvent(this.document.body, 'keydown').subscribe((event) => {
15701
+ if (event.key === 'Shift') {
15702
+ this.selection.shiftPressed = true;
15703
+ }
15704
+ }), fromEvent(this.document.body, 'keyup').subscribe((event) => {
15705
+ if (event.key === 'Shift') {
15706
+ this.selection.shiftPressed = false;
15707
+ }
15708
+ }));
15709
+ });
15610
15710
  }
15611
15711
  ngOnDestroy() {
15612
15712
  this._subscriptions.forEach((sub) => sub.unsubscribe());
@@ -15615,7 +15715,7 @@ class ClrDatagrid {
15615
15715
  this.organizer.resize();
15616
15716
  }
15617
15717
  }
15618
- ClrDatagrid.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagrid, deps: [{ token: DatagridRenderOrganizer }, { token: Items }, { token: ExpandableRowsCount }, { token: Selection }, { token: RowActionService }, { token: StateProvider }, { token: DisplayModeService }, { token: i0.Renderer2 }, { token: DetailService }, { token: UNIQUE_ID }, { token: i0.ElementRef }, { token: Page }, { token: ClrCommonStringsService }, { token: ColumnsService }, { token: KeyNavigationGridController }], target: i0.ɵɵFactoryTarget.Component });
15718
+ ClrDatagrid.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagrid, deps: [{ token: DatagridRenderOrganizer }, { token: Items }, { token: ExpandableRowsCount }, { token: Selection }, { token: RowActionService }, { token: StateProvider }, { token: DisplayModeService }, { token: i0.Renderer2 }, { token: DetailService }, { token: UNIQUE_ID }, { token: DOCUMENT }, { token: i0.ElementRef }, { token: Page }, { token: ClrCommonStringsService }, { token: ColumnsService }, { token: KeyNavigationGridController }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
15619
15719
  ClrDatagrid.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDatagrid, selector: "clr-datagrid", inputs: { loading: ["clrDgLoading", "loading"], selected: ["clrDgSelected", "selected"], singleSelected: ["clrDgSingleSelected", "singleSelected"], clrDgSingleSelectionAriaLabel: "clrDgSingleSelectionAriaLabel", clrDgSingleActionableAriaLabel: "clrDgSingleActionableAriaLabel", clrDetailExpandableAriaLabel: "clrDetailExpandableAriaLabel", clrDgDisablePageFocus: "clrDgDisablePageFocus", clrDgPreserveSelection: "clrDgPreserveSelection", rowSelectionMode: ["clrDgRowSelection", "rowSelectionMode"] }, outputs: { refresh: "clrDgRefresh", selectedChanged: "clrDgSelectedChange", singleSelectedChanged: "clrDgSingleSelectedChange" }, host: { properties: { "class.datagrid-host": "true", "class.datagrid-detail-open": "detailService.isOpen" } }, providers: [
15620
15720
  Selection,
15621
15721
  Sort,
@@ -15660,7 +15760,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15660
15760
  }], ctorParameters: function () { return [{ type: DatagridRenderOrganizer }, { type: Items }, { type: ExpandableRowsCount }, { type: Selection }, { type: RowActionService }, { type: StateProvider }, { type: DisplayModeService }, { type: i0.Renderer2 }, { type: DetailService }, { type: undefined, decorators: [{
15661
15761
  type: Inject,
15662
15762
  args: [UNIQUE_ID]
15663
- }] }, { type: i0.ElementRef }, { type: Page }, { type: ClrCommonStringsService }, { type: ColumnsService }, { type: KeyNavigationGridController }]; }, propDecorators: { loading: [{
15763
+ }] }, { type: undefined, decorators: [{
15764
+ type: Inject,
15765
+ args: [DOCUMENT]
15766
+ }] }, { type: i0.ElementRef }, { type: Page }, { type: ClrCommonStringsService }, { type: ColumnsService }, { type: KeyNavigationGridController }, { type: i0.NgZone }]; }, propDecorators: { loading: [{
15664
15767
  type: Input,
15665
15768
  args: ['clrDgLoading']
15666
15769
  }], refresh: [{
@@ -15741,6 +15844,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15741
15844
  }]
15742
15845
  }] });
15743
15846
 
15847
+ /*
15848
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15849
+ * This software is released under MIT license.
15850
+ * The full license information can be found in LICENSE in the root directory of this project.
15851
+ */
15852
+
15744
15853
  /*
15745
15854
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15746
15855
  * This software is released under MIT license.
@@ -15768,7 +15877,7 @@ class ClrDatagridActionOverflow {
15768
15877
  this.subscriptions.push(this.smartToggleService.openChange.subscribe(openState => {
15769
15878
  this.open = openState;
15770
15879
  if (openState) {
15771
- this.focusFirstButton();
15880
+ this.initializeFocus();
15772
15881
  }
15773
15882
  }));
15774
15883
  this.popoverId = 'clr-action-menu' + clrDgActionId++;
@@ -15780,13 +15889,15 @@ class ClrDatagridActionOverflow {
15780
15889
  closeOverflowContent(event) {
15781
15890
  this.smartToggleService.toggleWithEvent(event);
15782
15891
  }
15783
- focusFirstButton() {
15892
+ initializeFocus() {
15784
15893
  if (isPlatformBrowser(this.platformId)) {
15785
15894
  this.zone.runOutsideAngular(() => {
15786
15895
  setTimeout(() => {
15787
- const firstButton = document.querySelector('button.action-item');
15788
- if (firstButton) {
15789
- firstButton.focus();
15896
+ const buttons = Array.from(document.querySelectorAll('button.action-item'));
15897
+ if (buttons.length) {
15898
+ this.keyFocus.current = 0;
15899
+ this.keyFocus.focusableItems = buttons;
15900
+ this.keyFocus.focusCurrent();
15790
15901
  }
15791
15902
  });
15792
15903
  });
@@ -15806,7 +15917,7 @@ class ClrDatagridActionOverflow {
15806
15917
  }
15807
15918
  }
15808
15919
  ClrDatagridActionOverflow.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridActionOverflow, deps: [{ token: RowActionService }, { token: ClrCommonStringsService }, { token: PLATFORM_ID }, { token: i0.NgZone }, { token: ClrPopoverToggleService }, { token: UNIQUE_ID }], target: i0.ɵɵFactoryTarget.Component });
15809
- ClrDatagridActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDatagridActionOverflow, selector: "clr-dg-action-overflow", inputs: { open: ["clrDgActionOverflowOpen", "open"] }, outputs: { openChange: "clrDgActionOverflowOpenChange" }, providers: [UNIQUE_ID_PROVIDER, ClrPopoverToggleService, ClrPopoverEventsService, ClrPopoverPositionService], ngImport: i0, template: `
15920
+ ClrDatagridActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrDatagridActionOverflow, selector: "clr-dg-action-overflow", inputs: { open: ["clrDgActionOverflowOpen", "open"] }, outputs: { openChange: "clrDgActionOverflowOpenChange" }, providers: [UNIQUE_ID_PROVIDER, ClrPopoverToggleService, ClrPopoverEventsService, ClrPopoverPositionService], viewQueries: [{ propertyName: "keyFocus", first: true, predicate: ClrKeyFocus, descendants: true }], ngImport: i0, template: `
15810
15921
  <button
15811
15922
  class="datagrid-action-toggle"
15812
15923
  type="button"
@@ -15827,13 +15938,14 @@ ClrDatagridActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
15827
15938
  [id]="popoverId"
15828
15939
  [attr.aria-hidden]="!open"
15829
15940
  [attr.id]="popoverId"
15941
+ clrKeyFocus
15830
15942
  clrFocusTrap
15831
15943
  (click)="closeOverflowContent($event)"
15832
15944
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
15833
15945
  >
15834
15946
  <ng-content></ng-content>
15835
15947
  </div>
15836
- `, isInline: true, directives: [{ type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { type: CdsIconCustomTag, selector: "cds-icon" }, { type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }] });
15948
+ `, isInline: true, components: [{ type: ClrKeyFocus, selector: "[clrKeyFocus]", inputs: ["clrDirection", "clrFocusOnLoad", "clrKeyFocus"], outputs: ["clrFocusChange"] }], directives: [{ type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { type: CdsIconCustomTag, selector: "cds-icon" }, { type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }] });
15837
15949
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridActionOverflow, decorators: [{
15838
15950
  type: Component,
15839
15951
  args: [{
@@ -15860,6 +15972,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15860
15972
  [id]="popoverId"
15861
15973
  [attr.aria-hidden]="!open"
15862
15974
  [attr.id]="popoverId"
15975
+ clrKeyFocus
15863
15976
  clrFocusTrap
15864
15977
  (click)="closeOverflowContent($event)"
15865
15978
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
@@ -15874,7 +15987,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15874
15987
  }] }, { type: i0.NgZone }, { type: ClrPopoverToggleService }, { type: undefined, decorators: [{
15875
15988
  type: Inject,
15876
15989
  args: [UNIQUE_ID]
15877
- }] }]; }, propDecorators: { open: [{
15990
+ }] }]; }, propDecorators: { keyFocus: [{
15991
+ type: ViewChild,
15992
+ args: [ClrKeyFocus]
15993
+ }], open: [{
15878
15994
  type: Input,
15879
15995
  args: ['clrDgActionOverflowOpen']
15880
15996
  }], openChange: [{
@@ -18175,6 +18291,7 @@ ClrDatagridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
18175
18291
  ClrDragAndDropModule,
18176
18292
  ClrSpinnerModule,
18177
18293
  ClrPopoverModuleNext,
18294
+ ClrKeyFocusModule,
18178
18295
  ClrFocusTrapModule,
18179
18296
  ClrFocusOnViewInitModule], exports: [
18180
18297
  // Core
@@ -18229,6 +18346,7 @@ ClrDatagridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
18229
18346
  ClrDragAndDropModule,
18230
18347
  ClrSpinnerModule,
18231
18348
  ClrPopoverModuleNext,
18349
+ ClrKeyFocusModule,
18232
18350
  ClrFocusTrapModule,
18233
18351
  ClrFocusOnViewInitModule,
18234
18352
  ]] });
@@ -18247,12 +18365,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
18247
18365
  ClrDragAndDropModule,
18248
18366
  ClrSpinnerModule,
18249
18367
  ClrPopoverModuleNext,
18368
+ ClrKeyFocusModule,
18250
18369
  ClrFocusTrapModule,
18251
18370
  ClrFocusOnViewInitModule,
18252
18371
  ],
18253
18372
  declarations: [CLR_DATAGRID_DIRECTIVES],
18254
18373
  exports: [CLR_DATAGRID_DIRECTIVES],
18255
- entryComponents: [WrappedCell, WrappedColumn, WrappedRow],
18256
18374
  }]
18257
18375
  }], ctorParameters: function () { return []; } });
18258
18376
 
@@ -19858,7 +19976,9 @@ ClrDataModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
19858
19976
  ClrDataModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDataModule, imports: [ClrDatagridModule, ClrStackViewModule, ClrTreeViewModule] });
19859
19977
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDataModule, decorators: [{
19860
19978
  type: NgModule,
19861
- args: [{ exports: [ClrDatagridModule, ClrStackViewModule, ClrTreeViewModule] }]
19979
+ args: [{
19980
+ exports: [ClrDatagridModule, ClrStackViewModule, ClrTreeViewModule],
19981
+ }]
19862
19982
  }] });
19863
19983
 
19864
19984
  /*
@@ -21407,7 +21527,9 @@ ClrEmphasisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
21407
21527
  ClrEmphasisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrEmphasisModule, imports: [ClrAlertModule] });
21408
21528
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrEmphasisModule, decorators: [{
21409
21529
  type: NgModule,
21410
- args: [{ exports: [ClrAlertModule] }]
21530
+ args: [{
21531
+ exports: [ClrAlertModule],
21532
+ }]
21411
21533
  }] });
21412
21534
 
21413
21535
  /*
@@ -22193,7 +22315,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
22193
22315
  args: [{
22194
22316
  imports: [CommonModule],
22195
22317
  declarations: [TEMPLATE_REF_DIRECTIVES],
22196
- entryComponents: [TEMPLATE_REF_DIRECTIVES],
22197
22318
  exports: [TEMPLATE_REF_DIRECTIVES],
22198
22319
  }]
22199
22320
  }] });
@@ -23381,7 +23502,9 @@ ClrLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
23381
23502
  ClrLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLayoutModule, imports: [ClrMainContainerModule, ClrNavigationModule, ClrTabsModule, ClrVerticalNavModule] });
23382
23503
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLayoutModule, decorators: [{
23383
23504
  type: NgModule,
23384
- args: [{ exports: [ClrMainContainerModule, ClrNavigationModule, ClrTabsModule, ClrVerticalNavModule] }]
23505
+ args: [{
23506
+ exports: [ClrMainContainerModule, ClrNavigationModule, ClrTabsModule, ClrVerticalNavModule],
23507
+ }]
23385
23508
  }] });
23386
23509
 
23387
23510
  /*
@@ -24106,7 +24229,9 @@ ClrPopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
24106
24229
  ClrPopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrPopoverModule, imports: [ClrDropdownModule, ClrSignpostModule, ClrTooltipModule] });
24107
24230
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrPopoverModule, decorators: [{
24108
24231
  type: NgModule,
24109
- args: [{ exports: [ClrDropdownModule, ClrSignpostModule, ClrTooltipModule] }]
24232
+ args: [{
24233
+ exports: [ClrDropdownModule, ClrSignpostModule, ClrTooltipModule],
24234
+ }]
24110
24235
  }] });
24111
24236
 
24112
24237
  /*