@clr/angular 13.1.0 → 13.2.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 (33) hide show
  1. package/clarity.api.md +72 -25
  2. package/clr-angular.module.d.ts +13 -12
  3. package/data/tree-view/models/tree-node.model.d.ts +1 -0
  4. package/data/tree-view/tree-focus-manager.service.d.ts +6 -0
  5. package/data/tree-view/tree-node.d.ts +9 -4
  6. package/esm2020/clr-angular.module.mjs +5 -1
  7. package/esm2020/data/tree-view/models/tree-node.model.mjs +1 -1
  8. package/esm2020/data/tree-view/tree-focus-manager.service.mjs +69 -1
  9. package/esm2020/data/tree-view/tree-node.mjs +45 -16
  10. package/esm2020/forms/datepicker/calendar.mjs +3 -3
  11. package/esm2020/layout/nav/aria-current-link.mjs +28 -0
  12. package/esm2020/layout/nav/index.mjs +2 -1
  13. package/esm2020/layout/nav/navigation.module.mjs +5 -1
  14. package/esm2020/utils/focus/key-focus/util.mjs +6 -1
  15. package/esm2020/utils/for-type-ahead/for-type-ahead.mjs +54 -0
  16. package/esm2020/utils/for-type-ahead/for-type-ahead.module.mjs +23 -0
  17. package/esm2020/utils/for-type-ahead/for-type-ahead.service.mjs +29 -0
  18. package/esm2020/utils/for-type-ahead/index.mjs +8 -0
  19. package/esm2020/utils/index.mjs +2 -1
  20. package/fesm2015/clr-angular.mjs +238 -5
  21. package/fesm2015/clr-angular.mjs.map +1 -1
  22. package/fesm2020/clr-angular.mjs +238 -5
  23. package/fesm2020/clr-angular.mjs.map +1 -1
  24. package/layout/nav/aria-current-link.d.ts +13 -0
  25. package/layout/nav/index.d.ts +1 -0
  26. package/layout/nav/navigation.module.d.ts +7 -6
  27. package/package.json +1 -1
  28. package/utils/focus/key-focus/util.d.ts +1 -0
  29. package/utils/for-type-ahead/for-type-ahead.d.ts +15 -0
  30. package/utils/for-type-ahead/for-type-ahead.module.d.ts +8 -0
  31. package/utils/for-type-ahead/for-type-ahead.service.d.ts +11 -0
  32. package/utils/for-type-ahead/index.d.ts +2 -0
  33. package/utils/index.d.ts +1 -0
@@ -11,6 +11,7 @@ import * as i1 from '@angular/forms';
11
11
  import { FormsModule, SelectMultipleControlValueAccessor, FormControl, FormGroup } from '@angular/forms';
12
12
  import { FocusTrapTrackerService, createId, isFocusable, isHTMLElement } from '@cds/core/internal';
13
13
  import '@cds/core/internal-components/close-button/register.js';
14
+ import * as i1$1 from '@angular/router';
14
15
  import '@cds/core/icon/register';
15
16
 
16
17
  /*
@@ -338,6 +339,11 @@ function preventArrowKeyScroll(event) {
338
339
  event.preventDefault();
339
340
  }
340
341
  }
342
+ function isKeyEitherLetterOrNumber(event) {
343
+ const char = event.key;
344
+ // Only letter characters differ when they switch between lowercase and uppercase, whether it's an English or non-English letter.
345
+ return char.toLowerCase() !== char.toUpperCase() || (char >= '0' && char <= '9');
346
+ }
341
347
 
342
348
  /*
343
349
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -4963,10 +4969,10 @@ class ClrCalendar {
4963
4969
  }
4964
4970
  }
4965
4971
  ClrCalendar.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrCalendar, deps: [{ token: LocaleHelperService }, { token: DateNavigationService }, { token: DatepickerFocusService }, { token: DateIOService }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
4966
- ClrCalendar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrCalendar, selector: "clr-calendar", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0, template: "<table class=\"calendar-table\">\n <tr class=\"calendar-row weekdays\">\n <td *ngFor=\"let day of localeDays\" class=\"calendar-cell weekday\" role=\"heading\" [attr.aria-label]=\"day.day\">\n {{day.narrow}}\n </td>\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", components: [{ type: ClrDay, selector: "clr-day", inputs: ["clrDayView"] }], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4972
+ ClrCalendar.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrCalendar, selector: "clr-calendar", host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0, 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", components: [{ type: ClrDay, selector: "clr-day", inputs: ["clrDayView"] }], directives: [{ type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
4967
4973
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrCalendar, decorators: [{
4968
4974
  type: Component,
4969
- args: [{ selector: 'clr-calendar', template: "<table class=\"calendar-table\">\n <tr class=\"calendar-row weekdays\">\n <td *ngFor=\"let day of localeDays\" class=\"calendar-cell weekday\" role=\"heading\" [attr.aria-label]=\"day.day\">\n {{day.narrow}}\n </td>\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" }]
4975
+ 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" }]
4970
4976
  }], ctorParameters: function () { return [{ type: LocaleHelperService }, { type: DateNavigationService }, { type: DatepickerFocusService }, { type: DateIOService }, { type: i0.ElementRef }]; }, propDecorators: { onKeyDown: [{
4971
4977
  type: HostListener,
4972
4978
  args: ['keydown', ['$event']]
@@ -15637,6 +15643,107 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
15637
15643
  * The full license information can be found in LICENSE in the root directory of this project.
15638
15644
  */
