@clr/angular 12.1.3 → 12.3.1

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 (95) hide show
  1. package/bundles/clr-angular.umd.js +331 -87
  2. package/bundles/clr-angular.umd.js.map +1 -1
  3. package/clarity.api.md +24 -2
  4. package/clr-angular.metadata.json +1 -1
  5. package/data/datagrid/built-in/filters/datagrid-numeric-filter.d.ts +7 -0
  6. package/data/datagrid/built-in/filters/datagrid-string-filter.d.ts +5 -0
  7. package/data/datagrid/datagrid-column.d.ts +9 -0
  8. package/data/datagrid/datagrid-row.d.ts +12 -1
  9. package/data/datagrid/datagrid.d.ts +4 -2
  10. package/data/datagrid/providers/selection.d.ts +8 -0
  11. package/esm2015/accordion/chocolate/accordion-oompa-loompa.js +4 -2
  12. package/esm2015/accordion/chocolate/accordion-willy-wonka.js +4 -2
  13. package/esm2015/accordion/stepper/chocolate/stepper-oompa-loompa.js +4 -2
  14. package/esm2015/accordion/stepper/chocolate/stepper-willy-wonka.js +4 -2
  15. package/esm2015/accordion/stepper/stepper.js +16 -5
  16. package/esm2015/data/datagrid/built-in/filters/datagrid-numeric-filter.js +13 -5
  17. package/esm2015/data/datagrid/built-in/filters/datagrid-string-filter.js +7 -2
  18. package/esm2015/data/datagrid/chocolate/actionable-oompa-loompa.js +4 -2
  19. package/esm2015/data/datagrid/chocolate/datagrid-willy-wonka.js +4 -2
  20. package/esm2015/data/datagrid/chocolate/expandable-oompa-loompa.js +4 -2
  21. package/esm2015/data/datagrid/datagrid-action-bar.js +2 -2
  22. package/esm2015/data/datagrid/datagrid-cell.js +2 -2
  23. package/esm2015/data/datagrid/datagrid-column.js +16 -1
  24. package/esm2015/data/datagrid/datagrid-detail-registerer.js +4 -2
  25. package/esm2015/data/datagrid/datagrid-hideable-column.js +4 -2
  26. package/esm2015/data/datagrid/datagrid-row.js +58 -5
  27. package/esm2015/data/datagrid/datagrid.js +23 -5
  28. package/esm2015/data/datagrid/providers/selection.js +5 -1
  29. package/esm2015/data/datagrid/render/cell-renderer.js +4 -2
  30. package/esm2015/data/datagrid/render/header-renderer.js +5 -2
  31. package/esm2015/data/datagrid/render/row-renderer.js +4 -2
  32. package/esm2015/data/stack-view/stack-view-custom-tags.js +4 -2
  33. package/esm2015/data/tree-view/recursive-for-of.js +4 -2
  34. package/esm2015/data/tree-view/tree-node.js +2 -2
  35. package/esm2015/emphasis/alert/alerts.js +2 -2
  36. package/esm2015/forms/checkbox/checkbox.js +4 -2
  37. package/esm2015/forms/combobox/combobox.js +2 -2
  38. package/esm2015/forms/combobox/option-selected.directive.js +4 -2
  39. package/esm2015/forms/combobox/option.js +5 -3
  40. package/esm2015/forms/common/control.js +5 -2
  41. package/esm2015/forms/common/error.js +2 -2
  42. package/esm2015/forms/common/helper.js +2 -2
  43. package/esm2015/forms/common/if-control-state/if-error.js +4 -2
  44. package/esm2015/forms/common/if-control-state/if-success.js +4 -2
  45. package/esm2015/forms/common/label.js +4 -2
  46. package/esm2015/forms/common/success.js +2 -2
  47. package/esm2015/forms/datepicker/calendar.js +5 -2
  48. package/esm2015/forms/input/input.js +5 -2
  49. package/esm2015/forms/password/password-container.js +4 -4
  50. package/esm2015/forms/password/password.js +5 -2
  51. package/esm2015/forms/radio/radio.js +4 -2
  52. package/esm2015/forms/range/range.js +5 -2
  53. package/esm2015/forms/select/select.js +5 -2
  54. package/esm2015/forms/textarea/textarea.js +5 -2
  55. package/esm2015/icon/icon.js +7 -3
  56. package/esm2015/layout/main-container/main-container.js +5 -2
  57. package/esm2015/layout/nav/chocolate/main-container-willy-wonka.js +4 -2
  58. package/esm2015/layout/nav/chocolate/nav-detection-oompa-loompa.js +4 -2
  59. package/esm2015/layout/nav/nav-level.js +4 -2
  60. package/esm2015/layout/tabs/chocolate/active-oompa-loompa.js +4 -2
  61. package/esm2015/layout/tabs/chocolate/tabs-willy-wonka.js +4 -2
  62. package/esm2015/layout/tabs/tab-overflow-content.js +2 -2
  63. package/esm2015/layout/tabs/tab.js +2 -2
  64. package/esm2015/layout/tabs/tabs.js +2 -3
  65. package/esm2015/layout/vertical-nav/vertical-nav-group-children.js +2 -2
  66. package/esm2015/layout/vertical-nav/vertical-nav-group.js +2 -2
  67. package/esm2015/layout/vertical-nav/vertical-nav-icon.js +5 -2
  68. package/esm2015/modal/modal-body.js +4 -2
  69. package/esm2015/popover/dropdown/dropdown-menu.js +2 -2
  70. package/esm2015/popover/tooltip/tooltip-content.js +2 -2
  71. package/esm2015/popover/tooltip/tooltip.js +2 -2
  72. package/esm2015/progress/spinner/spinner.js +2 -2
  73. package/esm2015/timeline/timeline-step-description.js +2 -2
  74. package/esm2015/timeline/timeline-step-header.js +2 -2
  75. package/esm2015/timeline/timeline-step-title.js +2 -2
  76. package/esm2015/timeline/timeline-step.js +2 -3
  77. package/esm2015/timeline/timeline.js +2 -2
  78. package/esm2015/utils/animations/expandable-animation/expandable-animation.js +2 -2
  79. package/esm2015/utils/conditional/if-active.directive.js +4 -2
  80. package/esm2015/utils/conditional/if-expanded.directive.js +4 -2
  81. package/esm2015/utils/conditional/if-open.directive.js +4 -2
  82. package/esm2015/utils/drag-and-drop/drag-handle.js +5 -2
  83. package/esm2015/utils/drag-and-drop/if-dragged.js +4 -2
  84. package/esm2015/utils/focus-trap/focus-trap.directive.js +4 -2
  85. package/esm2015/utils/loading/loading.js +4 -2
  86. package/esm2015/utils/outside-click/outside-click.js +4 -2
  87. package/esm2015/utils/popover/popover-content.js +4 -2
  88. package/esm2015/wizard/wizard-custom-tags.js +4 -2
  89. package/esm2015/wizard/wizard-page-buttons.js +4 -2
  90. package/esm2015/wizard/wizard-page-header-actions.js +4 -2
  91. package/esm2015/wizard/wizard-page-navtitle.js +4 -2
  92. package/esm2015/wizard/wizard-page-title.js +4 -2
  93. package/fesm2015/clr-angular.js +318 -95
  94. package/fesm2015/clr-angular.js.map +1 -1
  95. package/package.json +2 -2
@@ -4,7 +4,7 @@ import * as i1 from '@angular/common';
4
4
  import { CommonModule, isPlatformBrowser, DOCUMENT, NgForOf, getLocaleDayNames, FormStyle, TranslationWidth, getLocaleMonthNames, getLocaleFirstDayOfWeek, getLocaleDateFormat, FormatWidth } from '@angular/common';
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, take, first, switchMap, takeUntil } from 'rxjs/operators';
7
- import { Subject, BehaviorSubject, fromEvent, isObservable, of, ReplaySubject, combineLatest, Observable } from 'rxjs';
7
+ import { Subject, BehaviorSubject, Observable, fromEvent, isObservable, of, ReplaySubject, combineLatest } from 'rxjs';
8
8
  import { trigger, transition, style, animate, keyframes, state } from '@angular/animations';
9
9
  import { FormControl, FormGroup, FormGroupName, NgModelGroup, FormGroupDirective, NgForm, NgControl, FormsModule, SelectMultipleControlValueAccessor } from '@angular/forms';
10
10
  import { FocusTrapTrackerService, createId, isFocusable, isHTMLElement } from '@cds/core/internal';
@@ -19,12 +19,16 @@ import '@cds/core/icon/register';
19
19
  class ClrIconCustomTag {
20
20
  }
21
21
  ClrIconCustomTag.decorators = [
22
- { type: Directive, args: [{ selector: 'clr-icon' },] }
22
+ { type: Directive, args: [{
23
+ selector: 'clr-icon',
24
+ },] }
23
25
  ];
24
26
  class CdsIconCustomTag {
25
27
  }
26
28
  CdsIconCustomTag.decorators = [
27
- { type: Directive, args: [{ selector: 'cds-icon' },] }
29
+ { type: Directive, args: [{
30
+ selector: 'cds-icon',
31
+ },] }
28
32
  ];
29
33
 
