@clr/angular 15.0.0-beta.2 → 15.0.0-beta.3

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 (118) hide show
  1. package/clarity.api.md +158 -489
  2. package/clr-angular.module.d.ts +12 -15
  3. package/data/datagrid/datagrid-column.d.ts +1 -22
  4. package/data/datagrid/datagrid-pagination.d.ts +2 -2
  5. package/data/datagrid/datagrid.module.d.ts +13 -13
  6. package/data/stack-view/index.d.ts +0 -2
  7. package/data/stack-view/stack-block.d.ts +1 -17
  8. package/data/stack-view/stack-view.d.ts +1 -11
  9. package/data/stack-view/stack-view.module.d.ts +5 -7
  10. package/data/tree-view/tree-node.d.ts +6 -6
  11. package/esm2020/accordion/accordion-panel.mjs +3 -3
  12. package/esm2020/accordion/stepper/stepper-panel.mjs +3 -3
  13. package/esm2020/clr-angular.module.mjs +1 -13
  14. package/esm2020/data/datagrid/datagrid-action-overflow.mjs +10 -10
  15. package/esm2020/data/datagrid/datagrid-column-separator.mjs +16 -15
  16. package/esm2020/data/datagrid/datagrid-column-toggle.mjs +14 -14
  17. package/esm2020/data/datagrid/datagrid-column.mjs +2 -48
  18. package/esm2020/data/datagrid/datagrid-detail.mjs +8 -6
  19. package/esm2020/data/datagrid/datagrid-filter.mjs +10 -10
  20. package/esm2020/data/datagrid/datagrid-pagination.mjs +10 -5
  21. package/esm2020/data/datagrid/datagrid-row-detail.mjs +7 -8
  22. package/esm2020/data/datagrid/datagrid.module.mjs +9 -9
  23. package/esm2020/data/stack-view/index.mjs +1 -3
  24. package/esm2020/data/stack-view/stack-block.mjs +2 -8
  25. package/esm2020/data/stack-view/stack-header.mjs +2 -23
  26. package/esm2020/data/stack-view/stack-view.mjs +4 -28
  27. package/esm2020/data/stack-view/stack-view.module.mjs +3 -23
  28. package/esm2020/data/tree-view/tree-node.mjs +30 -26
  29. package/esm2020/forms/datepicker/date-container.mjs +9 -9
  30. package/esm2020/forms/datepicker/datepicker.module.mjs +5 -5
  31. package/esm2020/layout/nav/nav-level.mjs +23 -10
  32. package/esm2020/layout/vertical-nav/vertical-nav-group.mjs +3 -7
  33. package/esm2020/modal/modal.mjs +8 -19
  34. package/esm2020/modal/modal.module.mjs +5 -5
  35. package/esm2020/popover/dropdown/dropdown-item.mjs +30 -33
  36. package/esm2020/utils/cdk/cdk-drag.module.mjs +37 -0
  37. package/esm2020/utils/cdk/cdk-trap-focus.module.mjs +37 -0
  38. package/esm2020/utils/i18n/common-strings.default.mjs +1 -2
  39. package/esm2020/utils/i18n/common-strings.interface.mjs +1 -1
  40. package/esm2020/utils/index.mjs +1 -5
  41. package/esm2020/wizard/wizard.mjs +6 -30
  42. package/fesm2015/clr-angular.mjs +252 -1981
  43. package/fesm2015/clr-angular.mjs.map +1 -1
  44. package/fesm2020/clr-angular.mjs +299 -2024
  45. package/fesm2020/clr-angular.mjs.map +1 -1
  46. package/forms/datepicker/datepicker.module.d.ts +6 -6
  47. package/layout/nav/nav-level.d.ts +12 -4
  48. package/layout/vertical-nav/vertical-nav-group.d.ts +1 -2
  49. package/modal/modal.d.ts +1 -4
  50. package/modal/modal.module.d.ts +3 -3
  51. package/package.json +2 -1
  52. package/popover/dropdown/dropdown-item.d.ts +7 -13
  53. package/src/utils/popover/README.md +1 -1
  54. package/utils/cdk/cdk-drag.module.d.ts +17 -0
  55. package/utils/cdk/cdk-trap-focus.module.d.ts +17 -0
  56. package/utils/i18n/common-strings.interface.d.ts +0 -17
  57. package/utils/index.d.ts +0 -4
  58. package/wizard/wizard.d.ts +2 -13
  59. package/data/stack-view/stack-control.d.ts +0 -16
  60. package/data/stack-view/stack-input.d.ts +0 -10
  61. package/data/stack-view/stack-select.d.ts +0 -9
  62. package/esm2020/data/stack-view/stack-control.mjs +0 -34
  63. package/esm2020/data/stack-view/stack-input.mjs +0 -42
  64. package/esm2020/data/stack-view/stack-select.mjs +0 -48
  65. package/esm2020/utils/a11y/aria-live.service.mjs +0 -163
  66. package/esm2020/utils/a11y/index.mjs +0 -7
  67. package/esm2020/utils/drag-and-drop/drag-and-drop.module.mjs +0 -42
  68. package/esm2020/utils/drag-and-drop/drag-event.mjs +0 -16
  69. package/esm2020/utils/drag-and-drop/drag-handle.mjs +0 -35
  70. package/esm2020/utils/drag-and-drop/draggable/draggable.mjs +0 -135
  71. package/esm2020/utils/drag-and-drop/draggable-ghost.mjs +0 -124
  72. package/esm2020/utils/drag-and-drop/droppable/droppable.mjs +0 -222
  73. package/esm2020/utils/drag-and-drop/if-dragged.mjs +0 -47
  74. package/esm2020/utils/drag-and-drop/index.mjs +0 -14
  75. package/esm2020/utils/drag-and-drop/interfaces/drag-event.interface.mjs +0 -15
  76. package/esm2020/utils/drag-and-drop/interfaces/drop-tolerance.interface.mjs +0 -7
  77. package/esm2020/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.mjs +0 -54
  78. package/esm2020/utils/drag-and-drop/providers/drag-event-listener.service.mjs +0 -179
  79. package/esm2020/utils/drag-and-drop/providers/drag-handle-registrar.service.mjs +0 -60
  80. package/esm2020/utils/drag-and-drop/providers/draggable-snapshot.service.mjs +0 -38
  81. package/esm2020/utils/drag-and-drop/providers/global-drag-mode.service.mjs +0 -26
  82. package/esm2020/utils/focus-trap/focus-trap-config.interface.mjs +0 -7
  83. package/esm2020/utils/focus-trap/focus-trap-tracker.service.mjs +0 -32
  84. package/esm2020/utils/focus-trap/focus-trap.directive.mjs +0 -158
  85. package/esm2020/utils/focus-trap/focus-trap.mjs +0 -141
  86. package/esm2020/utils/focus-trap/focus-trap.module.mjs +0 -24
  87. package/esm2020/utils/focus-trap/index.mjs +0 -9
  88. package/esm2020/utils/for-type-ahead/for-type-ahead.mjs +0 -54
  89. package/esm2020/utils/for-type-ahead/for-type-ahead.module.mjs +0 -23
  90. package/esm2020/utils/for-type-ahead/for-type-ahead.service.mjs +0 -29
  91. package/esm2020/utils/for-type-ahead/index.mjs +0 -8
  92. package/utils/a11y/aria-live.service.d.ts +0 -93
  93. package/utils/a11y/index.d.ts +0 -1
  94. package/utils/drag-and-drop/drag-and-drop.module.d.ts +0 -14
  95. package/utils/drag-and-drop/drag-event.d.ts +0 -8
  96. package/utils/drag-and-drop/drag-handle.d.ts +0 -11
  97. package/utils/drag-and-drop/draggable/draggable.d.ts +0 -36
  98. package/utils/drag-and-drop/draggable-ghost.d.ts +0 -30
  99. package/utils/drag-and-drop/droppable/droppable.d.ts +0 -42
  100. package/utils/drag-and-drop/if-dragged.d.ts +0 -13
  101. package/utils/drag-and-drop/index.d.ts +0 -8
  102. package/utils/drag-and-drop/interfaces/drag-event.interface.d.ts +0 -22
  103. package/utils/drag-and-drop/interfaces/drop-tolerance.interface.d.ts +0 -6
  104. package/utils/drag-and-drop/providers/drag-and-drop-event-bus.service.d.ts +0 -16
  105. package/utils/drag-and-drop/providers/drag-event-listener.service.d.ts +0 -39
  106. package/utils/drag-and-drop/providers/drag-handle-registrar.service.d.ts +0 -18
  107. package/utils/drag-and-drop/providers/draggable-snapshot.service.d.ts +0 -16
  108. package/utils/drag-and-drop/providers/global-drag-mode.service.d.ts +0 -10
  109. package/utils/focus-trap/focus-trap-config.interface.d.ts +0 -3
  110. package/utils/focus-trap/focus-trap-tracker.service.d.ts +0 -12
  111. package/utils/focus-trap/focus-trap.d.ts +0 -29
  112. package/utils/focus-trap/focus-trap.directive.d.ts +0 -38
  113. package/utils/focus-trap/focus-trap.module.d.ts +0 -10
  114. package/utils/focus-trap/index.d.ts +0 -3
  115. package/utils/for-type-ahead/for-type-ahead.d.ts +0 -15
  116. package/utils/for-type-ahead/for-type-ahead.module.d.ts +0 -8
  117. package/utils/for-type-ahead/for-type-ahead.service.d.ts +0 -11
  118. package/utils/for-type-ahead/index.d.ts +0 -2
@@ -9,8 +9,9 @@ import { Subject, BehaviorSubject, Observable, fromEvent, isObservable, of, Repl
9
9
  import { trigger, transition, style, animate, keyframes, state } from '@angular/animations';
10
10
  import * as i1 from '@angular/forms';
11
11
  import { FormControl, FormGroup, FormsModule, NG_VALIDATORS, SelectMultipleControlValueAccessor } from '@angular/forms';
12
+ import { CdkTrapFocus } from '@angular/cdk/a11y';
13
+ import { CdkDrag } from '@angular/cdk/drag-drop';
12
14
  import * as i1$1 from '@angular/router';
13
- import { FocusTrapTrackerService, createId, isFocusable, isHTMLElement } from '@cds/core/internal';
14
15
  import '@cds/core/internal-components/close-button/register.js';
15
16
  import '@cds/core/icon/register';
16
17
 
@@ -334,7 +335,6 @@ const commonStringsDefault = {
334
335
  responsiveNavOverflowOpen: 'Navigation overflow menu',
335
336
  responsiveNavOverflowClose: 'Navigation overflow menu',
336
337
  //Vertical Nav
337
- verticalNavGroupToggle: 'Toggle vertical navigation group',
338
338
  verticalNavToggle: 'Toggle vertical navigation',
339
339
  // Timeline steps
340
340
  timelineStepNotStarted: 'Not started',
@@ -598,10 +598,10 @@ class ClrAccordionPanel {
598
598
  }
599
599
  }
600
600
  ClrAccordionPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrAccordionPanel, deps: [{ token: ClrCommonStringsService }, { token: AccordionService }, { token: IfExpandService }], target: i0.ɵɵFactoryTarget.Component });
