@clr/angular 12.0.13 → 12.1.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 (31) hide show
  1. package/bundles/clr-angular.umd.js +1051 -552
  2. package/bundles/clr-angular.umd.js.map +1 -1
  3. package/clarity.api.md +4011 -0
  4. package/clr-angular.d.ts +39 -37
  5. package/clr-angular.metadata.json +1 -1
  6. package/data/datagrid/datagrid.d.ts +5 -1
  7. package/data/datagrid/utils/key-navigation-grid.controller.d.ts +24 -0
  8. package/esm2015/clr-angular.js +38 -36
  9. package/esm2015/data/datagrid/datagrid-column-toggle.js +4 -2
  10. package/esm2015/data/datagrid/datagrid-placeholder.js +2 -2
  11. package/esm2015/data/datagrid/datagrid.js +18 -5
  12. package/esm2015/data/datagrid/utils/key-navigation-grid.controller.js +177 -0
  13. package/esm2015/forms/combobox/combobox.js +2 -2
  14. package/esm2015/forms/datepicker/calendar.js +1 -1
  15. package/esm2015/forms/password/password-container.js +5 -6
  16. package/esm2015/layout/nav/header.js +25 -5
  17. package/esm2015/layout/nav/nav-level.js +106 -6
  18. package/esm2015/utils/breakpoints/breakpoints.js +15 -1
  19. package/esm2015/utils/focus-trap/focus-trap.js +144 -0
  20. package/esm2015/utils/i18n/common-strings.default.js +14 -1
  21. package/esm2015/utils/i18n/common-strings.interface.js +1 -1
  22. package/esm2015/wizard/providers/wizard-navigation.service.js +1 -1
  23. package/esm2015/wizard/wizard.js +9 -2
  24. package/fesm2015/clr-angular.js +1016 -541
  25. package/fesm2015/clr-angular.js.map +1 -1
  26. package/layout/nav/header.d.ts +6 -0
  27. package/layout/nav/nav-level.d.ts +15 -3
  28. package/package.json +5 -5
  29. package/utils/breakpoints/breakpoints.d.ts +14 -0
  30. package/utils/focus-trap/focus-trap.d.ts +26 -0
  31. package/utils/i18n/common-strings.interface.d.ts +21 -0
@@ -4,9 +4,11 @@ import { ClarityIcons, ellipsisHorizontalIcon, exclamationCircleIcon, checkCircl
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule, DOCUMENT, isPlatformBrowser, getLocaleDayNames, FormStyle, TranslationWidth, getLocaleMonthNames, getLocaleFirstDayOfWeek, getLocaleDateFormat, FormatWidth, NgForOf } from '@angular/common';
6
6
  import { Subject, fromEvent, BehaviorSubject, of, ReplaySubject, isObservable, combineLatest, Observable } from 'rxjs';
7
- import { filter, debounceTime, first, startWith, switchMap, take, map, tap, distinctUntilChanged, pairwise } from 'rxjs/operators';
7
+ import { filter, debounceTime, first, startWith, switchMap, take, map, takeUntil, tap, distinctUntilChanged, pairwise } from 'rxjs/operators';
8
8
  import { trigger, transition, style, animate, keyframes, state } from '@angular/animations';
9
9
  import { NgControl, FormsModule, SelectMultipleControlValueAccessor, FormControl, FormGroup, FormGroupName, NgModelGroup, FormGroupDirective, NgForm } from '@angular/forms';
10
+ import { FocusTrapTrackerService, createId, isFocusable, isHTMLElement } from '@cds/core/internal';
11
+ import '@cds/core/internal-components/close-button/register.js';
10
12
  import '@cds/core/icon/register';
11
13
 
12
14
  /*
@@ -1297,6 +1299,19 @@ const commonStringsDefault = {
1297
1299
  datagridExpandableEndOf: 'End of',
1298
1300
  datagridExpandableRowContent: 'Expandable row content',
1299
1301
  datagridExpandableRowsHelperText: `Screen reader table commands may not work for viewing expanded content, please use your screen reader's browse mode to read the content exposed by this button`,
1302
+ responsiveNavToggleOpen: 'Navigation menu',
1303
+ responsiveNavToggleClose: 'Navigation menu',
1304
+ responsiveNavOverflowOpen: 'Navigation overflow menu',
1305
+ responsiveNavOverflowClose: 'Navigation overflow menu',
1306
+ // Wizard
1307
+ wizardStepSuccess: 'Completed',
1308
+ wizardStepError: 'Error',
1309
+ /**
1310
+ * Password Input
1311
+ * Screen-reader text for the hide/show password field button
1312
+ */
1313
+ passwordHide: 'Hide password',
1314
+ passwordShow: 'Show password',
1300
1315
  };
1301
1316
 
1302
1317
  /*
@@ -4497,7 +4512,7 @@ class ClrCalendar {
4497
4512
  }
4498
4513
  }
4499
4514
  ClrCalendar.decorators = [
4500
- { type: Component, 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" },] }
4515
+ { 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" },] }
4501
4516
  ];
4502
4517
  ClrCalendar.ctorParameters = () => [
4503
4518
  { type: LocaleHelperService },
@@ -4566,9 +4581,23 @@ DateFormControlService.decorators = [
4566
4581
  * This software is released under MIT license.
4567
4582
  * The full license information can be found in LICENSE in the root directory of this project.
4568
4583
  */
4584
+ /**
4585
+ * TODO:
4586
+ * Using core functions like:
4587
+ * - pluckPixelValue
4588
+ * - getCssPropertyValue
4589
+ *
4590
+ * to get the value of the design token.
4591
+ *
4592
+ * Note: Memoization/Cache usage possible.
4593
+ */
4569
4594
  // iPad mini screen width
4570
4595
  // http://stephen.io/mediaqueries/#iPadMini
4571
4596
  const DATEPICKER_ENABLE_BREAKPOINT = 768;
4597
+ const SMALL_BREAKPOINT = 576;
4598
+ const MEDIUM_BREAKPOINT = 768;
4599
+ const LARGE_BREAKPOINT = 992;
4600
+ const EXTRA_LARGE_BREAKPOINT = 1200;
4572
4601
 
4573
4602
  /*
4574
4603
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -5823,11 +5852,10 @@ ClrPasswordContainer.decorators = [
5823
5852
  class="clr-input-group-icon-action"
5824
5853
  type="button"
5825
5854
  >
5826
- <cds-icon
5827
- status="info"
5828
- [attr.shape]="show ? 'eye-hide' : 'eye'"
5829
- [attr.title]="show ? commonStrings.keys.hide : commonStrings.keys.show"
5830
- ></cds-icon>
5855
+ <cds-icon status="info" [attr.shape]="show ? 'eye-hide' : 'eye'"></cds-icon>
5856
+ <span class="clr-sr-only">{{
5857
+ show ? commonStrings.keys.passwordHide : commonStrings.keys.passwordShow
5858
+ }}</span>
5831
5859
  </button>
5832
5860
  </div>
5833
5861
  <cds-icon
@@ -7770,7 +7798,7 @@ class ClrCombobox extends WrappedFormControl {
7770
7798
  ClrCombobox.decorators = [
7771
7799
  { type: Component, args: [{
7772
7800
  selector: 'clr-combobox',
7773
- 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\">\n <input\n #textboxInput\n type=\"text\"\n [id]=\"inputId()\"\n role=\"combobox\"\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 aria-multiline=\"false\"\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",
7801
+ 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",
7774
7802
  providers: [
7775
7803
  ClrPopoverToggleService,
7776
7804
  { provide: POPOVER_HOST_ANCHOR, useExisting: ElementRef },
@@ -11575,7 +11603,7 @@ ClrDatagridPlaceholder.decorators = [
11575
11603
  template: `
11576
11604
  <div class="datagrid-placeholder" [class.datagrid-empty]="emptyDatagrid" role="row">
11577
11605
  <div class="datagrid-placeholder-image" *ngIf="emptyDatagrid"></div>
11578
- <span role="gridcell"><ng-content *ngIf="emptyDatagrid"></ng-content></span>
11606
+ <span role="gridcell" class="datagrid-placeholder-content"><ng-content *ngIf="emptyDatagrid"></ng-content></span>
11579
11607
  </div>
11580
11608
  `,
11581
11609
  host: { '[class.datagrid-placeholder-container]': 'true' }
@@ -12709,10 +12737,10 @@ var DatagridColumnChanges;
12709
12737
  DatagridColumnChanges[DatagridColumnChanges["WIDTH"] = 0] = "WIDTH";
12710
12738
  DatagridColumnChanges[DatagridColumnChanges["HIDDEN"] = 1] = "HIDDEN";
12711
12739
  })(DatagridColumnChanges || (DatagridColumnChanges = {}));
12712
- const ɵ1 = key => DatagridColumnChanges[key], ɵ0 = key => key === parseInt(key, 10);
12740
+ const ɵ1 = key => DatagridColumnChanges[key], ɵ0$1 = key => key === parseInt(key, 10);
12713
12741
  const ALL_COLUMN_CHANGES = Object.keys(DatagridColumnChanges)
12714
12742
  .map(ɵ1)
12715
- .filter(ɵ0); // extracts only integer keys
12743
+ .filter(ɵ0$1); // extracts only integer keys
12716
12744
 
12717
12745
  /*
12718
12746
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -12762,13 +12790,187 @@ ColumnsService.decorators = [
12762
12790
  { type: Injectable }
12763
12791
  ];
12764
12792
 
12793
+ /*
12794
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
12795
+ * This software is released under MIT license.
12796
+ * The full license information can be found in LICENSE in the root directory of this project.
12797
+ */
12798
+ function getTabableItems(el) {
12799
+ const tabableSelector = [
12800
+ 'a[href]',
12801
+ 'area[href]',
12802
+ 'input:not([disabled])',
12803
+ 'button:not([disabled])',
12804
+ 'select:not([disabled])',
12805
+ 'textarea:not([disabled])',
12806
+ 'iframe',
12807
+ 'object',
12808
+ 'embed',
12809
+ '*[tabindex]',
12810
+ '*[contenteditable=true]',
12811
+ '[role=button]:not([disabled])',
12812
+ ].join(',');
12813
+ return Array.from(el.querySelectorAll(tabableSelector));
12814
+ }
12815
+ class KeyNavigationGridController {
12816
+ constructor(zone) {
12817
+ this.zone = zone;
12818
+ this.listenersAdded = false;
12819
+ this.destroy$ = new Subject();
12820
+ this.config = {
12821
+ keyGridRows: '[role=row]:not(.datagrid-placeholder)',
12822
+ keyGridCells: '[role=gridcell]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), [role=columnheader]:not(.datagrid-hidden-column):not(.datagrid-placeholder-content), .datagrid-detail-caret',
12823
+ keyGrid: '[role=grid]',
12824
+ };
12825
+ }
12826
+ get grid() {
12827
+ var _a;
12828
+ return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector(this.config.keyGrid);
12829
+ }
12830
+ get rows() {
12831
+ var _a;
12832
+ return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.config.keyGridRows);
12833
+ }
12834
+ get cells() {
12835
+ var _a;
12836
+ return (_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.config.keyGridCells);
12837
+ }
12838
+ ngOnDestroy() {
12839
+ this.destroy$.next();
12840
+ this.destroy$.complete();
12841
+ }
12842
+ addListeners() {
12843
+ if (this.listenersAdded) {
12844
+ return;
12845
+ }
12846
+ this.zone.runOutsideAngular(() => {
12847
+ fromEvent(this.grid, 'mousedown')
12848
+ .pipe(takeUntil(this.destroy$))
12849
+ .subscribe((e) => {
12850
+ // preserve right click for context menus & keyboard mouse control https://apple.stackexchange.com/questions/32715/how-do-i-open-the-context-menu-from-a-mac-keyboard
12851
+ if (e.buttons === 1 && !e.ctrlKey) {
12852
+ const activeCell = this.cells
12853
+ ? Array.from(this.cells).find(c => c === e.target || c === e.target.closest(this.config.keyGridCells))
12854
+ : null;
12855
+ if (activeCell) {
12856
+ this.setActiveCell(activeCell);
12857
+ }
12858
+ }
12859
+ });
12860
+ fromEvent(this.grid, 'keydown')
12861
+ .pipe(takeUntil(this.destroy$))
12862
+ .subscribe((e) => {
12863
+ // Skip column resize events
12864
+ if (e.target.classList.contains('drag-handle') &&
12865
+ (e.code === 'ArrowLeft' || e.code === 'ArrowRight')) {
12866
+ return;
12867
+ }
12868
+ if (e.code === 'ArrowUp' ||
12869
+ e.code === 'ArrowDown' ||
12870
+ e.code === 'ArrowLeft' ||
12871
+ e.code === 'ArrowRight' ||
12872
+ e.code === 'End' ||
12873
+ e.code === 'Home' ||
12874
+ e.code === 'PageUp' ||
12875
+ e.code === 'PageDown') {
12876
+ const { x, y } = this.getNextItemCoordinate(e);
12877
+ const activeItem = this.rows
12878
+ ? Array.from(this.rows[y].querySelectorAll(this.config.keyGridCells))[x]
12879
+ : null;
12880
+ if (activeItem) {
12881
+ this.setActiveCell(activeItem);
12882
+ }
12883
+ e.preventDefault();
12884
+ }
12885
+ });
12886
+ });
12887
+ this.listenersAdded = true;
12888
+ }
12889
+ initializeKeyGrid(host) {
12890
+ this.host = host;
12891
+ this.addListeners();
12892
+ this.resetKeyGrid();
12893
+ }
12894
+ resetKeyGrid() {
12895
+ var _a;
12896
+ (_a = this.cells) === null || _a === void 0 ? void 0 : _a.forEach((i) => i.setAttribute('tabindex', '-1'));
12897
+ const firstCell = this.cells ? this.cells[0] : null;
12898
+ firstCell === null || firstCell === void 0 ? void 0 : firstCell.setAttribute('tabindex', '0');
12899
+ }
12900
+ setActiveCell(activeCell) {
12901
+ const prior = this.cells ? Array.from(this.cells).find(c => c.getAttribute('tabindex') === '0') : null;
12902
+ if (prior) {
12903
+ prior.setAttribute('tabindex', '-1');
12904
+ }
12905
+ activeCell.setAttribute('tabindex', '0');
12906
+ const items = getTabableItems(activeCell);
12907
+ const item = activeCell.getAttribute('role') !== 'columnheader' && items[0] ? items[0] : activeCell;
12908
+ item.focus();
12909
+ }
12910
+ getNextItemCoordinate(e) {
12911
+ var _a;
12912
+ let currentCell = this.cells ? Array.from(this.cells).find(i => i.getAttribute('tabindex') === '0') : null;
12913
+ if (e.code === 'Tab') {
12914
+ currentCell = document.activeElement;
12915
+ }
12916
+ const currentRow = this.rows && currentCell ? Array.from(this.rows).find(r => r.contains(currentCell)) : null;
12917
+ const numOfRows = this.rows ? this.rows.length - 1 : 0;
12918
+ const numOfColumns = this.cells ? this.cells.length / this.rows.length - 1 : 0;
12919
+ let x = currentRow && currentCell
12920
+ ? Array.from(currentRow.querySelectorAll(this.config.keyGridCells)).indexOf(currentCell)
12921
+ : 0;
12922
+ let y = currentRow && currentCell && this.rows ? Array.from(this.rows).indexOf(currentRow) : 0;
12923
+ const dir = this.host.dir;
12924
+ const inlineStart = dir === 'rtl' ? 'ArrowRight' : 'ArrowLeft';
12925
+ const inlineEnd = dir === 'rtl' ? 'ArrowLeft' : 'ArrowRight';
12926
+ const itemsPerPage = Math.floor(((_a = this.host) === null || _a === void 0 ? void 0 : _a.querySelector('.datagrid').clientHeight) / this.rows[0].clientHeight) - 1 || 0;
12927
+ if (e.code === 'ArrowUp' && y !== 0) {
12928
+ y = y - 1;
12929
+ }
12930
+ else if (e.code === 'ArrowDown' && y < numOfRows) {
12931
+ y = y + 1;
12932
+ }
12933
+ else if (e.code === inlineStart && x !== 0) {
12934
+ x = x - 1;
12935
+ }
12936
+ else if (e.code === inlineEnd && x < numOfColumns) {
12937
+ x = x + 1;
12938
+ }
12939
+ else if (e.code === 'End') {
12940
+ x = numOfColumns;
12941
+ if (e.ctrlKey) {
12942
+ y = numOfRows;
12943
+ }
12944
+ }
12945
+ else if (e.code === 'Home') {
12946
+ x = 0;
12947
+ if (e.ctrlKey) {
12948
+ y = 0;
12949
+ }
12950
+ }
12951
+ else if (e.code === 'PageUp') {
12952
+ y = y - itemsPerPage > 0 ? y - itemsPerPage : 0;
12953
+ }
12954
+ else if (e.code === 'PageDown') {
12955
+ y = y + itemsPerPage < numOfRows ? y + itemsPerPage : numOfRows;
12956
+ }
12957
+ return { x, y };
12958
+ }
12959
+ }
12960
+ KeyNavigationGridController.decorators = [
12961
+ { type: Injectable }
12962
+ ];
12963
+ KeyNavigationGridController.ctorParameters = () => [
12964
+ { type: NgZone }
12965
+ ];
12966
+
12765
12967
  /*
12766
12968
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
12767
12969
  * This software is released under MIT license.
12768
12970
  * The full license information can be found in LICENSE in the root directory of this project.
12769
12971
  */