30
34
  /*
@@ -92,7 +96,9 @@ class ClrLoading {
92
96
  }
93
97
  }
94
98
  ClrLoading.decorators = [
95
- { type: Directive, args: [{ selector: '[clrLoading]' },] }
99
+ { type: Directive, args: [{
100
+ selector: '[clrLoading]',
101
+ },] }
96
102
  ];
97
103
  ClrLoading.ctorParameters = () => [
98
104
  { type: LoadingListener, decorators: [{ type: Optional }] }
@@ -736,7 +742,9 @@ OompaLoompa.ctorParameters = () => [
736
742
  class AccordionWillyWonka extends WillyWonka {
737
743
  }
738
744
  AccordionWillyWonka.decorators = [
739
- { type: Directive, args: [{ selector: 'clr-accordion' },] }
745
+ { type: Directive, args: [{
746
+ selector: 'clr-accordion',
747
+ },] }
740
748
  ];
741
749
 
742
750
  /*
@@ -757,7 +765,9 @@ class AccordionOompaLoompa extends OompaLoompa {
757
765
  }
758
766
  }
759
767
  AccordionOompaLoompa.decorators = [
760
- { type: Directive, args: [{ selector: 'clr-accordion-panel' },] }
768
+ { type: Directive, args: [{
769
+ selector: 'clr-accordion-panel',
770
+ },] }
761
771
  ];
762
772
  AccordionOompaLoompa.ctorParameters = () => [
763
773
  { type: ChangeDetectorRef },
@@ -1126,9 +1136,7 @@ class ClrStepper {
1126
1136
  this.subscriptions.forEach(s => s.unsubscribe());
1127
1137
  }
1128
1138
  listenForFormResetChanges() {
1129
- return this.form.statusChanges
1130
- .pipe(filter(() => this.form.pristine)) // https://github.com/angular/angular/issues/10887
1131
- .subscribe(() => this.stepperService.resetPanels());
1139
+ return fromControlReset(this.form.form).subscribe(() => this.stepperService.resetPanels());
1132
1140
  }
1133
1141
  listenForPanelsCompleted() {
1134
1142
  return this.stepperService.panelsCompleted.subscribe(panelsCompleted => {
@@ -1174,6 +1182,18 @@ ClrStepper.propDecorators = {
1174
1182
  initialPanel: [{ type: Input, args: ['clrInitialStep',] }],
1175
1183
  panels: [{ type: ContentChildren, args: [ClrStepperPanel, { descendants: true },] }]
1176
1184
  };
1185
+ function fromControlReset(control) {
1186
+ return new Observable(observer => {
1187
+ const unpatchedControlReset = control.reset;
1188
+ control.reset = () => {
1189
+ observer.next();
1190
+ unpatchedControlReset.apply(control);
1191
+ };
1192
+ return () => {
1193
+ control.reset = unpatchedControlReset;
1194
+ };
1195
+ });
1196
+ }
1177
1197
 
1178
1198
  /*
1179
1199
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -1183,7 +1203,9 @@ ClrStepper.propDecorators = {
1183
1203
  class StepperWillyWonka extends WillyWonka {
1184
1204
  }
1185
1205
  StepperWillyWonka.decorators = [
1186
- { type: Directive, args: [{ selector: 'form[clrStepper]' },] }
1206
+ { type: Directive, args: [{
1207
+ selector: 'form[clrStepper]',
1208
+ },] }
1187
1209
  ];
1188
1210
 
1189
1211
  /*
@@ -1204,7 +1226,9 @@ class StepperOompaLoompa extends OompaLoompa {
1204
1226
  }
1205
1227
  }
1206
1228
  StepperOompaLoompa.decorators = [
1207
- { type: Directive, args: [{ selector: 'clr-stepper-panel, [clrStepButton]' },] }
1229
+ { type: Directive, args: [{
1230
+ selector: 'clr-stepper-panel, [clrStepButton]',
1231
+ },] }
1208
1232
  ];
1209
1233
  StepperOompaLoompa.ctorParameters = () => [
1210
1234
  { type: ChangeDetectorRef },
@@ -2118,7 +2142,9 @@ class ClrPopoverContent {
2118
2142
  }
2119
2143
  }
2120
2144
  ClrPopoverContent.decorators = [
2121
- { type: Directive, args: [{ selector: '[clrPopoverContent]' },] }
2145
+ { type: Directive, args: [{
2146
+ selector: '[clrPopoverContent]',
2147
+ },] }
2122
2148
  ];
2123
2149
  ClrPopoverContent.ctorParameters = () => [
2124
2150
  { type: HTMLDocument, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
@@ -2823,7 +2849,7 @@ class ClrControlError extends ClrAbstractControl {
2823
2849
  ClrControlError.decorators = [
2824
2850
  { type: Component, args: [{
2825
2851
  selector: 'clr-control-error',
2826
- template: ` <ng-content></ng-content> `,
2852
+ template: `<ng-content></ng-content>`,
2827
2853
  host: {
2828
2854
  '[class.clr-subtext]': 'true',
2829
2855
  '[attr.id]': 'id',
@@ -2851,7 +2877,7 @@ class ClrControlHelper extends ClrAbstractControl {
2851
2877
  ClrControlHelper.decorators = [
2852
2878
  { type: Component, args: [{
2853
2879
  selector: 'clr-control-helper',
2854
- template: ` <ng-content></ng-content> `,
2880
+ template: `<ng-content></ng-content>`,
2855
2881
  host: {
2856
2882
  '[class.clr-subtext]': 'true',
2857
2883
  '[attr.id]': 'id',
@@ -3041,7 +3067,9 @@ class ClrLabel {
3041
3067
  }
3042
3068
  }
3043
3069
  ClrLabel.decorators = [
3044
- { type: Directive, args: [{ selector: 'label' },] }
3070
+ { type: Directive, args: [{
3071
+ selector: 'label',
3072
+ },] }
3045
3073
  ];
3046
3074
  ClrLabel.ctorParameters = () => [
3047
3075
  { type: ControlIdService, decorators: [{ type: Optional }] },
@@ -3117,7 +3145,7 @@ class ClrControlSuccess extends ClrAbstractControl {
3117
3145
  ClrControlSuccess.decorators = [
3118
3146
  { type: Component, args: [{
3119
3147
  selector: 'clr-control-success',
3120
- template: ` <ng-content></ng-content> `,
3148
+ template: `<ng-content></ng-content>`,
3121
3149
  host: {
3122
3150
  '[class.clr-subtext]': 'true',
3123
3151
  '[attr.id]': 'id',
@@ -3499,7 +3527,10 @@ class ClrControl extends WrappedFormControl {
3499
3527
  }
3500
3528
  }
3501
3529
  ClrControl.decorators = [
3502
- { type: Directive, args: [{ selector: '[clrControl]', host: { '[class.clr-input]': 'true' } },] }
3530
+ { type: Directive, args: [{
3531
+ selector: '[clrControl]',
3532
+ host: { '[class.clr-input]': 'true' },
3533
+ },] }
3503
3534
  ];
3504
3535
  ClrControl.ctorParameters = () => [
3505
3536
  { type: ViewContainerRef },
@@ -3639,7 +3670,9 @@ class ClrIfError extends AbstractIfState {
3639
3670
  }
3640
3671
  }
3641
3672
  ClrIfError.decorators = [
3642
- { type: Directive, args: [{ selector: '[clrIfError]' },] }
3673
+ { type: Directive, args: [{
3674
+ selector: '[clrIfError]',
3675
+ },] }
3643
3676
  ];
3644
3677
  ClrIfError.ctorParameters = () => [
3645
3678
  { type: IfControlStateService, decorators: [{ type: Optional }] },
@@ -3680,7 +3713,9 @@ class ClrIfSuccess extends AbstractIfState {
3680
3713
  }
3681
3714
  }
3682
3715
  ClrIfSuccess.decorators = [
3683
- { type: Directive, args: [{ selector: '[clrIfSuccess]' },] }
3716
+ { type: Directive, args: [{
3717
+ selector: '[clrIfSuccess]',
3718
+ },] }
3684
3719
  ];
3685
3720
  ClrIfSuccess.ctorParameters = () => [
3686
3721
  { type: IfControlStateService, decorators: [{ type: Optional }] },
@@ -3837,7 +3872,9 @@ class ClrCheckbox extends WrappedFormControl {
3837
3872
  }
3838
3873
  }
3839
3874
  ClrCheckbox.decorators = [
3840
- { type: Directive, args: [{ selector: '[clrCheckbox],[clrToggle]' },] }
3875
+ { type: Directive, args: [{
3876
+ selector: '[clrCheckbox],[clrToggle]',
3877
+ },] }
3841
3878
  ];
3842
3879
  ClrCheckbox.ctorParameters = () => [
3843
3880
  { type: ViewContainerRef },
@@ -4016,7 +4053,7 @@ class ClrSpinner {
4016
4053
  ClrSpinner.decorators = [
4017
4054
  { type: Component, args: [{
4018
4055
  selector: 'clr-spinner',
4019
- template: ` <ng-content></ng-content> `,
4056
+ template: `<ng-content></ng-content>`,
4020
4057
  host: {
4021
4058
  '[attr.aria-busy]': 'true',
4022
4059
  }
@@ -4207,7 +4244,9 @@ class ClrIfActive {
4207
4244
  }
4208
4245
  }
4209
4246
  ClrIfActive.decorators = [
4210
- { type: Directive, args: [{ selector: '[clrIfActive]' },] }
4247
+ { type: Directive, args: [{
4248
+ selector: '[clrIfActive]',
4249
+ },] }
4211
4250
  ];
4212
4251
  ClrIfActive.ctorParameters = () => [
4213
4252
  { type: IfActiveService },
@@ -4295,7 +4334,9 @@ class ClrIfExpanded {
4295
4334
  }
4296
4335
  }
4297
4336
  ClrIfExpanded.decorators = [
4298
- { type: Directive, args: [{ selector: '[clrIfExpanded]' },] }
4337
+ { type: Directive, args: [{
4338
+ selector: '[clrIfExpanded]',
4339
+ },] }
4299
4340
  ];
4300
4341
  ClrIfExpanded.ctorParameters = () => [
4301
4342
  { type: TemplateRef, decorators: [{ type: Optional }] },
@@ -4381,7 +4422,9 @@ class ClrIfOpen {
4381
4422
  }
4382
4423
  }
4383
4424
  ClrIfOpen.decorators = [
4384
- { type: Directive, args: [{ selector: '[clrIfOpen]' },] }
4425
+ { type: Directive, args: [{
4426
+ selector: '[clrIfOpen]',
4427
+ },] }
4385
4428
  ];
4386
4429
  ClrIfOpen.ctorParameters = () => [
4387
4430
  { type: ClrPopoverToggleService },
@@ -5088,7 +5131,9 @@ class ClrOptionSelected {
5088
5131
  }
5089
5132
  }
5090
5133
  ClrOptionSelected.decorators = [
5091
- { type: Directive, args: [{ selector: '[clrOptionSelected]' },] }
5134
+ { type: Directive, args: [{
5135
+ selector: '[clrOptionSelected]',
5136
+ },] }
5092
5137
  ];
5093
5138
  ClrOptionSelected.ctorParameters = () => [
5094
5139
  { type: TemplateRef }
@@ -5679,7 +5724,7 @@ class ClrCombobox extends WrappedFormControl {
5679
5724
  ClrCombobox.decorators = [
5680
5725
  { type: Component, args: [{
5681
5726
  selector: 'clr-combobox',
5682
- template: "<!--\n* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n* This software is released under MIT license.\n* The full license information can be found in LICENSE in the root directory of this project.\n-->\n\n<!-- The (click) handler is needed to auto-focus on input field which can not currently occupy the whole\n width of the component, after being wrapped to a new line -->\n<div\n class=\"clr-combobox-wrapper\"\n clrPopoverAnchor\n (click)=\"focusInput()\"\n [class.multi]=\"multiSelect\"\n [class.invalid]=\"invalid\"\n>\n <span\n *ngIf=\"multiSelect && optionSelectionService.selectionModel.model\"\n role=\"grid\"\n clrRovingTabindex\n [clrRovingTabindexDisabled]=\"control?.disabled\"\n clrDirection=\"both\"\n [attr.aria-label]=\"getSelectionAriaLabel()\"\n [attr.aria-disabled]=\"control?.disabled? true: null\"\n >\n <span *ngFor=\"let item of multiSelectModel; let i = index\" class=\"label label-combobox-pill\" role=\"row\">\n <span role=\"gridcell\">\n <span class=\"clr-combobox-pill-content\" clrKeyFocusItem>\n <ng-container\n *ngIf=\"optionSelected\"\n [ngTemplateOutlet]=\"optionSelected.template\"\n [ngTemplateOutletContext]=\"{$implicit: optionSelectionService.selectionModel.model[i]}\"\n >\n </ng-container>\n </span>\n </span>\n <span role=\"gridcell\">\n <button\n clrKeyFocusItem\n type=\"button\"\n class=\"clr-combobox-remove-btn\"\n [disabled]=\"control?.disabled? true: null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxDelete + ' ' + optionSelectionService.selectionModel.toString(displayField, i)\"\n (click)=\"unselect(item)\"\n >\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n </span>\n </span>\n\n <span class=\"clr-combobox-input-wrapper\" role=\"combobox\">\n <input\n #textboxInput\n type=\"text\"\n [id]=\"inputId()\"\n class=\"clr-input clr-combobox-input\"\n [(ngModel)]=\"searchText\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-owns]=\"ariaOwns\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"control?.invalid? true: null\"\n [disabled]=\"control?.disabled? true: null\"\n [attr.aria-activedescendant]=\"getActiveDescendant()\"\n [attr.placeholder]=\"placeholder\"\n />\n </span>\n\n <!-- No click handler, as it uses the handler on the .clr-combobox-wrapper -->\n <button\n clrPopoverOpenCloseButton\n #trigger\n type=\"button\"\n class=\"clr-combobox-trigger\"\n tabindex=\"-1\"\n [disabled]=\"control?.disabled || null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxOpen\"\n >\n <cds-icon shape=\"angle\" direction=\"down\" size=\"12\"></cds-icon>\n </button>\n\n <div class=\"clr-focus-indicator\" [class.clr-focus]=\"focused\"></div>\n</div>\n\n<!-- Both close handlers are handled manually due to issues in Edge browser.\n Additionally 'outsideClickToClose' has complex handling that's necessary\n to be manual due to the component architecture -->\n<div role=\"dialog\" *clrPopoverContent=\"openState at smartPosition; outsideClickToClose: false; scrollToClose: false\">\n <ng-content></ng-content>\n</div>\n",
5727
+ template: "<!--\n* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n* This software is released under MIT license.\n* The full license information can be found in LICENSE in the root directory of this project.\n-->\n\n<!-- The (click) handler is needed to auto-focus on input field which can not currently occupy the whole\n width of the component, after being wrapped to a new line -->\n<div\n class=\"clr-combobox-wrapper\"\n clrPopoverAnchor\n (click)=\"focusInput()\"\n [class.multi]=\"multiSelect\"\n [class.invalid]=\"invalid\"\n>\n <span\n *ngIf=\"multiSelect && optionSelectionService.selectionModel.model\"\n role=\"grid\"\n clrRovingTabindex\n [clrRovingTabindexDisabled]=\"control?.disabled\"\n clrDirection=\"both\"\n [attr.aria-label]=\"getSelectionAriaLabel()\"\n [attr.aria-disabled]=\"control?.disabled? true: null\"\n >\n <span *ngFor=\"let item of multiSelectModel; let i = index\" class=\"label label-combobox-pill\" role=\"row\">\n <span role=\"gridcell\">\n <span class=\"clr-combobox-pill-content\" clrKeyFocusItem>\n <ng-container\n *ngIf=\"optionSelected\"\n [ngTemplateOutlet]=\"optionSelected.template\"\n [ngTemplateOutletContext]=\"{$implicit: optionSelectionService.selectionModel.model[i]}\"\n ></ng-container>\n </span>\n </span>\n <span role=\"gridcell\">\n <button\n clrKeyFocusItem\n type=\"button\"\n class=\"clr-combobox-remove-btn\"\n [disabled]=\"control?.disabled? true: null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxDelete + ' ' + optionSelectionService.selectionModel.toString(displayField, i)\"\n (click)=\"unselect(item)\"\n >\n <cds-icon shape=\"window-close\" size=\"12\"></cds-icon>\n </button>\n </span>\n </span>\n </span>\n\n <span class=\"clr-combobox-input-wrapper\" role=\"combobox\">\n <input\n #textboxInput\n type=\"text\"\n [id]=\"inputId()\"\n class=\"clr-input clr-combobox-input\"\n [(ngModel)]=\"searchText\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [attr.aria-expanded]=\"openState\"\n [attr.aria-owns]=\"ariaOwns\"\n aria-haspopup=\"listbox\"\n aria-autocomplete=\"list\"\n autocomplete=\"off\"\n [attr.aria-invalid]=\"control?.invalid? true: null\"\n [disabled]=\"control?.disabled? true: null\"\n [attr.aria-activedescendant]=\"getActiveDescendant()\"\n [attr.placeholder]=\"placeholder\"\n />\n </span>\n\n <!-- No click handler, as it uses the handler on the .clr-combobox-wrapper -->\n <button\n clrPopoverOpenCloseButton\n #trigger\n type=\"button\"\n class=\"clr-combobox-trigger\"\n tabindex=\"-1\"\n [disabled]=\"control?.disabled || null\"\n [attr.aria-label]=\"commonStrings.keys.comboboxOpen\"\n >\n <cds-icon shape=\"angle\" direction=\"down\" size=\"12\"></cds-icon>\n </button>\n\n <div class=\"clr-focus-indicator\" [class.clr-focus]=\"focused\"></div>\n</div>\n\n<!-- Both close handlers are handled manually due to issues in Edge browser.\n Additionally 'outsideClickToClose' has complex handling that's necessary\n to be manual due to the component architecture -->\n<div role=\"dialog\" *clrPopoverContent=\"openState at smartPosition; outsideClickToClose: false; scrollToClose: false\">\n <ng-content></ng-content>\n</div>\n",
5683
5728
  providers: [
5684
5729
  ClrPopoverToggleService,
5685
5730
  { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef },
@@ -5788,8 +5833,10 @@ class ClrOption {
5788
5833
  ClrOption.decorators = [
5789
5834
  { type: Component, args: [{
5790
5835
  selector: 'clr-option',
5791
- template: `<ng-content></ng-content>
5792
- <span *ngIf="selected" class="clr-sr-only"> {{ commonStrings.keys.comboboxSelected }} </span> `,
5836
+ template: `
5837
+ <ng-content></ng-content>
5838
+ <span *ngIf="selected" class="clr-sr-only">{{ commonStrings.keys.comboboxSelected }}</span>
5839
+ `,
5793
5840
  providers: [UNIQUE_ID_PROVIDER],
5794
5841
  host: {
5795
5842
  '[class.clr-combobox-option]': 'true',
@@ -6116,7 +6163,10 @@ class ClrInput extends WrappedFormControl {
6116
6163
  }
6117
6164
  }
6118
6165
  ClrInput.decorators = [
6119
- { type: Directive, args: [{ selector: '[clrInput]', host: { '[class.clr-input]': 'true' } },] }
6166
+ { type: Directive, args: [{
6167
+ selector: '[clrInput]',
6168
+ host: { '[class.clr-input]': 'true' },
6169
+ },] }
6120
6170
  ];
6121
6171
  ClrInput.ctorParameters = () => [
6122
6172
  { type: ViewContainerRef },
@@ -6544,7 +6594,9 @@ class FocusTrapDirective {
6544
6594
  }
6545
6595
  }
6546
6596
  FocusTrapDirective.decorators = [
6547
- { type: Directive, args: [{ selector: '[clrFocusTrap]' },] }
6597
+ { type: Directive, args: [{
6598
+ selector: '[clrFocusTrap]',
6599
+ },] }
6548
6600
  ];
6549
6601
  FocusTrapDirective.ctorParameters = () => [
6550
6602
  { type: ElementRef },
@@ -7478,7 +7530,10 @@ class ClrCalendar {
7478
7530
  }
7479
7531
  }
7480
7532
  ClrCalendar.decorators = [
7481
- { type: Component, args: [{ selector: 'clr-calendar', template: "<table class=\"calendar-table\">\n <tr class=\"calendar-row weekdays\">\n <th *ngFor=\"let day of localeDays\" class=\"calendar-cell weekday\" role=\"heading\" [attr.aria-label]=\"day.day\">\n {{day.narrow}}\n </th>\n </tr>\n <tr class=\"calendar-row\" *ngFor=\"let row of calendarViewModel.calendarView\">\n <td *ngFor=\"let dayView of row\" class=\"calendar-cell\">\n <clr-day [clrDayView]=\"dayView\"></clr-day>\n </td>\n </tr>\n</table>\n" },] }
7533
+ { type: Component, args: [{
7534
+ selector: 'clr-calendar',
7535
+ template: "<table class=\"calendar-table\">\n <tr class=\"calendar-row weekdays\">\n <th *ngFor=\"let day of localeDays\" class=\"calendar-cell weekday\" role=\"heading\" [attr.aria-label]=\"day.day\">\n {{day.narrow}}\n </th>\n </tr>\n <tr class=\"calendar-row\" *ngFor=\"let row of calendarViewModel.calendarView\">\n <td *ngFor=\"let dayView of row\" class=\"calendar-cell\">\n <clr-day [clrDayView]=\"dayView\"></clr-day>\n </td>\n </tr>\n</table>\n"
7536
+ },] }
7482
7537
  ];
7483
7538
  ClrCalendar.ctorParameters = () => [
7484
7539
  { type: LocaleHelperService },
@@ -8694,9 +8749,9 @@ ClrPasswordContainer.decorators = [
8694
8749
  type="button"
8695
8750
  >
8696
8751
  <cds-icon status="info" [attr.shape]="show ? 'eye-hide' : 'eye'"></cds-icon>
8697
- <span class="clr-sr-only">{{
8698
- show ? commonStrings.keys.passwordHide : commonStrings.keys.passwordShow
8699
- }}</span>
8752
+ <span class="clr-sr-only">
8753
+ {{ show ? commonStrings.keys.passwordHide : commonStrings.keys.passwordShow }}
8754
+ </span>
8700
8755
  </button>
8701
8756
  </div>
8702
8757
  <cds-icon
@@ -8778,7 +8833,10 @@ class ClrPassword extends WrappedFormControl {
8778
8833
  }
8779
8834
  }
8780
8835
  ClrPassword.decorators = [
8781
- { type: Directive, args: [{ selector: '[clrPassword]', host: { '[class.clr-input]': 'true' } },] }
8836
+ { type: Directive, args: [{
8837
+ selector: '[clrPassword]',
8838
+ host: { '[class.clr-input]': 'true' },
8839
+ },] }
8782
8840
  ];
8783
8841
  ClrPassword.ctorParameters = () => [
8784
8842
  { type: ViewContainerRef },
@@ -8861,7 +8919,9 @@ class ClrRadio extends WrappedFormControl {
8861
8919
  }
8862
8920
  }
8863
8921
  ClrRadio.decorators = [
8864
- { type: Directive, args: [{ selector: '[clrRadio]' },] }
8922
+ { type: Directive, args: [{
8923
+ selector: '[clrRadio]',
8924
+ },] }
8865
8925
  ];
8866
8926
  ClrRadio.ctorParameters = () => [
8867
8927
  { type: ViewContainerRef },
@@ -9075,7 +9135,10 @@ class ClrRange extends WrappedFormControl {
9075
9135
  }
9076
9136
  }
9077
9137
  ClrRange.decorators = [
9078
- { type: Directive, args: [{ selector: '[clrRange]', host: { '[class.clr-range]': 'true' } },] }
9138
+ { type: Directive, args: [{
9139
+ selector: '[clrRange]',
9140
+ host: { '[class.clr-range]': 'true' },
9141
+ },] }
9079
9142
  ];
9080
9143
  ClrRange.ctorParameters = () => [
9081
9144
  { type: ViewContainerRef },
@@ -9191,7 +9254,10 @@ class ClrSelect extends WrappedFormControl {
9191
9254
  }
9192
9255
  }
9193
9256
  ClrSelect.decorators = [
9194
- { type: Directive, args: [{ selector: '[clrSelect]', host: { '[class.clr-select]': 'true' } },] }
9257
+ { type: Directive, args: [{
9258
+ selector: '[clrSelect]',
9259
+ host: { '[class.clr-select]': 'true' },
9260
+ },] }
9195
9261
  ];
9196
9262
  ClrSelect.ctorParameters = () => [
9197
9263
  { type: ViewContainerRef },
@@ -9278,7 +9344,10 @@ class ClrTextarea extends WrappedFormControl {
9278
9344
  }
9279
9345
  }
9280
9346
  ClrTextarea.decorators = [
9281
- { type: Directive, args: [{ selector: '[clrTextarea]', host: { '[class.clr-textarea]': 'true' } },] }
9347
+ { type: Directive, args: [{
9348
+ selector: '[clrTextarea]',
9349
+ host: { '[class.clr-textarea]': 'true' },
9350
+ },] }
9282
9351
  ];
9283
9352
  ClrTextarea.ctorParameters = () => [
9284
9353
  { type: ViewContainerRef },
@@ -9404,7 +9473,7 @@ class ClrExpandableAnimation {
9404
9473
  ClrExpandableAnimation.decorators = [
9405
9474
  { type: Component, args: [{
9406
9475
  selector: 'clr-expandable-animation',
9407
- template: ` <ng-content></ng-content> `,
9476
+ template: `<ng-content></ng-content>`,
9408
9477
  animations: [
9409
9478
  trigger('expandAnimation', [
9410
9479
  transition('true <=> false', [
@@ -9773,7 +9842,10 @@ class ClrDragHandle {
9773
9842
  }
9774
9843
  }
9775
9844
  ClrDragHandle.decorators = [
9776
- { type: Directive, args: [{ selector: '[clrDragHandle]', host: { '[class.drag-handle]': 'true' } },] }
9845
+ { type: Directive, args: [{
9846
+ selector: '[clrDragHandle]',
9847
+ host: { '[class.drag-handle]': 'true' },
9848
+ },] }
9777
9849
  ];
9778
9850
  ClrDragHandle.ctorParameters = () => [
9779
9851
  { type: ElementRef },
@@ -9974,7 +10046,9 @@ class ClrIfDragged {
9974
10046
  }
9975
10047
  }
9976
10048
  ClrIfDragged.decorators = [
9977
- { type: Directive, args: [{ selector: '[clrIfDragged]' },] }
10049
+ { type: Directive, args: [{
10050
+ selector: '[clrIfDragged]',
10051
+ },] }
9978
10052
  ];
9979
10053
  ClrIfDragged.ctorParameters = () => [
9980
10054
  { type: TemplateRef },
@@ -10490,7 +10564,9 @@ class OutsideClick {
10490
10564
  }
10491
10565
  }
10492
10566
  OutsideClick.decorators = [
10493
- { type: Directive, args: [{ selector: '[clrOutsideClick]' },] }
10567
+ { type: Directive, args: [{
10568
+ selector: '[clrOutsideClick]',
10569
+ },] }
10494
10570
  ];
10495
10571
  OutsideClick.ctorParameters = () => [
10496
10572
  { type: ElementRef },
@@ -11162,6 +11238,12 @@ class DatagridNumericFilter extends DatagridFilterRegistrar {
11162
11238
  sub.unsubscribe();
11163
11239
  });
11164
11240
  }
11241
+ get maxPlaceholderValue() {
11242
+ return this.maxPlaceholder || this.commonStrings.keys.maxValue;
11243
+ }
11244
+ get minPlaceholderValue() {
11245
+ return this.minPlaceholder || this.commonStrings.keys.minValue;
11246
+ }
11165
11247
  /**
11166
11248
  * Customizable filter logic based on high and low values
11167
11249
  */