15639
15645
 
15646
+ /*
15647
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15648
+ * This software is released under MIT license.
15649
+ * The full license information can be found in LICENSE in the root directory of this project.
15650
+ */
15651
+ class ForTypeAheadProvider {
15652
+ constructor() {
15653
+ this._textContentChange = new Subject();
15654
+ }
15655
+ get textContentChange() {
15656
+ return this._textContentChange.asObservable();
15657
+ }
15658
+ get textContent() {
15659
+ return this._textContent;
15660
+ }
15661
+ set textContent(value) {
15662
+ this._textContent = value;
15663
+ this._textContentChange.next(value);
15664
+ }
15665
+ }
15666
+ ForTypeAheadProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ForTypeAheadProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
15667
+ ForTypeAheadProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ForTypeAheadProvider });
15668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ForTypeAheadProvider, decorators: [{
15669
+ type: Injectable
15670
+ }] });
15671
+
15672
+ /*
15673
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15674
+ * This software is released under MIT license.
15675
+ * The full license information can be found in LICENSE in the root directory of this project.
15676
+ */
15677
+ // The purpose of this directive is to provide the text content of its host element
15678
+ // or text content that's passed to its input.
15679
+ // This directive must stay optional. So do not embed this directive in a component module by default.
15680
+ // If users need to use this directive, they should import its module on their side.
15681
+ class ClrForTypeAhead {
15682
+ constructor(el, forTypeAheadProvider) {
15683
+ this.el = el;
15684
+ this.forTypeAheadProvider = forTypeAheadProvider;
15685
+ }
15686
+ trimAndLowerCase(value) {
15687
+ return value.toLocaleLowerCase().trim();
15688
+ }
15689
+ get content() {
15690
+ return this._content;
15691
+ }
15692
+ set content(value) {
15693
+ if (value) {
15694
+ this._content = this.trimAndLowerCase(value);
15695
+ this.forTypeAheadProvider.textContent = this._content;
15696
+ }
15697
+ else {
15698
+ this._content = this.trimAndLowerCase(this.el.nativeElement.textContent);
15699
+ this.forTypeAheadProvider.textContent = this._content;
15700
+ }
15701
+ }
15702
+ ngOnInit() {
15703
+ if (!this._content) {
15704
+ this._content = this.trimAndLowerCase(this.el.nativeElement.textContent);
15705
+ this.forTypeAheadProvider.textContent = this._content;
15706
+ }
15707
+ }
15708
+ }
15709
+ ClrForTypeAhead.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrForTypeAhead, deps: [{ token: i0.ElementRef }, { token: ForTypeAheadProvider }], target: i0.ɵɵFactoryTarget.Directive });
15710
+ ClrForTypeAhead.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: ClrForTypeAhead, selector: "[clrForTypeAhead]", inputs: { content: ["clrForTypeAhead", "content"] }, providers: [ForTypeAheadProvider], ngImport: i0 });
15711
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrForTypeAhead, decorators: [{
15712
+ type: Directive,
15713
+ args: [{
15714
+ providers: [ForTypeAheadProvider],
15715
+ selector: '[clrForTypeAhead]',
15716
+ }]
15717
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ForTypeAheadProvider }]; }, propDecorators: { content: [{
15718
+ type: Input,
15719
+ args: ['clrForTypeAhead']
15720
+ }] } });
15721
+
15722
+ /*
15723
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15724
+ * This software is released under MIT license.
15725
+ * The full license information can be found in LICENSE in the root directory of this project.
15726
+ */
15727
+ class ClrForTypeAheadModule {
15728
+ }
15729
+ ClrForTypeAheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrForTypeAheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
15730
+ ClrForTypeAheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrForTypeAheadModule, declarations: [ClrForTypeAhead], imports: [CommonModule], exports: [ClrForTypeAhead] });
15731
+ ClrForTypeAheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrForTypeAheadModule, imports: [[CommonModule]] });
15732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrForTypeAheadModule, decorators: [{
15733
+ type: NgModule,
15734
+ args: [{
15735
+ imports: [CommonModule],
15736
+ declarations: [ClrForTypeAhead],
15737
+ exports: [ClrForTypeAhead],
15738
+ }]
15739
+ }] });
15740
+
15741
+ /*
15742
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15743
+ * This software is released under MIT license.
15744
+ * The full license information can be found in LICENSE in the root directory of this project.
15745
+ */
15746
+
15640
15747
  /*
15641
15748
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
15642
15749
  * This software is released under MIT license.
@@ -17870,6 +17977,71 @@ class TreeFocusManagerService {
17870
17977
  return this.findNextFocusable(model);
17871
17978
  }
17872
17979
  }
17980
+ findDescendentNodeStartsWith(searchString, model) {
17981
+ if (model.expanded && model.children.length > 0) {
17982
+ for (const childModel of model.children) {
17983
+ const found = this.findNodeStartsWith(searchString, childModel);
17984
+ if (found) {
17985
+ return found;
17986
+ }
17987
+ }
17988
+ }
17989
+ return null;
17990
+ }
17991
+ findSiblingNodeStartsWith(searchString, model) {
17992
+ const siblings = this.findSiblings(model);
17993
+ const selfIndex = siblings.indexOf(model);
17994
+ // Look from sibling nodes
17995
+ for (let i = selfIndex + 1; i < siblings.length; i++) {
17996
+ const siblingModel = siblings[i];
17997
+ const found = this.findNodeStartsWith(searchString, siblingModel);
17998
+ if (found) {
17999
+ return found;
18000
+ }
18001
+ }
18002
+ return null;
18003
+ }
18004
+ findRootNodeStartsWith(searchString, model) {
18005
+ for (const rootModel of this.rootNodeModels) {
18006
+ // Don't look from a parent yet
18007
+ if (model.parent && model.parent === rootModel) {
18008
+ continue;
18009
+ }
18010
+ const found = this.findNodeStartsWith(searchString, rootModel);
18011
+ if (found) {
18012
+ return found;
18013
+ }
18014
+ }
18015
+ return null;
18016
+ }
18017
+ findNodeStartsWith(searchString, model) {
18018
+ if (!model) {
18019
+ return null;
18020
+ }
18021
+ if (model.textContent.startsWith(searchString)) {
18022
+ return model;
18023
+ }
18024
+ return this.findDescendentNodeStartsWith(searchString, model);
18025
+ }
18026
+ findClosestNodeStartsWith(searchString, model) {
18027
+ if (!model) {
18028
+ return null;
18029
+ }
18030
+ const foundFromDescendents = this.findDescendentNodeStartsWith(searchString, model);
18031
+ if (foundFromDescendents) {
18032
+ return foundFromDescendents;
18033
+ }
18034
+ const foundFromSiblings = this.findSiblingNodeStartsWith(searchString, model);
18035
+ if (foundFromSiblings) {
18036
+ return foundFromSiblings;
18037
+ }
18038
+ const foundFromRootNodes = this.findRootNodeStartsWith(searchString, model);
18039
+ if (foundFromRootNodes) {
18040
+ return foundFromRootNodes;
18041
+ }
18042
+ // Now look from its own direct parent
18043
+ return this.findNodeStartsWith(searchString, model.parent);
18044
+ }
17873
18045
  focusNode(model) {
17874
18046
  if (model) {
17875
18047
  this._focusRequest.next(model.nodeId);
@@ -17899,6 +18071,9 @@ class TreeFocusManagerService {
17899
18071
  focusNodeBelow(model) {
17900
18072
  this.focusNode(this.findNodeBelow(model));
17901
18073
  }
18074
+ focusNodeStartsWith(searchString, model) {
18075
+ this.focusNode(this.findClosestNodeStartsWith(searchString, model));
18076
+ }
17902
18077
  }
17903
18078
  TreeFocusManagerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TreeFocusManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
17904
18079
  TreeFocusManagerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: TreeFocusManagerService });
@@ -17988,10 +18163,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
17988
18163
  * The full license information can be found in LICENSE in the root directory of this project.
17989
18164
  */