12770
12972
  class ClrDatagrid {
12771
- constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, el, page, commonStrings) {
12973
+ constructor(organizer, items, expandableRows, selection, rowActionService, stateProvider, displayMode, renderer, detailService, datagridId, el, page, commonStrings, columnsService, keyNavigation) {
12772
12974
  this.organizer = organizer;
12773
12975
  this.items = items;
12774
12976
  this.expandableRows = expandableRows;
@@ -12781,6 +12983,8 @@ class ClrDatagrid {
12781
12983
  this.el = el;
12782
12984
  this.page = page;
12783
12985
  this.commonStrings = commonStrings;
12986
+ this.columnsService = columnsService;
12987
+ this.keyNavigation = keyNavigation;
12784
12988
  /* reference to the enum so that template can access */
12785
12989
  this.SELECTION_TYPE = SelectionType;
12786
12990
  /**
@@ -12906,6 +13110,7 @@ class ClrDatagrid {
12906
13110
  * Our setup happens in the view of some of our components, so we wait for it to be done before starting
12907
13111
  */
12908
13112
  ngAfterViewInit() {
13113
+ this.keyNavigation.initializeKeyGrid(this.el.nativeElement);
12909
13114
  // TODO: determine if we can get rid of provider wiring in view init so that subscriptions can be done earlier
12910
13115
  this.refresh.emit(this.stateProvider.state);
12911
13116
  this._subscriptions.push(this.stateProvider.change.subscribe(state => this.refresh.emit(state)), this.selection.change.subscribe(s => {
@@ -12915,11 +13120,16 @@ class ClrDatagrid {
12915
13120
  else if (this.selection.selectionType === SelectionType.Multi) {
12916
13121
  this.selectedChanged.emit(s);
12917
13122
  }
12918
- }), this.page.change.subscribe(() => {
13123
+ }),
13124
+ // Reinitialize arrow key navigation on page changes
13125
+ this.page.change.subscribe(() => {
13126
+ this.keyNavigation.resetKeyGrid();
12919
13127
  if (!this.clrDgDisablePageFocus) {
12920
13128
  this.datagridTable.nativeElement.focus();
12921
13129
  }
12922
13130
  }),
13131
+ // Reinitialize arrow key navigation on hide/unhide columns
13132
+ combineLatest(this.columnsService.columns).subscribe(() => { var _a; return (_a = this.keyNavigation) === null || _a === void 0 ? void 0 : _a.resetKeyGrid(); }),
12923
13133
  // A subscription that listens for displayMode changes on the datagrid
12924
13134
  this.displayMode.view.subscribe(viewChange => {
12925
13135
  // Remove any projected columns from the projectedDisplayColumns container
@@ -12970,7 +13180,7 @@ class ClrDatagrid {
12970
13180
  ClrDatagrid.decorators = [
12971
13181
  { type: Component, args: [{
12972
13182
  selector: 'clr-datagrid',
12973
- 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<ng-content select=\"clr-dg-action-bar\"></ng-content>\n<div class=\"datagrid-outer-wrapper\">\n <div class=\"datagrid-inner-wrapper\">\n <div class=\"datagrid\" #datagrid [attr.aria-hidden]=\"detailService.isOpen ? true : null\">\n <div class=\"datagrid-table-wrapper\">\n <div role=\"grid\" class=\"datagrid-table\" tabindex=\"-1\" #datagridTable>\n <div role=\"rowgroup\" class=\"datagrid-header\">\n <div role=\"row\" class=\"datagrid-row\">\n <div class=\"datagrid-row-master datagrid-row-flex\">\n <div class=\"datagrid-row-sticky\">\n <!--header for datagrid where you can select multiple rows -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <input\n type=\"checkbox\"\n [id]=\"selectAllId\"\n [(ngModel)]=\"allSelected\"\n [attr.aria-label]=\"commonStrings.keys.selectAll\"\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]=\"selectAllId\" class=\"clr-control-label clr-col-null\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.selectAll}}</span>\n </label>\n </div>\n\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for datagrid where you can select one row only -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n [attr.aria-label]=\"clrDgSingleSelectionAriaLabel\"\n >\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for single row action; only displayType if we have at least one actionable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-row-actions datagrid-fixed-column\"\n *ngIf=\"rowActionService.hasActionableRow\"\n [attr.aria-label]=\"clrDgSingleActionableAriaLabel\"\n >\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for carets; only displayType if we have at least one expandable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-expandable-caret datagrid-fixed-column\"\n *ngIf=\"expandableRows.hasExpandableRow || detailService.enabled\"\n [attr.aria-label]=\"clrDetailExpandableAriaLabel\"\n >\n <div class=\"datagrid-column-separator\"></div>\n </div>\n </div>\n <div class=\"datagrid-row-scrollable\">\n <ng-container #projectedDisplayColumns></ng-container>\n </div>\n </div>\n </div>\n </div>\n <ng-container #displayedRows></ng-container>\n <!-- Custom placeholder overrides the default empty one -->\n <ng-content select=\"clr-dg-placeholder\"></ng-content>\n <clr-dg-placeholder *ngIf=\"!placeholder\"></clr-dg-placeholder>\n </div>\n </div>\n </div>\n <ng-content select=\"clr-dg-footer\"></ng-content>\n <div class=\"datagrid-spinner\" *ngIf=\"loading\">\n <clr-spinner clrMedium>Loading</clr-spinner>\n </div>\n </div>\n <ng-content select=\"[clrIfDetail],clr-dg-detail\"></ng-content>\n</div>\n\n<div class=\"datagrid-calculation-table\">\n <div class=\"datagrid-calculation-header\">\n <ng-container #projectedCalculationColumns></ng-container>\n </div>\n <ng-container #calculationRows></ng-container>\n</div>\n",
13183
+ 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<ng-content select=\"clr-dg-action-bar\"></ng-content>\n<div class=\"datagrid-outer-wrapper\">\n <div class=\"datagrid-inner-wrapper\">\n <div class=\"datagrid\" #datagrid [attr.aria-hidden]=\"detailService.isOpen ? true : null\">\n <div class=\"datagrid-table-wrapper\">\n <div role=\"grid\" class=\"datagrid-table\" tabindex=\"-1\" #datagridTable>\n <div role=\"rowgroup\" class=\"datagrid-header\">\n <div role=\"row\" class=\"datagrid-row\">\n <div class=\"datagrid-row-master datagrid-row-flex\">\n <div class=\"datagrid-row-sticky\">\n <!--header for datagrid where you can select multiple rows -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Multi\"\n (keydown.space)=\"allSelected = !allSelected; $event.preventDefault()\"\n >\n <div class=\"clr-checkbox-wrapper\">\n <!-- We need to move focus and space-key handling to the parent because of keyboard arrow key navigation,\n which is not able to transfer focus directly on the input when focused with the tab key -->\n <input\n type=\"checkbox\"\n [id]=\"selectAllId\"\n [(ngModel)]=\"allSelected\"\n [attr.aria-label]=\"commonStrings.keys.selectAll\"\n tabindex=\"-1\"\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]=\"selectAllId\" class=\"clr-control-label clr-col-null\">\n <span class=\"clr-sr-only\">{{commonStrings.keys.selectAll}}</span>\n </label>\n </div>\n\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for datagrid where you can select one row only -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-select datagrid-fixed-column\"\n *ngIf=\"selection.selectionType === SELECTION_TYPE.Single\"\n [attr.aria-label]=\"clrDgSingleSelectionAriaLabel\"\n >\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for single row action; only displayType if we have at least one actionable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-row-actions datagrid-fixed-column\"\n *ngIf=\"rowActionService.hasActionableRow\"\n [attr.aria-label]=\"clrDgSingleActionableAriaLabel\"\n >\n <div class=\"datagrid-column-separator\"></div>\n </div>\n <!-- header for carets; only displayType if we have at least one expandable row in datagrid -->\n <div\n role=\"columnheader\"\n class=\"datagrid-column datagrid-expandable-caret datagrid-fixed-column\"\n *ngIf=\"expandableRows.hasExpandableRow || detailService.enabled\"\n [attr.aria-label]=\"clrDetailExpandableAriaLabel\"\n >\n <div class=\"datagrid-column-separator\"></div>\n </div>\n </div>\n <div class=\"datagrid-row-scrollable\">\n <ng-container #projectedDisplayColumns></ng-container>\n </div>\n </div>\n </div>\n </div>\n <ng-container #displayedRows></ng-container>\n <!-- Custom placeholder overrides the default empty one -->\n <ng-content select=\"clr-dg-placeholder\"></ng-content>\n <clr-dg-placeholder *ngIf=\"!placeholder\"></clr-dg-placeholder>\n </div>\n </div>\n </div>\n <ng-content select=\"clr-dg-footer\"></ng-content>\n <div class=\"datagrid-spinner\" *ngIf=\"loading\">\n <clr-spinner clrMedium>Loading</clr-spinner>\n </div>\n </div>\n <ng-content select=\"[clrIfDetail],clr-dg-detail\"></ng-content>\n</div>\n\n<div class=\"datagrid-calculation-table\">\n <div class=\"datagrid-calculation-header\">\n <ng-container #projectedCalculationColumns></ng-container>\n </div>\n <ng-container #calculationRows></ng-container>\n</div>\n",
12974
13184
  providers: [
12975
13185
  Selection,
12976
13186
  Sort,
@@ -12987,6 +13197,7 @@ ClrDatagrid.decorators = [
12987
13197
  TableSizeService,
12988
13198
  ColumnsService,
12989
13199
  DisplayModeService,
13200
+ KeyNavigationGridController,
12990
13201
  ],
12991
13202
  host: {
12992
13203
  '[class.datagrid-host]': 'true',
@@ -13007,7 +13218,9 @@ ClrDatagrid.ctorParameters = () => [
13007
13218
  { type: String, decorators: [{ type: Inject, args: [UNIQUE_ID,] }] },
13008
13219
  { type: ElementRef },
13009
13220
  { type: Page },
13010
- { type: ClrCommonStringsService }
13221
+ { type: ClrCommonStringsService },
13222
+ { type: ColumnsService },
13223
+ { type: KeyNavigationGridController }
13011
13224
  ];
13012
13225
  ClrDatagrid.propDecorators = {
13013
13226
  loading: [{ type: Input, args: ['clrDgLoading',] }],
@@ -13508,7 +13721,9 @@ ClrDatagridColumnToggle.decorators = [
13508
13721
  >
13509
13722
  <div class="switch-header">
13510
13723
  <div class="clr-sr-only" tabindex="-1" #allSelected>{{ commonStrings.keys.allColumnsSelected }}</div>
13511
- <ng-container *ngIf="!customToggleTitle">{{ commonStrings.keys.showColumns }}</ng-container>
13724
+ <ng-container *ngIf="!customToggleTitle">
13725
+ <h2>{{ commonStrings.keys.showColumns }}</h2>
13726
+ </ng-container>
13512
13727
  <ng-content select="clr-dg-column-toggle-title"></ng-content>
13513
13728
  <button
13514
13729
  class="btn btn-sm btn-link toggle-switch-close-button"
@@ -17878,6 +18093,11 @@ class ClrHeader {
17878
18093
  this.initializeNavTriggers(navLevelList);
17879
18094
  },
17880
18095
  });
18096
+ this._subscription.add(this.responsiveNavService.navControl
18097
+ .pipe(filter(({ controlCode }) => controlCode === ResponsiveNavCodes.NAV_CLOSE || controlCode === ResponsiveNavCodes.NAV_CLOSE_ALL))
18098
+ .subscribe(() => {
18099
+ this.openNavLevel = null;
18100
+ }));
17881
18101
  }
17882
18102
  // reset triggers. handles cases when an application has different nav levels on different pages.
17883
18103
  resetNavTriggers() {
@@ -17904,10 +18124,21 @@ class ClrHeader {
17904
18124
  closeOpenNav() {
17905
18125
  this.responsiveNavService.closeAllNavs();
17906
18126
  }
17907
- // toggles the nav that is open
18127
+ /**
18128
+ * @deprecated Will be removed in with @clr/angular v15.0.0
18129
+ *
18130
+ * Use `openNav(navLevel)` instead to open the navigation and ResponsiveNavService to close it.
18131
+ */
17908
18132
  toggleNav(navLevel) {
17909
- this.openNavLevel = this.openNavLevel === navLevel ? null : navLevel;
17910
- this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_TOGGLE, navLevel);
18133
+ if (this.openNavLevel === navLevel) {
18134
+ this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_CLOSE, navLevel);
18135
+ return;
18136
+ }
18137
+ this.openNav(navLevel);
18138
+ }
18139
+ openNav(navLevel) {
18140
+ this.openNavLevel = navLevel;
18141
+ this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_OPEN, navLevel);
17911
18142
  }
17912
18143
  ngOnDestroy() {
17913
18144
  this._subscription.unsubscribe();
@@ -17925,6 +18156,8 @@ ClrHeader.decorators = [
17925
18156
  openNavLevel !== responsiveNavCodes.NAV_LEVEL_1 ? commonStrings.keys.open : commonStrings.keys.close
17926
18157
  "
17927
18158
  (click)="toggleNav(responsiveNavCodes.NAV_LEVEL_1)"
18159
+ [attr.aria-expanded]="openNavLevel === 1 ? 'true' : 'false'"
18160
+ (click)="openNav(responsiveNavCodes.NAV_LEVEL_1)"
17928
18161
  >
17929
18162
  <span></span>
17930
18163
  </button>
@@ -17936,7 +18169,8 @@ ClrHeader.decorators = [
17936
18169
  [attr.aria-label]="
17937
18170
  openNavLevel !== responsiveNavCodes.NAV_LEVEL_2 ? commonStrings.keys.open : commonStrings.keys.close
17938
18171
  "
17939
- (click)="toggleNav(responsiveNavCodes.NAV_LEVEL_2)"
18172
+ [attr.aria-expanded]="openNavLevel === 2 ? 'true' : 'false'"
18173
+ (click)="openNav(responsiveNavCodes.NAV_LEVEL_2)"
17940
18174
  >
17941
18175
  <span></span>
17942
18176
  </button>
@@ -17955,210 +18189,790 @@ ClrHeader.ctorParameters = () => [
17955
18189
  * This software is released under MIT license.
17956
18190
  * The full license information can be found in LICENSE in the root directory of this project.
17957
18191
  */
17958
- class ClrNavLevel {
17959
- constructor(responsiveNavService, elementRef) {
17960
- this.responsiveNavService = responsiveNavService;
17961
- this.elementRef = elementRef;
17962
- }
17963
- ngOnInit() {
17964
- if (this.level !== ResponsiveNavCodes.NAV_LEVEL_1 && this.level !== ResponsiveNavCodes.NAV_LEVEL_2) {
17965
- console.error('Nav Level can only be 1 or 2');
17966
- return;
17967
- }
17968
- this.responsiveNavService.registerNav(this.level);
17969
- this.addNavClass(this.level);
18192
+ function refocusIfOutsideFocusTrapElement(focusedElement, focusTrapElement, elementToRefocus) {
18193
+ const focusTrapIsCurrent = FocusTrapTrackerService.getCurrent() === focusTrapElement;
18194
+ const elementToFocusIsOutsideFocusTrap = elementIsOutsideFocusTrapElement(focusedElement, focusTrapElement);
18195
+ if (focusTrapIsCurrent && elementToFocusIsOutsideFocusTrap) {
18196
+ elementToRefocus = elementToRefocus || focusTrapElement;
18197
+ elementToRefocus.focus();
17970
18198
  }
17971
- addNavClass(level) {
17972
- const navHostClassList = this.elementRef.nativeElement.classList;
17973
- if (level === ResponsiveNavCodes.NAV_LEVEL_1) {
17974
- navHostClassList.add(ResponsiveNavCodes.NAV_CLASS_LEVEL_1);
17975
- }
17976
- else if (level === ResponsiveNavCodes.NAV_LEVEL_2) {
17977
- navHostClassList.add(ResponsiveNavCodes.NAV_CLASS_LEVEL_2);
17978
- }
18199
+ else {
18200
+ focusedElement.focus();
17979
18201
  }
17980
- get level() {
17981
- return this._level;
18202
+ }
18203
+ function elementIsOutsideFocusTrapElement(focusedElement, focusTrapElement) {
18204
+ if (focusedElement === focusTrapElement.topReboundElement ||
18205
+ focusedElement === focusTrapElement.bottomReboundElement) {
18206
+ return true;
17982
18207
  }
17983
- // getter to access the responsive navigation codes from the template
17984
- get responsiveNavCodes() {
17985
- return ResponsiveNavCodes;
18208
+ const elementIsInFocusTrapLightDom = focusTrapElement.contains(focusedElement);
18209
+ if (elementIsInFocusTrapLightDom) {
18210
+ return false;
17986
18211
  }
17987
- open() {
17988
- this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_OPEN, this.level);
18212
+ if (focusTrapElement !== null && focusTrapElement.contains(focusedElement)) {
18213
+ return false;
17989
18214
  }
17990
- close() {
17991
- this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_CLOSE, this.level);
18215
+ return true;
18216
+ }
18217
+ function createFocusTrapReboundElement(document) {
18218
+ const offScreenSpan = document.createElement('span');
18219
+ offScreenSpan.setAttribute('tabindex', '0');
18220
+ offScreenSpan.classList.add('offscreen-focus-rebounder');
18221
+ return offScreenSpan;
18222
+ }
18223
+ function addReboundElementsToFocusTrapElement(document, focusTrapElement) {
18224
+ if (focusTrapElement && !focusTrapElement.topReboundElement && !focusTrapElement.bottomReboundElement) {
18225
+ focusTrapElement.topReboundElement = createFocusTrapReboundElement(document);
18226
+ focusTrapElement.bottomReboundElement = createFocusTrapReboundElement(document);
18227
+ const parent = focusTrapElement.parentElement;
18228
+ const sibling = focusTrapElement.nextSibling;
18229
+ if (parent) {
18230
+ parent.insertBefore(focusTrapElement.topReboundElement, focusTrapElement);
18231
+ if (sibling) {
18232
+ parent.insertBefore(focusTrapElement.bottomReboundElement, sibling);
18233
+ }
18234
+ else {
18235
+ parent.appendChild(focusTrapElement.bottomReboundElement);
18236
+ }
18237
+ }
17992
18238
  }
17993
- // TODO: Figure out whats the best way to do this. Possible methods
17994
- // 1. HostListener (current solution)
17995
- // 2. Directives on the .nav-link class. We discussed on moving away from class selectors but I forget the reason
17996
- // why
17997
- onMouseClick(target) {
17998
- let current = target; // Get the element in the DOM on which the mouse was clicked
17999
- const navHost = this.elementRef.nativeElement; // Get the current nav native HTML element
18000
- // Start checking if current and navHost are equal.
18001
- // If not traverse to the parentNode and check again.
18002
- while (current) {
18003
- if (current === navHost) {
18004
- return;
18239
+ }
18240
+ function removeReboundElementsFromFocusTrapElement(focusTrapElement) {
18241
+ if (focusTrapElement) {
18242
+ const parent = focusTrapElement.parentElement;
18243
+ if (parent) {
18244
+ const topRebound = focusTrapElement.topReboundElement;
18245
+ const bottomRebound = focusTrapElement.bottomReboundElement;
18246
+ if (topRebound) {
18247
+ parent.removeChild(topRebound);
18005
18248
  }
18006
- else if (current.classList.contains('nav-link')) {
18007
- this.close();
18008
- return;
18249
+ if (bottomRebound) {
18250
+ parent.removeChild(bottomRebound);
18009
18251
  }
18010
- current = current.parentNode;
18011
18252
  }
18253
+ // These are here to to make sure that we completely delete all traces of the removed DOM objects.
18254
+ delete focusTrapElement.topReboundElement;
18255
+ delete focusTrapElement.bottomReboundElement;
18012
18256
  }
18013
- ngOnDestroy() {
18014
- this.responsiveNavService.unregisterNav(this.level);
18257
+ }
18258
+ // this helper exists to enable the focus trap class to handle vanilla html elements
18259
+ // it's primary concern is to keep TS happy.
18260
+ function castHtmlElementToFocusTrapElement(el) {
18261
+ return el;
18262
+ }
18263
+ class FocusTrap {
18264
+ constructor(renderer, injector, platformId, hostElement) {
18265
+ this.renderer = renderer;
18266
+ this.active = false;
18267
+ if (isPlatformBrowser(platformId)) {
18268
+ this._document = injector.get(DOCUMENT);
18269
+ }
18270
+ hostElement = castHtmlElementToFocusTrapElement(hostElement);
18271
+ if (!hostElement.focusTrapId) {
18272
+ hostElement.focusTrapId = createId();
18273
+ }
18274
+ this.focusTrapElement = hostElement;
18275
+ }
18276
+ enableFocusTrap() {
18277
+ const fte = this.focusTrapElement;
18278
+ const firstFocusElement = fte.querySelector('[cds-first-focus]');
18279
+ const activeEl = this._document.activeElement;
18280
+ if (FocusTrapTrackerService.getCurrent() === fte) {
18281
+ throw new Error('Focus trap is already enabled for this instance.');
18282
+ }
18283
+ this.firstFocusElement = firstFocusElement || this.focusTrapElement;
18284
+ addReboundElementsToFocusTrapElement(this._document, fte);
18285
+ if (!isFocusable(fte)) {
18286
+ fte.setAttribute('tabindex', '-1');
18287
+ }
18288
+ if (activeEl && isHTMLElement(activeEl)) {
18289
+ this.previousFocus = activeEl;
18290
+ }
18291
+ FocusTrapTrackerService.setCurrent(fte);
18292
+ // setTimeout here is required for Safari which may try to set focus on
18293
+ // element before it is visible...
18294
+ const focusTimer = setTimeout(() => {
18295
+ this.firstFocusElement.focus();
18296
+ clearTimeout(focusTimer);
18297
+ }, 10);
18298
+ this.onFocusInEvent = this.onFocusIn.bind(this);
18299
+ this.unlisten = this.renderer.listen(this._document, 'focusin', this.onFocusInEvent);
18300
+ this.active = true;
18301
+ }
18302
+ removeFocusTrap() {
18303
+ if (this.unlisten) {
18304
+ this.unlisten();
18305
+ }
18306
+ removeReboundElementsFromFocusTrapElement(this.focusTrapElement);
18307
+ this.renderer.removeAttribute(this.focusTrapElement, 'tabindex');
18308
+ FocusTrapTrackerService.activatePreviousCurrent();
18309
+ this.active = false;
18310
+ if (this.previousFocus) {
18311
+ this.previousFocus.focus();
18312
+ }
18313
+ }
18314
+ onFocusIn(event) {
18315
+ refocusIfOutsideFocusTrapElement(event.composedPath()[0], this.focusTrapElement, this.firstFocusElement);
18015
18316
  }
18016
18317
  }
18017
- ClrNavLevel.decorators = [
18018
- { type: Directive, args: [{ selector: '[clr-nav-level]' },] }
18318
+ FocusTrap.decorators = [
18319
+ { type: Injectable }
18019
18320
  ];
18020
- ClrNavLevel.ctorParameters = () => [
18021
- { type: ResponsiveNavigationService },
18022
- { type: ElementRef }
18321
+ FocusTrap.ctorParameters = () => [
18322
+ { type: Renderer2 },
18323
+ { type: Injector },
18324
+ { type: undefined },
18325
+ { type: undefined }
18023
18326
  ];
18024
- ClrNavLevel.propDecorators = {
18025
- _level: [{ type: Input, args: ['clr-nav-level',] }],
18026
- onMouseClick: [{ type: HostListener, args: ['click', ['$event.target'],] }]
18027
- };
18028
18327
 
18029
18328
  /*
18030
18329
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18031
18330
  * This software is released under MIT license.
18032
18331
  * The full license information can be found in LICENSE in the root directory of this project.
18033
18332
  */
18034
- const CLR_NAVIGATION_DIRECTIVES = [
18035
- ClrHeader,
18036
- ClrNavLevel,
18037
- NavDetectionOompaLoompa,
18038
- MainContainerWillyWonka,
18039
- ];
18040
- class ClrNavigationModule {
18041
- }
18042
- ClrNavigationModule.decorators = [
18043
- { type: NgModule, args: [{
18044
- imports: [CommonModule, ClrIconModule, ClrDropdownModule],
18045
- declarations: [CLR_NAVIGATION_DIRECTIVES],
18046
- exports: [CLR_NAVIGATION_DIRECTIVES],
18047
- },] }
18048
- ];
18333
+ const defaultAnimationTiming = '0.2s ease-in-out';
18049
18334
 
18050
18335
  /*
18051
18336
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18052
18337
  * This software is released under MIT license.
18053
18338
  * The full license information can be found in LICENSE in the root directory of this project.
18054
18339
  */
18055
- class TemplateRefContainer {
18340
+ function collapse() {
18341
+ 'use strict';
18342
+ return [
18343
+ state('true', style({ height: 0, 'overflow-y': 'hidden' })),
18344
+ transition('true => false', [animate(defaultAnimationTiming, style({ height: '*', 'overflow-y': 'hidden' }))]),
18345
+ transition('false => true', [style({ height: '*', 'overflow-y': 'hidden' }), animate(defaultAnimationTiming)]),
18346
+ ];
18056
18347
  }
18057
- TemplateRefContainer.decorators = [
18058
- { type: Component, args: [{
18059
- template: `
18060
- <ng-template>
18061
- <ng-content></ng-content>
18062
- </ng-template>
18063
- `
18064
- },] }
18065
- ];
18066
- TemplateRefContainer.propDecorators = {
18067
- template: [{ type: ViewChild, args: [TemplateRef,] }]
18068
- };
18069
18348
 
18070
18349
  /*
18071
18350
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18072
18351
  * This software is released under MIT license.
18073
18352
  * The full license information can be found in LICENSE in the root directory of this project.
18074
18353
  */
18075
- const TEMPLATE_REF_DIRECTIVES = [TemplateRefContainer];
18076
18354
 
18077
18355
  /*
18078
18356
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18079
18357
  * This software is released under MIT license.
18080
18358
  * The full license information can be found in LICENSE in the root directory of this project.
18081
18359
  */
18082
- class ClrTemplateRefModule {
18360
+ function fade(opacity = 1) {
18361
+ return [
18362
+ transition('void => *', [style({ opacity: 0 }), animate(defaultAnimationTiming, style({ opacity: opacity }))]),
18363
+ transition('* => void', [animate(defaultAnimationTiming, style({ opacity: 0 }))]),
18364
+ ];
18083
18365
  }
18084
- ClrTemplateRefModule.decorators = [
18085
- { type: NgModule, args: [{
18086
- imports: [CommonModule],
18087
- declarations: [TEMPLATE_REF_DIRECTIVES],
18088
- entryComponents: [TEMPLATE_REF_DIRECTIVES],
18089
- exports: [TEMPLATE_REF_DIRECTIVES],
18090
- },] }
18091
- ];
18092
18366
 
18093
18367
  /*
18094
18368
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18095
18369
  * This software is released under MIT license.
18096
18370
  * The full license information can be found in LICENSE in the root directory of this project.
18097
18371
  */
18098
- class TabsWillyWonka extends WillyWonka {
18099
- }
18100
- TabsWillyWonka.decorators = [
18101
- { type: Directive, args: [{ selector: 'clr-tabs' },] }
18102
- ];
18103
18372
 
18104
18373
  /*
18105
18374
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18106
18375
  * This software is released under MIT license.
18107
18376
  * The full license information can be found in LICENSE in the root directory of this project.
18108
18377
  */
18109
- class ActiveOompaLoompa extends OompaLoompa {
18110
- constructor(cdr, willyWonka, id, ifActive) {
18111
- if (!willyWonka) {
18112
- throw new Error('clrTabLink and clr-tab-content should only be used inside of a clr-tabs');
18113
- }
18114
- super(cdr, willyWonka);
18115
- this.ifActive = ifActive;
18116
- this.id = id;
18378
+ function fadeSlide(direction) {
18379
+ let transform = null;
18380
+ if (direction === 'up') {
18381
+ transform = 'translate(0, 25%)';
18117
18382
  }
18118
- get flavor() {
18119
- return this.ifActive.current === this.id;
18383
+ else if (direction === 'down') {
18384
+ transform = 'translate(0, -25%)';
18385
+ }
18386
+ else if (direction === 'left') {
18387
+ transform = 'translate(25%, 0)';
18388
+ }
18389
+ else if (direction === 'right') {
18390
+ transform = 'translate(-25%, 0)';
18120
18391
  }
18392
+ else {
18393
+ throw new Error('Unknown direction ' + direction + ' for slide animation.');
18394
+ }
18395
+ return [
18396
+ transition('void => *', [style({ opacity: 0, transform: transform }), animate(defaultAnimationTiming)]),
18397
+ transition('* => void', [animate(defaultAnimationTiming, style({ opacity: 0, transform: transform }))]),
18398
+ ];
18121
18399
  }
18122
- ActiveOompaLoompa.decorators = [
18123
- { type: Directive, args: [{ selector: '[clrTabLink], clr-tab-content' },] }
18124
- ];
18125
- ActiveOompaLoompa.ctorParameters = () => [
18126
- { type: ChangeDetectorRef },
18127
- { type: TabsWillyWonka, decorators: [{ type: Optional }] },
18128
- { type: Number, decorators: [{ type: Inject, args: [IF_ACTIVE_ID,] }] },
18129
- { type: IfActiveService }
18130
- ];
18131
18400
 
18132
18401
  /*
18133
18402
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18134
18403
  * This software is released under MIT license.
18135
18404
  * The full license information can be found in LICENSE in the root directory of this project.
18136
18405
  */
18137
- var TabsLayout;
18138
- (function (TabsLayout) {
18139
- TabsLayout["HORIZONTAL"] = "horizontal";
18140
- TabsLayout["VERTICAL"] = "vertical";
18141
- })(TabsLayout || (TabsLayout = {}));
18142
18406
 
18143
18407
  /*
18144
18408
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18145
18409
  * This software is released under MIT license.
18146
18410
  * The full license information can be found in LICENSE in the root directory of this project.
18147
18411
  */
18148
- class TabsService {
18149
- constructor() {
18150
- this._children = [];
18151
- this.layout = TabsLayout.HORIZONTAL;
18412
+ function slide(direction) {
18413
+ let transform = null;
18414
+ if (direction === 'up') {
18415
+ transform = 'translate(0, 25%)';
18152
18416
  }
18153
- register(tab) {
18154
- this._children.push(tab);
18417
+ else if (direction === 'down') {
18418
+ transform = 'translate(0, -25%)';
18155
18419
  }
18156
- get children() {
18157
- return this._children;
18420
+ else if (direction === 'left') {
18421
+ transform = 'translate(25%, 0)';
18158
18422
  }
18159
- get activeTab() {
18160
- return this.children.find((tab) => {
18161
- return tab.active;
18423
+ else if (direction === 'right') {
18424
+ transform = 'translate(-25%, 0)';
18425
+ }
18426
+ else {
18427
+ throw new Error('Unknown direction ' + direction + ' for slide animation.');
18428
+ }
18429
+ return [
18430
+ transition('void => *', [style({ transform: transform }), animate(defaultAnimationTiming)]),
18431
+ transition('* => void', [animate(defaultAnimationTiming, style({ transform: transform }))]),
18432
+ ];
18433
+ }
18434
+
18435
+ /*
18436
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18437
+ * This software is released under MIT license.
18438
+ * The full license information can be found in LICENSE in the root directory of this project.
18439
+ */
18440
+
18441
+ /*
18442
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18443
+ * This software is released under MIT license.
18444
+ * The full license information can be found in LICENSE in the root directory of this project.
18445
+ */
18446
+
18447
+ /*
18448
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18449
+ * This software is released under MIT license.
18450
+ * The full license information can be found in LICENSE in the root directory of this project.
18451
+ */
18452
+
18453
+ /*
18454
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18455
+ * This software is released under MIT license.
18456
+ * The full license information can be found in LICENSE in the root directory of this project.
18457
+ */
18458
+
18459
+ /*
18460
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18461
+ * This software is released under MIT license.
18462
+ * The full license information can be found in LICENSE in the root directory of this project.
18463
+ */
18464
+
18465
+ /*
18466
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18467
+ * This software is released under MIT license.
18468
+ * The full license information can be found in LICENSE in the root directory of this project.
18469
+ */
18470
+
18471
+ /*
18472
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18473
+ * This software is released under MIT license.
18474
+ * The full license information can be found in LICENSE in the root directory of this project.
18475
+ */
18476
+ var ClrAriaLivePoliteness;
18477
+ (function (ClrAriaLivePoliteness) {
18478
+ ClrAriaLivePoliteness["off"] = "off";
18479
+ ClrAriaLivePoliteness["polite"] = "polite";
18480
+ ClrAriaLivePoliteness["assertive"] = "assertive";
18481
+ })(ClrAriaLivePoliteness || (ClrAriaLivePoliteness = {}));
18482
+ /**
18483
+ * Time in milliseconds before inserting the content into the container
18484
+ */
18485
+ const ARIA_LIVE_TICK = 100;
18486
+ /**
18487
+ * @deprecated
18488
+ *
18489
+ * -- ClrAriaLiveService is deprecated in 5.0 to be removed in 6.0 --
18490
+ * Please consider using the LiveAnnouncer in the Angular Material CDK
18491
+ * if your project needs this functionality.
18492
+ * More info: https://material.angular.io/cdk/a11y/overview#example-1
18493
+ *
18494
+ * This service handle `aria-live` accessibility attribute. The issue is that you need
18495
+ * to have the DOM Element with attribute `aria-live` before you could insert content
18496
+ * and SR (Screen Reader) pick the change and announce it.
18497
+ *
18498
+ * ```typescript
18499
+ * import { ClrAriaLiveService } from 'src/clr-angular/utils/a11y/aria-live.service';
18500
+ *
18501
+ * @Component({
18502
+ * selector: 'clr-demo-component',
18503
+ * providers: [ClrAriaLiveService],
18504
+ * template: `
18505
+ * <ng-content></ng-content>
18506
+ * `,
18507
+ * })
18508
+ * export class DemoComponent {
18509
+ * constructor(ariaLiveService: ClrAriaLiveService) {}
18510
+ *
18511
+ * public actionThatWillTriggerChange() {
18512
+ * this.ariaLiveService.announce('message that I want to announce to SR');
18513
+ * }
18514
+ * }
18515
+ * ```
18516
+ *
18517
+ */
18518
+ class ClrAriaLiveService {
18519
+ constructor(ngZone, _document, platformId) {
18520
+ this.ngZone = ngZone;
18521
+ this.platformId = platformId;
18522
+ this._id = `clr-aria-live-element-${uniqueIdFactory()}`;
18523
+ this.document = _document;
18524
+ }
18525
+ /**
18526
+ * get access to the internal HTML `id` that gonna be used for the AriaLive container.
18527
+ * @return ID of the DOM Element as string.
18528
+ */
18529
+ get id() {
18530
+ return this._id;
18531
+ }
18532
+ /**
18533
+ * Append text content inside the AriaLive Container. This method will check if the
18534
+ * DOM Element is existing if not it will create one for us and the will apply the text.
18535
+ *
18536
+ * ```typescript
18537
+ * this.ariaLiveService.announce(this.el.nativeElement);
18538
+ * // or
18539
+ * this.ariaLiveService.announce('Message to announce to SR');
18540
+ * ```
18541
+ *
18542
+ * @remark
18543
+ * When second argument is `AriaLivePoliteness.off` we won't create aria container or update it.
18544
+ * The reason for that is that we don't want to do additional work if the SR will ignore it.
18545
+ *
18546
+ * @param message - This could be simple string or HTMLElement
18547
+ * @param politeness - 'polite', 'assertive' or 'off'
18548
+ */
18549
+ announce(message, politeness = ClrAriaLivePoliteness.polite) {
18550
+ if (politeness === ClrAriaLivePoliteness.off) {
18551
+ return;
18552
+ }
18553
+ if (!this.ariaLiveElement && isPlatformBrowser(this.platformId)) {
18554
+ this.ariaLiveElement = this.createContainer();
18555
+ }
18556
+ message = typeof message !== 'string' && isPlatformBrowser(this.platformId) ? message.textContent : message;
18557
+ // when there is no message do NOTHING!
18558
+ if (!message) {
18559
+ return;
18560
+ }
18561
+ this.ariaLiveElement.setAttribute('aria-live', politeness);
18562
+ // This 100ms timeout is necessary for some browser + screen-reader combinations:
18563
+ // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.
18564
+ // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
18565
+ // second time without clearing and then using a non-zero delay.
18566
+ // (using JAWS 17 at time of this writing).
18567
+ this.ngZone.runOutsideAngular(() => {
18568
+ // This clearTimeout will stop all older messages from announcing
18569
+ // in the case where the messages are comming too fast we gonna try to append only
18570
+ // the last one. That's what the SR will try to do anyway.
18571
+ clearTimeout(this.previousTimeout);
18572
+ this.previousTimeout = setTimeout(() => {
18573
+ this.ariaLiveElement.textContent = message;
18574
+ }, ARIA_LIVE_TICK);
18575
+ });
18576
+ }
18577
+ /**
18578
+ * onDestroy life cycle - must stop all active setTimeouts and remove the AriaLive
18579
+ * container from the document.
18580
+ */
18581
+ ngOnDestroy() {
18582
+ clearTimeout(this.previousTimeout);
18583
+ if (isPlatformBrowser(this.platformId) && this.ariaLiveElement) {
18584
+ this.document.body.removeChild(this.ariaLiveElement);
18585
+ this.ariaLiveElement = null;
18586
+ }
18587
+ }
18588
+ /**
18589
+ * Create AriaLive DOM element as a last child of the document.
18590
+ * After the element is created, we gonna apply Clarity class to hide it from
18591
+ * the screen and set the `aria-live` politness.
18592
+ *
18593
+ * `clr-sr-only` is the CSS class that is used to hide the element from the screen.
18594
+ *
18595
+ * @remark
18596
+ * Calling this method multiple times will create multiple DOM Elements, that
18597
+ * won't be tracked and will be GC after the service is destroyed.
18598
+ *
18599
+ * @return AriaLive container as HTMLElement
18600
+ *
18601
+ */
18602
+ createContainer() {
18603
+ const ariaLiveElement = this.document.createElement('div');
18604
+ ariaLiveElement.setAttribute('id', this.id);
18605
+ // Use clarity screen reader class to hide the dom element
18606
+ // and fix the scrollbar shake
18607
+ ariaLiveElement.classList.add('clr-sr-only');
18608
+ ariaLiveElement.setAttribute('aria-atomic', 'true');
18609
+ ariaLiveElement.setAttribute('aria-live', ClrAriaLivePoliteness.polite);
18610
+ this.document.body.appendChild(ariaLiveElement);
18611
+ return ariaLiveElement;
18612
+ }
18613
+ }
18614
+ ClrAriaLiveService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ClrAriaLiveService_Factory() { return new ClrAriaLiveService(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i0.PLATFORM_ID)); }, token: ClrAriaLiveService, providedIn: "root" });
18615
+ ClrAriaLiveService.decorators = [
18616
+ { type: Injectable, args: [{
18617
+ providedIn: 'root',
18618
+ },] }
18619
+ ];
18620
+ ClrAriaLiveService.ctorParameters = () => [
18621
+ { type: NgZone },
18622
+ { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
18623
+ { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
18624
+ ];
18625
+
18626
+ /*
18627
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18628
+ * This software is released under MIT license.
18629
+ * The full license information can be found in LICENSE in the root directory of this project.
18630
+ */
18631
+
18632
+ /*
18633
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18634
+ * This software is released under MIT license.
18635
+ * The full license information can be found in LICENSE in the root directory of this project.
18636
+ */
18637
+
18638
+ /*
18639
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18640
+ * This software is released under MIT license.
18641
+ * The full license information can be found in LICENSE in the root directory of this project.
18642
+ */
18643
+
18644
+ /*
18645
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18646
+ * This software is released under MIT license.
18647
+ * The full license information can be found in LICENSE in the root directory of this project.
18648
+ */
18649
+
18650
+ /*
18651
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18652
+ * This software is released under MIT license.
18653
+ * The full license information can be found in LICENSE in the root directory of this project.
18654
+ */
18655
+
18656
+ /*
18657
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18658
+ * This software is released under MIT license.
18659
+ * The full license information can be found in LICENSE in the root directory of this project.
18660
+ */
18661
+
18662
+ /*
18663
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18664
+ * This software is released under MIT license.
18665
+ * The full license information can be found in LICENSE in the root directory of this project.
18666
+ */
18667
+
18668
+ /*
18669
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18670
+ * This software is released under MIT license.
18671
+ * The full license information can be found in LICENSE in the root directory of this project.
18672
+ */
18673
+
18674
+ /*
18675
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18676
+ * This software is released under MIT license.
18677
+ * The full license information can be found in LICENSE in the root directory of this project.
18678
+ */
18679
+ const createCdsCloseButton = (document, ariaLabel) => {
18680
+ const cdsCloseButton = document.createElement('cds-internal-close-button');
18681
+ cdsCloseButton.setAttribute('icon-size', '32');
18682
+ cdsCloseButton.setAttribute('aria-label', ariaLabel);
18683
+ cdsCloseButton.setAttribute('aria-hidden', 'true');
18684
+ cdsCloseButton.setAttribute('type', 'button');
18685
+ /**
18686
+ * The button is hidden by default based on our Desktop-first approach.
18687
+ */
18688
+ cdsCloseButton.setAttribute('hidden', 'true');
18689
+ cdsCloseButton.className = 'clr-nav-close';
18690
+ return cdsCloseButton;
18691
+ };
18692
+ const ɵ0 = createCdsCloseButton;
18693
+ class ClrNavLevel extends FocusTrap {
18694
+ constructor(platformId, responsiveNavService, elementRef, renderer, injector) {
18695
+ super(renderer, injector, platformId, elementRef.nativeElement);
18696
+ this.responsiveNavService = responsiveNavService;
18697
+ this.elementRef = elementRef;
18698
+ this._isOpen = false;
18699
+ if (isPlatformBrowser(platformId)) {
18700
+ this._document = injector.get(DOCUMENT);
18701
+ }
18702
+ this._subscription = responsiveNavService.navControl
18703
+ .pipe(filter(x => x.navLevel === this.level), filter(({ controlCode }) => (controlCode === ResponsiveNavCodes.NAV_OPEN && !this.isOpen) ||
18704
+ (controlCode === ResponsiveNavCodes.NAV_CLOSE && this.isOpen)))
18705
+ .subscribe(({ controlCode }) => {
18706
+ if (controlCode === ResponsiveNavCodes.NAV_OPEN) {
18707
+ this.open();
18708
+ return;
18709
+ }
18710
+ this.close();
18711
+ });
18712
+ this._subscription.add(responsiveNavService.navControl
18713
+ .pipe(filter(({ controlCode }) => controlCode === ResponsiveNavCodes.NAV_CLOSE_ALL))
18714
+ .subscribe(() => this.close()));
18715
+ }
18716
+ ngOnInit() {
18717
+ if (!this.closeButtonAriaLabel) {
18718
+ this.closeButtonAriaLabel =
18719
+ this._level === ResponsiveNavCodes.NAV_LEVEL_1
18720
+ ? commonStringsDefault.responsiveNavToggleClose
18721
+ : commonStringsDefault.responsiveNavOverflowClose;
18722
+ }
18723
+ if (this.level !== ResponsiveNavCodes.NAV_LEVEL_1 && this.level !== ResponsiveNavCodes.NAV_LEVEL_2) {
18724
+ console.error('Nav Level can only be 1 or 2');
18725
+ return;
18726
+ }
18727
+ this.responsiveNavService.registerNav(this.level);
18728
+ this.addNavClass(this.level);
18729
+ }
18730
+ ngAfterViewInit() {
18731
+ const closeButton = createCdsCloseButton(this._document, this.closeButtonAriaLabel);
18732
+ this.renderer.listen(closeButton, 'click', this.close.bind(this));
18733
+ this.renderer.insertBefore(this.elementRef.nativeElement, closeButton, this.elementRef.nativeElement.firstChild); // Adding the button at the top of the nav
18734
+ if (this._document.body.clientWidth < LARGE_BREAKPOINT) {
18735
+ /**
18736
+ * Close if the document body is smaller than the large breakpoint for example:
18737
+ * - Refreshing the page
18738
+ * - Browser window size is changed when opening the applicaiton
18739
+ * - Browser zoom is turned on and zoomed to a size that makes the document smaller than the large breakpoint
18740
+ */
18741
+ this.close();
18742
+ }
18743
+ }
18744
+ addNavClass(level) {
18745
+ const navHostClassList = this.elementRef.nativeElement.classList;
18746
+ if (level === ResponsiveNavCodes.NAV_LEVEL_1) {
18747
+ navHostClassList.add(ResponsiveNavCodes.NAV_CLASS_LEVEL_1);
18748
+ }
18749
+ else if (level === ResponsiveNavCodes.NAV_LEVEL_2) {
18750
+ navHostClassList.add(ResponsiveNavCodes.NAV_CLASS_LEVEL_2);
18751
+ }
18752
+ }
18753
+ get level() {
18754
+ return this._level;
18755
+ }
18756
+ // getter to access the responsive navigation codes from the template
18757
+ get responsiveNavCodes() {
18758
+ return ResponsiveNavCodes;
18759
+ }
18760
+ get isOpen() {
18761
+ return this._isOpen;
18762
+ }
18763
+ onResize(event) {
18764
+ const target = event.target;
18765
+ if (target.innerWidth < LARGE_BREAKPOINT && this.isOpen) {
18766
+ this.close();
18767
+ return;
18768
+ }
18769
+ this.showNavigation();
18770
+ }
18771
+ open() {
18772
+ this._isOpen = true;
18773
+ this.showNavigation();
18774
+ this.enableFocusTrap();
18775
+ this.showCloseButton();
18776
+ this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_OPEN, this.level);
18777
+ }
18778
+ close() {
18779
+ this._isOpen = false;
18780
+ this.hideNavigation();
18781
+ this.removeFocusTrap();
18782
+ this.hideCloseButton();
18783
+ this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_CLOSE, this.level);
18784
+ }
18785
+ // TODO: Figure out whats the best way to do this. Possible methods
18786
+ // 1. HostListener (current solution)
18787
+ // 2. Directives on the .nav-link class. We discussed on moving away from class selectors but I forget the reason
18788
+ // why
18789
+ onMouseClick(target) {
18790
+ let current = target; // Get the element in the DOM on which the mouse was clicked
18791
+ const navHost = this.elementRef.nativeElement; // Get the current nav native HTML element
18792
+ // Start checking if current and navHost are equal.
18793
+ // If not traverse to the parentNode and check again.
18794
+ while (current) {
18795
+ if (current === navHost) {
18796
+ return;
18797
+ }
18798
+ else if (current.classList.contains('nav-link') && this._document.body.clientWidth < LARGE_BREAKPOINT) {
18799
+ this.close();
18800
+ return;
18801
+ }
18802
+ current = current.parentNode;
18803
+ }
18804
+ }
18805
+ hideNavigation() {
18806
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-hidden', 'true');
18807
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'hidden', 'true');
18808
+ }
18809
+ showNavigation() {
18810
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-hidden', 'false');
18811
+ this.renderer.removeAttribute(this.elementRef.nativeElement, 'hidden');
18812
+ }
18813
+ hideCloseButton() {
18814
+ this.renderer.setAttribute(this.elementRef.nativeElement, 'aria-hidden', 'true');
18815
+ this.renderer.setAttribute(this.elementRef.nativeElement.querySelector('.clr-nav-close'), 'hidden', 'true');
18816
+ }
18817
+ showCloseButton() {
18818
+ this.renderer.setAttribute(this.elementRef.nativeElement.querySelector('.clr-nav-close'), 'aria-hidden', 'false');
18819
+ this.renderer.removeAttribute(this.elementRef.nativeElement.querySelector('.clr-nav-close'), 'hidden');
18820
+ }
18821
+ ngOnDestroy() {
18822
+ this.responsiveNavService.unregisterNav(this.level);
18823
+ this._subscription.unsubscribe();
18824
+ }
18825
+ }
18826
+ ClrNavLevel.decorators = [
18827
+ { type: Directive, args: [{ selector: '[clr-nav-level]' },] }
18828
+ ];
18829
+ ClrNavLevel.ctorParameters = () => [
18830
+ { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] },
18831
+ { type: ResponsiveNavigationService },
18832
+ { type: ElementRef },
18833
+ { type: Renderer2 },
18834
+ { type: Injector }
18835
+ ];
18836
+ ClrNavLevel.propDecorators = {
18837
+ _level: [{ type: Input, args: ['clr-nav-level',] }],
18838
+ closeButtonAriaLabel: [{ type: Input, args: ['closeAriaLabel',] }],
18839
+ onResize: [{ type: HostListener, args: ['window:resize', ['$event'],] }],
18840
+ onMouseClick: [{ type: HostListener, args: ['click', ['$event.target'],] }]
18841
+ };
18842
+
18843
+ /*
18844
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18845
+ * This software is released under MIT license.
18846
+ * The full license information can be found in LICENSE in the root directory of this project.
18847
+ */
18848
+ const CLR_NAVIGATION_DIRECTIVES = [
18849
+ ClrHeader,
18850
+ ClrNavLevel,
18851
+ NavDetectionOompaLoompa,
18852
+ MainContainerWillyWonka,
18853
+ ];
18854
+ class ClrNavigationModule {
18855
+ }
18856
+ ClrNavigationModule.decorators = [
18857
+ { type: NgModule, args: [{
18858
+ imports: [CommonModule, ClrIconModule, ClrDropdownModule],
18859
+ declarations: [CLR_NAVIGATION_DIRECTIVES],
18860
+ exports: [CLR_NAVIGATION_DIRECTIVES],
18861
+ },] }
18862
+ ];
18863
+
18864
+ /*
18865
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18866
+ * This software is released under MIT license.
18867
+ * The full license information can be found in LICENSE in the root directory of this project.
18868
+ */
18869
+ class TemplateRefContainer {
18870
+ }
18871
+ TemplateRefContainer.decorators = [
18872
+ { type: Component, args: [{
18873
+ template: `
18874
+ <ng-template>
18875
+ <ng-content></ng-content>
18876
+ </ng-template>
18877
+ `
18878
+ },] }
18879
+ ];
18880
+ TemplateRefContainer.propDecorators = {
18881
+ template: [{ type: ViewChild, args: [TemplateRef,] }]
18882
+ };
18883
+
18884
+ /*
18885
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18886
+ * This software is released under MIT license.
18887
+ * The full license information can be found in LICENSE in the root directory of this project.
18888
+ */
18889
+ const TEMPLATE_REF_DIRECTIVES = [TemplateRefContainer];
18890
+
18891
+ /*
18892
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18893
+ * This software is released under MIT license.
18894
+ * The full license information can be found in LICENSE in the root directory of this project.
18895
+ */
18896
+ class ClrTemplateRefModule {
18897
+ }
18898
+ ClrTemplateRefModule.decorators = [
18899
+ { type: NgModule, args: [{
18900
+ imports: [CommonModule],
18901
+ declarations: [TEMPLATE_REF_DIRECTIVES],
18902
+ entryComponents: [TEMPLATE_REF_DIRECTIVES],
18903
+ exports: [TEMPLATE_REF_DIRECTIVES],
18904
+ },] }
18905
+ ];
18906
+
18907
+ /*
18908
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18909
+ * This software is released under MIT license.
18910
+ * The full license information can be found in LICENSE in the root directory of this project.
18911
+ */
18912
+ class TabsWillyWonka extends WillyWonka {
18913
+ }
18914
+ TabsWillyWonka.decorators = [
18915
+ { type: Directive, args: [{ selector: 'clr-tabs' },] }
18916
+ ];
18917
+
18918
+ /*
18919
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18920
+ * This software is released under MIT license.
18921
+ * The full license information can be found in LICENSE in the root directory of this project.
18922
+ */
18923
+ class ActiveOompaLoompa extends OompaLoompa {
18924
+ constructor(cdr, willyWonka, id, ifActive) {
18925
+ if (!willyWonka) {
18926
+ throw new Error('clrTabLink and clr-tab-content should only be used inside of a clr-tabs');
18927
+ }
18928
+ super(cdr, willyWonka);
18929
+ this.ifActive = ifActive;
18930
+ this.id = id;
18931
+ }
18932
+ get flavor() {
18933
+ return this.ifActive.current === this.id;
18934
+ }
18935
+ }
18936
+ ActiveOompaLoompa.decorators = [
18937
+ { type: Directive, args: [{ selector: '[clrTabLink], clr-tab-content' },] }
18938
+ ];
18939
+ ActiveOompaLoompa.ctorParameters = () => [
18940
+ { type: ChangeDetectorRef },
18941
+ { type: TabsWillyWonka, decorators: [{ type: Optional }] },
18942
+ { type: Number, decorators: [{ type: Inject, args: [IF_ACTIVE_ID,] }] },
18943
+ { type: IfActiveService }
18944
+ ];
18945
+
18946
+ /*
18947
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18948
+ * This software is released under MIT license.
18949
+ * The full license information can be found in LICENSE in the root directory of this project.
18950
+ */
18951
+ var TabsLayout;
18952
+ (function (TabsLayout) {
18953
+ TabsLayout["HORIZONTAL"] = "horizontal";
18954
+ TabsLayout["VERTICAL"] = "vertical";
18955
+ })(TabsLayout || (TabsLayout = {}));
18956
+
18957
+ /*
18958
+ * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18959
+ * This software is released under MIT license.
18960
+ * The full license information can be found in LICENSE in the root directory of this project.
18961
+ */
18962
+ class TabsService {
18963
+ constructor() {
18964
+ this._children = [];
18965
+ this.layout = TabsLayout.HORIZONTAL;
18966
+ }
18967
+ register(tab) {
18968
+ this._children.push(tab);
18969
+ }
18970
+ get children() {
18971
+ return this._children;
18972
+ }
18973
+ get activeTab() {
18974
+ return this.children.find((tab) => {
18975
+ return tab.active;
18162
18976
  });
18163
18977
  }
18164
18978
  get overflowTabs() {
@@ -21857,7 +22671,14 @@ class ClrWizard {
21857
22671
  return this.navService.wizardFinished.subscribe(() => this.emitWizardFinished());
21858
22672
  }
21859
22673
  listenForPageChanges() {
21860
- return this.navService.currentPageChanged.subscribe(() => this.currentPageChanged.emit());
22674
+ return this.navService.currentPageChanged.subscribe(() => {
22675
+ var _a;
22676
+ // Added to address VPAT-749:
22677
+ // When clicking on a wizard tab, focus should move to that
22678
+ // tabs content to make the wizard more accessible.
22679
+ (_a = this.wizardTitle) === null || _a === void 0 ? void 0 : _a.nativeElement.focus();
22680
+ this.currentPageChanged.emit();
22681
+ });
21861
22682
  }
21862
22683
  updateNavOnPageChanges() {
21863
22684
  const changes = this.differ.diff(this.pages);
@@ -22377,13 +23198,6 @@ AccordionService.decorators = [
22377
23198
  { type: Injectable }
22378
23199
  ];
22379
23200
 
22380
- /*
22381
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22382
- * This software is released under MIT license.
22383
- * The full license information can be found in LICENSE in the root directory of this project.
22384
- */
22385
- const defaultAnimationTiming = '0.2s ease-in-out';
22386
-
22387
23201
  /*
22388
23202
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22389
23203
  * This software is released under MIT license.
@@ -23501,173 +24315,41 @@ ClrTimelineModule.decorators = [
23501
24315
  exports: [...CLR_TIMELINE_DIRECTIVES, ClrIconModule, ClrSpinnerModule],
23502
24316
  declarations: [CLR_TIMELINE_DIRECTIVES],
23503
24317
  },] }
23504
- ];
23505
- ClrTimelineModule.ctorParameters = () => [];
23506
-
23507
- /*
23508
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23509
- * This software is released under MIT license.
23510
- * The full license information can be found in LICENSE in the root directory of this project.
23511
- */
23512
- class ClarityModule {
23513
- }
23514
- ClarityModule.decorators = [
23515
- { type: NgModule, args: [{
23516
- exports: [
23517
- ClrEmphasisModule,
23518
- ClrDataModule,
23519
- ClrIconModule,
23520
- ClrModalModule,
23521
- ClrLoadingModule,
23522
- ClrConditionalModule,
23523
- ClrFocusTrapModule,
23524
- ClrFocusOnViewInitModule,
23525
- ClrButtonModule,
23526
- ClrFormsModule,
23527
- ClrLayoutModule,
23528
- ClrPopoverModule,
23529
- ClrWizardModule,
23530
- ClrDragAndDropModule,
23531
- ClrStepperModule,
23532
- ClrSpinnerModule,
23533
- ClrProgressBarModule,
23534
- ClrPopoverModuleNext,
23535
- ClrTimelineModule,
23536
- ],
23537
- },] }
23538
- ];
23539
-
23540
- /*
23541
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23542
- * This software is released under MIT license.
23543
- * The full license information can be found in LICENSE in the root directory of this project.
23544
- */
23545
-
23546
- /*
23547
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23548
- * This software is released under MIT license.
23549
- * The full license information can be found in LICENSE in the root directory of this project.
23550
- */
23551
-
23552
- /*
23553
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23554
- * This software is released under MIT license.
23555
- * The full license information can be found in LICENSE in the root directory of this project.
23556
- */
23557
-
23558
- /*
23559
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23560
- * This software is released under MIT license.
23561
- * The full license information can be found in LICENSE in the root directory of this project.
23562
- */
23563
-
23564
- /*
23565
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23566
- * This software is released under MIT license.
23567
- * The full license information can be found in LICENSE in the root directory of this project.
23568
- */
23569
-
23570
- /*
23571
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23572
- * This software is released under MIT license.
23573
- * The full license information can be found in LICENSE in the root directory of this project.
23574
- */
23575
-
23576
- /*
23577
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23578
- * This software is released under MIT license.
23579
- * The full license information can be found in LICENSE in the root directory of this project.
23580
- */
23581
-
23582
- /*
23583
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23584
- * This software is released under MIT license.
23585
- * The full license information can be found in LICENSE in the root directory of this project.
23586
- */
23587
-
23588
- /*
23589
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23590
- * This software is released under MIT license.
23591
- * The full license information can be found in LICENSE in the root directory of this project.
23592
- */
23593
-
23594
- /*
23595
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23596
- * This software is released under MIT license.
23597
- * The full license information can be found in LICENSE in the root directory of this project.
23598
- */
23599
-
23600
- /*
23601
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23602
- * This software is released under MIT license.
23603
- * The full license information can be found in LICENSE in the root directory of this project.
23604
- */
23605
-
23606
- /*
23607
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23608
- * This software is released under MIT license.
23609
- * The full license information can be found in LICENSE in the root directory of this project.
23610
- */
23611
-
23612
- /*
23613
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23614
- * This software is released under MIT license.
23615
- * The full license information can be found in LICENSE in the root directory of this project.
23616
- */
23617
-
23618
- /*
23619
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23620
- * This software is released under MIT license.
23621
- * The full license information can be found in LICENSE in the root directory of this project.
23622
- */
23623
-
23624
- /*
23625
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23626
- * This software is released under MIT license.
23627
- * The full license information can be found in LICENSE in the root directory of this project.
23628
- */
23629
-
23630
- /*
23631
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23632
- * This software is released under MIT license.
23633
- * The full license information can be found in LICENSE in the root directory of this project.
23634
- */
23635
-
23636
- /*
23637
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23638
- * This software is released under MIT license.
23639
- * The full license information can be found in LICENSE in the root directory of this project.
23640
- */
23641
-
23642
- /*
23643
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23644
- * This software is released under MIT license.
23645
- * The full license information can be found in LICENSE in the root directory of this project.
23646
- */
23647
-
23648
- /*
23649
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23650
- * This software is released under MIT license.
23651
- * The full license information can be found in LICENSE in the root directory of this project.
23652
- */
23653
-
23654
- /*
23655
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23656
- * This software is released under MIT license.
23657
- * The full license information can be found in LICENSE in the root directory of this project.
23658
- */
23659
-
23660
- /*
23661
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23662
- * This software is released under MIT license.
23663
- * The full license information can be found in LICENSE in the root directory of this project.
23664
- */
24318
+ ];
24319
+ ClrTimelineModule.ctorParameters = () => [];
23665
24320
 
23666
24321
  /*
23667
24322
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
23668
24323
  * This software is released under MIT license.
23669
24324
  * The full license information can be found in LICENSE in the root directory of this project.
23670
24325
  */
24326
+ class ClarityModule {
24327
+ }
24328
+ ClarityModule.decorators = [
24329
+ { type: NgModule, args: [{
24330
+ exports: [
24331
+ ClrEmphasisModule,
24332
+ ClrDataModule,
24333
+ ClrIconModule,
24334
+ ClrModalModule,
24335
+ ClrLoadingModule,
24336
+ ClrConditionalModule,
24337
+ ClrFocusTrapModule,
24338
+ ClrFocusOnViewInitModule,
24339
+ ClrButtonModule,
24340
+ ClrFormsModule,
24341
+ ClrLayoutModule,
24342
+ ClrPopoverModule,
24343
+ ClrWizardModule,
24344
+ ClrDragAndDropModule,
24345
+ ClrStepperModule,
24346
+ ClrSpinnerModule,
24347
+ ClrProgressBarModule,
24348
+ ClrPopoverModuleNext,
24349
+ ClrTimelineModule,
24350
+ ],
24351
+ },] }
24352
+ ];
23671
24353
 
23672
24354
  /*
23673
24355
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -23746,16 +24428,6 @@ ClarityModule.decorators = [
23746
24428
  * This software is released under MIT license.
23747
24429
  * The full license information can be found in LICENSE in the root directory of this project.
23748
24430
  */
23749
- const CLR_MENU_POSITIONS = [
23750
- 'bottom-left',
23751
- 'bottom-right',
23752
- 'top-left',
23753
- 'top-right',
23754
- 'left-bottom',
23755
- 'left-top',
23756
- 'right-bottom',
23757
- 'right-top',
23758
- ];
23759
24431
 
23760
24432
  /*
23761
24433
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -23786,14 +24458,6 @@ const CLR_MENU_POSITIONS = [
23786
24458
  * This software is released under MIT license.
23787
24459
  * The full license information can be found in LICENSE in the root directory of this project.
23788
24460
  */
23789
- function collapse() {
23790
- 'use strict';
23791
- return [
23792
- state('true', style({ height: 0, 'overflow-y': 'hidden' })),
23793
- transition('true => false', [animate(defaultAnimationTiming, style({ height: '*', 'overflow-y': 'hidden' }))]),
23794
- transition('false => true', [style({ height: '*', 'overflow-y': 'hidden' }), animate(defaultAnimationTiming)]),
23795
- ];
23796
- }
23797
24461
 
23798
24462
  /*
23799
24463
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -23806,12 +24470,6 @@ function collapse() {
23806
24470
  * This software is released under MIT license.
23807
24471
  * The full license information can be found in LICENSE in the root directory of this project.
23808
24472
  */
23809
- function fade(opacity = 1) {
23810
- return [
23811
- transition('void => *', [style({ opacity: 0 }), animate(defaultAnimationTiming, style({ opacity: opacity }))]),
23812
- transition('* => void', [animate(defaultAnimationTiming, style({ opacity: 0 }))]),
23813
- ];
23814
- }
23815
24473
 
23816
24474
  /*
23817
24475
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -23824,28 +24482,6 @@ function fade(opacity = 1) {
23824
24482
  * This software is released under MIT license.
23825
24483
  * The full license information can be found in LICENSE in the root directory of this project.
23826
24484
  */
23827
- function fadeSlide(direction) {
23828
- let transform = null;
23829
- if (direction === 'up') {
23830
- transform = 'translate(0, 25%)';
23831
- }
23832
- else if (direction === 'down') {
23833
- transform = 'translate(0, -25%)';
23834
- }
23835
- else if (direction === 'left') {
23836
- transform = 'translate(25%, 0)';
23837
- }
23838
- else if (direction === 'right') {
23839
- transform = 'translate(-25%, 0)';
23840
- }
23841
- else {
23842
- throw new Error('Unknown direction ' + direction + ' for slide animation.');
23843
- }
23844
- return [
23845
- transition('void => *', [style({ opacity: 0, transform: transform }), animate(defaultAnimationTiming)]),
23846
- transition('* => void', [animate(defaultAnimationTiming, style({ opacity: 0, transform: transform }))]),
23847
- ];
23848
- }
23849
24485
 
23850
24486
  /*
23851
24487
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -23858,28 +24494,6 @@ function fadeSlide(direction) {
23858
24494
  * This software is released under MIT license.
23859
24495
  * The full license information can be found in LICENSE in the root directory of this project.
23860
24496
  */
23861
- function slide(direction) {
23862
- let transform = null;
23863
- if (direction === 'up') {
23864
- transform = 'translate(0, 25%)';
23865
- }
23866
- else if (direction === 'down') {
23867
- transform = 'translate(0, -25%)';
23868
- }
23869
- else if (direction === 'left') {
23870
- transform = 'translate(25%, 0)';
23871
- }
23872
- else if (direction === 'right') {
23873
- transform = 'translate(-25%, 0)';
23874
- }
23875
- else {
23876
- throw new Error('Unknown direction ' + direction + ' for slide animation.');
23877
- }
23878
- return [
23879
- transition('void => *', [style({ transform: transform }), animate(defaultAnimationTiming)]),
23880
- transition('* => void', [animate(defaultAnimationTiming, style({ transform: transform }))]),
23881
- ];
23882
- }
23883
24497
 
23884
24498
  /*
23885
24499
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -23922,155 +24536,6 @@ function slide(direction) {
23922
24536
  * This software is released under MIT license.
23923
24537
  * The full license information can be found in LICENSE in the root directory of this project.
23924
24538
  */
23925
- var ClrAriaLivePoliteness;
23926
- (function (ClrAriaLivePoliteness) {
23927
- ClrAriaLivePoliteness["off"] = "off";
23928
- ClrAriaLivePoliteness["polite"] = "polite";
23929
- ClrAriaLivePoliteness["assertive"] = "assertive";
23930
- })(ClrAriaLivePoliteness || (ClrAriaLivePoliteness = {}));
23931
- /**
23932
- * Time in milliseconds before inserting the content into the container
23933
- */
23934
- const ARIA_LIVE_TICK = 100;
23935
- /**
23936
- * @deprecated
23937
- *
23938
- * -- ClrAriaLiveService is deprecated in 5.0 to be removed in 6.0 --
23939
- * Please consider using the LiveAnnouncer in the Angular Material CDK
23940
- * if your project needs this functionality.
23941
- * More info: https://material.angular.io/cdk/a11y/overview#example-1
23942
- *
23943
- * This service handle `aria-live` accessibility attribute. The issue is that you need
23944
- * to have the DOM Element with attribute `aria-live` before you could insert content
23945
- * and SR (Screen Reader) pick the change and announce it.
23946
- *
23947
- * ```typescript
23948
- * import { ClrAriaLiveService } from 'src/clr-angular/utils/a11y/aria-live.service';
23949
- *
23950
- * @Component({
23951
- * selector: 'clr-demo-component',
23952
- * providers: [ClrAriaLiveService],
23953
- * template: `
23954
- * <ng-content></ng-content>
23955
- * `,
23956
- * })
23957
- * export class DemoComponent {
23958
- * constructor(ariaLiveService: ClrAriaLiveService) {}
23959
- *
23960
- * public actionThatWillTriggerChange() {
23961
- * this.ariaLiveService.announce('message that I want to announce to SR');
23962
- * }
23963
- * }
23964
- * ```
23965
- *
23966
- */
23967
- class ClrAriaLiveService {
23968
- constructor(ngZone, _document, platformId) {
23969
- this.ngZone = ngZone;
23970
- this.platformId = platformId;
23971
- this._id = `clr-aria-live-element-${uniqueIdFactory()}`;
23972
- this.document = _document;
23973
- }
23974
- /**
23975
- * get access to the internal HTML `id` that gonna be used for the AriaLive container.
23976
- * @return ID of the DOM Element as string.
23977
- */
23978
- get id() {
23979
- return this._id;
23980
- }
23981
- /**
23982
- * Append text content inside the AriaLive Container. This method will check if the
23983
- * DOM Element is existing if not it will create one for us and the will apply the text.
23984
- *
23985
- * ```typescript
23986
- * this.ariaLiveService.announce(this.el.nativeElement);
23987
- * // or
23988
- * this.ariaLiveService.announce('Message to announce to SR');
23989
- * ```
23990
- *
23991
- * @remark
23992
- * When second argument is `AriaLivePoliteness.off` we won't create aria container or update it.
23993
- * The reason for that is that we don't want to do additional work if the SR will ignore it.
23994
- *
23995
- * @param message - This could be simple string or HTMLElement
23996
- * @param politeness - 'polite', 'assertive' or 'off'
23997
- */
23998
- announce(message, politeness = ClrAriaLivePoliteness.polite) {
23999
- if (politeness === ClrAriaLivePoliteness.off) {
24000
- return;
24001
- }
24002
- if (!this.ariaLiveElement && isPlatformBrowser(this.platformId)) {
24003
- this.ariaLiveElement = this.createContainer();
24004
- }
24005
- message = typeof message !== 'string' && isPlatformBrowser(this.platformId) ? message.textContent : message;
24006
- // when there is no message do NOTHING!
24007
- if (!message) {
24008
- return;
24009
- }
24010
- this.ariaLiveElement.setAttribute('aria-live', politeness);
24011
- // This 100ms timeout is necessary for some browser + screen-reader combinations:
24012
- // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.
24013
- // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
24014
- // second time without clearing and then using a non-zero delay.
24015
- // (using JAWS 17 at time of this writing).
24016
- this.ngZone.runOutsideAngular(() => {
24017
- // This clearTimeout will stop all older messages from announcing
24018
- // in the case where the messages are comming too fast we gonna try to append only
24019
- // the last one. That's what the SR will try to do anyway.
24020
- clearTimeout(this.previousTimeout);
24021
- this.previousTimeout = setTimeout(() => {
24022
- this.ariaLiveElement.textContent = message;
24023
- }, ARIA_LIVE_TICK);
24024
- });
24025
- }
24026
- /**
24027
- * onDestroy life cycle - must stop all active setTimeouts and remove the AriaLive
24028
- * container from the document.
24029
- */
24030
- ngOnDestroy() {
24031
- clearTimeout(this.previousTimeout);
24032
- if (isPlatformBrowser(this.platformId) && this.ariaLiveElement) {
24033
- this.document.body.removeChild(this.ariaLiveElement);
24034
- this.ariaLiveElement = null;
24035
- }
24036
- }
24037
- /**
24038
- * Create AriaLive DOM element as a last child of the document.
24039
- * After the element is created, we gonna apply Clarity class to hide it from
24040
- * the screen and set the `aria-live` politness.
24041
- *
24042
- * `clr-sr-only` is the CSS class that is used to hide the element from the screen.
24043
- *
24044
- * @remark
24045
- * Calling this method multiple times will create multiple DOM Elements, that
24046
- * won't be tracked and will be GC after the service is destroyed.
24047
- *
24048
- * @return AriaLive container as HTMLElement
24049
- *
24050
- */
24051
- createContainer() {
24052
- const ariaLiveElement = this.document.createElement('div');
24053
- ariaLiveElement.setAttribute('id', this.id);
24054
- // Use clarity screen reader class to hide the dom element
24055
- // and fix the scrollbar shake
24056
- ariaLiveElement.classList.add('clr-sr-only');
24057
- ariaLiveElement.setAttribute('aria-atomic', 'true');
24058
- ariaLiveElement.setAttribute('aria-live', ClrAriaLivePoliteness.polite);
24059
- this.document.body.appendChild(ariaLiveElement);
24060
- return ariaLiveElement;
24061
- }
24062
- }
24063
- ClrAriaLiveService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ClrAriaLiveService_Factory() { return new ClrAriaLiveService(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.DOCUMENT), i0.ɵɵinject(i0.PLATFORM_ID)); }, token: ClrAriaLiveService, providedIn: "root" });
24064
- ClrAriaLiveService.decorators = [
24065
- { type: Injectable, args: [{
24066
- providedIn: 'root',
24067
- },] }
24068
- ];
24069
- ClrAriaLiveService.ctorParameters = () => [
24070
- { type: NgZone },
24071
- { type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
24072
- { type: undefined, decorators: [{ type: Inject, args: [PLATFORM_ID,] }] }
24073
- ];
24074
24539
 
24075
24540
  /*
24076
24541
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -24095,6 +24560,16 @@ ClrAriaLiveService.ctorParameters = () => [
24095
24560
  * This software is released under MIT license.
24096
24561
  * The full license information can be found in LICENSE in the root directory of this project.
24097
24562
  */
24563
+ const CLR_MENU_POSITIONS = [
24564
+ 'bottom-left',
24565
+ 'bottom-right',
24566
+ 'top-left',
24567
+ 'top-right',
24568
+ 'left-bottom',
24569
+ 'left-top',
24570
+ 'right-bottom',
24571
+ 'right-top',
24572
+ ];
24098
24573
 
24099
24574
  /*
24100
24575
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -24172,5 +24647,5 @@ ClrAriaLiveService.ctorParameters = () => [
24172
24647
  * Generated bundle index. Do not edit.
24173
24648
  */
24174
24649
 
24175
- 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, 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, domAdapterFactory as ɵa, LayoutService as ɵb, AlertIconAndTypesService as ɵba, MultiAlertService as ɵbb, ControlIdService as ɵbc, NgControlService as ɵbd, ClrAbstractControl as ɵbe, ContainerIdService as ɵbf, AbstractIfState as ɵbg, IfControlStateService as ɵbh, MarkControlService as ɵbi, ControlClassService as ɵbj, ClrHostWrappingModule as ɵbk, EmptyAnchor as ɵbl, ClrKeyFocusModule as ɵbm, ClrKeyFocus as ɵbn, ClrKeyFocusItem as ɵbo, ClrRovingTabindex as ɵbp, OptionSelectionService as ɵbq, AriaService as ɵbr, ComboboxFocusHandler as ɵbs, COMBOBOX_FOCUS_HANDLER_PROVIDER as ɵbt, ComboboxContainerService as ɵbu, DateNavigationService as ɵbv, DateFormControlService as ɵbw, LocaleHelperService as ɵbx, FocusService$1 as ɵby, DateIOService as ɵbz, FOCUS_ON_VIEW_INIT_PROVIDER as ɵc, DatepickerEnabledService as ɵca, ViewManagerService as ɵcb, DatepickerFocusService as ɵcc, DatalistIdService as ɵcd, ClrOutsideClickModule as ɵce, OUSTIDE_CLICK_DIRECTIVES as ɵcf, OutsideClick as ɵcg, ClrExpandableAnimationModule as ɵch, DomAdapter as ɵci, DragEventListenerService as ɵcj, DragAndDropEventBusService as ɵck, DragHandleRegistrarService as ɵcl, DraggableSnapshotService as ɵcm, GlobalDragModeService as ɵcn, Selection as ɵco, Items as ɵcp, FiltersProvider as ɵcq, Page as ɵcr, StateDebouncer as ɵcs, Sort as ɵct, DatagridRenderOrganizer as ɵcu, RowActionService as ɵcv, ExpandableRowsCount as ɵcw, DetailService as ɵcx, StateProvider as ɵcy, TableSizeService as ɵcz, FOCUS_TRAP_DIRECTIVES as ɵd, ColumnsService as ɵda, DisplayModeService as ɵdb, DatagridFilterRegistrar as ɵdc, CustomFilter as ɵdd, DatagridIfExpandService as ɵde, SignpostFocusManager as ɵdf, SignpostIdService as ɵdg, ColumnResizerService as ɵdh, COLUMN_STATE as ɵdi, columnStateFactory as ɵdj, COLUMN_STATE_PROVIDER as ɵdk, WillyWonka as ɵdm, OompaLoompa as ɵdn, StackControl as ɵdo, TreeFeaturesService as ɵdp, treeFeaturesFactory as ɵdq, TREE_FEATURES_PROVIDER as ɵdr, TreeFocusManagerService as ɵds, RecursiveChildren as ɵdt, ScrollingService as ɵdu, ButtonInGroupService as ɵdv, ResponsiveNavigationService as ɵdw, ClrTemplateRefModule as ɵdx, TEMPLATE_REF_DIRECTIVES as ɵdy, TemplateRefContainer as ɵdz, RootDropdownService as ɵe, TabsService as ɵea, TABS_ID as ɵeb, tokenFactory as ɵec, TABS_ID_PROVIDER as ɵed, VerticalNavService as ɵee, VerticalNavIconService as ɵef, VerticalNavGroupRegistrationService as ɵeg, VerticalNavGroupService as ɵeh, TooltipIdService as ɵei, WizardNavigationService as ɵej, PageCollectionService as ɵek, ButtonHubService as ɵel, HeaderActionService as ɵem, AccordionService as ɵen, panelAnimation as ɵeo, stepAnimation as ɵep, defaultAnimationTiming as ɵeq, StepperService as ɵer, TimelineIconAttributeService as ɵes, clrRootDropdownFactory as ɵf, ROOT_DROPDOWN_PROVIDER as ɵg, POPOVER_HOST_ANCHOR as ɵh, FocusService as ɵi, clrFocusServiceFactory as ɵj, FOCUS_SERVICE_PROVIDER as ɵk, DropdownFocusHandler as ɵl, DROPDOWN_FOCUS_HANDLER_PROVIDER as ɵm, customFocusableItemProvider as ɵn, UNIQUE_ID as ɵo, uniqueIdFactory as ɵp, UNIQUE_ID_PROVIDER as ɵq, FocusableItem as ɵr, AbstractPopover as ɵs, BasicFocusableItem as ɵt, BASIC_FOCUSABLE_ITEM_PROVIDER as ɵu, IF_ACTIVE_ID as ɵv, tokenFactory$1 as ɵw, IF_ACTIVE_ID_PROVIDER as ɵx, IfActiveService as ɵy, IfExpandService as ɵz };
24650
+ 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, 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, ɵ0, domAdapterFactory as ɵa, LayoutService as ɵb, AlertIconAndTypesService as ɵba, MultiAlertService as ɵbb, ControlIdService as ɵbc, NgControlService as ɵbd, ClrAbstractControl as ɵbe, ContainerIdService as ɵbf, AbstractIfState as ɵbg, IfControlStateService as ɵbh, MarkControlService as ɵbi, ControlClassService as ɵbj, ClrHostWrappingModule as ɵbk, EmptyAnchor as ɵbl, ClrKeyFocusModule as ɵbm, ClrKeyFocus as ɵbn, ClrKeyFocusItem as ɵbo, ClrRovingTabindex as ɵbp, OptionSelectionService as ɵbq, AriaService as ɵbr, ComboboxFocusHandler as ɵbs, COMBOBOX_FOCUS_HANDLER_PROVIDER as ɵbt, ComboboxContainerService as ɵbu, DateNavigationService as ɵbv, DateFormControlService as ɵbw, LocaleHelperService as ɵbx, FocusService$1 as ɵby, DateIOService as ɵbz, FOCUS_ON_VIEW_INIT_PROVIDER as ɵc, DatepickerEnabledService as ɵca, ViewManagerService as ɵcb, DatepickerFocusService as ɵcc, DatalistIdService as ɵcd, ClrOutsideClickModule as ɵce, OUSTIDE_CLICK_DIRECTIVES as ɵcf, OutsideClick as ɵcg, ClrExpandableAnimationModule as ɵch, DomAdapter as ɵci, DragEventListenerService as ɵcj, DragAndDropEventBusService as ɵck, DragHandleRegistrarService as ɵcl, DraggableSnapshotService as ɵcm, GlobalDragModeService as ɵcn, Selection as ɵco, Items as ɵcp, FiltersProvider as ɵcq, Page as ɵcr, StateDebouncer as ɵcs, Sort as ɵct, DatagridRenderOrganizer as ɵcu, RowActionService as ɵcv, ExpandableRowsCount as ɵcw, DetailService as ɵcx, StateProvider as ɵcy, TableSizeService as ɵcz, FOCUS_TRAP_DIRECTIVES as ɵd, ColumnsService as ɵda, DisplayModeService as ɵdb, KeyNavigationGridController as ɵdc, DatagridFilterRegistrar as ɵdd, CustomFilter as ɵde, DatagridIfExpandService as ɵdf, SignpostFocusManager as ɵdg, SignpostIdService as ɵdh, ColumnResizerService as ɵdi, COLUMN_STATE as ɵdj, columnStateFactory as ɵdk, COLUMN_STATE_PROVIDER as ɵdl, WillyWonka as ɵdn, OompaLoompa as ɵdo, StackControl as ɵdp, TreeFeaturesService as ɵdq, treeFeaturesFactory as ɵdr, TREE_FEATURES_PROVIDER as ɵds, TreeFocusManagerService as ɵdt, RecursiveChildren as ɵdu, ScrollingService as ɵdv, ButtonInGroupService as ɵdw, ResponsiveNavigationService as ɵdx, FocusTrap as ɵdz, RootDropdownService as ɵe, ClrTemplateRefModule as ɵea, TEMPLATE_REF_DIRECTIVES as ɵeb, TemplateRefContainer as ɵec, TabsService as ɵed, TABS_ID as ɵee, tokenFactory as ɵef, TABS_ID_PROVIDER as ɵeg, VerticalNavService as ɵeh, VerticalNavIconService as ɵei, VerticalNavGroupRegistrationService as ɵej, VerticalNavGroupService as ɵek, TooltipIdService as ɵel, WizardNavigationService as ɵem, PageCollectionService as ɵen, ButtonHubService as ɵeo, HeaderActionService as ɵep, AccordionService as ɵeq, panelAnimation as ɵer, stepAnimation as ɵes, defaultAnimationTiming as ɵet, StepperService as ɵeu, TimelineIconAttributeService as ɵev, clrRootDropdownFactory as ɵf, ROOT_DROPDOWN_PROVIDER as ɵg, POPOVER_HOST_ANCHOR as ɵh, FocusService as ɵi, clrFocusServiceFactory as ɵj, FOCUS_SERVICE_PROVIDER as ɵk, DropdownFocusHandler as ɵl, DROPDOWN_FOCUS_HANDLER_PROVIDER as ɵm, customFocusableItemProvider as ɵn, UNIQUE_ID as ɵo, uniqueIdFactory as ɵp, UNIQUE_ID_PROVIDER as ɵq, FocusableItem as ɵr, AbstractPopover as ɵs, BasicFocusableItem as ɵt, BASIC_FOCUSABLE_ITEM_PROVIDER as ɵu, IF_ACTIVE_ID as ɵv, tokenFactory$1 as ɵw, IF_ACTIVE_ID_PROVIDER as ɵx, IfActiveService as ɵy, IfExpandService as ɵz };
24176
24651
  //# sourceMappingURL=clr-angular.js.map