index.d.ts 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. import * as i0 from '@angular/core';
  2. import { Version, InjectionToken, Provider } from '@angular/core';
  3. export { G as GranularSanityChecks, a as MATERIAL_SANITY_CHECKS, M as MatCommonModule, S as SanityChecks } from '../common-module.d-C8xzHJDr.js';
  4. export { T as ThemePalette } from '../palette.d-BSSFKjO6.js';
  5. import { NgControl, FormGroupDirective, NgForm } from '@angular/forms';
  6. import { Subject } from 'rxjs';
  7. import { E as ErrorStateMatcher$1 } from '../error-options.d-CGdTZUYk.js';
  8. export { S as ShowOnDirtyErrorStateMatcher } from '../error-options.d-CGdTZUYk.js';
  9. export { M as MatLine, a as MatLineModule, s as setLines } from '../line.d-C-QdueRc.js';
  10. export { M as MatOptionModule } from '../index.d-CwEYxGJi.js';
  11. export { M as MatRippleLoader } from '../ripple-loader.d-C3HznB6v.js';
  12. export { M as MatRippleModule } from '../index.d-DG9eDM2-.js';
  13. export { b as MatPseudoCheckbox, M as MatPseudoCheckboxModule, a as MatPseudoCheckboxState } from '../pseudo-checkbox-module.d-DL5oxSJM.js';
  14. import { D as DateAdapter } from '../date-adapter.d-CtKXIxk0.js';
  15. export { M as MAT_DATE_LOCALE, a as MAT_DATE_LOCALE_FACTORY } from '../date-adapter.d-CtKXIxk0.js';
  16. export { d as MAT_OPTGROUP, a as MatOptgroup, M as MatOption, b as MatOptionSelectionChange, _ as _countGroupLabelsBeforeOption, c as _getOptionScrollPosition } from '../option.d-BVGX3edu.js';
  17. export { a as MAT_OPTION_PARENT_COMPONENT, M as MatOptionParentComponent } from '../option-parent.d-CnYuuMkO.js';
  18. export { c as MAT_RIPPLE_GLOBAL_OPTIONS, M as MatRipple, g as RippleAnimationConfig, f as RippleConfig, R as RippleGlobalOptions, h as RippleRef, a as RippleRenderer, e as RippleState, b as RippleTarget, d as defaultRippleAnimationConfig } from '../ripple.d-BxTUZJt7.js';
  19. import '@angular/cdk/bidi';
  20. import '@angular/cdk/a11y';
  21. import '@angular/cdk/platform';
  22. /** Current version of Angular Material. */
  23. declare const VERSION: Version;
  24. /**
  25. * @deprecated No longer used, will be removed.
  26. * @breaking-change 21.0.0
  27. * @docs-private
  28. */
  29. declare class AnimationCurves {
  30. static STANDARD_CURVE: string;
  31. static DECELERATION_CURVE: string;
  32. static ACCELERATION_CURVE: string;
  33. static SHARP_CURVE: string;
  34. }
  35. /**
  36. * @deprecated No longer used, will be removed.
  37. * @breaking-change 21.0.0
  38. * @docs-private
  39. */
  40. declare class AnimationDurations {
  41. static COMPLEX: string;
  42. static ENTERING: string;
  43. static EXITING: string;
  44. }
  45. interface ErrorStateMatcher extends ErrorStateMatcher$1 {
  46. }
  47. /**
  48. * Class that tracks the error state of a component.
  49. * @docs-private
  50. */
  51. declare class _ErrorStateTracker {
  52. private _defaultMatcher;
  53. ngControl: NgControl | null;
  54. private _parentFormGroup;
  55. private _parentForm;
  56. private _stateChanges;
  57. /** Whether the tracker is currently in an error state. */
  58. errorState: boolean;
  59. /** User-defined matcher for the error state. */
  60. matcher: ErrorStateMatcher;
  61. constructor(_defaultMatcher: ErrorStateMatcher | null, ngControl: NgControl | null, _parentFormGroup: FormGroupDirective | null, _parentForm: NgForm | null, _stateChanges: Subject<void>);
  62. /** Updates the error state based on the provided error state matcher. */
  63. updateErrorState(): void;
  64. }
  65. type MatDateFormats = {
  66. parse: {
  67. dateInput: any;
  68. timeInput?: any;
  69. };
  70. display: {
  71. dateInput: any;
  72. monthLabel?: any;
  73. monthYearLabel: any;
  74. dateA11yLabel: any;
  75. monthYearA11yLabel: any;
  76. timeInput?: any;
  77. timeOptionLabel?: any;
  78. };
  79. };
  80. declare const MAT_DATE_FORMATS: InjectionToken<MatDateFormats>;
  81. /** Adapts the native JS Date for use with cdk-based components that work with dates. */
  82. declare class NativeDateAdapter extends DateAdapter<Date> {
  83. /**
  84. * @deprecated No longer being used. To be removed.
  85. * @breaking-change 14.0.0
  86. */
  87. useUtcForDisplay: boolean;
  88. /** The injected locale. */
  89. private readonly _matDateLocale;
  90. constructor(...args: unknown[]);
  91. getYear(date: Date): number;
  92. getMonth(date: Date): number;
  93. getDate(date: Date): number;
  94. getDayOfWeek(date: Date): number;
  95. getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
  96. getDateNames(): string[];
  97. getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
  98. getYearName(date: Date): string;
  99. getFirstDayOfWeek(): number;
  100. getNumDaysInMonth(date: Date): number;
  101. clone(date: Date): Date;
  102. createDate(year: number, month: number, date: number): Date;
  103. today(): Date;
  104. parse(value: any, parseFormat?: any): Date | null;
  105. format(date: Date, displayFormat: Object): string;
  106. addCalendarYears(date: Date, years: number): Date;
  107. addCalendarMonths(date: Date, months: number): Date;
  108. addCalendarDays(date: Date, days: number): Date;
  109. toIso8601(date: Date): string;
  110. /**
  111. * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings
  112. * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an
  113. * invalid date for all other values.
  114. */
  115. deserialize(value: any): Date | null;
  116. isDateInstance(obj: any): obj is Date;
  117. isValid(date: Date): boolean;
  118. invalid(): Date;
  119. setTime(target: Date, hours: number, minutes: number, seconds: number): Date;
  120. getHours(date: Date): number;
  121. getMinutes(date: Date): number;
  122. getSeconds(date: Date): number;
  123. parseTime(userValue: any, parseFormat?: any): Date | null;
  124. addSeconds(date: Date, amount: number): Date;
  125. /** Creates a date but allows the month and date to overflow. */
  126. private _createDateWithOverflow;
  127. /**
  128. * Pads a number to make it two digits.
  129. * @param n The number to pad.
  130. * @returns The padded number.
  131. */
  132. private _2digit;
  133. /**
  134. * When converting Date object to string, javascript built-in functions may return wrong
  135. * results because it applies its internal DST rules. The DST rules around the world change
  136. * very frequently, and the current valid rule is not always valid in previous years though.
  137. * We work around this problem building a new Date object which has its internal UTC
  138. * representation with the local date and time.
  139. * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have
  140. * timeZone set to 'utc' to work fine.
  141. * @param date Date from which we want to get the string representation according to dtf
  142. * @returns A Date object with its UTC representation based on the passed in date info
  143. */
  144. private _format;
  145. /**
  146. * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.
  147. * @param value Time string to parse.
  148. */
  149. private _parseTimeString;
  150. static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateAdapter, never>;
  151. static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateAdapter>;
  152. }
  153. declare const MAT_NATIVE_DATE_FORMATS: MatDateFormats;
  154. declare class NativeDateModule {
  155. static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateModule, never>;
  156. static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateModule, never, never, never>;
  157. static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateModule>;
  158. }
  159. declare class MatNativeDateModule {
  160. static ɵfac: i0.ɵɵFactoryDeclaration<MatNativeDateModule, never>;
  161. static ɵmod: i0.ɵɵNgModuleDeclaration<MatNativeDateModule, never, never, never>;
  162. static ɵinj: i0.ɵɵInjectorDeclaration<MatNativeDateModule>;
  163. }
  164. declare function provideNativeDateAdapter(formats?: MatDateFormats): Provider[];
  165. /**
  166. * Component used to load structural styles for focus indicators.
  167. * @docs-private
  168. */
  169. declare class _StructuralStylesLoader {
  170. static ɵfac: i0.ɵɵFactoryDeclaration<_StructuralStylesLoader, never>;
  171. static ɵcmp: i0.ɵɵComponentDeclaration<_StructuralStylesLoader, "structural-styles", never, {}, {}, never, never, true, never>;
  172. }
  173. /**
  174. * Internal shared component used as a container in form field controls.
  175. * Not to be confused with `mat-form-field` which MDC calls a "text field".
  176. * @docs-private
  177. */
  178. declare class _MatInternalFormField {
  179. /** Position of the label relative to the content. */
  180. labelPosition: 'before' | 'after';
  181. static ɵfac: i0.ɵɵFactoryDeclaration<_MatInternalFormField, never>;
  182. static ɵcmp: i0.ɵɵComponentDeclaration<_MatInternalFormField, "div[mat-internal-form-field]", never, { "labelPosition": { "alias": "labelPosition"; "required": true; }; }, {}, never, ["*"], true, never>;
  183. }
  184. export { AnimationCurves, AnimationDurations, DateAdapter, ErrorStateMatcher$1 as ErrorStateMatcher, MAT_DATE_FORMATS, MAT_NATIVE_DATE_FORMATS, MatNativeDateModule, NativeDateAdapter, NativeDateModule, VERSION, _ErrorStateTracker, _MatInternalFormField, _StructuralStylesLoader, provideNativeDateAdapter };
  185. export type { MatDateFormats };