@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
  /*
@@ -326,6 +330,7 @@ const commonStringsDefault = {
326
330
  datepickerCurrentDecade: 'Current decade',
327
331
  datepickerSelectMonthText: 'Select month, the current month is {CALENDAR_MONTH}',
328
332
  datepickerSelectYearText: 'Select year, the current year is {CALENDAR_YEAR}',
333
+ datepickerSelectedLabel: '{FULL_DATE} - Selected',
329
334
  // Stack View
330
335
  stackViewChanged: 'Value changed.',
331
336
  // Responsive Nav
@@ -1200,9 +1205,7 @@ class ClrStepper {
1200
1205
  this.subscriptions.forEach(s => s.unsubscribe());
1201
1206
  }
1202
1207
  listenForFormResetChanges() {
1203
- return this.form.statusChanges
1204
- .pipe(filter(() => this.form.pristine)) // https://github.com/angular/angular/issues/10887
1205
- .subscribe(() => this.stepperService.resetPanels());
1208
+ return fromControlReset(this.form.form).subscribe(() => this.stepperService.resetPanels());
1206
1209
  }
1207
1210
  listenForPanelsCompleted() {
1208
1211
  return this.stepperService.panelsCompleted.subscribe(panelsCompleted => {
@@ -1254,6 +1257,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
1254
1257
  type: ContentChildren,
1255
1258
  args: [ClrStepperPanel, { descendants: true }]
1256
1259
  }] } });
1260
+ function fromControlReset(control) {
1261
+ return new Observable(observer => {
1262
+ const unpatchedControlReset = control.reset;
1263
+ control.reset = () => {
1264
+ observer.next();
1265
+ unpatchedControlReset.apply(control);
1266
+ };
1267
+ return () => {
1268
+ control.reset = unpatchedControlReset;
1269
+ };
1270
+ });
1271
+ }
1257
1272
 
1258
1273
  /*
1259
1274
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -2975,7 +2990,10 @@ ClrHostWrappingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", v
2975
2990
  ClrHostWrappingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrHostWrappingModule });
2976
2991
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrHostWrappingModule, decorators: [{
2977
2992
  type: NgModule,
2978
- args: [{ declarations: [EmptyAnchor], exports: [EmptyAnchor], entryComponents: [EmptyAnchor] }]
2993
+ args: [{
2994
+ declarations: [EmptyAnchor],
2995
+ exports: [EmptyAnchor],
2996
+ }]
2979
2997
  }] });
2980
2998
 
2981
2999
  /*
@@ -4143,7 +4161,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
4143
4161
  ClrControlContainer,
4144
4162
  ClrControl,
4145
4163
  ],
4146
- entryComponents: [ClrControlContainer],
4147
4164
  }]
4148
4165
  }], ctorParameters: function () { return []; } });
4149
4166
 
@@ -4384,7 +4401,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
4384
4401
  imports: [CommonModule, ClrIconModule, ClrCommonFormsModule, ClrHostWrappingModule],
4385
4402
  declarations: [ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],
4386
4403
  exports: [ClrCommonFormsModule, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxWrapper],
4387
- entryComponents: [ClrCheckboxWrapper],
4388
4404
  }]
4389
4405
  }], ctorParameters: function () { return []; } });
4390
4406
 
@@ -4876,7 +4892,11 @@ ClrConditionalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", ve
4876
4892
  ClrConditionalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrConditionalModule, imports: [[CommonModule]] });
4877
4893
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrConditionalModule, decorators: [{
4878
4894
  type: NgModule,
4879
- args: [{ imports: [CommonModule], declarations: [CONDITIONAL_DIRECTIVES], exports: [CONDITIONAL_DIRECTIVES] }]
4895
+ args: [{
4896
+ imports: [CommonModule],
4897
+ declarations: [CONDITIONAL_DIRECTIVES],
4898
+ exports: [CONDITIONAL_DIRECTIVES],
4899
+ }]
4880
4900
  }] });
4881
4901
 
4882
4902
  /*
@@ -6793,7 +6813,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
6793
6813
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
6794
6814
  declarations: [ClrInput, ClrInputContainer],
6795
6815
  exports: [ClrCommonFormsModule, ClrInput, ClrInputContainer],
6796
- entryComponents: [ClrInputContainer],
6797
6816
  }]
6798
6817
  }], ctorParameters: function () { return []; } });
6799
6818
 
@@ -8138,21 +8157,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8138
8157
  * The full license information can be found in LICENSE in the root directory of this project.
8139
8158
  */