17990
18165
  const LVIEW_CONTEXT_INDEX = 8;
18166
+ // If the user types multiple keys without allowing 200ms to pass between them,
18167
+ // then those keys are sent together in one request.
18168
+ const TREE_TYPE_AHEAD_TIMEOUT = 200;
17991
18169
  class ClrTreeNode {
17992
- constructor(nodeId, platformId, parent, featuresService, expandService, commonStrings, focusManager, injector) {
18170
+ constructor(nodeId, platformId, parent, forTypeAheadProvider, featuresService, expandService, commonStrings, focusManager, injector) {
17993
18171
  this.nodeId = nodeId;
17994
18172
  this.platformId = platformId;
18173
+ this.forTypeAheadProvider = forTypeAheadProvider;
17995
18174
  this.featuresService = featuresService;
17996
18175
  this.expandService = expandService;
17997
18176
  this.commonStrings = commonStrings;
@@ -17999,6 +18178,8 @@ class ClrTreeNode {
17999
18178
  this.STATES = ClrSelectedState;
18000
18179
  this.skipEmitChange = false;
18001
18180
  this.isModelLoading = false;
18181
+ this.typeAheadKeyEvent = new Subject();
18182
+ this.typeAheadKeyBuffer = '';
18002
18183
  this.selectedChange = new EventEmitter(false);
18003
18184
  this.expandedChange = new EventEmitter();
18004
18185
  this.subscriptions = [];
@@ -18081,6 +18262,16 @@ class ClrTreeNode {
18081
18262
  }));
18082
18263
  this.subscriptions.push(this._model.loading$.pipe(debounceTime(0)).subscribe(isLoading => (this.isModelLoading = isLoading)));
18083
18264
  }
18265
+ ngAfterContentInit() {
18266
+ if (this.forTypeAheadProvider) {
18267
+ this._model.textContent = this.forTypeAheadProvider.textContent;
18268
+ this.subscriptions.push(this.typeAheadKeyEvent.pipe(debounceTime(TREE_TYPE_AHEAD_TIMEOUT)).subscribe((bufferedKeys) => {
18269
+ this.focusManager.focusNodeStartsWith(bufferedKeys, this._model);
18270
+ // reset once bufferedKeys are used
18271
+ this.typeAheadKeyBuffer = '';
18272
+ }));
18273
+ }
18274
+ }
18084
18275
  ngOnDestroy() {
18085
18276
  this._model.destroy();
18086
18277
  this.subscriptions.forEach(sub => sub.unsubscribe());
@@ -18146,8 +18337,15 @@ class ClrTreeNode {
18146
18337
  this.toggleExpandOrTriggerDefault();
18147
18338
  break;
18148
18339
  default:
18340
+ if (this._model.textContent && isKeyEitherLetterOrNumber(event)) {
18341
+ this.typeAheadKeyBuffer += event.key;
18342
+ this.typeAheadKeyEvent.next(this.typeAheadKeyBuffer);
18343
+ return;
18344
+ }
18149
18345
  break;
18150
18346
  }
18347
+ // if non-letter keys are pressed, do reset.
18348
+ this.typeAheadKeyBuffer = '';
18151
18349
  }
18152
18350
  get isParent() {
18153
18351
  return this._model.children && this._model.children.length > 0;
@@ -18194,7 +18392,7 @@ class ClrTreeNode {
18194
18392
  }
18195
18393
  }
18196
18394
  }
