@angular/cdk 8.1.0 → 8.1.4

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 (93) hide show
  1. package/bundles/cdk-overlay.umd.js +27 -11
  2. package/bundles/cdk-overlay.umd.js.map +1 -1
  3. package/bundles/cdk-overlay.umd.min.js +2 -2
  4. package/bundles/cdk-overlay.umd.min.js.map +1 -1
  5. package/bundles/cdk-portal.umd.js +84 -9
  6. package/bundles/cdk-portal.umd.js.map +1 -1
  7. package/bundles/cdk-portal.umd.min.js +1 -1
  8. package/bundles/cdk-portal.umd.min.js.map +1 -1
  9. package/bundles/cdk-scrolling.umd.js +50 -13
  10. package/bundles/cdk-scrolling.umd.js.map +1 -1
  11. package/bundles/cdk-scrolling.umd.min.js +1 -1
  12. package/bundles/cdk-scrolling.umd.min.js.map +1 -1
  13. package/bundles/cdk-stepper.umd.js +6 -6
  14. package/bundles/cdk-stepper.umd.js.map +1 -1
  15. package/bundles/cdk-stepper.umd.min.js.map +1 -1
  16. package/bundles/cdk-tree.umd.js +14 -13
  17. package/bundles/cdk-tree.umd.js.map +1 -1
  18. package/bundles/cdk-tree.umd.min.js +1 -1
  19. package/bundles/cdk-tree.umd.min.js.map +1 -1
  20. package/bundles/cdk.umd.js +1 -1
  21. package/bundles/cdk.umd.js.map +1 -1
  22. package/bundles/cdk.umd.min.js +1 -1
  23. package/bundles/cdk.umd.min.js.map +1 -1
  24. package/esm2015/cdk.js +1 -1
  25. package/esm2015/cdk.js.map +1 -1
  26. package/esm2015/overlay.js +28 -12
  27. package/esm2015/overlay.js.map +1 -1
  28. package/esm2015/portal.js +52 -6
  29. package/esm2015/portal.js.map +1 -1
  30. package/esm2015/scrolling.js +39 -13
  31. package/esm2015/scrolling.js.map +1 -1
  32. package/esm2015/stepper.js +2 -2
  33. package/esm2015/stepper.js.map +1 -1
  34. package/esm2015/tree.js +13 -12
  35. package/esm2015/tree.js.map +1 -1
  36. package/esm5/cdk.es5.js +1 -1
  37. package/esm5/cdk.es5.js.map +1 -1
  38. package/esm5/overlay.es5.js +27 -11
  39. package/esm5/overlay.es5.js.map +1 -1
  40. package/esm5/portal.es5.js +81 -6
  41. package/esm5/portal.es5.js.map +1 -1
  42. package/esm5/scrolling.es5.js +50 -13
  43. package/esm5/scrolling.es5.js.map +1 -1
  44. package/esm5/stepper.es5.js +6 -6
  45. package/esm5/stepper.es5.js.map +1 -1
  46. package/esm5/tree.es5.js +14 -13
  47. package/esm5/tree.es5.js.map +1 -1
  48. package/overlay/typings/index.metadata.json +1 -1
  49. package/overlay/typings/overlay-container.d.ts +2 -2
  50. package/package.json +4 -4
  51. package/portal/typings/dom-portal-outlet.d.ts +6 -0
  52. package/portal/typings/index.metadata.json +1 -1
  53. package/portal/typings/portal-directives.d.ts +12 -0
  54. package/portal/typings/portal.d.ts +11 -0
  55. package/portal/typings/public-api.d.ts +0 -3
  56. package/schematics/ng-update/upgrade-data.js +1 -0
  57. package/schematics/ng-update/upgrade-data.js.map +1 -1
  58. package/schematics/ng-update/upgrade-rules/input-names-rule.js +3 -3
  59. package/schematics/ng-update/upgrade-rules/input-names-rule.js.map +1 -1
  60. package/schematics/ng-update/upgrade-rules/misc-template-rule.js +2 -2
  61. package/schematics/ng-update/upgrade-rules/misc-template-rule.js.map +1 -1
  62. package/schematics/tsconfig.tsbuildinfo +2936 -2820
  63. package/schematics/utils/ast.js +0 -2
  64. package/schematics/utils/ast.js.map +1 -1
  65. package/schematics/utils/build-component.js +3 -12
  66. package/schematics/utils/build-component.js.map +1 -1
  67. package/schematics/utils/version-agnostic-typescript.js +12 -4
  68. package/schematics/utils/version-agnostic-typescript.js.map +1 -1
  69. package/scrolling/typings/index.metadata.json +1 -1
  70. package/scrolling/typings/virtual-scroll-viewport.d.ts +7 -5
  71. package/tree/typings/index.metadata.json +1 -1
  72. package/typings/esm5/index.metadata.json +1 -1
  73. package/typings/esm5/overlay/index.metadata.json +1 -1
  74. package/typings/esm5/overlay/overlay-container.d.ts +2 -2
  75. package/typings/esm5/portal/dom-portal-outlet.d.ts +6 -0
  76. package/typings/esm5/portal/index.metadata.json +1 -1
  77. package/typings/esm5/portal/portal-directives.d.ts +12 -0
  78. package/typings/esm5/portal/portal.d.ts +11 -0
  79. package/typings/esm5/portal/public-api.d.ts +0 -3
  80. package/typings/esm5/scrolling/index.metadata.json +1 -1
  81. package/typings/esm5/scrolling/virtual-scroll-viewport.d.ts +7 -5
  82. package/typings/esm5/tree/index.metadata.json +1 -1
  83. package/typings/index.metadata.json +1 -1
  84. package/typings/overlay/index.metadata.json +1 -1
  85. package/typings/overlay/overlay-container.d.ts +2 -2
  86. package/typings/portal/dom-portal-outlet.d.ts +6 -0
  87. package/typings/portal/index.metadata.json +1 -1
  88. package/typings/portal/portal-directives.d.ts +12 -0
  89. package/typings/portal/portal.d.ts +11 -0
  90. package/typings/portal/public-api.d.ts +0 -3
  91. package/typings/scrolling/index.metadata.json +1 -1
  92. package/typings/scrolling/virtual-scroll-viewport.d.ts +7 -5
  93. package/typings/tree/index.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"stepper.js","sources":["../../../src/cdk/stepper/stepper-module.ts","../../../src/cdk/stepper/stepper-button.ts","../../../src/cdk/stepper/stepper.ts","../../../src/cdk/stepper/step-header.ts","../../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {CdkStepHeader} from './step-header';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule, CommonModule],\n exports: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ],\n declarations: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritte.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.next();\n }\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritte.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.previous();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {END, ENTER, HOME, SPACE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n EventEmitter,\n ElementRef,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n InjectionToken,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {Observable, Subject, of as obaservableOf} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {CdkStepHeader} from './step-header';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n/** The state of each step. */\nexport type StepState = 'number' | 'edit' | 'done' | 'error' | string;\n\n/** Enum to represent the different states of the steps. */\nexport const STEP_STATE = {\n NUMBER: 'number',\n EDIT: 'edit',\n DONE: 'done',\n ERROR: 'error'\n};\n\n/** InjectionToken that can be used to specify the global stepper options. */\nexport const STEPPER_GLOBAL_OPTIONS =\n new InjectionToken<StepperOptions>('STEPPER_GLOBAL_OPTIONS');\n\n/**\n * InjectionToken that can be used to specify the global stepper options.\n * @deprecated Use `STEPPER_GLOBAL_OPTIONS` instead.\n * @breaking-change 8.0.0.\n */\nexport const MAT_STEPPER_GLOBAL_OPTIONS = STEPPER_GLOBAL_OPTIONS;\n\n/** Configurable options for stepper. */\nexport interface StepperOptions {\n /**\n * Whether the stepper should display an error state or not.\n * Default behavior is assumed to be false.\n */\n showError?: boolean;\n\n /**\n * Whether the stepper should display the default indicator type\n * or not.\n * Default behavior is assumed to be true.\n */\n displayDefaultIndicatorType?: boolean;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: '<ng-template><ng-content></ng-content></ng-template>',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n private _stepperOptions: StepperOptions;\n _showError: boolean;\n _displayDefaultIndicatorType: boolean;\n\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel, {static: false}) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef, {static: true}) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: FormControlLike;\n\n /** Whether user has seen the expanded step content or not. */\n interacted = false;\n\n /** Plain text label of the step. */\n @Input() label: string;\n\n /** Error message to display when there's an error. */\n @Input() errorMessage: string;\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** State of the step. */\n @Input() state: StepState;\n\n /** Whether the user can return to this step once it has been marked as completed. */\n @Input()\n get editable(): boolean { return this._editable; }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean { return this._optional; }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._customCompleted == null ? this._getDefaultCompleted() : this._customCompleted;\n }\n set completed(value: boolean) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n private _customCompleted: boolean | null = null;\n\n private _getDefaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n /** Whether step has an error. */\n @Input()\n get hasError(): boolean {\n return this._customError == null ? this._getDefaultError() : this._customError;\n }\n set hasError(value: boolean) {\n this._customError = coerceBooleanProperty(value);\n }\n private _customError: boolean | null = null;\n\n private _getDefaultError() {\n return this.stepControl && this.stepControl.invalid && this.interacted;\n }\n\n /** @breaking-change 8.0.0 remove the `?` after `stepperOptions` */\n constructor(\n @Inject(forwardRef(() => CdkStepper)) private _stepper: CdkStepper,\n @Optional() @Inject(STEPPER_GLOBAL_OPTIONS) stepperOptions?: StepperOptions) {\n this._stepperOptions = stepperOptions ? stepperOptions : {};\n this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;\n this._showError = !!this._stepperOptions.showError;\n }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._customCompleted != null) {\n this._customCompleted = false;\n }\n\n if (this._customError != null) {\n this._customError = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements AfterViewInit, OnDestroy {\n /** Emits when the component is destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Used for managing keyboard focus. */\n private _keyManager: FocusKeyManager<FocusableOption>;\n\n /**\n * @breaking-change 8.0.0 Remove `| undefined` once the `_document`\n * constructor param is required.\n */\n private _document: Document | undefined;\n\n /**\n * The list of step components that the stepper is holding.\n * @deprecated use `steps` instead\n * @breaking-change 9.0.0 remove this property\n */\n @ContentChildren(CdkStep) _steps: QueryList<CdkStep>;\n\n /** The list of step components that the stepper is holding. */\n get steps(): QueryList<CdkStep> {\n return this._steps;\n }\n\n /**\n * The list of step headers of the steps in the stepper.\n * @deprecated Type to be changed to `QueryList<CdkStepHeader>`.\n * @breaking-change 8.0.0\n */\n @ContentChildren(CdkStepHeader) _stepHeader: QueryList<FocusableOption>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean { return this._linear; }\n set linear(value: boolean) { this._linear = coerceBooleanProperty(value); }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() { return this._selectedIndex; }\n set selectedIndex(index: number) {\n const newIndex = coerceNumberProperty(index);\n\n if (this.steps) {\n // Ensure that the index can't be out of bounds.\n if (newIndex < 0 || newIndex > this.steps.length - 1) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n if (this._selectedIndex != newIndex &&\n !this._anyControlsInvalidOrPending(newIndex) &&\n (newIndex >= this._selectedIndex || this.steps.toArray()[newIndex].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = newIndex;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep {\n // @breaking-change 8.0.0 Change return type to `CdkStep | undefined`.\n return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined!;\n }\n set selected(step: CdkStep) {\n this.selectedIndex = this.steps ? this.steps.toArray().indexOf(step) : -1;\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() selectionChange: EventEmitter<StepperSelectionEvent>\n = new EventEmitter<StepperSelectionEvent>();\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality,\n private _changeDetectorRef: ChangeDetectorRef,\n // @breaking-change 8.0.0 `_elementRef` and `_document` parameters to become required.\n private _elementRef?: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) _document?: any) {\n this._groupId = nextId++;\n this._document = _document;\n }\n\n ngAfterViewInit() {\n // Note that while the step headers are content children by default, any components that\n // extend this one might have them as view chidren. We initialize the keyboard handling in\n // AfterViewInit so we're guaranteed for both view and content children to be defined.\n this._keyManager = new FocusKeyManager<FocusableOption>(this._stepHeader)\n .withWrap()\n .withVerticalOrientation(this._orientation === 'vertical');\n\n (this._dir ? this._dir.change as Observable<Direction> : obaservableOf<Direction>())\n .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))\n .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n\n this._keyManager.updateActiveItemIndex(this._selectedIndex);\n\n this.steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (!this.selected) {\n this._selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n });\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this._updateSelectedItemIndex(0);\n this.steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number, state: StepState = STEP_STATE.NUMBER): StepState {\n const step = this.steps.toArray()[index];\n const isCurrentStep = this._isCurrentStep(index);\n\n return step._displayDefaultIndicatorType\n ? this._getDefaultIndicatorLogic(step, isCurrentStep)\n : this._getGuidelineLogic(step, isCurrentStep, state);\n }\n\n private _getDefaultIndicatorLogic(step: CdkStep, isCurrentStep: boolean): StepState {\n if (step._showError && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (!step.completed || isCurrentStep) {\n return STEP_STATE.NUMBER;\n } else {\n return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;\n }\n }\n\n private _getGuidelineLogic(\n step: CdkStep,\n isCurrentStep: boolean,\n state: StepState = STEP_STATE.NUMBER): StepState {\n if (step._showError && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (step.completed && !isCurrentStep) {\n return STEP_STATE.DONE;\n } else if (step.completed && isCurrentStep) {\n return state;\n } else if (step.editable && isCurrentStep) {\n return STEP_STATE.EDIT;\n } else {\n return state;\n }\n }\n\n private _isCurrentStep(index: number) {\n return this._selectedIndex === index;\n }\n\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n\n private _updateSelectedItemIndex(newIndex: number): void {\n const stepsArray = this.steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n\n // If focus is inside the stepper, move it to the next header, otherwise it may become\n // lost when the active step content is hidden. We can't be more granular with the check\n // (e.g. checking whether focus is inside the active step), because we don't have a\n // reference to the elements that are rendering out the content.\n this._containsFocus() ? this._keyManager.setActiveItem(newIndex) :\n this._keyManager.updateActiveItemIndex(newIndex);\n\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const hasModifier = hasModifierKey(event);\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n\n if (manager.activeItemIndex != null && !hasModifier &&\n (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = manager.activeItemIndex;\n event.preventDefault();\n } else if (keyCode === HOME) {\n manager.setFirstItemActive();\n event.preventDefault();\n } else if (keyCode === END) {\n manager.setLastItemActive();\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n const steps = this.steps.toArray();\n\n steps[this._selectedIndex].interacted = true;\n\n if (this._linear && index >= 0) {\n return steps.slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ?\n (control.invalid || control.pending || !step.interacted) :\n !step.completed;\n return isIncomplete && !step.optional;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Checks whether the stepper contains the focused element. */\n private _containsFocus(): boolean {\n if (!this._document || !this._elementRef) {\n return false;\n }\n\n const stepperElement = this._elementRef.nativeElement;\n const focusedElement = this._document.activeElement;\n return stepperElement === focusedElement || stepperElement.contains(focusedElement);\n }\n}\n\n\n/**\n * Simplified representation of a FormControl from @angular/forms.\n * Used to avoid having to bring in @angular/forms for a single optional interface.\n * @docs-private\n */\ninterface FormControlLike {\n asyncValidator: () => any | null;\n dirty: boolean;\n disabled: boolean;\n enabled: boolean;\n errors: {[key: string]: any} | null;\n invalid: boolean;\n parent: any;\n pending: boolean;\n pristine: boolean;\n root: FormControlLike;\n status: string;\n statusChanges: Observable<any>;\n touched: boolean;\n untouched: boolean;\n updateOn: any;\n valid: boolean;\n validator: () => any | null;\n value: any;\n valueChanges: Observable<any>;\n clearAsyncValidators(): void;\n clearValidators(): void;\n disable(opts?: any): void;\n enable(opts?: any): void;\n get(path: (string | number)[] | string): FormControlLike | null;\n getError(errorCode: string, path?: (string | number)[] | string): any;\n hasError(errorCode: string, path?: (string | number)[] | string): boolean;\n markAllAsTouched(): void;\n markAsDirty(opts?: any): void;\n markAsPending(opts?: any): void;\n markAsPristine(opts?: any): void;\n markAsTouched(opts?: any): void;\n markAsUntouched(opts?: any): void;\n patchValue(value: any, options?: Object): void;\n reset(value?: any, options?: Object): void;\n setAsyncValidators(newValidator: () => any | (() => any)[] | null): void;\n setErrors(errors: {[key: string]: any} | null, opts?: any): void;\n setParent(parent: any): void;\n setValidators(newValidator: () => any | (() => any)[] | null): void;\n setValue(value: any, options?: Object): void;\n updateValueAndValidity(opts?: any): void;\n patchValue(value: any, options?: any): void;\n registerOnChange(fn: Function): void;\n registerOnDisabledChange(fn: (isDisabled: boolean) => void): void;\n reset(formState?: any, options?: any): void;\n setValue(value: any, options?: any): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef} from '@angular/core';\nimport {FocusableOption} from '@angular/cdk/a11y';\n\n\n@Directive({\n selector: '[cdkStepHeader]',\n host: {\n 'role': 'tab',\n },\n})\nexport class CdkStepHeader implements FocusableOption {\n constructor(protected _elementRef: ElementRef<HTMLElement>) {}\n\n /** Focuses the step header. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n"],"names":["obaservableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;AIaA,MAAa,YAAY,CAAzB;;;;IACE,WAAF,sBAA0C,QAA0B,EAApE;QAA0C,IAA1C,CAAA,QAAkD,GAAR,QAAQ,CAAkB;KAAK;;;IAJzE,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,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AD,EAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"stepper.js","sources":["../../../src/cdk/stepper/stepper-module.ts","../../../src/cdk/stepper/stepper-button.ts","../../../src/cdk/stepper/stepper.ts","../../../src/cdk/stepper/step-header.ts","../../../src/cdk/stepper/step-label.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CdkStepper, CdkStep} from './stepper';\nimport {CommonModule} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {CdkStepperNext, CdkStepperPrevious} from './stepper-button';\nimport {CdkStepHeader} from './step-header';\nimport {BidiModule} from '@angular/cdk/bidi';\n\n@NgModule({\n imports: [BidiModule, CommonModule],\n exports: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ],\n declarations: [\n CdkStep,\n CdkStepper,\n CdkStepHeader,\n CdkStepLabel,\n CdkStepperNext,\n CdkStepperPrevious,\n ]\n})\nexport class CdkStepperModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkStepper} from './stepper';\n\n/** Button that moves to the next step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperNext]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperNext {\n /** Type of the next button. Defaults to \"submit\" if not specified. */\n @Input() type: string = 'submit';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.next();\n }\n}\n\n/** Button that moves to the previous step in a stepper workflow. */\n@Directive({\n selector: 'button[cdkStepperPrevious]',\n host: {\n '[type]': 'type',\n }\n})\nexport class CdkStepperPrevious {\n /** Type of the previous button. Defaults to \"button\" if not specified. */\n @Input() type: string = 'button';\n\n constructor(public _stepper: CdkStepper) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click')\n _handleClick() {\n this._stepper.previous();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusKeyManager} from '@angular/cdk/a11y';\nimport {Direction, Directionality} from '@angular/cdk/bidi';\nimport {coerceBooleanProperty, coerceNumberProperty} from '@angular/cdk/coercion';\nimport {END, ENTER, HOME, SPACE, hasModifierKey} from '@angular/cdk/keycodes';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n EventEmitter,\n ElementRef,\n forwardRef,\n Inject,\n Input,\n OnChanges,\n OnDestroy,\n Optional,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n InjectionToken,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {CdkStepLabel} from './step-label';\nimport {Observable, Subject, of as obaservableOf} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {CdkStepHeader} from './step-header';\n\n/** Used to generate unique ID for each stepper component. */\nlet nextId = 0;\n\n/**\n * Position state of the content of each step in stepper that is used for transitioning\n * the content into correct position upon step selection change.\n */\nexport type StepContentPositionState = 'previous' | 'current' | 'next';\n\n/** Possible orientation of a stepper. */\nexport type StepperOrientation = 'horizontal' | 'vertical';\n\n/** Change event emitted on selection changes. */\nexport class StepperSelectionEvent {\n /** Index of the step now selected. */\n selectedIndex: number;\n\n /** Index of the step previously selected. */\n previouslySelectedIndex: number;\n\n /** The step instance now selected. */\n selectedStep: CdkStep;\n\n /** The step instance previously selected. */\n previouslySelectedStep: CdkStep;\n}\n\n/** The state of each step. */\nexport type StepState = 'number' | 'edit' | 'done' | 'error' | string;\n\n/** Enum to represent the different states of the steps. */\nexport const STEP_STATE = {\n NUMBER: 'number',\n EDIT: 'edit',\n DONE: 'done',\n ERROR: 'error'\n};\n\n/** InjectionToken that can be used to specify the global stepper options. */\nexport const STEPPER_GLOBAL_OPTIONS =\n new InjectionToken<StepperOptions>('STEPPER_GLOBAL_OPTIONS');\n\n/**\n * InjectionToken that can be used to specify the global stepper options.\n * @deprecated Use `STEPPER_GLOBAL_OPTIONS` instead.\n * @breaking-change 8.0.0.\n */\nexport const MAT_STEPPER_GLOBAL_OPTIONS = STEPPER_GLOBAL_OPTIONS;\n\n/** Configurable options for stepper. */\nexport interface StepperOptions {\n /**\n * Whether the stepper should display an error state or not.\n * Default behavior is assumed to be false.\n */\n showError?: boolean;\n\n /**\n * Whether the stepper should display the default indicator type\n * or not.\n * Default behavior is assumed to be true.\n */\n displayDefaultIndicatorType?: boolean;\n}\n\n@Component({\n moduleId: module.id,\n selector: 'cdk-step',\n exportAs: 'cdkStep',\n template: '<ng-template><ng-content></ng-content></ng-template>',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class CdkStep implements OnChanges {\n private _stepperOptions: StepperOptions;\n _showError: boolean;\n _displayDefaultIndicatorType: boolean;\n\n /** Template for step label if it exists. */\n @ContentChild(CdkStepLabel, {static: false}) stepLabel: CdkStepLabel;\n\n /** Template for step content. */\n @ViewChild(TemplateRef, {static: true}) content: TemplateRef<any>;\n\n /** The top level abstract control of the step. */\n @Input() stepControl: FormControlLike;\n\n /** Whether user has seen the expanded step content or not. */\n interacted = false;\n\n /** Plain text label of the step. */\n @Input() label: string;\n\n /** Error message to display when there's an error. */\n @Input() errorMessage: string;\n\n /** Aria label for the tab. */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Reference to the element that the tab is labelled by.\n * Will be cleared if `aria-label` is set at the same time.\n */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** State of the step. */\n @Input() state: StepState;\n\n /** Whether the user can return to this step once it has been marked as completed. */\n @Input()\n get editable(): boolean { return this._editable; }\n set editable(value: boolean) {\n this._editable = coerceBooleanProperty(value);\n }\n private _editable = true;\n\n /** Whether the completion of step is optional. */\n @Input()\n get optional(): boolean { return this._optional; }\n set optional(value: boolean) {\n this._optional = coerceBooleanProperty(value);\n }\n private _optional = false;\n\n /** Whether step is marked as completed. */\n @Input()\n get completed(): boolean {\n return this._customCompleted == null ? this._getDefaultCompleted() : this._customCompleted;\n }\n set completed(value: boolean) {\n this._customCompleted = coerceBooleanProperty(value);\n }\n private _customCompleted: boolean | null = null;\n\n private _getDefaultCompleted() {\n return this.stepControl ? this.stepControl.valid && this.interacted : this.interacted;\n }\n\n /** Whether step has an error. */\n @Input()\n get hasError(): boolean {\n return this._customError == null ? this._getDefaultError() : this._customError;\n }\n set hasError(value: boolean) {\n this._customError = coerceBooleanProperty(value);\n }\n private _customError: boolean | null = null;\n\n private _getDefaultError() {\n return this.stepControl && this.stepControl.invalid && this.interacted;\n }\n\n /** @breaking-change 8.0.0 remove the `?` after `stepperOptions` */\n constructor(\n @Inject(forwardRef(() => CdkStepper)) private _stepper: CdkStepper,\n @Optional() @Inject(STEPPER_GLOBAL_OPTIONS) stepperOptions?: StepperOptions) {\n this._stepperOptions = stepperOptions ? stepperOptions : {};\n this._displayDefaultIndicatorType = this._stepperOptions.displayDefaultIndicatorType !== false;\n this._showError = !!this._stepperOptions.showError;\n }\n\n /** Selects this step component. */\n select(): void {\n this._stepper.selected = this;\n }\n\n /** Resets the step to its initial state. Note that this includes resetting form data. */\n reset(): void {\n this.interacted = false;\n\n if (this._customCompleted != null) {\n this._customCompleted = false;\n }\n\n if (this._customError != null) {\n this._customError = false;\n }\n\n if (this.stepControl) {\n this.stepControl.reset();\n }\n }\n\n ngOnChanges() {\n // Since basically all inputs of the MatStep get proxied through the view down to the\n // underlying MatStepHeader, we have to make sure that change detection runs correctly.\n this._stepper._stateChanged();\n }\n}\n\n@Directive({\n selector: '[cdkStepper]',\n exportAs: 'cdkStepper',\n})\nexport class CdkStepper implements AfterViewInit, OnDestroy {\n /** Emits when the component is destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Used for managing keyboard focus. */\n private _keyManager: FocusKeyManager<FocusableOption>;\n\n /**\n * @breaking-change 8.0.0 Remove `| undefined` once the `_document`\n * constructor param is required.\n */\n private _document: Document | undefined;\n\n /**\n * The list of step components that the stepper is holding.\n * @deprecated use `steps` instead\n * @breaking-change 9.0.0 remove this property\n */\n @ContentChildren(CdkStep) _steps: QueryList<CdkStep>;\n\n /** The list of step components that the stepper is holding. */\n get steps(): QueryList<CdkStep> {\n return this._steps;\n }\n\n /**\n * The list of step headers of the steps in the stepper.\n * @deprecated Type to be changed to `QueryList<CdkStepHeader>`.\n * @breaking-change 8.0.0\n */\n @ContentChildren(CdkStepHeader) _stepHeader: QueryList<FocusableOption>;\n\n /** Whether the validity of previous steps should be checked or not. */\n @Input()\n get linear(): boolean { return this._linear; }\n set linear(value: boolean) { this._linear = coerceBooleanProperty(value); }\n private _linear = false;\n\n /** The index of the selected step. */\n @Input()\n get selectedIndex() { return this._selectedIndex; }\n set selectedIndex(index: number) {\n const newIndex = coerceNumberProperty(index);\n\n if (this.steps) {\n // Ensure that the index can't be out of bounds.\n if (newIndex < 0 || newIndex > this.steps.length - 1) {\n throw Error('cdkStepper: Cannot assign out-of-bounds value to `selectedIndex`.');\n }\n\n if (this._selectedIndex != newIndex &&\n !this._anyControlsInvalidOrPending(newIndex) &&\n (newIndex >= this._selectedIndex || this.steps.toArray()[newIndex].editable)) {\n this._updateSelectedItemIndex(index);\n }\n } else {\n this._selectedIndex = newIndex;\n }\n }\n private _selectedIndex = 0;\n\n /** The step that is selected. */\n @Input()\n get selected(): CdkStep {\n // @breaking-change 8.0.0 Change return type to `CdkStep | undefined`.\n return this.steps ? this.steps.toArray()[this.selectedIndex] : undefined!;\n }\n set selected(step: CdkStep) {\n this.selectedIndex = this.steps ? this.steps.toArray().indexOf(step) : -1;\n }\n\n /** Event emitted when the selected step has changed. */\n @Output() selectionChange: EventEmitter<StepperSelectionEvent>\n = new EventEmitter<StepperSelectionEvent>();\n\n /** Used to track unique ID for each stepper component. */\n _groupId: number;\n\n protected _orientation: StepperOrientation = 'horizontal';\n\n constructor(\n @Optional() private _dir: Directionality,\n private _changeDetectorRef: ChangeDetectorRef,\n // @breaking-change 8.0.0 `_elementRef` and `_document` parameters to become required.\n private _elementRef?: ElementRef<HTMLElement>,\n @Inject(DOCUMENT) _document?: any) {\n this._groupId = nextId++;\n this._document = _document;\n }\n\n ngAfterViewInit() {\n // Note that while the step headers are content children by default, any components that\n // extend this one might have them as view chidren. We initialize the keyboard handling in\n // AfterViewInit so we're guaranteed for both view and content children to be defined.\n this._keyManager = new FocusKeyManager<FocusableOption>(this._stepHeader)\n .withWrap()\n .withVerticalOrientation(this._orientation === 'vertical');\n\n (this._dir ? this._dir.change as Observable<Direction> : obaservableOf<Direction>())\n .pipe(startWith(this._layoutDirection()), takeUntil(this._destroyed))\n .subscribe(direction => this._keyManager.withHorizontalOrientation(direction));\n\n this._keyManager.updateActiveItemIndex(this._selectedIndex);\n\n this.steps.changes.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (!this.selected) {\n this._selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n });\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Selects and focuses the next step in list. */\n next(): void {\n this.selectedIndex = Math.min(this._selectedIndex + 1, this.steps.length - 1);\n }\n\n /** Selects and focuses the previous step in list. */\n previous(): void {\n this.selectedIndex = Math.max(this._selectedIndex - 1, 0);\n }\n\n /** Resets the stepper to its initial state. Note that this includes clearing form data. */\n reset(): void {\n this._updateSelectedItemIndex(0);\n this.steps.forEach(step => step.reset());\n this._stateChanged();\n }\n\n /** Returns a unique id for each step label element. */\n _getStepLabelId(i: number): string {\n return `cdk-step-label-${this._groupId}-${i}`;\n }\n\n /** Returns unique id for each step content element. */\n _getStepContentId(i: number): string {\n return `cdk-step-content-${this._groupId}-${i}`;\n }\n\n /** Marks the component to be change detected. */\n _stateChanged() {\n this._changeDetectorRef.markForCheck();\n }\n\n /** Returns position state of the step with the given index. */\n _getAnimationDirection(index: number): StepContentPositionState {\n const position = index - this._selectedIndex;\n if (position < 0) {\n return this._layoutDirection() === 'rtl' ? 'next' : 'previous';\n } else if (position > 0) {\n return this._layoutDirection() === 'rtl' ? 'previous' : 'next';\n }\n return 'current';\n }\n\n /** Returns the type of icon to be displayed. */\n _getIndicatorType(index: number, state: StepState = STEP_STATE.NUMBER): StepState {\n const step = this.steps.toArray()[index];\n const isCurrentStep = this._isCurrentStep(index);\n\n return step._displayDefaultIndicatorType\n ? this._getDefaultIndicatorLogic(step, isCurrentStep)\n : this._getGuidelineLogic(step, isCurrentStep, state);\n }\n\n private _getDefaultIndicatorLogic(step: CdkStep, isCurrentStep: boolean): StepState {\n if (step._showError && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (!step.completed || isCurrentStep) {\n return STEP_STATE.NUMBER;\n } else {\n return step.editable ? STEP_STATE.EDIT : STEP_STATE.DONE;\n }\n }\n\n private _getGuidelineLogic(\n step: CdkStep,\n isCurrentStep: boolean,\n state: StepState = STEP_STATE.NUMBER): StepState {\n if (step._showError && step.hasError && !isCurrentStep) {\n return STEP_STATE.ERROR;\n } else if (step.completed && !isCurrentStep) {\n return STEP_STATE.DONE;\n } else if (step.completed && isCurrentStep) {\n return state;\n } else if (step.editable && isCurrentStep) {\n return STEP_STATE.EDIT;\n } else {\n return state;\n }\n }\n\n private _isCurrentStep(index: number) {\n return this._selectedIndex === index;\n }\n\n /** Returns the index of the currently-focused step header. */\n _getFocusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : this._selectedIndex;\n }\n\n private _updateSelectedItemIndex(newIndex: number): void {\n const stepsArray = this.steps.toArray();\n this.selectionChange.emit({\n selectedIndex: newIndex,\n previouslySelectedIndex: this._selectedIndex,\n selectedStep: stepsArray[newIndex],\n previouslySelectedStep: stepsArray[this._selectedIndex],\n });\n\n // If focus is inside the stepper, move it to the next header, otherwise it may become\n // lost when the active step content is hidden. We can't be more granular with the check\n // (e.g. checking whether focus is inside the active step), because we don't have a\n // reference to the elements that are rendering out the content.\n this._containsFocus() ? this._keyManager.setActiveItem(newIndex) :\n this._keyManager.updateActiveItemIndex(newIndex);\n\n this._selectedIndex = newIndex;\n this._stateChanged();\n }\n\n _onKeydown(event: KeyboardEvent) {\n const hasModifier = hasModifierKey(event);\n const keyCode = event.keyCode;\n const manager = this._keyManager;\n\n if (manager.activeItemIndex != null && !hasModifier &&\n (keyCode === SPACE || keyCode === ENTER)) {\n this.selectedIndex = manager.activeItemIndex;\n event.preventDefault();\n } else if (keyCode === HOME) {\n manager.setFirstItemActive();\n event.preventDefault();\n } else if (keyCode === END) {\n manager.setLastItemActive();\n event.preventDefault();\n } else {\n manager.onKeydown(event);\n }\n }\n\n private _anyControlsInvalidOrPending(index: number): boolean {\n const steps = this.steps.toArray();\n\n steps[this._selectedIndex].interacted = true;\n\n if (this._linear && index >= 0) {\n return steps.slice(0, index).some(step => {\n const control = step.stepControl;\n const isIncomplete = control ?\n (control.invalid || control.pending || !step.interacted) :\n !step.completed;\n return isIncomplete && !step.optional;\n });\n }\n\n return false;\n }\n\n private _layoutDirection(): Direction {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n\n /** Checks whether the stepper contains the focused element. */\n private _containsFocus(): boolean {\n if (!this._document || !this._elementRef) {\n return false;\n }\n\n const stepperElement = this._elementRef.nativeElement;\n const focusedElement = this._document.activeElement;\n return stepperElement === focusedElement || stepperElement.contains(focusedElement);\n }\n}\n\n\n/**\n * Simplified representation of a FormControl from @angular/forms.\n * Used to avoid having to bring in @angular/forms for a single optional interface.\n * @docs-private\n */\ninterface FormControlLike {\n asyncValidator: () => any | null;\n dirty: boolean;\n disabled: boolean;\n enabled: boolean;\n errors: {[key: string]: any} | null;\n invalid: boolean;\n parent: any;\n pending: boolean;\n pristine: boolean;\n root: FormControlLike;\n status: string;\n statusChanges: Observable<any>;\n touched: boolean;\n untouched: boolean;\n updateOn: any;\n valid: boolean;\n validator: () => any | null;\n value: any;\n valueChanges: Observable<any>;\n clearAsyncValidators(): void;\n clearValidators(): void;\n disable(opts?: any): void;\n enable(opts?: any): void;\n get(path: (string | number)[] | string): FormControlLike | null;\n getError(errorCode: string, path?: (string | number)[] | string): any;\n hasError(errorCode: string, path?: (string | number)[] | string): boolean;\n markAllAsTouched(): void;\n markAsDirty(opts?: any): void;\n markAsPending(opts?: any): void;\n markAsPristine(opts?: any): void;\n markAsTouched(opts?: any): void;\n markAsUntouched(opts?: any): void;\n patchValue(value: any, options?: Object): void;\n reset(value?: any, options?: Object): void;\n setAsyncValidators(newValidator: () => any | (() => any)[] | null): void;\n setErrors(errors: {[key: string]: any} | null, opts?: any): void;\n setParent(parent: any): void;\n setValidators(newValidator: () => any | (() => any)[] | null): void;\n setValue(value: any, options?: Object): void;\n updateValueAndValidity(opts?: any): void;\n patchValue(value: any, options?: any): void;\n registerOnChange(fn: Function): void;\n registerOnDisabledChange(fn: (isDisabled: boolean) => void): void;\n reset(formState?: any, options?: any): void;\n setValue(value: any, options?: any): void;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, ElementRef} from '@angular/core';\nimport {FocusableOption} from '@angular/cdk/a11y';\n\n\n@Directive({\n selector: '[cdkStepHeader]',\n host: {\n 'role': 'tab',\n },\n})\nexport class CdkStepHeader implements FocusableOption {\n constructor(protected _elementRef: ElementRef<HTMLElement>) {}\n\n /** Focuses the step header. */\n focus() {\n this._elementRef.nativeElement.focus();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n@Directive({\n selector: '[cdkStepLabel]',\n})\nexport class CdkStepLabel {\n constructor(/** @docs-private */ public template: TemplateRef<any>) { }\n}\n"],"names":["obaservableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;AIaA,MAAa,YAAY,CAAzB;;;;IACE,WAAF,sBAA0C,QAA0B,EAApE;QAA0C,IAA1C,CAAA,QAAkD,GAAR,QAAQ,CAAkB;KAAK;;;IAJzE,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,CAAW;gBACT,QAAQ,EAAE,gBAAgB;aAC3B,EAAD,EAAA;;;;IAJA,EAAA,IAAA,EAAmB,WAAW,EAA9B;;;;;;;ADUA,MAAa,aAAa,CAA1B;;;;IACE,WAAF,CAAwB,WAAoC,EAA5D;QAAwB,IAAxB,CAAA,WAAmC,GAAX,WAAW,CAAyB;KAAI;;;;;IAG9D,KAAK,GAAP;QACI,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;KACxC;;;IAZH,EAAA,IAAA,EAAC,SAAS,EAAV,IAAA,EAAA,CAAW;gBACT,QAAQ,EAAE,iBAAiB;gBAC3B,IAAI,EAAE;oBACJ,MAAM,EAAE,KAAK;iBACd;aACF,EAAD,EAAA;;;;IATA,EAAA,IAAA,EAAmB,UAAU,EAA7B;;;;;;;;;;;ADkCA,IAAI,MAAM,GAAG,CAAC,CAAd;;;;AAYA,AAAA,MAAa,qBAAqB,CAAlC;CAYC;;;;;AAMD,AAAA,MAAa,UAAU,GAAG;IACxB,MAAM,EAAE,Q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M;iBACjB;aACF,EAAD,EAAA;;;;IAhCA,EAAA,IAAA,EAAQ,UAAU,EAAlB;;;IAmCA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,CAAA;IASA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAG,YAAY,EAAf,IAAA,EAAA,CAAgB,OAAO,EAAvB,EAAA,CAAA;;;;;;;ADnBA,MAAa,gBAAgB,CAA7B;;;IAnBA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;gBACnC,OAAO,EAAE;oBACP,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,kBAAkB;iBACnB;gBACD,YAAY,EAAE;oBACZ,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,cAAc;oBACd,kBAAkB;iBACnB;aACF,EAAD,EAAA;;;;;;;;;;;;;;;"}
package/esm2015/tree.js CHANGED
@@ -896,15 +896,13 @@ class CdkNestedTreeNode extends CdkTreeNode {
896
896
  _getNodeOutlet() {
897
897
  /** @type {?} */
898
898
  const outlets = this.nodeOutlet;
899
- if (outlets) {
900
- // Note that since we use `descendants: true` on the query, we have to ensure
901
- // that we don't pick up the outlet of a child node by accident.
902
- return outlets.find((/**
903
- * @param {?} outlet
904
- * @return {?}
905
- */
906
- outlet => !outlet._node || outlet._node === this));
907
- }
899
+ // Note that since we use `descendants: true` on the query, we have to ensure
900
+ // that we don't pick up the outlet of a child node by accident.
901
+ return outlets && outlets.find((/**
902
+ * @param {?} outlet
903
+ * @return {?}
904
+ */
905
+ outlet => !outlet._node || outlet._node === this));
908
906
  }
909
907
  }
910
908
  CdkNestedTreeNode.decorators = [
@@ -998,7 +996,10 @@ class CdkTreeNodePadding {
998
996
  * @return {?}
999
997
  */
1000
998
  set level(value) {
1001
- this._level = coerceNumberProperty(value);
999
+ // Set to null as the fallback value so that _setPadding can fall back to the node level if the
1000
+ // consumer set the directive as `cdkTreeNodePadding=""`. We still want to take this value if
1001
+ // they set 0 explicitly.
1002
+ this._level = (/** @type {?} */ (coerceNumberProperty(value, null)));
1002
1003
  this._setPadding();
1003
1004
  }
1004
1005
  /**
@@ -1043,8 +1044,8 @@ class CdkTreeNodePadding {
1043
1044
  ? this._tree.treeControl.getLevel(this._treeNode.data)
1044
1045
  : null;
1045
1046
  /** @type {?} */
1046
- const level = this._level || nodeLevel;
1047
- return level ? `${level * this._indent}${this.indentUnits}` : null;
1047
+ const level = this._level == null ? nodeLevel : this._level;
1048
+ return typeof level === 'number' ? `${level * this._indent}${this.indentUnits}` : null;
1048
1049
  }
1049
1050
  /**
1050
1051
  * @param {?=} forceChange
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sources":["../../../src/cdk/tree/tree-module.ts","../../../src/cdk/tree/toggle.ts","../../../src/cdk/tree/padding.ts","../../../src/cdk/tree/nested-node.ts","../../../src/cdk/tree/tree.ts","../../../src/cdk/tree/tree-errors.ts","../../../src/cdk/tree/node.ts","../../../src/cdk/tree/outlet.ts","../../../src/cdk/tree/control/nested-tree-control.ts","../../../src/cdk/tree/control/flat-tree-control.ts","../../../src/cdk/tree/control/base-tree-control.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {CdkTreeNodePadding} from './padding';\nimport {CdkTreeNodeToggle} from './toggle';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {CdkTreeNodeDef} from './node';\nimport {CdkNestedTreeNode} from './nested-node';\n\nconst EXPORTED_DECLARATIONS = [\n CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet,\n];\n\n@NgModule({\n imports: [CommonModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n providers: [FocusMonitor, CdkTreeNodeDef]\n})\nexport class CdkTreeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/**\n * Node toggle to expand/collapse the node.\n */\n@Directive({selector: '[cdkTreeNodeToggle]'})\nexport class CdkTreeNodeToggle<T> {\n /** Whether expand/collapse the node recursively. */\n @Input('cdkTreeNodeToggleRecursive')\n get recursive(): boolean { return this._recursive; }\n set recursive(value: boolean) { this._recursive = coerceBooleanProperty(value); }\n protected _recursive = false;\n\n constructor(protected _tree: CdkTree<T>,\n protected _treeNode: CdkTreeNode<T>) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click', ['$event'])\n _toggle(event: Event): void {\n this.recursive\n ? this._tree.treeControl.toggleDescendants(this._treeNode.data)\n : this._tree.treeControl.toggle(this._treeNode.data);\n\n event.stopPropagation();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Directive, ElementRef, Input, OnDestroy, Optional, Renderer2} from '@angular/core';\nimport {takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/**\n * Indent for the children tree dataNodes.\n * This directive will add left-padding to the node to show hierarchy.\n */\n@Directive({\n selector: '[cdkTreeNodePadding]',\n})\nexport class CdkTreeNodePadding<T> implements OnDestroy {\n /** Current padding value applied to the element. Used to avoid unnecessarily hitting the DOM. */\n private _currentPadding: string|null;\n\n /** Subject that emits when the component has been destroyed. */\n private _destroyed = new Subject<void>();\n\n /** CSS units used for the indentation value. */\n indentUnits = 'px';\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('cdkTreeNodePadding')\n get level(): number { return this._level; }\n set level(value: number) {\n this._level = coerceNumberProperty(value);\n this._setPadding();\n }\n _level: number;\n\n /**\n * The indent for each level. Can be a number or a CSS string.\n * Default number 40px from material design menu sub-menu spec.\n */\n @Input('cdkTreeNodePaddingIndent')\n get indent(): number | string { return this._indent; }\n set indent(indent: number | string) {\n let value = indent;\n let units = 'px';\n\n if (typeof indent === 'string') {\n const parts = indent.split(cssUnitPattern);\n value = parts[0];\n units = parts[1] || units;\n }\n\n this.indentUnits = units;\n this._indent = coerceNumberProperty(value);\n this._setPadding();\n }\n _indent: number = 40;\n\n constructor(private _treeNode: CdkTreeNode<T>,\n private _tree: CdkTree<T>,\n private _renderer: Renderer2,\n private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {\n this._setPadding();\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding(true));\n }\n\n // In Ivy the indentation binding might be set before the tree node's data has been added,\n // which means that we'll miss the first render. We have to subscribe to changes in the\n // data to ensure that everything is up to date.\n _treeNode._dataChanges.subscribe(() => this._setPadding());\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** The padding indent value for the tree node. Returns a string with px numbers if not null. */\n _paddingIndent(): string|null {\n const nodeLevel = (this._treeNode.data && this._tree.treeControl.getLevel)\n ? this._tree.treeControl.getLevel(this._treeNode.data)\n : null;\n const level = this._level || nodeLevel;\n return level ? `${level * this._indent}${this.indentUnits}` : null;\n }\n\n _setPadding(forceChange = false) {\n const padding = this._paddingIndent();\n\n if (padding !== this._currentPadding || forceChange) {\n const element = this._element.nativeElement;\n const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';\n const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';\n this._renderer.setStyle(element, paddingProp, padding);\n this._renderer.setStyle(element, resetProp, null);\n this._currentPadding = padding;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n QueryList,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from './outlet';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {getTreeControlFunctionsMissingError} from './tree-errors';\n\n/**\n * Nested node is a child of `<cdk-tree>`. It works with nested tree.\n * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will\n * be added in the `cdkTreeNodeOutlet` in tree node template.\n * For example:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <ng-template cdkTreeNodeOutlet></ng-template>\n * </cdk-nested-tree-node>\n * ```\n * The children of node will be automatically added to `cdkTreeNodeOutlet`, the result dom will be\n * like this:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <cdk-nested-tree-node>{{child1.name}}</cdk-nested-tree-node>\n * <cdk-nested-tree-node>{{child2.name}}</cdk-nested-tree-node>\n * </cdk-nested-tree-node>\n * ```\n */\n@Directive({\n selector: 'cdk-nested-tree-node',\n exportAs: 'cdkNestedTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node cdk-nested-tree-node',\n },\n providers: [\n {provide: CdkTreeNode, useExisting: CdkNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode}\n ]\n})\nexport class CdkNestedTreeNode<T> extends CdkTreeNode<T> implements AfterContentInit, OnDestroy {\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** The children data dataNodes of current node. They will be placed in `CdkTreeNodeOutlet`. */\n protected _children: T[];\n\n /** The children node placeholder. */\n @ContentChildren(CdkTreeNodeOutlet, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true\n })\n nodeOutlet: QueryList<CdkTreeNodeOutlet>;\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n protected _differs: IterableDiffers) {\n super(_elementRef, _tree);\n }\n\n ngAfterContentInit() {\n this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this.data);\n if (Array.isArray(childrenNodes)) {\n this.updateChildrenNodes(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(result => this.updateChildrenNodes(result));\n }\n this.nodeOutlet.changes.pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateChildrenNodes());\n }\n\n ngOnDestroy() {\n this._clear();\n super.ngOnDestroy();\n }\n\n /** Add children dataNodes to the NodeOutlet */\n protected updateChildrenNodes(children?: T[]): void {\n const outlet = this._getNodeOutlet();\n if (children) {\n this._children = children;\n }\n if (outlet && this._children) {\n const viewContainer = outlet.viewContainer;\n this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);\n } else {\n // Reset the data differ if there's no children nodes displayed\n this._dataDiffer.diff([]);\n }\n }\n\n /** Clear the children dataNodes. */\n protected _clear(): void {\n const outlet = this._getNodeOutlet();\n if (outlet) {\n outlet.viewContainer.clear();\n this._dataDiffer.diff([]);\n }\n }\n\n /** Gets the outlet for the current node. */\n private _getNodeOutlet() {\n const outlets = this.nodeOutlet;\n\n if (outlets) {\n // Note that since we use `descendants: true` on the query, we have to ensure\n // that we don't pick up the outlet of a child node by accident.\n return outlets.find(outlet => !outlet._node || outlet._node === this);\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {FocusableOption} from '@angular/cdk/a11y';\nimport {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n QueryList,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n TrackByFunction\n} from '@angular/core';\nimport {BehaviorSubject, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {TreeControl} from './control/tree-control';\nimport {CdkTreeNodeDef, CdkTreeNodeOutletContext} from './node';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {\n getTreeControlFunctionsMissingError,\n getTreeControlMissingError,\n getTreeMissingMatchingNodeDefError,\n getTreeMultipleDefaultNodeDefsError,\n getTreeNoValidDataSourceError\n} from './tree-errors';\n\n/**\n * CDK tree component that connects with a data source to retrieve data of type `T` and renders\n * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.\n */\n@Component({\n moduleId: module.id,\n selector: 'cdk-tree',\n exportAs: 'cdkTree',\n template: `<ng-container cdkTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'cdk-tree',\n 'role': 'tree',\n },\n encapsulation: ViewEncapsulation.None,\n\n // The \"OnPush\" status for the `CdkTree` component is effectively a noop, so we are removing it.\n // The view for `CdkTree` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class CdkTree<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n /** Subject that emits when the component has been destroyed. */\n private _onDestroy = new Subject<void>();\n\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** Stores the node definition that does not have a when predicate. */\n private _defaultNodeDef: CdkTreeNodeDef<T> | null;\n\n /** Data subscription */\n private _dataSubscription: Subscription | null;\n\n /** Level of nodes */\n private _levels: Map<T, number> = new Map<T, number>();\n\n /**\n * Provides a stream containing the latest data array to render. Influenced by the tree's\n * stream of view window (what dataNodes are currently on screen).\n * Data source can be an observable of data array, or a data array to render.\n */\n @Input()\n get dataSource(): DataSource<T> | Observable<T[]> | T[] { return this._dataSource; }\n set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: DataSource<T> | Observable<T[]> | T[];\n\n /** The tree controller */\n @Input() treeControl: TreeControl<T>;\n\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize node operations by identifying a node based on its data\n * relative to the function to know if a node should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n @Input() trackBy: TrackByFunction<T>;\n\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(CdkTreeNodeOutlet, {static: true}) _nodeOutlet: CdkTreeNodeOutlet;\n\n /** The tree node template for the tree */\n @ContentChildren(CdkTreeNodeDef) _nodeDefs: QueryList<CdkTreeNodeDef<T>>;\n\n // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.\n // Remove the MAX_VALUE in viewChange\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n */\n viewChange =\n new BehaviorSubject<{start: number, end: number}>({start: 0, end: Number.MAX_VALUE});\n\n constructor(private _differs: IterableDiffers,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this._dataDiffer = this._differs.find([]).create(this.trackBy);\n if (!this.treeControl) {\n throw getTreeControlMissingError();\n }\n }\n\n ngOnDestroy() {\n this._nodeOutlet.viewContainer.clear();\n\n this._onDestroy.next();\n this._onDestroy.complete();\n\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n }\n\n ngAfterContentChecked() {\n const defaultNodeDefs = this._nodeDefs.filter(def => !def.when);\n if (defaultNodeDefs.length > 1) {\n throw getTreeMultipleDefaultNodeDefsError();\n }\n this._defaultNodeDef = defaultNodeDefs[0];\n\n if (this.dataSource && this._nodeDefs && !this._dataSubscription) {\n this._observeRenderChanges();\n }\n }\n\n\n // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL\n // and nested trees.\n\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the node outlet. Otherwise start listening for new data.\n */\n private _switchDataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n\n // Remove the all dataNodes if there is now no data source\n if (!dataSource) {\n this._nodeOutlet.viewContainer.clear();\n }\n\n this._dataSource = dataSource;\n if (this._nodeDefs) {\n this._observeRenderChanges();\n }\n }\n\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges() {\n let dataStream: Observable<T[] | ReadonlyArray<T>> | undefined;\n\n if (isDataSource(this._dataSource)) {\n dataStream = this._dataSource.connect(this);\n } else if (this._dataSource instanceof Observable) {\n dataStream = this._dataSource;\n } else if (Array.isArray(this._dataSource)) {\n dataStream = observableOf(this._dataSource);\n }\n\n if (dataStream) {\n this._dataSubscription = dataStream.pipe(takeUntil(this._onDestroy))\n .subscribe(data => this.renderNodeChanges(data));\n } else {\n throw getTreeNoValidDataSourceError();\n }\n }\n\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(data: T[] | ReadonlyArray<T>, dataDiffer: IterableDiffer<T> = this._dataDiffer,\n viewContainer: ViewContainerRef = this._nodeOutlet.viewContainer,\n parentData?: T) {\n const changes = dataDiffer.diff(data);\n if (!changes) { return; }\n\n changes.forEachOperation((item: IterableChangeRecord<T>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex!], currentIndex!, viewContainer, parentData);\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex!);\n this._levels.delete(item.item);\n } else {\n const view = viewContainer.get(adjustedPreviousIndex!);\n viewContainer.move(view!, currentIndex);\n }\n });\n\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * Finds the matching node definition that should be used for this node data. If there is only\n * one node definition, it is returned. Otherwise, find the node definition that has a when\n * predicate that returns true with the data. If none return true, return the default node\n * definition.\n */\n _getNodeDef(data: T, i: number): CdkTreeNodeDef<T> {\n if (this._nodeDefs.length === 1) { return this._nodeDefs.first; }\n\n const nodeDef =\n this._nodeDefs.find(def => def.when && def.when(i, data)) || this._defaultNodeDef;\n if (!nodeDef) { throw getTreeMissingMatchingNodeDefError(); }\n\n return nodeDef;\n }\n\n /**\n * Create the embedded view for the data node template and place it in the correct index location\n * within the data node view container.\n */\n insertNode(nodeData: T, index: number, viewContainer?: ViewContainerRef, parentData?: T) {\n const node = this._getNodeDef(nodeData, index);\n\n // Node context that will be provided to created embedded view\n const context = new CdkTreeNodeOutletContext<T>(nodeData);\n\n // If the tree is flat tree, then use the `getLevel` function in flat tree control\n // Otherwise, use the level of parent node.\n if (this.treeControl.getLevel) {\n context.level = this.treeControl.getLevel(nodeData);\n } else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {\n context.level = this._levels.get(parentData)! + 1;\n } else {\n context.level = 0;\n }\n this._levels.set(nodeData, context.level);\n\n // Use default tree nodeOutlet, or nested node's nodeOutlet\n const container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;\n container.createEmbeddedView(node.template, context, index);\n\n // Set the data to just created `CdkTreeNode`.\n // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable\n // `mostRecentTreeNode`. We get it from static variable and pass the node data to it.\n if (CdkTreeNode.mostRecentTreeNode) {\n CdkTreeNode.mostRecentTreeNode.data = nodeData;\n }\n }\n}\n\n\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\n@Directive({\n selector: 'cdk-tree-node',\n exportAs: 'cdkTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.aria-level]': 'role === \"treeitem\" ? level : null',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node',\n },\n})\nexport class CdkTreeNode<T> implements FocusableOption, OnDestroy {\n /**\n * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it\n * in `CdkTree` and set the data to it.\n */\n static mostRecentTreeNode: CdkTreeNode<any> | null = null;\n\n /** Subject that emits when the component has been destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Emits when the node's data has changed. */\n _dataChanges = new Subject<void>();\n\n /** The tree node's data. */\n get data(): T { return this._data; }\n set data(value: T) {\n if (value !== this._data) {\n this._data = value;\n this._setRoleFromData();\n this._dataChanges.next();\n }\n }\n protected _data: T;\n\n get isExpanded(): boolean {\n return this._tree.treeControl.isExpanded(this._data);\n }\n\n get level(): number {\n return this._tree.treeControl.getLevel ? this._tree.treeControl.getLevel(this._data) : 0;\n }\n\n /**\n * The role of the node should be 'group' if it's an internal node,\n * and 'treeitem' if it's a leaf node.\n */\n @Input() role: 'treeitem' | 'group' = 'treeitem';\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>) {\n CdkTreeNode.mostRecentTreeNode = this as CdkTreeNode<T>;\n }\n\n ngOnDestroy() {\n // If this is the last tree node being destroyed,\n // clear out the reference to avoid leaking memory.\n if (CdkTreeNode.mostRecentTreeNode === this) {\n CdkTreeNode.mostRecentTreeNode = null;\n }\n\n this._dataChanges.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Focuses the menu item. Implements for FocusableOption. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n protected _setRoleFromData(): void {\n if (this._tree.treeControl.isExpandable) {\n this.role = this._tree.treeControl.isExpandable(this._data) ? 'group' : 'treeitem';\n } else {\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this._data);\n if (Array.isArray(childrenNodes)) {\n this._setRoleFromChildren(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(children => this._setRoleFromChildren(children));\n }\n }\n }\n\n protected _setRoleFromChildren(children: T[]) {\n this.role = children && children.length ? 'group' : 'treeitem';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Returns an error to be thrown when there is no usable data.\n * @docs-private\n */\nexport function getTreeNoValidDataSourceError() {\n return Error(`A valid data source must be provided.`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple nodes that are missing a when function.\n * @docs-private\n */\nexport function getTreeMultipleDefaultNodeDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching node defs for a particular set of data.\n * @docs-private\n */\nexport function getTreeMissingMatchingNodeDefError() {\n return Error(`Could not find a matching node definition for the provided node data.`);\n}\n\n/**\n * Returns an error to be thrown when there are tree control.\n * @docs-private\n */\nexport function getTreeControlMissingError() {\n return Error(`Could not find a tree control for the tree.`);\n}\n\n/**\n * Returns an error to be thrown when tree control did not implement functions for flat/nested node.\n * @docs-private\n */\nexport function getTreeControlFunctionsMissingError() {\n return Error(`Could not find functions for nested/flat tree in tree control.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n\n/** Context provided to the tree node component. */\nexport class CdkTreeNodeOutletContext<T> {\n /** Data for the node. */\n $implicit: T;\n\n /** Depth of the node. */\n level: number;\n\n /** Index location of the node. */\n index?: number;\n\n /** Length of the number of total dataNodes. */\n count?: number;\n\n constructor(data: T) {\n this.$implicit = data;\n }\n}\n\n/**\n * Data node definition for the CdkTree.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\n@Directive({\n selector: '[cdkTreeNodeDef]',\n inputs: [\n 'when: cdkTreeNodeDefWhen'\n ],\n})\nexport class CdkTreeNodeDef<T> {\n /**\n * Function that should return true if this node template should be used for the provided node\n * data and index. If left undefined, this node will be considered the default node template to\n * use when no other when functions return true for the data.\n * For every node, there must be at least one when function that passes or an undefined to\n * default.\n */\n when: (index: number, nodeData: T) => boolean;\n\n /** @docs-private */\n constructor(public template: TemplateRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n Directive,\n Inject,\n InjectionToken,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * Injection token used to provide a `CdkTreeNode` to its outlet.\n * Used primarily to avoid circular imports.\n * @docs-private\n */\nexport const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken<{}>('CDK_TREE_NODE_OUTLET_NODE');\n\n/**\n * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[cdkTreeNodeOutlet]'\n})\nexport class CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Observable} from 'rxjs';\nimport {take, filter} from 'rxjs/operators';\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */\nexport class NestedTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with nested tree function getChildren. */\n constructor(public getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null)) {\n super();\n }\n\n /**\n * Expands all dataNodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.clear();\n const allNodes = this.dataNodes.reduce((accumulator: T[], dataNode) =>\n [...accumulator, ...this.getDescendants(dataNode), dataNode], []);\n this.expansionModel.select(...allNodes);\n }\n\n /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */\n getDescendants(dataNode: T): T[] {\n const descendants: T[] = [];\n\n this._getDescendants(descendants, dataNode);\n // Remove the node itself\n return descendants.splice(1);\n }\n\n /** A helper function to get descendants recursively. */\n protected _getDescendants(descendants: T[], dataNode: T): void {\n descendants.push(dataNode);\n const childrenNodes = this.getChildren(dataNode);\n if (Array.isArray(childrenNodes)) {\n childrenNodes.forEach((child: T) => this._getDescendants(descendants, child));\n } else if (childrenNodes instanceof Observable) {\n // TypeScript as of version 3.5 doesn't seem to treat `Boolean` like a function that\n // returns a `boolean` specifically in the context of `filter`, so we manually clarify that.\n childrenNodes.pipe(take(1), filter(Boolean as () => boolean))\n .subscribe(children => {\n for (const child of children) {\n this._getDescendants(descendants, child);\n }\n });\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */\nexport class FlatTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with flat tree data node functions getLevel and isExpandable. */\n constructor(public getLevel: (dataNode: T) => number,\n public isExpandable: (dataNode: T) => boolean) {\n super();\n }\n\n /**\n * Gets a list of the data node's subtree of descendent data nodes.\n *\n * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes\n * with correct levels.\n */\n getDescendants(dataNode: T): T[] {\n const startIndex = this.dataNodes.indexOf(dataNode);\n const results: T[] = [];\n\n // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.\n // The level of descendants of a tree node must be greater than the level of the given\n // tree node.\n // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.\n // If we reach a node whose level is greater than the level of the tree node, we hit a\n // sibling of an ancestor.\n for (let i = startIndex + 1;\n i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]);\n i++) {\n results.push(this.dataNodes[i]);\n }\n return results;\n }\n\n /**\n * Expands all data nodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.select(...this.dataNodes);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {Observable} from 'rxjs';\nimport {TreeControl} from './tree-control';\n\n/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */\nexport abstract class BaseTreeControl<T> implements TreeControl<T> {\n\n /** Gets a list of descendent data nodes of a subtree rooted at given data node recursively. */\n abstract getDescendants(dataNode: T): T[];\n\n /** Expands all data nodes in the tree. */\n abstract expandAll(): void;\n\n /** Saved data node for `expandAll` action. */\n dataNodes: T[];\n\n /** A selection model with multi-selection to track expansion status. */\n expansionModel: SelectionModel<T> = new SelectionModel<T>(true);\n\n /** Get depth of a given data node, return the level number. This is for flat tree node. */\n getLevel: (dataNode: T) => number;\n\n /**\n * Whether the data node is expandable. Returns true if expandable.\n * This is for flat tree node.\n */\n isExpandable: (dataNode: T) => boolean;\n\n /** Gets a stream that emits whenever the given data node's children change. */\n getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null);\n\n /** Toggles one single data node's expanded/collapsed state. */\n toggle(dataNode: T): void {\n this.expansionModel.toggle(dataNode);\n }\n\n /** Expands one single data node. */\n expand(dataNode: T): void {\n this.expansionModel.select(dataNode);\n }\n\n /** Collapses one single data node. */\n collapse(dataNode: T): void {\n this.expansionModel.deselect(dataNode);\n }\n\n /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */\n isExpanded(dataNode: T): boolean {\n return this.expansionModel.isSelected(dataNode);\n }\n\n /** Toggles a subtree rooted at `node` recursively. */\n toggleDescendants(dataNode: T): void {\n this.expansionModel.isSelected(dataNode)\n ? this.collapseDescendants(dataNode)\n : this.expandDescendants(dataNode);\n }\n\n /** Collapse all dataNodes in the tree. */\n collapseAll(): void {\n this.expansionModel.clear();\n }\n\n /** Expands a subtree rooted at given data node recursively. */\n expandDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.select(...toBeProcessed);\n }\n\n /** Collapses a subtree rooted at given data node recursively. */\n collapseDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.deselect(...toBeProcessed);\n }\n}\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AUYA,AAAA,MAAsB,eAAe,CAArC;IAAA,WAAA,GAAA;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AC,SAAS,EAAV,IAAA,EAAA,CAAW,EAAC,QAAQ,EAAE,qBAAqB,EAAC,EAA5C,EAAA;;;;IALA,EAAA,IAAA,EAAQ,OAAO,EAAf;IAAA,EAAA,IAAA,EAAiB,WAAW,EAA5B;;;IAQA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAG,KAAK,EAAR,IAAA,EAAA,CAAS,4BAA4B,EAArC,EAAA,CAAA;IAaA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAG,YAAY,EAAf,IAAA,EAAA,CAAgB,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAnC,EAAA,CAAA;;;;;;;;ADdA,MAAM,qBAAqB,GAAG;IAC5B,iBAAiB;IACjB,cAAc;IACd,kBAAkB;IAClB,iBAAiB;IACjB,OAAO;IACP,WAAW;IACX,iBAAiB;CAClB,CAAD;AAQA,AAAA,MAAa,aAAa,CAA1B;;;IANA,EAAA,IAAA,EAAC,QAAQ,EAAT,IAAA,EAAA,CAAU;gBACR,OAAO,EAAE,CAAC,YAAY,CAAC;gBACvB,OAAO,EAAE,qBAAqB;gBAC9B,YAAY,EAAE,qBAAqB;gBACnC,SAAS,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;aAC1C,EAAD,EAAA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tree.js","sources":["../../../src/cdk/tree/tree-module.ts","../../../src/cdk/tree/toggle.ts","../../../src/cdk/tree/padding.ts","../../../src/cdk/tree/nested-node.ts","../../../src/cdk/tree/tree.ts","../../../src/cdk/tree/tree-errors.ts","../../../src/cdk/tree/node.ts","../../../src/cdk/tree/outlet.ts","../../../src/cdk/tree/control/nested-tree-control.ts","../../../src/cdk/tree/control/flat-tree-control.ts","../../../src/cdk/tree/control/base-tree-control.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {CdkTreeNodePadding} from './padding';\nimport {CdkTreeNodeToggle} from './toggle';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {CdkTreeNodeDef} from './node';\nimport {CdkNestedTreeNode} from './nested-node';\n\nconst EXPORTED_DECLARATIONS = [\n CdkNestedTreeNode,\n CdkTreeNodeDef,\n CdkTreeNodePadding,\n CdkTreeNodeToggle,\n CdkTree,\n CdkTreeNode,\n CdkTreeNodeOutlet,\n];\n\n@NgModule({\n imports: [CommonModule],\n exports: EXPORTED_DECLARATIONS,\n declarations: EXPORTED_DECLARATIONS,\n providers: [FocusMonitor, CdkTreeNodeDef]\n})\nexport class CdkTreeModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {Directive, HostListener, Input} from '@angular/core';\n\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/**\n * Node toggle to expand/collapse the node.\n */\n@Directive({selector: '[cdkTreeNodeToggle]'})\nexport class CdkTreeNodeToggle<T> {\n /** Whether expand/collapse the node recursively. */\n @Input('cdkTreeNodeToggleRecursive')\n get recursive(): boolean { return this._recursive; }\n set recursive(value: boolean) { this._recursive = coerceBooleanProperty(value); }\n protected _recursive = false;\n\n constructor(protected _tree: CdkTree<T>,\n protected _treeNode: CdkTreeNode<T>) {}\n\n // We have to use a `HostListener` here in order to support both Ivy and ViewEngine.\n // In Ivy the `host` bindings will be merged when this class is extended, whereas in\n // ViewEngine they're overwritten.\n // TODO(crisbeto): we move this back into `host` once Ivy is turned on by default.\n // tslint:disable-next-line:no-host-decorator-in-concrete\n @HostListener('click', ['$event'])\n _toggle(event: Event): void {\n this.recursive\n ? this._tree.treeControl.toggleDescendants(this._treeNode.data)\n : this._tree.treeControl.toggle(this._treeNode.data);\n\n event.stopPropagation();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Directive, ElementRef, Input, OnDestroy, Optional, Renderer2} from '@angular/core';\nimport {takeUntil} from 'rxjs/operators';\nimport {Subject} from 'rxjs';\nimport {CdkTree, CdkTreeNode} from './tree';\n\n/** Regex used to split a string on its CSS units. */\nconst cssUnitPattern = /([A-Za-z%]+)$/;\n\n/**\n * Indent for the children tree dataNodes.\n * This directive will add left-padding to the node to show hierarchy.\n */\n@Directive({\n selector: '[cdkTreeNodePadding]',\n})\nexport class CdkTreeNodePadding<T> implements OnDestroy {\n /** Current padding value applied to the element. Used to avoid unnecessarily hitting the DOM. */\n private _currentPadding: string|null;\n\n /** Subject that emits when the component has been destroyed. */\n private _destroyed = new Subject<void>();\n\n /** CSS units used for the indentation value. */\n indentUnits = 'px';\n\n /** The level of depth of the tree node. The padding will be `level * indent` pixels. */\n @Input('cdkTreeNodePadding')\n get level(): number { return this._level; }\n set level(value: number) {\n // Set to null as the fallback value so that _setPadding can fall back to the node level if the\n // consumer set the directive as `cdkTreeNodePadding=\"\"`. We still want to take this value if\n // they set 0 explicitly.\n this._level = coerceNumberProperty(value, null)!;\n this._setPadding();\n }\n _level: number;\n\n /**\n * The indent for each level. Can be a number or a CSS string.\n * Default number 40px from material design menu sub-menu spec.\n */\n @Input('cdkTreeNodePaddingIndent')\n get indent(): number | string { return this._indent; }\n set indent(indent: number | string) {\n let value = indent;\n let units = 'px';\n\n if (typeof indent === 'string') {\n const parts = indent.split(cssUnitPattern);\n value = parts[0];\n units = parts[1] || units;\n }\n\n this.indentUnits = units;\n this._indent = coerceNumberProperty(value);\n this._setPadding();\n }\n _indent: number = 40;\n\n constructor(private _treeNode: CdkTreeNode<T>,\n private _tree: CdkTree<T>,\n private _renderer: Renderer2,\n private _element: ElementRef<HTMLElement>,\n @Optional() private _dir: Directionality) {\n this._setPadding();\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => this._setPadding(true));\n }\n\n // In Ivy the indentation binding might be set before the tree node's data has been added,\n // which means that we'll miss the first render. We have to subscribe to changes in the\n // data to ensure that everything is up to date.\n _treeNode._dataChanges.subscribe(() => this._setPadding());\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** The padding indent value for the tree node. Returns a string with px numbers if not null. */\n _paddingIndent(): string|null {\n const nodeLevel = (this._treeNode.data && this._tree.treeControl.getLevel)\n ? this._tree.treeControl.getLevel(this._treeNode.data)\n : null;\n const level = this._level == null ? nodeLevel : this._level;\n return typeof level === 'number' ? `${level * this._indent}${this.indentUnits}` : null;\n }\n\n _setPadding(forceChange = false) {\n const padding = this._paddingIndent();\n\n if (padding !== this._currentPadding || forceChange) {\n const element = this._element.nativeElement;\n const paddingProp = this._dir && this._dir.value === 'rtl' ? 'paddingRight' : 'paddingLeft';\n const resetProp = paddingProp === 'paddingLeft' ? 'paddingRight' : 'paddingLeft';\n this._renderer.setStyle(element, paddingProp, padding);\n this._renderer.setStyle(element, resetProp, null);\n this._currentPadding = padding;\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n QueryList,\n} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from './outlet';\nimport {CdkTree, CdkTreeNode} from './tree';\nimport {getTreeControlFunctionsMissingError} from './tree-errors';\n\n/**\n * Nested node is a child of `<cdk-tree>`. It works with nested tree.\n * By using `cdk-nested-tree-node` component in tree node template, children of the parent node will\n * be added in the `cdkTreeNodeOutlet` in tree node template.\n * For example:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <ng-template cdkTreeNodeOutlet></ng-template>\n * </cdk-nested-tree-node>\n * ```\n * The children of node will be automatically added to `cdkTreeNodeOutlet`, the result dom will be\n * like this:\n * ```html\n * <cdk-nested-tree-node>\n * {{node.name}}\n * <cdk-nested-tree-node>{{child1.name}}</cdk-nested-tree-node>\n * <cdk-nested-tree-node>{{child2.name}}</cdk-nested-tree-node>\n * </cdk-nested-tree-node>\n * ```\n */\n@Directive({\n selector: 'cdk-nested-tree-node',\n exportAs: 'cdkNestedTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node cdk-nested-tree-node',\n },\n providers: [\n {provide: CdkTreeNode, useExisting: CdkNestedTreeNode},\n {provide: CDK_TREE_NODE_OUTLET_NODE, useExisting: CdkNestedTreeNode}\n ]\n})\nexport class CdkNestedTreeNode<T> extends CdkTreeNode<T> implements AfterContentInit, OnDestroy {\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** The children data dataNodes of current node. They will be placed in `CdkTreeNodeOutlet`. */\n protected _children: T[];\n\n /** The children node placeholder. */\n @ContentChildren(CdkTreeNodeOutlet, {\n // We need to use `descendants: true`, because Ivy will no longer match\n // indirect descendants if it's left as false.\n descendants: true\n })\n nodeOutlet: QueryList<CdkTreeNodeOutlet>;\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>,\n protected _differs: IterableDiffers) {\n super(_elementRef, _tree);\n }\n\n ngAfterContentInit() {\n this._dataDiffer = this._differs.find([]).create(this._tree.trackBy);\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this.data);\n if (Array.isArray(childrenNodes)) {\n this.updateChildrenNodes(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(result => this.updateChildrenNodes(result));\n }\n this.nodeOutlet.changes.pipe(takeUntil(this._destroyed))\n .subscribe(() => this.updateChildrenNodes());\n }\n\n ngOnDestroy() {\n this._clear();\n super.ngOnDestroy();\n }\n\n /** Add children dataNodes to the NodeOutlet */\n protected updateChildrenNodes(children?: T[]): void {\n const outlet = this._getNodeOutlet();\n if (children) {\n this._children = children;\n }\n if (outlet && this._children) {\n const viewContainer = outlet.viewContainer;\n this._tree.renderNodeChanges(this._children, this._dataDiffer, viewContainer, this._data);\n } else {\n // Reset the data differ if there's no children nodes displayed\n this._dataDiffer.diff([]);\n }\n }\n\n /** Clear the children dataNodes. */\n protected _clear(): void {\n const outlet = this._getNodeOutlet();\n if (outlet) {\n outlet.viewContainer.clear();\n this._dataDiffer.diff([]);\n }\n }\n\n /** Gets the outlet for the current node. */\n private _getNodeOutlet() {\n const outlets = this.nodeOutlet;\n\n // Note that since we use `descendants: true` on the query, we have to ensure\n // that we don't pick up the outlet of a child node by accident.\n return outlets && outlets.find(outlet => !outlet._node || outlet._node === this);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {FocusableOption} from '@angular/cdk/a11y';\nimport {CollectionViewer, DataSource, isDataSource} from '@angular/cdk/collections';\nimport {\n AfterContentChecked,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n Input,\n IterableChangeRecord,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n QueryList,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n TrackByFunction\n} from '@angular/core';\nimport {BehaviorSubject, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {TreeControl} from './control/tree-control';\nimport {CdkTreeNodeDef, CdkTreeNodeOutletContext} from './node';\nimport {CdkTreeNodeOutlet} from './outlet';\nimport {\n getTreeControlFunctionsMissingError,\n getTreeControlMissingError,\n getTreeMissingMatchingNodeDefError,\n getTreeMultipleDefaultNodeDefsError,\n getTreeNoValidDataSourceError\n} from './tree-errors';\n\n/**\n * CDK tree component that connects with a data source to retrieve data of type `T` and renders\n * dataNodes with hierarchy. Updates the dataNodes when new data is provided by the data source.\n */\n@Component({\n moduleId: module.id,\n selector: 'cdk-tree',\n exportAs: 'cdkTree',\n template: `<ng-container cdkTreeNodeOutlet></ng-container>`,\n host: {\n 'class': 'cdk-tree',\n 'role': 'tree',\n },\n encapsulation: ViewEncapsulation.None,\n\n // The \"OnPush\" status for the `CdkTree` component is effectively a noop, so we are removing it.\n // The view for `CdkTree` consists entirely of templates declared in other views. As they are\n // declared elsewhere, they are checked when their declaration points are checked.\n // tslint:disable-next-line:validate-decorators\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class CdkTree<T> implements AfterContentChecked, CollectionViewer, OnDestroy, OnInit {\n /** Subject that emits when the component has been destroyed. */\n private _onDestroy = new Subject<void>();\n\n /** Differ used to find the changes in the data provided by the data source. */\n private _dataDiffer: IterableDiffer<T>;\n\n /** Stores the node definition that does not have a when predicate. */\n private _defaultNodeDef: CdkTreeNodeDef<T> | null;\n\n /** Data subscription */\n private _dataSubscription: Subscription | null;\n\n /** Level of nodes */\n private _levels: Map<T, number> = new Map<T, number>();\n\n /**\n * Provides a stream containing the latest data array to render. Influenced by the tree's\n * stream of view window (what dataNodes are currently on screen).\n * Data source can be an observable of data array, or a data array to render.\n */\n @Input()\n get dataSource(): DataSource<T> | Observable<T[]> | T[] { return this._dataSource; }\n set dataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource !== dataSource) {\n this._switchDataSource(dataSource);\n }\n }\n private _dataSource: DataSource<T> | Observable<T[]> | T[];\n\n /** The tree controller */\n @Input() treeControl: TreeControl<T>;\n\n /**\n * Tracking function that will be used to check the differences in data changes. Used similarly\n * to `ngFor` `trackBy` function. Optimize node operations by identifying a node based on its data\n * relative to the function to know if a node should be added/removed/moved.\n * Accepts a function that takes two parameters, `index` and `item`.\n */\n @Input() trackBy: TrackByFunction<T>;\n\n // Outlets within the tree's template where the dataNodes will be inserted.\n @ViewChild(CdkTreeNodeOutlet, {static: true}) _nodeOutlet: CdkTreeNodeOutlet;\n\n /** The tree node template for the tree */\n @ContentChildren(CdkTreeNodeDef) _nodeDefs: QueryList<CdkTreeNodeDef<T>>;\n\n // TODO(tinayuangao): Setup a listener for scrolling, emit the calculated view to viewChange.\n // Remove the MAX_VALUE in viewChange\n /**\n * Stream containing the latest information on what rows are being displayed on screen.\n * Can be used by the data source to as a heuristic of what data should be provided.\n */\n viewChange =\n new BehaviorSubject<{start: number, end: number}>({start: 0, end: Number.MAX_VALUE});\n\n constructor(private _differs: IterableDiffers,\n private _changeDetectorRef: ChangeDetectorRef) {}\n\n ngOnInit() {\n this._dataDiffer = this._differs.find([]).create(this.trackBy);\n if (!this.treeControl) {\n throw getTreeControlMissingError();\n }\n }\n\n ngOnDestroy() {\n this._nodeOutlet.viewContainer.clear();\n\n this._onDestroy.next();\n this._onDestroy.complete();\n\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n }\n\n ngAfterContentChecked() {\n const defaultNodeDefs = this._nodeDefs.filter(def => !def.when);\n if (defaultNodeDefs.length > 1) {\n throw getTreeMultipleDefaultNodeDefsError();\n }\n this._defaultNodeDef = defaultNodeDefs[0];\n\n if (this.dataSource && this._nodeDefs && !this._dataSubscription) {\n this._observeRenderChanges();\n }\n }\n\n\n // TODO(tinayuangao): Work on keyboard traversal and actions, make sure it's working for RTL\n // and nested trees.\n\n /**\n * Switch to the provided data source by resetting the data and unsubscribing from the current\n * render change subscription if one exists. If the data source is null, interpret this by\n * clearing the node outlet. Otherwise start listening for new data.\n */\n private _switchDataSource(dataSource: DataSource<T> | Observable<T[]> | T[]) {\n if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') {\n (this.dataSource as DataSource<T>).disconnect(this);\n }\n\n if (this._dataSubscription) {\n this._dataSubscription.unsubscribe();\n this._dataSubscription = null;\n }\n\n // Remove the all dataNodes if there is now no data source\n if (!dataSource) {\n this._nodeOutlet.viewContainer.clear();\n }\n\n this._dataSource = dataSource;\n if (this._nodeDefs) {\n this._observeRenderChanges();\n }\n }\n\n /** Set up a subscription for the data provided by the data source. */\n private _observeRenderChanges() {\n let dataStream: Observable<T[] | ReadonlyArray<T>> | undefined;\n\n if (isDataSource(this._dataSource)) {\n dataStream = this._dataSource.connect(this);\n } else if (this._dataSource instanceof Observable) {\n dataStream = this._dataSource;\n } else if (Array.isArray(this._dataSource)) {\n dataStream = observableOf(this._dataSource);\n }\n\n if (dataStream) {\n this._dataSubscription = dataStream.pipe(takeUntil(this._onDestroy))\n .subscribe(data => this.renderNodeChanges(data));\n } else {\n throw getTreeNoValidDataSourceError();\n }\n }\n\n /** Check for changes made in the data and render each change (node added/removed/moved). */\n renderNodeChanges(data: T[] | ReadonlyArray<T>, dataDiffer: IterableDiffer<T> = this._dataDiffer,\n viewContainer: ViewContainerRef = this._nodeOutlet.viewContainer,\n parentData?: T) {\n const changes = dataDiffer.diff(data);\n if (!changes) { return; }\n\n changes.forEachOperation((item: IterableChangeRecord<T>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null) => {\n if (item.previousIndex == null) {\n this.insertNode(data[currentIndex!], currentIndex!, viewContainer, parentData);\n } else if (currentIndex == null) {\n viewContainer.remove(adjustedPreviousIndex!);\n this._levels.delete(item.item);\n } else {\n const view = viewContainer.get(adjustedPreviousIndex!);\n viewContainer.move(view!, currentIndex);\n }\n });\n\n this._changeDetectorRef.detectChanges();\n }\n\n /**\n * Finds the matching node definition that should be used for this node data. If there is only\n * one node definition, it is returned. Otherwise, find the node definition that has a when\n * predicate that returns true with the data. If none return true, return the default node\n * definition.\n */\n _getNodeDef(data: T, i: number): CdkTreeNodeDef<T> {\n if (this._nodeDefs.length === 1) { return this._nodeDefs.first; }\n\n const nodeDef =\n this._nodeDefs.find(def => def.when && def.when(i, data)) || this._defaultNodeDef;\n if (!nodeDef) { throw getTreeMissingMatchingNodeDefError(); }\n\n return nodeDef;\n }\n\n /**\n * Create the embedded view for the data node template and place it in the correct index location\n * within the data node view container.\n */\n insertNode(nodeData: T, index: number, viewContainer?: ViewContainerRef, parentData?: T) {\n const node = this._getNodeDef(nodeData, index);\n\n // Node context that will be provided to created embedded view\n const context = new CdkTreeNodeOutletContext<T>(nodeData);\n\n // If the tree is flat tree, then use the `getLevel` function in flat tree control\n // Otherwise, use the level of parent node.\n if (this.treeControl.getLevel) {\n context.level = this.treeControl.getLevel(nodeData);\n } else if (typeof parentData !== 'undefined' && this._levels.has(parentData)) {\n context.level = this._levels.get(parentData)! + 1;\n } else {\n context.level = 0;\n }\n this._levels.set(nodeData, context.level);\n\n // Use default tree nodeOutlet, or nested node's nodeOutlet\n const container = viewContainer ? viewContainer : this._nodeOutlet.viewContainer;\n container.createEmbeddedView(node.template, context, index);\n\n // Set the data to just created `CdkTreeNode`.\n // The `CdkTreeNode` created from `createEmbeddedView` will be saved in static variable\n // `mostRecentTreeNode`. We get it from static variable and pass the node data to it.\n if (CdkTreeNode.mostRecentTreeNode) {\n CdkTreeNode.mostRecentTreeNode.data = nodeData;\n }\n }\n}\n\n\n/**\n * Tree node for CdkTree. It contains the data in the tree node.\n */\n@Directive({\n selector: 'cdk-tree-node',\n exportAs: 'cdkTreeNode',\n host: {\n '[attr.aria-expanded]': 'isExpanded',\n '[attr.aria-level]': 'role === \"treeitem\" ? level : null',\n '[attr.role]': 'role',\n 'class': 'cdk-tree-node',\n },\n})\nexport class CdkTreeNode<T> implements FocusableOption, OnDestroy {\n /**\n * The most recently created `CdkTreeNode`. We save it in static variable so we can retrieve it\n * in `CdkTree` and set the data to it.\n */\n static mostRecentTreeNode: CdkTreeNode<any> | null = null;\n\n /** Subject that emits when the component has been destroyed. */\n protected _destroyed = new Subject<void>();\n\n /** Emits when the node's data has changed. */\n _dataChanges = new Subject<void>();\n\n /** The tree node's data. */\n get data(): T { return this._data; }\n set data(value: T) {\n if (value !== this._data) {\n this._data = value;\n this._setRoleFromData();\n this._dataChanges.next();\n }\n }\n protected _data: T;\n\n get isExpanded(): boolean {\n return this._tree.treeControl.isExpanded(this._data);\n }\n\n get level(): number {\n return this._tree.treeControl.getLevel ? this._tree.treeControl.getLevel(this._data) : 0;\n }\n\n /**\n * The role of the node should be 'group' if it's an internal node,\n * and 'treeitem' if it's a leaf node.\n */\n @Input() role: 'treeitem' | 'group' = 'treeitem';\n\n constructor(protected _elementRef: ElementRef<HTMLElement>,\n protected _tree: CdkTree<T>) {\n CdkTreeNode.mostRecentTreeNode = this as CdkTreeNode<T>;\n }\n\n ngOnDestroy() {\n // If this is the last tree node being destroyed,\n // clear out the reference to avoid leaking memory.\n if (CdkTreeNode.mostRecentTreeNode === this) {\n CdkTreeNode.mostRecentTreeNode = null;\n }\n\n this._dataChanges.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Focuses the menu item. Implements for FocusableOption. */\n focus(): void {\n this._elementRef.nativeElement.focus();\n }\n\n protected _setRoleFromData(): void {\n if (this._tree.treeControl.isExpandable) {\n this.role = this._tree.treeControl.isExpandable(this._data) ? 'group' : 'treeitem';\n } else {\n if (!this._tree.treeControl.getChildren) {\n throw getTreeControlFunctionsMissingError();\n }\n const childrenNodes = this._tree.treeControl.getChildren(this._data);\n if (Array.isArray(childrenNodes)) {\n this._setRoleFromChildren(childrenNodes as T[]);\n } else if (childrenNodes instanceof Observable) {\n childrenNodes.pipe(takeUntil(this._destroyed))\n .subscribe(children => this._setRoleFromChildren(children));\n }\n }\n }\n\n protected _setRoleFromChildren(children: T[]) {\n this.role = children && children.length ? 'group' : 'treeitem';\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Returns an error to be thrown when there is no usable data.\n * @docs-private\n */\nexport function getTreeNoValidDataSourceError() {\n return Error(`A valid data source must be provided.`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple nodes that are missing a when function.\n * @docs-private\n */\nexport function getTreeMultipleDefaultNodeDefsError() {\n return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching node defs for a particular set of data.\n * @docs-private\n */\nexport function getTreeMissingMatchingNodeDefError() {\n return Error(`Could not find a matching node definition for the provided node data.`);\n}\n\n/**\n * Returns an error to be thrown when there are tree control.\n * @docs-private\n */\nexport function getTreeControlMissingError() {\n return Error(`Could not find a tree control for the tree.`);\n}\n\n/**\n * Returns an error to be thrown when tree control did not implement functions for flat/nested node.\n * @docs-private\n */\nexport function getTreeControlFunctionsMissingError() {\n return Error(`Could not find functions for nested/flat tree in tree control.`);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directive, TemplateRef} from '@angular/core';\n\n\n/** Context provided to the tree node component. */\nexport class CdkTreeNodeOutletContext<T> {\n /** Data for the node. */\n $implicit: T;\n\n /** Depth of the node. */\n level: number;\n\n /** Index location of the node. */\n index?: number;\n\n /** Length of the number of total dataNodes. */\n count?: number;\n\n constructor(data: T) {\n this.$implicit = data;\n }\n}\n\n/**\n * Data node definition for the CdkTree.\n * Captures the node's template and a when predicate that describes when this node should be used.\n */\n@Directive({\n selector: '[cdkTreeNodeDef]',\n inputs: [\n 'when: cdkTreeNodeDefWhen'\n ],\n})\nexport class CdkTreeNodeDef<T> {\n /**\n * Function that should return true if this node template should be used for the provided node\n * data and index. If left undefined, this node will be considered the default node template to\n * use when no other when functions return true for the data.\n * For every node, there must be at least one when function that passes or an undefined to\n * default.\n */\n when: (index: number, nodeData: T) => boolean;\n\n /** @docs-private */\n constructor(public template: TemplateRef<any>) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n Directive,\n Inject,\n InjectionToken,\n Optional,\n ViewContainerRef,\n} from '@angular/core';\n\n/**\n * Injection token used to provide a `CdkTreeNode` to its outlet.\n * Used primarily to avoid circular imports.\n * @docs-private\n */\nexport const CDK_TREE_NODE_OUTLET_NODE = new InjectionToken<{}>('CDK_TREE_NODE_OUTLET_NODE');\n\n/**\n * Outlet for nested CdkNode. Put `[cdkTreeNodeOutlet]` on a tag to place children dataNodes\n * inside the outlet.\n */\n@Directive({\n selector: '[cdkTreeNodeOutlet]'\n})\nexport class CdkTreeNodeOutlet {\n constructor(\n public viewContainer: ViewContainerRef,\n @Inject(CDK_TREE_NODE_OUTLET_NODE) @Optional() public _node?: any) {}\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {Observable} from 'rxjs';\nimport {take, filter} from 'rxjs/operators';\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Nested tree control. Able to expand/collapse a subtree recursively for NestedNode type. */\nexport class NestedTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with nested tree function getChildren. */\n constructor(public getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null)) {\n super();\n }\n\n /**\n * Expands all dataNodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all root level\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.clear();\n const allNodes = this.dataNodes.reduce((accumulator: T[], dataNode) =>\n [...accumulator, ...this.getDescendants(dataNode), dataNode], []);\n this.expansionModel.select(...allNodes);\n }\n\n /** Gets a list of descendant dataNodes of a subtree rooted at given data node recursively. */\n getDescendants(dataNode: T): T[] {\n const descendants: T[] = [];\n\n this._getDescendants(descendants, dataNode);\n // Remove the node itself\n return descendants.splice(1);\n }\n\n /** A helper function to get descendants recursively. */\n protected _getDescendants(descendants: T[], dataNode: T): void {\n descendants.push(dataNode);\n const childrenNodes = this.getChildren(dataNode);\n if (Array.isArray(childrenNodes)) {\n childrenNodes.forEach((child: T) => this._getDescendants(descendants, child));\n } else if (childrenNodes instanceof Observable) {\n // TypeScript as of version 3.5 doesn't seem to treat `Boolean` like a function that\n // returns a `boolean` specifically in the context of `filter`, so we manually clarify that.\n childrenNodes.pipe(take(1), filter(Boolean as () => boolean))\n .subscribe(children => {\n for (const child of children) {\n this._getDescendants(descendants, child);\n }\n });\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseTreeControl} from './base-tree-control';\n\n/** Flat tree control. Able to expand/collapse a subtree recursively for flattened tree. */\nexport class FlatTreeControl<T> extends BaseTreeControl<T> {\n\n /** Construct with flat tree data node functions getLevel and isExpandable. */\n constructor(public getLevel: (dataNode: T) => number,\n public isExpandable: (dataNode: T) => boolean) {\n super();\n }\n\n /**\n * Gets a list of the data node's subtree of descendent data nodes.\n *\n * To make this working, the `dataNodes` of the TreeControl must be flattened tree nodes\n * with correct levels.\n */\n getDescendants(dataNode: T): T[] {\n const startIndex = this.dataNodes.indexOf(dataNode);\n const results: T[] = [];\n\n // Goes through flattened tree nodes in the `dataNodes` array, and get all descendants.\n // The level of descendants of a tree node must be greater than the level of the given\n // tree node.\n // If we reach a node whose level is equal to the level of the tree node, we hit a sibling.\n // If we reach a node whose level is greater than the level of the tree node, we hit a\n // sibling of an ancestor.\n for (let i = startIndex + 1;\n i < this.dataNodes.length && this.getLevel(dataNode) < this.getLevel(this.dataNodes[i]);\n i++) {\n results.push(this.dataNodes[i]);\n }\n return results;\n }\n\n /**\n * Expands all data nodes in the tree.\n *\n * To make this working, the `dataNodes` variable of the TreeControl must be set to all flattened\n * data nodes of the tree.\n */\n expandAll(): void {\n this.expansionModel.select(...this.dataNodes);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {Observable} from 'rxjs';\nimport {TreeControl} from './tree-control';\n\n/** Base tree control. It has basic toggle/expand/collapse operations on a single data node. */\nexport abstract class BaseTreeControl<T> implements TreeControl<T> {\n\n /** Gets a list of descendent data nodes of a subtree rooted at given data node recursively. */\n abstract getDescendants(dataNode: T): T[];\n\n /** Expands all data nodes in the tree. */\n abstract expandAll(): void;\n\n /** Saved data node for `expandAll` action. */\n dataNodes: T[];\n\n /** A selection model with multi-selection to track expansion status. */\n expansionModel: SelectionModel<T> = new SelectionModel<T>(true);\n\n /** Get depth of a given data node, return the level number. This is for flat tree node. */\n getLevel: (dataNode: T) => number;\n\n /**\n * Whether the data node is expandable. Returns true if expandable.\n * This is for flat tree node.\n */\n isExpandable: (dataNode: T) => boolean;\n\n /** Gets a stream that emits whenever the given data node's children change. */\n getChildren: (dataNode: T) => (Observable<T[]> | T[] | undefined | null);\n\n /** Toggles one single data node's expanded/collapsed state. */\n toggle(dataNode: T): void {\n this.expansionModel.toggle(dataNode);\n }\n\n /** Expands one single data node. */\n expand(dataNode: T): void {\n this.expansionModel.select(dataNode);\n }\n\n /** Collapses one single data node. */\n collapse(dataNode: T): void {\n this.expansionModel.deselect(dataNode);\n }\n\n /** Whether a given data node is expanded or not. Returns true if the data node is expanded. */\n isExpanded(dataNode: T): boolean {\n return this.expansionModel.isSelected(dataNode);\n }\n\n /** Toggles a subtree rooted at `node` recursively. */\n toggleDescendants(dataNode: T): void {\n this.expansionModel.isSelected(dataNode)\n ? this.collapseDescendants(dataNode)\n : this.expandDescendants(dataNode);\n }\n\n /** Collapse all dataNodes in the tree. */\n collapseAll(): void {\n this.expansionModel.clear();\n }\n\n /** Expands a subtree rooted at given data node recursively. */\n expandDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.select(...toBeProcessed);\n }\n\n /** Collapses a subtree rooted at given data node recursively. */\n collapseDescendants(dataNode: T): void {\n let toBeProcessed = [dataNode];\n toBeProcessed.push(...this.getDescendants(dataNode));\n this.expansionModel.deselect(...toBeProcessed);\n }\n}\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AUYA,AAAA,MAAsB,eAAe,CAArC;IAAA,WAAA,GAAA;;;;QAYE,IAAF,CAAA,cAAgB,GAAsB,IAAI,cAAc,CAAI,IAAI,CAAC,CAAC;KA2DjE;;;;;;IA5CC,MAAM,CAAC,QAAW,EAApB;QACI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KACtC;;;;;;IAGD,MAAM,CAAC,QAAW,EAApB;QACI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KACtC;;;;;;IAGD,QAAQ,CAAC,QAAW,EAAtB;QACI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;KACxC;;;;;;IAGD,UAAU,CAAC,QAAW,EAAxB;QACI,OAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;KACjD;;;;;;IAGD,iBAAiB,CAAC,QAAW,EAA/B;QACI,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC;cAClC,IAAI,CAAC,mBAAmB,CAAC,QAAQ,CAAC;cAClC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;KACxC;;;;;IAGD,WAAW,GAAb;QACI,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;KAC7B;;;;;;IAGD,iBAAiB,CAAC,Q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Ac,CAAC;aAC1C,EAAD,EAAA;;;;;;;;;;;;;;;"}
package/esm5/cdk.es5.js CHANGED
@@ -15,7 +15,7 @@ import { Version } from '@angular/core';
15
15
  * Current version of the Angular Component Development Kit.
16
16
  * @type {?}
17
17
  */
18
- var VERSION = new Version('8.1.0');
18
+ var VERSION = new Version('8.1.4');
19
19
 
20
20
  /**
21
21
  * @fileoverview added by tsickle
@@ -1 +1 @@
1
- {"version":3,"file":"cdk.es5.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.1.0');\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAWA,AAAA,IAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"cdk.es5.js","sources":["../../src/cdk/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Angular Component Development Kit. */\nexport const VERSION = new Version('8.1.4');\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAWA,AAAA,IAAa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,CAAC;;;;;;;;;;;;;;"}
@@ -861,8 +861,8 @@ var OVERLAY_KEYBOARD_DISPATCHER_PROVIDER = {
861
861
  * Container inside which all overlays will render.
862
862
  */
863
863
  var OverlayContainer = /** @class */ (function () {
864
- function OverlayContainer(_document) {
865
- this._document = _document;
864
+ function OverlayContainer(document) {
865
+ this._document = document;
866
866
  }
867
867
  /**
868
868
  * @return {?}
@@ -916,9 +916,17 @@ var OverlayContainer = /** @class */ (function () {
916
916
  * @return {?}
917
917
  */
918
918
  function () {
919
+ /** @type {?} */
920
+ var containerClass = 'cdk-overlay-container';
921
+ /** @type {?} */
922
+ var previousContainers = this._document.getElementsByClassName(containerClass);
923
+ // Remove any old containers. This can happen when transitioning from the server to the client.
924
+ for (var i = 0; i < previousContainers.length; i++) {
925
+ (/** @type {?} */ (previousContainers[i].parentNode)).removeChild(previousContainers[i]);
926
+ }
919
927
  /** @type {?} */
920
928
  var container = this._document.createElement('div');
921
- container.classList.add('cdk-overlay-container');
929
+ container.classList.add(containerClass);
922
930
  this._document.body.appendChild(container);
923
931
  this._containerElement = container;
924
932
  };
@@ -1447,6 +1455,9 @@ OverlayRef = /** @class */ (function () {
1447
1455
  * @return {?}
1448
1456
  */
1449
1457
  function () {
1458
+ if (!this._pane) {
1459
+ return;
1460
+ }
1450
1461
  /** @type {?} */
1451
1462
  var style = this._pane.style;
1452
1463
  style.width = coerceCssPixelValue(this._config.width);
@@ -2539,6 +2550,7 @@ FlexibleConnectedPositionStrategy = /** @class */ (function () {
2539
2550
  (minWidth != null && minWidth <= availableWidth);
2540
2551
  return verticalFit && horizontalFit;
2541
2552
  }
2553
+ return false;
2542
2554
  };
2543
2555
  /**
2544
2556
  * Gets the point at which the overlay can be "pushed" on-screen. If the overlay is larger than
@@ -5004,16 +5016,18 @@ var FullscreenOverlayContainer = /** @class */ (function (_super) {
5004
5016
  */
5005
5017
  function () {
5006
5018
  if (!this._fullScreenEventName) {
5007
- if (this._document.fullscreenEnabled) {
5019
+ /** @type {?} */
5020
+ var _document = (/** @type {?} */ (this._document));
5021
+ if (_document.fullscreenEnabled) {
5008
5022
  this._fullScreenEventName = 'fullscreenchange';
5009
5023
  }
5010
- else if (this._document.webkitFullscreenEnabled) {
5024
+ else if (_document.webkitFullscreenEnabled) {
5011
5025
  this._fullScreenEventName = 'webkitfullscreenchange';
5012
5026
  }
5013
- else if (((/** @type {?} */ (this._document))).mozFullScreenEnabled) {
5027
+ else if (_document.mozFullScreenEnabled) {
5014
5028
  this._fullScreenEventName = 'mozfullscreenchange';
5015
5029
  }
5016
- else if (((/** @type {?} */ (this._document))).msFullscreenEnabled) {
5030
+ else if (_document.msFullscreenEnabled) {
5017
5031
  this._fullScreenEventName = 'MSFullscreenChange';
5018
5032
  }
5019
5033
  }
@@ -5034,10 +5048,12 @@ var FullscreenOverlayContainer = /** @class */ (function (_super) {
5034
5048
  * @return {?}
5035
5049
  */
5036
5050
  function () {
5037
- return this._document.fullscreenElement ||
5038
- this._document.webkitFullscreenElement ||
5039
- ((/** @type {?} */ (this._document))).mozFullScreenElement ||
5040
- ((/** @type {?} */ (this._document))).msFullscreenElement ||
5051
+ /** @type {?} */
5052
+ var _document = (/** @type {?} */ (this._document));
5053
+ return _document.fullscreenElement ||
5054
+ _document.webkitFullscreenElement ||
5055
+ _document.mozFullScreenElement ||
5056
+ _document.msFullscreenElement ||
5041
5057
  null;
5042
5058
  };
5043
5059
  FullscreenOverlayContainer.decorators = [