8140
8159
  class ClrDay {
8141
- constructor(_dateNavigationService, _toggleService, dateFormControlService) {
8160
+ constructor(_dateNavigationService, _toggleService, dateFormControlService, commonStrings) {
8142
8161
  this._dateNavigationService = _dateNavigationService;
8143
8162
  this._toggleService = _toggleService;
8144
8163
  this.dateFormControlService = dateFormControlService;
8164
+ this.commonStrings = commonStrings;
8145
8165
  }
8146
8166
  /**
8147
8167
  * DayViewModel input which is used to build the Day View.
8148
8168
  */
8149
8169
  set dayView(day) {
8150
8170
  this._dayView = day;
8151
- this.dayString = this._dayView.dayModel.toDateString();
8152
8171
  }
8153
8172
  get dayView() {
8154
8173
  return this._dayView;
8155
8174
  }
8175
+ get dayString() {
8176
+ return this.dayView.isSelected
8177
+ ? this.commonStrings.parse(this.commonStrings.keys.datepickerSelectedLabel, {
8178
+ FULL_DATE: this._dayView.dayModel.toDateString(),
8179
+ })
8180
+ : this._dayView.dayModel.toDateString();
8181
+ }
8156
8182
  /**
8157
8183
  * Updates the focusedDay in the DateNavigationService when the ClrDay is focused.
8158
8184
  */
@@ -8169,7 +8195,7 @@ class ClrDay {
8169
8195
  this._toggleService.open = false;
8170
8196
  }
8171
8197
  }
8172
- 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 });
8198
+ 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 });
8173
8199
  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: `
8174
8200
  <button
8175
8201
  class="day-btn"
@@ -8181,6 +8207,7 @@ ClrDay.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.
8181
8207
  [attr.tabindex]="dayView.tabIndex"
8182
8208
  (click)="selectDay()"
8183
8209
  (focus)="onDayViewFocus()"
8210
+ [attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
8184
8211
  [attr.aria-label]="dayString"
8185
8212
  [attr.aria-selected]="dayView.isSelected"
8186
8213
  >
@@ -8202,6 +8229,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8202
8229
  [attr.tabindex]="dayView.tabIndex"
8203
8230
  (click)="selectDay()"
8204
8231
  (focus)="onDayViewFocus()"
8232
+ [attr.aria-current]="dayView.isTodaysDate ? 'date' : 'false'"
8205
8233
  [attr.aria-label]="dayString"
8206
8234
  [attr.aria-selected]="dayView.isSelected"
8207
8235
  >
@@ -8210,7 +8238,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
8210
8238
  `,
8211
8239
  host: { '[class.day]': 'true' },
8212
8240
  }]
8213
- }], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }]; }, propDecorators: { dayView: [{
8241
+ }], ctorParameters: function () { return [{ type: DateNavigationService }, { type: ClrPopoverToggleService }, { type: DateFormControlService }, { type: ClrCommonStringsService }]; }, propDecorators: { dayView: [{
8214
8242
  type: Input,
8215
8243
  args: ['clrDayView']
8216
8244
  }] } });
@@ -9510,7 +9538,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9510
9538
  ],
9511
9539
  declarations: [CLR_DATEPICKER_DIRECTIVES],
9512
9540
  exports: [CLR_DATEPICKER_DIRECTIVES],
9513
- entryComponents: [ClrDateContainer],
9514
9541
  }]
9515
9542
  }], ctorParameters: function () { return []; } });
9516
9543
 
@@ -9748,7 +9775,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9748
9775
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
9749
9776
  declarations: [ClrPassword, ClrPasswordContainer],
9750
9777
  exports: [ClrCommonFormsModule, ClrPassword, ClrPasswordContainer],
9751
- entryComponents: [ClrPasswordContainer],
9752
9778
  }]
9753
9779
  }], ctorParameters: function () { return []; } });
9754
9780
 
@@ -9953,7 +9979,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
9953
9979
  imports: [CommonModule, ClrCommonFormsModule, ClrHostWrappingModule, ClrIconModule],
9954
9980
  declarations: [ClrRadio, ClrRadioContainer, ClrRadioWrapper],