601
- ClrAccordionPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrAccordionPanel, selector: "clr-accordion-panel", inputs: { disabled: ["clrAccordionPanelDisabled", "disabled"], panelOpen: ["clrAccordionPanelOpen", "panelOpen"] }, outputs: { panelOpenChange: "clrAccordionPanelOpenChange" }, host: { properties: { "class.clr-accordion-panel": "true" } }, providers: [IfExpandService], queries: [{ propertyName: "accordionDescription", predicate: ClrAccordionDescription }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div *ngIf=\"panel.status !== AccordionStatus.Inactive\" aria-live=\"assertive\" class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n </div>\n\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }], animations: panelAnimation, changeDetection: i0.ChangeDetectionStrategy.OnPush });
601
+ ClrAccordionPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrAccordionPanel, selector: "clr-accordion-panel", inputs: { disabled: ["clrAccordionPanelDisabled", "disabled"], panelOpen: ["clrAccordionPanelOpen", "panelOpen"] }, outputs: { panelOpenChange: "clrAccordionPanelOpenChange" }, host: { properties: { "class.clr-accordion-panel": "true" } }, providers: [IfExpandService], queries: [{ propertyName: "accordionDescription", predicate: ClrAccordionDescription }], usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }], animations: panelAnimation, changeDetection: i0.ChangeDetectionStrategy.OnPush });
602
602
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrAccordionPanel, decorators: [{
603
603
  type: Component,
604
- args: [{ selector: 'clr-accordion-panel', host: { '[class.clr-accordion-panel]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, animations: panelAnimation, providers: [IfExpandService], template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div *ngIf=\"panel.status !== AccordionStatus.Inactive\" aria-live=\"assertive\" class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n </div>\n\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
604
+ args: [{ selector: 'clr-accordion-panel', host: { '[class.clr-accordion-panel]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, animations: panelAnimation, providers: [IfExpandService], template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
605
605
  }], ctorParameters: function () { return [{ type: ClrCommonStringsService }, { type: AccordionService }, { type: IfExpandService }]; }, propDecorators: { disabled: [{
606
606
  type: Input,
607
607
  args: ['clrAccordionPanelDisabled']
@@ -1095,10 +1095,10 @@ class ClrStepperPanel extends ClrAccordionPanel {
1095
1095
  }
1096
1096
  }
1097
1097
  ClrStepperPanel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStepperPanel, deps: [{ token: PLATFORM_ID }, { token: ClrCommonStringsService }, { token: i1.FormGroupName, optional: true }, { token: i1.NgModelGroup, optional: true }, { token: StepperService }, { token: IfExpandService }], target: i0.ɵɵFactoryTarget.Component });
1098
- ClrStepperPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStepperPanel, selector: "clr-stepper-panel", host: { properties: { "class.clr-accordion-panel": "true" } }, providers: [IfExpandService], viewQueries: [{ propertyName: "headerButton", first: true, predicate: ["headerButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div *ngIf=\"panel.status !== AccordionStatus.Inactive\" aria-live=\"assertive\" class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n </div>\n\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }], animations: stepAnimation, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1098
+ ClrStepperPanel.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStepperPanel, selector: "clr-stepper-panel", host: { properties: { "class.clr-accordion-panel": "true" } }, providers: [IfExpandService], viewQueries: [{ propertyName: "headerButton", first: true, predicate: ["headerButton"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }], animations: stepAnimation, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1099
1099
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStepperPanel, decorators: [{
1100
1100
  type: Component,
1101
- args: [{ selector: 'clr-stepper-panel', host: { '[class.clr-accordion-panel]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, animations: stepAnimation, providers: [IfExpandService], template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div *ngIf=\"panel.status !== AccordionStatus.Inactive\" aria-live=\"assertive\" class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n </div>\n\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
1101
+ args: [{ selector: 'clr-stepper-panel', host: { '[class.clr-accordion-panel]': 'true' }, changeDetection: ChangeDetectionStrategy.OnPush, animations: stepAnimation, providers: [IfExpandService], template: "<ng-container *ngIf=\"panel | async; let panel\">\n <div [ngClass]=\"getPanelStateClasses(panel)\">\n <div class=\"clr-accordion-header\">\n <button\n type=\"button\"\n class=\"clr-accordion-header-button\"\n (click)=\"togglePanel()\"\n [id]=\"getAccordionHeaderId(panel.templateId)\"\n [disabled]=\"isAccordion && panel.disabled\"\n [attr.aria-disabled]=\"!isAccordion && panel.disabled\"\n [attr.aria-controls]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-expanded]=\"panel.open\"\n [class.clr-accordion-header-has-description]=\"(accordionDescription.changes | async)?.length || accordionDescription.length\"\n #headerButton\n >\n <span class=\"clr-sr-only\">\n <ng-container *ngIf=\"panel.status === AccordionStatus.Error\">{{commonStrings.keys.danger}}</ng-container>\n <ng-container *ngIf=\"panel.status === AccordionStatus.Complete\">{{commonStrings.keys.success}}</ng-container>\n </span>\n <span class=\"clr-accordion-status\">\n <cds-icon shape=\"angle\" direction=\"right\" class=\"clr-accordion-angle\"></cds-icon>\n <span class=\"clr-accordion-number\"></span>\n <cds-icon status=\"danger\" shape=\"exclamation-circle\" class=\"clr-accordion-error-icon\"></cds-icon>\n <cds-icon status=\"success\" shape=\"check-circle\" class=\"clr-accordion-complete-icon\"></cds-icon>\n </span>\n <ng-content select=\"clr-accordion-title, clr-step-title\"></ng-content>\n <ng-content select=\"clr-accordion-description, clr-step-description\"></ng-content>\n </button>\n </div>\n <div\n @skipInitialRender\n role=\"region\"\n [id]=\"getAccordionContentId(panel.templateId)\"\n [attr.aria-hidden]=\"!panel.open\"\n [attr.aria-labelledby]=\"getAccordionHeaderId(panel.templateId)\"\n >\n <div\n *ngIf=\"panel.open\"\n @toggle\n (@toggle.done)=\"collapsePanelOnAnimationDone(panel)\"\n class=\"clr-accordion-content\"\n >\n <div class=\"clr-accordion-inner-content\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n" }]
1102
1102
  }], ctorParameters: function () {
1103
1103
  return [{ type: undefined, decorators: [{
1104
1104
  type: Inject,
@@ -7046,204 +7046,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
7046
7046
  * This software is released under MIT license.
7047
7047
  * The full license information can be found in LICENSE in the root directory of this project.
7048
7048
  */
7049
- class FocusTrapTracker {
7050
- constructor() {
7051
- this._previousFocusTraps = [];
7052
- }
7053
- get current() {
7054
- return this._current;
7055
- }
7056
- set current(value) {
7057
- this._previousFocusTraps.push(this._current);
7058
- this._current = value;
7059
- }
7060
- get nbFocusTrappers() {
7061
- return this._previousFocusTraps.length;
7062
- }
7063
- activatePreviousTrapper() {
7064
- this._current = this._previousFocusTraps.pop();
7065
- }
7066
- }
7067
- FocusTrapTracker.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrapTracker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7068
- FocusTrapTracker.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrapTracker, providedIn: 'root' });
7069
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrapTracker, decorators: [{
7070
- type: Injectable,
7071
- args: [{ providedIn: 'root' }]
7072
- }] });
7073
-
7074
- /*
7075
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
7076
- * This software is released under MIT license.
7077
- * The full license information can be found in LICENSE in the root directory of this project.
7049
+ /**
7050
+ * This is just a copy of CdkTrapFocus so it can be used independent of the rest of the A11yModule.
7078
7051
  */
7079
- const FOCUSABLES = '[href]:not([tabindex="-1"]), button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), [contenteditable="true"]:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"]) ';
7080
- class FocusTrapDirective {
7081
- constructor(el, injector, focusTrapsTracker, renderer, platformId) {
7082
- this.el = el;
7083
- this.injector = injector;
7084
- this.focusTrapsTracker = focusTrapsTracker;
7085
- this.renderer = renderer;
7086
- this.platformId = platformId;
7087
- this.localFocusEscaped = false;
7088
- this._config = {
7089
- strict: true,
7090
- };
7091
- this.document = this.injector.get(DOCUMENT);
7092
- this.focusTrapsTracker.current = this;
7093
- }
7094
- set config(config) {
7095
- this._config = Object.assign(this._config, config === '' ? {} : config);
7096
- }
7097
- onFocusIn(event) {
7098
- const nativeElement = this.el.nativeElement;
7099
- if (this.focusTrapsTracker.current !== this ||
7100
- !isPlatformBrowser(this.platformId) ||
7101
- this.localFocusEscaped ||
7102
- nativeElement.contains(event.target)) {
7103
- return;
7104
- }
7105
- if (event.target === this.topReboundEl && nativeElement.contains(event.relatedTarget)) {
7106
- this.focusLastFocusable();
7107
- // if it fails to focus element inside the trap, focus the trap element.
7108
- this.focusTrapElIfOutside();
7109
- }
7110
- else if (event.target === this.bottomReboundEl && nativeElement.contains(event.relatedTarget)) {
7111
- this.focusFirstFocusable();
7112
- // if it fails to focus element inside the trap, focus the trap element.
7113
- this.focusTrapElIfOutside();
7114
- }
7115
- else {
7116
- this._config.strict ? this.el.nativeElement.focus() : (this.localFocusEscaped = true);
7117
- }
7118
- }
7119
- createFocusableOffScreenEl() {
7120
- // Not using Renderer2's createElement method because that leads to DOM leakage.
7121
- // https://github.com/angular/angular/issues/26954
7122
- const offScreenSpan = this.document.createElement('span');
7123
- this.renderer.setAttribute(offScreenSpan, 'tabindex', '0');
7124
- this.renderer.addClass(offScreenSpan, 'offscreen-focus-rebounder');
7125
- return offScreenSpan;
7126
- }
7127
- addReboundEls() {
7128
- if (isPlatformBrowser(this.platformId)) {
7129
- this.topReboundEl = this.createFocusableOffScreenEl();
7130
- this.bottomReboundEl = this.createFocusableOffScreenEl();
7131
- const hostElement = this.el.nativeElement;
7132
- // Add reboundBeforeTrapEl right outside of host element
7133
- this.renderer.insertBefore(hostElement.parentElement, this.topReboundEl, hostElement);
7134
- // Add reboundAfterTrapEl right after host element
7135
- if (hostElement.nextSibling) {
7136
- this.renderer.insertBefore(hostElement.parentNode, this.bottomReboundEl, hostElement.nextSibling);
7137
- }
7138
- else {
7139
- this.renderer.appendChild(hostElement.parentNode, this.bottomReboundEl);
7140
- }
7141
- }
7142
- }
7143
- removeReboundEls() {
7144
- if (isPlatformBrowser(this.platformId) && this.topReboundEl && this.bottomReboundEl) {
7145
- this.parentElement.removeChild(this.topReboundEl);
7146
- this.parentElement.removeChild(this.bottomReboundEl);
7147
- // These are here to to make sure that
7148
- // we completely delete all traces of the removed DOM objects.
7149
- delete this.topReboundEl;
7150
- delete this.bottomReboundEl;
7151
- }
7152
- }
7153
- setPreviousFocus() {
7154
- if (this.previousActiveElement && this.previousActiveElement.focus) {
7155
- this.previousActiveElement.focus();
7156
- }
7157
- }
7158
- ngOnInit() {
7159
- if (isPlatformBrowser(this.platformId)) {
7160
- this.renderer.setAttribute(this.el.nativeElement, 'tabindex', '-1');
7161
- this.el.nativeElement.focus();
7162
- }
7163
- }
7164
- ngAfterViewInit() {
7165
- if (isPlatformBrowser(this.platformId)) {
7166
- this.previousActiveElement = this.document.activeElement;
7167
- this.parentElement = this.el.nativeElement.parentElement;
7168
- }
7169
- this.addReboundEls();
7170
- }
7171
- get potentiallyFocusableEls() {
7172
- return [...this.el.nativeElement.querySelectorAll(FOCUSABLES)];
7173
- }
7174
- focusFirstFocusable() {
7175
- for (let i = 0; i < this.potentiallyFocusableEls.length; i++) {
7176
- this.firstFocusableEl = this.focusElement(this.potentiallyFocusableEls[i]);
7177
- if (this.firstFocusableEl) {
7178
- break;
7179
- }
7180
- }
7181
- }
7182
- focusLastFocusable() {
7183
- for (let i = this.potentiallyFocusableEls.length - 1; i >= 0; i--) {
7184
- this.lastFocusableEl = this.focusElement(this.potentiallyFocusableEls[i]);
7185
- if (this.lastFocusableEl) {
7186
- break;
7187
- }
7188
- }
7189
- }
7190
- focusTrapElIfOutside() {
7191
- if (!this.el.nativeElement.contains(document.activeElement)) {
7192
- this.el.nativeElement.focus();
7193
- }
7194
- }
7195
- focusElement(el) {
7196
- if (el && el.focus) {
7197
- el.focus();
7198
- if (document.activeElement === el) {
7199
- return el;
7200
- }
7201
- }
7202
- return null;
7203
- }
7204
- ngOnDestroy() {
7205
- this.removeReboundEls();
7206
- this.setPreviousFocus();
7207
- this.focusTrapsTracker.activatePreviousTrapper();
7208
- }
7052
+ class CdkTrapFocusModule_CdkTrapFocus extends CdkTrapFocus {
7209
7053
  }
7210
- FocusTrapDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrapDirective, deps: [{ token: i0.ElementRef }, { token: i0.Injector }, { token: FocusTrapTracker }, { token: i0.Renderer2 }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
7211
- FocusTrapDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: { config: ["clrFocusTrap", "config"] }, host: { listeners: { "document:focusin": "onFocusIn($event)" } }, ngImport: i0 });
7212
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrapDirective, decorators: [{
7054
+ CdkTrapFocusModule_CdkTrapFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkTrapFocusModule_CdkTrapFocus, deps: null, target: i0.ɵɵFactoryTarget.Directive });
7055
+ CdkTrapFocusModule_CdkTrapFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]", usesInheritance: true, ngImport: i0 });
7056
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkTrapFocusModule_CdkTrapFocus, decorators: [{
7213
7057
  type: Directive,
7214
7058
  args: [{
7215
- selector: '[clrFocusTrap]',
7059
+ selector: '[cdkTrapFocus]',
7216
7060
  }]
7217
- }], ctorParameters: function () {
7218
- return [{ type: i0.ElementRef }, { type: i0.Injector }, { type: FocusTrapTracker }, { type: i0.Renderer2 }, { type: undefined, decorators: [{
7219
- type: Inject,
7220
- args: [PLATFORM_ID]
7221
- }] }];
7222
- }, propDecorators: { config: [{
7223
- type: Input,
7224
- args: ['clrFocusTrap']
7225
- }], onFocusIn: [{
7226
- type: HostListener,
7227
- args: ['document:focusin', ['$event']]
7228
- }] } });
7229
-
7230
- /*
7231
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
7232
- * This software is released under MIT license.
7233
- * The full license information can be found in LICENSE in the root directory of this project.
7061
+ }] });
7062
+ /**
7063
+ * This module allows us to avoid importing all of A11yModule which results in a smaller application bundle.
7234
7064
  */
7235
- const FOCUS_TRAP_DIRECTIVES = [FocusTrapDirective];
7236
- class ClrFocusTrapModule {
7065
+ class CdkTrapFocusModule {
7237
7066
  }
7238
- ClrFocusTrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrFocusTrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7239
- ClrFocusTrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrFocusTrapModule, declarations: [FocusTrapDirective], imports: [CommonModule], exports: [FocusTrapDirective] });
7240
- ClrFocusTrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrFocusTrapModule, imports: [CommonModule] });
7241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrFocusTrapModule, decorators: [{
7067
+ CdkTrapFocusModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkTrapFocusModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
7068
+ CdkTrapFocusModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: CdkTrapFocusModule, declarations: [CdkTrapFocusModule_CdkTrapFocus], exports: [CdkTrapFocusModule_CdkTrapFocus] });
7069
+ CdkTrapFocusModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkTrapFocusModule });
7070
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkTrapFocusModule, decorators: [{
7242
7071
  type: NgModule,
7243
7072
  args: [{
7244
- imports: [CommonModule],
7245
- declarations: [FOCUS_TRAP_DIRECTIVES],
7246
- exports: [FOCUS_TRAP_DIRECTIVES],
7073
+ declarations: [CdkTrapFocusModule_CdkTrapFocus],
7074
+ exports: [CdkTrapFocusModule_CdkTrapFocus],
7247
7075
  }]
7248
7076
  }] });
7249
7077
 
@@ -9034,7 +8862,7 @@ ClrDateContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
9034
8862
  </button>
9035
8863
  <clr-datepicker-view-manager
9036
8864
  *clrPopoverContent="open; at: popoverPosition; outsideClickToClose: true; scrollToClose: true"
9037
- clrFocusTrap
8865
+ cdkTrapFocus
9038
8866
  ></clr-datepicker-view-manager>
9039
8867
  </div>
9040
8868
  <cds-icon
@@ -9056,7 +8884,7 @@ ClrDateContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
9056
8884
  <ng-content select="clr-control-error" *ngIf="showInvalid"></ng-content>
9057
8885
  <ng-content select="clr-control-success" *ngIf="showValid"></ng-content>
9058
8886
  </div>
9059
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["for"] }, { kind: "component", type: ClrDatepickerViewManager, selector: "clr-datepicker-view-manager" }] });
8887
+ `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["for"] }, { kind: "component", type: ClrDatepickerViewManager, selector: "clr-datepicker-view-manager" }] });
9060
8888
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDateContainer, decorators: [{
9061
8889
  type: Component,
9062
8890
  args: [{
@@ -9080,7 +8908,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
9080
8908
  </button>
9081
8909
  <clr-datepicker-view-manager
9082
8910
  *clrPopoverContent="open; at: popoverPosition; outsideClickToClose: true; scrollToClose: true"
9083
- clrFocusTrap
8911
+ cdkTrapFocus
9084
8912
  ></clr-datepicker-view-manager>
9085
8913
  </div>
9086
8914
  <cds-icon
@@ -9476,11 +9304,11 @@ ClrDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ver
9476
9304
  ClrYearpicker,
9477
9305
  ClrDaypicker,
9478
9306
  ClrCalendar], imports: [CommonModule,
9307
+ CdkTrapFocusModule,
9479
9308
  ClrHostWrappingModule,
9480
9309
  ClrConditionalModule,
9481
9310
  ClrPopoverModuleNext,
9482
9311
  ClrIconModule,
9483
- ClrFocusTrapModule,
9484
9312
  ClrCommonFormsModule], exports: [ClrDay,
9485
9313
  ClrDateContainer,
9486
9314
  ClrDateInput,
@@ -9491,22 +9319,22 @@ ClrDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ver
9491
9319
  ClrDaypicker,
9492
9320
  ClrCalendar] });
9493
9321
  ClrDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatepickerModule, imports: [CommonModule,
9322
+ CdkTrapFocusModule,
9494
9323
  ClrHostWrappingModule,
9495
9324
  ClrConditionalModule,
9496
9325
  ClrPopoverModuleNext,
9497
9326
  ClrIconModule,
9498
- ClrFocusTrapModule,
9499
9327
  ClrCommonFormsModule] });
9500
9328
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatepickerModule, decorators: [{
9501
9329
  type: NgModule,
9502
9330
  args: [{
9503
9331
  imports: [
9504
9332
  CommonModule,
9333
+ CdkTrapFocusModule,
9505
9334
  ClrHostWrappingModule,
9506
9335
  ClrConditionalModule,
9507
9336
  ClrPopoverModuleNext,
9508
9337
  ClrIconModule,
9509
- ClrFocusTrapModule,
9510
9338
  ClrCommonFormsModule,
9511
9339
  ],
9512
9340
  declarations: [CLR_DATEPICKER_DIRECTIVES],
@@ -10536,967 +10364,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
10536
10364
  /*
10537
10365
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10538
10366
  * This software is released under MIT license.
10539
- * The full license information can be found in LICENSE in the root directory of this project.
10540
- */
10541
- const EXPANDABLE_ANIMATION_DIRECTIVES = [ClrExpandableAnimation];
10542
-
10543
- /*
10544
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10545
- * This software is released under MIT license.
10546
- * The full license information can be found in LICENSE in the root directory of this project.
10547
- */
10548
- class ClrExpandableAnimationModule {
10549
- }
10550
- ClrExpandableAnimationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10551
- ClrExpandableAnimationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, declarations: [ClrExpandableAnimation], imports: [CommonModule], exports: [ClrExpandableAnimation] });
10552
- ClrExpandableAnimationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, imports: [CommonModule] });
10553
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, decorators: [{
10554
- type: NgModule,
10555
- args: [{
10556
- imports: [CommonModule],
10557
- declarations: [EXPANDABLE_ANIMATION_DIRECTIVES],
10558
- exports: [EXPANDABLE_ANIMATION_DIRECTIVES],
10559
- }]
10560
- }] });
10561
-
10562
- /*
10563
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10564
- * This software is released under MIT license.
10565
- * The full license information can be found in LICENSE in the root directory of this project.
10566
- */
10567
- var DragEventType;
10568
- (function (DragEventType) {
10569
- DragEventType[DragEventType["DRAG_START"] = 0] = "DRAG_START";
10570
- DragEventType[DragEventType["DRAG_MOVE"] = 1] = "DRAG_MOVE";
10571
- DragEventType[DragEventType["DRAG_END"] = 2] = "DRAG_END";
10572
- DragEventType[DragEventType["DRAG_ENTER"] = 3] = "DRAG_ENTER";
10573
- DragEventType[DragEventType["DRAG_LEAVE"] = 4] = "DRAG_LEAVE";
10574
- DragEventType[DragEventType["DROP"] = 5] = "DROP";
10575
- })(DragEventType || (DragEventType = {}));
10576
-
10577
- /*
10578
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10579
- * This software is released under MIT license.
10580
- * The full license information can be found in LICENSE in the root directory of this project.
10581
- */
10582
- class DragAndDropEventBusService {
10583
- constructor() {
10584
- this.dragStart = new Subject();
10585
- this.dragMove = new Subject();
10586
- this.dragEnd = new Subject();
10587
- this.drop = new Subject();
10588
- }
10589
- get dragStarted() {
10590
- return this.dragStart.asObservable();
10591
- }
10592
- get dragMoved() {
10593
- return this.dragMove.asObservable();
10594
- }
10595
- get dragEnded() {
10596
- return this.dragEnd.asObservable();
10597
- }
10598
- get dropped() {
10599
- return this.drop.asObservable();
10600
- }
10601
- broadcast(event) {
10602
- switch (event.type) {
10603
- case DragEventType.DRAG_START:
10604
- this.dragStart.next(event);
10605
- break;
10606
- case DragEventType.DRAG_MOVE:
10607
- this.dragMove.next(event);
10608
- break;
10609
- case DragEventType.DRAG_END:
10610
- this.dragEnd.next(event);
10611
- break;
10612
- case DragEventType.DROP:
10613
- this.drop.next(event);
10614
- break;
10615
- default:
10616
- break;
10617
- }
10618
- }
10619
- }
10620
- DragAndDropEventBusService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragAndDropEventBusService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10621
- DragAndDropEventBusService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragAndDropEventBusService, providedIn: 'root' });
10622
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragAndDropEventBusService, decorators: [{
10623
- type: Injectable,
10624
- args: [{ providedIn: 'root' }]
10625
- }] });
10626
-
10627
- /*
10628
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10629
- * This software is released under MIT license.
10630
- * The full license information can be found in LICENSE in the root directory of this project.
10631
- */
10632
- class DragEventListenerService {
10633
- constructor(ngZone, renderer, eventBus) {
10634
- this.ngZone = ngZone;
10635
- this.renderer = renderer;
10636
- this.eventBus = eventBus;
10637
- // contains listeners for the starting events such as mousedown and touchstart
10638
- this.listeners = [];
10639
- this.dragStart = new Subject();
10640
- this.dragMove = new Subject();
10641
- this.dragEnd = new Subject();
10642
- this.hasDragStarted = false;
10643
- this.dragStartDelay = 0;
10644
- }
10645
- get dragStarted() {
10646
- return this.dragStart.asObservable();
10647
- }
10648
- get dragMoved() {
10649
- return this.dragMove.asObservable();
10650
- }
10651
- get dragEnded() {
10652
- return this.dragEnd.asObservable();
10653
- }
10654
- get dragStartPosition() {
10655
- return this.initialPosition;
10656
- }
10657
- attachDragListeners(draggableEl) {
10658
- this.draggableEl = draggableEl;
10659
- this.listeners.push(this.customDragEvent(this.draggableEl, 'mousedown', 'mousemove', 'mouseup'));
10660
- this.listeners.push(this.customDragEvent(this.draggableEl, 'touchstart', 'touchmove', 'touchend'));
10661
- }
10662
- detachDragListeners() {
10663
- if (this.listeners) {
10664
- this.listeners.map(event => event());
10665
- }
10666
- // In most cases, once users start dragging with mousedown/touchstart events,
10667
- // they will end dragging at one point with mouseup/touchend.
10668
- // However, there might be a few cases where mousedown/touchstart events get registered,
10669
- // but the draggable element gets removed before user ends dragging.
10670
- // In that case, we need to remove the attached listeners that happened during the mousedown/touchstart events.
10671
- if (this.nestedListeners) {
10672
- this.nestedListeners.map(event => event());
10673
- }
10674
- if (this.checkDragStartBoundaryListener) {
10675
- this.checkDragStartBoundaryListener();
10676
- }
10677
- }
10678
- getNativeEventObject(event) {
10679
- if (Object.prototype.hasOwnProperty.call(event, 'changedTouches')) {
10680
- return event.changedTouches[0];
10681
- }
10682
- else {
10683
- return event;
10684
- }
10685
- }
10686
- customDragEvent(element, startOnEvent, moveOnEvent, endOnEvent) {
10687
- return this.renderer.listen(element, startOnEvent, (startEvent) => {
10688
- // save the initial point to initialPosition
10689
- // this will be used to calculate how far the draggable has been dragged from its initial position
10690
- this.initialPosition = {
10691
- pageX: this.getNativeEventObject(startEvent).pageX,
10692
- pageY: this.getNativeEventObject(startEvent).pageY,
10693
- };
10694
- // Initialize nested listeners' property with a new empty array;
10695
- this.nestedListeners = [];
10696
- // Listen to selectstart/mousemove/touchmove events outside of angular zone.
10697
- this.ngZone.runOutsideAngular(() => {
10698
- // This is needed to disable selection during dragging (especially in EDGE/IE11).
10699
- this.nestedListeners.push(this.renderer.listen('document', 'selectstart', (selectEvent) => {
10700
- selectEvent.preventDefault();
10701
- selectEvent.stopImmediatePropagation();
10702
- }));
10703
- // During the drag start delay, pointer should stay within the boundary.
10704
- this.checkDragStartBoundary(moveOnEvent);
10705
- this.dragStartDelayTimeout = setTimeout(() => {
10706
- if (this.checkDragStartBoundaryListener) {
10707
- this.checkDragStartBoundaryListener();
10708
- }
10709
- this.hasDragStarted = true;
10710
- // Fire "dragstart"
10711
- this.broadcast(startEvent, DragEventType.DRAG_START);
10712
- this.nestedListeners.push(this.renderer.listen('document', moveOnEvent, (moveEvent) => {
10713
- // Event.stopImmediatePropagation() is needed here to prevent nested draggables from getting dragged
10714
- // altogether. We shouldn't use Event.stopPropagation() here as we are listening to the events
10715
- // on the global element level.
10716
- // With Event.stopImmediatePropagation(), it registers the events sent from the inner most draggable
10717
- // first. Then immediately after that, it stops listening to the same type of events on the same
10718
- // element. So this will help us to not register the same events that would come from the parent
10719
- // level draggables eventually.
10720
- moveEvent.stopImmediatePropagation();
10721
- if (this.hasDragStarted) {
10722
- // Fire "dragmove"
10723
- this.broadcast(moveEvent, DragEventType.DRAG_MOVE);
10724
- }
10725
- }));
10726
- }, this.dragStartDelay);
10727
- });
10728
- // Listen to mouseup/touchend events.
10729
- this.nestedListeners.push(this.renderer.listen('document', endOnEvent, (endEvent) => {
10730
- if (this.hasDragStarted) {
10731
- // Fire "dragend" only if dragstart is registered
10732
- this.hasDragStarted = false;
10733
- this.broadcast(endEvent, DragEventType.DRAG_END);
10734
- }
10735
- clearTimeout(this.dragStartDelayTimeout);
10736
- // We must remove the the nested listeners every time drag completes.
10737
- this.nestedListeners.map(event => event());
10738
- // We must remove the event listener from checkDragStartBoundary
10739
- if (this.checkDragStartBoundaryListener) {
10740
- this.checkDragStartBoundaryListener();
10741
- }
10742
- }));
10743
- });
10744
- }
10745
- checkDragStartBoundary(eventType) {
10746
- this.checkDragStartBoundaryListener = this.renderer.listen('document', eventType, (moveEvent) => {
10747
- const deltaX = Math.abs(this.getNativeEventObject(moveEvent).pageX - this.initialPosition.pageX);
10748
- const deltaY = Math.abs(this.getNativeEventObject(moveEvent).pageY - this.initialPosition.pageY);
10749
- // If pointer move delta exceeds horizontal or vertical threshold,
10750
- // we should cancel drag initiation.
10751
- if (deltaX > 1 || deltaY > 1) {
10752
- clearTimeout(this.dragStartDelayTimeout);
10753
- if (this.checkDragStartBoundaryListener) {
10754
- this.checkDragStartBoundaryListener();
10755
- }
10756
- }
10757
- });
10758
- }
10759
- broadcast(event, eventType) {
10760
- const dragEvent = this.generateDragEvent(event, eventType);
10761
- switch (dragEvent.type) {
10762
- case DragEventType.DRAG_START:
10763
- this.dragStart.next(dragEvent);
10764
- break;
10765
- case DragEventType.DRAG_MOVE:
10766
- this.dragMove.next(dragEvent);
10767
- break;
10768
- case DragEventType.DRAG_END:
10769
- this.dragEnd.next(dragEvent);
10770
- break;
10771
- default:
10772
- break;
10773
- }
10774
- // The following properties are set after they are broadcasted to the DraggableGhost component.
10775
- dragEvent.ghostElement = this.ghostElement;
10776
- dragEvent.dropPointPosition = this.dropPointPosition;
10777
- this.eventBus.broadcast(dragEvent);
10778
- }
10779
- generateDragEvent(event, eventType) {
10780
- const nativeEvent = this.getNativeEventObject(event);
10781
- return {
10782
- type: eventType,
10783
- dragPosition: {
10784
- pageX: nativeEvent.pageX,
10785
- pageY: nativeEvent.pageY,
10786
- moveX: nativeEvent.pageX - this.initialPosition.pageX,
10787
- moveY: nativeEvent.pageY - this.initialPosition.pageY,
10788
- },
10789
- group: this.group,
10790
- dragDataTransfer: this.dragDataTransfer,
10791
- ghostElement: this.ghostElement,
10792
- };
10793
- }
10794
- }
10795
- DragEventListenerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragEventListenerService, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }, { token: DragAndDropEventBusService }], target: i0.ɵɵFactoryTarget.Injectable });
10796
- DragEventListenerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragEventListenerService });
10797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragEventListenerService, decorators: [{
10798
- type: Injectable
10799
- }], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.Renderer2 }, { type: DragAndDropEventBusService }]; } });
10800
-
10801
- /*
10802
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10803
- * This software is released under MIT license.
10804
- * The full license information can be found in LICENSE in the root directory of this project.
10805
- */
10806
- // This provider registers the drag handle element.
10807
- // When it registers a element as a drag handle, it attaches that element to the listeners from ClrDragEventListener.
10808
- // Also, it adds the "drag-handle" css class to the registered element through Renderer.
10809
- class DragHandleRegistrarService {
10810
- constructor(dragEventListener, renderer) {
10811
- this.dragEventListener = dragEventListener;
10812
- this.renderer = renderer;
10813
- }
10814
- get defaultHandleEl() {
10815
- return this._defaultHandleEl;
10816
- }
10817
- set defaultHandleEl(el) {
10818
- this._defaultHandleEl = el; // defaultHandleEl will be usually the clrDraggable element.
10819
- // If the customHandleEl has been registered,
10820
- // don't make the defaultHandleEl the drag handle yet until the customHandleEl is unregistered.
10821
- if (!this._customHandleEl) {
10822
- this.makeElementHandle(this._defaultHandleEl);
10823
- }
10824
- }
10825
- makeElementHandle(el) {
10826
- if (this._defaultHandleEl && this._defaultHandleEl !== el) {
10827
- // Before making an element the custom handle element,
10828
- // we should remove the existing drag-handle class from the draggable element.
10829
- this.renderer.removeClass(this._defaultHandleEl, 'drag-handle');
10830
- }
10831
- this.dragEventListener.attachDragListeners(el);
10832
- this.renderer.addClass(el, 'drag-handle');
10833
- }
10834
- get customHandleEl() {
10835
- return this._customHandleEl;
10836
- }
10837
- registerCustomHandle(el) {
10838
- this.dragEventListener.detachDragListeners(); // removes the existing listeners
10839
- this._customHandleEl = el;
10840
- this.makeElementHandle(this._customHandleEl);
10841
- }
10842
- unregisterCustomHandle() {
10843
- this.dragEventListener.detachDragListeners(); // removes the existing listeners
10844
- this.renderer.removeClass(this._customHandleEl, 'drag-handle');
10845
- delete this._customHandleEl;
10846
- // if default handle is set, make that handle
10847
- if (this._defaultHandleEl) {
10848
- this.makeElementHandle(this._defaultHandleEl);
10849
- }
10850
- }
10851
- }
10852
- DragHandleRegistrarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragHandleRegistrarService, deps: [{ token: DragEventListenerService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
10853
- DragHandleRegistrarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragHandleRegistrarService });
10854
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DragHandleRegistrarService, decorators: [{
10855
- type: Injectable
10856
- }], ctorParameters: function () { return [{ type: DragEventListenerService }, { type: i0.Renderer2 }]; } });
10857
-
10858
- /*
10859
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10860
- * This software is released under MIT license.
10861
- * The full license information can be found in LICENSE in the root directory of this project.
10862
- */
10863
- class ClrDragHandle {
10864
- constructor(el, dragHandleRegistrar) {
10865
- this.el = el;
10866
- this.dragHandleRegistrar = dragHandleRegistrar;
10867
- if (!this.dragHandleRegistrar) {
10868
- // ClrDragHandleRegistrar is provided in ClrDraggable so we expect it to be present here
10869
- // as clrDragHandle is required to be used only inside of a clrDraggable directive.
10870
- throw new Error('The clrDragHandle directive can only be used inside of a clrDraggable directive.');
10871
- }
10872
- this.dragHandleRegistrar.registerCustomHandle(this.el.nativeElement);
10873
- }
10874
- ngOnDestroy() {
10875
- this.dragHandleRegistrar.unregisterCustomHandle();
10876
- }
10877
- }
10878
- ClrDragHandle.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDragHandle, deps: [{ token: i0.ElementRef }, { token: DragHandleRegistrarService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
10879
- ClrDragHandle.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrDragHandle, selector: "[clrDragHandle]", host: { properties: { "class.drag-handle": "true" } }, ngImport: i0 });
10880
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDragHandle, decorators: [{
10881
- type: Directive,
10882
- args: [{
10883
- selector: '[clrDragHandle]',
10884
- host: { '[class.drag-handle]': 'true' },
10885
- }]
10886
- }], ctorParameters: function () {
10887
- return [{ type: i0.ElementRef }, { type: DragHandleRegistrarService, decorators: [{
10888
- type: Optional
10889
- }] }];
10890
- } });
10891
-
10892
- /*
10893
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10894
- * This software is released under MIT license.
10895
- * The full license information can be found in LICENSE in the root directory of this project.
10896
- */
10897
- // This service is used to capture the state of clrDraggable element
10898
- // at a certain event and passes it to clrDraggableGhost component.
10899
- class DraggableSnapshotService {
10900
- constructor(domAdapter) {
10901
- this.domAdapter = domAdapter;
10902
- }
10903
- capture(el, event) {
10904
- this.draggableElClientRect = this.domAdapter.clientRect(el);
10905
- this.snapshotDragEvent = event;
10906
- }
10907
- discard() {
10908
- delete this.draggableElClientRect;
10909
- delete this.snapshotDragEvent;
10910
- }
10911
- get hasDraggableState() {
10912
- return !!this.snapshotDragEvent && !!this.draggableElClientRect;
10913
- }
10914
- get clientRect() {
10915
- return this.draggableElClientRect;
10916
- }
10917
- get dragEvent() {
10918
- return this.snapshotDragEvent;
10919
- }
10920
- }
10921
- DraggableSnapshotService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DraggableSnapshotService, deps: [{ token: DomAdapter }], target: i0.ɵɵFactoryTarget.Injectable });
10922
- DraggableSnapshotService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DraggableSnapshotService });
10923
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: DraggableSnapshotService, decorators: [{
10924
- type: Injectable
10925
- }], ctorParameters: function () { return [{ type: DomAdapter }]; } });
10926
-
10927
- /*
10928
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
10929
- * This software is released under MIT license.
10930
- * The full license information can be found in LICENSE in the root directory of this project.
10931
- */
10932
- class ClrDraggableGhost {
10933
- constructor(el, dragEventListener, draggableSnapshot, renderer, ngZone) {
10934
- this.el = el;
10935
- this.dragEventListener = dragEventListener;
10936
- this.draggableSnapshot = draggableSnapshot;
10937
- this.renderer = renderer;
10938
- this.ngZone = ngZone;
10939
- this.subscriptions = [];
10940
- this.leaveAnimConfig = { value: 0, params: { top: '0px', left: '0px' } };
10941
- if (!this.dragEventListener || !this.draggableSnapshot) {
10942
- throw new Error('The clr-draggable-ghost component can only be used inside of a clrDraggable directive.');
10943
- }
10944
- this.draggableGhostEl = this.el.nativeElement;
10945
- // Need to use Renderer2 as it runs outside of NgZone
10946
- this.renderer.addClass(this.draggableGhostEl, 'draggable-ghost');
10947
- // Register the ghost element in DragEventListener to pass in a ClrDragEvent.
10948
- this.dragEventListener.ghostElement = this.draggableGhostEl;
10949
- // Default ghost size gets the size of ClrDraggable element.
10950
- this.setDefaultGhostSize(this.draggableGhostEl);
10951
- const offset = {
10952
- top: this.draggableSnapshot.hasDraggableState
10953
- ? this.draggableSnapshot.dragEvent.dragPosition.pageY - this.draggableSnapshot.clientRect.top
10954
- : 0,
10955
- left: this.draggableSnapshot.hasDraggableState
10956
- ? this.draggableSnapshot.dragEvent.dragPosition.pageX - this.draggableSnapshot.clientRect.left
10957
- : 0,
10958
- };
10959
- let isAnimationConfigured = false;
10960
- this.subscriptions.push(this.dragEventListener.dragMoved.subscribe((event) => {
10961
- // On the first drag move event, we configure the animation as it's dependent on the first drag event.
10962
- if (!isAnimationConfigured) {
10963
- if (this.draggableSnapshot.hasDraggableState) {
10964
- this.animateToOnLeave(`${this.draggableSnapshot.clientRect.top}px`, `${this.draggableSnapshot.clientRect.left}px`);
10965
- }
10966
- else {
10967
- this.animateToOnLeave(`${this.dragEventListener.dragStartPosition.pageY}px`, `${this.dragEventListener.dragStartPosition.pageY}px`);
10968
- }
10969
- isAnimationConfigured = true;
10970
- }
10971
- // Position the draggable ghost.
10972
- const topLeftPosition = this.findTopLeftPosition(event.dragPosition, offset);
10973
- this.setPositionStyle(this.draggableGhostEl, topLeftPosition.pageX, topLeftPosition.pageY);
10974
- this.dragEventListener.dropPointPosition = this.findDropPointPosition(topLeftPosition);
10975
- }));
10976
- }
10977
- setDefaultGhostSize(el) {
10978
- if (this.draggableSnapshot.hasDraggableState) {
10979
- this.setSizeStyle(el, this.draggableSnapshot.clientRect.width, this.draggableSnapshot.clientRect.height);
10980
- }
10981
- }
10982
- animateToOnLeave(top, left) {
10983
- this.ngZone.run(() => {
10984
- this.leaveAnimConfig = { value: 0, params: { top: top, left: left } };
10985
- });
10986
- }
10987
- findTopLeftPosition(dragPosition, offset) {
10988
- return { pageX: dragPosition.pageX - offset.left, pageY: dragPosition.pageY - offset.top };
10989
- }
10990
- findDropPointPosition(topLeftPosition) {
10991
- if (this.draggableSnapshot.hasDraggableState) {
10992
- return {
10993
- pageX: topLeftPosition.pageX + this.draggableSnapshot.clientRect.width / 2,
10994
- pageY: topLeftPosition.pageY + this.draggableSnapshot.clientRect.height / 2,
10995
- };
10996
- }
10997
- else {
10998
- return topLeftPosition;
10999
- }
11000
- }
11001
- setSizeStyle(el, width, height) {
11002
- this.renderer.setStyle(el, 'width', `${width}px`);
11003
- this.renderer.setStyle(el, 'height', `${height}px`);
11004
- }
11005
- setPositionStyle(el, left, top) {
11006
- this.renderer.setStyle(el, 'left', `${left}px`);
11007
- this.renderer.setStyle(el, 'top', `${top}px`);
11008
- this.renderer.setStyle(el, 'visibility', 'visible');
11009
- }
11010
- ngOnDestroy() {
11011
- this.subscriptions.forEach((sub) => sub.unsubscribe());
11012
- }
11013
- }
11014
- ClrDraggableGhost.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDraggableGhost, deps: [{ token: i0.ElementRef }, { token: DragEventListenerService, optional: true }, { token: DraggableSnapshotService, optional: true }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
11015
- ClrDraggableGhost.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDraggableGhost, selector: "clr-draggable-ghost", host: { properties: { "@leaveAnimation": "this.leaveAnimConfig" } }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, animations: [
11016
- trigger('leaveAnimation', [
11017
- transition(':leave', [
11018
- style({ left: '*', top: '*' }),
11019
- animate('0.2s ease-in-out', style({ top: '{{top}}', left: '{{left}}' })),
11020
- ]),
11021
- ]),
11022
- ] });
11023
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDraggableGhost, decorators: [{
11024
- type: Component,
11025
- args: [{
11026
- selector: 'clr-draggable-ghost',
11027
- template: `<ng-content></ng-content>`,
11028
- animations: [
11029
- trigger('leaveAnimation', [
11030
- transition(':leave', [
11031
- style({ left: '*', top: '*' }),
11032
- animate('0.2s ease-in-out', style({ top: '{{top}}', left: '{{left}}' })),
11033
- ]),
11034
- ]),
11035
- ],
11036
- }]
11037
- }], ctorParameters: function () {
11038
- return [{ type: i0.ElementRef }, { type: DragEventListenerService, decorators: [{
11039
- type: Optional
11040
- }] }, { type: DraggableSnapshotService, decorators: [{
11041
- type: Optional
11042
- }] }, { type: i0.Renderer2 }, { type: i0.NgZone }];
11043
- }, propDecorators: { leaveAnimConfig: [{
11044
- type: HostBinding,
11045
- args: ['@leaveAnimation']
11046
- }] } });
11047
-
11048
- /*
11049
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
11050
- * This software is released under MIT license.
11051
- * The full license information can be found in LICENSE in the root directory of this project.
11052
- */
11053
- // This class is used to convert an internal event
11054
- // to an external event to be emitted.
11055
- class ClrDragEvent {
11056
- constructor(dragEvent) {
11057
- this.dragPosition = dragEvent.dragPosition;
11058
- this.group = dragEvent.group;
11059
- this.dragDataTransfer = dragEvent.dragDataTransfer;
11060
- this.dropPointPosition = dragEvent.dropPointPosition;
11061
- }
11062
- }
11063
-
11064
- /*
11065
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
11066
- * This software is released under MIT license.
11067
- * The full license information can be found in LICENSE in the root directory of this project.
11068
- */
11069
- // This structural directive will be used mainly together with `clr-draggable-ghost` directive inside of clrDraggable
11070
- // directive. The directive is responsible for instantiating `clr-draggable-ghost` directive only during dragging so
11071
- // that Angular Change Detection is prevented from running if a component or directive is placed inside of the
11072
- // `clr-draggable-ghost` directive.
11073
- class ClrIfDragged {
11074
- constructor(template, container, dragEventListener) {
11075
- this.template = template;
11076
- this.container = container;
11077
- this.dragEventListener = dragEventListener;
11078
- this.subscriptions = [];
11079
- if (!this.dragEventListener || !this.container) {
11080
- throw new Error('The *clrIfDragged directive can only be used inside of a clrDraggable directive.');
11081
- }
11082
- this.subscriptions.push(this.dragEventListener.dragStarted.subscribe(() => {
11083
- this.container.createEmbeddedView(this.template);
11084
- }));
11085
- this.subscriptions.push(this.dragEventListener.dragEnded.subscribe(() => {
11086
- this.container.clear();
11087
- }));
11088
- }
11089
- ngOnDestroy() {
11090
- this.subscriptions.forEach((sub) => sub.unsubscribe());
11091
- }
11092
- }
11093
- ClrIfDragged.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrIfDragged, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef, optional: true, skipSelf: true }, { token: DragEventListenerService, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
11094
- ClrIfDragged.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrIfDragged, selector: "[clrIfDragged]", ngImport: i0 });
11095
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrIfDragged, decorators: [{
11096
- type: Directive,
11097
- args: [{
11098
- selector: '[clrIfDragged]',
11099
- }]
11100
- }], ctorParameters: function () {
11101
- return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef, decorators: [{
11102
- type: Optional
11103
- }, {
11104
- type: SkipSelf
11105
- }] }, { type: DragEventListenerService, decorators: [{
11106
- type: Optional
11107
- }] }];
11108
- } });
11109
-
11110
- /*
11111
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
11112
- * This software is released under MIT license.
11113
- * The full license information can be found in LICENSE in the root directory of this project.
11114
- */
11115
- // This service class adds and removes the "in-drag" class to the document body element
11116
- // through its public enter() and exit() methods.
11117
- class GlobalDragModeService {
11118
- constructor(renderer) {
11119
- this.renderer = renderer;
11120
- }
11121
- enter() {
11122
- this.renderer.addClass(document.body, 'in-drag');
11123
- }
11124
- exit() {
11125
- this.renderer.removeClass(document.body, 'in-drag');
11126
- }
11127
- }
11128
- GlobalDragModeService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GlobalDragModeService, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Injectable });
11129
- GlobalDragModeService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GlobalDragModeService });
11130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: GlobalDragModeService, decorators: [{
11131
- type: Injectable
11132
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; } });
11133
-
11134
- /*
11135
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
11136
- * This software is released under MIT license.
11137
- * The full license information can be found in LICENSE in the root directory of this project.
11138
- */
11139
- class ClrDraggable {
11140
- constructor(el, dragEventListener, dragHandleRegistrar, viewContainerRef, cfr, injector, draggableSnapshot, globalDragMode) {
11141
- this.el = el;
11142
- this.dragEventListener = dragEventListener;
11143
- this.dragHandleRegistrar = dragHandleRegistrar;
11144
- this.viewContainerRef = viewContainerRef;
11145
- this.cfr = cfr;
11146
- this.injector = injector;
11147
- this.draggableSnapshot = draggableSnapshot;
11148
- this.globalDragMode = globalDragMode;
11149
- this.subscriptions = [];
11150
- this.dragOn = false;
11151
- this.dragStartEmitter = new EventEmitter();
11152
- this.dragMoveEmitter = new EventEmitter();
11153
- this.dragEndEmitter = new EventEmitter();
11154
- this.draggableEl = this.el.nativeElement;
11155
- this.componentFactory = this.cfr.resolveComponentFactory(ClrDraggableGhost);
11156
- }
11157
- set dataTransfer(value) {
11158
- this.dragEventListener.dragDataTransfer = value;
11159
- }
11160
- set group(value) {
11161
- this.dragEventListener.group = value;
11162
- }
11163
- set dragStartDelay(value) {
11164
- if (typeof value === 'number') {
11165
- this.dragEventListener.dragStartDelay = value;
11166
- }
11167
- else if (typeof value === 'string') {
11168
- this.dragEventListener.dragStartDelay = parseInt(value, 10) || 0;
11169
- }
11170
- }
11171
- createDefaultGhost(event) {
11172
- this.draggableSnapshot.capture(this.draggableEl, event);
11173
- // NOTE: The default ghost element will appear
11174
- // next to the clrDraggable in the DOM as a sibling element.
11175
- this.viewContainerRef.createComponent(this.componentFactory, 0, this.injector, [
11176
- [this.draggableEl.cloneNode(true)],
11177
- ]);
11178
- }
11179
- destroyDefaultGhost() {
11180
- this.viewContainerRef.clear();
11181
- this.draggableSnapshot.discard();
11182
- }
11183
- ngAfterContentInit() {
11184
- this.dragHandleRegistrar.defaultHandleEl = this.draggableEl;
11185
- this.subscriptions.push(this.dragEventListener.dragStarted.subscribe((event) => {
11186
- this.globalDragMode.enter();
11187
- this.dragOn = true;
11188
- if (!this.customGhost) {
11189
- this.createDefaultGhost(event);
11190
- }
11191
- this.dragStartEmitter.emit(new ClrDragEvent(event));
11192
- }));
11193
- this.subscriptions.push(this.dragEventListener.dragMoved.subscribe((event) => {
11194
- this.dragMoveEmitter.emit(new ClrDragEvent(event));
11195
- }));
11196
- this.subscriptions.push(this.dragEventListener.dragEnded.subscribe((event) => {
11197
- this.globalDragMode.exit();
11198
- this.dragOn = false;
11199
- if (!this.customGhost) {
11200
- this.destroyDefaultGhost();
11201
- }
11202
- this.dragEndEmitter.emit(new ClrDragEvent(event));
11203
- }));
11204
- }
11205
- ngOnDestroy() {
11206
- this.subscriptions.forEach((sub) => sub.unsubscribe());
11207
- this.dragEventListener.detachDragListeners();
11208
- }
11209
- }
11210
- ClrDraggable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDraggable, deps: [{ token: i0.ElementRef }, { token: DragEventListenerService }, { token: DragHandleRegistrarService }, { token: i0.ViewContainerRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: DraggableSnapshotService }, { token: GlobalDragModeService }], target: i0.ɵɵFactoryTarget.Directive });
11211
- ClrDraggable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrDraggable, selector: "[clrDraggable]", inputs: { dataTransfer: ["clrDraggable", "dataTransfer"], group: ["clrGroup", "group"], dragStartDelay: ["clrDragStartDelay", "dragStartDelay"] }, outputs: { dragStartEmitter: "clrDragStart", dragMoveEmitter: "clrDragMove", dragEndEmitter: "clrDragEnd" }, host: { properties: { "class.draggable": "true", "class.being-dragged": "dragOn" } }, providers: [
11212
- DragEventListenerService,
11213
- DragHandleRegistrarService,
11214
- DraggableSnapshotService,
11215
- GlobalDragModeService,
11216
- DomAdapter,
11217
- ], queries: [{ propertyName: "customGhost", first: true, predicate: ClrIfDragged, descendants: true }], ngImport: i0 });
11218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDraggable, decorators: [{
11219
- type: Directive,
11220
- args: [{
11221
- selector: '[clrDraggable]',
11222
- providers: [
11223
- DragEventListenerService,
11224
- DragHandleRegistrarService,
11225
- DraggableSnapshotService,
11226
- GlobalDragModeService,
11227
- DomAdapter,
11228
- ],
11229
- host: { '[class.draggable]': 'true', '[class.being-dragged]': 'dragOn' },
11230
- }]
11231
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DragEventListenerService }, { type: DragHandleRegistrarService }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: DraggableSnapshotService }, { type: GlobalDragModeService }]; }, propDecorators: { customGhost: [{
11232
- type: ContentChild,
11233
- args: [ClrIfDragged]
11234
- }], dataTransfer: [{
11235
- type: Input,
11236
- args: ['clrDraggable']
11237
- }], group: [{
11238
- type: Input,
11239
- args: ['clrGroup']
11240
- }], dragStartDelay: [{
11241
- type: Input,
11242
- args: ['clrDragStartDelay']
11243
- }], dragStartEmitter: [{
11244
- type: Output,
11245
- args: ['clrDragStart']
11246
- }], dragMoveEmitter: [{
11247
- type: Output,
11248
- args: ['clrDragMove']
11249
- }], dragEndEmitter: [{
11250
- type: Output,
11251
- args: ['clrDragEnd']
11252
- }] } });
10367
+ * The full license information can be found in LICENSE in the root directory of this project.
10368
+ */
10369
+ const EXPANDABLE_ANIMATION_DIRECTIVES = [ClrExpandableAnimation];
11253
10370
 
11254
10371
  /*
11255
10372
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
11256
10373
  * This software is released under MIT license.
11257
10374
  * The full license information can be found in LICENSE in the root directory of this project.
11258
10375
  */
11259
- class ClrDroppable {
11260
- constructor(el, eventBus, domAdapter, renderer) {
11261
- this.el = el;
11262
- this.eventBus = eventBus;
11263
- this.domAdapter = domAdapter;
11264
- this.renderer = renderer;
11265
- this.isDraggableMatch = false;
11266
- this._isDraggableOver = false;
11267
- this._dropTolerance = { top: 0, right: 0, bottom: 0, left: 0 };
11268
- this.dragStartEmitter = new EventEmitter();
11269
- this.dragMoveEmitter = new EventEmitter();
11270
- this.dragEndEmitter = new EventEmitter();
11271
- this.dragLeaveEmitter = new EventEmitter();
11272
- this.dragEnterEmitter = new EventEmitter();
11273
- this.dropEmitter = new EventEmitter();
11274
- this.droppableEl = this.el.nativeElement;
11275
- }
11276
- set isDraggableOver(value) {
11277
- // We need to add/remove this draggable-over class via Renderer2
11278
- // because isDraggableOver is set outside of NgZone.
11279
- if (value) {
11280
- this.renderer.addClass(this.droppableEl, 'draggable-over');
11281
- }
11282
- else {
11283
- this.renderer.removeClass(this.droppableEl, 'draggable-over');
11284
- }
11285
- this._isDraggableOver = value;
11286
- }
11287
- set group(value) {
11288
- this._group = value;
11289
- }
11290
- dropToleranceGenerator(top = 0, right = top, bottom = top, left = right) {
11291
- return { top, right, bottom, left };
11292
- }
11293
- set dropTolerance(value) {
11294
- // If user provides an object here and wants to manipulate/update properties individually,
11295
- // the object must be immutable as we generate new object based user's given object.
11296
- if (typeof value === 'number') {
11297
- this._dropTolerance = this.dropToleranceGenerator(value);
11298
- }
11299
- else if (typeof value === 'string') {
11300
- const toleranceValues = value
11301
- .trim()
11302
- .split(/\s+/)
11303
- .map(tolerance => parseInt(tolerance, 10));
11304
- this._dropTolerance = this.dropToleranceGenerator(...toleranceValues);
11305
- }
11306
- else if (value) {
11307
- // The value could be passed in as {left: 20, top: 30 }
11308
- // In this case, the rest of the direction properties should be 0.
11309
- // That's why we initialize properties with 0 first, then override with user's given value.
11310
- this._dropTolerance = Object.assign(Object.assign({}, this.dropToleranceGenerator(0)), value);
11311
- }
11312
- }
11313
- unsubscribeFrom(subscription) {
11314
- if (subscription) {
11315
- subscription.unsubscribe();
11316
- }
11317
- }
11318
- checkGroupMatch(draggableGroup) {
11319
- // Both Draggable and Droppable have clrGroup input.
11320
- // The clrGroup input can be both a string key or array of string keys in Draggable and Droppable.
11321
- // It's not match if Draggable has no defined value assigned to clrGroup, but Droppable has a defined clrGroup.
11322
- if (!draggableGroup && this._group) {
11323
- return false;
11324
- }
11325
- // The same is true the other way round.
11326
- if (!this._group && draggableGroup) {
11327
- return false;
11328
- }
11329
- // It's match if both Draggable and Droppable have no assigned value for clrGroup.
11330
- if (!this._group && !draggableGroup) {
11331
- return true;
11332
- }
11333
- // It's match if both Draggable and Droppable have simple string keys that are matching.
11334
- // It's match if Draggable's simple clrGroup key is matching with one of the clrGroup keys of Droppable. The
11335
- // same is true the other way round.
11336
- // it's match if one of the clrGroup keys of Droppable is matching with one of the clrGroup keys of Draggable.
11337
- if (typeof draggableGroup === 'string') {
11338
- if (typeof this._group === 'string') {
11339
- return this._group === draggableGroup;
11340
- }
11341
- else {
11342
- return this._group.indexOf(draggableGroup) > -1;
11343
- }
11344
- }
11345
- else {
11346
- if (typeof this._group === 'string') {
11347
- return draggableGroup.indexOf(this._group) > -1;
11348
- }
11349
- else {
11350
- return this._group.some(groupKey => draggableGroup.indexOf(groupKey) > -1);
11351
- }
11352
- }
11353
- }
11354
- isInDropArea(point) {
11355
- if (!point) {
11356
- return false;
11357
- }
11358
- if (!this.clientRect) {
11359
- this.clientRect = this.domAdapter.clientRect(this.droppableEl);
11360
- }
11361
- if (point.pageX >= this.clientRect.left - this._dropTolerance.left &&
11362
- point.pageX <= this.clientRect.right + this._dropTolerance.right &&
11363
- point.pageY >= this.clientRect.top - this._dropTolerance.top &&
11364
- point.pageY <= this.clientRect.bottom + this._dropTolerance.bottom) {
11365
- return true;
11366
- }
11367
- else {
11368
- return false;
11369
- }
11370
- }
11371
- onDragStart(dragStartEvent) {
11372
- // Check draggable and droppable have a matching group key.
11373
- this.isDraggableMatch = this.checkGroupMatch(dragStartEvent.group);
11374
- // Subscribe to dragMoved and dragEnded only if draggable and droppable have a matching group key.
11375
- if (this.isDraggableMatch) {
11376
- this.dragStartEmitter.emit(new ClrDragEvent(dragStartEvent));
11377
- this.dragMoveSubscription = this.eventBus.dragMoved.subscribe((dragMoveEvent) => {
11378
- this.onDragMove(dragMoveEvent);
11379
- });
11380
- this.dragEndSubscription = this.eventBus.dragEnded.subscribe((dragEndEvent) => {
11381
- this.onDragEnd(dragEndEvent);
11382
- });
11383
- }
11384
- }
11385
- onDragMove(dragMoveEvent) {
11386
- const isInDropArea = this.isInDropArea(dragMoveEvent.dropPointPosition);
11387
- if (!this._isDraggableOver && isInDropArea) {
11388
- this.isDraggableOver = true;
11389
- const dragEnterEvent = Object.assign(Object.assign({}, dragMoveEvent), { type: DragEventType.DRAG_ENTER });
11390
- this.eventBus.broadcast(dragEnterEvent);
11391
- this.dragEnterEmitter.emit(new ClrDragEvent(dragEnterEvent));
11392
- }
11393
- else if (this._isDraggableOver && !isInDropArea) {
11394
- this.isDraggableOver = false;
11395
- const dragLeaveEvent = Object.assign(Object.assign({}, dragMoveEvent), { type: DragEventType.DRAG_LEAVE });
11396
- this.eventBus.broadcast(dragLeaveEvent);
11397
- this.dragLeaveEmitter.emit(new ClrDragEvent(dragLeaveEvent));
11398
- }
11399
- this.dragMoveEmitter.emit(new ClrDragEvent(dragMoveEvent));
11400
- }
11401
- onDragEnd(dragEndEvent) {
11402
- if (this._isDraggableOver) {
11403
- if (dragEndEvent.ghostElement) {
11404
- // By this point, the draggable ghost component is destroyed,
11405
- // but the element would be active until its animation completes.
11406
- // As such, once the ghost is dropped over, we will give it "dropped" class.
11407
- // This process cannot be done in the ghost component
11408
- // because any subscription to the drop event is ineffective or invalid
11409
- // as the component had been already destroyed.
11410
- this.renderer.addClass(dragEndEvent.ghostElement, 'dropped');
11411
- }
11412
- const dropEvent = Object.assign(Object.assign({}, dragEndEvent), { type: DragEventType.DROP });
11413
- this.eventBus.broadcast(dropEvent);
11414
- this.dropEmitter.emit(new ClrDragEvent(dropEvent));
11415
- this.isDraggableOver = false;
11416
- }
11417
- this.dragEndEmitter.emit(new ClrDragEvent(dragEndEvent));
11418
- this.unsubscribeFrom(this.dragMoveSubscription);
11419
- this.unsubscribeFrom(this.dragEndSubscription);
11420
- this.isDraggableMatch = false;
11421
- delete this.clientRect;
11422
- }
11423
- ngOnInit() {
11424
- this.dragStartSubscription = this.eventBus.dragStarted.subscribe((dragStartEvent) => {
11425
- this.onDragStart(dragStartEvent);
11426
- });
11427
- }
11428
- ngOnDestroy() {
11429
- this.unsubscribeFrom(this.dragStartSubscription);
11430
- this.unsubscribeFrom(this.dragMoveSubscription);
11431
- this.unsubscribeFrom(this.dragEndSubscription);
11432
- }
10376
+ class ClrExpandableAnimationModule {
11433
10377
  }
11434
- ClrDroppable.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDroppable, deps: [{ token: i0.ElementRef }, { token: DragAndDropEventBusService }, { token: DomAdapter }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
11435
- ClrDroppable.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrDroppable, selector: "[clrDroppable]", inputs: { group: ["clrGroup", "group"], dropTolerance: ["clrDropTolerance", "dropTolerance"] }, outputs: { dragStartEmitter: "clrDragStart", dragMoveEmitter: "clrDragMove", dragEndEmitter: "clrDragEnd", dragLeaveEmitter: "clrDragLeave", dragEnterEmitter: "clrDragEnter", dropEmitter: "clrDrop" }, host: { properties: { "class.droppable": "true", "class.draggable-match": "isDraggableMatch" } }, providers: [DomAdapter], ngImport: i0 });
11436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDroppable, decorators: [{
11437
- type: Directive,
10378
+ ClrExpandableAnimationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10379
+ ClrExpandableAnimationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, declarations: [ClrExpandableAnimation], imports: [CommonModule], exports: [ClrExpandableAnimation] });
10380
+ ClrExpandableAnimationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, imports: [CommonModule] });
10381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrExpandableAnimationModule, decorators: [{
10382
+ type: NgModule,
11438
10383
  args: [{
11439
- selector: '[clrDroppable]',
11440
- providers: [DomAdapter],
11441
- host: { '[class.droppable]': 'true', '[class.draggable-match]': 'isDraggableMatch' },
10384
+ imports: [CommonModule],
10385
+ declarations: [EXPANDABLE_ANIMATION_DIRECTIVES],
10386
+ exports: [EXPANDABLE_ANIMATION_DIRECTIVES],
11442
10387
  }]
11443
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: DragAndDropEventBusService }, { type: DomAdapter }, { type: i0.Renderer2 }]; }, propDecorators: { group: [{
11444
- type: Input,
11445
- args: ['clrGroup']
11446
- }], dropTolerance: [{
11447
- type: Input,
11448
- args: ['clrDropTolerance']
11449
- }], dragStartEmitter: [{
11450
- type: Output,
11451
- args: ['clrDragStart']
11452
- }], dragMoveEmitter: [{
11453
- type: Output,
11454
- args: ['clrDragMove']
11455
- }], dragEndEmitter: [{
11456
- type: Output,
11457
- args: ['clrDragEnd']
11458
- }], dragLeaveEmitter: [{
11459
- type: Output,
11460
- args: ['clrDragLeave']
11461
- }], dragEnterEmitter: [{
11462
- type: Output,
11463
- args: ['clrDragEnter']
11464
- }], dropEmitter: [{
11465
- type: Output,
11466
- args: ['clrDrop']
11467
- }] } });
10388
+ }] });
11468
10389
 
11469
10390
  /*
11470
10391
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
11471
10392
  * This software is released under MIT license.
11472
10393
  * The full license information can be found in LICENSE in the root directory of this project.
11473
10394
  */
11474
- const CLR_DRAG_AND_DROP_DIRECTIVES = [
11475
- ClrDraggable,
11476
- ClrDroppable,
11477
- ClrIfDragged,
11478
- ClrDragHandle,
11479
- ClrDraggableGhost,
11480
- ];
11481
- class ClrDragAndDropModule {
11482
- }
11483
- ClrDragAndDropModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDragAndDropModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
11484
- ClrDragAndDropModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrDragAndDropModule, declarations: [ClrDraggable,
11485
- ClrDroppable,
11486
- ClrIfDragged,
11487
- ClrDragHandle,
11488
- ClrDraggableGhost], imports: [CommonModule], exports: [ClrDraggable,
11489
- ClrDroppable,
11490
- ClrIfDragged,
11491
- ClrDragHandle,
11492
- ClrDraggableGhost] });
11493
- ClrDragAndDropModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDragAndDropModule, imports: [CommonModule] });
11494
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDragAndDropModule, decorators: [{
10395
+ /**
10396
+ * This is just a copy of CdkDrag so it can be used independent of the rest of the CdkDragDropModule.
10397
+ */
10398
+ class CdkDragModule_CdkDrag extends CdkDrag {
10399
+ }
10400
+ CdkDragModule_CdkDrag.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkDragModule_CdkDrag, deps: null, target: i0.ɵɵFactoryTarget.Directive });
10401
+ CdkDragModule_CdkDrag.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: CdkDragModule_CdkDrag, selector: "[cdkDrag]", usesInheritance: true, ngImport: i0 });
10402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkDragModule_CdkDrag, decorators: [{
10403
+ type: Directive,
10404
+ args: [{
10405
+ selector: '[cdkDrag]',
10406
+ }]
10407
+ }] });
10408
+ /**
10409
+ * This module allows us to avoid importing all of CdkDragDropModule which results in a smaller application bundle.
10410
+ */
10411
+ class CdkDragModule {
10412
+ }
10413
+ CdkDragModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkDragModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
10414
+ CdkDragModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: CdkDragModule, declarations: [CdkDragModule_CdkDrag], exports: [CdkDragModule_CdkDrag] });
10415
+ CdkDragModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkDragModule });
10416
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: CdkDragModule, decorators: [{
11495
10417
  type: NgModule,
11496
10418
  args: [{
11497
- imports: [CommonModule],
11498
- declarations: [CLR_DRAG_AND_DROP_DIRECTIVES],
11499
- exports: [CLR_DRAG_AND_DROP_DIRECTIVES],
10419
+ declarations: [CdkDragModule_CdkDrag],
10420
+ exports: [CdkDragModule_CdkDrag],
11500
10421
  }]
11501
10422
  }] });
11502
10423
 
@@ -12156,7 +11077,7 @@ ClrDatagridFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
12156
11077
  <div
12157
11078
  class="datagrid-filter"
12158
11079
  [id]="popoverId"
12159
- clrFocusTrap
11080
+ cdkTrapFocus
12160
11081
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
12161
11082
  role="dialog"
12162
11083
  [attr.aria-label]="commonStrings.keys.datagridFilterDialogAriaLabel"
@@ -12169,7 +11090,7 @@ ClrDatagridFilter.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
12169
11090
 
12170
11091
  <ng-content></ng-content>
12171
11092
  </div>
12172
- `, isInline: true, dependencies: [{ kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverCloseButton, selector: "[clrPopoverCloseButton]", outputs: ["clrPopoverOnCloseChange"] }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "directive", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }] });
11093
+ `, isInline: true, dependencies: [{ kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverCloseButton, selector: "[clrPopoverCloseButton]", outputs: ["clrPopoverOnCloseChange"] }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }] });
12173
11094
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridFilter, decorators: [{
12174
11095
  type: Component,
12175
11096
  args: [{
@@ -12199,7 +11120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
12199
11120
  <div
12200
11121
  class="datagrid-filter"
12201
11122
  [id]="popoverId"
12202
- clrFocusTrap
11123
+ cdkTrapFocus
12203
11124
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
12204
11125
  role="dialog"
12205
11126
  [attr.aria-label]="commonStrings.keys.datagridFilterDialogAriaLabel"
@@ -13362,8 +12283,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
13362
12283
  // Default resize length on each keyboard move event
13363
12284
  const KEYBOARD_RESIZE_LENGTH = 12;
13364
12285
  class ClrDatagridColumnSeparator {
13365
- // Every column draggable separator should have its own unique ID
13366
- // in order to not conflict with other draggables/droppables.
13367
12286
  constructor(columnResizerService, renderer, ngZone, tableSizeService, commonString, document) {
13368
12287
  this.columnResizerService = columnResizerService;
13369
12288
  this.renderer = renderer;
@@ -13411,6 +12330,7 @@ class ClrDatagridColumnSeparator {
13411
12330
  this.columnResizerService.endResize();
13412
12331
  this.renderer.setStyle(this.resizeTrackerEl, 'display', 'none');
13413
12332
  this.renderer.setStyle(this.resizeTrackerEl, 'transform', `translateX(0px)`);
12333
+ this.renderer.setStyle(this.columnHandleEl, 'transform', `translateX(0px)`);
13414
12334
  this.renderer.setStyle(this.document.body, 'cursor', 'auto');
13415
12335
  }
13416
12336
  showTrackerOnFirstKeyDown(event) {
@@ -13422,9 +12342,11 @@ class ClrDatagridColumnSeparator {
13422
12342
  }
13423
12343
  moveTrackerOnKeyDown(event) {
13424
12344
  if (this.isArrowLeftKeyEvent(event)) {
12345
+ event.stopPropagation();
13425
12346
  this.moveTracker(this.columnResizerService.resizedBy - KEYBOARD_RESIZE_LENGTH);
13426
12347
  }
13427
12348
  else if (this.isArrowRightKeyEvent(event)) {
12349
+ event.stopPropagation();
13428
12350
  this.moveTracker(this.columnResizerService.resizedBy + KEYBOARD_RESIZE_LENGTH);
13429
12351
  }
13430
12352
  }
@@ -13464,18 +12386,18 @@ ClrDatagridColumnSeparator.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0
13464
12386
  class="datagrid-column-handle"
13465
12387
  [attr.aria-label]="commonString.keys.columnSeparatorAriaLabel"
13466
12388
  [attr.aria-describedby]="descriptionId"
13467
- clrDraggable
13468
- [clrGroup]="columnSeparatorId"
13469
- (clrDragStart)="showTracker()"
13470
- (clrDragMove)="moveTracker($event.dragPosition.moveX)"
13471
- (clrDragEnd)="hideTracker()"
12389
+ cdkDrag
12390
+ cdkDragLockAxis="x"
12391
+ (cdkDragStarted)="showTracker()"
12392
+ (cdkDragMoved)="moveTracker($event.distance.x)"
12393
+ (cdkDragEnded)="hideTracker(); $event.source._dragRef.reset()"
13472
12394
  #columnHandle
13473
12395
  ></button>
13474
12396
  <span class="clr-sr-only" [attr.id]="descriptionId">
13475
12397
  {{ commonString.keys.columnSeparatorDescription }}
13476
12398
  </span>
13477
12399
  <div class="datagrid-column-resize-tracker" #resizeTracker></div>
13478
- `, isInline: true, dependencies: [{ kind: "directive", type: ClrDraggable, selector: "[clrDraggable]", inputs: ["clrDraggable", "clrGroup", "clrDragStartDelay"], outputs: ["clrDragStart", "clrDragMove", "clrDragEnd"] }] });
12400
+ `, isInline: true, dependencies: [{ kind: "directive", type: CdkDragModule_CdkDrag, selector: "[cdkDrag]" }] });
13479
12401
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridColumnSeparator, decorators: [{
13480
12402
  type: Component,
13481
12403
  args: [{
@@ -13486,11 +12408,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
13486
12408
  class="datagrid-column-handle"
13487
12409
  [attr.aria-label]="commonString.keys.columnSeparatorAriaLabel"
13488
12410
  [attr.aria-describedby]="descriptionId"
13489
- clrDraggable
13490
- [clrGroup]="columnSeparatorId"
13491
- (clrDragStart)="showTracker()"
13492
- (clrDragMove)="moveTracker($event.dragPosition.moveX)"
13493
- (clrDragEnd)="hideTracker()"
12411
+ cdkDrag
12412
+ cdkDragLockAxis="x"
12413
+ (cdkDragStarted)="showTracker()"
12414
+ (cdkDragMoved)="moveTracker($event.distance.x)"
12415
+ (cdkDragEnded)="hideTracker(); $event.source._dragRef.reset()"
13494
12416
  #columnHandle
13495
12417
  ></button>
13496
12418
  <span class="clr-sr-only" [attr.id]="descriptionId">
@@ -13539,18 +12461,6 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
13539
12461
  * via the [clrDgColType] input by setting it to 'string' or 'number'.
13540
12462
  */
13541
12463
  this._colType = 'string';
13542
- // deprecated: to be removed - START
13543
- /**
13544
- * Indicates if the column is currently sorted
13545
- *
13546
- * @deprecated This will be removed soon, in favor of the sortOrder mechanism
13547
- */
13548
- this._sorted = false;
13549
- /**
13550
- * @deprecated This will be removed soon, in favor of the sortOrder mechanism
13551
- */
13552
- this.sortedChange = new EventEmitter();
13553
- // deprecated: to be removed - END
13554
12464
  /**
13555
12465
  * Indicates how the column is currently sorted
13556
12466
  */
@@ -13586,16 +12496,8 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
13586
12496
  if (this.sortOrder !== ClrDatagridSortOrder.UNSORTED && sort.comparator !== this._sortBy) {
13587
12497
  this._sortOrder = ClrDatagridSortOrder.UNSORTED;
13588
12498
  this.sortOrderChange.emit(this._sortOrder);
13589
- // removes the sortIcon when column becomes unsorted
13590
- this.sortIcon = null;
13591
12499
  this._sortDirection = null;
13592
12500
  }
13593
- // deprecated: to be removed - START
13594
- if (this.sorted && sort.comparator !== this._sortBy) {
13595
- this._sorted = false;
13596
- this.sortedChange.emit(false);
13597
- }
13598
- // deprecated: to be removed - END
13599
12501
  });
13600
12502
  }
13601
12503
  get colType() {
@@ -13672,21 +12574,6 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
13672
12574
  get sortable() {
13673
12575
  return !!this._sortBy;
13674
12576
  }
13675
- get sorted() {
13676
- return this._sorted;
13677
- }
13678
- /**
13679
- * @deprecated This will be removed soon, in favor of the sortOrder mechanism
13680
- */
13681
- set sorted(value) {
13682
- if (!value && this.sorted) {
13683
- this._sorted = false;
13684
- this._sort.clear();
13685
- }
13686
- else if (value && !this.sorted) {
13687
- this.sort();
13688
- }
13689
- }
13690
12577
  get sortOrder() {
13691
12578
  return this._sortOrder;
13692
12579
  }
@@ -13738,12 +12625,7 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
13738
12625
  this._sortOrder = this._sort.reverse ? ClrDatagridSortOrder.DESC : ClrDatagridSortOrder.ASC;
13739
12626
  // Sets the correct icon for current sort order
13740
12627
  this._sortDirection = this._sortOrder === ClrDatagridSortOrder.DESC ? 'down' : 'up';
13741
- this.sortIcon = this._sortOrder === ClrDatagridSortOrder.DESC ? 'arrow down' : 'arrow'; // Backward compatibility
13742
12628
  this.sortOrderChange.emit(this._sortOrder);
13743
- // deprecated: to be removed - START
13744
- this._sorted = true;
13745
- this.sortedChange.emit(true);
13746
- // deprecated: to be removed - END
13747
12629
  }
13748
12630
  set projectedFilter(custom) {
13749
12631
  if (custom) {
@@ -13811,7 +12693,7 @@ class ClrDatagridColumn extends DatagridFilterRegistrar {
13811
12693
  }
13812
12694
  }
13813
12695
  ClrDatagridColumn.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridColumn, deps: [{ token: Sort }, { token: FiltersProvider }, { token: i0.ViewContainerRef }, { token: DetailService }, { token: i0.ChangeDetectorRef }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
13814
- ClrDatagridColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridColumn, selector: "clr-dg-column", inputs: { colType: ["clrDgColType", "colType"], field: ["clrDgField", "field"], sortBy: ["clrDgSortBy", "sortBy"], sorted: ["clrDgSorted", "sorted"], sortOrder: ["clrDgSortOrder", "sortOrder"], filterStringPlaceholder: ["clrFilterStringPlaceholder", "filterStringPlaceholder"], filterNumberMaxPlaceholder: ["clrFilterNumberMaxPlaceholder", "filterNumberMaxPlaceholder"], filterNumberMinPlaceholder: ["clrFilterNumberMinPlaceholder", "filterNumberMinPlaceholder"], updateFilterValue: ["clrFilterValue", "updateFilterValue"] }, outputs: { sortedChange: "clrDgSortedChange", sortOrderChange: "clrDgSortOrderChange", filterValueChange: "clrFilterValueChange" }, host: { attributes: { "role": "columnheader" }, properties: { "class.datagrid-column": "true", "attr.aria-sort": "ariaSort" } }, providers: [ClrPopoverPositionService, ClrPopoverEventsService, ClrPopoverToggleService], queries: [{ propertyName: "projectedFilter", first: true, predicate: CustomFilter, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
12696
+ ClrDatagridColumn.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridColumn, selector: "clr-dg-column", inputs: { colType: ["clrDgColType", "colType"], field: ["clrDgField", "field"], sortBy: ["clrDgSortBy", "sortBy"], sortOrder: ["clrDgSortOrder", "sortOrder"], filterStringPlaceholder: ["clrFilterStringPlaceholder", "filterStringPlaceholder"], filterNumberMaxPlaceholder: ["clrFilterNumberMaxPlaceholder", "filterNumberMaxPlaceholder"], filterNumberMinPlaceholder: ["clrFilterNumberMinPlaceholder", "filterNumberMinPlaceholder"], updateFilterValue: ["clrFilterValue", "updateFilterValue"] }, outputs: { sortOrderChange: "clrDgSortOrderChange", filterValueChange: "clrFilterValueChange" }, host: { attributes: { "role": "columnheader" }, properties: { "class.datagrid-column": "true", "attr.aria-sort": "ariaSort" } }, providers: [ClrPopoverPositionService, ClrPopoverEventsService, ClrPopoverToggleService], queries: [{ propertyName: "projectedFilter", first: true, predicate: CustomFilter, descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: `
13815
12697
  <div class="datagrid-column-flex">
