From 369e74e333eeb4b36e33d8172acc175255416dcc Mon Sep 17 00:00:00 2001 From: Wagner Maciel Date: Fri, 31 Mar 2023 12:52:40 -0400 Subject: [PATCH] fixup! feat(material/button): make button ripples lazy --- tools/public_api_guard/material/button.md | 39 +++++++---------------- tools/public_api_guard/material/core.md | 9 ++---- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/tools/public_api_guard/material/button.md b/tools/public_api_guard/material/button.md index 243cb2fe5936..2e934bb8333b 100644 --- a/tools/public_api_guard/material/button.md +++ b/tools/public_api_guard/material/button.md @@ -21,9 +21,6 @@ import { NgZone } from '@angular/core'; import { OnDestroy } from '@angular/core'; import { OnInit } from '@angular/core'; import { Platform } from '@angular/cdk/platform'; -import { RippleGlobalOptions } from '@angular/material/core'; -import { RippleRenderer } from '@angular/material/core'; -import { RippleTarget } from '@angular/material/core'; import { ThemePalette } from '@angular/material/core'; // @public @@ -36,9 +33,7 @@ export function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions; export class MatAnchor extends MatAnchorBase { constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string); // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -47,9 +42,7 @@ export class MatAnchor extends MatAnchorBase { export class MatButton extends MatButtonBase { constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string); // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -61,7 +54,7 @@ export class MatButtonModule { // (undocumented) static ɵinj: i0.ɵɵInjectorDeclaration; // (undocumented) - static ɵmod: i0.ɵɵNgModuleDeclaration; + static ɵmod: i0.ɵɵNgModuleDeclaration; } // @public @@ -73,9 +66,7 @@ export class MatFabAnchor extends MatAnchor { // (undocumented) _isFab: boolean; // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -89,9 +80,7 @@ export class MatFabButton extends MatButtonBase { // (undocumented) _isFab: boolean; // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -106,9 +95,7 @@ export interface MatFabDefaultOptions { export class MatIconAnchor extends MatAnchorBase { constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string); // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -116,10 +103,10 @@ export class MatIconAnchor extends MatAnchorBase { // @public export class MatIconButton extends MatButtonBase { constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string); + // @deprecated + get ripple(): MatRipple; // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -130,9 +117,7 @@ export class MatMiniFabAnchor extends MatAnchor { // (undocumented) _isFab: boolean; // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } @@ -143,9 +128,7 @@ export class MatMiniFabButton extends MatButtonBase { // (undocumented) _isFab: boolean; // (undocumented) - _ripple: MatButtonRipple; - // (undocumented) - static ɵcmp: i0.ɵɵComponentDeclaration; + static ɵcmp: i0.ɵɵComponentDeclaration; // (undocumented) static ɵfac: i0.ɵɵFactoryDeclaration; } diff --git a/tools/public_api_guard/material/core.md b/tools/public_api_guard/material/core.md index d060c67d9dc1..d65db4fd6a82 100644 --- a/tools/public_api_guard/material/core.md +++ b/tools/public_api_guard/material/core.md @@ -368,17 +368,15 @@ export type MatPseudoCheckboxState = 'unchecked' | 'checked' | 'indeterminate'; // @public (undocumented) export class MatRipple implements OnInit, OnDestroy, RippleTarget { - constructor(_elementRef: ElementRef, ngZone: NgZone, platform: Platform, globalOptions?: RippleGlobalOptions, _animationMode?: string | undefined, _document?: Document | undefined); + constructor(_elementRef: ElementRef, ngZone: NgZone, platform: Platform, globalOptions?: RippleGlobalOptions, _animationMode?: string | undefined); animation: RippleAnimationConfig; centered: boolean; color: string; - protected _createRippleRenderer(target: RippleTarget, ngZone: NgZone, elementRef: ElementRef, platform: Platform): RippleRenderer | undefined; get disabled(): boolean; set disabled(value: boolean); - // (undocumented) - protected _document?: Document | undefined; fadeOutAll(): void; fadeOutAllNonPersistent(): void; + _isInitialized: boolean; launch(config: RippleConfig): RippleRef; launch(x: number, y: number, config?: RippleConfig): RippleRef; // (undocumented) @@ -388,14 +386,13 @@ export class MatRipple implements OnInit, OnDestroy, RippleTarget { radius: number; get rippleConfig(): RippleConfig; get rippleDisabled(): boolean; - protected _rippleRenderer?: RippleRenderer; get trigger(): HTMLElement; set trigger(trigger: HTMLElement); unbounded: boolean; // (undocumented) static ɵdir: i0.ɵɵDirectiveDeclaration; // (undocumented) - static ɵfac: i0.ɵɵFactoryDeclaration; + static ɵfac: i0.ɵɵFactoryDeclaration; } // @public (undocumented)