9955
9981
  exports: [ClrCommonFormsModule, ClrRadio, ClrRadioContainer, ClrRadioWrapper],
9956
- entryComponents: [ClrRadioWrapper],
9957
9982
  }]
9958
9983
  }], ctorParameters: function () { return []; } });
9959
9984
 
@@ -10113,7 +10138,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10113
10138
  imports: [CommonModule, ClrCommonFormsModule, ClrHostWrappingModule, ClrIconModule],
10114
10139
  declarations: [ClrRange, ClrRangeContainer],
10115
10140
  exports: [ClrCommonFormsModule, ClrRange, ClrRangeContainer],
10116
- entryComponents: [ClrRangeContainer],
10117
10141
  }]
10118
10142
  }], ctorParameters: function () { return []; } });
10119
10143
 
@@ -10263,7 +10287,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10263
10287
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
10264
10288
  declarations: [ClrSelect, ClrSelectContainer],
10265
10289
  exports: [ClrCommonFormsModule, ClrSelect, ClrSelectContainer],
10266
- entryComponents: [ClrSelectContainer],
10267
10290
  }]
10268
10291
  }], ctorParameters: function () { return []; } });
10269
10292
 
@@ -10386,7 +10409,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
10386
10409
  imports: [CommonModule, FormsModule, ClrIconModule, ClrCommonFormsModule],
10387
10410
  declarations: [ClrTextarea, ClrTextareaContainer],
10388
10411
  exports: [ClrCommonFormsModule, ClrTextarea, ClrTextareaContainer],
10389
- entryComponents: [ClrTextareaContainer],
10390
10412
  }]
10391
10413
  }], ctorParameters: function () { return []; } });
10392
10414
 
@@ -11513,7 +11535,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
11513
11535
  args: [{
11514
11536
  imports: [CommonModule],
11515
11537
  declarations: [CLR_DRAG_AND_DROP_DIRECTIVES],
11516
- entryComponents: [ClrDraggableGhost],
11517
11538
  exports: [CLR_DRAG_AND_DROP_DIRECTIVES],
11518
11539
  }]
11519
11540
  }] });
@@ -11650,7 +11671,11 @@ ClrLoadingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
11650
11671
  ClrLoadingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLoadingModule, imports: [[CommonModule]] });
11651
11672
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLoadingModule, decorators: [{
11652
11673
  type: NgModule,
11653
- args: [{ imports: [CommonModule], declarations: [CLR_LOADING_DIRECTIVES], exports: [CLR_LOADING_DIRECTIVES] }]
11674
+ args: [{
11675
+ imports: [CommonModule],
11676
+ declarations: [CLR_LOADING_DIRECTIVES],
11677
+ exports: [CLR_LOADING_DIRECTIVES],
11678
+ }]
11654
11679
  }] });
11655
11680
 
11656
11681
  /*
@@ -11718,7 +11743,11 @@ ClrOutsideClickModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", v
11718
11743
  ClrOutsideClickModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrOutsideClickModule, imports: [[CommonModule]] });
11719
11744
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrOutsideClickModule, decorators: [{
11720
11745
  type: NgModule,
11721
- args: [{ imports: [CommonModule], declarations: [OUSTIDE_CLICK_DIRECTIVES], exports: [OUSTIDE_CLICK_DIRECTIVES] }]
11746
+ args: [{
11747
+ imports: [CommonModule],
11748
+ declarations: [OUSTIDE_CLICK_DIRECTIVES],
11749
+ exports: [OUSTIDE_CLICK_DIRECTIVES],
11750
+ }]
11722
11751
  }] });
11723
11752
 
11724
11753
  /*
@@ -14620,6 +14649,10 @@ class Selection {
14620
14649
  * Subscriptions to the other providers changes.
14621
14650
  */
14622
14651
  this.subscriptions = [];
14652
+ /**
14653
+ * Shift key state, for use in range selection.
14654
+ */
14655
+ this.shiftPressed = false;
14623
14656
  this.valueCollector = new Subject();
14624
14657
  /**
14625
14658
  * The Observable that lets other classes subscribe to selection changes
@@ -15002,7 +15035,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15002
15035
  */
15003
15036
  let nbRow = 0;