@@ -11268,8 +11350,8 @@ DatagridNumericFilter.decorators = [
11268
11350
  type="number"
11269
11351
  name="low"
11270
11352
  [(ngModel)]="low"
11271
- [placeholder]="commonStrings.keys.minValue"
11272
- [attr.aria-label]="commonStrings.keys.minValue"
11353
+ [placeholder]="minPlaceholderValue"
11354
+ [attr.aria-label]="minPlaceholderValue"
11273
11355
  />
11274
11356
  <span class="datagrid-filter-input-spacer"></span>
11275
11357
  <input
@@ -11278,8 +11360,8 @@ DatagridNumericFilter.decorators = [
11278
11360
  type="number"
11279
11361
  name="high"
11280
11362
  [(ngModel)]="high"
11281
- [placeholder]="commonStrings.keys.maxValue"
11282
- [attr.aria-label]="commonStrings.keys.maxValue"
11363
+ [placeholder]="maxPlaceholderValue"
11364
+ [attr.aria-label]="maxPlaceholderValue"
11283
11365
  />
11284
11366
  </clr-dg-filter>
11285
11367
  `
@@ -11292,6 +11374,8 @@ DatagridNumericFilter.ctorParameters = () => [
11292
11374
  { type: ClrPopoverToggleService }
11293
11375
  ];
11294
11376
  DatagridNumericFilter.propDecorators = {
11377
+ maxPlaceholder: [{ type: Input, args: ['clrFilterMaxPlaceholder',] }],
11378
+ minPlaceholder: [{ type: Input, args: ['clrFilterMinPlaceholder',] }],
11295
11379
  customNumericFilter: [{ type: Input, args: ['clrDgNumericFilter',] }],
11296
11380
  input: [{ type: ViewChild, args: ['input_low',] }],
11297
11381
  filterContainer: [{ type: ViewChild, args: [ClrDatagridFilter,] }],
@@ -11421,6 +11505,9 @@ class DatagridStringFilter extends DatagridFilterRegistrar {
11421
11505
  this.open = false;
11422
11506
  this.filterValueChange = new EventEmitter();
11423
11507
  }
11508
+ get placeholderValue() {
11509
+ return this.placeholder || this.commonStrings.keys.filterItems;
11510
+ }
11424
11511
  /**
11425
11512
  * Customizable filter logic based on a search text
11426
11513
  */
@@ -11485,7 +11572,8 @@ DatagridStringFilter.decorators = [
11485
11572
  name="search"
11486
11573
  [(ngModel)]="value"
11487
11574
  class="clr-input"
11488
- [attr.aria-label]="commonStrings.keys.filterItems"
11575
+ [attr.aria-label]="placeholderValue"
11576
+ [placeholder]="placeholderValue"
11489
11577
  />
11490
11578
  </clr-dg-filter>
11491
11579
  `
@@ -11498,6 +11586,7 @@ DatagridStringFilter.ctorParameters = () => [
11498
11586
  { type: ClrPopoverToggleService }
11499
11587
  ];
11500
11588
  DatagridStringFilter.propDecorators = {
11589
+ placeholder: [{ type: Input, args: ['clrFilterPlaceholder',] }],
11501
11590
  customStringFilter: [{ type: Input, args: ['clrDgStringFilter',] }],
11502
11591
  input: [{ type: ViewChild, args: ['input',] }],
11503
11592
  filterContainer: [{ type: ViewChild, args: [ClrDatagridFilter,] }],
@@ -11539,7 +11628,9 @@ RowActionService.decorators = [
11539
11628
  class DatagridWillyWonka extends WillyWonka {
11540
11629
  }
11541
11630
  DatagridWillyWonka.decorators = [
11542
- { type: Directive, args: [{ selector: 'clr-datagrid' },] }
11631
+ { type: Directive, args: [{
11632
+ selector: 'clr-datagrid',
11633
+ },] }
11543
11634
  ];
11544
11635
 
11545
11636
  /*
@@ -11560,7 +11651,9 @@ class ActionableOompaLoompa extends OompaLoompa {
11560
11651
  }
11561
11652
  }
11562
11653
  ActionableOompaLoompa.decorators = [
11563
- { type: Directive, args: [{ selector: 'clr-datagrid, clr-dg-row' },] }
11654
+ { type: Directive, args: [{
11655
+ selector: 'clr-datagrid, clr-dg-row',
11656
+ },] }
11564
11657
  ];
11565
11658
  ActionableOompaLoompa.ctorParameters = () => [
11566
11659
  { type: ChangeDetectorRef },
@@ -11673,7 +11766,9 @@ class ExpandableOompaLoompa extends OompaLoompa {
11673
11766
  }
11674
11767
  }
11675
11768
  ExpandableOompaLoompa.decorators = [
11676
- { type: Directive, args: [{ selector: 'clr-datagrid, clr-dg-row' },] }
11769
+ { type: Directive, args: [{
11770
+ selector: 'clr-datagrid, clr-dg-row',
11771
+ },] }
11677
11772
  ];
11678
11773
  ExpandableOompaLoompa.ctorParameters = () => [
11679
11774
  { type: ChangeDetectorRef },
@@ -12092,6 +12187,15 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
12092
12187
  this.customFilter = true;
12093
12188
  }
12094
12189
  }
12190
+ get filterStringPlaceholderValue() {
12191
+ return this.filterStringPlaceholder || this.commonStrings.keys.filterItems;
12192
+ }
12193
+ get filterNumberMaxPlaceholderValue() {
12194
+ return this.filterNumberMaxPlaceholder || this.commonStrings.keys.maxValue;
12195
+ }
12196
+ get filterNumberMinPlaceholderValue() {
12197
+ return this.filterNumberMinPlaceholder || this.commonStrings.keys.minValue;
12198
+ }
12095
12199
  set updateFilterValue(newValue) {
12096
12200
  if (this.filter) {
12097
12201
  if (this.filter instanceof DatagridStringFilterImpl) {
@@ -12162,12 +12266,15 @@ ClrDatagridColumn.decorators = [
12162
12266
 
12163
12267
  <clr-dg-string-filter
12164
12268
  *ngIf="field && !customFilter && colType == 'string'"
12269
+ [clrFilterPlaceholder]="filterStringPlaceholderValue"
12165
12270
  [clrDgStringFilter]="registered"
12166
12271
  [(clrFilterValue)]="filterValue"
12167
12272
  ></clr-dg-string-filter>
12168
12273
 
12169
12274
  <clr-dg-numeric-filter
12170
12275
  *ngIf="field && !customFilter && colType == 'number'"
12276
+ [clrFilterMaxPlaceholder]="filterMaxPlaceholderValue"
12277
+ [clrFilterMinPlaceholder]="filterMinPlaceholderValue"
12171
12278
  [clrDgNumericFilter]="registered"
12172
12279
  [(clrFilterValue)]="filterValue"
12173
12280
  ></clr-dg-numeric-filter>
@@ -12209,6 +12316,9 @@ ClrDatagridColumn.propDecorators = {
12209
12316
  sortOrder: [{ type: Input, args: ['clrDgSortOrder',] }],
12210
12317
  sortOrderChange: [{ type: Output, args: ['clrDgSortOrderChange',] }],
12211
12318
  projectedFilter: [{ type: ContentChild, args: [CustomFilter,] }],
12319
+ filterStringPlaceholder: [{ type: Input, args: ['clrFilterStringPlaceholder',] }],
12320
+ filterNumberMaxPlaceholder: [{ type: Input, args: ['clrFilterNumberMaxPlaceholder',] }],
12321
+ filterNumberMinPlaceholder: [{ type: Input, args: ['clrFilterNumberMinPlaceholder',] }],
12212
12322
  updateFilterValue: [{ type: Input, args: ['clrFilterValue',] }],
12213
12323
  filterValueChange: [{ type: Output, args: ['clrFilterValueChange',] }]
12214
12324
  };
@@ -12717,7 +12827,7 @@ class ClrDatagridCell {
12717
12827
  ClrDatagridCell.decorators = [
12718
12828
  { type: Component, args: [{
12719
12829
  selector: 'clr-dg-cell',
12720
- template: ` <ng-content></ng-content> `,
12830
+ template: `<ng-content></ng-content>`,
12721
12831
  host: {
12722
12832
  '[class.datagrid-cell]': 'true',
12723
12833
  '[class.datagrid-signpost-trigger]': 'signpost.length > 0',
@@ -12899,6 +13009,10 @@ class Selection {
12899
13009
  * Subscriptions to the other providers changes.
12900
13010
  */
12901
13011
  this.subscriptions = [];
13012
+ /**
13013
+ * Shift key state, for use in range selection.
13014
+ */
13015
+ this.shiftPressed = false;
12902
13016
  this.valueCollector = new Subject();
12903
13017
  /**
12904
13018
  * The Observable that lets other classes subscribe to selection changes
@@ -13286,7 +13400,7 @@ WrappedRow.propDecorators = {
13286
13400
  */
13287
13401
  let nbRow = 0;
13288
13402
  class ClrDatagridRow {
13289
- constructor(selection, rowActionService, globalExpandable, expand, detailService, displayMode, vcr, renderer, el, commonStrings) {
13403
+ constructor(selection, rowActionService, globalExpandable, expand, detailService, displayMode, vcr, renderer, el, commonStrings, items, document) {
13290
13404
  this.selection = selection;
13291
13405
  this.rowActionService = rowActionService;
13292
13406
  this.globalExpandable = globalExpandable;
@@ -13297,6 +13411,8 @@ class ClrDatagridRow {
13297
13411
  this.renderer = renderer;
13298
13412
  this.el = el;
13299
13413
  this.commonStrings = commonStrings;
13414
+ this.items = items;
13415
+ this.document = document;
13300
13416
  /* reference to the enum so that template can access */
13301
13417
  this.SELECTION_TYPE = SelectionType;
13302
13418
  this.expandAnimationTrigger = false;
@@ -13326,6 +13442,24 @@ class ClrDatagridRow {
13326
13442
  }
13327
13443
  }));
13328
13444
  }
13445
+ /**
13446
+ * The default behavior in Chrome and Firefox for shift-clicking on a label is to perform text-selection.
13447
+ * This prevents our intended range-selection, because this text-selection overrides our shift-click event.
13448
+ * We need to clear the stored selection range when shift-clicking. This will override the mostly unused shift-click
13449
+ * selection browser functionality, which is inconsistently implemented in browsers anyway.
13450
+ */
13451
+ clearRanges(event) {
13452
+ if (event.shiftKey) {
13453
+ this.document.getSelection().removeAllRanges();
13454
+ // Firefox is too persistent about its text-selection behaviour. So we need to add a preventDefault();
13455
+ // We should not try to enforce this on the other browsers, though, because their toggle cycle does not get canceled by
13456
+ // the preventDefault() and they toggle the checkbox second time, effectively retrurning it to not-selected.
13457
+ if (window.navigator.userAgent.indexOf('Firefox') !== -1) {
13458
+ event.preventDefault();
13459
+ this.toggle(true);
13460
+ }
13461
+ }
13462
+ }
13329
13463
  /**
13330
13464
  * Indicates if the row is selected
13331
13465
  */
@@ -13342,6 +13476,12 @@ class ClrDatagridRow {
13342
13476
  this._selected = value;
13343
13477
  }
13344
13478
  else {
13479
+ if (value && this.selection.selectionType === SelectionType.Multi) {
13480
+ this.rangeSelect();
13481
+ }
13482
+ else {
13483
+ this.selection.rangeStart = null;
13484
+ }
13345
13485
  this.selection.setSelected(this.item, value);
13346
13486
  }
13347
13487
  }
@@ -13423,6 +13563,29 @@ class ClrDatagridRow {
13423
13563
  this.expandAnimationTrigger = !this.expandAnimationTrigger;
13424
13564
  }));
13425
13565
  }
