Updated angular material to 0.9.0-rc1

This commit is contained in:
Matt Traynham
2015-04-15 17:22:54 -04:00
parent 7ca8add069
commit 83e51ec358
2 changed files with 232 additions and 29 deletions
+37 -29
View File
@@ -1,4 +1,4 @@
// Type definitions for Angular Material 0.8.3+ (angular.material module)
// Type definitions for Angular Material 0.9.0-rc1+ (angular.material module)
// Project: https://github.com/angular/material
// Definitions by: Matt Traynham <https://github.com/mtraynham>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -9,13 +9,15 @@ declare module angular.material {
interface MDBottomSheetOptions {
templateUrl?: string;
template?: string;
controller?: any;
scope?: angular.IScope; // default: new child scope
preserveScope?: boolean; // default: false
controller?: string|Function;
locals?: {[index: string]: any};
targetEvent?: any;
targetEvent?: MouseEvent;
resolve?: {[index: string]: angular.IPromise<any>}
controllerAs?: string;
parent?: Element;
disableParentScroll?: boolean;
parent?: string|Element|JQuery; // default: root node
disableParentScroll?: boolean; // default: true
}
interface MDBottomSheetService {
@@ -27,7 +29,7 @@ declare module angular.material {
interface MDPresetDialog<T> {
title(title: string): T;
content(content: string): T;
ok(content: string): T;
ok(ok: string): T;
theme(theme: string): T;
}
@@ -35,28 +37,31 @@ declare module angular.material {
}
interface MDConfirmDialog extends MDPresetDialog<MDConfirmDialog> {
cancel(reason?: string): MDConfirmDialog;
cancel(cancel: string): MDConfirmDialog;
}
interface MDDialogOptions {
templateUrl?: string;
template?: string;
domClickEvent?: any;
disableParentScroll?: boolean;
clickOutsideToClose?: boolean;
hasBackdrop?: boolean;
escapeToClose?: boolean;
controller?: any;
targetEvent?: MouseEvent;
scope?: angular.IScope; // default: new child scope
preserveScope?: boolean; // default: false
disableParentScroll?: boolean; // default: true
hasBackdrop?: boolean // default: true
clickOutsideToClose?: boolean; // default: false
escapeToClose?: boolean; // default: true
focusOnOpen?: boolean; // default: true
controller?: string|Function;
locals?: {[index: string]: any};
bindToController?: boolean;
bindToController?: boolean; // default: false
resolve?: {[index: string]: angular.IPromise<any>}
controllerAs?: string;
parent?: Element;
parent?: string|Element|JQuery; // default: root node
onComplete?: Function;
}
interface MDDialogService {
show(dialog: MDDialogOptions|MDPresetDialog<any>): angular.IPromise<any>;
show(dialog: MDDialogOptions|MDAlertDialog|MDConfirmDialog): angular.IPromise<any>;
confirm(): MDConfirmDialog;
alert(): MDAlertDialog;
hide(response?: any): void;
@@ -64,14 +69,14 @@ declare module angular.material {
}
interface MDIcon {
(path: string): angular.IPromise<Element>;
(id: string): angular.IPromise<Element>; // id is a unique ID or URL
}
interface MDIconProvider {
icon(id: string, url: string, iconSize?: string): MDIconProvider;
iconSet(id: string, url: string, iconSize?: string): MDIconProvider;
defaultIconSet(url: string, iconSize?: string): MDIconProvider;
defaultIconSize(iconSize: string): MDIconProvider;
icon(id: string, url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
iconSet(id: string, url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
defaultIconSet(url: string, iconSize?: string): MDIconProvider; // iconSize default: '24px'
defaultIconSize(iconSize: string): MDIconProvider; // default: '24px'
}
interface MDMedia {
@@ -79,9 +84,9 @@ declare module angular.material {
}
interface MDSidenavObject {
toggle(): void;
open(): void;
close(): void;
toggle(): angular.IPromise<void>;
open(): angular.IPromise<void>;
close(): angular.IPromise<void>;
isOpen(): boolean;
isLockedOpen(): boolean;
}
@@ -105,14 +110,16 @@ declare module angular.material {
interface MDToastOptions {
templateUrl?: string;
template?: string;
hideDelay?: number;
position?: string;
controller?: any;
scope?: angular.IScope; // default: new child scope
preserveScope?: boolean; // default: false
hideDelay?: number; // default (ms): 3000
position?: string; // any combination of 'bottom'/'left'/'top'/'right'/'fit'; default: 'bottom left'
controller?: string|Function;
locals?: {[index: string]: any};
bindToController?: boolean;
bindToController?: boolean; // default: false
resolve?: {[index: string]: angular.IPromise<any>}
controllerAs?: string;
parent?: Element;
parent?: string|Element|JQuery; // default: root node
}
interface MDToastService {
@@ -175,6 +182,7 @@ declare module angular.material {
interface MDTheme {
name: string;
isDark: boolean;
colors: MDThemeColors;
foregroundPalette: MDThemeGrayScalePalette;
foregroundShadow: string;