15004
15037
  class ClrDatagridRow {
15005
- constructor(selection, rowActionService, globalExpandable, expand, detailService, displayMode, vcr, renderer, el, commonStrings) {
15038
+ constructor(selection, rowActionService, globalExpandable, expand, detailService, displayMode, vcr, renderer, el, commonStrings, items, document) {
15006
15039
  this.selection = selection;
15007
15040
  this.rowActionService = rowActionService;
15008
15041
  this.globalExpandable = globalExpandable;
@@ -15013,6 +15046,8 @@ class ClrDatagridRow {
15013
15046
  this.renderer = renderer;
15014
15047
  this.el = el;
15015
15048
  this.commonStrings = commonStrings;
15049
+ this.items = items;
15050
+ this.document = document;
15016
15051
  /* reference to the enum so that template can access */
15017
15052
  this.SELECTION_TYPE = SelectionType;
15018
15053
  this.expandAnimationTrigger = false;
@@ -15043,6 +15078,24 @@ class ClrDatagridRow {
15043
15078
  }
15044
15079
  }));
15045
15080
  }
15081
+ /**
15082
+ * The default behavior in Chrome and Firefox for shift-clicking on a label is to perform text-selection.
15083
+ * This prevents our intended range-selection, because this text-selection overrides our shift-click event.
15084
+ * We need to clear the stored selection range when shift-clicking. This will override the mostly unused shift-click
15085
+ * selection browser functionality, which is inconsistently implemented in browsers anyway.
15086
+ */
15087
+ clearRanges(event) {
15088
+ if (event.shiftKey) {
15089
+ this.document.getSelection().removeAllRanges();
15090
+ // Firefox is too persistent about its text-selection behaviour. So we need to add a preventDefault();
15091
+ // We should not try to enforce this on the other browsers, though, because their toggle cycle does not get canceled by
15092
+ // the preventDefault() and they toggle the checkbox second time, effectively retrurning it to not-selected.
15093
+ if (window.navigator.userAgent.indexOf('Firefox') !== -1) {
15094
+ event.preventDefault();
15095
+ this.toggle(true);
15096
+ }
15097
+ }
15098
+ }
15046
15099
  /**
15047
15100
  * Indicates if the row is selected
15048
15101
  */
@@ -15059,6 +15112,12 @@ class ClrDatagridRow {
15059
15112
  this._selected = value;
15060
15113
  }
15061
15114
  else {
15115
+ if (value && this.selection.selectionType === SelectionType.Multi) {
15116
+ this.rangeSelect();
15117
+ }
15118
+ else {
15119
+ this.selection.rangeStart = null;
15120
+ }
15062
15121
  this.selection.setSelected(this.item, value);
15063
15122
  }
15064
15123
  }
@@ -15146,6 +15205,29 @@ class ClrDatagridRow {
15146
15205
  this.expandAnimationTrigger = !this.expandAnimationTrigger;
15147
15206
  }));
15148
15207
  }
15208
+ rangeSelect() {
15209
+ const items = this.items.displayed;
15210
+ if (!items) {
15211
+ return;
15212
+ }
15213
+ const startIx = items.indexOf(this.selection.rangeStart);
15214
+ if (this.selection.rangeStart &&
15215
+ this.selection.current.includes(this.selection.rangeStart) &&
15216
+ this.selection.shiftPressed &&
15217
+ startIx !== -1) {
15218
+ const endIx = items.indexOf(this.item);
15219
+ // Using Set to remove duplicates
15220
+ const newSelection = new Set(this.selection.current.concat(items.slice(Math.min(startIx, endIx), Math.max(startIx, endIx) + 1)));
15221
+ this.selection.clearSelection();
15222
+ this.selection.current.push(...newSelection);
15223
+ }
15224
+ else {
15225
+ // page number has changed or
15226
+ // no Shift was pressed or
15227
+ // rangeStart not yet set
15228
+ this.selection.rangeStart = this.item;
15229
+ }
15230
+ }
15149
15231
  ngOnDestroy() {
15150
15232
  this.subscriptions.forEach((sub) => sub.unsubscribe());
15151
15233
  }
@@ -15157,12 +15239,12 @@ class ClrDatagridRow {
15157
15239
  return this.wrappedInjector.get(WrappedRow, this.vcr).rowView;
15158
15240
  }
15159
15241
  }