13566
+ rangeSelect() {
13567
+ const items = this.items.displayed;
13568
+ if (!items) {
13569
+ return;
13570
+ }
13571
+ const startIx = items.indexOf(this.selection.rangeStart);
13572
+ if (this.selection.rangeStart &&
13573
+ this.selection.current.includes(this.selection.rangeStart) &&
13574
+ this.selection.shiftPressed &&
13575
+ startIx !== -1) {
13576
+ const endIx = items.indexOf(this.item);
13577
+ // Using Set to remove duplicates
13578
+ const newSelection = new Set(this.selection.current.concat(items.slice(Math.min(startIx, endIx), Math.max(startIx, endIx) + 1)));
13579
+ this.selection.clearSelection();
13580
+ this.selection.current.push(...newSelection);
13581
+ }
13582
+ else {
13583
+ // page number has changed or
13584
+ // no Shift was pressed or
13585
+ // rangeStart not yet set
13586
+ this.selection.rangeStart = this.item;
13587
+ }
13588
+ }
13426
13589
  ngOnDestroy() {
13427
13590
  this.subscriptions.forEach((sub) => sub.unsubscribe());
13428
13591
  }
@@ -13437,7 +13600,7 @@ class ClrDatagridRow {
13437
13600
  ClrDatagridRow.decorators = [
13438
13601
  { type: Component, args: [{
13439
13602
  selector: 'clr-dg-row',
13440
- 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]=\"commonStrings.keys.select\"\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]=\"commonStrings.keys.select\"\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.isOpen ? 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",
13603
+ 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]=\"commonStrings.keys.select\"\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]=\"commonStrings.keys.select\"\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.isOpen ? 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",
13441
13604
  host: {
13442
13605
  '[class.datagrid-row]': 'true',
13443
13606
  '[class.datagrid-selected]': 'selected',
@@ -13461,7 +13624,9 @@ ClrDatagridRow.ctorParameters = () => [
13461
13624
  { type: ViewContainerRef },
13462
13625
  { type: Renderer2 },
13463
13626
  { type: ElementRef },
13464
- { type: ClrCommonStringsService }
13627
+ { type: ClrCommonStringsService },
13628
+ { type: Items },
13629
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] }
13465
13630
  ];
13466
13631
  ClrDatagridRow.propDecorators = {
13467
13632
  expandAnimation: [{ type: ViewChild, args: [ClrExpandableAnimation,] }],
@@ -13832,7 +13997,7 @@ KeyNavigationGridController.ctorParameters = () => [
13832
13997
  * The full license information can be found in LICENSE in the root directory of this project.
13833
13998
  */
13834
13999
  class ClrDatagrid {
13835
- constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, el, page, commonStrings, columnsService, keyNavigation) {
14000
+ constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, document, el, page, commonStrings, columnsService, keyNavigation, zone) {
13836
14001
  this.organizer = organizer;
13837
14002
  this.items = items;
13838
14003
  this.expandableRows = expandableRows;
@@ -13842,11 +14007,13 @@ class ClrDatagrid {
13842
14007
  this.displayMode = displayMode;
13843
14008
  this.renderer = renderer;
13844
14009
  this.detailService = detailService;
14010
+ this.document = document;
13845
14011
  this.el = el;
13846
14012
  this.page = page;
13847
14013
  this.commonStrings = commonStrings;
13848
14014
  this.columnsService = columnsService;
13849
14015
  this.keyNavigation = keyNavigation;
14016
+ this.zone = zone;
13850
14017
  /* reference to the enum so that template can access */
13851
14018
  this.SELECTION_TYPE = SelectionType;
13852
14019
  /**
@@ -14031,6 +14198,19 @@ class ClrDatagrid {
14031
14198
  });
14032
14199
  }
14033
14200
  }));
14201
+ // We need to preserve shift state, so it can be used on selection change, regardless of the input event
14202
+ // that triggered the change. This helps us to easily resolve the k/b only case together with the mouse selection case.
14203
+ this.zone.runOutsideAngular(() => {
14204
+ this._subscriptions.push(fromEvent(this.document.body, 'keydown').subscribe((event) => {
14205
+ if (event.key === 'Shift') {
14206
+ this.selection.shiftPressed = true;
14207
+ }
14208
+ }), fromEvent(this.document.body, 'keyup').subscribe((event) => {
14209
+ if (event.key === 'Shift') {
14210
+ this.selection.shiftPressed = false;
14211
+ }
14212
+ }));
14213
+ });
14034
14214
  }
14035
14215
  ngOnDestroy() {
14036
14216
  this._subscriptions.forEach((sub) => sub.unsubscribe());
@@ -14078,11 +14258,13 @@ ClrDatagrid.ctorParameters = () => [
14078
14258
  { type: Renderer2 },
14079
14259
  { type: DetailService },
14080
14260
  { type: String, decorators: [{ type: Inject, args: [UNIQUE_ID,] }] },
14261
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
14081
14262
  { type: ElementRef },
14082
14263
  { type: Page },
14083
14264
  { type: ClrCommonStringsService },
14084
14265
  { type: ColumnsService },
14085
- { type: KeyNavigationGridController }
14266
+ { type: KeyNavigationGridController },
14267
+ { type: NgZone }
14086
14268
  ];
14087
14269
  ClrDatagrid.propDecorators = {
14088
14270
  loading: [{ type: Input, args: ['clrDgLoading',] }],
@@ -14119,7 +14301,7 @@ class ClrDatagridActionBar {
14119
14301
  ClrDatagridActionBar.decorators = [
14120
14302
  { type: Component, args: [{
14121
14303
  selector: 'clr-dg-action-bar',
14122
- template: ` <ng-content></ng-content> `,
14304
+ template: `<ng-content></ng-content>`,
14123
14305
  host: { '[class.datagrid-action-bar]': 'true' }
14124
14306
  },] }
14125
14307
  ];
@@ -14773,7 +14955,9 @@ class DatagridDetailRegisterer {
14773
14955
  }
14774
14956
  }
14775
14957
  DatagridDetailRegisterer.decorators = [
14776
- { type: Directive, args: [{ selector: '[clrIfExpanded]' },] }
14958
+ { type: Directive, args: [{
14959
+ selector: '[clrIfExpanded]',
14960
+ },] }
14777
14961
  ];
14778
14962
  DatagridDetailRegisterer.ctorParameters = () => [
14779
14963
  { type: ExpandableRowsCount, decorators: [{ type: Optional }] }
@@ -14925,7 +15109,9 @@ class ClrDatagridHideableColumn {
14925
15109
  }
14926
15110
  }
14927
15111
  ClrDatagridHideableColumn.decorators = [
14928
- { type: Directive, args: [{ selector: '[clrDgHideableColumn]' },] }
15112
+ { type: Directive, args: [{
15113
+ selector: '[clrDgHideableColumn]',
15114
+ },] }
14929
15115
  ];
14930
15116
  ClrDatagridHideableColumn.ctorParameters = () => [
14931
15117
  { type: TemplateRef },
@@ -15473,7 +15659,9 @@ class DatagridCellRenderer {
15473
15659
  }
15474
15660
  }
15475
15661
  DatagridCellRenderer.decorators = [
15476
- { type: Directive, args: [{ selector: 'clr-dg-cell' },] }
15662
+ { type: Directive, args: [{
15663
+ selector: 'clr-dg-cell',
15664
+ },] }
15477
15665
  ];
15478
15666
  DatagridCellRenderer.ctorParameters = () => [
15479
15667
  { type: ElementRef },
@@ -15589,7 +15777,10 @@ class DatagridHeaderRenderer {
15589
15777
  }
15590
15778
  }
15591
15779
  DatagridHeaderRenderer.decorators = [
15592
- { type: Directive, args: [{ selector: 'clr-dg-column', providers: [ColumnResizerService, COLUMN_STATE_PROVIDER] },] }
15780
+ { type: Directive, args: [{
15781
+ selector: 'clr-dg-column',
15782
+ providers: [ColumnResizerService, COLUMN_STATE_PROVIDER],
15783
+ },] }
15593
15784
  ];
15594
15785
  DatagridHeaderRenderer.ctorParameters = () => [
15595
15786
  { type: ElementRef },
@@ -15695,7 +15886,9 @@ class DatagridRowRenderer {
15695
15886
  }
15696
15887
  }
15697
15888
  DatagridRowRenderer.decorators = [
15698
- { type: Directive, args: [{ selector: 'clr-dg-row, clr-dg-row-detail' },] }
15889
+ { type: Directive, args: [{
15890
+ selector: 'clr-dg-row, clr-dg-row-detail',
15891
+ },] }
15699
15892
  ];
15700
15893
  DatagridRowRenderer.ctorParameters = () => [
15701
15894
  { type: ColumnsService }
@@ -15973,7 +16166,9 @@ ClrDatagridModule.ctorParameters = () => [];
15973
16166
  class ClrStackViewCustomTags {
15974
16167
  }
15975
16168
  ClrStackViewCustomTags.decorators = [
15976
- { type: Directive, args: [{ selector: 'clr-stack-content' },] }
16169
+ { type: Directive, args: [{
16170
+ selector: 'clr-stack-content',
16171
+ },] }
15977
16172
  ];
15978
16173
  class ClrStackViewLabel {
15979
16174
  constructor(uniqueId) {
@@ -16734,7 +16929,9 @@ class ClrRecursiveForOf {
16734
16929
  }
16735
16930
  }
16736
16931
  ClrRecursiveForOf.decorators = [
16737
- { type: Directive, args: [{ selector: '[clrRecursiveFor][clrRecursiveForOf]' },] }
16932
+ { type: Directive, args: [{
16933
+ selector: '[clrRecursiveFor][clrRecursiveForOf]',
16934
+ },] }
16738
16935
  ];
16739
16936
  ClrRecursiveForOf.ctorParameters = () => [
16740
16937
  { type: TemplateRef },
@@ -17117,7 +17314,7 @@ class ClrTreeNode {
17117
17314
  ClrTreeNode.decorators = [
17118
17315
  { type: Component, args: [{
17119
17316
  selector: 'clr-tree-node',
17120
- template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\" class=\"clr-control-label\"></label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\">\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable\">\n <span *ngIf=\"ariaSelected\"> selected </span>\n <span *ngIf=\"!ariaSelected\"> unselected </span>\n </div>\n </div>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n",
17317
+ template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\" class=\"clr-control-label\"></label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\">\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable\">\n <span *ngIf=\"ariaSelected\">selected</span>\n <span *ngIf=\"!ariaSelected\">unselected</span>\n </div>\n </div>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n",
17121
17318
  providers: [
17122
17319
  UNIQUE_ID_PROVIDER,
17123
17320
  TREE_FEATURES_PROVIDER,
@@ -18176,7 +18373,7 @@ class ClrDropdownMenu extends AbstractPopover {
18176
18373
  ClrDropdownMenu.decorators = [
18177
18374
  { type: Component, args: [{
18178
18375
  selector: 'clr-dropdown-menu',
18179
- template: ` <ng-content></ng-content> `,
18376
+ template: `<ng-content></ng-content>`,
18180
18377
  host: {
18181
18378
  '[class.dropdown-menu]': 'true',
18182
18379
  '[attr.role]': '"menu"',
@@ -18616,7 +18813,7 @@ class ClrAlerts {
18616
18813
  ClrAlerts.decorators = [
18617
18814
  { type: Component, args: [{
18618
18815
  selector: 'clr-alerts',
18619
- template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<clr-alerts-pager *ngIf=\"multiAlertService.count > 1\" [clrCurrentAlertIndex]=\"currentAlertIndex\"> </clr-alerts-pager>\n<ng-content select=\"clr-alert\"></ng-content>\n",
18816
+ template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<clr-alerts-pager *ngIf=\"multiAlertService.count > 1\" [clrCurrentAlertIndex]=\"currentAlertIndex\"></clr-alerts-pager>\n<ng-content select=\"clr-alert\"></ng-content>\n",
18620
18817
  providers: [MultiAlertService],
18621
18818
  host: {
18622
18819
  '[class.alerts]': 'true',
@@ -18876,7 +19073,10 @@ class ClrMainContainer {
18876
19073
  }
18877
19074
  }
18878
19075
  ClrMainContainer.decorators = [
18879
- { type: Directive, args: [{ selector: 'clr-main-container', host: { '[class.main-container]': 'true' } },] }
19076
+ { type: Directive, args: [{
19077
+ selector: 'clr-main-container',
19078
+ host: { '[class.main-container]': 'true' },
19079
+ },] }
18880
19080
  ];
18881
19081
  ClrMainContainer.ctorParameters = () => [
18882
19082
  { type: ElementRef },
@@ -18907,7 +19107,9 @@ ClrMainContainerModule.decorators = [
18907
19107
  class MainContainerWillyWonka extends WillyWonka {
18908
19108
  }
18909
19109
  MainContainerWillyWonka.decorators = [
18910
- { type: Directive, args: [{ selector: 'clr-main-container' },] }
19110
+ { type: Directive, args: [{
19111
+ selector: 'clr-main-container',
19112
+ },] }
18911
19113
  ];
18912
19114
 
18913
19115
  /*
@@ -18930,7 +19132,9 @@ class NavDetectionOompaLoompa extends OompaLoompa {
18930
19132
  }
18931
19133
  }
18932
19134
  NavDetectionOompaLoompa.decorators = [
18933
- { type: Directive, args: [{ selector: 'clr-header' },] }
19135
+ { type: Directive, args: [{
19136
+ selector: 'clr-header',
19137
+ },] }
18934
19138
  ];
18935
19139
  NavDetectionOompaLoompa.ctorParameters = () => [
18936
19140
  { type: ChangeDetectorRef },
@@ -19680,7 +19884,9 @@ class ClrNavLevel extends FocusTrap {
19680
19884
  }
19681
19885
  }
19682
19886
  ClrNavLevel.decorators = [
19683
- { type: Directive, args: [{ selector: '[clr-nav-level]' },] }
19887
+ { type: Directive, args: [{
19888
+ selector: '[clr-nav-level]',
19889
+ },] }
19684
19890
  ];
19685
19891
  ClrNavLevel.ctorParameters = () => [
19686
19892
  { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
@@ -19768,7 +19974,9 @@ ClrTemplateRefModule.decorators = [
19768
19974
  class TabsWillyWonka extends WillyWonka {
19769
19975
  }
19770
19976
  TabsWillyWonka.decorators = [
19771
- { type: Directive, args: [{ selector: 'clr-tabs' },] }
19977
+ { type: Directive, args: [{
19978
+ selector: 'clr-tabs',
19979
+ },] }
19772
19980
  ];
19773
19981
 
19774
19982
  /*
@@ -19790,7 +19998,9 @@ class ActiveOompaLoompa extends OompaLoompa {
19790
19998
  }
19791
19999
  }
19792
20000
  ActiveOompaLoompa.decorators = [
19793
- { type: Directive, args: [{ selector: '[clrTabLink], clr-tab-content' },] }
20001
+ { type: Directive, args: [{
20002
+ selector: '[clrTabLink], clr-tab-content',
20003
+ },] }
19794
20004
  ];
19795
20005
  ActiveOompaLoompa.ctorParameters = () => [
19796
20006
  { type: ChangeDetectorRef },
@@ -20044,7 +20254,7 @@ class ClrTab {
20044
20254
  ClrTab.decorators = [
20045
20255
  { type: Component, args: [{
20046
20256
  selector: 'clr-tab',
20047
- template: ` <ng-content></ng-content> `,
20257
+ template: `<ng-content></ng-content>`,
20048
20258
  providers: [IF_ACTIVE_ID_PROVIDER, AriaService]
20049
20259
  },] }
20050
20260
  ];
@@ -20068,7 +20278,7 @@ class ClrTabOverflowContent {
20068
20278
  ClrTabOverflowContent.decorators = [
20069
20279
  { type: Component, args: [{
20070
20280
  selector: 'clr-tab-overflow-content',
20071
- template: ` <ng-content></ng-content> `,
20281
+ template: `<ng-content></ng-content>`,
20072
20282
  host: {
20073
20283
  '[class.dropdown-menu]': 'true',
20074
20284
  }
@@ -20271,8 +20481,7 @@ ClrTabs.decorators = [
20271
20481
  <ng-container
20272
20482
  *ngIf="link.tabsId === tabsId && link.inOverflow"
20273
20483
  [ngTemplateOutlet]="link.templateRefContainer.template"
20274
- >
20275
- </ng-container>
20484
+ ></ng-container>
20276
20485
  </ng-container>
20277
20486
  </clr-tab-overflow-content>
20278
20487
  </div>
@@ -20638,7 +20847,7 @@ class ClrVerticalNavGroup {
20638
20847
  ClrVerticalNavGroup.decorators = [
20639
20848
  { type: Component, args: [{
20640
20849
  selector: 'clr-vertical-nav-group',
20641
- template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div class=\"nav-group-content\">\n <ng-content select=\"[clrVerticalNavLink]\"></ng-content>\n <button\n class=\"nav-group-trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"groupLabel\"\n (click)=\"toggleExpand()\"\n >\n <ng-content select=\"[clrVerticalNavIcon]\"></ng-content>\n <div class=\"nav-group-text\">\n <ng-content></ng-content>\n </div>\n <cds-icon\n shape=\"angle\"\n class=\"nav-group-trigger-icon\"\n [attr.direction]=\"(this.expanded) ? 'down' : 'right'\"\n [attr.title]=\"(this.expanded) ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n >\n </cds-icon>\n </button>\n</div>\n<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->\n<div class=\"nav-group-children\" [@clrExpand]=\"expandAnimationState\" (@clrExpand.done)=\"expandAnimationDone($event)\">\n <ng-content select=\"[clrIfExpanded], clr-vertical-nav-group-children\"></ng-content>\n</div>\n",
20850
+ template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div class=\"nav-group-content\">\n <ng-content select=\"[clrVerticalNavLink]\"></ng-content>\n <button\n class=\"nav-group-trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"groupLabel\"\n (click)=\"toggleExpand()\"\n >\n <ng-content select=\"[clrVerticalNavIcon]\"></ng-content>\n <div class=\"nav-group-text\">\n <ng-content></ng-content>\n </div>\n <cds-icon\n shape=\"angle\"\n class=\"nav-group-trigger-icon\"\n [attr.direction]=\"(this.expanded) ? 'down' : 'right'\"\n [attr.title]=\"(this.expanded) ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n</div>\n<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->\n<div class=\"nav-group-children\" [@clrExpand]=\"expandAnimationState\" (@clrExpand.done)=\"expandAnimationDone($event)\">\n <ng-content select=\"[clrIfExpanded], clr-vertical-nav-group-children\"></ng-content>\n</div>\n",
20642
20851
  providers: [IfExpandService, VerticalNavGroupService],
20643
20852
  animations: [
20644
20853
  trigger('clrExpand', [
@@ -20674,7 +20883,7 @@ class ClrVerticalNavGroupChildren {
20674
20883
  ClrVerticalNavGroupChildren.decorators = [
20675
20884
  { type: Component, args: [{
20676
20885
  selector: 'clr-vertical-nav-group-children',
20677
- template: ` <ng-content></ng-content> `
20886
+ template: `<ng-content></ng-content>`
20678
20887
  },] }
20679
20888
  ];
20680
20889
 
@@ -20693,7 +20902,10 @@ class ClrVerticalNavIcon {
20693
20902
  }
20694
20903
  }
20695
20904
  ClrVerticalNavIcon.decorators = [
20696
- { type: Directive, args: [{ selector: '[clrVerticalNavIcon]', host: { class: 'nav-icon' } },] }
20905
+ { type: Directive, args: [{
20906
+ selector: '[clrVerticalNavIcon]',
20907
+ host: { class: 'nav-icon' },
20908
+ },] }
20697
20909
  ];
20698
20910
  ClrVerticalNavIcon.ctorParameters = () => [
20699
20911
  { type: VerticalNavIconService }
@@ -20954,7 +21166,9 @@ class ClrModalBody {
20954
21166
  }
20955
21167
  }
20956
21168
  ClrModalBody.decorators = [
20957
- { type: Directive, args: [{ selector: '.modal-body' },] }
21169
+ { type: Directive, args: [{
21170
+ selector: '.modal-body',
21171
+ },] }
20958
21172
  ];
20959
21173
  ClrModalBody.ctorParameters = () => [
20960
21174
  { type: Renderer2 },
@@ -21194,7 +21408,7 @@ class ClrTooltip {
21194
21408
  ClrTooltip.decorators = [
21195
21409
  { type: Component, args: [{
21196
21410
  selector: 'clr-tooltip',
21197
- template: ` <ng-content></ng-content> `,
21411
+ template: `<ng-content></ng-content>`,
21198
21412
  host: {
21199
21413
  '[class.tooltip]': 'true',
21200
21414
  },
@@ -21305,7 +21519,7 @@ class ClrTooltipContent extends AbstractPopover {
21305
21519
  ClrTooltipContent.decorators = [
21306
21520
  { type: Component, args: [{
21307
21521
  selector: 'clr-tooltip-content',
21308
- template: ` <ng-content></ng-content> `,
21522
+ template: `<ng-content></ng-content>`,
21309
21523
  host: {
21310
21524
  '[class.tooltip-content]': 'true',
21311
21525
  '[style.opacity]': '1',
@@ -21634,7 +21848,7 @@ class ClrTimeline {
21634
21848
  ClrTimeline.decorators = [
21635
21849
  { type: Component, args: [{
21636
21850
  selector: 'clr-timeline',
21637
- template: ` <ng-content></ng-content> `,
21851
+ template: `<ng-content></ng-content>`,
21638
21852
  host: { '[class.clr-timeline]': 'true' },
21639
21853
  providers: [TimelineIconAttributeService]
21640
21854
  },] }
@@ -21664,7 +21878,7 @@ class ClrTimelineStepTitle {
21664
21878
  ClrTimelineStepTitle.decorators = [
21665
21879
  { type: Component, args: [{
21666
21880
  selector: 'clr-timeline-step-title',
21667
- template: ` <ng-content></ng-content> `,
21881
+ template: `<ng-content></ng-content>`,
21668
21882
  host: { '[class.clr-timeline-step-title]': 'true', '[attr.aria-hidden]': 'true' }
21669
21883
  },] }
21670
21884
  ];
@@ -21713,8 +21927,7 @@ ClrTimelineStep.decorators = [
21713
21927
  [attr.shape]="iconShape"
21714
21928
  [attr.aria-label]="iconAriaLabel"
21715
21929
  [attr.aria-current]="iconAriaCurrent"
21716
- >
21717
- </cds-icon>
21930
+ ></cds-icon>
21718
21931
  </ng-container>
21719
21932
  <div class="clr-timeline-step-body">
21720
21933
  <ng-content select="clr-timeline-step-title"></ng-content>
@@ -21747,7 +21960,7 @@ class ClrTimelineStepDescription {
21747
21960
  ClrTimelineStepDescription.decorators = [
21748
21961
  { type: Component, args: [{
21749
21962
  selector: 'clr-timeline-step-description',
21750
- template: ` <ng-content></ng-content> `,
21963
+ template: `<ng-content></ng-content>`,
21751
21964
  host: { '[class.clr-timeline-step-description]': 'true' }
21752
21965
  },] }
21753
21966
  ];
@@ -21762,7 +21975,7 @@ class ClrTimelineStepHeader {
21762
21975
  ClrTimelineStepHeader.decorators = [
21763
21976
  { type: Component, args: [{
21764
21977
  selector: 'clr-timeline-step-header',
21765
- template: ` <ng-content></ng-content> `,
21978
+ template: `<ng-content></ng-content>`,
21766
21979
  host: { '[class.clr-timeline-step-header]': 'true' }
21767
21980
  },] }
21768
21981
  ];
@@ -22878,7 +23091,9 @@ class ClrWizardPageButtons {
22878
23091
  }
22879
23092
  }
22880
23093
  ClrWizardPageButtons.decorators = [
22881
- { type: Directive, args: [{ selector: '[clrPageButtons]' },] }
23094
+ { type: Directive, args: [{
23095
+ selector: '[clrPageButtons]',
23096
+ },] }
22882
23097
  ];
22883
23098
  ClrWizardPageButtons.ctorParameters = () => [
22884
23099
  { type: TemplateRef }
@@ -22895,7 +23110,9 @@ class ClrWizardPageHeaderActions {
22895
23110
  }
22896
23111
  }
22897
23112
  ClrWizardPageHeaderActions.decorators = [
22898
- { type: Directive, args: [{ selector: '[clrPageHeaderActions]' },] }
23113
+ { type: Directive, args: [{
23114
+ selector: '[clrPageHeaderActions]',
23115
+ },] }
22899
23116
  ];
22900
23117
  ClrWizardPageHeaderActions.ctorParameters = () => [
22901
23118
  { type: TemplateRef }
@@ -22912,7 +23129,9 @@ class ClrWizardPageNavTitle {
22912
23129
  }
22913
23130
  }
22914
23131
  ClrWizardPageNavTitle.decorators = [
22915
- { type: Directive, args: [{ selector: '[clrPageNavTitle]' },] }
23132
+ { type: Directive, args: [{
23133
+ selector: '[clrPageNavTitle]',
23134
+ },] }
22916
23135
  ];
22917
23136
  ClrWizardPageNavTitle.ctorParameters = () => [
22918
23137
  { type: TemplateRef }
@@ -22929,7 +23148,9 @@ class ClrWizardPageTitle {
22929
23148
  }
22930
23149
  }
22931
23150
  ClrWizardPageTitle.decorators = [
22932
- { type: Directive, args: [{ selector: '[clrPageTitle]' },] }
23151
+ { type: Directive, args: [{
23152
+ selector: '[clrPageTitle]',
23153
+ },] }
22933
23154
  ];
22934
23155
  ClrWizardPageTitle.ctorParameters = () => [
22935
23156
  { type: TemplateRef }
@@ -24169,7 +24390,9 @@ ClrWizardButton.propDecorators = {
24169
24390
  class ClrWizardCustomTags {
24170
24391
  }
24171
24392
  ClrWizardCustomTags.decorators = [
24172
- { type: Directive, args: [{ selector: 'clr-wizard-title, clr-wizard-pagetitle' },] }
24393
+ { type: Directive, args: [{
24394
+ selector: 'clr-wizard-title, clr-wizard-pagetitle',
24395
+ },] }
24173
24396
  ];
24174
24397
 
24175
24398
  /*