18197
- ClrTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrTreeNode, deps: [{ token: UNIQUE_ID }, { token: PLATFORM_ID }, { token: ClrTreeNode, optional: true, skipSelf: true }, { token: TreeFeaturesService }, { token: IfExpandService }, { token: ClrCommonStringsService }, { token: TreeFocusManagerService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
18395
+ ClrTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrTreeNode, deps: [{ token: UNIQUE_ID }, { token: PLATFORM_ID }, { token: ClrTreeNode, optional: true, skipSelf: true }, { token: ForTypeAheadProvider, optional: true, self: true }, { token: TreeFeaturesService }, { token: IfExpandService }, { token: ClrCommonStringsService }, { token: TreeFocusManagerService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
18198
18396
  ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.0.3", type: ClrTreeNode, selector: "clr-tree-node", inputs: { selected: ["clrSelected", "selected"], expandable: ["clrExpandable", "expandable"], expanded: ["clrExpanded", "expanded"] }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true" } }, providers: [
18199
18397
  UNIQUE_ID_PROVIDER,
18200
18398
  TREE_FEATURES_PROVIDER,
@@ -18235,6 +18433,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
18235
18433
  type: Optional
18236
18434
  }, {
18237
18435
  type: SkipSelf
18436
+ }] }, { type: ForTypeAheadProvider, decorators: [{
18437
+ type: Optional
18438
+ }, {
18439
+ type: Self
18238
18440
  }] }, { type: TreeFeaturesService }, { type: IfExpandService }, { type: ClrCommonStringsService }, { type: TreeFocusManagerService }, { type: i0.Injector }]; }, propDecorators: { selected: [{
18239
18441
  type: Input,
18240
18442
  args: ['clrSelected']
@@ -20722,6 +20924,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
20722
20924
  args: ['click', ['$event.target']]
20723
20925
  }] } });
20724
20926
 
