index.d.ts 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. import { _AbstractConstructor } from '@angular/material/core';
  2. import { AbstractControl } from '@angular/forms';
  3. import { AfterContentInit } from '@angular/core';
  4. import { AfterViewInit } from '@angular/core';
  5. import { AnimationEvent as AnimationEvent_2 } from '@angular/animations';
  6. import { AnimationTriggerMetadata } from '@angular/animations';
  7. import { CanColor } from '@angular/material/core';
  8. import { CdkStep } from '@angular/cdk/stepper';
  9. import { CdkStepLabel } from '@angular/cdk/stepper';
  10. import { CdkStepper } from '@angular/cdk/stepper';
  11. import { CdkStepperNext } from '@angular/cdk/stepper';
  12. import { CdkStepperPrevious } from '@angular/cdk/stepper';
  13. import { ChangeDetectorRef } from '@angular/core';
  14. import { _Constructor } from '@angular/material/core';
  15. import { Directionality } from '@angular/cdk/bidi';
  16. import { ElementRef } from '@angular/core';
  17. import { ErrorStateMatcher } from '@angular/material/core';
  18. import { EventEmitter } from '@angular/core';
  19. import { FocusMonitor } from '@angular/cdk/a11y';
  20. import { FocusOrigin } from '@angular/cdk/a11y';
  21. import { FormGroupDirective } from '@angular/forms';
  22. import * as i0 from '@angular/core';
  23. import * as i10 from '@angular/cdk/stepper';
  24. import * as i11 from '@angular/material/icon';
  25. import * as i7 from '@angular/material/core';
  26. import * as i8 from '@angular/common';
  27. import * as i9 from '@angular/cdk/portal';
  28. import { NgForm } from '@angular/forms';
  29. import { OnDestroy } from '@angular/core';
  30. import { Optional } from '@angular/core';
  31. import { QueryList } from '@angular/core';
  32. import { StepperOptions } from '@angular/cdk/stepper';
  33. import { StepperOrientation } from '@angular/cdk/stepper';
  34. import { StepState } from '@angular/cdk/stepper';
  35. import { Subject } from 'rxjs';
  36. import { TemplatePortal } from '@angular/cdk/portal';
  37. import { TemplateRef } from '@angular/core';
  38. import { ThemePalette } from '@angular/material/core';
  39. import { ViewContainerRef } from '@angular/core';
  40. declare namespace i1 {
  41. export {
  42. MatStep,
  43. MatStepper
  44. }
  45. }
  46. declare namespace i2 {
  47. export {
  48. MatStepLabel
  49. }
  50. }
  51. declare namespace i3 {
  52. export {
  53. MatStepperNext,
  54. MatStepperPrevious
  55. }
  56. }
  57. declare namespace i4 {
  58. export {
  59. MatStepHeader
  60. }
  61. }
  62. declare namespace i5 {
  63. export {
  64. MatStepperIconContext,
  65. MatStepperIcon
  66. }
  67. }
  68. declare namespace i6 {
  69. export {
  70. MatStepContent
  71. }
  72. }
  73. /** @docs-private */
  74. export declare const MAT_STEPPER_INTL_PROVIDER: {
  75. provide: typeof MatStepperIntl;
  76. deps: Optional[][];
  77. useFactory: typeof MAT_STEPPER_INTL_PROVIDER_FACTORY;
  78. };
  79. /** @docs-private */
  80. export declare function MAT_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: MatStepperIntl): MatStepperIntl;
  81. export declare class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentInit, OnDestroy {
  82. private _errorStateMatcher;
  83. private _viewContainerRef;
  84. private _isSelected;
  85. /** Content for step label given by `<ng-template matStepLabel>`. */
  86. stepLabel: MatStepLabel;
  87. /** Theme color for the particular step. */
  88. color: ThemePalette;
  89. /** Content that will be rendered lazily. */
  90. _lazyContent: MatStepContent;
  91. /** Currently-attached portal containing the lazy content. */
  92. _portal: TemplatePortal;
  93. constructor(stepper: MatStepper, _errorStateMatcher: ErrorStateMatcher, _viewContainerRef: ViewContainerRef, stepperOptions?: StepperOptions);
  94. ngAfterContentInit(): void;
  95. ngOnDestroy(): void;
  96. /** Custom error state matcher that additionally checks for validity of interacted form. */
  97. isErrorState(control: AbstractControl | null, form: FormGroupDirective | NgForm | null): boolean;
  98. static ɵfac: i0.ɵɵFactoryDeclaration<MatStep, [null, { skipSelf: true; }, null, { optional: true; }]>;
  99. static ɵcmp: i0.ɵɵComponentDeclaration<MatStep, "mat-step", ["matStep"], { "color": { "alias": "color"; "required": false; }; }, {}, ["stepLabel", "_lazyContent"], ["*"], false, never>;
  100. }
  101. /**
  102. * Content for a `mat-step` that will be rendered lazily.
  103. */
  104. export declare class MatStepContent {
  105. _template: TemplateRef<any>;
  106. constructor(_template: TemplateRef<any>);
  107. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepContent, never>;
  108. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepContent, "ng-template[matStepContent]", never, {}, {}, never, never, false, never>;
  109. }
  110. export declare class MatStepHeader extends _MatStepHeaderBase implements AfterViewInit, OnDestroy, CanColor {
  111. _intl: MatStepperIntl;
  112. private _focusMonitor;
  113. private _intlSubscription;
  114. /** State of the given step. */
  115. state: StepState;
  116. /** Label of the given step. */
  117. label: MatStepLabel | string;
  118. /** Error message to display when there's an error. */
  119. errorMessage: string;
  120. /** Overrides for the header icons, passed in via the stepper. */
  121. iconOverrides: {
  122. [key: string]: TemplateRef<MatStepperIconContext>;
  123. };
  124. /** Index of the given step. */
  125. index: number;
  126. /** Whether the given step is selected. */
  127. selected: boolean;
  128. /** Whether the given step label is active. */
  129. active: boolean;
  130. /** Whether the given step is optional. */
  131. optional: boolean;
  132. /** Whether the ripple should be disabled. */
  133. disableRipple: boolean;
  134. constructor(_intl: MatStepperIntl, _focusMonitor: FocusMonitor, _elementRef: ElementRef<HTMLElement>, changeDetectorRef: ChangeDetectorRef);
  135. ngAfterViewInit(): void;
  136. ngOnDestroy(): void;
  137. /** Focuses the step header. */
  138. focus(origin?: FocusOrigin, options?: FocusOptions): void;
  139. /** Returns string label of given step if it is a text label. */
  140. _stringLabel(): string | null;
  141. /** Returns MatStepLabel if the label of given step is a template label. */
  142. _templateLabel(): MatStepLabel | null;
  143. /** Returns the host HTML element. */
  144. _getHostElement(): HTMLElement;
  145. /** Template context variables that are exposed to the `matStepperIcon` instances. */
  146. _getIconContext(): MatStepperIconContext;
  147. _getDefaultTextForState(state: StepState): string;
  148. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepHeader, never>;
  149. static ɵcmp: i0.ɵɵComponentDeclaration<MatStepHeader, "mat-step-header", never, { "color": { "alias": "color"; "required": false; }; "state": { "alias": "state"; "required": false; }; "label": { "alias": "label"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "iconOverrides": { "alias": "iconOverrides"; "required": false; }; "index": { "alias": "index"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "active": { "alias": "active"; "required": false; }; "optional": { "alias": "optional"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, never, never, false, never>;
  150. }
  151. /** @docs-private */
  152. declare const _MatStepHeaderBase: _Constructor<CanColor> & _AbstractConstructor<CanColor> & {
  153. new (elementRef: ElementRef): {
  154. _elementRef: ElementRef<HTMLElement>;
  155. focus(): void;
  156. };
  157. ɵfac: unknown;
  158. ɵdir: unknown;
  159. };
  160. export declare class MatStepLabel extends CdkStepLabel {
  161. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepLabel, never>;
  162. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepLabel, "[matStepLabel]", never, {}, {}, never, never, false, never>;
  163. }
  164. export declare class MatStepper extends CdkStepper implements AfterContentInit {
  165. /** The list of step headers of the steps in the stepper. */
  166. _stepHeader: QueryList<MatStepHeader>;
  167. /** Full list of steps inside the stepper, including inside nested steppers. */
  168. _steps: QueryList<MatStep>;
  169. /** Steps that belong to the current stepper, excluding ones from nested steppers. */
  170. readonly steps: QueryList<MatStep>;
  171. /** Custom icon overrides passed in by the consumer. */
  172. _icons: QueryList<MatStepperIcon>;
  173. /** Event emitted when the current step is done transitioning in. */
  174. readonly animationDone: EventEmitter<void>;
  175. /** Whether ripples should be disabled for the step headers. */
  176. disableRipple: boolean;
  177. /** Theme color for all of the steps in stepper. */
  178. color: ThemePalette;
  179. /**
  180. * Whether the label should display in bottom or end position.
  181. * Only applies in the `horizontal` orientation.
  182. */
  183. labelPosition: 'bottom' | 'end';
  184. /**
  185. * Position of the stepper's header.
  186. * Only applies in the `horizontal` orientation.
  187. */
  188. headerPosition: 'top' | 'bottom';
  189. /** Consumer-specified template-refs to be used to override the header icons. */
  190. _iconOverrides: Record<string, TemplateRef<MatStepperIconContext>>;
  191. /** Stream of animation `done` events when the body expands/collapses. */
  192. readonly _animationDone: Subject<AnimationEvent_2>;
  193. /** Duration for the animation. Will be normalized to milliseconds if no units are set. */
  194. get animationDuration(): string;
  195. set animationDuration(value: string);
  196. private _animationDuration;
  197. constructor(dir: Directionality, changeDetectorRef: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>);
  198. ngAfterContentInit(): void;
  199. _stepIsNavigable(index: number, step: MatStep): boolean;
  200. _getAnimationDuration(): string;
  201. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepper, [{ optional: true; }, null, null]>;
  202. static ɵcmp: i0.ɵɵComponentDeclaration<MatStepper, "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", ["matStepper", "matVerticalStepper", "matHorizontalStepper"], { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "headerPosition": { "alias": "headerPosition"; "required": false; }; "animationDuration": { "alias": "animationDuration"; "required": false; }; }, { "animationDone": "animationDone"; }, ["_steps", "_icons"], never, false, never>;
  203. }
  204. /**
  205. * Animations used by the Material steppers.
  206. * @docs-private
  207. */
  208. export declare const matStepperAnimations: {
  209. readonly horizontalStepTransition: AnimationTriggerMetadata;
  210. readonly verticalStepTransition: AnimationTriggerMetadata;
  211. };
  212. /**
  213. * Template to be used to override the icons inside the step header.
  214. */
  215. export declare class MatStepperIcon {
  216. templateRef: TemplateRef<MatStepperIconContext>;
  217. /** Name of the icon to be overridden. */
  218. name: StepState;
  219. constructor(templateRef: TemplateRef<MatStepperIconContext>);
  220. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperIcon, never>;
  221. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepperIcon, "ng-template[matStepperIcon]", never, { "name": { "alias": "matStepperIcon"; "required": false; }; }, {}, never, never, false, never>;
  222. }
  223. /** Template context available to an attached `matStepperIcon`. */
  224. export declare interface MatStepperIconContext {
  225. /** Index of the step. */
  226. index: number;
  227. /** Whether the step is currently active. */
  228. active: boolean;
  229. /** Whether the step is optional. */
  230. optional: boolean;
  231. }
  232. /** Stepper data that is required for internationalization. */
  233. export declare class MatStepperIntl {
  234. /**
  235. * Stream that emits whenever the labels here are changed. Use this to notify
  236. * components if the labels have changed after initialization.
  237. */
  238. readonly changes: Subject<void>;
  239. /** Label that is rendered below optional steps. */
  240. optionalLabel: string;
  241. /** Label that is used to indicate step as completed to screen readers. */
  242. completedLabel: string;
  243. /** Label that is used to indicate step as editable to screen readers. */
  244. editableLabel: string;
  245. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperIntl, never>;
  246. static ɵprov: i0.ɵɵInjectableDeclaration<MatStepperIntl>;
  247. }
  248. export declare class MatStepperModule {
  249. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperModule, never>;
  250. static ɵmod: i0.ɵɵNgModuleDeclaration<MatStepperModule, [typeof i1.MatStep, typeof i2.MatStepLabel, typeof i1.MatStepper, typeof i3.MatStepperNext, typeof i3.MatStepperPrevious, typeof i4.MatStepHeader, typeof i5.MatStepperIcon, typeof i6.MatStepContent], [typeof i7.MatCommonModule, typeof i8.CommonModule, typeof i9.PortalModule, typeof i10.CdkStepperModule, typeof i11.MatIconModule, typeof i7.MatRippleModule], [typeof i7.MatCommonModule, typeof i1.MatStep, typeof i2.MatStepLabel, typeof i1.MatStepper, typeof i3.MatStepperNext, typeof i3.MatStepperPrevious, typeof i4.MatStepHeader, typeof i5.MatStepperIcon, typeof i6.MatStepContent]>;
  251. static ɵinj: i0.ɵɵInjectorDeclaration<MatStepperModule>;
  252. }
  253. /** Button that moves to the next step in a stepper workflow. */
  254. export declare class MatStepperNext extends CdkStepperNext {
  255. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperNext, never>;
  256. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepperNext, "button[matStepperNext]", never, { "type": { "alias": "type"; "required": false; }; }, {}, never, never, false, never>;
  257. }
  258. /** Button that moves to the previous step in a stepper workflow. */
  259. export declare class MatStepperPrevious extends CdkStepperPrevious {
  260. static ɵfac: i0.ɵɵFactoryDeclaration<MatStepperPrevious, never>;
  261. static ɵdir: i0.ɵɵDirectiveDeclaration<MatStepperPrevious, "button[matStepperPrevious]", never, { "type": { "alias": "type"; "required": false; }; }, {}, never, never, false, never>;
  262. }
  263. export { StepperOrientation }
  264. export { StepState }
  265. export { }