13816
12698
  <button class="datagrid-column-title" *ngIf="sortable" (click)="sort()" type="button">
13817
12699
  <ng-container *ngTemplateOutlet="columnTitle"></ng-container>
@@ -13914,12 +12796,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
13914
12796
  }], sortBy: [{
13915
12797
  type: Input,
13916
12798
  args: ['clrDgSortBy']
13917
- }], sorted: [{
13918
- type: Input,
13919
- args: ['clrDgSorted']
13920
- }], sortedChange: [{
13921
- type: Output,
13922
- args: ['clrDgSortedChange']
13923
12799
  }], sortOrder: [{
13924
12800
  type: Input,
13925
12801
  args: ['clrDgSortOrder']
@@ -16032,13 +14908,13 @@ ClrDatagridActionOverflow.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.
16032
14908
  [attr.aria-hidden]="!open"
16033
14909
  [attr.id]="popoverId"
16034
14910
  clrKeyFocus
16035
- clrFocusTrap
14911
+ cdkTrapFocus
16036
14912
  (click)="closeOverflowContent($event)"
16037
14913
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
16038
14914
  >
16039
14915
  <ng-content></ng-content>
16040
14916
  </div>
16041
- `, isInline: true, dependencies: [{ kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "component", type: ClrKeyFocus, selector: "[clrKeyFocus]", inputs: ["clrDirection", "clrFocusOnLoad", "clrKeyFocus"], outputs: ["clrFocusChange"] }, { kind: "directive", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }] });
14917
+ `, isInline: true, dependencies: [{ kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "component", type: ClrKeyFocus, selector: "[clrKeyFocus]", inputs: ["clrDirection", "clrFocusOnLoad", "clrKeyFocus"], outputs: ["clrFocusChange"] }] });
16042
14918
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridActionOverflow, decorators: [{
16043
14919
  type: Component,
16044
14920
  args: [{
@@ -16066,7 +14942,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
16066
14942
  [attr.aria-hidden]="!open"
16067
14943
  [attr.id]="popoverId"
16068
14944
  clrKeyFocus
16069
- clrFocusTrap
14945
+ cdkTrapFocus
16070
14946
  (click)="closeOverflowContent($event)"
16071
14947
  *clrPopoverContent="open; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
16072
14948
  >
@@ -16274,7 +15150,7 @@ ClrDatagridColumnToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
16274
15150
  role="dialog"
16275
15151
  [attr.aria-label]="commonStrings.keys.showColumnsMenuDescription"
16276
15152
  [id]="popoverId"
16277
- clrFocusTrap
15153
+ cdkTrapFocus
16278
15154
  *clrPopoverContent="openState; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
16279
15155
  >
16280
15156
  <div class="switch-header">
@@ -16316,7 +15192,7 @@ ClrDatagridColumnToggle.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
16316
15192
  </clr-dg-column-toggle-button>
16317
15193
  </div>
16318
15194
  </div>
16319
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverCloseButton, selector: "[clrPopoverCloseButton]", outputs: ["clrPopoverOnCloseChange"] }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "directive", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }, { kind: "directive", type: ClrDatagridItemsTrackBy, selector: "[ngForTrackBy]", inputs: ["ngForTrackBy"] }, { kind: "component", type: ClrDatagridColumnToggleButton, selector: "clr-dg-column-toggle-button", outputs: ["clrAllSelected"] }] });
15195
+ `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrLabel, selector: "label", inputs: ["for"] }, { kind: "directive", type: ClrCheckbox, selector: "[clrCheckbox],[clrToggle]" }, { kind: "component", type: ClrCheckboxWrapper, selector: "clr-checkbox-wrapper,clr-toggle-wrapper" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ClrPopoverAnchor, selector: "[clrPopoverAnchor]" }, { kind: "directive", type: ClrPopoverCloseButton, selector: "[clrPopoverCloseButton]", outputs: ["clrPopoverOnCloseChange"] }, { kind: "directive", type: ClrPopoverOpenCloseButton, selector: "[clrPopoverOpenCloseButton]", outputs: ["clrPopoverOpenCloseChange"] }, { kind: "directive", type: ClrPopoverContent, selector: "[clrPopoverContent]", inputs: ["clrPopoverContent", "clrPopoverContentAt", "clrPopoverContentOutsideClickToClose", "clrPopoverContentScrollToClose"] }, { kind: "directive", type: ClrDatagridItemsTrackBy, selector: "[ngForTrackBy]", inputs: ["ngForTrackBy"] }, { kind: "component", type: ClrDatagridColumnToggleButton, selector: "clr-dg-column-toggle-button", outputs: ["clrAllSelected"] }] });
16320
15196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridColumnToggle, decorators: [{
16321
15197
  type: Component,
16322
15198
  args: [{
@@ -16339,7 +15215,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
16339
15215
  role="dialog"
16340
15216
  [attr.aria-label]="commonStrings.keys.showColumnsMenuDescription"
16341
15217
  [id]="popoverId"
16342
- clrFocusTrap
15218
+ cdkTrapFocus
16343
15219
  *clrPopoverContent="openState; at: smartPosition; outsideClickToClose: true; scrollToClose: true"
16344
15220
  >
16345
15221
  <div class="switch-header">
@@ -16468,7 +15344,8 @@ class ClrDatagridDetail {
16468
15344
  ClrDatagridDetail.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridDetail, deps: [{ token: DetailService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
16469
15345
  ClrDatagridDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridDetail, selector: "clr-dg-detail", host: { listeners: { "document:keyup.esc": "closeCheck()" }, properties: { "class.datagrid-detail-pane": "true" } }, queries: [{ propertyName: "header", first: true, predicate: ClrDatagridDetailHeader, descendants: true }], ngImport: i0, template: `