20927
+ /*
20928
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
20929
+ * This software is released under MIT license.
20930
+ * The full license information can be found in LICENSE in the root directory of this project.
20931
+ */
20932
+ class ClrAriaCurrentLink {
20933
+ constructor(rla) {
20934
+ this.rla = rla;
20935
+ }
20936
+ ngOnInit() {
20937
+ this.subscription = this.rla.isActiveChange.subscribe(isActive => {
20938
+ this.ariaCurrent = isActive ? 'page' : undefined;
20939
+ });
20940
+ }
20941
+ ngOnDestroy() {
20942
+ this.subscription.unsubscribe();
20943
+ }
20944
+ }
20945
+ ClrAriaCurrentLink.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrAriaCurrentLink, deps: [{ token: i1$1.RouterLinkActive }], target: i0.ɵɵFactoryTarget.Directive });
20946
+ ClrAriaCurrentLink.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.0.3", type: ClrAriaCurrentLink, selector: "[clrAriaCurrentLink]", host: { properties: { "attr.aria-current": "ariaCurrent" } }, ngImport: i0 });
20947
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrAriaCurrentLink, decorators: [{
20948
+ type: Directive,
20949
+ args: [{ selector: '[clrAriaCurrentLink]', host: { '[attr.aria-current]': 'ariaCurrent' } }]
20950
+ }], ctorParameters: function () { return [{ type: i1$1.RouterLinkActive }]; } });
20951
+
20725
20952
  /*
20726
20953
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
20727
20954
  * This software is released under MIT license.
@@ -20730,6 +20957,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
20730
20957
  const CLR_NAVIGATION_DIRECTIVES = [
20731
20958
  ClrHeader,
20732
20959
  ClrNavLevel,
20960
+ ClrAriaCurrentLink,
20733
20961
  NavDetectionOompaLoompa,
20734
20962
  MainContainerWillyWonka,
20735
20963
  ];
@@ -20738,9 +20966,11 @@ class ClrNavigationModule {
20738
20966
  ClrNavigationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrNavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
20739
20967
  ClrNavigationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrNavigationModule, declarations: [ClrHeader,
20740
20968
  ClrNavLevel,
20969
+ ClrAriaCurrentLink,
20741
20970
  NavDetectionOompaLoompa,
20742
20971
  MainContainerWillyWonka], imports: [CommonModule, ClrIconModule, ClrDropdownModule], exports: [ClrHeader,
20743
20972
  ClrNavLevel,
20973
+ ClrAriaCurrentLink,
20744
20974
  NavDetectionOompaLoompa,
20745
20975
  MainContainerWillyWonka] });
20746
20976
  ClrNavigationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.0.3", ngImport: i0, type: ClrNavigationModule, imports: [[CommonModule, ClrIconModule, ClrDropdownModule]] });
@@ -26826,6 +27056,7 @@ ClarityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version:
26826
27056
  ClrConditionalModule,
26827
27057
  ClrFocusTrapModule,
26828
27058
  ClrFocusOnViewInitModule,
27059
+ ClrForTypeAheadModule,
26829
27060
  ClrButtonModule,
26830
27061
  ClrFormsModule,
26831
27062
  ClrLayoutModule,
@@ -26845,6 +27076,7 @@ ClarityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
26845
27076
  ClrConditionalModule,
26846
27077
  ClrFocusTrapModule,
26847
27078
  ClrFocusOnViewInitModule,
27079
+ ClrForTypeAheadModule,
26848
27080
  ClrButtonModule,
26849
27081
  ClrFormsModule,
26850
27082
  ClrLayoutModule,
@@ -26868,6 +27100,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.0.3", ngImpor
26868
27100
  ClrConditionalModule,
26869
27101
  ClrFocusTrapModule,
26870
27102
  ClrFocusOnViewInitModule,
27103
+ ClrForTypeAheadModule,
26871
27104
  ClrButtonModule,
26872
27105
  ClrFormsModule,
26873
27106
  ClrLayoutModule,
@@ -27179,5 +27412,5 @@ const CLR_MENU_POSITIONS = [
27179
27412
  * Generated bundle index. Do not edit.
27180
27413
  */
27181
27414
 
