index.d.ts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import { ChangeDetectorRef } from '@angular/core';
  2. import { ControlValueAccessor } from '@angular/forms';
  3. import { ElementRef } from '@angular/core';
  4. import { FocusMonitor } from '@angular/cdk/a11y';
  5. import { FocusOrigin } from '@angular/cdk/a11y';
  6. import * as i0 from '@angular/core';
  7. import * as i2 from '@angular/material/slide-toggle';
  8. import * as i3 from '@angular/material/core';
  9. import * as i4 from '@angular/cdk/observers';
  10. import { InjectionToken } from '@angular/core';
  11. import { MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR as MAT_LEGACY_SLIDE_TOGGLE_REQUIRED_VALIDATOR } from '@angular/material/slide-toggle';
  12. import { _MatSlideToggleBase as _MatLegacySlideToggleBase } from '@angular/material/slide-toggle';
  13. import { MatSlideToggleRequiredValidator as MatLegacySlideToggleRequiredValidator } from '@angular/material/slide-toggle';
  14. import { _MatSlideToggleRequiredValidatorModule as _MatLegacySlideToggleRequiredValidatorModule } from '@angular/material/slide-toggle';
  15. import { ThemePalette } from '@angular/material/core';
  16. import { Type } from '@angular/core';
  17. declare namespace i1 {
  18. export {
  19. MAT_LEGACY_SLIDE_TOGGLE_VALUE_ACCESSOR,
  20. MatLegacySlideToggleChange,
  21. MatLegacySlideToggle
  22. }
  23. }
  24. /**
  25. * Injection token to be used to override the default options for `mat-slide-toggle`
  26. * @deprecated Use `MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS` from `@angular/material/slide-toggle` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  27. * @breaking-change 17.0.0
  28. */
  29. export declare const MAT_LEGACY_SLIDE_TOGGLE_DEFAULT_OPTIONS: InjectionToken<MatLegacySlideToggleDefaultOptions>;
  30. export { MAT_LEGACY_SLIDE_TOGGLE_REQUIRED_VALIDATOR }
  31. /**
  32. * @docs-private
  33. * @deprecated Use `MAT_SLIDE_TOGGLE_VALUE_ACCESSOR` from `@angular/material/slide-toggle` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  34. * @breaking-change 17.0.0
  35. */
  36. export declare const MAT_LEGACY_SLIDE_TOGGLE_VALUE_ACCESSOR: {
  37. provide: InjectionToken<readonly ControlValueAccessor[]>;
  38. useExisting: Type<any>;
  39. multi: boolean;
  40. };
  41. /**
  42. * Represents a slidable "switch" toggle that can be moved between on and off.
  43. * @deprecated Use `MatSlideToggle` from `@angular/material/slide-toggle` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  44. * @breaking-change 17.0.0
  45. */
  46. export declare class MatLegacySlideToggle extends _MatLegacySlideToggleBase<MatLegacySlideToggleChange> {
  47. /** Reference to the underlying input element. */
  48. _inputElement: ElementRef<HTMLInputElement>;
  49. constructor(elementRef: ElementRef, focusMonitor: FocusMonitor, changeDetectorRef: ChangeDetectorRef, tabIndex: string, defaults: MatLegacySlideToggleDefaultOptions, animationMode?: string);
  50. protected _createChangeEvent(isChecked: boolean): MatLegacySlideToggleChange;
  51. /** Method being called whenever the underlying input emits a change event. */
  52. _onChangeEvent(event: Event): void;
  53. /** Method being called whenever the slide-toggle has been clicked. */
  54. _onInputClick(event: Event): void;
  55. /** Focuses the slide-toggle. */
  56. focus(options?: FocusOptions, origin?: FocusOrigin): void;
  57. /** Method being called whenever the label text changes. */
  58. _onLabelTextChange(): void;
  59. static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacySlideToggle, [null, null, null, { attribute: "tabindex"; }, null, { optional: true; }]>;
  60. static ɵcmp: i0.ɵɵComponentDeclaration<MatLegacySlideToggle, "mat-slide-toggle", ["matSlideToggle"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, ["*"], false, never>;
  61. }
  62. export { _MatLegacySlideToggleBase }
  63. /**
  64. * Change event object emitted by a slide toggle.
  65. * @deprecated Use `MatSlideToggleChange` from `@angular/material/slide-toggle` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  66. * @breaking-change 17.0.0
  67. */
  68. export declare class MatLegacySlideToggleChange {
  69. /** The source slide toggle of the event. */
  70. source: MatLegacySlideToggle;
  71. /** The new `checked` value of the slide toggle. */
  72. checked: boolean;
  73. constructor(
  74. /** The source slide toggle of the event. */
  75. source: MatLegacySlideToggle,
  76. /** The new `checked` value of the slide toggle. */
  77. checked: boolean);
  78. }
  79. /**
  80. * Default `mat-slide-toggle` options that can be overridden.
  81. * @deprecated Use `MatSlideToggleDefaultOptions` from `@angular/material/slide-toggle` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  82. * @breaking-change 17.0.0
  83. */
  84. export declare interface MatLegacySlideToggleDefaultOptions {
  85. /** Whether toggle action triggers value changes in slide toggle. */
  86. disableToggleValue?: boolean;
  87. /** Default color for slide toggles. */
  88. color?: ThemePalette;
  89. }
  90. /**
  91. * @deprecated Use `MatSlideToggleModule` from `@angular/material/slide-toggle` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
  92. * @breaking-change 17.0.0
  93. */
  94. export declare class MatLegacySlideToggleModule {
  95. static ɵfac: i0.ɵɵFactoryDeclaration<MatLegacySlideToggleModule, never>;
  96. static ɵmod: i0.ɵɵNgModuleDeclaration<MatLegacySlideToggleModule, [typeof i1.MatLegacySlideToggle], [typeof i2._MatSlideToggleRequiredValidatorModule, typeof i3.MatRippleModule, typeof i3.MatCommonModule, typeof i4.ObserversModule], [typeof i2._MatSlideToggleRequiredValidatorModule, typeof i1.MatLegacySlideToggle, typeof i3.MatCommonModule]>;
  97. static ɵinj: i0.ɵɵInjectorDeclaration<MatLegacySlideToggleModule>;
  98. }
  99. export { MatLegacySlideToggleRequiredValidator }
  100. export { _MatLegacySlideToggleRequiredValidatorModule }
  101. export { }