16470
15346
  <div
16471
- [clrFocusTrap]="{ strict: false }"
15347
+ cdkTrapFocus
15348
+ [cdkTrapFocusAutoCapture]="true"
16472
15349
  class="datagrid-detail-pane-content"
16473
15350
  *ngIf="detailService.isOpen"
16474
15351
  role="dialog"
@@ -16480,7 +15357,7 @@ ClrDatagridDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
16480
15357
  <ng-content></ng-content>
16481
15358
  <div class="clr-sr-only">{{ commonStrings.keys.detailPaneEnd }}</div>
16482
15359
  </div>
16483
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }] });
15360
+ `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }] });
16484
15361
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridDetail, decorators: [{
16485
15362
  type: Component,
16486
15363
  args: [{
@@ -16488,11 +15365,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
16488
15365
  host: {
16489
15366
  '[class.datagrid-detail-pane]': 'true',
16490
15367
  },
16491
- // We put the *ngIf on the clrFocusTrap so it doesn't always exist on the page
15368
+ // We put the *ngIf on the cdkTrapFocus so it doesn't always exist on the page
16492
15369
  // have to test for presence of header for aria-describedby because it was causing unit tests to crash
16493
15370
  template: `
16494
15371
  <div
16495
- [clrFocusTrap]="{ strict: false }"
15372
+ cdkTrapFocus
15373
+ [cdkTrapFocusAutoCapture]="true"
16496
15374
  class="datagrid-detail-pane-content"
16497
15375
  *ngIf="detailService.isOpen"
16498
15376
  role="dialog"
@@ -16620,252 +15498,28 @@ function fade(opacity = 1) {
16620
15498
  * This software is released under MIT license.
16621
15499
  * The full license information can be found in LICENSE in the root directory of this project.
16622
15500
  */
16623
- function fadeSlide(direction) {
16624
- let transform = null;
16625
- if (direction === 'up') {
16626
- transform = 'translate(0, 25%)';
16627
- }
16628
- else if (direction === 'down') {
16629
- transform = 'translate(0, -25%)';
16630
- }
16631
- else if (direction === 'left') {
16632
- transform = 'translate(25%, 0)';
16633
- }
16634
- else if (direction === 'right') {
16635
- transform = 'translate(-25%, 0)';
16636
- }
16637
- else {
16638
- throw new Error('Unknown direction ' + direction + ' for slide animation.');
16639
- }
16640
- return [
16641
- transition('void => *', [style({ opacity: 0, transform: transform }), animate(defaultAnimationTiming)]),
16642
- transition('* => void', [animate(defaultAnimationTiming, style({ opacity: 0, transform: transform }))]),
16643
- ];
16644
- }
16645
-
16646
- /*
16647
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16648
- * This software is released under MIT license.
16649
- * The full license information can be found in LICENSE in the root directory of this project.
16650
- */
16651
-
16652
- /*
16653
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16654
- * This software is released under MIT license.
16655
- * The full license information can be found in LICENSE in the root directory of this project.
16656
- */
16657
- function slide(direction) {
16658
- let transform = null;
16659
- if (direction === 'up') {
16660
- transform = 'translate(0, 25%)';
16661
- }
16662
- else if (direction === 'down') {
16663
- transform = 'translate(0, -25%)';
16664
- }
16665
- else if (direction === 'left') {
16666
- transform = 'translate(25%, 0)';
16667
- }
16668
- else if (direction === 'right') {
16669
- transform = 'translate(-25%, 0)';
16670
- }
16671
- else {
16672
- throw new Error('Unknown direction ' + direction + ' for slide animation.');
16673
- }
16674
- return [
16675
- transition('void => *', [style({ transform: transform }), animate(defaultAnimationTiming)]),
16676
- transition('* => void', [animate(defaultAnimationTiming, style({ transform: transform }))]),
16677
- ];
16678
- }
16679
-
16680
- /*
16681
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16682
- * This software is released under MIT license.
16683
- * The full license information can be found in LICENSE in the root directory of this project.
16684
- */
16685
-
16686
- /*
16687
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16688
- * This software is released under MIT license.
16689
- * The full license information can be found in LICENSE in the root directory of this project.
16690
- */
16691
-
16692
- /*
16693
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16694
- * This software is released under MIT license.
16695
- * The full license information can be found in LICENSE in the root directory of this project.
16696
- */
16697
-
16698
- /*
16699
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16700
- * This software is released under MIT license.
16701
- * The full license information can be found in LICENSE in the root directory of this project.
16702
- */
16703
-
16704
- /*
16705
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16706
- * This software is released under MIT license.
16707
- * The full license information can be found in LICENSE in the root directory of this project.
16708
- */
16709
-
16710
- /*
16711
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16712
- * This software is released under MIT license.
16713
- * The full license information can be found in LICENSE in the root directory of this project.
16714
- */
16715
- var ClrAriaLivePoliteness;
16716
- (function (ClrAriaLivePoliteness) {
16717
- ClrAriaLivePoliteness["off"] = "off";
16718
- ClrAriaLivePoliteness["polite"] = "polite";
16719
- ClrAriaLivePoliteness["assertive"] = "assertive";
16720
- })(ClrAriaLivePoliteness || (ClrAriaLivePoliteness = {}));
16721
- /**
16722
- * Time in milliseconds before inserting the content into the container
16723
- */
16724
- const ARIA_LIVE_TICK = 100;
16725
- /**
16726
- * @deprecated
16727
- *
16728
- * -- ClrAriaLiveService is deprecated in 5.0 to be removed in 6.0 --
16729
- * Please consider using the LiveAnnouncer in the Angular Material CDK
16730
- * if your project needs this functionality.
16731
- * More info: https://material.angular.io/cdk/a11y/overview#example-1
16732
- *
16733
- * This service handle `aria-live` accessibility attribute. The issue is that you need
16734
- * to have the DOM Element with attribute `aria-live` before you could insert content
16735
- * and SR (Screen Reader) pick the change and announce it.
16736
- *
16737
- * ```typescript
16738
- * import { ClrAriaLiveService } from 'src/clr-angular/utils/a11y/aria-live.service';
16739
- *
16740
- * @Component({
16741
- * selector: 'clr-demo-component',
16742
- * providers: [ClrAriaLiveService],
16743
- * template: `
16744
- * <ng-content></ng-content>
16745
- * `,
16746
- * })
16747
- * export class DemoComponent {
16748
- * constructor(ariaLiveService: ClrAriaLiveService) {}
16749
- *
16750
- * public actionThatWillTriggerChange() {
16751
- * this.ariaLiveService.announce('message that I want to announce to SR');
16752
- * }
16753
- * }
16754
- * ```
16755
- *
16756
- */
16757
- class ClrAriaLiveService {
16758
- constructor(ngZone, _document, platformId) {
16759
- this.ngZone = ngZone;
16760
- this.platformId = platformId;
16761
- this._id = `clr-aria-live-element-${uniqueIdFactory()}`;
16762
- this.document = _document;
16763
- }
16764
- /**
16765
- * get access to the internal HTML `id` that gonna be used for the AriaLive container.
16766
- * @return ID of the DOM Element as string.
16767
- */
16768
- get id() {
16769
- return this._id;
16770
- }
16771
- /**
16772
- * Append text content inside the AriaLive Container. This method will check if the
16773
- * DOM Element is existing if not it will create one for us and the will apply the text.
16774
- *
16775
- * ```typescript
16776
- * this.ariaLiveService.announce(this.el.nativeElement);
16777
- * // or
16778
- * this.ariaLiveService.announce('Message to announce to SR');
16779
- * ```
16780
- *
16781
- * @remark
16782
- * When second argument is `AriaLivePoliteness.off` we won't create aria container or update it.
16783
- * The reason for that is that we don't want to do additional work if the SR will ignore it.
16784
- *
16785
- * @param message - This could be simple string or HTMLElement
16786
- * @param politeness - 'polite', 'assertive' or 'off'
16787
- */
16788
- announce(message, politeness = ClrAriaLivePoliteness.polite) {
16789
- if (politeness === ClrAriaLivePoliteness.off) {
16790
- return;
16791
- }
16792
- if (!this.ariaLiveElement && isPlatformBrowser(this.platformId)) {
16793
- this.ariaLiveElement = this.createContainer();
16794
- }
16795
- message = typeof message !== 'string' && isPlatformBrowser(this.platformId) ? message.textContent : message;
16796
- // when there is no message do NOTHING!
16797
- if (!message) {
16798
- return;
16799
- }
16800
- this.ariaLiveElement.setAttribute('aria-live', politeness);
16801
- // This 100ms timeout is necessary for some browser + screen-reader combinations:
16802
- // - Both JAWS and NVDA over IE11 will not announce anything without a non-zero timeout.
16803
- // - With Chrome and IE11 with NVDA or JAWS, a repeated (identical) message won't be read a
16804
- // second time without clearing and then using a non-zero delay.
16805
- // (using JAWS 17 at time of this writing).
16806
- this.ngZone.runOutsideAngular(() => {
16807
- // This clearTimeout will stop all older messages from announcing
16808
- // in the case where the messages are comming too fast we gonna try to append only
16809
- // the last one. That's what the SR will try to do anyway.
16810
- clearTimeout(this.previousTimeout);
16811
- this.previousTimeout = setTimeout(() => {
16812
- this.ariaLiveElement.textContent = message;
16813
- }, ARIA_LIVE_TICK);
16814
- });
16815
- }
16816
- /**
16817
- * onDestroy life cycle - must stop all active setTimeouts and remove the AriaLive
16818
- * container from the document.
16819
- */
16820
- ngOnDestroy() {
16821
- clearTimeout(this.previousTimeout);
16822
- if (isPlatformBrowser(this.platformId) && this.ariaLiveElement) {
16823
- this.document.body.removeChild(this.ariaLiveElement);
16824
- this.ariaLiveElement = null;
16825
- }
16826
- }
16827
- /**
16828
- * Create AriaLive DOM element as a last child of the document.
16829
- * After the element is created, we gonna apply Clarity class to hide it from
16830
- * the screen and set the `aria-live` politness.
16831
- *
16832
- * `clr-sr-only` is the CSS class that is used to hide the element from the screen.
16833
- *
16834
- * @remark
16835
- * Calling this method multiple times will create multiple DOM Elements, that
16836
- * won't be tracked and will be GC after the service is destroyed.
16837
- *
16838
- * @return AriaLive container as HTMLElement
16839
- *
16840
- */
16841
- createContainer() {
16842
- const ariaLiveElement = this.document.createElement('div');
16843
- ariaLiveElement.setAttribute('id', this.id);
16844
- // Use clarity screen reader class to hide the dom element
16845
- // and fix the scrollbar shake
16846
- ariaLiveElement.classList.add('clr-sr-only');
16847
- ariaLiveElement.setAttribute('aria-atomic', 'true');
16848
- ariaLiveElement.setAttribute('aria-live', ClrAriaLivePoliteness.polite);
16849
- this.document.body.appendChild(ariaLiveElement);
16850
- return ariaLiveElement;
16851
- }
16852
- }
16853
- ClrAriaLiveService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrAriaLiveService, deps: [{ token: i0.NgZone }, { token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
16854
- ClrAriaLiveService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrAriaLiveService, providedIn: 'root' });
16855
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrAriaLiveService, decorators: [{
16856
- type: Injectable,
16857
- args: [{
16858
- providedIn: 'root',
16859
- }]
16860
- }], ctorParameters: function () {
16861
- return [{ type: i0.NgZone }, { type: undefined, decorators: [{
16862
- type: Inject,
16863
- args: [DOCUMENT]
16864
- }] }, { type: undefined, decorators: [{
16865
- type: Inject,
16866
- args: [PLATFORM_ID]
16867
- }] }];
16868
- } });
15501
+ function fadeSlide(direction) {
15502
+ let transform = null;
15503
+ if (direction === 'up') {
15504
+ transform = 'translate(0, 25%)';
15505
+ }
15506
+ else if (direction === 'down') {
15507
+ transform = 'translate(0, -25%)';
15508
+ }
15509
+ else if (direction === 'left') {
15510
+ transform = 'translate(25%, 0)';
15511
+ }
15512
+ else if (direction === 'right') {
15513
+ transform = 'translate(-25%, 0)';
15514
+ }
15515
+ else {
15516
+ throw new Error('Unknown direction ' + direction + ' for slide animation.');
15517
+ }
15518
+ return [
15519
+ transition('void => *', [style({ opacity: 0, transform: transform }), animate(defaultAnimationTiming)]),
15520
+ transition('* => void', [animate(defaultAnimationTiming, style({ opacity: 0, transform: transform }))]),
15521
+ ];
15522
+ }
16869
15523
 