27182
- export { CLR_ALERT_DIRECTIVES, CLR_BUTTON_GROUP_DIRECTIVES, CLR_DATAGRID_DIRECTIVES, CLR_DATEPICKER_DIRECTIVES, CLR_DRAG_AND_DROP_DIRECTIVES, CLR_DROPDOWN_DIRECTIVES, CLR_ICON_DIRECTIVES, CLR_LAYOUT_DIRECTIVES, CLR_LOADING_BUTTON_DIRECTIVES, CLR_LOADING_DIRECTIVES, CLR_MENU_POSITIONS, CLR_MODAL_DIRECTIVES, CLR_NAVIGATION_DIRECTIVES, CLR_PROGRESS_BAR_DIRECTIVES, CLR_SIGNPOST_DIRECTIVES, CLR_SPINNER_DIRECTIVES, CLR_STACK_VIEW_DIRECTIVES, CLR_TABS_DIRECTIVES, CLR_TOOLTIP_DIRECTIVES, CLR_TREE_VIEW_DIRECTIVES, CLR_VERTICAL_NAV_DIRECTIVES, CLR_WIZARD_DIRECTIVES, CONDITIONAL_DIRECTIVES, CUSTOM_BUTTON_TYPES, CdsIconCustomTag, ClarityModule, ClrAbstractContainer, ClrAccordion, ClrAccordionContent, ClrAccordionDescription, ClrAccordionModule, ClrAccordionPanel, ClrAccordionTitle, ClrAlert, ClrAlertItem, ClrAlertModule, ClrAlertText, ClrAlerts, ClrAlertsPager, ClrAlignment, ClrAriaLivePoliteness, ClrAriaLiveService, ClrAxis, ClrButton, ClrButtonGroup, ClrButtonGroupModule, ClrButtonModule, ClrCalendar, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxModule, ClrCheckboxWrapper, ClrCombobox, ClrComboboxContainer, ClrComboboxModule, ClrCommonFormsModule, ClrCommonStringsService, ClrConditionalModule, ClrControl, ClrControlContainer, ClrControlError, ClrControlHelper, ClrControlSuccess, ClrDataModule, ClrDatagrid, ClrDatagridActionBar, ClrDatagridActionOverflow, ClrDatagridCell, ClrDatagridColumn, ClrDatagridColumnSeparator, ClrDatagridColumnToggle, ClrDatagridColumnToggleButton, ClrDatagridColumnToggleTitle, ClrDatagridDetail, ClrDatagridDetailBody, ClrDatagridDetailHeader, ClrDatagridFilter, ClrDatagridFooter, ClrDatagridHideableColumn, ClrDatagridItems, ClrDatagridItemsTrackBy, ClrDatagridModule, ClrDatagridPageSize, ClrDatagridPagination, ClrDatagridPlaceholder, ClrDatagridRow, ClrDatagridRowDetail, ClrDatagridSortOrder, ClrDatalist, ClrDatalistContainer, ClrDatalistInput, ClrDatalistModule, ClrDateContainer, ClrDateInput, ClrDatepickerModule, ClrDatepickerViewManager, ClrDay, ClrDaypicker, ClrDestroyService, ClrDragAndDropModule, ClrDragEvent, ClrDragHandle, ClrDraggable, ClrDraggableGhost, ClrDropdown, ClrDropdownItem, ClrDropdownMenu, ClrDropdownModule, ClrDropdownTrigger, ClrDroppable, ClrEmphasisModule, ClrExpandableAnimation, ClrFocusOnViewInit, ClrFocusOnViewInitModule, ClrForm, ClrFormLayout, ClrFormsModule, ClrHeader, ClrIconCustomTag, ClrIconModule, ClrIfActive, ClrIfDetail, ClrIfDragged, ClrIfError, ClrIfExpanded, ClrIfOpen, ClrIfSuccess, ClrInput, ClrInputContainer, ClrInputModule, ClrLabel, ClrLayout, ClrLayoutModule, ClrLoading, ClrLoadingButton, ClrLoadingButtonModule, ClrLoadingModule, ClrLoadingState, ClrMainContainer, ClrMainContainerModule, ClrModal, ClrModalBody, ClrModalModule, ClrMonthpicker, ClrNavLevel, ClrNavigationModule, ClrOption, ClrOptionItems, ClrOptionSelected, ClrOptions, ClrPassword, ClrPasswordContainer, ClrPasswordModule, ClrPopoverAnchor, ClrPopoverContent, ClrPopoverEventsService, ClrPopoverModule, ClrPopoverPositionService, ClrPopoverToggleService, ClrProgressBar, ClrProgressBarModule, ClrRadio, ClrRadioContainer, ClrRadioModule, ClrRadioWrapper, ClrRange, ClrRangeContainer, ClrRangeModule, ClrRecursiveForOf, ClrSelect, ClrSelectContainer, ClrSelectModule, ClrSelectedState, ClrSide, ClrSignpost, ClrSignpostContent, ClrSignpostModule, ClrSignpostTrigger, ClrSpinner, ClrSpinnerModule, ClrStackBlock, ClrStackContentInput, ClrStackHeader, ClrStackInput, ClrStackSelect, ClrStackView, ClrStackViewCustomTags, ClrStackViewLabel, ClrStackViewModule, ClrStepButton, ClrStepButtonType, ClrStepper, ClrStepperModule, ClrStepperPanel, ClrTab, ClrTabContent, ClrTabLink, ClrTabOverflowContent, ClrTabs, ClrTabsModule, ClrTextarea, ClrTextareaContainer, ClrTextareaModule, ClrTimeline, ClrTimelineLayout, ClrTimelineModule, ClrTimelineStep, ClrTimelineStepDescription, ClrTimelineStepHeader, ClrTimelineStepState, ClrTimelineStepTitle, ClrTooltip, ClrTooltipContent, ClrTooltipModule, ClrTooltipTrigger, ClrTree, ClrTreeNode, ClrTreeNodeLink, ClrTreeViewModule, ClrVerticalNav, ClrVerticalNavGroup, ClrVerticalNavGroupChildren, ClrVerticalNavIcon, ClrVerticalNavLink, ClrVerticalNavModule, ClrWizard, ClrWizardButton, ClrWizardCustomTags, ClrWizardHeaderAction, ClrWizardModule, ClrWizardPage, ClrWizardPageButtons, ClrWizardPageHeaderActions, ClrWizardPageNavTitle, ClrWizardPageTitle, ClrWizardStepnav, ClrWizardStepnavItem, ClrYearpicker, DEFAULT_BUTTON_TYPES, DatagridNumericFilter, DatagridPropertyComparator, DatagridPropertyNumericFilter, DatagridPropertyStringFilter, DatagridStringFilter, EXPANDABLE_ANIMATION_DIRECTIVES, FOCUS_ON_VIEW_INIT, FOCUS_ON_VIEW_INIT_DIRECTIVES, IS_TOGGLE, IS_TOGGLE_PROVIDER, LoadingListener, MainContainerWillyWonka, NavDetectionOompaLoompa, TOGGLE_SERVICE, TOGGLE_SERVICE_PROVIDER, ToggleServiceFactory, WrappedFormControl, collapse, commonStringsDefault, fade, fadeSlide, isToggleFactory, slide, AccordionOompaLoompa as ÇlrAccordionOompaLoompa, AccordionWillyWonka as ÇlrAccordionWillyWonka, ActionableOompaLoompa as ÇlrActionableOompaLoompa, ActiveOompaLoompa as ÇlrActiveOompaLoompa, ClrFocusTrapModule as ÇlrClrFocusTrapModule, ClrPopoverCloseButton as ÇlrClrPopoverCloseButton, ClrPopoverModuleNext as ÇlrClrPopoverModuleNext, ClrPopoverOpenCloseButton as ÇlrClrPopoverOpenCloseButton, DatagridCellRenderer as ÇlrDatagridCellRenderer, DatagridDetailRegisterer as ÇlrDatagridDetailRegisterer, DatagridHeaderRenderer as ÇlrDatagridHeaderRenderer, DatagridMainRenderer as ÇlrDatagridMainRenderer, DatagridRowRenderer as ÇlrDatagridRowRenderer, DatagridWillyWonka as ÇlrDatagridWillyWonka, ExpandableOompaLoompa as ÇlrExpandableOompaLoompa, FocusTrapDirective as ÇlrFocusTrapDirective, FocusTrapTracker as ÇlrFocusTrapTracker, StepperOompaLoompa as ÇlrStepperOompaLoompa, StepperWillyWonka as ÇlrStepperWillyWonka, TabsWillyWonka as ÇlrTabsWillyWonka, WrappedCell as ÇlrWrappedCell, WrappedColumn as ÇlrWrappedColumn, WrappedRow as ÇlrWrappedRow };
27415
+ export { CLR_ALERT_DIRECTIVES, CLR_BUTTON_GROUP_DIRECTIVES, CLR_DATAGRID_DIRECTIVES, CLR_DATEPICKER_DIRECTIVES, CLR_DRAG_AND_DROP_DIRECTIVES, CLR_DROPDOWN_DIRECTIVES, CLR_ICON_DIRECTIVES, CLR_LAYOUT_DIRECTIVES, CLR_LOADING_BUTTON_DIRECTIVES, CLR_LOADING_DIRECTIVES, CLR_MENU_POSITIONS, CLR_MODAL_DIRECTIVES, CLR_NAVIGATION_DIRECTIVES, CLR_PROGRESS_BAR_DIRECTIVES, CLR_SIGNPOST_DIRECTIVES, CLR_SPINNER_DIRECTIVES, CLR_STACK_VIEW_DIRECTIVES, CLR_TABS_DIRECTIVES, CLR_TOOLTIP_DIRECTIVES, CLR_TREE_VIEW_DIRECTIVES, CLR_VERTICAL_NAV_DIRECTIVES, CLR_WIZARD_DIRECTIVES, CONDITIONAL_DIRECTIVES, CUSTOM_BUTTON_TYPES, CdsIconCustomTag, ClarityModule, ClrAbstractContainer, ClrAccordion, ClrAccordionContent, ClrAccordionDescription, ClrAccordionModule, ClrAccordionPanel, ClrAccordionTitle, ClrAlert, ClrAlertItem, ClrAlertModule, ClrAlertText, ClrAlerts, ClrAlertsPager, ClrAlignment, ClrAriaCurrentLink, ClrAriaLivePoliteness, ClrAriaLiveService, ClrAxis, ClrButton, ClrButtonGroup, ClrButtonGroupModule, ClrButtonModule, ClrCalendar, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxModule, ClrCheckboxWrapper, ClrCombobox, ClrComboboxContainer, ClrComboboxModule, ClrCommonFormsModule, ClrCommonStringsService, ClrConditionalModule, ClrControl, ClrControlContainer, ClrControlError, ClrControlHelper, ClrControlSuccess, ClrDataModule, ClrDatagrid, ClrDatagridActionBar, ClrDatagridActionOverflow, ClrDatagridCell, ClrDatagridColumn, ClrDatagridColumnSeparator, ClrDatagridColumnToggle, ClrDatagridColumnToggleButton, ClrDatagridColumnToggleTitle, ClrDatagridDetail, ClrDatagridDetailBody, ClrDatagridDetailHeader, ClrDatagridFilter, ClrDatagridFooter, ClrDatagridHideableColumn, ClrDatagridItems, ClrDatagridItemsTrackBy, ClrDatagridModule, ClrDatagridPageSize, ClrDatagridPagination, ClrDatagridPlaceholder, ClrDatagridRow, ClrDatagridRowDetail, ClrDatagridSortOrder, ClrDatalist, ClrDatalistContainer, ClrDatalistInput, ClrDatalistModule, ClrDateContainer, ClrDateInput, ClrDatepickerModule, ClrDatepickerViewManager, ClrDay, ClrDaypicker, ClrDestroyService, ClrDragAndDropModule, ClrDragEvent, ClrDragHandle, ClrDraggable, ClrDraggableGhost, ClrDropdown, ClrDropdownItem, ClrDropdownMenu, ClrDropdownModule, ClrDropdownTrigger, ClrDroppable, ClrEmphasisModule, ClrExpandableAnimation, ClrFocusOnViewInit, ClrFocusOnViewInitModule, ClrForTypeAhead, ClrForTypeAheadModule, ClrForm, ClrFormLayout, ClrFormsModule, ClrHeader, ClrIconCustomTag, ClrIconModule, ClrIfActive, ClrIfDetail, ClrIfDragged, ClrIfError, ClrIfExpanded, ClrIfOpen, ClrIfSuccess, ClrInput, ClrInputContainer, ClrInputModule, ClrLabel, ClrLayout, ClrLayoutModule, ClrLoading, ClrLoadingButton, ClrLoadingButtonModule, ClrLoadingModule, ClrLoadingState, ClrMainContainer, ClrMainContainerModule, ClrModal, ClrModalBody, ClrModalModule, ClrMonthpicker, ClrNavLevel, ClrNavigationModule, ClrOption, ClrOptionItems, ClrOptionSelected, ClrOptions, ClrPassword, ClrPasswordContainer, ClrPasswordModule, ClrPopoverAnchor, ClrPopoverContent, ClrPopoverEventsService, ClrPopoverModule, ClrPopoverPositionService, ClrPopoverToggleService, ClrProgressBar, ClrProgressBarModule, ClrRadio, ClrRadioContainer, ClrRadioModule, ClrRadioWrapper, ClrRange, ClrRangeContainer, ClrRangeModule, ClrRecursiveForOf, ClrSelect, ClrSelectContainer, ClrSelectModule, ClrSelectedState, ClrSide, ClrSignpost, ClrSignpostContent, ClrSignpostModule, ClrSignpostTrigger, ClrSpinner, ClrSpinnerModule, ClrStackBlock, ClrStackContentInput, ClrStackHeader, ClrStackInput, ClrStackSelect, ClrStackView, ClrStackViewCustomTags, ClrStackViewLabel, ClrStackViewModule, ClrStepButton, ClrStepButtonType, ClrStepper, ClrStepperModule, ClrStepperPanel, ClrTab, ClrTabContent, ClrTabLink, ClrTabOverflowContent, ClrTabs, ClrTabsModule, ClrTextarea, ClrTextareaContainer, ClrTextareaModule, ClrTimeline, ClrTimelineLayout, ClrTimelineModule, ClrTimelineStep, ClrTimelineStepDescription, ClrTimelineStepHeader, ClrTimelineStepState, ClrTimelineStepTitle, ClrTooltip, ClrTooltipContent, ClrTooltipModule, ClrTooltipTrigger, ClrTree, ClrTreeNode, ClrTreeNodeLink, ClrTreeViewModule, ClrVerticalNav, ClrVerticalNavGroup, ClrVerticalNavGroupChildren, ClrVerticalNavIcon, ClrVerticalNavLink, ClrVerticalNavModule, ClrWizard, ClrWizardButton, ClrWizardCustomTags, ClrWizardHeaderAction, ClrWizardModule, ClrWizardPage, ClrWizardPageButtons, ClrWizardPageHeaderActions, ClrWizardPageNavTitle, ClrWizardPageTitle, ClrWizardStepnav, ClrWizardStepnavItem, ClrYearpicker, DEFAULT_BUTTON_TYPES, DatagridNumericFilter, DatagridPropertyComparator, DatagridPropertyNumericFilter, DatagridPropertyStringFilter, DatagridStringFilter, EXPANDABLE_ANIMATION_DIRECTIVES, FOCUS_ON_VIEW_INIT, FOCUS_ON_VIEW_INIT_DIRECTIVES, IS_TOGGLE, IS_TOGGLE_PROVIDER, LoadingListener, MainContainerWillyWonka, NavDetectionOompaLoompa, TOGGLE_SERVICE, TOGGLE_SERVICE_PROVIDER, ToggleServiceFactory, WrappedFormControl, collapse, commonStringsDefault, fade, fadeSlide, isToggleFactory, slide, AccordionOompaLoompa as ÇlrAccordionOompaLoompa, AccordionWillyWonka as ÇlrAccordionWillyWonka, ActionableOompaLoompa as ÇlrActionableOompaLoompa, ActiveOompaLoompa as ÇlrActiveOompaLoompa, ClrFocusTrapModule as ÇlrClrFocusTrapModule, ClrPopoverCloseButton as ÇlrClrPopoverCloseButton, ClrPopoverModuleNext as ÇlrClrPopoverModuleNext, ClrPopoverOpenCloseButton as ÇlrClrPopoverOpenCloseButton, DatagridCellRenderer as ÇlrDatagridCellRenderer, DatagridDetailRegisterer as ÇlrDatagridDetailRegisterer, DatagridHeaderRenderer as ÇlrDatagridHeaderRenderer, DatagridMainRenderer as ÇlrDatagridMainRenderer, DatagridRowRenderer as ÇlrDatagridRowRenderer, DatagridWillyWonka as ÇlrDatagridWillyWonka, ExpandableOompaLoompa as ÇlrExpandableOompaLoompa, FocusTrapDirective as ÇlrFocusTrapDirective, FocusTrapTracker as ÇlrFocusTrapTracker, StepperOompaLoompa as ÇlrStepperOompaLoompa, StepperWillyWonka as ÇlrStepperWillyWonka, TabsWillyWonka as ÇlrTabsWillyWonka, WrappedCell as ÇlrWrappedCell, WrappedColumn as ÇlrWrappedColumn, WrappedRow as ÇlrWrappedRow };
27183
27416
  //# sourceMappingURL=clr-angular.mjs.map