Skip to content

Commit 9e5fbd8

Browse files
authored
refactor(core): remove deprecated gesture code (#19278)
Removes the unused gesture code that was deprecated a while ago. BREAKING CHANGES: * `MAT_HAMMER_OPTIONS` has been removed. * `GestureConfig` has been removed. * `HammerInput` has been removed. * `HammerStatic` has been removed. * `Recognizer` has been removed. * `RecognizerStatic` has been removed. * `HammerInstance` has been removed. * `HammerManager` has been removed. * `HammerOptions` has been removed.
1 parent 44accd6 commit 9e5fbd8

File tree

4 files changed

+0
-290
lines changed

4 files changed

+0
-290
lines changed

src/material/core/gestures/gesture-annotations.ts

Lines changed: 0 additions & 97 deletions
This file was deleted.

src/material/core/gestures/gesture-config.ts

Lines changed: 0 additions & 129 deletions
This file was deleted.

src/material/core/public-api.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ export * from './animation/animation';
1111
export * from './common-behaviors/index';
1212
export * from './datetime/index';
1313
export * from './error/error-options';
14-
export * from './gestures/gesture-annotations';
15-
export * from './gestures/gesture-config';
1614
export * from './line/line';
1715
export * from './option/index';
1816
export * from './label/label-options';

tools/public_api_guard/material/core.d.ts

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -96,64 +96,13 @@ export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL =
9696

9797
export declare type FloatLabelType = 'always' | 'never' | 'auto';
9898

99-
export declare class GestureConfig extends HammerGestureConfig {
100-
events: string[];
101-
constructor(_hammerOptions?: HammerOptions | undefined, _commonModule?: MatCommonModule);
102-
buildHammer(element: HTMLElement): HammerInstance;
103-
static ɵfac: i0.ɵɵFactoryDef<GestureConfig, [{ optional: true; }, { optional: true; }]>;
104-
static ɵprov: i0.ɵɵInjectableDef<GestureConfig>;
105-
}
106-
10799
export interface GranularSanityChecks {
108100
doctype: boolean;
109101
hammer: boolean;
110102
theme: boolean;
111103
version: boolean;
112104
}
113105

114-
export interface HammerInput {
115-
center: {
116-
x: number;
117-
y: number;
118-
};
119-
deltaX: number;
120-
deltaY: number;
121-
preventDefault: () => {};
122-
}
123-
124-
export interface HammerInstance {
125-
off(eventName: string, callback: Function): void;
126-
on(eventName: string, callback: Function): void;
127-
}
128-
129-
export interface HammerManager {
130-
add(recogniser: Recognizer | Recognizer[]): Recognizer;
131-
emit(event: string, data: any): void;
132-
off(events: string, handler?: Function): void;
133-
on(events: string, handler: Function): void;
134-
set(options: any): HammerManager;
135-
}
136-
137-
export interface HammerOptions {
138-
cssProps?: {
139-
[key: string]: string;
140-
};
141-
domEvents?: boolean;
142-
enable?: boolean | ((manager: HammerManager) => boolean);
143-
inputClass?: HammerInput;
144-
inputTarget?: EventTarget;
145-
preset?: any[];
146-
recognizers?: any[];
147-
touchAction?: string;
148-
}
149-
150-
export interface HammerStatic {
151-
Pan: Recognizer;
152-
Press: Recognizer;
153-
Swipe: Recognizer;
154-
new (element: HTMLElement | SVGElement, options?: any): HammerManager;
155-
}
156-
157106
export interface HasInitialized {
158107
_markInitialized: () => void;
159108
initialized: Observable<void>;
@@ -190,8 +139,6 @@ export declare const MAT_DATE_LOCALE_PROVIDER: {
190139
useExisting: InjectionToken<string>;
191140
};
192141

193-
export declare const MAT_HAMMER_OPTIONS: InjectionToken<HammerOptions>;
194-
195142
export declare const MAT_LABEL_GLOBAL_OPTIONS: InjectionToken<LabelOptions>;
196143

197144
export declare const MAT_NATIVE_DATE_FORMATS: MatDateFormats;
@@ -395,15 +342,6 @@ export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL =
395342

396343
export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL = 6, AUG = 7, SEP = 8, OCT = 9, NOV = 10, DEC = 11;
397344

398-
export interface Recognizer {
399-
new (options?: any): Recognizer;
400-
recognizeWith(otherRecognizer: Recognizer | string): Recognizer;
401-
}
402-
403-
export interface RecognizerStatic {
404-
new (options?: any): Recognizer;
405-
}
406-
407345
export interface RippleAnimationConfig {
408346
enterDuration?: number;
409347
exitDuration?: number;

0 commit comments

Comments
 (0)