16870
15524
  /*
16871
15525
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -16878,6 +15532,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
16878
15532
  * This software is released under MIT license.
16879
15533
  * The full license information can be found in LICENSE in the root directory of this project.
16880
15534
  */
15535
+ function slide(direction) {
15536
+ let transform = null;
15537
+ if (direction === 'up') {
15538
+ transform = 'translate(0, 25%)';
15539
+ }
15540
+ else if (direction === 'down') {
15541
+ transform = 'translate(0, -25%)';
15542
+ }
15543
+ else if (direction === 'left') {
15544
+ transform = 'translate(25%, 0)';
15545
+ }
15546
+ else if (direction === 'right') {
15547
+ transform = 'translate(-25%, 0)';
15548
+ }
15549
+ else {
15550
+ throw new Error('Unknown direction ' + direction + ' for slide animation.');
15551
+ }
15552
+ return [
15553
+ transition('void => *', [style({ transform: transform }), animate(defaultAnimationTiming)]),
15554
+ transition('* => void', [animate(defaultAnimationTiming, style({ transform: transform }))]),
15555
+ ];
15556
+ }
16881
15557
 
16882
15558
  /*
16883
15559
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -16908,95 +15584,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
16908
15584
  * This software is released under MIT license.
16909
15585
  * The full license information can be found in LICENSE in the root directory of this project.
16910
15586
  */
16911
- class ForTypeAheadProvider {
16912
- constructor() {
16913
- this._textContentChange = new Subject();
16914
- }
16915
- get textContentChange() {
16916
- return this._textContentChange.asObservable();
16917
- }
16918
- get textContent() {
16919
- return this._textContent;
16920
- }
16921
- set textContent(value) {
16922
- this._textContent = value;
16923
- this._textContentChange.next(value);
16924
- }
16925
- }
16926
- ForTypeAheadProvider.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ForTypeAheadProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
16927
- ForTypeAheadProvider.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ForTypeAheadProvider });
16928
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ForTypeAheadProvider, decorators: [{
16929
- type: Injectable
16930
- }] });
16931
15587
 
16932
15588
  /*
16933
15589
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16934
15590
  * This software is released under MIT license.
16935
15591
  * The full license information can be found in LICENSE in the root directory of this project.
16936
15592
  */
16937
- // The purpose of this directive is to provide the text content of its host element
16938
- // or text content that's passed to its input.
16939
- // This directive must stay optional. So do not embed this directive in a component module by default.
16940
- // If users need to use this directive, they should import its module on their side.
16941
- class ClrForTypeAhead {
16942
- constructor(el, forTypeAheadProvider) {
16943
- this.el = el;
16944
- this.forTypeAheadProvider = forTypeAheadProvider;
16945
- }
16946
- trimAndLowerCase(value) {
16947
- return value.toLocaleLowerCase().trim();
16948
- }
16949
- get content() {
16950
- return this._content;
16951
- }
16952
- set content(value) {
16953
- if (value) {
16954
- this._content = this.trimAndLowerCase(value);
16955
- this.forTypeAheadProvider.textContent = this._content;
16956
- }
16957
- else {
16958
- this._content = this.trimAndLowerCase(this.el.nativeElement.textContent);
16959
- this.forTypeAheadProvider.textContent = this._content;
16960
- }
16961
- }
16962
- ngOnInit() {
16963
- if (!this._content) {
16964
- this._content = this.trimAndLowerCase(this.el.nativeElement.textContent);
16965
- this.forTypeAheadProvider.textContent = this._content;
16966
- }
16967
- }
16968
- }
16969
- ClrForTypeAhead.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrForTypeAhead, deps: [{ token: i0.ElementRef }, { token: ForTypeAheadProvider }], target: i0.ɵɵFactoryTarget.Directive });
16970
- ClrForTypeAhead.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrForTypeAhead, selector: "[clrForTypeAhead]", inputs: { content: ["clrForTypeAhead", "content"] }, providers: [ForTypeAheadProvider], ngImport: i0 });
16971
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrForTypeAhead, decorators: [{
16972
- type: Directive,
16973
- args: [{
16974
- providers: [ForTypeAheadProvider],
16975
- selector: '[clrForTypeAhead]',
16976
- }]
16977
- }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: ForTypeAheadProvider }]; }, propDecorators: { content: [{
16978
- type: Input,
16979
- args: ['clrForTypeAhead']
16980
- }] } });
16981
15593
 
16982
15594
  /*
16983
15595
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
16984
15596
  * This software is released under MIT license.
16985
15597
  * The full license information can be found in LICENSE in the root directory of this project.
16986
15598
  */
16987
- class ClrForTypeAheadModule {
16988
- }
16989
- ClrForTypeAheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrForTypeAheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
16990
- ClrForTypeAheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrForTypeAheadModule, declarations: [ClrForTypeAhead], imports: [CommonModule], exports: [ClrForTypeAhead] });
16991
- ClrForTypeAheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrForTypeAheadModule, imports: [CommonModule] });
16992
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrForTypeAheadModule, decorators: [{
16993
- type: NgModule,
16994
- args: [{
16995
- imports: [CommonModule],
16996
- declarations: [ClrForTypeAhead],
16997
- exports: [ClrForTypeAhead],
16998
- }]
16999
- }] });
17000
15599
 
17001
15600
  /*
17002
15601
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -17429,9 +16028,14 @@ class ClrDatagridPagination {
17429
16028
  }
17430
16029
  return middlePages;
17431
16030
  }
16031
+ verifyCurrentPage(event) {
16032
+ const parsed = parseInt(event.target.value, 10);
16033
+ if (parsed !== this.page.current) {
16034
+ event.target.value = this.page.current;
16035
+ }
16036
+ }
17432
16037
  /**
17433
- * We only update the pagination's current page on blur of the input field, or
17434
- * when they press enter.
16038
+ * We only update the pagination's current page on enter.
17435
16039
  */
17436
16040
  updateCurrentPage(event) {
17437
16041
  const parsed = parseInt(event.target.value, 10);
@@ -17492,7 +16096,7 @@ ClrDatagridPagination.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
17492
16096
  [size]="page.last.toString().length"
17493
16097
  [value]="page.current"
17494
16098
  (keydown.enter)="updateCurrentPage($event)"
17495
- (blur)="updateCurrentPage($event)"
16099
+ (blur)="verifyCurrentPage($event)"
17496
16100
  [attr.aria-label]="commonStrings.keys.currentPage"
17497
16101
  />
17498
16102
  <ng-template #readOnly>
@@ -17592,7 +16196,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
17592
16196
  [size]="page.last.toString().length"
17593
16197
  [value]="page.current"
17594
16198
  (keydown.enter)="updateCurrentPage($event)"
17595
- (blur)="updateCurrentPage($event)"
16199
+ (blur)="verifyCurrentPage($event)"
17596
16200
  [attr.aria-label]="commonStrings.keys.currentPage"
17597
16201
  />
17598
16202
  <ng-template #readOnly>
@@ -17713,20 +16317,20 @@ class ClrDatagridRowDetail {
17713
16317
  }
17714
16318
  get beginningOfExpandableContentAriaText() {
17715
16319
  return (this._beginningOfExpandableContentAriaText ||
17716
- `${this.commonStrings.keys.dategridExpandableBeginningOf || this.commonStrings.keys.datagridExpandableBeginningOf}
17717
- ${this.commonStrings.keys.dategridExpandableRowContent || this.commonStrings.keys.datagridExpandableRowContent}`);
16320
+ `${this.commonStrings.keys.datagridExpandableBeginningOf}
16321
+ ${this.commonStrings.keys.datagridExpandableRowContent}`);
17718
16322
  }
17719
16323
  get endOfExpandableContentAriaText() {
17720
16324
  return (this._endOfExpandableContentAriaText ||
17721
- `${this.commonStrings.keys.dategridExpandableEndOf || this.commonStrings.keys.datagridExpandableEndOf}
17722
- ${this.commonStrings.keys.dategridExpandableRowContent || this.commonStrings.keys.datagridExpandableRowContent}`);
16325
+ `${this.commonStrings.keys.datagridExpandableEndOf}
16326
+ ${this.commonStrings.keys.datagridExpandableRowContent}`);
17723
16327
  }
17724
16328
  }
17725
16329
  ClrDatagridRowDetail.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridRowDetail, deps: [{ token: Selection }, { token: RowActionService }, { token: DatagridIfExpandService }, { token: ExpandableRowsCount }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
17726
16330
  ClrDatagridRowDetail.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrDatagridRowDetail, selector: "clr-dg-row-detail", inputs: { replace: ["clrDgReplace", "replace"], _beginningOfExpandableContentAriaText: ["clrRowDetailBeginningAriaText", "_beginningOfExpandableContentAriaText"], _endOfExpandableContentAriaText: ["clrRowDetailEndAriaText", "_endOfExpandableContentAriaText"] }, host: { attributes: { "role": "gridcell" }, properties: { "class.datagrid-row-flex": "true", "class.datagrid-row-detail": "true", "class.datagrid-container": "cells.length === 0", "attr.id": "expand.expandableId" } }, queries: [{ propertyName: "cells", predicate: ClrDatagridCell }], ngImport: i0, template: `
17727
16331
  <div class="clr-sr-only">
17728
16332
  {{ beginningOfExpandableContentAriaText }}
17729
- {{ commonStrings.keys.dategridExpandableRowsHelperText || commonStrings.keys.datagridExpandableRowsHelperText }}
16333
+ {{ commonStrings.keys.datagridExpandableRowsHelperText }}
17730
16334
  </div>
17731
16335
  <ng-content></ng-content>
17732
16336
  <div class="clr-sr-only">{{ endOfExpandableContentAriaText }}</div>
@@ -17735,11 +16339,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
17735
16339
  type: Component,
17736
16340
  args: [{
17737
16341
  selector: 'clr-dg-row-detail',
17738
- // TODO: @deprecated - dategrid* keys are deprecated. Remove in v14.
17739
16342
  template: `
17740
16343
  <div class="clr-sr-only">
17741
16344
  {{ beginningOfExpandableContentAriaText }}
17742
- {{ commonStrings.keys.dategridExpandableRowsHelperText || commonStrings.keys.datagridExpandableRowsHelperText }}
16345
+ {{ commonStrings.keys.datagridExpandableRowsHelperText }}
17743
16346
  </div>
17744
16347
  <ng-content></ng-content>
17745
16348
  <div class="clr-sr-only">{{ endOfExpandableContentAriaText }}</div>
@@ -18361,6 +16964,8 @@ ClrDatagridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versi
18361
16964
  DatagridStringFilter,
18362
16965
  DatagridNumericFilter
18363
16966
  ], imports: [CommonModule,
16967
+ CdkDragModule,
16968
+ CdkTrapFocusModule,
18364
16969
  ClrIconModule,
18365
16970
  ClrFormsModule,
18366
16971
  FormsModule,
@@ -18368,11 +16973,9 @@ ClrDatagridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versi
18368
16973
  ClrConditionalModule,
18369
16974
  ClrOutsideClickModule,
18370
16975
  ClrExpandableAnimationModule,
18371
- ClrDragAndDropModule,
18372
16976
  ClrSpinnerModule,
18373
16977
  ClrPopoverModuleNext,
18374
16978
  ClrKeyFocusModule,
18375
- ClrFocusTrapModule,
18376
16979
  ClrFocusOnViewInitModule], exports: [
18377
16980
  // Core
18378
16981
  ClrDatagrid,
@@ -18416,6 +17019,8 @@ ClrDatagridModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versi
18416
17019
  DatagridNumericFilter
18417
17020
  ] });
18418
17021
  ClrDatagridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridModule, imports: [CommonModule,
17022
+ CdkDragModule,
17023
+ CdkTrapFocusModule,
18419
17024
  ClrIconModule,
18420
17025
  ClrFormsModule,
18421
17026
  FormsModule,
@@ -18423,17 +17028,17 @@ ClrDatagridModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", versi
18423
17028
  ClrConditionalModule,
18424
17029
  ClrOutsideClickModule,
18425
17030
  ClrExpandableAnimationModule,
18426
- ClrDragAndDropModule,
18427
17031
  ClrSpinnerModule,
18428
17032
  ClrPopoverModuleNext,
18429
17033
  ClrKeyFocusModule,
18430
- ClrFocusTrapModule,
18431
17034
  ClrFocusOnViewInitModule] });
18432
17035
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDatagridModule, decorators: [{
18433
17036
  type: NgModule,
18434
17037
  args: [{
18435
17038
  imports: [
18436
17039
  CommonModule,
17040
+ CdkDragModule,
17041
+ CdkTrapFocusModule,
18437
17042
  ClrIconModule,
18438
17043
  ClrFormsModule,
18439
17044
  FormsModule,
@@ -18441,11 +17046,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18441
17046
  ClrConditionalModule,
18442
17047
  ClrOutsideClickModule,
18443
17048
  ClrExpandableAnimationModule,
18444
- ClrDragAndDropModule,
18445
17049
  ClrSpinnerModule,
18446
17050
  ClrPopoverModuleNext,
18447
17051
  ClrKeyFocusModule,
18448
- ClrFocusTrapModule,
18449
17052
  ClrFocusOnViewInitModule,
18450
17053
  ],
18451
17054
  declarations: [CLR_DATAGRID_DIRECTIVES],
@@ -18594,7 +17197,7 @@ class ClrStackBlock {
18594
17197
  }
18595
17198
  }
18596
17199
  ClrStackBlock.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackBlock, deps: [{ token: ClrStackBlock, optional: true, skipSelf: true }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
18597
- ClrStackBlock.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStackBlock, selector: "clr-stack-block", inputs: { expanded: ["clrSbExpanded", "expanded"], expandable: ["clrSbExpandable", "expandable"], setChangedValue: ["clrSbNotifyChange", "setChangedValue"], ariaLevel: ["clrStackViewLevel", "ariaLevel"], ariaSetsize: ["clrStackViewSetsize", "ariaSetsize"], ariaPosinset: ["clrStackViewPosinset", "ariaPosinset"] }, outputs: { expandedChange: "clrSbExpandedChange" }, host: { properties: { "class.stack-block": "true", "attr.role": "\"heading\"", "attr.aria-level": "headingLevel", "class.stack-block-expanded": "this.expanded", "class.stack-block-expandable": "this.expandable", "class.stack-block-changed": "this.getChangedValue", "class.on-focus": "this.onStackLabelFocus" } }, queries: [{ propertyName: "stackBlockTitle", first: true, predicate: ClrStackViewLabel, descendants: true }], ngImport: i0, template: `
17200
+ ClrStackBlock.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStackBlock, selector: "clr-stack-block", inputs: { expanded: ["clrSbExpanded", "expanded"], expandable: ["clrSbExpandable", "expandable"], setChangedValue: ["clrSbNotifyChange", "setChangedValue"], ariaLevel: ["clrStackViewLevel", "ariaLevel"] }, outputs: { expandedChange: "clrSbExpandedChange" }, host: { properties: { "class.stack-block": "true", "attr.role": "\"heading\"", "attr.aria-level": "headingLevel", "class.stack-block-expanded": "this.expanded", "class.stack-block-expandable": "this.expandable", "class.stack-block-changed": "this.getChangedValue", "class.on-focus": "this.onStackLabelFocus" } }, queries: [{ propertyName: "stackBlockTitle", first: true, predicate: ClrStackViewLabel, descendants: true }], ngImport: i0, template: `
18598
17201
  <!-- The 'preventDefault' for the space keydown event prevents the page
18599
17202
  from scrolling when a stack block is toggled via the space key. -->
18600
17203
  <div
@@ -18715,12 +17318,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18715
17318
  }], ariaLevel: [{
18716
17319
  type: Input,
18717
17320
  args: ['clrStackViewLevel']
18718
- }], ariaSetsize: [{
18719
- type: Input,
18720
- args: ['clrStackViewSetsize']
18721
- }], ariaPosinset: [{
18722
- type: Input,
18723
- args: ['clrStackViewPosinset']
18724
17321
  }], onStackLabelFocus: [{
18725
17322
  type: HostBinding,
18726
17323
  args: ['class.on-focus']
@@ -18755,30 +17352,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18755
17352
  * The full license information can be found in LICENSE in the root directory of this project.
18756
17353
  */
18757
17354
  class ClrStackView {
18758
- constructor() {
18759
- /**
18760
- * Undocumented experimental feature: inline editing.
18761
- */
18762
- this.editable = false;
18763
- this.save = new EventEmitter(false);
18764
- this._editMode = false;
18765
- this.editingChange = new EventEmitter(false);
18766
- }
18767
- get editing() {
18768
- return this.editable && this._editMode;
18769
- }
18770
- set editing(value) {
18771
- if (this.editable) {
18772
- this._editMode = value;
18773
- this.editingChange.emit(value);
18774
- if (!value) {
18775
- this.save.emit(null);
18776
- }
18777
- }
18778
- }
18779
17355
  }
18780
17356
  ClrStackView.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackView, deps: [], target: i0.ɵɵFactoryTarget.Component });
18781
- ClrStackView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStackView, selector: "clr-stack-view", outputs: { save: "clrStackSave" }, ngImport: i0, template: `
17357
+ ClrStackView.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStackView, selector: "clr-stack-view", ngImport: i0, template: `
18782
17358
  <ng-content select="clr-stack-header"></ng-content>
18783
17359
  <div class="stack-view"><ng-content></ng-content></div>
18784
17360
  `, isInline: true, styles: [":host{display:block}\n"] });
@@ -18788,10 +17364,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18788
17364
  <ng-content select="clr-stack-header"></ng-content>
18789
17365
  <div class="stack-view"><ng-content></ng-content></div>
18790
17366
  `, styles: [":host{display:block}\n"] }]
18791
- }], propDecorators: { save: [{
18792
- type: Output,
18793
- args: ['clrStackSave']
18794
- }] } });
17367
+ }] });
18795
17368
 
