Skip to content

refactor(core): remove deprecated gesture code #19278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 0 additions & 97 deletions src/material/core/gestures/gesture-annotations.ts

This file was deleted.

129 changes: 0 additions & 129 deletions src/material/core/gestures/gesture-config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/material/core/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ export * from './animation/animation';
export * from './common-behaviors/index';
export * from './datetime/index';
export * from './error/error-options';
export * from './gestures/gesture-annotations';
export * from './gestures/gesture-config';
export * from './line/line';
export * from './option/index';
export * from './label/label-options';
Expand Down
62 changes: 0 additions & 62 deletions tools/public_api_guard/material/core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,64 +96,13 @@ export declare const JAN = 0, FEB = 1, MAR = 2, APR = 3, MAY = 4, JUN = 5, JUL =

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

export declare class GestureConfig extends HammerGestureConfig {
events: string[];
constructor(_hammerOptions?: HammerOptions | undefined, _commonModule?: MatCommonModule);
buildHammer(element: HTMLElement): HammerInstance;
static ɵfac: i0.ɵɵFactoryDef<GestureConfig, [{ optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDef<GestureConfig>;
}

export interface GranularSanityChecks {
doctype: boolean;
hammer: boolean;
theme: boolean;
version: boolean;
}

export interface HammerInput {
center: {
x: number;
y: number;
};
deltaX: number;
deltaY: number;
preventDefault: () => {};
}

export interface HammerInstance {
off(eventName: string, callback: Function): void;
on(eventName: string, callback: Function): void;
}

export interface HammerManager {
add(recogniser: Recognizer | Recognizer[]): Recognizer;
emit(event: string, data: any): void;
off(events: string, handler?: Function): void;
on(events: string, handler: Function): void;
set(options: any): HammerManager;
}

export interface HammerOptions {
cssProps?: {
[key: string]: string;
};
domEvents?: boolean;
enable?: boolean | ((manager: HammerManager) => boolean);
inputClass?: HammerInput;
inputTarget?: EventTarget;
preset?: any[];
recognizers?: any[];
touchAction?: string;
}

export interface HammerStatic {
Pan: Recognizer;
Press: Recognizer;
Swipe: Recognizer;
new (element: HTMLElement | SVGElement, options?: any): HammerManager;
}

export interface HasInitialized {
_markInitialized: () => void;
initialized: Observable<void>;
Expand Down Expand Up @@ -190,8 +139,6 @@ export declare const MAT_DATE_LOCALE_PROVIDER: {
useExisting: InjectionToken<string>;
};

export declare const MAT_HAMMER_OPTIONS: InjectionToken<HammerOptions>;

export declare const MAT_LABEL_GLOBAL_OPTIONS: InjectionToken<LabelOptions>;

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

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;

export interface Recognizer {
new (options?: any): Recognizer;
recognizeWith(otherRecognizer: Recognizer | string): Recognizer;
}

export interface RecognizerStatic {
new (options?: any): Recognizer;
}

export interface RippleAnimationConfig {
enterDuration?: number;
exitDuration?: number;
Expand Down