15160
- 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 });
15242
+ 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 });
15161
15243
  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: [
15162
15244
  DatagridIfExpandService,
15163
15245
  { provide: IfExpandService, useExisting: DatagridIfExpandService },
15164
15246
  { provide: LoadingListener, useExisting: DatagridIfExpandService },
15165
- ], 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" }] });
15247
+ ], 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" }] });
15166
15248
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridRow, decorators: [{
15167
15249
  type: Component,
15168
15250
  args: [{ selector: 'clr-dg-row', host: {
@@ -15174,8 +15256,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15174
15256
  DatagridIfExpandService,
15175
15257
  { provide: IfExpandService, useExisting: DatagridIfExpandService },
15176
15258
  { provide: LoadingListener, useExisting: DatagridIfExpandService },
15177
- ], 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" }]
15178
- }], 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: [{
15259
+ ], 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" }]
15260
+ }], ctorParameters: function () {
15261
+ 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: [{
15262
+ type: Inject,
15263
+ args: [DOCUMENT]
15264
+ }] }];
15265
+ }, propDecorators: { expandAnimation: [{
15179
15266
  type: ViewChild,
15180
15267
  args: [ClrExpandableAnimation]
15181
15268
  }], item: [{
@@ -15528,7 +15615,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15528
15615
  * The full license information can be found in LICENSE in the root directory of this project.
15529
15616
  */
15530
15617
  class ClrDatagrid {
15531
- constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, el, page, commonStrings, columnsService, keyNavigation) {
15618
+ constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, document, el, page, commonStrings, columnsService, keyNavigation, zone) {
15532
15619
  this.organizer = organizer;
15533
15620
  this.items = items;
15534
15621
  this.expandableRows = expandableRows;
@@ -15538,11 +15625,13 @@ class ClrDatagrid {
15538
15625
  this.displayMode = displayMode;
15539
15626
  this.renderer = renderer;
15540
15627
  this.detailService = detailService;
15628
+ this.document = document;
15541
15629
  this.el = el;
15542
15630
  this.page = page;
15543
15631
  this.commonStrings = commonStrings;
15544
15632
  this.columnsService = columnsService;
15545
15633
  this.keyNavigation = keyNavigation;
15634
+ this.zone = zone;
15546
15635
  /* reference to the enum so that template can access */
15547
15636
  this.SELECTION_TYPE = SelectionType;
15548
15637
  /**
@@ -15727,6 +15816,19 @@ class ClrDatagrid {
15727
15816
  });
15728
15817
  }
15729
15818
  }));
15819
+ // We need to preserve shift state, so it can be used on selection change, regardless of the input event
15820
+ // that triggered the change. This helps us to easily resolve the k/b only case together with the mouse selection case.
15821
+ this.zone.runOutsideAngular(() => {
15822
+ this._subscriptions.push(fromEvent(this.document.body, 'keydown').subscribe((event) => {
15823
+ if (event.key === 'Shift') {
15824
+ this.selection.shiftPressed = true;
15825
+ }
15826
+ }), fromEvent(this.document.body, 'keyup').subscribe((event) => {
15827
+ if (event.key === 'Shift') {
15828
+ this.selection.shiftPressed = false;
15829
+ }
15830
+ }));
15831
+ });
15730
15832
  }
15731
15833
  ngOnDestroy() {
15732
15834
  this._subscriptions.forEach((sub) => sub.unsubscribe());
@@ -15735,7 +15837,7 @@ class ClrDatagrid {
15735
15837
  this.organizer.resize();
15736
15838
  }
15737
15839
  }
15738
- 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 });
15840
+ 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 });
15739
15841
  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: [
15740
15842
  Selection,
15741
15843
  Sort,
@@ -15781,7 +15883,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15781
15883
  return [{ type: DatagridRenderOrganizer }, { type: Items }, { type: ExpandableRowsCount }, { type: Selection }, { type: RowActionService }, { type: StateProvider }, { type: DisplayModeService }, { type: i0.Renderer2 }, { type: DetailService }, { type: undefined, decorators: [{
15782
15884
  type: Inject,
15783
15885
  args: [UNIQUE_ID]
15784
- }] }, { type: i0.ElementRef }, { type: Page }, { type: ClrCommonStringsService }, { type: ColumnsService }, { type: KeyNavigationGridController }];
15886
+ }] }, { type: undefined, decorators: [{
15887
+ type: Inject,
15888
+ args: [DOCUMENT]
15889
+ }] }, { type: i0.ElementRef }, { type: Page }, { type: ClrCommonStringsService }, { type: ColumnsService }, { type: KeyNavigationGridController }, { type: i0.NgZone }];
15785
15890
  }, propDecorators: { loading: [{
15786
15891
  type: Input,
15787
15892
  args: ['clrDgLoading']
@@ -15863,6 +15968,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15863
15968
  }]
15864
15969
  }] });
15865
15970
 
15971
+ /*
15972
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15973
+ * This software is released under MIT license.
15974
+ * The full license information can be found in LICENSE in the root directory of this project.
15975
+ */
15976
+
15866
15977
  /*
15867
15978
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15868
15979
  * This software is released under MIT license.
@@ -15890,7 +16001,7 @@ class ClrDatagridActionOverflow {
15890
16001
  this.subscriptions.push(this.smartToggleService.openChange.subscribe(openState => {
15891
16002
  this.open = openState;
15892
16003
  if (openState) {
15893
- this.focusFirstButton();
16004
+ this.initializeFocus();
15894
16005
  }
15895
16006
  }));
15896
16007
  this.popoverId = 'clr-action-menu' + clrDgActionId++;
@@ -15902,13 +16013,15 @@ class ClrDatagridActionOverflow {
15902
16013
  closeOverflowContent(event) {
15903
16014
  this.smartToggleService.toggleWithEvent(event);
15904
16015
  }
15905
- focusFirstButton() {
16016
+ initializeFocus() {
15906
16017
  if (isPlatformBrowser(this.platformId)) {
15907
16018
  this.zone.runOutsideAngular(() => {
15908
16019
  setTimeout(() => {
15909
- const firstButton = document.querySelector('button.action-item');
15910
- if (firstButton) {
15911
- firstButton.focus();
16020
+ const buttons = Array.from(document.querySelectorAll('button.action-item'));
16021
+ if (buttons.length) {
16022
+ this.keyFocus.current = 0;
16023
+ this.keyFocus.focusableItems = buttons;
16024
+ this.keyFocus.focusCurrent();
15912
16025
  }
15913
16026
  });
15914
16027
  });
@@ -15928,7 +16041,7 @@ class ClrDatagridActionOverflow {
15928
16041
  }
15929
16042
  }
15930
16043
  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 });
15931
- 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: `
16044
+ 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: `
15932
16045
  <button
15933
16046
  class="datagrid-action-toggle"
15934
16047
  type="button"
@@ -15949,13 +16062,14 @@ ClrDatagridActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.
15949
16062
  [id]="popoverId"
15950
16063
  [attr.aria-hidden]="!open"
15951
16064
  [attr.id]="popoverId"
16065
+ clrKeyFocus
15952
16066
  clrFocusTrap
15953
16067
  (click)="closeOverflowContent($event)"
15954
16068
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
15955
16069
  >
15956
16070
  <ng-content></ng-content>
15957
16071
  </div>
15958
- `, 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"] }] });
16072
+ `, 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"] }] });
15959
16073
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDatagridActionOverflow, decorators: [{
15960
16074
  type: Component,
15961
16075
  args: [{
@@ -15982,6 +16096,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15982
16096
  [id]="popoverId"
15983
16097
  [attr.aria-hidden]="!open"
15984
16098
  [attr.id]="popoverId"
16099
+ clrKeyFocus
15985
16100
  clrFocusTrap
15986
16101
  (click)="closeOverflowContent($event)"
15987
16102
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
@@ -15998,7 +16113,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15998
16113
  type: Inject,
15999
16114
  args: [UNIQUE_ID]
16000
16115
  }] }];
16001
- }, propDecorators: { open: [{
16116
+ }, propDecorators: { keyFocus: [{
16117
+ type: ViewChild,
16118
+ args: [ClrKeyFocus]
16119
+ }], open: [{
16002
16120
  type: Input,
16003
16121
  args: ['clrDgActionOverflowOpen']
16004
16122
  }], openChange: [{
@@ -18291,6 +18409,7 @@ ClrDatagridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
18291
18409
  ClrDragAndDropModule,
18292
18410
  ClrSpinnerModule,
18293
18411
  ClrPopoverModuleNext,
18412
+ ClrKeyFocusModule,
18294
18413
  ClrFocusTrapModule,
18295
18414
  ClrFocusOnViewInitModule], exports: [
18296
18415
  // Core
@@ -18346,6 +18465,7 @@ ClrDatagridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
18346
18465
  ClrDragAndDropModule,
18347
18466
  ClrSpinnerModule,
18348
18467
  ClrPopoverModuleNext,
18468
+ ClrKeyFocusModule,
18349
18469
  ClrFocusTrapModule,
18350
18470
  ClrFocusOnViewInitModule,
18351
18471
  ]] });
@@ -18364,12 +18484,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
18364
18484
  ClrDragAndDropModule,
18365
18485
  ClrSpinnerModule,
18366
18486
  ClrPopoverModuleNext,
18487
+ ClrKeyFocusModule,
18367
18488
  ClrFocusTrapModule,
18368
18489
  ClrFocusOnViewInitModule,
18369
18490
  ],
18370
18491
  declarations: [CLR_DATAGRID_DIRECTIVES],
18371
18492
  exports: [CLR_DATAGRID_DIRECTIVES],
18372
- entryComponents: [WrappedCell, WrappedColumn, WrappedRow],
18373
18493
  }]
18374
18494
  }], ctorParameters: function () { return []; } });
18375
18495
 
@@ -19985,7 +20105,9 @@ ClrDataModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
19985
20105
  ClrDataModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDataModule, imports: [ClrDatagridModule, ClrStackViewModule, ClrTreeViewModule] });
19986
20106
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrDataModule, decorators: [{
19987
20107
  type: NgModule,
19988
- args: [{ exports: [ClrDatagridModule, ClrStackViewModule, ClrTreeViewModule] }]
20108
+ args: [{
20109
+ exports: [ClrDatagridModule, ClrStackViewModule, ClrTreeViewModule],
20110
+ }]
19989
20111
  }] });
19990
20112
 
19991
20113
  /*
@@ -21547,7 +21669,9 @@ ClrEmphasisModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versi
21547
21669
  ClrEmphasisModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrEmphasisModule, imports: [ClrAlertModule] });
21548
21670
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrEmphasisModule, decorators: [{
21549
21671
  type: NgModule,
21550
- args: [{ exports: [ClrAlertModule] }]
21672
+ args: [{
21673
+ exports: [ClrAlertModule],
21674
+ }]
21551
21675
  }] });
21552
21676
 
21553
21677
  /*
@@ -22337,7 +22461,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
22337
22461
  args: [{
22338
22462
  imports: [CommonModule],
22339
22463
  declarations: [TEMPLATE_REF_DIRECTIVES],
22340
- entryComponents: [TEMPLATE_REF_DIRECTIVES],
22341
22464
  exports: [TEMPLATE_REF_DIRECTIVES],
22342
22465
  }]
22343
22466
  }] });
@@ -23537,7 +23660,9 @@ ClrLayoutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version
23537
23660
  ClrLayoutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLayoutModule, imports: [ClrMainContainerModule, ClrNavigationModule, ClrTabsModule, ClrVerticalNavModule] });
23538
23661
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrLayoutModule, decorators: [{
23539
23662
  type: NgModule,
23540
- args: [{ exports: [ClrMainContainerModule, ClrNavigationModule, ClrTabsModule, ClrVerticalNavModule] }]
23663
+ args: [{
23664
+ exports: [ClrMainContainerModule, ClrNavigationModule, ClrTabsModule, ClrVerticalNavModule],
23665
+ }]
23541
23666
  }] });
23542
23667
 
23543
23668
  /*
@@ -24270,7 +24395,9 @@ ClrPopoverModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", versio
24270
24395
  ClrPopoverModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrPopoverModule, imports: [ClrDropdownModule, ClrSignpostModule, ClrTooltipModule] });
24271
24396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrPopoverModule, decorators: [{
24272
24397
  type: NgModule,
24273
- args: [{ exports: [ClrDropdownModule, ClrSignpostModule, ClrTooltipModule] }]
24398
+ args: [{
24399
+ exports: [ClrDropdownModule, ClrSignpostModule, ClrTooltipModule],
24400
+ }]
24274
24401
  }] });
24275
24402
 
24276
24403
  /*