18796
17369
  /*
18797
17370
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -18810,19 +17383,9 @@ ClrStackHeader.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version
18810
17383
 
18811
17384
  <span class="stack-actions">
18812
17385
  <ng-content select=".stack-action"></ng-content>
18813
- <!-- Undocumented experimental feature: inline editing. -->
18814
- <button
18815
- *ngIf="stackView.editable"
18816
- class="stack-action btn btn-sm btn-link"
18817
- (click)="stackView.editing = !stackView.editing"
18818
- type="button"
18819
- >
18820
- Edit
18821
- </button>
18822
- <!-- End of undocumented experimental feature. -->
18823
17386
  </span>
18824
17387
  </div>
18825
- `, isInline: true, styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
17388
+ `, isInline: true, styles: [":host{display:block}\n"] });
18826
17389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackHeader, decorators: [{
18827
17390
  type: Component,
18828
17391
  args: [{ selector: 'clr-stack-header', template: `
@@ -18831,116 +17394,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
18831
17394
 
18832
17395
  <span class="stack-actions">
18833
17396
  <ng-content select=".stack-action"></ng-content>
18834
- <!-- Undocumented experimental feature: inline editing. -->
18835
- <button
18836
- *ngIf="stackView.editable"
18837
- class="stack-action btn btn-sm btn-link"
18838
- (click)="stackView.editing = !stackView.editing"
18839
- type="button"
18840
- >
18841
- Edit
18842
- </button>
18843
- <!-- End of undocumented experimental feature. -->
18844
17397
  </span>
18845
17398
  </div>
18846
17399
  `, styles: [":host{display:block}\n"] }]
18847
17400
  }], ctorParameters: function () { return [{ type: ClrStackView }]; } });
18848
17401
 
18849
- /*
18850
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18851
- * This software is released under MIT license.
18852
- * The full license information can be found in LICENSE in the root directory of this project.
18853
- */
18854
- class StackControl {
18855
- constructor(stackView) {
18856
- this.stackView = stackView;
18857
- this.modelChange = new EventEmitter(false);
18858
- // Make the ClrStackView editable, since it contains a StackControl
18859
- this.stackView.editable = true;
18860
- this.subscription = this.stackView.editingChange.subscribe((editing) => {
18861
- // Edit mode was closed
18862
- if (!editing) {
18863
- this.modelChange.emit(this.model);
18864
- }
18865
- });
18866
- }
18867
- ngOnDestroy() {
18868
- this.subscription.unsubscribe();
18869
- }
18870
- }
18871
- StackControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StackControl, deps: [{ token: ClrStackView }], target: i0.ɵɵFactoryTarget.Directive });
18872
- StackControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: StackControl, ngImport: i0 });
18873
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StackControl, decorators: [{
18874
- type: Directive
18875
- }], ctorParameters: function () { return [{ type: ClrStackView }]; } });
18876
-
18877
- /*
18878
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18879
- * This software is released under MIT license.
18880
- * The full license information can be found in LICENSE in the root directory of this project.
18881
- */
18882
- class ClrStackInput extends StackControl {
18883
- constructor(stackView) {
18884
- super(stackView);
18885
- this.stackView = stackView;
18886
- this.type = 'text';
18887
- }
18888
- }
18889
- ClrStackInput.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackInput, deps: [{ token: ClrStackView }], target: i0.ɵɵFactoryTarget.Component });
18890
- ClrStackInput.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStackInput, selector: "clr-stack-input", inputs: { model: ["clrModel", "model"], type: "type" }, outputs: { modelChange: "clrModelChange" }, usesInheritance: true, ngImport: i0, template: `
18891
- <span *ngIf="!stackView.editing">{{ model }}</span>
18892
- <input [type]="type" *ngIf="stackView.editing" [(ngModel)]="model" />
18893
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
18894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackInput, decorators: [{
18895
- type: Component,
18896
- args: [{
18897
- selector: 'clr-stack-input',
18898
- inputs: ['model: clrModel', 'type'],
18899
- outputs: ['modelChange: clrModelChange'],
18900
- template: `
18901
- <span *ngIf="!stackView.editing">{{ model }}</span>
18902
- <input [type]="type" *ngIf="stackView.editing" [(ngModel)]="model" />
18903
- `,
18904
- }]
18905
- }], ctorParameters: function () { return [{ type: ClrStackView }]; } });
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 ClrStackSelect extends StackControl {
18913
- constructor(stackView) {
18914
- super(stackView);
18915
- this.stackView = stackView;
18916
- }
18917
- }
18918
- ClrStackSelect.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackSelect, deps: [{ token: ClrStackView }], target: i0.ɵɵFactoryTarget.Component });
18919
- ClrStackSelect.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrStackSelect, selector: "clr-stack-select", inputs: { model: ["clrModel", "model"] }, outputs: { modelChange: "clrModelChange" }, usesInheritance: true, ngImport: i0, template: `
18920
- <span *ngIf="!stackView.editing">{{ model }}</span>
18921
- <div class="select" *ngIf="stackView.editing">
18922
- <select [(ngModel)]="model">
18923
- <ng-content></ng-content>
18924
- </select>
18925
- </div>
18926
- `, isInline: true, dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
18927
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackSelect, decorators: [{
18928
- type: Component,
18929
- args: [{
18930
- selector: 'clr-stack-select',
18931
- inputs: ['model: clrModel'],
18932
- outputs: ['modelChange: clrModelChange'],
18933
- template: `
18934
- <span *ngIf="!stackView.editing">{{ model }}</span>
18935
- <div class="select" *ngIf="stackView.editing">
18936
- <select [(ngModel)]="model">
18937
- <ng-content></ng-content>
18938
- </select>
18939
- </div>
18940
- `,
18941
- }]
18942
- }], ctorParameters: function () { return [{ type: ClrStackView }]; } });
18943
-
18944
17402
  /*
18945
17403
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
18946
17404
  * This software is released under MIT license.
@@ -18953,14 +17411,6 @@ const CLR_STACK_VIEW_DIRECTIVES = [
18953
17411
  ClrStackContentInput,
18954
17412
  ClrStackViewLabel,
18955
17413
  ClrStackViewCustomTags,
18956
- /**
18957
- * Undocumented experimental feature: inline editing.
18958
- */
18959
- ClrStackInput,
18960
- ClrStackSelect,
18961
- /**
18962
- * End of undocumented experimental feature.
18963
- */
18964
17414
  ];
18965
17415
  class ClrStackViewModule {
18966
17416
  constructor() {
@@ -18973,22 +17423,12 @@ ClrStackViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", vers
18973
17423
  ClrStackBlock,
18974
17424
  ClrStackContentInput,
18975
17425
  ClrStackViewLabel,
18976
- ClrStackViewCustomTags,
18977
- /**
18978
- * Undocumented experimental feature: inline editing.
18979
- */
18980
- ClrStackInput,
18981
- ClrStackSelect], imports: [CommonModule, FormsModule, ClrIconModule, ClrExpandableAnimationModule], exports: [ClrStackView,
17426
+ ClrStackViewCustomTags], imports: [CommonModule, FormsModule, ClrIconModule, ClrExpandableAnimationModule], exports: [ClrStackView,
18982
17427
  ClrStackHeader,
18983
17428
  ClrStackBlock,
18984
17429
  ClrStackContentInput,
18985
17430
  ClrStackViewLabel,
18986
- ClrStackViewCustomTags,
18987
- /**
18988
- * Undocumented experimental feature: inline editing.
18989
- */
18990
- ClrStackInput,
18991
- ClrStackSelect] });
17431
+ ClrStackViewCustomTags] });
18992
17432
  ClrStackViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackViewModule, imports: [CommonModule, FormsModule, ClrIconModule, ClrExpandableAnimationModule] });
18993
17433
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrStackViewModule, decorators: [{
18994
17434
  type: NgModule,
@@ -19615,13 +18055,13 @@ const LVIEW_CONTEXT_INDEX = 8;
19615
18055
  // then those keys are sent together in one request.
19616
18056
  const TREE_TYPE_AHEAD_TIMEOUT = 200;
19617
18057
  class ClrTreeNode {
19618
- constructor(platformId, parent, forTypeAheadProvider, featuresService, expandService, commonStrings, focusManager, injector) {
18058
+ constructor(platformId, parent, featuresService, expandService, commonStrings, focusManager, elementRef, injector) {
19619
18059
  this.platformId = platformId;
19620
- this.forTypeAheadProvider = forTypeAheadProvider;
19621
18060
  this.featuresService = featuresService;
19622
18061
  this.expandService = expandService;
19623
18062
  this.commonStrings = commonStrings;
19624
18063
  this.focusManager = focusManager;
18064
+ this.elementRef = elementRef;
19625
18065
  this.STATES = ClrSelectedState;
19626
18066
  this.skipEmitChange = false;
19627
18067
  this.isModelLoading = false;
@@ -19701,6 +18141,9 @@ class ClrTreeNode {
19701
18141
  set expanded(value) {
19702
18142
  this.expandService.expanded = value;
19703
18143
  }
18144
+ set clrForTypeAhead(value) {
18145
+ this._model.textContent = trimAndLowerCase(value || this.elementRef.nativeElement.textContent);
18146
+ }
19704
18147
  ngOnInit() {
19705
18148
  this._model.expanded = this.expanded;
19706
18149
  this.subscriptions.push(this._model.selected.pipe(filter(() => !this.skipEmitChange)).subscribe(value => {
@@ -19720,14 +18163,14 @@ class ClrTreeNode {
19720
18163
  this.subscriptions.push(this._model.loading$.pipe(debounceTime(0)).subscribe(isLoading => (this.isModelLoading = isLoading)));
19721
18164
  }
19722
18165
  ngAfterContentInit() {
19723
- if (this.forTypeAheadProvider) {
19724
- this._model.textContent = this.forTypeAheadProvider.textContent;
19725
- this.subscriptions.push(this.typeAheadKeyEvent.pipe(debounceTime(TREE_TYPE_AHEAD_TIMEOUT)).subscribe((bufferedKeys) => {
19726
- this.focusManager.focusNodeStartsWith(bufferedKeys, this._model);
19727
- // reset once bufferedKeys are used
19728
- this.typeAheadKeyBuffer = '';
19729
- }));
18166
+ if (!this._model.textContent) {
18167
+ this._model.textContent = trimAndLowerCase(this.elementRef.nativeElement.textContent);
19730
18168
  }
18169
+ this.subscriptions.push(this.typeAheadKeyEvent.pipe(debounceTime(TREE_TYPE_AHEAD_TIMEOUT)).subscribe((bufferedKeys) => {
18170
+ this.focusManager.focusNodeStartsWith(bufferedKeys, this._model);
18171
+ // reset once bufferedKeys are used
18172
+ this.typeAheadKeyBuffer = '';
18173
+ }));
19731
18174
  }
19732
18175
  ngOnDestroy() {
19733
18176
  this._model.destroy();
@@ -19849,8 +18292,8 @@ class ClrTreeNode {
19849
18292
  }
19850
18293
  }
19851
18294
  }
19852
- ClrTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTreeNode, deps: [{ token: PLATFORM_ID }, { token: ClrTreeNode, optional: true, skipSelf: true }, { token: ForTypeAheadProvider, optional: true, self: true }, { token: TreeFeaturesService }, { token: IfExpandService }, { token: ClrCommonStringsService }, { token: TreeFocusManagerService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
19853
- ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTreeNode, selector: "clr-tree-node", inputs: { selected: ["clrSelected", "selected"], expandable: ["clrExpandable", "expandable"], expanded: ["clrExpanded", "expanded"] }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true" } }, providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }], queries: [{ propertyName: "treeNodeLinkList", predicate: ClrTreeNodeLink }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\" class=\"clr-control-label\"></label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\">\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span *ngIf=\"ariaSelected\"> selected</span>\n <span *ngIf=\"!ariaSelected\"> unselected</span>\n </div>\n </div>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: RecursiveChildren, selector: "clr-recursive-children", inputs: ["parent", "children"] }], animations: [
18295
+ ClrTreeNode.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrTreeNode, deps: [{ token: PLATFORM_ID }, { token: ClrTreeNode, optional: true, skipSelf: true }, { token: TreeFeaturesService }, { token: IfExpandService }, { token: ClrCommonStringsService }, { token: TreeFocusManagerService }, { token: i0.ElementRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
18296
+ ClrTreeNode.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrTreeNode, selector: "clr-tree-node", inputs: { selected: ["clrSelected", "selected"], expandable: ["clrExpandable", "expandable"], expanded: ["clrExpanded", "expanded"], clrForTypeAhead: "clrForTypeAhead" }, outputs: { selectedChange: "clrSelectedChange", expandedChange: "clrExpandedChange" }, host: { properties: { "class.clr-tree-node": "true" } }, providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }], queries: [{ propertyName: "treeNodeLinkList", predicate: ClrTreeNodeLink }], viewQueries: [{ propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div\n #contentContainer\n role=\"treeitem\"\n class=\"clr-tree-node-content-container\"\n tabindex=\"-1\"\n [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n [attr.aria-selected]=\"ariaSelected\"\n (keydown)=\"onKeyDown($event)\"\n (focus)=\"broadcastFocusOnContainer()\"\n>\n <button\n *ngIf=\"isExpandable() && !isModelLoading && !expandService.loading\"\n aria-hidden=\"true\"\n type=\"button\"\n tabindex=\"-1\"\n class=\"clr-treenode-caret\"\n (click)=\"expandService.toggle();\"\n (focus)=\"focusTreeNode()\"\n >\n <cds-icon\n class=\"clr-treenode-caret-icon\"\n shape=\"angle\"\n [attr.direction]=\"expandService.expanded ? 'down' : 'right'\"\n ></cds-icon>\n </button>\n <div class=\"clr-treenode-spinner-container\" *ngIf=\"expandService.loading || isModelLoading\">\n <span class=\"clr-treenode-spinner spinner\"></span>\n </div>\n <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\" *ngIf=\"featuresService.selectable\">\n <input\n aria-hidden=\"true\"\n type=\"checkbox\"\n id=\"{{nodeId}}-check\"\n class=\"clr-checkbox\"\n [checked]=\"_model.selected.value === STATES.SELECTED\"\n [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n (change)=\"_model.toggleSelection(featuresService.eager)\"\n (focus)=\"focusTreeNode()\"\n tabindex=\"-1\"\n />\n <label for=\"{{nodeId}}-check\" class=\"clr-control-label\"></label>\n </div>\n <div class=\"clr-treenode-content\" (mousedown)=\"focusTreeNode()\">\n <ng-content></ng-content>\n <div class=\"clr-sr-only\" *ngIf=\"featuresService.selectable || ariaSelected\">\n <span *ngIf=\"ariaSelected\"> selected</span>\n <span *ngIf=\"!ariaSelected\"> unselected</span>\n </div>\n </div>\n</div>\n<div\n class=\"clr-treenode-children\"\n [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n <ng-content select=\"clr-tree-node\"></ng-content>\n <ng-content select=\"[clrIfExpanded]\"></ng-content>\n <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "component", type: RecursiveChildren, selector: "clr-recursive-children", inputs: ["parent", "children"] }], animations: [
19854
18297
  trigger('toggleChildrenAnim', [
19855
18298
  transition('collapsed => expanded', [style({ height: 0 }), animate(200, style({ height: '*' }))]),
19856
18299
  transition('expanded => collapsed', [style({ height: '*' }), animate(200, style({ height: 0 }))]),
@@ -19878,11 +18321,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
19878
18321
  type: Optional
19879
18322
  }, {
19880
18323
  type: SkipSelf
19881
- }] }, { type: ForTypeAheadProvider, decorators: [{
19882
- type: Optional
19883
- }, {
19884
- type: Self
19885
- }] }, { type: TreeFeaturesService }, { type: IfExpandService }, { type: ClrCommonStringsService }, { type: TreeFocusManagerService }, { type: i0.Injector }];
18324
+ }] }, { type: TreeFeaturesService }, { type: IfExpandService }, { type: ClrCommonStringsService }, { type: TreeFocusManagerService }, { type: i0.ElementRef }, { type: i0.Injector }];
19886
18325
  }, propDecorators: { selected: [{
19887
18326
  type: Input,
19888
18327
  args: ['clrSelected']
@@ -19895,6 +18334,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
19895
18334
  }], expanded: [{
19896
18335
  type: Input,
19897
18336
  args: ['clrExpanded']
18337
+ }], clrForTypeAhead: [{
18338
+ type: Input,
18339
+ args: ['clrForTypeAhead']
19898
18340
  }], expandedChange: [{
19899
18341
  type: Output,
19900
18342
  args: ['clrExpandedChange']
@@ -19905,6 +18347,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
19905
18347
  type: ContentChildren,
19906
18348
  args: [ClrTreeNodeLink, { descendants: false }]
19907
18349
  }] } });
18350
+ function trimAndLowerCase(value) {
18351
+ return value.toLocaleLowerCase().trim();
18352
+ }
19908
18353
 
19909
18354
  /*
19910
18355
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
@@ -20393,13 +18838,10 @@ const BASIC_FOCUSABLE_ITEM_PROVIDER = [
20393
18838
  * The full license information can be found in LICENSE in the root directory of this project.
20394
18839
  */
20395
18840
  class ClrDropdownItem {
20396
- constructor(dropdown, el, _dropdownService, renderer, focusableItem) {
18841
+ constructor(dropdown, _dropdownService, focusableItem) {
20397
18842
  this.dropdown = dropdown;
20398
- this.el = el;
20399
18843
  this._dropdownService = _dropdownService;
20400
- this.renderer = renderer;
20401
18844
  this.focusableItem = focusableItem;
20402
- this.setByDeprecatedDisabled = false;
20403
18845
  }
20404
18846
  set disabled(value) {
20405
18847
  // Empty string attribute evaluates to false but should disable the item, so we need to add a special case for it.
@@ -20408,17 +18850,6 @@ class ClrDropdownItem {
20408
18850
  get disabled() {
20409
18851
  return this.focusableItem.disabled;
20410
18852
  }
20411
- /*
20412
- * @deprecated since 3.0, remove in 4.0. the presence of this attribute makes it not-focusable in IE11. Use [clrDisabled] input instead.
20413
- */
20414
- set disabledDeprecated(value) {
20415
- // Empty string attribute evaluates to false but should disable the item, so we need to add a special case for it.
20416
- this.focusableItem.disabled = !!value || value === '';
20417
- this.setByDeprecatedDisabled = true;
20418
- }
20419
- get disabledDeprecated() {
20420
- return this.focusableItem.disabled;
20421
- }
20422
18853
  /**
20423
18854
  * Let you overwrite the focusable auto increment id.
20424
18855
  */
@@ -20428,22 +18859,28 @@ class ClrDropdownItem {
20428
18859
  get dropdownItemId() {
20429
18860
  return this.focusableItem.id;
20430
18861
  }
20431
- ngAfterViewInit() {
20432
- this.unlisten = this.renderer.listen(this.el.nativeElement, 'click', () => this.onDropdownItemClick());
20433
- }
20434
18862
  onDropdownItemClick() {
20435
- if (this.dropdown.isMenuClosable && !this.el.nativeElement.classList.contains('disabled')) {
20436
- this._dropdownService.closeMenus();
20437
- }
18863
+ // Ensure that the dropdown is closed after custom dropdown item click event handlers have run.
18864
+ setTimeout(() => {
18865
+ if (this.dropdown.isMenuClosable && !this.disabled) {
18866
+ this._dropdownService.closeMenus();
18867
+ }
18868
+ });
20438
18869
  }
20439
- ngOnDestroy() {
20440
- if (this.unlisten) {
20441
- this.unlisten();
18870
+ onSpaceKeydown($event) {
18871
+ this.stopImmediatePropagationIfDisabled($event);
18872
+ }
18873
+ onEnterKeydown($event) {
18874
+ this.stopImmediatePropagationIfDisabled($event);
18875
+ }
18876
+ stopImmediatePropagationIfDisabled($event) {
18877
+ if (this.disabled) {
18878
+ $event.stopImmediatePropagation();
20442
18879
  }
20443
18880
  }
20444
18881
  }
20445
- ClrDropdownItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDropdownItem, deps: [{ token: ClrDropdown }, { token: i0.ElementRef }, { token: RootDropdownService }, { token: i0.Renderer2 }, { token: FocusableItem }], target: i0.ɵɵFactoryTarget.Directive });
20446
- ClrDropdownItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrDropdownItem, selector: "[clrDropdownItem]", inputs: { disabled: ["clrDisabled", "disabled"], disabledDeprecated: ["disabled", "disabledDeprecated"], dropdownItemId: ["id", "dropdownItemId"] }, host: { properties: { "class.disabled": "disabled", "class.dropdown-item": "true", "attr.role": "\"menuitem\"", "attr.aria-disabled": "disabled", "attr.disabled": "(disabled && setByDeprecatedDisabled)? '' : null", "attr.id": "dropdownItemId" } }, providers: [BASIC_FOCUSABLE_ITEM_PROVIDER], ngImport: i0 });
18882
+ ClrDropdownItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDropdownItem, deps: [{ token: ClrDropdown }, { token: RootDropdownService }, { token: FocusableItem }], target: i0.ɵɵFactoryTarget.Directive });
18883
+ ClrDropdownItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrDropdownItem, selector: "[clrDropdownItem]", inputs: { disabled: ["clrDisabled", "disabled"], dropdownItemId: ["id", "dropdownItemId"] }, host: { listeners: { "click": "onDropdownItemClick()", "keydown.space": "onSpaceKeydown($event)", "keydown.enter": "onEnterKeydown($event)" }, properties: { "class.disabled": "disabled", "class.dropdown-item": "true", "attr.role": "\"menuitem\"", "attr.aria-disabled": "disabled", "attr.id": "dropdownItemId" } }, providers: [BASIC_FOCUSABLE_ITEM_PROVIDER], ngImport: i0 });
20447
18884
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrDropdownItem, decorators: [{
20448
18885
  type: Directive,
20449
18886
  args: [{
@@ -20453,20 +18890,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
20453
18890
  '[class.dropdown-item]': 'true',
20454
18891
  '[attr.role]': '"menuitem"',
20455
18892
  '[attr.aria-disabled]': 'disabled',
20456
- '[attr.disabled]': "(disabled && setByDeprecatedDisabled)? '' : null",
20457
18893
  '[attr.id]': 'dropdownItemId',
20458
18894
  },
20459
18895
  providers: [BASIC_FOCUSABLE_ITEM_PROVIDER],
20460
18896
  }]
20461
- }], ctorParameters: function () { return [{ type: ClrDropdown }, { type: i0.ElementRef }, { type: RootDropdownService }, { type: i0.Renderer2 }, { type: FocusableItem }]; }, propDecorators: { disabled: [{
18897
+ }], ctorParameters: function () { return [{ type: ClrDropdown }, { type: RootDropdownService }, { type: FocusableItem }]; }, propDecorators: { disabled: [{
20462
18898
  type: Input,
20463
18899
  args: ['clrDisabled']
20464
- }], disabledDeprecated: [{
20465
- type: Input,
20466
- args: ['disabled']
20467
18900
  }], dropdownItemId: [{
20468
18901
  type: Input,
20469
18902
  args: ['id']
18903
+ }], onDropdownItemClick: [{
18904
+ type: HostListener,
18905
+ args: ['click']
18906
+ }], onSpaceKeydown: [{
18907
+ type: HostListener,
18908
+ args: ['keydown.space', ['$event']]
18909
+ }], onEnterKeydown: [{
18910
+ type: HostListener,
18911
+ args: ['keydown.enter', ['$event']]
20470
18912
  }] } });
20471
18913
 
20472
18914
  /*
@@ -21971,143 +20413,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
21971
20413
  }]
21972
20414
  }], ctorParameters: function () { return [{ type: ResponsiveNavigationService }, { type: ClrCommonStringsService }]; } });
21973
20415
 
21974
- /*
21975
- * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
21976
- * This software is released under MIT license.
21977
- * The full license information can be found in LICENSE in the root directory of this project.
21978
- */
21979
- function refocusIfOutsideFocusTrapElement(focusedElement, focusTrapElement, elementToRefocus) {
21980
- const focusTrapIsCurrent = FocusTrapTrackerService.getCurrent() === focusTrapElement;
21981
- const elementToFocusIsOutsideFocusTrap = elementIsOutsideFocusTrapElement(focusedElement, focusTrapElement);
21982
- if (focusTrapIsCurrent && elementToFocusIsOutsideFocusTrap) {
21983
- elementToRefocus = elementToRefocus || focusTrapElement;
21984
- elementToRefocus.focus();
21985
- }
21986
- else {
21987
- focusedElement.focus();
21988
- }
21989
- }
21990
- function elementIsOutsideFocusTrapElement(focusedElement, focusTrapElement) {
21991
- if (focusedElement === focusTrapElement.topReboundElement ||
21992
- focusedElement === focusTrapElement.bottomReboundElement) {
21993
- return true;
21994
- }
21995
- const elementIsInFocusTrapLightDom = focusTrapElement.contains(focusedElement);
21996
- if (elementIsInFocusTrapLightDom) {
21997
- return false;
21998
- }
21999
- if (focusTrapElement !== null && focusTrapElement.contains(focusedElement)) {
22000
- return false;
22001
- }
22002
- return true;
22003
- }
22004
- function createFocusTrapReboundElement(document) {
22005
- const offScreenSpan = document.createElement('span');
22006
- offScreenSpan.setAttribute('tabindex', '0');
22007
- offScreenSpan.classList.add('offscreen-focus-rebounder');
22008
- return offScreenSpan;
22009
- }
22010
- function addReboundElementsToFocusTrapElement(document, focusTrapElement) {
22011
- if (focusTrapElement && !focusTrapElement.topReboundElement && !focusTrapElement.bottomReboundElement) {
22012
- focusTrapElement.topReboundElement = createFocusTrapReboundElement(document);
22013
- focusTrapElement.bottomReboundElement = createFocusTrapReboundElement(document);
22014
- const parent = focusTrapElement.parentElement;
22015
- const sibling = focusTrapElement.nextSibling;
22016
- if (parent) {
22017
- parent.insertBefore(focusTrapElement.topReboundElement, focusTrapElement);
22018
- if (sibling) {
22019
- parent.insertBefore(focusTrapElement.bottomReboundElement, sibling);
22020
- }
22021
- else {
22022
- parent.appendChild(focusTrapElement.bottomReboundElement);
22023
- }
22024
- }
22025
- }
22026
- }
22027
- function removeReboundElementsFromFocusTrapElement(focusTrapElement) {
22028
- if (focusTrapElement) {
22029
- const parent = focusTrapElement.parentElement;
22030
- if (parent) {
22031
- const topRebound = focusTrapElement.topReboundElement;
22032
- const bottomRebound = focusTrapElement.bottomReboundElement;
22033
- if (topRebound) {
22034
- parent.removeChild(topRebound);
22035
- }
22036
- if (bottomRebound) {
22037
- parent.removeChild(bottomRebound);
22038
- }
22039
- }
22040
- // These are here to to make sure that we completely delete all traces of the removed DOM objects.
22041
- delete focusTrapElement.topReboundElement;
22042
- delete focusTrapElement.bottomReboundElement;
22043
- }
22044
- }
22045
- // this helper exists to enable the focus trap class to handle vanilla html elements
22046
- // it's primary concern is to keep TS happy.
22047
- function castHtmlElementToFocusTrapElement(el) {
22048
- return el;
22049
- }
22050
- class FocusTrap {
22051
- constructor(renderer, injector, platformId, hostElement) {
22052
- this.renderer = renderer;
22053
- this.active = false;
22054
- if (isPlatformBrowser(platformId)) {
22055
- this._document = injector.get(DOCUMENT);
22056
- }
22057
- hostElement = castHtmlElementToFocusTrapElement(hostElement);
22058
- if (!hostElement.focusTrapId) {
22059
- hostElement.focusTrapId = createId();
22060
- }
22061
- this.focusTrapElement = hostElement;
22062
- }
22063
- enableFocusTrap() {
22064
- const fte = this.focusTrapElement;
22065
- const firstFocusElement = fte.querySelector('[cds-first-focus]');
22066
- const activeEl = this._document.activeElement;
22067
- if (FocusTrapTrackerService.getCurrent() === fte) {
22068
- throw new Error('Focus trap is already enabled for this instance.');
22069
- }
22070
- this.firstFocusElement = firstFocusElement || this.focusTrapElement;
22071
- addReboundElementsToFocusTrapElement(this._document, fte);
22072
- if (!isFocusable(fte)) {
22073
- fte.setAttribute('tabindex', '-1');
22074
- }
22075
- if (activeEl && isHTMLElement(activeEl)) {
22076
- this.previousFocus = activeEl;
22077
- }
22078
- FocusTrapTrackerService.setCurrent(fte);
22079
- // setTimeout here is required for Safari which may try to set focus on
22080
- // element before it is visible...
22081
- const focusTimer = setTimeout(() => {
22082
- this.firstFocusElement.focus();
22083
- clearTimeout(focusTimer);
22084
- }, 10);
22085
- this.onFocusInEvent = this.onFocusIn.bind(this);
22086
- this.unlisten = this.renderer.listen(this._document, 'focusin', this.onFocusInEvent);
22087
- this.active = true;
22088
- }
22089
- removeFocusTrap() {
22090
- if (this.unlisten) {
22091
- this.unlisten();
22092
- }
22093
- removeReboundElementsFromFocusTrapElement(this.focusTrapElement);
22094
- this.renderer.removeAttribute(this.focusTrapElement, 'tabindex');
22095
- FocusTrapTrackerService.activatePreviousCurrent();
22096
- this.active = false;
22097
- if (this.previousFocus) {
22098
- this.previousFocus.focus();
22099
- }
22100
- }
22101
- onFocusIn(event) {
22102
- refocusIfOutsideFocusTrapElement(event.composedPath()[0], this.focusTrapElement, this.firstFocusElement);
22103
- }
22104
- }
22105
- FocusTrap.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrap, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
22106
- FocusTrap.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrap });
22107
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: FocusTrap, decorators: [{
22108
- type: Injectable
22109
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.Injector }, { type: undefined }, { type: undefined }]; } });
22110
-
22111
20416
  /*
22112
20417
  * Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
22113
20418
  * This software is released under MIT license.
@@ -22126,11 +20431,22 @@ const createCdsCloseButton = (document, ariaLabel) => {
22126
20431
  cdsCloseButton.className = 'clr-nav-close';
22127
20432
  return cdsCloseButton;
22128
20433
  };
22129
- class ClrNavLevel extends FocusTrap {
22130
- constructor(platformId, responsiveNavService, elementRef, renderer, injector) {
22131
- super(renderer, injector, platformId, elementRef.nativeElement);
20434
+ class StandaloneCdkTrapFocus extends CdkTrapFocus {
20435
+ }
20436
+ StandaloneCdkTrapFocus.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StandaloneCdkTrapFocus, deps: null, target: i0.ɵɵFactoryTarget.Directive });
20437
+ StandaloneCdkTrapFocus.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: StandaloneCdkTrapFocus, isStandalone: true, usesInheritance: true, ngImport: i0 });
20438
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: StandaloneCdkTrapFocus, decorators: [{
20439
+ type: Directive,
20440
+ args: [{
20441
+ standalone: true,
20442
+ }]
20443
+ }] });
20444
+ class ClrNavLevel {
20445
+ constructor(platformId, cdkTrapFocus, responsiveNavService, elementRef, renderer, injector) {
20446
+ this.cdkTrapFocus = cdkTrapFocus;
22132
20447
  this.responsiveNavService = responsiveNavService;
22133
20448
  this.elementRef = elementRef;
20449
+ this.renderer = renderer;
22134
20450
  this._isOpen = false;
22135
20451
  if (isPlatformBrowser(platformId)) {
22136
20452
  this._document = injector.get(DOCUMENT);
@@ -22150,6 +20466,7 @@ class ClrNavLevel extends FocusTrap {
22150
20466
  .subscribe(() => this.close()));
22151
20467
  }
22152
20468
  ngOnInit() {
20469
+ this.cdkTrapFocus.enabled = false;
22153
20470
  if (!this.closeButtonAriaLabel) {
22154
20471
  this.closeButtonAriaLabel =
22155
20472
  this._level === ResponsiveNavCodes.NAV_LEVEL_1
@@ -22207,14 +20524,14 @@ class ClrNavLevel extends FocusTrap {
22207
20524
  open() {
22208
20525
  this._isOpen = true;
22209
20526
  this.showNavigation();
22210
- this.enableFocusTrap();
20527
+ this.cdkTrapFocus.enabled = true;
22211
20528
  this.showCloseButton();
22212
20529
  this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_OPEN, this.level);
22213
20530
  }
22214
20531
  close() {
22215
20532
  this._isOpen = false;
22216
20533
  this.hideNavigation();
22217
- this.removeFocusTrap();
20534
+ this.cdkTrapFocus.enabled = false;
22218
20535
  this.hideCloseButton();
22219
20536
  this.responsiveNavService.sendControlMessage(ResponsiveNavCodes.NAV_CLOSE, this.level);
22220
20537
  }
@@ -22259,18 +20576,19 @@ class ClrNavLevel extends FocusTrap {
22259
20576
  this._subscription.unsubscribe();
22260
20577
  }
22261
20578
  }
22262
- ClrNavLevel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrNavLevel, deps: [{ token: PLATFORM_ID }, { token: ResponsiveNavigationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
22263
- ClrNavLevel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrNavLevel, selector: "[clr-nav-level]", inputs: { _level: ["clr-nav-level", "_level"], closeButtonAriaLabel: ["closeAriaLabel", "closeButtonAriaLabel"] }, host: { listeners: { "window:resize": "onResize($event)", "click": "onMouseClick($event.target)" } }, usesInheritance: true, ngImport: i0 });
20579
+ ClrNavLevel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrNavLevel, deps: [{ token: PLATFORM_ID }, { token: StandaloneCdkTrapFocus }, { token: ResponsiveNavigationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Directive });
20580
+ ClrNavLevel.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.2", type: ClrNavLevel, selector: "[clr-nav-level]", inputs: { _level: ["clr-nav-level", "_level"], closeButtonAriaLabel: ["closeAriaLabel", "closeButtonAriaLabel"] }, host: { listeners: { "window:resize": "onResize($event)", "click": "onMouseClick($event.target)" } }, hostDirectives: [{ directive: StandaloneCdkTrapFocus }], ngImport: i0 });
22264
20581
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrNavLevel, decorators: [{
22265
20582
  type: Directive,
22266
20583
  args: [{
22267
20584
  selector: '[clr-nav-level]',
20585
+ hostDirectives: [StandaloneCdkTrapFocus],
22268
20586
  }]
22269
20587
  }], ctorParameters: function () {
22270
20588
  return [{ type: undefined, decorators: [{
22271
20589
  type: Inject,
22272
20590
  args: [PLATFORM_ID]
22273
- }] }, { type: ResponsiveNavigationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }];
20591
+ }] }, { type: StandaloneCdkTrapFocus }, { type: ResponsiveNavigationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.Injector }];
22274
20592
  }, propDecorators: { _level: [{
22275
20593
  type: Input,
22276
20594
  args: ['clr-nav-level']
@@ -23275,7 +21593,6 @@ class ClrVerticalNavGroup {
23275
21593
  this._navService = _navService;
23276
21594
  this.commonStrings = commonStrings;
23277
21595
  this.wasExpanded = false;
23278
- this.groupLabel = this.commonStrings.keys.verticalNavGroupToggle;
23279
21596
  this.expandedChange = new EventEmitter(true);
23280
21597
  this._subscriptions = [];
23281
21598
  this._expandAnimationState = COLLAPSED_STATE;
@@ -23385,7 +21702,7 @@ class ClrVerticalNavGroup {
23385
21702
  }
23386
21703
  }
23387
21704
  ClrVerticalNavGroup.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrVerticalNavGroup, deps: [{ token: IfExpandService }, { token: VerticalNavGroupRegistrationService }, { token: VerticalNavGroupService }, { token: VerticalNavService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
23388
- ClrVerticalNavGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrVerticalNavGroup, selector: "clr-vertical-nav-group", inputs: { groupLabel: ["clrVerticalNavGroupLabel", "groupLabel"], userExpandedInput: ["clrVerticalNavGroupExpanded", "userExpandedInput"] }, outputs: { expandedChange: "clrVerticalNavGroupExpandedChange" }, host: { properties: { "class.is-expanded": "this.expanded" }, classAttribute: "nav-group" }, providers: [IfExpandService, VerticalNavGroupService], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div class=\"nav-group-content\">\n <ng-content select=\"[clrVerticalNavLink]\"></ng-content>\n <button\n class=\"nav-group-trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"groupLabel\"\n (click)=\"toggleExpand()\"\n >\n <ng-content select=\"[clrVerticalNavIcon]\"></ng-content>\n <div class=\"nav-group-text\">\n <ng-content></ng-content>\n </div>\n <cds-icon\n shape=\"angle\"\n class=\"nav-group-trigger-icon\"\n [attr.direction]=\"expanded ? 'down' : 'right'\"\n [attr.title]=\"expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n</div>\n<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->\n<div class=\"nav-group-children\" [@clrExpand]=\"expandAnimationState\" (@clrExpand.done)=\"expandAnimationDone($event)\">\n <ng-content select=\"[clrIfExpanded], clr-vertical-nav-group-children\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }], animations: [
21705
+ ClrVerticalNavGroup.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrVerticalNavGroup, selector: "clr-vertical-nav-group", inputs: { userExpandedInput: ["clrVerticalNavGroupExpanded", "userExpandedInput"] }, outputs: { expandedChange: "clrVerticalNavGroupExpandedChange" }, host: { properties: { "class.is-expanded": "this.expanded" }, classAttribute: "nav-group" }, providers: [IfExpandService, VerticalNavGroupService], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div class=\"nav-group-content\">\n <ng-content select=\"[clrVerticalNavLink]\"></ng-content>\n <button class=\"nav-group-trigger\" type=\"button\" [attr.aria-expanded]=\"expanded\" (click)=\"toggleExpand()\">\n <ng-content select=\"[clrVerticalNavIcon]\"></ng-content>\n <div class=\"nav-group-text\">\n <ng-content></ng-content>\n </div>\n <cds-icon\n shape=\"angle\"\n class=\"nav-group-trigger-icon\"\n [attr.direction]=\"expanded ? 'down' : 'right'\"\n [attr.title]=\"expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n</div>\n<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->\n<div class=\"nav-group-children\" [@clrExpand]=\"expandAnimationState\" (@clrExpand.done)=\"expandAnimationDone($event)\">\n <ng-content select=\"[clrIfExpanded], clr-vertical-nav-group-children\"></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }], animations: [
23389
21706
  trigger('clrExpand', [
23390
21707
  state(EXPANDED_STATE, style({ height: '*' })),
23391
21708
  state(COLLAPSED_STATE, style({ height: 0, visibility: 'hidden' })),
@@ -23400,13 +21717,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
23400
21717
  state(COLLAPSED_STATE, style({ height: 0, visibility: 'hidden' })),
23401
21718
  transition(`${EXPANDED_STATE} <=> ${COLLAPSED_STATE}`, animate('0.2s ease-in-out')),
23402
21719
  ]),
23403
- ], host: { class: 'nav-group' }, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div class=\"nav-group-content\">\n <ng-content select=\"[clrVerticalNavLink]\"></ng-content>\n <button\n class=\"nav-group-trigger\"\n type=\"button\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-label]=\"groupLabel\"\n (click)=\"toggleExpand()\"\n >\n <ng-content select=\"[clrVerticalNavIcon]\"></ng-content>\n <div class=\"nav-group-text\">\n <ng-content></ng-content>\n </div>\n <cds-icon\n shape=\"angle\"\n class=\"nav-group-trigger-icon\"\n [attr.direction]=\"expanded ? 'down' : 'right'\"\n [attr.title]=\"expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n</div>\n<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->\n<div class=\"nav-group-children\" [@clrExpand]=\"expandAnimationState\" (@clrExpand.done)=\"expandAnimationDone($event)\">\n <ng-content select=\"[clrIfExpanded], clr-vertical-nav-group-children\"></ng-content>\n</div>\n" }]
21720
+ ], host: { class: 'nav-group' }, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div class=\"nav-group-content\">\n <ng-content select=\"[clrVerticalNavLink]\"></ng-content>\n <button class=\"nav-group-trigger\" type=\"button\" [attr.aria-expanded]=\"expanded\" (click)=\"toggleExpand()\">\n <ng-content select=\"[clrVerticalNavIcon]\"></ng-content>\n <div class=\"nav-group-text\">\n <ng-content></ng-content>\n </div>\n <cds-icon\n shape=\"angle\"\n class=\"nav-group-trigger-icon\"\n [attr.direction]=\"expanded ? 'down' : 'right'\"\n [attr.title]=\"expanded ? commonStrings.keys.collapse : commonStrings.keys.expand\"\n ></cds-icon>\n </button>\n</div>\n<!--TODO: This animation needs to be added to the clr-vertical-nav-group-children component-->\n<div class=\"nav-group-children\" [@clrExpand]=\"expandAnimationState\" (@clrExpand.done)=\"expandAnimationDone($event)\">\n <ng-content select=\"[clrIfExpanded], clr-vertical-nav-group-children\"></ng-content>\n</div>\n" }]
23404
21721
  }], ctorParameters: function () { return [{ type: IfExpandService }, { type: VerticalNavGroupRegistrationService }, { type: VerticalNavGroupService }, { type: VerticalNavService }, { type: ClrCommonStringsService }]; }, propDecorators: { expanded: [{
23405
21722
  type: HostBinding,
23406
21723
  args: ['class.is-expanded']
23407
- }], groupLabel: [{
23408
- type: Input,
23409
- args: ['clrVerticalNavGroupLabel']
23410
21724
  }], userExpandedInput: [{
23411
21725
  type: Input,
23412
21726
  args: ['clrVerticalNavGroupExpanded']
@@ -23605,15 +21919,13 @@ class ClrModal {
23605
21919
  this.closeButtonAriaLabel = this.commonStrings.keys.close;
23606
21920
  this.staticBackdrop = true;
23607
21921
  this.skipAnimation = 'false';
23608
- // presently this is only used by wizards
23609
- this.bypassScrollService = false;
23610
21922
  this.stopClose = false;
23611
21923
  this.altClose = new EventEmitter(false);
23612
21924
  this.labelledBy = this.modalId;
23613
21925
  }
23614
21926
  // Detect when _open is set to true and set no-scrolling to true
23615
21927
  ngOnChanges(changes) {
23616
- if (!this.bypassScrollService && changes && Object.prototype.hasOwnProperty.call(changes, '_open')) {
21928
+ if (changes && Object.prototype.hasOwnProperty.call(changes, '_open')) {
23617
21929
  if (changes._open.currentValue) {
23618
21930
  this._scrollingService.stopScrolling();
23619
21931
  }
@@ -23641,8 +21953,6 @@ class ClrModal {
23641
21953
  return;
23642
21954
  }
23643
21955
  this._open = false;
23644
- // SPECME
23645
- this.focusTrap.setPreviousFocus(); // Handles moving focus back to the element that had it before.
23646
21956
  }
23647
21957
  fadeDone(e) {
23648
21958
  if (e.toState === 'void') {
@@ -23652,7 +21962,7 @@ class ClrModal {
23652
21962
  }
23653
21963
  }
23654
21964
  ClrModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrModal, deps: [{ token: ScrollingService }, { token: ClrCommonStringsService }], target: i0.ɵɵFactoryTarget.Component });
23655
- ClrModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrModal, selector: "clr-modal", inputs: { _open: ["clrModalOpen", "_open"], closable: ["clrModalClosable", "closable"], closeButtonAriaLabel: ["clrModalCloseButtonAriaLabel", "closeButtonAriaLabel"], size: ["clrModalSize", "size"], staticBackdrop: ["clrModalStaticBackdrop", "staticBackdrop"], skipAnimation: ["clrModalSkipAnimation", "skipAnimation"], bypassScrollService: ["clrModalOverrideScrollService", "bypassScrollService"], stopClose: ["clrModalPreventClose", "stopClose"], labelledBy: ["clrModalLabelledById", "labelledBy"] }, outputs: { _openChanged: "clrModalOpenChange", altClose: "clrModalAlternateClose" }, host: { listeners: { "body:keyup.escape": "close()" }, properties: { "class.open": "this._open" } }, viewQueries: [{ propertyName: "focusTrap", first: true, predicate: FocusTrapDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div clrFocusTrap class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: FocusTrapDirective, selector: "[clrFocusTrap]", inputs: ["clrFocusTrap"] }, { kind: "directive", type: ClrFocusOnViewInit, selector: "[clrFocusOnViewInit]", inputs: ["clrFocusOnViewInit"] }], viewProviders: [ScrollingService], animations: [
21965
+ ClrModal.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrModal, selector: "clr-modal", inputs: { _open: ["clrModalOpen", "_open"], closable: ["clrModalClosable", "closable"], closeButtonAriaLabel: ["clrModalCloseButtonAriaLabel", "closeButtonAriaLabel"], size: ["clrModalSize", "size"], staticBackdrop: ["clrModalStaticBackdrop", "staticBackdrop"], skipAnimation: ["clrModalSkipAnimation", "skipAnimation"], stopClose: ["clrModalPreventClose", "stopClose"], labelledBy: ["clrModalLabelledById", "labelledBy"] }, outputs: { _openChanged: "clrModalOpenChange", altClose: "clrModalAlternateClose" }, host: { listeners: { "body:keyup.escape": "close()" }, properties: { "class.open": "this._open" } }, usesOnChanges: true, ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div cdkTrapFocus class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: CdkTrapFocusModule_CdkTrapFocus, selector: "[cdkTrapFocus]" }, { kind: "directive", type: CdsIconCustomTag, selector: "cds-icon" }, { kind: "directive", type: ClrFocusOnViewInit, selector: "[clrFocusOnViewInit]", inputs: ["clrFocusOnViewInit"] }], viewProviders: [ScrollingService], animations: [
23656
21966
  trigger('fadeDown', [
23657
21967
  transition('* => false', [style({ opacity: 0, transform: 'translate(0, -25%)' }), animate('0.2s ease-in-out')]),
23658
21968
  transition('false => *', [animate('0.2s ease-in-out', style({ opacity: 0, transform: 'translate(0, -25%)' }))]),
@@ -23673,11 +21983,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
23673
21983
  transition('void => *', [style({ opacity: 0 }), animate('0.2s ease-in-out', style({ opacity: 0.85 }))]),
23674
21984
  transition('* => void', [animate('0.2s ease-in-out', style({ opacity: 0 }))]),
23675
21985
  ]),
23676
- ], template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div clrFocusTrap class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"] }]
23677
- }], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }]; }, propDecorators: { focusTrap: [{
23678
- type: ViewChild,
23679
- args: [FocusTrapDirective]
23680
- }], _open: [{
21986
+ ], template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<div cdkTrapFocus class=\"modal\" *ngIf=\"_open\">\n <!--fixme: revisit when ngClass works with exit animation-->\n <div\n [@fadeDown]=\"skipAnimation\"\n (@fadeDown.done)=\"fadeDone($event)\"\n class=\"modal-dialog\"\n [class.modal-sm]=\"size == 'sm'\"\n [class.modal-lg]=\"size == 'lg'\"\n [class.modal-xl]=\"size == 'xl'\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-hidden]=\"!_open\"\n [attr.aria-labelledby]=\"labelledBy\"\n >\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentStart}}</div>\n <div class=\"modal-content-wrapper\">\n <!-- only used in wizards -->\n <ng-content select=\".modal-nav\"></ng-content>\n\n <div class=\"modal-content\">\n <div class=\"modal-header--accessible\">\n <div class=\"modal-title-wrapper\" id=\"{{modalId}}\" clrFocusOnViewInit>\n <ng-content select=\".modal-title\"></ng-content>\n </div>\n <button\n type=\"button\"\n [attr.aria-label]=\"closeButtonAriaLabel || commonStrings.keys.close\"\n class=\"close\"\n *ngIf=\"closable\"\n (click)=\"close()\"\n >\n <cds-icon shape=\"window-close\"></cds-icon>\n </button>\n </div>\n <div class=\"modal-body-wrapper\">\n <ng-content select=\".modal-body\"></ng-content>\n </div>\n <ng-content select=\".modal-footer\"></ng-content>\n </div>\n </div>\n <div class=\"clr-sr-only\">{{commonStrings.keys.modalContentEnd}}</div>\n </div>\n\n <div [@fade] class=\"modal-backdrop\" aria-hidden=\"true\" (click)=\"staticBackdrop || close()\"></div>\n</div>\n", styles: [":host{display:none}:host.open{display:inline}\n"] }]
21987
+ }], ctorParameters: function () { return [{ type: ScrollingService }, { type: ClrCommonStringsService }]; }, propDecorators: { _open: [{
23681
21988
  type: HostBinding,
23682
21989
  args: ['class.open']
23683
21990
  }, {
@@ -23701,9 +22008,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
23701
22008
  }], skipAnimation: [{
23702
22009
  type: Input,
23703
22010
  args: ['clrModalSkipAnimation']
23704
- }], bypassScrollService: [{
23705
- type: Input,
23706
- args: ['clrModalOverrideScrollService']
23707
22011
  }], stopClose: [{
23708
22012
  type: Input,
23709
22013
  args: ['clrModalPreventClose']
@@ -23792,12 +22096,12 @@ class ClrModalModule {
23792
22096
  }
23793
22097
  }
23794
22098
  ClrModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
23795
- ClrModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrModalModule, declarations: [ClrModal, ClrModalBody], imports: [CommonModule, ClrIconModule, ClrFocusTrapModule, ClrFocusOnViewInitModule], exports: [ClrModal, ClrModalBody, ClrIconModule, ClrFocusOnViewInitModule] });
23796
- ClrModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrModalModule, imports: [CommonModule, ClrIconModule, ClrFocusTrapModule, ClrFocusOnViewInitModule, ClrIconModule, ClrFocusOnViewInitModule] });
22099
+ ClrModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.2", ngImport: i0, type: ClrModalModule, declarations: [ClrModal, ClrModalBody], imports: [CommonModule, CdkTrapFocusModule, ClrIconModule, ClrFocusOnViewInitModule], exports: [ClrModal, ClrModalBody, ClrIconModule, ClrFocusOnViewInitModule] });
22100
+ ClrModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrModalModule, imports: [CommonModule, CdkTrapFocusModule, ClrIconModule, ClrFocusOnViewInitModule, ClrIconModule, ClrFocusOnViewInitModule] });
23797
22101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrModalModule, decorators: [{
23798
22102
  type: NgModule,
23799
22103
  args: [{
23800
- imports: [CommonModule, ClrIconModule, ClrFocusTrapModule, ClrFocusOnViewInitModule],
22104
+ imports: [CommonModule, CdkTrapFocusModule, ClrIconModule, ClrFocusOnViewInitModule],
23801
22105
  declarations: [CLR_MODAL_DIRECTIVES],
23802
22106
  exports: [CLR_MODAL_DIRECTIVES, ClrIconModule, ClrFocusOnViewInitModule],
23803
22107
  }]
@@ -26767,13 +25071,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
26767
25071
  * The full license information can be found in LICENSE in the root directory of this project.
26768
25072
  */
26769
25073
  class ClrWizard {
26770
- constructor(platformId, navService, pageCollection, buttonService, headerActionService, elementRef, differs) {
25074
+ constructor(platformId, navService, pageCollection, buttonService, headerActionService, differs) {
26771
25075
  this.platformId = platformId;
26772
25076
  this.navService = navService;
26773
25077
  this.pageCollection = pageCollection;
26774
25078
  this.buttonService = buttonService;
26775
25079
  this.headerActionService = headerActionService;
26776
- this.elementRef = elementRef;
26777
25080
  /**
26778
25081
  * Set the modal size of the wizard. Set using `[clrWizardSize]` input.
26779
25082
  */
@@ -26789,13 +25092,6 @@ class ClrWizard {
26789
25092
  this._stopCancel = false;
26790
25093
  this._stopNavigation = false;
26791
25094
  this._disableStepnav = false;
26792
- /**
26793
- * Used to communicate to the underlying modal that animations are not
26794
- * wanted. Primary use is for the display of static/inline wizards.
26795
- * Set using `[clrWizardPreventModalAnimation]` input.
26796
- */
26797
- /** @deprecated since 3.0, input should be removed in 4.0 because is only related to inline wizards */
26798
- this._stopModalAnimations = false;
26799
25095
  /**
26800
25096
  * Emits when the wizard is opened or closed.
26801
25097
  * Listen via `(clrWizardOpenChange)` event.
@@ -26916,9 +25212,6 @@ class ClrWizard {
26916
25212
  get disableStepnav() {
26917
25213
  return this._disableStepnav;
26918
25214
  }
26919
- get stopModalAnimations() {
26920
- return this._stopModalAnimations ? 'true' : 'false';
26921
- }
26922
25215
  get currentPage() {
26923
25216
  return this.navService.currentPage;
26924
25217
  }
@@ -26931,13 +25224,9 @@ class ClrWizard {
26931
25224
  get isFirst() {
26932
25225
  return this.navService.currentPageIsFirst;
26933
25226
  }
26934
- get isStatic() {
26935
- return this.elementRef.nativeElement.classList.contains('clr-wizard--inline');
26936
- }
26937
25227
  ngAfterContentInit() {
26938
25228
  this.pageCollection.pages = this.pages;
26939
25229
  this.headerActionService.wizardHeaderActions = this.headerActions;
26940
- this.initializeButtons();
26941
25230
  }
26942
25231
  ngDoCheck() {
26943
25232
  this.updateNavOnPageChanges();
@@ -27142,12 +25431,6 @@ class ClrWizard {
27142
25431
  changes.forEachRemovedItem(() => this.navService.updateNavigation());
27143
25432
  }
27144
25433
  }
27145
- initializeButtons() {
27146
- // Only trigger buttons ready if default is open (inlined)
27147
- if (this._open) {
27148
- this.buttonService.buttonsReady = true;
27149
- }
27150
- }
27151
25434
  emitWizardFinished() {
27152
25435
  if (!this.stopNext) {
27153
25436
  this.forceFinish();
@@ -27155,8 +25438,8 @@ class ClrWizard {
27155
25438
  this.wizardFinished.emit();
27156
25439
  }
27157
25440
  }
27158
- ClrWizard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrWizard, deps: [{ token: PLATFORM_ID }, { token: WizardNavigationService }, { token: PageCollectionService }, { token: ButtonHubService }, { token: HeaderActionService }, { token: i0.ElementRef }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
27159
- ClrWizard.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrWizard, selector: "clr-wizard", inputs: { size: ["clrWizardSize", "size"], closable: ["clrWizardClosable", "closable"], forceForward: ["clrWizardForceForwardNavigation", "forceForward"], clrWizardOpen: "clrWizardOpen", stopNext: ["clrWizardPreventDefaultNext", "stopNext"], stopCancel: ["clrWizardPreventDefaultCancel", "stopCancel"], stopNavigation: ["clrWizardPreventNavigation", "stopNavigation"], disableStepnav: ["clrWizardDisableStepnav", "disableStepnav"], _stopModalAnimations: ["clrWizardPreventModalAnimation", "_stopModalAnimations"] }, outputs: { _openChanged: "clrWizardOpenChange", onCancel: "clrWizardOnCancel", wizardFinished: "clrWizardOnFinish", onReset: "clrWizardOnReset", currentPageChanged: "clrWizardCurrentPageChanged", onMoveNext: "clrWizardOnNext", onMovePrevious: "clrWizardOnPrevious" }, host: { properties: { "class.clr-wizard": "true", "class.wizard-md": "size == 'md'", "class.wizard-lg": "size == 'lg'", "class.wizard-xl": "size == 'xl'", "class.lastPage": "navService.currentPageIsLast" } }, providers: [WizardNavigationService, PageCollectionService, ButtonHubService, HeaderActionService], queries: [{ propertyName: "pages", predicate: ClrWizardPage, descendants: true }, { propertyName: "headerActions", predicate: ClrWizardHeaderAction }], viewQueries: [{ propertyName: "wizardTitle", first: true, predicate: ["wizardTitle"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalSkipAnimation]=\"stopModalAnimations\"\n [clrModalOverrideScrollService]=\"isStatic\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <nav class=\"modal-nav clr-wizard-stepnav-wrapper\">\n <h1 class=\"clr-wizard-title\" id=\"{{wizardId}}\"><ng-content select=\"clr-wizard-title\"></ng-content></h1>\n <clr-wizard-stepnav></clr-wizard-stepnav>\n </nav>\n\n <h2 class=\"modal-title\">\n <span tabindex=\"-1\" #wizardTitle class=\"modal-title-text\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPageTitle\"></ng-template>\n </span>\n\n <div class=\"modal-header-actions-wrapper\" *ngIf=\"headerActionService.displayHeaderActionsWrapper\">\n <div *ngIf=\"headerActionService.showWizardHeaderActions\">\n <ng-content select=\"clr-wizard-header-action\"></ng-content>\n </div>\n <div *ngIf=\"headerActionService.currentPageHasHeaderActions\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.headerActions\"></ng-template>\n </div>\n </div>\n </h2>\n\n <div class=\"modal-body\">\n <main clr-wizard-pages-wrapper class=\"clr-wizard-content\">\n <ng-content></ng-content>\n </main>\n </div>\n <div class=\"modal-footer clr-wizard-footer\">\n <div class=\"clr-wizard-footer-buttons\">\n <div\n *ngIf=\"navService.currentPage && !navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-content select=\"clr-wizard-button\"></ng-content>\n </div>\n <div\n *ngIf=\"navService.currentPage && navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.buttons\"></ng-template>\n </div>\n </div>\n </div>\n</clr-modal>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ClrModal, selector: "clr-modal", inputs: ["clrModalOpen", "clrModalClosable", "clrModalCloseButtonAriaLabel", "clrModalSize", "clrModalStaticBackdrop", "clrModalSkipAnimation", "clrModalOverrideScrollService", "clrModalPreventClose", "clrModalLabelledById"], outputs: ["clrModalOpenChange", "clrModalAlternateClose"] }, { kind: "directive", type: ClrModalBody, selector: ".modal-body" }, { kind: "component", type: ClrWizardStepnav, selector: "clr-wizard-stepnav" }] });
25441
+ ClrWizard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrWizard, deps: [{ token: PLATFORM_ID }, { token: WizardNavigationService }, { token: PageCollectionService }, { token: ButtonHubService }, { token: HeaderActionService }, { token: i0.IterableDiffers }], target: i0.ɵɵFactoryTarget.Component });
25442
+ ClrWizard.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.2", type: ClrWizard, selector: "clr-wizard", inputs: { size: ["clrWizardSize", "size"], closable: ["clrWizardClosable", "closable"], forceForward: ["clrWizardForceForwardNavigation", "forceForward"], clrWizardOpen: "clrWizardOpen", stopNext: ["clrWizardPreventDefaultNext", "stopNext"], stopCancel: ["clrWizardPreventDefaultCancel", "stopCancel"], stopNavigation: ["clrWizardPreventNavigation", "stopNavigation"], disableStepnav: ["clrWizardDisableStepnav", "disableStepnav"] }, outputs: { _openChanged: "clrWizardOpenChange", onCancel: "clrWizardOnCancel", wizardFinished: "clrWizardOnFinish", onReset: "clrWizardOnReset", currentPageChanged: "clrWizardCurrentPageChanged", onMoveNext: "clrWizardOnNext", onMovePrevious: "clrWizardOnPrevious" }, host: { properties: { "class.clr-wizard": "true", "class.wizard-md": "size == 'md'", "class.wizard-lg": "size == 'lg'", "class.wizard-xl": "size == 'xl'", "class.lastPage": "navService.currentPageIsLast" } }, providers: [WizardNavigationService, PageCollectionService, ButtonHubService, HeaderActionService], queries: [{ propertyName: "pages", predicate: ClrWizardPage, descendants: true }, { propertyName: "headerActions", predicate: ClrWizardHeaderAction }], viewQueries: [{ propertyName: "wizardTitle", first: true, predicate: ["wizardTitle"], descendants: true }], ngImport: i0, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <nav class=\"modal-nav clr-wizard-stepnav-wrapper\">\n <h1 class=\"clr-wizard-title\" id=\"{{wizardId}}\"><ng-content select=\"clr-wizard-title\"></ng-content></h1>\n <clr-wizard-stepnav></clr-wizard-stepnav>\n </nav>\n\n <h2 class=\"modal-title\">\n <span tabindex=\"-1\" #wizardTitle class=\"modal-title-text\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPageTitle\"></ng-template>\n </span>\n\n <div class=\"modal-header-actions-wrapper\" *ngIf=\"headerActionService.displayHeaderActionsWrapper\">\n <div *ngIf=\"headerActionService.showWizardHeaderActions\">\n <ng-content select=\"clr-wizard-header-action\"></ng-content>\n </div>\n <div *ngIf=\"headerActionService.currentPageHasHeaderActions\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.headerActions\"></ng-template>\n </div>\n </div>\n </h2>\n\n <div class=\"modal-body\">\n <main clr-wizard-pages-wrapper class=\"clr-wizard-content\">\n <ng-content></ng-content>\n </main>\n </div>\n <div class=\"modal-footer clr-wizard-footer\">\n <div class=\"clr-wizard-footer-buttons\">\n <div\n *ngIf=\"navService.currentPage && !navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-content select=\"clr-wizard-button\"></ng-content>\n </div>\n <div\n *ngIf=\"navService.currentPage && navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.buttons\"></ng-template>\n </div>\n </div>\n </div>\n</clr-modal>\n", dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ClrModal, selector: "clr-modal", inputs: ["clrModalOpen", "clrModalClosable", "clrModalCloseButtonAriaLabel", "clrModalSize", "clrModalStaticBackdrop", "clrModalSkipAnimation", "clrModalPreventClose", "clrModalLabelledById"], outputs: ["clrModalOpenChange", "clrModalAlternateClose"] }, { kind: "directive", type: ClrModalBody, selector: ".modal-body" }, { kind: "component", type: ClrWizardStepnav, selector: "clr-wizard-stepnav" }] });
27160
25443
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImport: i0, type: ClrWizard, decorators: [{
27161
25444
  type: Component,
27162
25445
  args: [{ selector: 'clr-wizard', providers: [WizardNavigationService, PageCollectionService, ButtonHubService, HeaderActionService], host: {
@@ -27165,12 +25448,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
27165
25448
  '[class.wizard-lg]': "size == 'lg'",
27166
25449
  '[class.wizard-xl]': "size == 'xl'",
27167
25450
  '[class.lastPage]': 'navService.currentPageIsLast',
27168
- }, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalSkipAnimation]=\"stopModalAnimations\"\n [clrModalOverrideScrollService]=\"isStatic\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <nav class=\"modal-nav clr-wizard-stepnav-wrapper\">\n <h1 class=\"clr-wizard-title\" id=\"{{wizardId}}\"><ng-content select=\"clr-wizard-title\"></ng-content></h1>\n <clr-wizard-stepnav></clr-wizard-stepnav>\n </nav>\n\n <h2 class=\"modal-title\">\n <span tabindex=\"-1\" #wizardTitle class=\"modal-title-text\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPageTitle\"></ng-template>\n </span>\n\n <div class=\"modal-header-actions-wrapper\" *ngIf=\"headerActionService.displayHeaderActionsWrapper\">\n <div *ngIf=\"headerActionService.showWizardHeaderActions\">\n <ng-content select=\"clr-wizard-header-action\"></ng-content>\n </div>\n <div *ngIf=\"headerActionService.currentPageHasHeaderActions\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.headerActions\"></ng-template>\n </div>\n </div>\n </h2>\n\n <div class=\"modal-body\">\n <main clr-wizard-pages-wrapper class=\"clr-wizard-content\">\n <ng-content></ng-content>\n </main>\n </div>\n <div class=\"modal-footer clr-wizard-footer\">\n <div class=\"clr-wizard-footer-buttons\">\n <div\n *ngIf=\"navService.currentPage && !navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-content select=\"clr-wizard-button\"></ng-content>\n </div>\n <div\n *ngIf=\"navService.currentPage && navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.buttons\"></ng-template>\n </div>\n </div>\n </div>\n</clr-modal>\n" }]
25451
+ }, template: "<!--\n ~ Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.\n ~ This software is released under MIT license.\n ~ The full license information can be found in LICENSE in the root directory of this project.\n -->\n\n<clr-modal\n [clrModalOpen]=\"_open\"\n [clrModalSize]=\"size\"\n [clrModalClosable]=\"closable\"\n [clrModalStaticBackdrop]=\"true\"\n [clrModalPreventClose]=\"true\"\n (clrModalAlternateClose)=\"modalCancel()\"\n [clrModalLabelledById]=\"wizardId\"\n>\n <nav class=\"modal-nav clr-wizard-stepnav-wrapper\">\n <h1 class=\"clr-wizard-title\" id=\"{{wizardId}}\"><ng-content select=\"clr-wizard-title\"></ng-content></h1>\n <clr-wizard-stepnav></clr-wizard-stepnav>\n </nav>\n\n <h2 class=\"modal-title\">\n <span tabindex=\"-1\" #wizardTitle class=\"modal-title-text\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPageTitle\"></ng-template>\n </span>\n\n <div class=\"modal-header-actions-wrapper\" *ngIf=\"headerActionService.displayHeaderActionsWrapper\">\n <div *ngIf=\"headerActionService.showWizardHeaderActions\">\n <ng-content select=\"clr-wizard-header-action\"></ng-content>\n </div>\n <div *ngIf=\"headerActionService.currentPageHasHeaderActions\">\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.headerActions\"></ng-template>\n </div>\n </div>\n </h2>\n\n <div class=\"modal-body\">\n <main clr-wizard-pages-wrapper class=\"clr-wizard-content\">\n <ng-content></ng-content>\n </main>\n </div>\n <div class=\"modal-footer clr-wizard-footer\">\n <div class=\"clr-wizard-footer-buttons\">\n <div\n *ngIf=\"navService.currentPage && !navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-content select=\"clr-wizard-button\"></ng-content>\n </div>\n <div\n *ngIf=\"navService.currentPage && navService.currentPage.hasButtons\"\n class=\"clr-wizard-footer-buttons-wrapper\"\n >\n <ng-template [ngTemplateOutlet]=\"navService.currentPage.buttons\"></ng-template>\n </div>\n </div>\n </div>\n</clr-modal>\n" }]
27169
25452
  }], ctorParameters: function () {
27170
25453
  return [{ type: undefined, decorators: [{
27171
25454
  type: Inject,
27172
25455
  args: [PLATFORM_ID]
27173
- }] }, { type: WizardNavigationService }, { type: PageCollectionService }, { type: ButtonHubService }, { type: HeaderActionService }, { type: i0.ElementRef }, { type: i0.IterableDiffers }];
25456
+ }] }, { type: WizardNavigationService }, { type: PageCollectionService }, { type: ButtonHubService }, { type: HeaderActionService }, { type: i0.IterableDiffers }];
27174
25457
  }, propDecorators: { size: [{
27175
25458
  type: Input,
27176
25459
  args: ['clrWizardSize']
@@ -27195,9 +25478,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
27195
25478
  }], disableStepnav: [{
27196
25479
  type: Input,
27197
25480
  args: ['clrWizardDisableStepnav']
27198
- }], _stopModalAnimations: [{
27199
- type: Input,
27200
- args: ['clrWizardPreventModalAnimation']
27201
25481
  }], _openChanged: [{
27202
25482
  type: Output,
27203
25483
  args: ['clrWizardOpenChange']
@@ -27498,15 +25778,12 @@ ClarityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version:
27498
25778
  ClrModalModule,
27499
25779
  ClrLoadingModule,
27500
25780
  ClrConditionalModule,
27501
- ClrFocusTrapModule,
27502
25781
  ClrFocusOnViewInitModule,
27503
- ClrForTypeAheadModule,
27504
25782
  ClrButtonModule,
27505
25783
  ClrFormsModule,
27506
25784
  ClrLayoutModule,
27507
25785
  ClrPopoverModule,
27508
25786
  ClrWizardModule,
27509
- ClrDragAndDropModule,
27510
25787
  ClrStepperModule,
27511
25788
  ClrSpinnerModule,
27512
25789
  ClrProgressBarModule,
@@ -27518,15 +25795,12 @@ ClarityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version:
27518
25795
  ClrModalModule,
27519
25796
  ClrLoadingModule,
27520
25797
  ClrConditionalModule,
27521
- ClrFocusTrapModule,
27522
25798
  ClrFocusOnViewInitModule,
27523
- ClrForTypeAheadModule,
27524
25799
  ClrButtonModule,
27525
25800
  ClrFormsModule,
27526
25801
  ClrLayoutModule,
27527
25802
  ClrPopoverModule,
27528
25803
  ClrWizardModule,
27529
- ClrDragAndDropModule,
27530
25804
  ClrStepperModule,
27531
25805
  ClrSpinnerModule,
27532
25806
  ClrProgressBarModule,
@@ -27542,15 +25816,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.2", ngImpor
27542
25816
  ClrModalModule,
27543
25817
  ClrLoadingModule,
27544
25818
  ClrConditionalModule,
27545
- ClrFocusTrapModule,
27546
25819
  ClrFocusOnViewInitModule,
27547
- ClrForTypeAheadModule,
27548
25820
  ClrButtonModule,
27549
25821
  ClrFormsModule,
27550
25822
  ClrLayoutModule,
27551
25823
  ClrPopoverModule,
27552
25824
  ClrWizardModule,
27553
- ClrDragAndDropModule,
27554
25825
  ClrStepperModule,
27555
25826
  ClrSpinnerModule,
27556
25827
  ClrProgressBarModule,
@@ -27820,5 +26091,5 @@ const CLR_MENU_POSITIONS = [
27820
26091
  * Generated bundle index. Do not edit.
27821
26092
  */
27822
26093
 
27823
- export { CLR_ALERT_DIRECTIVES, CLR_BUTTON_GROUP_DIRECTIVES, CLR_DATAGRID_DIRECTIVES, CLR_DATEPICKER_DIRECTIVES, CLR_DRAG_AND_DROP_DIRECTIVES, CLR_DROPDOWN_DIRECTIVES, CLR_ICON_DIRECTIVES, CLR_LAYOUT_DIRECTIVES, CLR_LOADING_BUTTON_DIRECTIVES, CLR_LOADING_DIRECTIVES, CLR_MENU_POSITIONS, CLR_MODAL_DIRECTIVES, CLR_NAVIGATION_DIRECTIVES, CLR_PROGRESS_BAR_DIRECTIVES, CLR_SIGNPOST_DIRECTIVES, CLR_SPINNER_DIRECTIVES, CLR_STACK_VIEW_DIRECTIVES, CLR_TABS_DIRECTIVES, CLR_TOOLTIP_DIRECTIVES, CLR_TREE_VIEW_DIRECTIVES, CLR_VERTICAL_NAV_DIRECTIVES, CLR_WIZARD_DIRECTIVES, CONDITIONAL_DIRECTIVES, CUSTOM_BUTTON_TYPES, CdsIconCustomTag, ClarityModule, ClrAbstractContainer, ClrAccordion, ClrAccordionContent, ClrAccordionDescription, ClrAccordionModule, ClrAccordionPanel, ClrAccordionTitle, ClrAlert, ClrAlertItem, ClrAlertModule, ClrAlertText, ClrAlerts, ClrAlertsPager, ClrAlignment, ClrAriaCurrentLink, ClrAriaLivePoliteness, ClrAriaLiveService, ClrAxis, ClrButton, ClrButtonGroup, ClrButtonGroupModule, ClrButtonModule, ClrCalendar, ClrCheckbox, ClrCheckboxContainer, ClrCheckboxModule, ClrCheckboxWrapper, ClrCombobox, ClrComboboxContainer, ClrComboboxModule, ClrCommonFormsModule, ClrCommonStringsService, ClrConditionalModule, ClrControl, ClrControlContainer, ClrControlError, ClrControlHelper, ClrControlSuccess, ClrDataModule, ClrDatagrid, ClrDatagridActionBar, ClrDatagridActionOverflow, ClrDatagridCell, ClrDatagridColumn, ClrDatagridColumnSeparator, ClrDatagridColumnToggle, ClrDatagridColumnToggleButton, ClrDatagridColumnToggleTitle, ClrDatagridDetail, ClrDatagridDetailBody, ClrDatagridDetailHeader, ClrDatagridFilter, ClrDatagridFooter, ClrDatagridHideableColumn, ClrDatagridItems, ClrDatagridItemsTrackBy, ClrDatagridModule, ClrDatagridPageSize, ClrDatagridPagination, ClrDatagridPlaceholder, ClrDatagridRow, ClrDatagridRowDetail, ClrDatagridSortOrder, ClrDatalist, ClrDatalistContainer, ClrDatalistInput, ClrDatalistModule, ClrDateContainer, ClrDateInput, ClrDateInputValidator, ClrDatepickerModule, ClrDatepickerViewManager, ClrDay, ClrDaypicker, ClrDestroyService, ClrDragAndDropModule, ClrDragEvent, ClrDragHandle, ClrDraggable, ClrDraggableGhost, ClrDropdown, ClrDropdownItem, ClrDropdownMenu, ClrDropdownModule, ClrDropdownTrigger, ClrDroppable, ClrEmphasisModule, ClrExpandableAnimation, ClrFocusOnViewInit, ClrFocusOnViewInitModule, ClrForTypeAhead, ClrForTypeAheadModule, ClrForm, ClrFormLayout, ClrFormsModule, ClrHeader, ClrIconCustomTag, ClrIconModule, ClrIfActive, ClrIfDetail, ClrIfDragged, ClrIfError, ClrIfExpanded, ClrIfOpen, ClrIfSuccess, ClrInput, ClrInputContainer, ClrInputModule, ClrLabel, ClrLayout, ClrLayoutModule, ClrLoading, ClrLoadingButton, ClrLoadingButtonModule, ClrLoadingModule, ClrLoadingState, ClrMainContainer, ClrMainContainerModule, ClrModal, ClrModalBody, ClrModalModule, ClrMonthpicker, ClrNavLevel, ClrNavigationModule, ClrOption, ClrOptionItems, ClrOptionSelected, ClrOptions, ClrPassword, ClrPasswordContainer, ClrPasswordModule, ClrPopoverAnchor, ClrPopoverContent, ClrPopoverEventsService, ClrPopoverModule, ClrPopoverPositionService, ClrPopoverToggleService, ClrProgressBar, ClrProgressBarModule, ClrRadio, ClrRadioContainer, ClrRadioModule, ClrRadioWrapper, ClrRange, ClrRangeContainer, ClrRangeModule, ClrRecursiveForOf, ClrSelect, ClrSelectContainer, ClrSelectModule, ClrSelectedState, ClrSide, ClrSignpost, ClrSignpostContent, ClrSignpostModule, ClrSignpostTrigger, ClrSpinner, ClrSpinnerModule, ClrStackBlock, ClrStackContentInput, ClrStackHeader, ClrStackInput, ClrStackSelect, ClrStackView, ClrStackViewCustomTags, ClrStackViewLabel, ClrStackViewModule, ClrStepButton, ClrStepButtonType, ClrStepper, ClrStepperModule, ClrStepperPanel, ClrTab, ClrTabContent, ClrTabLink, ClrTabOverflowContent, ClrTabs, ClrTabsModule, ClrTextarea, ClrTextareaContainer, ClrTextareaModule, ClrTimeline, ClrTimelineLayout, ClrTimelineModule, ClrTimelineStep, ClrTimelineStepDescription, ClrTimelineStepHeader, ClrTimelineStepState, ClrTimelineStepTitle, ClrTooltip, ClrTooltipContent, ClrTooltipModule, ClrTooltipTrigger, ClrTree, ClrTreeNode, ClrTreeNodeLink, ClrTreeViewModule, ClrVerticalNav, ClrVerticalNavGroup, ClrVerticalNavGroupChildren, ClrVerticalNavIcon, ClrVerticalNavLink, ClrVerticalNavModule, ClrWizard, ClrWizardButton, ClrWizardCustomTags, ClrWizardHeaderAction, ClrWizardModule, ClrWizardPage, ClrWizardPageButtons, ClrWizardPageHeaderActions, ClrWizardPageNavTitle, ClrWizardPageTitle, ClrWizardStepnav, ClrWizardStepnavItem, ClrYearpicker, DEFAULT_BUTTON_TYPES, DatagridNumericFilter, DatagridPropertyComparator, DatagridPropertyNumericFilter, DatagridPropertyStringFilter, DatagridStringFilter, EXPANDABLE_ANIMATION_DIRECTIVES, FOCUS_ON_VIEW_INIT, FOCUS_ON_VIEW_INIT_DIRECTIVES, IS_TOGGLE, IS_TOGGLE_PROVIDER, LoadingListener, MainContainerWillyWonka, NavDetectionOompaLoompa, TOGGLE_SERVICE, TOGGLE_SERVICE_PROVIDER, ToggleServiceFactory, WrappedFormControl, collapse, commonStringsDefault, fade, fadeSlide, isToggleFactory, slide, AccordionOompaLoompa as ÇlrAccordionOompaLoompa, AccordionWillyWonka as ÇlrAccordionWillyWonka, ActionableOompaLoompa as ÇlrActionableOompaLoompa, ActiveOompaLoompa as ÇlrActiveOompaLoompa, ClrFocusTrapModule as ÇlrClrFocusTrapModule, ClrPopoverCloseButton as ÇlrClrPopoverCloseButton, ClrPopoverModuleNext as ÇlrClrPopoverModuleNext, ClrPopoverOpenCloseButton as ÇlrClrPopoverOpenCloseButton, DatagridCellRenderer as ÇlrDatagridCellRenderer, DatagridDetailRegisterer as ÇlrDatagridDetailRegisterer, DatagridHeaderRenderer as ÇlrDatagridHeaderRenderer, DatagridMainRenderer as ÇlrDatagridMainRenderer, DatagridRowRenderer as ÇlrDatagridRowRenderer, DatagridWillyWonka as ÇlrDatagridWillyWonka, ExpandableOompaLoompa as ÇlrExpandableOompaLoompa, FocusTrapDirective as ÇlrFocusTrapDirective, FocusTrapTracker as ÇlrFocusTrapTracker, StepperOompaLoompa as ÇlrStepperOompaLoompa, StepperWillyWonka as ÇlrStepperWillyWonka, TabsWillyWonka as ÇlrTabsWillyWonka, WrappedCell as ÇlrWrappedCell, WrappedColumn as ÇlrWrappedColumn, WrappedRow as ÇlrWrappedRow };
26094
+ export { CLR_ALERT_DIRECTIVES, CLR_BUTTON_GROUP_DIRECTIVES, CLR_DATAGRID_DIRECTIVES, CLR_DATEPICKER_DIRECTIVES, CLR_DROPDOWN_DIRECTIVES, CLR_ICON_DIRECTIVES, CLR_LAYOUT_DIRECTIVES, CLR_LOADING_BUTTON_DIRECTIVES, CLR_LOADING_DIRECTIVES, CLR_MENU_POSITIONS, CLR_MODAL_DIRECTIVES, CLR_NAVIGATION_DIRECTIVES, CLR_PROGRESS_BAR_DIRECTIVES, CLR_SIGNPOST_DIRECTIVES, CLR_SPINNER_DIRECTIVES, CLR_STACK_VIEW_DIRECTIVES, CLR_TABS_DIRECTIVES, CLR_TOOLTIP_DIRECTIVES, CLR_TREE_VIEW_DIRECTIVES, CLR_VERTICAL_NAV_DIRECTIVES, CLR_WIZARD_DIRECTIVES, CONDITIONAL_DIRECTIVES, CUSTOM_BUTTON_TYPES, CdsIconCustomTag, ClarityModule, ClrAbstractContainer, ClrAccordion, ClrAccordionContent, ClrAccordionDescription, ClrAccordionModule, ClrAccordionPanel, ClrAccordionTitle, ClrAlert, ClrAlertItem, ClrAlertModule, ClrAlertText, ClrAlerts, ClrAlertsPager, ClrAlignment, ClrAriaCurrentLink, 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, ClrDateInputValidator, ClrDatepickerModule, ClrDatepickerViewManager, ClrDay, ClrDaypicker, ClrDestroyService, ClrDropdown, ClrDropdownItem, ClrDropdownMenu, ClrDropdownModule, ClrDropdownTrigger, ClrEmphasisModule, ClrExpandableAnimation, ClrFocusOnViewInit, ClrFocusOnViewInitModule, ClrForm, ClrFormLayout, ClrFormsModule, ClrHeader, ClrIconCustomTag, ClrIconModule, ClrIfActive, ClrIfDetail, 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, 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, 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, StepperOompaLoompa as ÇlrStepperOompaLoompa, StepperWillyWonka as ÇlrStepperWillyWonka, TabsWillyWonka as ÇlrTabsWillyWonka, WrappedCell as ÇlrWrappedCell, WrappedColumn as ÇlrWrappedColumn, WrappedRow as ÇlrWrappedRow };
27824
26095
  //# sourceMappingURL=clr-angular.mjs.map