diff --git a/angular-bootstrap-calendar/index.d.ts b/angular-bootstrap-calendar/index.d.ts
index bb529e706b..da0924bb26 100644
--- a/angular-bootstrap-calendar/index.d.ts
+++ b/angular-bootstrap-calendar/index.d.ts
@@ -4,9 +4,10 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import * as moment from '../moment';
+import * as angular from 'angularjs';
-declare global {
- namespace angular.bootstrap.calendar {
+declare module 'angularjs' {
+ export namespace bootstrap.calendar {
interface IEvent {
/**
* The title of the event
diff --git a/angular-fullscreen/index.d.ts b/angular-fullscreen/index.d.ts
index b58830952b..fce309e981 100644
--- a/angular-fullscreen/index.d.ts
+++ b/angular-fullscreen/index.d.ts
@@ -5,30 +5,34 @@
///
-declare namespace angular.fullscreen {
+import * as angular from 'angularjs';
- /**
- * Prefixing interface name with "I" is not recommended: http://www.typescriptlang.org/Handbook#writing-dts-files
- * However, we let it here to keep consistency with all the other Angular-related definitions
- */
- interface IFullscreen {
- // enable document fullscreen
- all(): void;
+declare module 'angularjs' {
+ export namespace fullscreen {
- // enable or disable the document fullscreen
- toggleAll(): void;
+ /**
+ * Prefixing interface name with "I" is not recommended: http://www.typescriptlang.org/Handbook#writing-dts-files
+ * However, we let it here to keep consistency with all the other Angular-related definitions
+ */
+ interface IFullscreen {
+ // enable document fullscreen
+ all(): void;
- // enable fullscreen to a specific element
- enable(element: Element|HTMLElement): void;
+ // enable or disable the document fullscreen
+ toggleAll(): void;
- // disable fullscreen
- cancel(): void;
+ // enable fullscreen to a specific element
+ enable(element: Element|HTMLElement): void;
- // return true if fullscreen is enabled, otherwise false
- isEnabled(): boolean;
+ // disable fullscreen
+ cancel(): void;
- // return true if fullscreen API is supported by your browser
- isSupported(): boolean;
+ // return true if fullscreen is enabled, otherwise false
+ isEnabled(): boolean;
+
+ // return true if fullscreen API is supported by your browser
+ isSupported(): boolean;
+ }
}
}
diff --git a/angular-growl-v2/index.d.ts b/angular-growl-v2/index.d.ts
index 4f1eeb16b8..f2d6cb905d 100644
--- a/angular-growl-v2/index.d.ts
+++ b/angular-growl-v2/index.d.ts
@@ -5,255 +5,259 @@
///
-declare namespace angular.growl {
+import * as angular from 'angularjs';
- /**
- * Global Time-To-Leave configuration.
- */
- interface IGrowlTTLConfig {
- success?: number;
- error?: number;
- warning?: number;
- info?: number;
- }
-
- /**
- * Custom configuration used in single message call.
- */
- interface IGrowlMessageConfig {
- title?: string;
- ttl?: number;
- disableCountDown?: boolean;
- disableIcons?: boolean;
- disableCloseButton?: boolean;
- onclose?: Function;
- onopen?: Function;
- position?: string;
- referenceId?: number;
- translateMessage?: boolean;
- variables?: { [variable: string]: any; };
- }
-
- /**
- * Growl message with configuration.
- */
- interface IGrowlMessage extends IGrowlMessageConfig {
- text: string;
+declare module 'angularjs' {
+ export namespace growl {
/**
- * Destroy the message.
+ * Global Time-To-Leave configuration.
*/
- destroy(): void;
- /**
- * Update the message body.
- * @param newText new message body
- */
- setText(newText: string): void;
- }
-
- /**
- * Growl service provider.
- */
- interface IGrowlProvider extends angular.IServiceProvider {
- /**
- * Pre-defined server error interceptor.
- */
- serverMessagesInterceptor: (string|IHttpInterceptorFactory)[];
+ interface IGrowlTTLConfig {
+ success?: number;
+ error?: number;
+ warning?: number;
+ info?: number;
+ }
/**
- * Set default TTL settings.
- * @param ttl configuration of TTL for different type of message
+ * Custom configuration used in single message call.
*/
- globalTimeToLive(ttl: IGrowlTTLConfig): IGrowlProvider;
- /**
- * Set default TTL settings.
- * @param ttl ttl in milliseconds
- */
- globalTimeToLive(ttl: number): IGrowlProvider;
- /**
- * Set default setting for disabling close button.
- * @param disableCloseButton
- */
- globalDisableCloseButton(disableCloseButton: boolean): IGrowlProvider;
- /**
- * Set default setting for disabling icons.
- * @param disableIcons
- */
- globalDisableIcons(disableIcons: boolean): IGrowlProvider;
- /**
- * Set reversing order of displaying new messages.
- * @param reverseOrder
- */
- globalReversedOrder(reverseOrder: boolean): IGrowlProvider;
- /**
- * Set default setting for displaying message disappear countdown.
- * @param disableCountDown
- */
- globalDisableCountDown(disableCountDown: boolean): IGrowlProvider;
- /**
- * Set default allowance for inline messages.
- * @param inline
- */
- globalInlineMessages(inline: boolean): IGrowlProvider;
- /**
- * Set default message position.
- * @param position
- */
- globalPosition(position: string): IGrowlProvider;
- /**
- * Enable/disable displaying only unique messages.
- * @param onlyUniqueMessages
- */
- onlyUniqueMessages(onlyUniqueMessages: boolean): IGrowlProvider;
+ interface IGrowlMessageConfig {
+ title?: string;
+ ttl?: number;
+ disableCountDown?: boolean;
+ disableIcons?: boolean;
+ disableCloseButton?: boolean;
+ onclose?: Function;
+ onopen?: Function;
+ position?: string;
+ referenceId?: number;
+ translateMessage?: boolean;
+ variables?: { [variable: string]: any; };
+ }
/**
- * Set key where messages are stored (for http interceptor).
- * @param messageVariableKey
+ * Growl message with configuration.
*/
- messagesKey(messageKey: string): IGrowlProvider;
- /**
- * Set key where message text is stored (for http interceptor).
- * @param messageVariableKey
- */
- messageTextKey(messageTextKey: string): IGrowlProvider;
- /**
- * Set key where title of message is stored (for http interceptor).
- * @param messageVariableKey
- */
- messageTitleKey(messageTitleKey: string): IGrowlProvider;
- /**
- * Set key where severity of message is stored (for http interceptor).
- * @param messageVariableKey
- */
- messageSeverityKey(messageSeverityKey: string): IGrowlProvider;
- /**
- * Set key where variables for message are stored (for http interceptor).
- * @param messageVariableKey
- */
- messageVariableKey(messageVariableKey: string): IGrowlProvider;
- }
+ interface IGrowlMessage extends IGrowlMessageConfig {
+ text: string;
- /**
- * Growl service.
- */
- interface IGrowlService {
- /**
- * Show warning message.
- * @param message text to display (or code for angular-translate)
- */
- warning(message: string): IGrowlMessage;
- /**
- * Show warning message.
- * @param message text to display (or code for angular-translate)
- * @param config additional message configuration
- */
- warning(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+ /**
+ * Destroy the message.
+ */
+ destroy(): void;
+ /**
+ * Update the message body.
+ * @param newText new message body
+ */
+ setText(newText: string): void;
+ }
/**
- * Show error message.
- * @param message text to display (or code for angular-translate)
+ * Growl service provider.
*/
- error(message: string): IGrowlMessage;
- /**
- * Show error message.
- * @param message text to display (or code for angular-translate)
- * @param config additional message configuration
- */
- error(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+ interface IGrowlProvider extends angular.IServiceProvider {
+ /**
+ * Pre-defined server error interceptor.
+ */
+ serverMessagesInterceptor: (string | IHttpInterceptorFactory)[];
+
+ /**
+ * Set default TTL settings.
+ * @param ttl configuration of TTL for different type of message
+ */
+ globalTimeToLive(ttl: IGrowlTTLConfig): IGrowlProvider;
+ /**
+ * Set default TTL settings.
+ * @param ttl ttl in milliseconds
+ */
+ globalTimeToLive(ttl: number): IGrowlProvider;
+ /**
+ * Set default setting for disabling close button.
+ * @param disableCloseButton
+ */
+ globalDisableCloseButton(disableCloseButton: boolean): IGrowlProvider;
+ /**
+ * Set default setting for disabling icons.
+ * @param disableIcons
+ */
+ globalDisableIcons(disableIcons: boolean): IGrowlProvider;
+ /**
+ * Set reversing order of displaying new messages.
+ * @param reverseOrder
+ */
+ globalReversedOrder(reverseOrder: boolean): IGrowlProvider;
+ /**
+ * Set default setting for displaying message disappear countdown.
+ * @param disableCountDown
+ */
+ globalDisableCountDown(disableCountDown: boolean): IGrowlProvider;
+ /**
+ * Set default allowance for inline messages.
+ * @param inline
+ */
+ globalInlineMessages(inline: boolean): IGrowlProvider;
+ /**
+ * Set default message position.
+ * @param position
+ */
+ globalPosition(position: string): IGrowlProvider;
+ /**
+ * Enable/disable displaying only unique messages.
+ * @param onlyUniqueMessages
+ */
+ onlyUniqueMessages(onlyUniqueMessages: boolean): IGrowlProvider;
+
+ /**
+ * Set key where messages are stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messagesKey(messageKey: string): IGrowlProvider;
+ /**
+ * Set key where message text is stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageTextKey(messageTextKey: string): IGrowlProvider;
+ /**
+ * Set key where title of message is stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageTitleKey(messageTitleKey: string): IGrowlProvider;
+ /**
+ * Set key where severity of message is stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageSeverityKey(messageSeverityKey: string): IGrowlProvider;
+ /**
+ * Set key where variables for message are stored (for http interceptor).
+ * @param messageVariableKey
+ */
+ messageVariableKey(messageVariableKey: string): IGrowlProvider;
+ }
/**
- * Show information message.
- * @param message text to display (or code for angular-translate)
+ * Growl service.
*/
- info(message: string): IGrowlMessage;
- /**
- * Show information message.
- * @param message text to display (or code for angular-translate)
- * @param config additional message configuration
- */
- info(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+ interface IGrowlService {
+ /**
+ * Show warning message.
+ * @param message text to display (or code for angular-translate)
+ */
+ warning(message: string): IGrowlMessage;
+ /**
+ * Show warning message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ warning(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show error message.
+ * @param message text to display (or code for angular-translate)
+ */
+ error(message: string): IGrowlMessage;
+ /**
+ * Show error message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ error(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show information message.
+ * @param message text to display (or code for angular-translate)
+ */
+ info(message: string): IGrowlMessage;
+ /**
+ * Show information message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ info(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show success message.
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ success(message: string): IGrowlMessage;
+ /**
+ * Show success message.
+ * @param message text to display (or code for angular-translate)
+ */
+ success(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+
+ /**
+ * Show message (generic).
+ * @param message text to display (or code for angular-translate)
+ */
+ general(message: string): IGrowlMessage;
+ /**
+ * Show message (generic).
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ */
+ general(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+ /**
+ * Show message (generic).
+ * @param message text to display (or code for angular-translate)
+ * @param config additional message configuration
+ * @param severity message severity (error, warning, success, info).
+ */
+ general(message: string, config: IGrowlMessageConfig, severity: string): IGrowlMessage;
+
+ /**
+ * Get current setting for displaying only unique messages.
+ */
+ onlyUnique(): boolean;
+ /**
+ * Get current setting for reversing messages order.
+ */
+ reverseOrder(): boolean;
+ /**
+ * Get current allowance for inline messages.
+ */
+ inlineMessages(): boolean;
+ /**
+ * Get current messages position.
+ */
+ position(): string;
+ }
/**
- * Show success message.
- * @param message text to display (or code for angular-translate)
- * @param config additional message configuration
+ * GrowlMessages service.
*/
- success(message: string): IGrowlMessage;
- /**
- * Show success message.
- * @param message text to display (or code for angular-translate)
- */
- success(message: string, config: IGrowlMessageConfig): IGrowlMessage;
+ interface IGrowlMessagesService {
+ /**
+ * Initialize a directive
+ * We look at the preloaded directive and use this else we
+ * create a new blank object
+ * @param referenceId
+ * @param limitMessages
+ */
+ initDirective(referenceId: number, limitMessages: number): angular.IDirective;
- /**
- * Show message (generic).
- * @param message text to display (or code for angular-translate)
- */
- general(message: string): IGrowlMessage;
- /**
- * Show message (generic).
- * @param message text to display (or code for angular-translate)
- * @param config additional message configuration
- */
- general(message: string, config: IGrowlMessageConfig): IGrowlMessage;
- /**
- * Show message (generic).
- * @param message text to display (or code for angular-translate)
- * @param config additional message configuration
- * @param severity message severity (error, warning, success, info).
- */
- general(message: string, config: IGrowlMessageConfig, severity: string): IGrowlMessage;
+ /**
+ * Get current messages
+ */
+ getAllMessages(referenceId?: number): IGrowlMessage[];
- /**
- * Get current setting for displaying only unique messages.
- */
- onlyUnique(): boolean;
- /**
- * Get current setting for reversing messages order.
- */
- reverseOrder(): boolean;
- /**
- * Get current allowance for inline messages.
- */
- inlineMessages(): boolean;
- /**
- * Get current messages position.
- */
- position(): string;
- }
+ /**
+ * Destroy all messages
+ */
+ destroyAllMessages(referenceId?: number): void;
- /**
- * GrowlMessages service.
- */
- interface IGrowlMessagesService {
- /**
- * Initialize a directive
- * We look at the preloaded directive and use this else we
- * create a new blank object
- * @param referenceId
- * @param limitMessages
- */
- initDirective(referenceId: number, limitMessages: number): angular.IDirective;
+ /**
+ * Add a message
+ */
+ addMessage(message: IGrowlMessage): IGrowlMessage;
- /**
- * Get current messages
- */
- getAllMessages(referenceId?: number): IGrowlMessage[];
-
- /**
- * Destroy all messages
- */
- destroyAllMessages(referenceId?: number): void;
-
- /**
- * Add a message
- */
- addMessage(message: IGrowlMessage): IGrowlMessage;
-
- /**
- * Delete a message
- */
- deleteMessage(message: IGrowlMessage): void;
+ /**
+ * Delete a message
+ */
+ deleteMessage(message: IGrowlMessage): void;
+ }
}
}
diff --git a/angular-hotkeys/index.d.ts b/angular-hotkeys/index.d.ts
index 81bb773925..ff4067945a 100644
--- a/angular-hotkeys/index.d.ts
+++ b/angular-hotkeys/index.d.ts
@@ -5,46 +5,50 @@
///
-declare namespace angular.hotkeys {
+import * as angular from 'angularjs';
- interface HotkeysProvider {
- template: string;
- templateTitle:string;
- includeCheatSheet: boolean;
- cheatSheetHotkey: string;
- cheatSheetDescription: string;
+declare module 'angularjs' {
+ export namespace hotkeys {
- add(combo: string|string[], callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array, persistent?: boolean): ng.hotkeys.Hotkey;
+ interface HotkeysProvider {
+ template: string;
+ templateTitle: string;
+ includeCheatSheet: boolean;
+ cheatSheetHotkey: string;
+ cheatSheetDescription: string;
- add(combo: string|string[], description: string, callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array, persistent?: boolean): ng.hotkeys.Hotkey;
+ add(combo: string | string[], callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array, persistent?: boolean): ng.hotkeys.Hotkey;
- add(hotkeyObj: ng.hotkeys.Hotkey): ng.hotkeys.Hotkey;
+ add(combo: string | string[], description: string, callback: (event: Event, hotkey?: Hotkey) => void, action?: string, allowIn?: Array, persistent?: boolean): ng.hotkeys.Hotkey;
- bindTo(scope : ng.IScope): ng.hotkeys.HotkeysProviderChained;
+ add(hotkeyObj: ng.hotkeys.Hotkey): ng.hotkeys.Hotkey;
- del(combo: string|string[]): void;
+ bindTo(scope: ng.IScope): ng.hotkeys.HotkeysProviderChained;
- del(hotkeyObj: ng.hotkeys.Hotkey): void;
+ del(combo: string | string[]): void;
- get(combo: string|string[]): ng.hotkeys.Hotkey;
+ del(hotkeyObj: ng.hotkeys.Hotkey): void;
- toggleCheatSheet(): void;
+ get(combo: string | string[]): ng.hotkeys.Hotkey;
- purgeHotkeys(): void;
- }
+ toggleCheatSheet(): void;
- interface HotkeysProviderChained {
- add(combo: string|string[], description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained;
+ purgeHotkeys(): void;
+ }
- add(hotkeyObj: ng.hotkeys.Hotkey): HotkeysProviderChained;
- }
+ interface HotkeysProviderChained {
+ add(combo: string | string[], description: string, callback: (event: Event, hotkeys: ng.hotkeys.Hotkey) => void): HotkeysProviderChained;
- interface Hotkey {
- combo: string|string[];
- description?: string;
- callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void;
- action?: string;
- allowIn?: Array;
- persistent?: boolean;
+ add(hotkeyObj: ng.hotkeys.Hotkey): HotkeysProviderChained;
+ }
+
+ interface Hotkey {
+ combo: string | string[];
+ description?: string;
+ callback: (event: Event, hotkey: ng.hotkeys.Hotkey) => void;
+ action?: string;
+ allowIn?: Array;
+ persistent?: boolean;
+ }
}
}
diff --git a/angular-http-auth/index.d.ts b/angular-http-auth/index.d.ts
index 4918c5f4df..4b2a859c8b 100644
--- a/angular-http-auth/index.d.ts
+++ b/angular-http-auth/index.d.ts
@@ -5,15 +5,19 @@
///
-declare namespace angular.httpAuth {
- interface IAuthService {
- loginConfirmed(data?:any, configUpdater?:Function):void;
- loginCancelled(data?:any, reason?:any):void;
- }
+import * as angular from 'angularjs';
- interface IHttpBuffer {
- append(config:ng.IRequestConfig, deferred:{resolve(data:any):void; reject(data:any):void;}):void;
- rejectAll(reason?:any):void;
- retryAll(updater?:Function):void;
- }
+declare module 'angularjs' {
+ export namespace httpAuth {
+ interface IAuthService {
+ loginConfirmed(data?: any, configUpdater?: Function): void;
+ loginCancelled(data?: any, reason?: any): void;
+ }
+
+ interface IHttpBuffer {
+ append(config: ng.IRequestConfig, deferred: { resolve(data: any): void; reject(data: any): void; }): void;
+ rejectAll(reason?: any): void;
+ retryAll(updater?: Function): void;
+ }
+ }
}
diff --git a/angular-idle/index.d.ts b/angular-idle/index.d.ts
index 2e1d132708..84e96396f8 100644
--- a/angular-idle/index.d.ts
+++ b/angular-idle/index.d.ts
@@ -5,259 +5,263 @@
///
-declare namespace angular.idle {
+import * as angular from 'angularjs';
- /**
- * Used to configure the Title service.
- */
- interface ITitleProvider extends IServiceProvider {
+declare module 'angularjs' {
+ export namespace idle {
/**
- * Enables or disables the Title functionality.
- *
- * @param enabled Boolean, default is true.
+ * Used to configure the Title service.
*/
- enabled(enabled: boolean): void;
- }
+ interface ITitleProvider extends IServiceProvider {
- interface ITitleService {
+ /**
+ * Enables or disables the Title functionality.
+ *
+ * @param enabled Boolean, default is true.
+ */
+ enabled(enabled: boolean): void;
+ }
+
+ interface ITitleService {
+
+ /**
+ * Allows the title functionality to be enabled or disabled on the fly.
+ */
+ setEnabled(enabled: boolean): void;
+
+ /**
+ * Returns whether or not the title functionality has been enabled.
+ */
+ isEnabled(): boolean;
+
+ /**
+ * Will store val as the "original" title of the document.
+ *
+ * Tracking the original title is important when restoring the title after displaying, for example, the idle warning message.
+ */
+ original(val: string): void;
+
+ /**
+ * Returns the "original" title value that has been previously set.
+ *
+ * Tracking the original title is important when restoring the title after displaying, for example, the idle warning message.
+ */
+ original(): string;
+
+ /**
+ * Changes the actual title of the document.
+ */
+ value(val: string): void;
+
+ /**
+ * Returns the current document title.
+ */
+ value(): string;
+
+ /**
+ * If overwrite is false or unspecified, updates the "original" title with the current document title
+ * if it has not already been stored. If overwrite is true, the current document title is stored regardless.
+ */
+ store(overwrite?: boolean): void;
+
+ /**
+ * Sets the title to the original value (if it was stored or set previously).
+ */
+ restore(): void;
+
+ /**
+ * Sets the text to use as the message displayed when the user is idle.
+ */
+ idleMessage(val: string): void;
+
+ /**
+ * Gets the text to use as the message displayed when the user is idle.
+ */
+ idleMessage(): string;
+
+ /**
+ * Sets the text to use as the message displayed when the user is timed out.
+ */
+ timedOutMessage(val: string): void;
+
+ /**
+ * Gets the text to use as the message displayed when the user is timed out.
+ */
+ timedOutMessage(): string;
+
+ /**
+ * Stores the original title if it hasn't been already, determines the number minutes, seconds,
+ * and total seconds from countdown, and displays the idleMessage with the aforementioned values interpolated.
+ */
+ setAsIdle(countdown: number): void;
+
+ /**
+ * Stores the original title if it hasn't been already, and displays the timedOutMessage.
+ */
+ setAsTimedOut(): void;
+ }
/**
- * Allows the title functionality to be enabled or disabled on the fly.
+ * Used to configure the Keepalive service.
*/
- setEnabled(enabled: boolean): void;
+ interface IKeepAliveProvider extends IServiceProvider {
+
+ /**
+ * If configured, options will be used to issue a request using $http.
+ * If the value is null, no HTTP request will be issued.
+ * You can specify a string, which it will assume to be a URL to a simple GET request.
+ * Otherwise, you can use the same options $http takes. However, cache will always be false.
+ *
+ * @param value May be string or IRequestConfig, default is null.
+ */
+ http(value: string | IRequestConfig): void;
+
+ /**
+ * This specifies how often the keepalive event is triggered and the
+ * HTTP request is issued.
+ *
+ * @param seconds Integer, default is 10 minutes. Must be greater than 0.
+ */
+ interval(seconds: number): void;
+ }
/**
- * Returns whether or not the title functionality has been enabled.
+ * Keepalive will use a timeout to periodically wake, broadcast a Keepalive event on the root scope,
+ * and optionally make an $http request. By default, the Idle service will stop and start Keepalive
+ * when a user becomes idle or returns from idle, respectively. It is also started automatically when
+ * Idle.watch() is called. This can be disabled by configuring the IdleProvider.
*/
- isEnabled(): boolean;
+ interface IKeepAliveService {
+
+ /**
+ * Starts pinging periodically until stop() is called.
+ */
+ start(): void;
+
+ /**
+ * Stops pinging.
+ */
+ stop(): void;
+
+ /**
+ * Performs one ping only.
+ */
+ ping(): void;
+
+ /**
+ * Changes the interval value at runtime.
+ * You will need to restart the pinging process by calling start() manually for the changes to be reflected.
+ */
+ setInterval(seconds: number): void;
+ }
/**
- * Will store val as the "original" title of the document.
- *
- * Tracking the original title is important when restoring the title after displaying, for example, the idle warning message.
+ * Used to configure the Idle service.
*/
- original(val: string): void;
+ interface IIdleProvider extends IServiceProvider {
+ /**
+ * Specifies the DOM events the service will watch to reset the idle timeout.
+ * Multiple events should be separated by a space.
+ *
+ * @param events string, default 'mousemove keydown DOMMouseScroll mousewheel mousedown'
+ */
+ interrupt(events: string): void;
+
+ /**
+ * The idle timeout duration in seconds. After this amount of time passes without the user
+ * performing an action that triggers one of the watched DOM events, the user is considered
+ * idle.
+ *
+ * @param seconds integer, default is 20min
+ */
+ idle(seconds: number): void;
+
+ /**
+ * The amount of time the user has to respond (in seconds) before they have been considered
+ * timed out.
+ *
+ * @param seconds integer, default is 30s
+ */
+ timeout(seconds: number): void;
+
+ /**
+ * When true or idle, user activity will automatically interrupt the warning countdown
+ * and reset the idle state. If false or off, you will need to manually call watch()
+ * when you want to start watching for idleness again. If notIdle, user activity will
+ * only automatically interrupt if the user is not yet idle.
+ *
+ * @param enabled boolean or string, possible values: off/false, idle/true, or notIdle
+ */
+ autoResume(enabled: boolean | string): void;
+
+ /**
+ * When true, the Keepalive service is automatically stopped and started as needed.
+ *
+ * @param enabled boolean, default is true
+ */
+ keepalive(enabled: boolean): void;
+ }
/**
- * Returns the "original" title value that has been previously set.
- *
- * Tracking the original title is important when restoring the title after displaying, for example, the idle warning message.
+ * Idle, once watch() is called, will start a timeout which if expires, will enter a warning state
+ * countdown. Once the countdown reaches zero, idle will broadcast a timeout event indicating the
+ * user has timed out (where your app should log them out or whatever you like). If the user performs
+ * an action that triggers a watched DOM event that bubbles up to document.body, this will reset the
+ * idle/warning state and start the process over again.
*/
- original(): string;
+ interface IIdleService {
+ /**
+ * Gets the current idle value
+ */
+ getIdle(): number;
- /**
- * Changes the actual title of the document.
- */
- value(val: string): void;
+ /**
+ * Gets the current timeout value
+ */
+ getTimeout(): number;
- /**
- * Returns the current document title.
- */
- value(): string;
+ /**
+ * Updates the idle value (see IdleProvider.idle()) and
+ * restarts the watch if its running.
+ */
+ setIdle(idle: number): void;
- /**
- * If overwrite is false or unspecified, updates the "original" title with the current document title
- * if it has not already been stored. If overwrite is true, the current document title is stored regardless.
- */
- store(overwrite?: boolean): void;
+ /**
+ * Updates the timeout value (see IdleProvider.timeout()) and
+ * restarts the watch if its running.
+ */
+ setTimeout(timeout: number): void;
- /**
- * Sets the title to the original value (if it was stored or set previously).
- */
- restore(): void;
+ /**
+ * Whether user has timed out (meaning idleDuration + timeout has passed without any activity)
+ */
+ isExpired(): boolean;
- /**
- * Sets the text to use as the message displayed when the user is idle.
- */
- idleMessage(val: string): void;
+ /**
+ * Whether or not the watch() has been called and it is watching for idleness.
+ */
+ running(): boolean;
- /**
- * Gets the text to use as the message displayed when the user is idle.
- */
- idleMessage(): string;
+ /**
+ * Whether or not the user appears to be idle.
+ */
+ idling(): boolean;
- /**
- * Sets the text to use as the message displayed when the user is timed out.
- */
- timedOutMessage(val: string): void;
+ /**
+ * Starts watching for idleness, or resets the idle/warning state and continues watching.
+ */
+ watch(): void;
- /**
- * Gets the text to use as the message displayed when the user is timed out.
- */
- timedOutMessage(): string;
+ /**
+ * Stops watching for idleness, and resets the idle/warning state.
+ */
+ unwatch(): void;
- /**
- * Stores the original title if it hasn't been already, determines the number minutes, seconds,
- * and total seconds from countdown, and displays the idleMessage with the aforementioned values interpolated.
- */
- setAsIdle(countdown: number): void;
-
- /**
- * Stores the original title if it hasn't been already, and displays the timedOutMessage.
- */
- setAsTimedOut(): void;
- }
-
- /**
- * Used to configure the Keepalive service.
- */
- interface IKeepAliveProvider extends IServiceProvider {
-
- /**
- * If configured, options will be used to issue a request using $http.
- * If the value is null, no HTTP request will be issued.
- * You can specify a string, which it will assume to be a URL to a simple GET request.
- * Otherwise, you can use the same options $http takes. However, cache will always be false.
- *
- * @param value May be string or IRequestConfig, default is null.
- */
- http(value: string | IRequestConfig): void;
-
- /**
- * This specifies how often the keepalive event is triggered and the
- * HTTP request is issued.
- *
- * @param seconds Integer, default is 10 minutes. Must be greater than 0.
- */
- interval(seconds: number): void;
- }
-
- /**
- * Keepalive will use a timeout to periodically wake, broadcast a Keepalive event on the root scope,
- * and optionally make an $http request. By default, the Idle service will stop and start Keepalive
- * when a user becomes idle or returns from idle, respectively. It is also started automatically when
- * Idle.watch() is called. This can be disabled by configuring the IdleProvider.
- */
- interface IKeepAliveService {
-
- /**
- * Starts pinging periodically until stop() is called.
- */
- start(): void;
-
- /**
- * Stops pinging.
- */
- stop(): void;
-
- /**
- * Performs one ping only.
- */
- ping(): void;
-
- /**
- * Changes the interval value at runtime.
- * You will need to restart the pinging process by calling start() manually for the changes to be reflected.
- */
- setInterval(seconds: number): void;
- }
-
- /**
- * Used to configure the Idle service.
- */
- interface IIdleProvider extends IServiceProvider {
- /**
- * Specifies the DOM events the service will watch to reset the idle timeout.
- * Multiple events should be separated by a space.
- *
- * @param events string, default 'mousemove keydown DOMMouseScroll mousewheel mousedown'
- */
- interrupt(events: string): void;
-
- /**
- * The idle timeout duration in seconds. After this amount of time passes without the user
- * performing an action that triggers one of the watched DOM events, the user is considered
- * idle.
- *
- * @param seconds integer, default is 20min
- */
- idle(seconds: number): void;
-
- /**
- * The amount of time the user has to respond (in seconds) before they have been considered
- * timed out.
- *
- * @param seconds integer, default is 30s
- */
- timeout(seconds: number): void;
-
- /**
- * When true or idle, user activity will automatically interrupt the warning countdown
- * and reset the idle state. If false or off, you will need to manually call watch()
- * when you want to start watching for idleness again. If notIdle, user activity will
- * only automatically interrupt if the user is not yet idle.
- *
- * @param enabled boolean or string, possible values: off/false, idle/true, or notIdle
- */
- autoResume(enabled: boolean | string): void;
-
- /**
- * When true, the Keepalive service is automatically stopped and started as needed.
- *
- * @param enabled boolean, default is true
- */
- keepalive(enabled: boolean): void;
- }
-
- /**
- * Idle, once watch() is called, will start a timeout which if expires, will enter a warning state
- * countdown. Once the countdown reaches zero, idle will broadcast a timeout event indicating the
- * user has timed out (where your app should log them out or whatever you like). If the user performs
- * an action that triggers a watched DOM event that bubbles up to document.body, this will reset the
- * idle/warning state and start the process over again.
- */
- interface IIdleService {
- /**
- * Gets the current idle value
- */
- getIdle(): number;
-
- /**
- * Gets the current timeout value
- */
- getTimeout(): number;
-
- /**
- * Updates the idle value (see IdleProvider.idle()) and
- * restarts the watch if its running.
- */
- setIdle(idle: number): void;
-
- /**
- * Updates the timeout value (see IdleProvider.timeout()) and
- * restarts the watch if its running.
- */
- setTimeout(timeout: number): void;
-
- /**
- * Whether user has timed out (meaning idleDuration + timeout has passed without any activity)
- */
- isExpired(): boolean;
-
- /**
- * Whether or not the watch() has been called and it is watching for idleness.
- */
- running(): boolean;
-
- /**
- * Whether or not the user appears to be idle.
- */
- idling(): boolean;
-
- /**
- * Starts watching for idleness, or resets the idle/warning state and continues watching.
- */
- watch(): void;
-
- /**
- * Stops watching for idleness, and resets the idle/warning state.
- */
- unwatch(): void;
-
- /**
- * Manually trigger the idle interrupt that normally occurs during user activity.
- */
- interrupt(): any;
+ /**
+ * Manually trigger the idle interrupt that normally occurs during user activity.
+ */
+ interrupt(): any;
+ }
}
}
diff --git a/angular-jwt/index.d.ts b/angular-jwt/index.d.ts
index 49247b2490..1cb0b48d5e 100644
--- a/angular-jwt/index.d.ts
+++ b/angular-jwt/index.d.ts
@@ -5,26 +5,30 @@
///
-declare namespace angular.jwt {
+import * as angular from 'angularjs';
- interface JwtToken {
- iss?: string;
- sub?: string;
- aud?: string;
- exp?: number;
- nbf?: number;
- iat?: number;
- jti?: string;
- unique_name?: string;
- }
+declare module 'angularjs' {
+ export namespace jwt {
- interface IJwtHelper {
- decodeToken(token: string): JwtToken;
- getTokenExpirationDate(token: any): Date;
- isTokenExpired(token: any, offsetSeconds?: number): boolean;
- }
+ interface JwtToken {
+ iss?: string;
+ sub?: string;
+ aud?: string;
+ exp?: number;
+ nbf?: number;
+ iat?: number;
+ jti?: string;
+ unique_name?: string;
+ }
- interface IJwtInterceptor {
- tokenGetter(...params : any[]): string;
+ interface IJwtHelper {
+ decodeToken(token: string): JwtToken;
+ getTokenExpirationDate(token: any): Date;
+ isTokenExpired(token: any, offsetSeconds?: number): boolean;
+ }
+
+ interface IJwtInterceptor {
+ tokenGetter(...params: any[]): string;
+ }
}
}
diff --git a/angular-loading-bar/index.d.ts b/angular-loading-bar/index.d.ts
index 3adca41eba..fa962d6be7 100644
--- a/angular-loading-bar/index.d.ts
+++ b/angular-loading-bar/index.d.ts
@@ -5,8 +5,33 @@
///
+import * as angular from 'angularjs';
-declare namespace angular {
+declare module 'angularjs' {
+ export namespace loadingBar {
+
+ interface ILoadingBarProvider {
+ /**
+ * Turn the spinner on or off
+ */
+ includeSpinner?: boolean;
+
+ /**
+ * Turn the loading bar on or off
+ */
+ includeBar?: boolean;
+
+ /**
+ * HTML template
+ */
+ spinnerTemplate?: string;
+
+ /**
+ * Latency Threshold
+ */
+ latencyThreshold?: number;
+ }
+ }
interface IRequestShortcutConfig {
/**
@@ -14,30 +39,5 @@ declare namespace angular {
*/
ignoreLoadingBar?: boolean;
}
-}
-
-declare namespace angular.loadingBar {
-
- interface ILoadingBarProvider{
- /**
- * Turn the spinner on or off
- */
- includeSpinner?: boolean;
-
- /**
- * Turn the loading bar on or off
- */
- includeBar?: boolean;
-
- /**
- * HTML template
- */
- spinnerTemplate?: string;
-
- /**
- * Latency Threshold
- */
- latencyThreshold?: number;
- }
}
diff --git a/angular-local-storage/index.d.ts b/angular-local-storage/index.d.ts
index beb4208901..bb62ed55e8 100644
--- a/angular-local-storage/index.d.ts
+++ b/angular-local-storage/index.d.ts
@@ -5,145 +5,149 @@
///
-declare namespace angular.local.storage {
- interface ILocalStorageServiceProvider extends angular.IServiceProvider {
- /**
- * Setter for the prefix
- * You should set a prefix to avoid overwriting any local storage variables from the rest of your app
- * e.g. localStorageServiceProvider.setPrefix('youAppName');
- * With provider you can use config as this:
- * myApp.config(function (localStorageServiceProvider) {
- * localStorageServiceProvider.prefix = 'yourAppName';
- * });
- * @param prefix default: ls.
- */
- setPrefix(prefix: string):ILocalStorageServiceProvider;
- /**
- * Setter for the storageType
- * @param storageType localstorage or sessionStorage. default: localStorage
- */
- setStorageType(storageType: string):ILocalStorageServiceProvider;
- /**
- * Setter for cookie config
- * @param exp number of days before cookies expire (0 = does not expire). default: 30
- * @param path the web path the cookie represents. default: '/'
- */
- setStorageCookie(exp: number, path: string):ILocalStorageServiceProvider;
- /**
- * Set the cookie domain, since this runs inside a the config() block, only providers and constants can be injected. As a result, $location service can't be used here, use a hardcoded string or window.location.
- * No default value
- */
- setStorageCookieDomain(domain: string):ILocalStorageServiceProvider;
- /**
- * Send signals for each of the following actions:
- * @param setItem default: true
- * @param removeItem default: false
- */
- setNotify(setItem: boolean, removeItem: boolean):ILocalStorageServiceProvider;
- }
+import * as angular from 'angularjs';
- interface ICookie {
- /**
- * Checks if cookies are enabled in the browser.
- * Returns: Boolean
- */
- isSupported:boolean;
- /**
- * Directly adds a value to cookies.
- * Note: Typically used as a fallback if local storage is not supported.
- * Returns: Boolean
- * @param key
- * @param val
- */
- set(key:string, val:string):boolean;
- /**
- * Directly get a value from a cookie.
- * Returns: value from local storage
- * @param key
- */
- get(key:string):string;
- /**
- * Remove directly value from a cookie.
- * Returns: Boolean
- * @param key
- */
- remove(key:string):boolean;
- /**
- * Remove all data for this app from cookie.
- */
- clearAll():any;
+declare module 'angularjs' {
+ export namespace local.storage {
+ interface ILocalStorageServiceProvider extends angular.IServiceProvider {
+ /**
+ * Setter for the prefix
+ * You should set a prefix to avoid overwriting any local storage variables from the rest of your app
+ * e.g. localStorageServiceProvider.setPrefix('youAppName');
+ * With provider you can use config as this:
+ * myApp.config(function (localStorageServiceProvider) {
+ * localStorageServiceProvider.prefix = 'yourAppName';
+ * });
+ * @param prefix default: ls.
+ */
+ setPrefix(prefix: string): ILocalStorageServiceProvider;
+ /**
+ * Setter for the storageType
+ * @param storageType localstorage or sessionStorage. default: localStorage
+ */
+ setStorageType(storageType: string): ILocalStorageServiceProvider;
+ /**
+ * Setter for cookie config
+ * @param exp number of days before cookies expire (0 = does not expire). default: 30
+ * @param path the web path the cookie represents. default: '/'
+ */
+ setStorageCookie(exp: number, path: string): ILocalStorageServiceProvider;
+ /**
+ * Set the cookie domain, since this runs inside a the config() block, only providers and constants can be injected. As a result, $location service can't be used here, use a hardcoded string or window.location.
+ * No default value
+ */
+ setStorageCookieDomain(domain: string): ILocalStorageServiceProvider;
+ /**
+ * Send signals for each of the following actions:
+ * @param setItem default: true
+ * @param removeItem default: false
+ */
+ setNotify(setItem: boolean, removeItem: boolean): ILocalStorageServiceProvider;
+ }
- }
+ interface ICookie {
+ /**
+ * Checks if cookies are enabled in the browser.
+ * Returns: Boolean
+ */
+ isSupported: boolean;
+ /**
+ * Directly adds a value to cookies.
+ * Note: Typically used as a fallback if local storage is not supported.
+ * Returns: Boolean
+ * @param key
+ * @param val
+ */
+ set(key: string, val: string): boolean;
+ /**
+ * Directly get a value from a cookie.
+ * Returns: value from local storage
+ * @param key
+ */
+ get(key: string): string;
+ /**
+ * Remove directly value from a cookie.
+ * Returns: Boolean
+ * @param key
+ */
+ remove(key: string): boolean;
+ /**
+ * Remove all data for this app from cookie.
+ */
+ clearAll(): any;
- interface ILocalStorageService {
- /**
- * Checks if the browser support the current storage type(e.g: localStorage, sessionStorage).
- * Returns: Boolean
- */
- isSupported:boolean;
- /**
- * Returns: String
- */
- getStorageType():string;
- /**
- * Directly adds a value to local storage.
- * If local storage is not supported, use cookies instead.
- * Returns: Boolean
- * @param key
- * @param value
- */
- set(key: string, value: T): boolean;
- /**
- * Directly get a value from local storage.
- * If local storage is not supported, use cookies instead.
- * Returns: value from local storage
- * @param key
- */
- get(key: string): T;
- /**
- * Return array of keys for local storage, ignore keys that not owned.
- * Returns: value from local storage
- */
- keys(): string[];
- /**
- * Remove an item from local storage by key.
- * If local storage is not supported, use cookies instead.
- * Returns: Boolean
- * @param key
- */
- remove(key: string): boolean;
- /**
- * Remove all data for this app from local storage.
- * If local storage is not supported, use cookies instead.
- * Note: Optionally takes a regular expression string and removes matching.
- * Returns: Boolean
- * @param regularExpression
- */
- clearAll(regularExpression?:RegExp):boolean;
- /**
- * Bind $scope key to localStorageService.
- * Usage: localStorageService.bind(scope, property, value[optional], key[optional])
- * Returns: deregistration function for this listener.
- * @param scope
- * @param property
- * @param value optional
- * @param key The corresponding key used in local storage
- */
- bind(scope: angular.IScope, property: string, value?: any, key?: string): Function;
- /**
- * Return the derive key
- * Returns String
- * @param key
- */
- deriveKey(key:string):string;
- /**
- * Return localStorageService.length, ignore keys that not owned.
- * Returns Number
- */
- length():number;
- /**
- * Deal with browser's cookies directly.
- */
- cookie:ICookie;
- }
+ }
+
+ interface ILocalStorageService {
+ /**
+ * Checks if the browser support the current storage type(e.g: localStorage, sessionStorage).
+ * Returns: Boolean
+ */
+ isSupported: boolean;
+ /**
+ * Returns: String
+ */
+ getStorageType(): string;
+ /**
+ * Directly adds a value to local storage.
+ * If local storage is not supported, use cookies instead.
+ * Returns: Boolean
+ * @param key
+ * @param value
+ */
+ set(key: string, value: T): boolean;
+ /**
+ * Directly get a value from local storage.
+ * If local storage is not supported, use cookies instead.
+ * Returns: value from local storage
+ * @param key
+ */
+ get(key: string): T;
+ /**
+ * Return array of keys for local storage, ignore keys that not owned.
+ * Returns: value from local storage
+ */
+ keys(): string[];
+ /**
+ * Remove an item from local storage by key.
+ * If local storage is not supported, use cookies instead.
+ * Returns: Boolean
+ * @param key
+ */
+ remove(key: string): boolean;
+ /**
+ * Remove all data for this app from local storage.
+ * If local storage is not supported, use cookies instead.
+ * Note: Optionally takes a regular expression string and removes matching.
+ * Returns: Boolean
+ * @param regularExpression
+ */
+ clearAll(regularExpression?: RegExp): boolean;
+ /**
+ * Bind $scope key to localStorageService.
+ * Usage: localStorageService.bind(scope, property, value[optional], key[optional])
+ * Returns: deregistration function for this listener.
+ * @param scope
+ * @param property
+ * @param value optional
+ * @param key The corresponding key used in local storage
+ */
+ bind(scope: angular.IScope, property: string, value?: any, key?: string): Function;
+ /**
+ * Return the derive key
+ * Returns String
+ * @param key
+ */
+ deriveKey(key: string): string;
+ /**
+ * Return localStorageService.length, ignore keys that not owned.
+ * Returns Number
+ */
+ length(): number;
+ /**
+ * Deal with browser's cookies directly.
+ */
+ cookie: ICookie;
+ }
+ }
}
diff --git a/angular-localForage/index.d.ts b/angular-localForage/index.d.ts
index 87d16c96f4..4a11f93b57 100644
--- a/angular-localForage/index.d.ts
+++ b/angular-localForage/index.d.ts
@@ -6,58 +6,62 @@
///
///
-declare namespace angular.localForage {
+import * as angular from 'angularjs';
- interface LocalForageConfig {
- driver?:string;
- name?:string | number;
- version?:number;
- storeName?:string;
- description?:string;
- }
+declare module 'angularjs' {
+ export namespace localForage {
- interface ILocalForageProvider {
- config(config:LocalForageConfig):void;
- setNotify(onItemSet:boolean, onItemRemove:boolean):void;
- }
+ interface LocalForageConfig {
+ driver?: string;
+ name?: string | number;
+ version?: number;
+ storeName?: string;
+ description?: string;
+ }
- interface ILocalForageService {
- driver(): LocalForageDriver;
- setDriver(name: string | string[]): angular.IPromise;
+ interface ILocalForageProvider {
+ config(config: LocalForageConfig): void;
+ setNotify(onItemSet: boolean, onItemRemove: boolean): void;
+ }
- setItem(key:string, value:any):angular.IPromise;
- setItem(keys:Array, values:Array):angular.IPromise;
+ interface ILocalForageService {
+ driver(): LocalForageDriver;
+ setDriver(name: string | string[]): angular.IPromise;
- getItem(key:string):angular.IPromise;
- getItem(keys:Array):angular.IPromise>;
+ setItem(key: string, value: any): angular.IPromise;
+ setItem(keys: Array, values: Array): angular.IPromise;
- removeItem(key:string | Array):angular.IPromise;
+ getItem(key: string): angular.IPromise;
+ getItem(keys: Array): angular.IPromise>;
- pull(key:string):angular.IPromise;
- pull(keys:Array):angular.IPromise>;
+ removeItem(key: string | Array): angular.IPromise;
- clear():angular.IPromise;
+ pull(key: string): angular.IPromise;
+ pull(keys: Array): angular.IPromise>;
- key(n:number):angular.IPromise;
+ clear(): angular.IPromise;
- keys():angular.IPromise;
+ key(n: number): angular.IPromise;
- length():angular.IPromise;
+ keys(): angular.IPromise;
- iterate(iteratorCallback:(value:string | number, key:string)=>T):angular.IPromise;
+ length(): angular.IPromise;
- bind($scope:ng.IScope, key:string):angular.IPromise;
+ iterate(iteratorCallback: (value: string | number, key: string) => T): angular.IPromise;
- bind($scope:ng.IScope, config:{
- key:string;
- defaultValue?:any;
- scopeKey?:string;
- name?:string;
- }):angular.IPromise;
+ bind($scope: ng.IScope, key: string): angular.IPromise;
- unbind($scope:ng.IScope, key:string, scopeKey?:string):void;
+ bind($scope: ng.IScope, config: {
+ key: string;
+ defaultValue?: any;
+ scopeKey?: string;
+ name?: string;
+ }): angular.IPromise;
- createInstance(config:LocalForageConfig):ILocalForageService;
- instance(name:string):ILocalForageService;
+ unbind($scope: ng.IScope, key: string, scopeKey?: string): void;
+
+ createInstance(config: LocalForageConfig): ILocalForageService;
+ instance(name: string): ILocalForageService;
+ }
}
}
diff --git a/angular-material/index.d.ts b/angular-material/index.d.ts
index dd4e7c1233..189eecc983 100644
--- a/angular-material/index.d.ts
+++ b/angular-material/index.d.ts
@@ -4,271 +4,276 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///
-declare namespace angular.material {
- interface IBottomSheetOptions {
- templateUrl?: string;
- template?: string;
- scope?: angular.IScope; // default: new child scope
- preserveScope?: boolean; // default: false
- controller?: string|Function;
- locals?: {[index: string]: any};
- targetEvent?: MouseEvent;
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- bindToController?: boolean;
- parent?: string|Element|JQuery; // default: root node
- disableParentScroll?: boolean; // default: true
- }
+import * as angular from 'angularjs';
- interface IBottomSheetService {
- show(options: IBottomSheetOptions): angular.IPromise;
- hide(response?: any): void;
- cancel(response?: any): void;
- }
+declare module 'angularjs' {
+ export namespace material {
- interface IPresetDialog {
- title(title: string): T;
- textContent(textContent: string): T;
- htmlContent(htmlContent: string): T;
- ok(ok: string): T;
- theme(theme: string): T;
- templateUrl(templateUrl?: string): T;
- template(template?: string): T;
- targetEvent(targetEvent?: MouseEvent): T;
- scope(scope?: angular.IScope): T; // default: new child scope
- preserveScope(preserveScope?: boolean): T; // default: false
- disableParentScroll(disableParentScroll?: boolean): T; // default: true
- hasBackdrop(hasBackdrop?: boolean): T; // default: true
- clickOutsideToClose(clickOutsideToClose?: boolean): T; // default: false
- escapeToClose(escapeToClose?: boolean): T; // default: true
- focusOnOpen(focusOnOpen?: boolean): T; // default: true
- controller(controller?: string|Function): T;
- locals(locals?: {[index: string]: any}): T;
- bindToController(bindToController?: boolean): T; // default: false
- resolve(resolve?: {[index: string]: angular.IPromise}): T;
- controllerAs(controllerAs?: string): T;
- parent(parent?: string|Element|JQuery): T; // default: root node
- onComplete(onComplete?: Function): T;
- ariaLabel(ariaLabel: string): T;
- }
+ interface IBottomSheetOptions {
+ templateUrl?: string;
+ template?: string;
+ scope?: angular.IScope; // default: new child scope
+ preserveScope?: boolean; // default: false
+ controller?: string | Function;
+ locals?: { [index: string]: any };
+ targetEvent?: MouseEvent;
+ resolve?: { [index: string]: angular.IPromise }
+ controllerAs?: string;
+ bindToController?: boolean;
+ parent?: string | Element | JQuery; // default: root node
+ disableParentScroll?: boolean; // default: true
+ }
- interface IAlertDialog extends IPresetDialog {
- }
+ interface IBottomSheetService {
+ show(options: IBottomSheetOptions): angular.IPromise;
+ hide(response?: any): void;
+ cancel(response?: any): void;
+ }
- interface IConfirmDialog extends IPresetDialog {
- cancel(cancel: string): IConfirmDialog;
- }
+ interface IPresetDialog {
+ title(title: string): T;
+ textContent(textContent: string): T;
+ htmlContent(htmlContent: string): T;
+ ok(ok: string): T;
+ theme(theme: string): T;
+ templateUrl(templateUrl?: string): T;
+ template(template?: string): T;
+ targetEvent(targetEvent?: MouseEvent): T;
+ scope(scope?: angular.IScope): T; // default: new child scope
+ preserveScope(preserveScope?: boolean): T; // default: false
+ disableParentScroll(disableParentScroll?: boolean): T; // default: true
+ hasBackdrop(hasBackdrop?: boolean): T; // default: true
+ clickOutsideToClose(clickOutsideToClose?: boolean): T; // default: false
+ escapeToClose(escapeToClose?: boolean): T; // default: true
+ focusOnOpen(focusOnOpen?: boolean): T; // default: true
+ controller(controller?: string | Function): T;
+ locals(locals?: { [index: string]: any }): T;
+ bindToController(bindToController?: boolean): T; // default: false
+ resolve(resolve?: { [index: string]: angular.IPromise }): T;
+ controllerAs(controllerAs?: string): T;
+ parent(parent?: string | Element | JQuery): T; // default: root node
+ onComplete(onComplete?: Function): T;
+ ariaLabel(ariaLabel: string): T;
+ }
- interface IDialogOptions {
- templateUrl?: string;
- template?: string;
- autoWrap?: boolean; // default: true
- targetEvent?: MouseEvent;
- openFrom?: any;
- closeTo?: any;
- 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; // default: false
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: string|Element|JQuery; // default: root node
- onShowing?: Function;
- onComplete?: Function;
- onRemoving?: Function;
- fullscreen?: boolean;
- }
+ interface IAlertDialog extends IPresetDialog {
+ }
- interface IDialogService {
- show(dialog: IDialogOptions|IAlertDialog|IConfirmDialog): angular.IPromise;
- confirm(): IConfirmDialog;
- alert(): IAlertDialog;
- hide(response?: any): angular.IPromise;
- cancel(response?: any): void;
- }
+ interface IConfirmDialog extends IPresetDialog {
+ cancel(cancel: string): IConfirmDialog;
+ }
- interface IIcon {
- (id: string): angular.IPromise; // id is a unique ID or URL
- }
+ interface IDialogOptions {
+ templateUrl?: string;
+ template?: string;
+ autoWrap?: boolean; // default: true
+ targetEvent?: MouseEvent;
+ openFrom?: any;
+ closeTo?: any;
+ 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; // default: false
+ resolve?: { [index: string]: angular.IPromise }
+ controllerAs?: string;
+ parent?: string | Element | JQuery; // default: root node
+ onShowing?: Function;
+ onComplete?: Function;
+ onRemoving?: Function;
+ fullscreen?: boolean;
+ }
- interface IIconProvider {
- icon(id: string, url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
- iconSet(id: string, url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
- defaultIconSet(url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
- defaultViewBoxSize(viewBoxSize: number): IIconProvider; // default: 24
- defaultFontSet(name: string): IIconProvider;
- }
+ interface IDialogService {
+ show(dialog: IDialogOptions | IAlertDialog | IConfirmDialog): angular.IPromise;
+ confirm(): IConfirmDialog;
+ alert(): IAlertDialog;
+ hide(response?: any): angular.IPromise;
+ cancel(response?: any): void;
+ }
- interface IMedia {
- (media: string): boolean;
- }
+ interface IIcon {
+ (id: string): angular.IPromise; // id is a unique ID or URL
+ }
- interface ISidenavObject {
- toggle(): angular.IPromise;
- open(): angular.IPromise;
- close(): angular.IPromise;
- isOpen(): boolean;
- isLockedOpen(): boolean;
- }
+ interface IIconProvider {
+ icon(id: string, url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
+ iconSet(id: string, url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
+ defaultIconSet(url: string, viewBoxSize?: number): IIconProvider; // viewBoxSize default: 24
+ defaultViewBoxSize(viewBoxSize: number): IIconProvider; // default: 24
+ defaultFontSet(name: string): IIconProvider;
+ }
- interface ISidenavService {
- (component: string): ISidenavObject;
- }
+ interface IMedia {
+ (media: string): boolean;
+ }
- interface IToastPreset {
- textContent(content: string): T;
- action(action: string): T;
- highlightAction(highlightAction: boolean): T;
- highlightClass(highlightClass: string): T;
- capsule(capsule: boolean): T;
- theme(theme: string): T;
- hideDelay(delay: number): T;
- position(position: string): T;
- parent(parent?: string|Element|JQuery): T; // default: root node
- }
+ interface ISidenavObject {
+ toggle(): angular.IPromise;
+ open(): angular.IPromise;
+ close(): angular.IPromise;
+ isOpen(): boolean;
+ isLockedOpen(): boolean;
+ }
- interface ISimpleToastPreset extends IToastPreset {
- }
+ interface ISidenavService {
+ (component: string): ISidenavObject;
+ }
- interface IToastOptions {
- templateUrl?: string;
- template?: string;
- autoWrap?:boolean;
- 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; // default: false
- resolve?: {[index: string]: angular.IPromise}
- controllerAs?: string;
- parent?: string|Element|JQuery; // default: root node
- }
+ interface IToastPreset {
+ textContent(content: string): T;
+ action(action: string): T;
+ highlightAction(highlightAction: boolean): T;
+ highlightClass(highlightClass: string): T;
+ capsule(capsule: boolean): T;
+ theme(theme: string): T;
+ hideDelay(delay: number): T;
+ position(position: string): T;
+ parent(parent?: string | Element | JQuery): T; // default: root node
+ }
- interface IToastService {
- show(optionsOrPreset: IToastOptions|IToastPreset): angular.IPromise;
- showSimple(content: string): angular.IPromise;
- simple(): ISimpleToastPreset;
- build(): IToastPreset;
- updateContent(): void;
- hide(response?: any): void;
- cancel(response?: any): void;
- }
+ interface ISimpleToastPreset extends IToastPreset {
+ }
- interface IPalette {
- 0?: string;
- 50?: string;
- 100?: string;
- 200?: string;
- 300?: string;
- 400?: string;
- 500?: string;
- 600?: string;
- 700?: string;
- 800?: string;
- 900?: string;
- A100?: string;
- A200?: string;
- A400?: string;
- A700?: string;
- contrastDefaultColor?: string;
- contrastDarkColors?: string|string[];
- contrastLightColors?: string|string[];
- }
+ interface IToastOptions {
+ templateUrl?: string;
+ template?: string;
+ autoWrap?: boolean;
+ 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; // default: false
+ resolve?: { [index: string]: angular.IPromise }
+ controllerAs?: string;
+ parent?: string | Element | JQuery; // default: root node
+ }
- interface IThemeHues {
- default?: string;
- 'hue-1'?: string;
- 'hue-2'?: string;
- 'hue-3'?: string;
- }
+ interface IToastService {
+ show(optionsOrPreset: IToastOptions | IToastPreset): angular.IPromise;
+ showSimple(content: string): angular.IPromise;
+ simple(): ISimpleToastPreset;
+ build(): IToastPreset;
+ updateContent(): void;
+ hide(response?: any): void;
+ cancel(response?: any): void;
+ }
- interface IThemePalette {
- name: string;
- hues: IThemeHues;
- }
+ interface IPalette {
+ 0?: string;
+ 50?: string;
+ 100?: string;
+ 200?: string;
+ 300?: string;
+ 400?: string;
+ 500?: string;
+ 600?: string;
+ 700?: string;
+ 800?: string;
+ 900?: string;
+ A100?: string;
+ A200?: string;
+ A400?: string;
+ A700?: string;
+ contrastDefaultColor?: string;
+ contrastDarkColors?: string | string[];
+ contrastLightColors?: string | string[];
+ }
- interface IThemeColors {
- accent: IThemePalette;
- background: IThemePalette;
- primary: IThemePalette;
- warn: IThemePalette;
- }
+ interface IThemeHues {
+ default?: string;
+ 'hue-1'?: string;
+ 'hue-2'?: string;
+ 'hue-3'?: string;
+ }
- interface IThemeGrayScalePalette {
- 1: string;
- 2: string;
- 3: string;
- 4: string;
- name: string;
- }
+ interface IThemePalette {
+ name: string;
+ hues: IThemeHues;
+ }
- interface ITheme {
- name: string;
- isDark: boolean;
- colors: IThemeColors;
- foregroundPalette: IThemeGrayScalePalette;
- foregroundShadow: string;
- accentPalette(name: string, hues?: IThemeHues): ITheme;
- primaryPalette(name: string, hues?: IThemeHues): ITheme;
- warnPalette(name: string, hues?: IThemeHues): ITheme;
- backgroundPalette(name: string, hues?: IThemeHues): ITheme;
- dark(isDark?: boolean): ITheme;
- }
+ interface IThemeColors {
+ accent: IThemePalette;
+ background: IThemePalette;
+ primary: IThemePalette;
+ warn: IThemePalette;
+ }
- interface IThemingProvider {
- theme(name: string, inheritFrom?: string): ITheme;
- definePalette(name: string, palette: IPalette): IThemingProvider;
- extendPalette(name: string, palette: IPalette): IPalette;
- setDefaultTheme(theme: string): void;
- alwaysWatchTheme(alwaysWatch: boolean): void;
- }
+ interface IThemeGrayScalePalette {
+ 1: string;
+ 2: string;
+ 3: string;
+ 4: string;
+ name: string;
+ }
- interface IDateLocaleProvider {
- months: string[];
- shortMonths: string[];
- days: string[];
- shortDays: string[];
- dates: string[];
- firstDayOfWeek: number;
- parseDate(dateString: string): Date;
- formatDate(date: Date): string;
- monthHeaderFormatter(date: Date): string;
- weekNumberFormatter(weekNumber: number): string;
- msgCalendar: string;
- msgOpenCalendar: string;
- }
+ interface ITheme {
+ name: string;
+ isDark: boolean;
+ colors: IThemeColors;
+ foregroundPalette: IThemeGrayScalePalette;
+ foregroundShadow: string;
+ accentPalette(name: string, hues?: IThemeHues): ITheme;
+ primaryPalette(name: string, hues?: IThemeHues): ITheme;
+ warnPalette(name: string, hues?: IThemeHues): ITheme;
+ backgroundPalette(name: string, hues?: IThemeHues): ITheme;
+ dark(isDark?: boolean): ITheme;
+ }
- interface IMenuService {
- hide(response?: any, options?: any): angular.IPromise;
- }
+ interface IThemingProvider {
+ theme(name: string, inheritFrom?: string): ITheme;
+ definePalette(name: string, palette: IPalette): IThemingProvider;
+ extendPalette(name: string, palette: IPalette): IPalette;
+ setDefaultTheme(theme: string): void;
+ alwaysWatchTheme(alwaysWatch: boolean): void;
+ }
- interface IColorPalette {
- red: IPalette;
- pink: IPalette;
- 'deep-purple': IPalette;
- indigo: IPalette;
- blue: IPalette;
- 'light-blue': IPalette;
- cyan: IPalette;
- teal: IPalette;
- green: IPalette;
- 'light-green': IPalette;
- lime: IPalette;
- yellow: IPalette;
- amber: IPalette;
- orange: IPalette;
- 'deep-orange': IPalette;
- brown: IPalette;
- grey: IPalette;
- 'blue-grey': IPalette;
+ interface IDateLocaleProvider {
+ months: string[];
+ shortMonths: string[];
+ days: string[];
+ shortDays: string[];
+ dates: string[];
+ firstDayOfWeek: number;
+ parseDate(dateString: string): Date;
+ formatDate(date: Date): string;
+ monthHeaderFormatter(date: Date): string;
+ weekNumberFormatter(weekNumber: number): string;
+ msgCalendar: string;
+ msgOpenCalendar: string;
+ }
+
+ interface IMenuService {
+ hide(response?: any, options?: any): angular.IPromise;
+ }
+
+ interface IColorPalette {
+ red: IPalette;
+ pink: IPalette;
+ 'deep-purple': IPalette;
+ indigo: IPalette;
+ blue: IPalette;
+ 'light-blue': IPalette;
+ cyan: IPalette;
+ teal: IPalette;
+ green: IPalette;
+ 'light-green': IPalette;
+ lime: IPalette;
+ yellow: IPalette;
+ amber: IPalette;
+ orange: IPalette;
+ 'deep-orange': IPalette;
+ brown: IPalette;
+ grey: IPalette;
+ 'blue-grey': IPalette;
+ }
}
}
diff --git a/angular-media-queries/index.d.ts b/angular-media-queries/index.d.ts
index e1eb8dffc3..fee67c8de2 100644
--- a/angular-media-queries/index.d.ts
+++ b/angular-media-queries/index.d.ts
@@ -4,27 +4,32 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///
-declare namespace angular.matchmedia {
- interface IScreenSize {
+import * as angular from 'angularjs';
- // Returns a value indicating if the current device has a retina screen
- isRetina: boolean;
-
- is(list: Array | string): boolean;
+declare module 'angularjs' {
+ export namespace matchmedia {
- // Executes the callback function on window resize with the match truthiness as the first argument.
- // Returns the current match truthiness.
- // The 'scope' parameter is optional. If it's not passed in, '$rootScope' is used.
- on(list: Array | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean;
+ interface IScreenSize {
- // Executes the callback function ONLY when the match differs from previous match.
- // Returns the current match truthiness.
- // The 'scope' parameter is required for cleanup reasons (destroy event).
- onChange(scope: angular.IScope, list: Array | string, callback: (result: boolean) => void): boolean;
+ // Returns a value indicating if the current device has a retina screen
+ isRetina: boolean;
+
+ is(list: Array | string): boolean;
- // Executes the callback only when inside of the particular screensize.
- // The 'scope' parameter is optional. If it's not passed in, '$rootScope' is used.
- when(list: Array | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean;
+ // Executes the callback function on window resize with the match truthiness as the first argument.
+ // Returns the current match truthiness.
+ // The 'scope' parameter is optional. If it's not passed in, '$rootScope' is used.
+ on(list: Array | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean;
+
+ // Executes the callback function ONLY when the match differs from previous match.
+ // Returns the current match truthiness.
+ // The 'scope' parameter is required for cleanup reasons (destroy event).
+ onChange(scope: angular.IScope, list: Array | string, callback: (result: boolean) => void): boolean;
+
+ // Executes the callback only when inside of the particular screensize.
+ // The 'scope' parameter is optional. If it's not passed in, '$rootScope' is used.
+ when(list: Array | string, callback: (result: boolean) => void, scope?: angular.IScope): boolean;
+ }
}
}
\ No newline at end of file
diff --git a/angular-meteor/angular-meteor-tests.ts b/angular-meteor/angular-meteor-tests.ts
index 8500a431e8..9317676eed 100644
--- a/angular-meteor/angular-meteor-tests.ts
+++ b/angular-meteor/angular-meteor-tests.ts
@@ -1,4 +1,4 @@
-
+import * as angular from 'angularjs';
interface ITodo {
_id?: string;
diff --git a/angular-meteor/index.d.ts b/angular-meteor/index.d.ts
index 347936e7a6..1602ad3fa7 100644
--- a/angular-meteor/index.d.ts
+++ b/angular-meteor/index.d.ts
@@ -4,349 +4,351 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///
-///
-declare namespace angular.meteor {
- interface IRootScopeService extends angular.IRootScopeService {
- /**
- * The current logged in user and it's data. it is null if the user is not logged in. A reactive data source.
- */
- currentUser: Meteor.User;
+import * as angular from 'angularjs';
- /**
- * True if a login method (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser) is currently in progress.
- * A reactive data source. Can be use to display animation while user is logging in.
- */
- loggingIn: boolean;
- }
-
- interface IScope extends angular.IScope, IRootScopeService {
- /**
- * A method to get a $scope variable and watch it reactivly
- *
- * @param scopeVariableName - The name of the scope's variable to bind to
- * @param [objectEquality=false] - Watch the object equality using angular.equals instead of comparing for reference equality, deeper watch but also slower
- */
- getReactively(scopeVariableName: string, objectEquality?: boolean): ReactiveResult;
-
- /**
- * A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready.
- * Calling $scope.subscribe will automatically stop the subscription when the scope is destroyed.
- *
- * @param name - Name of the subscription. Matches the name of the server's publish() call.
- * @param publisherArguments - Optional arguments passed to publisher function on server.
- *
- * @return The promise solved successfully when subscription is ready. The success promise holds the subscription handle.
- */
- subscribe(name: string, ...publisherArguments: any[]): angular.IPromise;
-
- /**
- * The helpers method is part of the ReactiveContext, and available on every context and $scope.
- * These method are defined as Object, where each key is the name of the variable that will be available on the context we run, and each value is a function with a return value.
- * Under the hood, each helper starts a new Tracker.autorun. When its reactive dependencies change, the helper is rerun.
- * To trigger a rerun every time an specific Angular variable change, use getReactively](/api/1.3.1/get-reactively) to make your Angular variable reactive inside the helper its used in.
- * Each helper function should return a MongoDB Cursor and the helpers will expose it as a normal array to the context.
- *
- * @param definitions - Object containing `name` => `function` definition, where each name is a string and each function is the helper function. Should return a [MongoDB Cursor](http://docs.meteor.com/#/full/mongo_cursor)
- * @return This method returns this, which the the reactive context, in order to provide the ability to chain the logic.
- */
- helpers(definitions : { [helperName : string] : () => Mongo.Cursor }): IScope;
-
- /**
- * This method is a wrapper of Tracker.autorun and shares exactly the same API.
- * The autorun method is part of the ReactiveContext, and available on every context and $scope.
- * The argument of this method is a callback, which will be called each time Autorun will be used.
- * The Autorun will stop automatically when when it's context ($scope) is destroyed.
- *
- * @param runFunc - The function to run. It receives one argument: the Computation object that will be returned.
- */
- autorun(runFunc : () => void) : Tracker.Computation;
- }
-
- /**
- * $meteor in angularjs
- */
- interface IMeteorService {
- /**
- * A service that wraps the Meteor collections to enable reactivity within AngularJS.
- *
- * @param collection - A Meteor Collection or a reactive function to bind to.
- * - Reactive function can be used with $scope.getReactively to add $scope variable as reactive variable to the cursor.
- * @param [autoClientSave=true] - By default, changes in the Angular collection will automatically update the Meteor collection.
- * - However if set to false, changes in the client won't be automatically propagated back to the Meteor collection.
- */
- collection(collection: Mongo.Collection|ReactiveResult|Function|(()=>T), autoClientSave?: boolean): AngularMeteorCollection;
-
- /**
- * A service that wraps the Meteor collections to enable reactivity within AngularJS.
- *
- * @param collection - A Meteor Collection or a reactive function to bind to.
- * - Reactive function can be used with $scope.getReactively to add $scope variable as reactive variable to the cursor.
- * @param [autoClientSave=true] - By default, changes in the Angular collection will automatically update the Meteor collection.
- * - However if set to false, changes in the client won't be automatically propagated back to the Meteor collection.
- * @param [updateCollection] - A collection object which will be used for updates (insert, update, delete).
- */
- collection(collection: Mongo.Collection|ReactiveResult|Function|(()=>T), autoClientSave: boolean, updateCollection: Mongo.Collection): AngularMeteorCollection2;
-
- /**
- * A service that wraps a Meteor object to enable reactivity within AngularJS.
- * Finds the first document that matches the selector, as ordered by sort and skip options. Wraps collection.findOne
- *
- * @param collection - A Meteor Collection to bind to.
- * @param selector - A query describing the documents to find or just the ID of the document.
- * - $meteor.object will find the first document that matches the selector,
- * - as ordered by sort and skip options, exactly like Meteor's collection.findOne
- * @param [autoClientSave=true] - By default, changes in the Angular object will automatically update the Meteor object.
- * - However if set to false, changes in the client won't be automatically propagated back to the Meteor object.
- */
- object(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject;
-
- /**
- * A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready.
- *
- * @param name - Name of the subscription. Matches the name of the server's publish() call.
- * @param publisherArguments - Optional arguments passed to publisher function on server.
- *
- * @return The promise solved successfully when subscription is ready. The success promise holds the subscription handle.
- */
- subscribe(name: string, ...publisherArguments: any[]): angular.IPromise;
-
- /**
- * A service service which wraps up Meteor.methods with AngularJS promises.
- *
- * @param name - Name of method to invoke
- * @param methodArguments - Optional method arguments
- *
- * @return The promise solves successfully with the return value of the method or return reject with the error from the method.
- */
- call(name: string, ...methodArguments: any[]): angular.IPromise;
-
- // User Authentication BEGIN ->
-
- /**
- * Returns a promise fulfilled with the currentUser when the user subscription is ready.
- * This is useful when you want to grab the current user before the route is rendered.
- * If there is no logged in user, it will return null.
- * See the “Authentication with Routers” section of our tutorial for more information and a full example.
- */
- waitForUser(): angular.IPromise;
-
- /**
- * Resolves the promise successfully if a user is authenticated and rejects otherwise.
- * This is useful in cases where you want to require a route to have an authenticated user.
- * You can catch the rejected promise and redirect the unauthenticated user to a different page, such as the login page.
- * See the “Authentication with Routers” section of our tutorial for more information and a full example.
- */
- requireUser(): angular.IPromise;
-
- /**
- * Resolves the promise successfully if a user is authenticated and the validatorFn returns true; rejects otherwise.
- * This is useful in cases where you want to require a route to have an authenticated user and do extra validation like the user's role or group.
- * You can catch the rejected promise and redirect the unauthenticated user to a different page, such as the login page.
- * See the “Authentication with Routers” section of our tutorial for more information and a full example.
- *
- * The mandatory validator function will be called with the authenticated user as the single param and it's expected to return true in order to resolve.
- * If it returns a string, the promise will be rejected using said string as the reason.
- * Any other return (false, null, undefined) will be rejected with the default "FORBIDDEN" reason.
- */
- requireValidUser(validatorFn: (user: Meteor.User) => boolean|string): angular.IPromise;
-
- /**
- * Log the user in with a password.
- *
- * @param user - Either a string interpreted as a username or an email; or an object with a single key: email, username or id.
- * @param password - The user's password.
- */
- loginWithPassword(user: string|{email: string}|{username: string}|{id: string}, password: string): angular.IPromise;
-
- /**
- * Create a new user. More information: http://docs.meteor.com/#/full/accounts_createuser
- *
- * @param options.username - A unique name for this user. Either this, or email is required.
- * @param options.email - The user's email address. Either this, or username is required.
- * @param options.password - The user's password. This is not sent in plain text over the wire.
- * @param options.profile - The user's profile, typically including the name field.
- */
- createUser(options: {username?: string; email?: string; password: string; profile?: Object}): angular.IPromise;
-
- /**
- * Change the current user's password. Must be logged in.
- *
- * @param oldPassword - The user's current password. This is not sent in plain text over the wire.
- * @param newPassword - A new password for the user. This is not sent in plain text over the wire.
- */
- changePassword(oldPassword: string, newPassword: string): angular.IPromise;
-
- /**
- * Request a forgot password email.
- *
- * @param options.email - The email address to send a password reset link.
- */
- forgotPassword(options: {email: string}): angular.IPromise;
-
- /**
- * Reset the password for a user using a token received in email. Logs the user in afterwards.
- *
- * @param token - The token retrieved from the reset password URL.
- * @param newPassword - A new password for the user. This is not sent in plain text over the wire.
- */
- resetPassword(token: string, newPassword: string): angular.IPromise;
-
- /**
- * Marks the user's email address as verified. Logs the user in afterwards.
- *
- * @param token - The token retrieved from the reset password URL.
- */
- verifyEmail(token: string): angular.IPromise;
-
- loginWithFacebook: ILoginWithExternalService;
- loginWithTwitter: ILoginWithExternalService;
- loginWithGoogle: ILoginWithExternalService;
- loginWithGithub: ILoginWithExternalService;
- loginWithMeetup: ILoginWithExternalService;
- loginWithWeibo: ILoginWithExternalService;
-
- /**
- * Log the user out.
- *
- * @return Resolves with no arguments on success, or reject with a Error argument on failure.
- */
- logout(): angular.IPromise;
-
- /**
- * Log out other clients logged in as the current user, but does not log out the client that calls this function.
- * For example, when called in a user's browser, connections in that browser remain logged in,
- * but any other browsers or DDP clients logged in as that user will be logged out.
- *
- * @return Resolves with no arguments on success, or reject with a Error argument on failure.
- */
- logoutOtherClients(): angular.IPromise;
-
- // <- User Authentication END
- // $meteorUtils BEGIN ->
-
- /**
- * @param scope - The AngularJS scope you use the autorun on.
- * @param fn - The function that will re-run every time a reactive variable changes inside it.
- */
- autorun(scope: angular.IScope, fn: Function): void;
-
- /**
- * @param collectionName - The name of the collection you want to get back
- */
- getCollectionByName(collectionName: string): Mongo.Collection;
-
- // <- $meteorUtils END
- // $meteorCamera BEGIN ->
-
- /**
- * A helper service for taking pictures across platforms.
- * Must add mdg:camera package to use! (meteor add mdg:camera)
- *
- * @param [options] - options is an optional argument that is an Object with the following possible keys:
- * @param options.width - An integer that specifies the minimum width of the returned photo.
- * @param options.height - An integer that specifies the minimum height of the returned photo.
- * @param options.quality - A number from 0 to 100 specifying the desired quality of JPEG encoding.
- *
- * @return The promise solved successfully when the picture is taken with the data as a parameter or rejected with an error as a parameter in case of error.
- */
- getPicture(options?: {width?: number; height?: number; quality?: number}): angular.IPromise;
-
- // <- $meteorCamera END
-
- /**
- * A service that binds a scope variable to a Meteor Session variable.
- *
- * @param sessionKey - The name of the session variable
- * @return An object with a single function bind - to bind to that variable.
- */
- session(sessionKey: string): {
+declare module 'angularjs' {
+ export namespace meteor {
+ interface IRootScopeService extends angular.IRootScopeService {
/**
- * @param scope - The scope the document will be bound to.
- * @param model - The name of the scope's model variable that the document will be bound to.
+ * The current logged in user and it's data. it is null if the user is not logged in. A reactive data source.
*/
- bind: (scope: IScope, model: string) => void;
- };
- }
+ currentUser: Meteor.User;
+ /**
+ * True if a login method (such as Meteor.loginWithPassword, Meteor.loginWithFacebook, or Accounts.createUser) is currently in progress.
+ * A reactive data source. Can be use to display animation while user is logging in.
+ */
+ loggingIn: boolean;
+ }
+
+ interface IScope extends angular.IScope, IRootScopeService {
+ /**
+ * A method to get a $scope variable and watch it reactivly
+ *
+ * @param scopeVariableName - The name of the scope's variable to bind to
+ * @param [objectEquality=false] - Watch the object equality using angular.equals instead of comparing for reference equality, deeper watch but also slower
+ */
+ getReactively(scopeVariableName: string, objectEquality?: boolean): ReactiveResult;
+
+ /**
+ * A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready.
+ * Calling $scope.subscribe will automatically stop the subscription when the scope is destroyed.
+ *
+ * @param name - Name of the subscription. Matches the name of the server's publish() call.
+ * @param publisherArguments - Optional arguments passed to publisher function on server.
+ *
+ * @return The promise solved successfully when subscription is ready. The success promise holds the subscription handle.
+ */
+ subscribe(name: string, ...publisherArguments: any[]): angular.IPromise;
+
+ /**
+ * The helpers method is part of the ReactiveContext, and available on every context and $scope.
+ * These method are defined as Object, where each key is the name of the variable that will be available on the context we run, and each value is a function with a return value.
+ * Under the hood, each helper starts a new Tracker.autorun. When its reactive dependencies change, the helper is rerun.
+ * To trigger a rerun every time an specific Angular variable change, use getReactively](/api/1.3.1/get-reactively) to make your Angular variable reactive inside the helper its used in.
+ * Each helper function should return a MongoDB Cursor and the helpers will expose it as a normal array to the context.
+ *
+ * @param definitions - Object containing `name` => `function` definition, where each name is a string and each function is the helper function. Should return a [MongoDB Cursor](http://docs.meteor.com/#/full/mongo_cursor)
+ * @return This method returns this, which the the reactive context, in order to provide the ability to chain the logic.
+ */
+ helpers(definitions : { [helperName : string] : () => Mongo.Cursor }): IScope;
+
+ /**
+ * This method is a wrapper of Tracker.autorun and shares exactly the same API.
+ * The autorun method is part of the ReactiveContext, and available on every context and $scope.
+ * The argument of this method is a callback, which will be called each time Autorun will be used.
+ * The Autorun will stop automatically when when it's context ($scope) is destroyed.
+ *
+ * @param runFunc - The function to run. It receives one argument: the Computation object that will be returned.
+ */
+ autorun(runFunc : () => void) : Tracker.Computation;
+ }
- /**
- * An object that connects a Meteor Object to an AngularJS scope variable.
- *
- * The object contains also all the properties from the generic type T,
- * unfortunately TypeScript doesn't at the moment allow to extend a generic type (see https://github.com/Microsoft/TypeScript/issues/2225 for details and updates).
- * For a workaround, you'll need to implement an interface which will merge AngularMeteorObject together with T and cast it, like this:
- *
- * interface TodoAngularMeteorObject extends ITodo, AngularMeteorObject { }
- * var todo = $meteor.object(TodoCollection, 'TodoID');
- */
- interface AngularMeteorObject {
/**
- * @param [doc] - The doc to save to the Meteor Object. If nothing is passed, the method saves everything in the AngularMeteorObject as is.
- * - Unchanged properties will be overridden with their existing values, which may trigger hooks.
- * - If doc is passed, the method only updates the Meteor Object with the properties passed, and no other changes will be saved.
+ * $meteor in angularjs
+ */
+ interface IMeteorService {
+ /**
+ * A service that wraps the Meteor collections to enable reactivity within AngularJS.
+ *
+ * @param collection - A Meteor Collection or a reactive function to bind to.
+ * - Reactive function can be used with $scope.getReactively to add $scope variable as reactive variable to the cursor.
+ * @param [autoClientSave=true] - By default, changes in the Angular collection will automatically update the Meteor collection.
+ * - However if set to false, changes in the client won't be automatically propagated back to the Meteor collection.
+ */
+ collection(collection: Mongo.Collection|ReactiveResult|Function|(()=>T), autoClientSave?: boolean): AngularMeteorCollection;
+
+ /**
+ * A service that wraps the Meteor collections to enable reactivity within AngularJS.
+ *
+ * @param collection - A Meteor Collection or a reactive function to bind to.
+ * - Reactive function can be used with $scope.getReactively to add $scope variable as reactive variable to the cursor.
+ * @param [autoClientSave=true] - By default, changes in the Angular collection will automatically update the Meteor collection.
+ * - However if set to false, changes in the client won't be automatically propagated back to the Meteor collection.
+ * @param [updateCollection] - A collection object which will be used for updates (insert, update, delete).
+ */
+ collection(collection: Mongo.Collection|ReactiveResult|Function|(()=>T), autoClientSave: boolean, updateCollection: Mongo.Collection): AngularMeteorCollection2;
+
+ /**
+ * A service that wraps a Meteor object to enable reactivity within AngularJS.
+ * Finds the first document that matches the selector, as ordered by sort and skip options. Wraps collection.findOne
+ *
+ * @param collection - A Meteor Collection to bind to.
+ * @param selector - A query describing the documents to find or just the ID of the document.
+ * - $meteor.object will find the first document that matches the selector,
+ * - as ordered by sort and skip options, exactly like Meteor's collection.findOne
+ * @param [autoClientSave=true] - By default, changes in the Angular object will automatically update the Meteor object.
+ * - However if set to false, changes in the client won't be automatically propagated back to the Meteor object.
+ */
+ object(collection: Mongo.Collection, selector: Mongo.Selector|Mongo.ObjectID|string, autoClientSave?: boolean): AngularMeteorObject;
+
+ /**
+ * A service which is a wrapper for Meteor.subscribe. It subscribes to a Meteor.publish method in the client and returns a AngularJS promise when ready.
+ *
+ * @param name - Name of the subscription. Matches the name of the server's publish() call.
+ * @param publisherArguments - Optional arguments passed to publisher function on server.
+ *
+ * @return The promise solved successfully when subscription is ready. The success promise holds the subscription handle.
+ */
+ subscribe(name: string, ...publisherArguments: any[]): angular.IPromise;
+
+ /**
+ * A service service which wraps up Meteor.methods with AngularJS promises.
+ *
+ * @param name - Name of method to invoke
+ * @param methodArguments - Optional method arguments
+ *
+ * @return The promise solves successfully with the return value of the method or return reject with the error from the method.
+ */
+ call(name: string, ...methodArguments: any[]): angular.IPromise;
+
+ // User Authentication BEGIN ->
+
+ /**
+ * Returns a promise fulfilled with the currentUser when the user subscription is ready.
+ * This is useful when you want to grab the current user before the route is rendered.
+ * If there is no logged in user, it will return null.
+ * See the “Authentication with Routers” section of our tutorial for more information and a full example.
+ */
+ waitForUser(): angular.IPromise;
+
+ /**
+ * Resolves the promise successfully if a user is authenticated and rejects otherwise.
+ * This is useful in cases where you want to require a route to have an authenticated user.
+ * You can catch the rejected promise and redirect the unauthenticated user to a different page, such as the login page.
+ * See the “Authentication with Routers” section of our tutorial for more information and a full example.
+ */
+ requireUser(): angular.IPromise;
+
+ /**
+ * Resolves the promise successfully if a user is authenticated and the validatorFn returns true; rejects otherwise.
+ * This is useful in cases where you want to require a route to have an authenticated user and do extra validation like the user's role or group.
+ * You can catch the rejected promise and redirect the unauthenticated user to a different page, such as the login page.
+ * See the “Authentication with Routers” section of our tutorial for more information and a full example.
+ *
+ * The mandatory validator function will be called with the authenticated user as the single param and it's expected to return true in order to resolve.
+ * If it returns a string, the promise will be rejected using said string as the reason.
+ * Any other return (false, null, undefined) will be rejected with the default "FORBIDDEN" reason.
+ */
+ requireValidUser(validatorFn: (user: Meteor.User) => boolean|string): angular.IPromise;
+
+ /**
+ * Log the user in with a password.
+ *
+ * @param user - Either a string interpreted as a username or an email; or an object with a single key: email, username or id.
+ * @param password - The user's password.
+ */
+ loginWithPassword(user: string|{email: string}|{username: string}|{id: string}, password: string): angular.IPromise;
+
+ /**
+ * Create a new user. More information: http://docs.meteor.com/#/full/accounts_createuser
+ *
+ * @param options.username - A unique name for this user. Either this, or email is required.
+ * @param options.email - The user's email address. Either this, or username is required.
+ * @param options.password - The user's password. This is not sent in plain text over the wire.
+ * @param options.profile - The user's profile, typically including the name field.
+ */
+ createUser(options: {username?: string; email?: string; password: string; profile?: Object}): angular.IPromise;
+
+ /**
+ * Change the current user's password. Must be logged in.
+ *
+ * @param oldPassword - The user's current password. This is not sent in plain text over the wire.
+ * @param newPassword - A new password for the user. This is not sent in plain text over the wire.
+ */
+ changePassword(oldPassword: string, newPassword: string): angular.IPromise;
+
+ /**
+ * Request a forgot password email.
+ *
+ * @param options.email - The email address to send a password reset link.
+ */
+ forgotPassword(options: {email: string}): angular.IPromise;
+
+ /**
+ * Reset the password for a user using a token received in email. Logs the user in afterwards.
+ *
+ * @param token - The token retrieved from the reset password URL.
+ * @param newPassword - A new password for the user. This is not sent in plain text over the wire.
+ */
+ resetPassword(token: string, newPassword: string): angular.IPromise;
+
+ /**
+ * Marks the user's email address as verified. Logs the user in afterwards.
+ *
+ * @param token - The token retrieved from the reset password URL.
+ */
+ verifyEmail(token: string): angular.IPromise;
+
+ loginWithFacebook: ILoginWithExternalService;
+ loginWithTwitter: ILoginWithExternalService;
+ loginWithGoogle: ILoginWithExternalService;
+ loginWithGithub: ILoginWithExternalService;
+ loginWithMeetup: ILoginWithExternalService;
+ loginWithWeibo: ILoginWithExternalService;
+
+ /**
+ * Log the user out.
+ *
+ * @return Resolves with no arguments on success, or reject with a Error argument on failure.
+ */
+ logout(): angular.IPromise;
+
+ /**
+ * Log out other clients logged in as the current user, but does not log out the client that calls this function.
+ * For example, when called in a user's browser, connections in that browser remain logged in,
+ * but any other browsers or DDP clients logged in as that user will be logged out.
+ *
+ * @return Resolves with no arguments on success, or reject with a Error argument on failure.
+ */
+ logoutOtherClients(): angular.IPromise;
+
+ // <- User Authentication END
+ // $meteorUtils BEGIN ->
+
+ /**
+ * @param scope - The AngularJS scope you use the autorun on.
+ * @param fn - The function that will re-run every time a reactive variable changes inside it.
+ */
+ autorun(scope: angular.IScope, fn: Function): void;
+
+ /**
+ * @param collectionName - The name of the collection you want to get back
+ */
+ getCollectionByName(collectionName: string): Mongo.Collection;
+
+ // <- $meteorUtils END
+ // $meteorCamera BEGIN ->
+
+ /**
+ * A helper service for taking pictures across platforms.
+ * Must add mdg:camera package to use! (meteor add mdg:camera)
+ *
+ * @param [options] - options is an optional argument that is an Object with the following possible keys:
+ * @param options.width - An integer that specifies the minimum width of the returned photo.
+ * @param options.height - An integer that specifies the minimum height of the returned photo.
+ * @param options.quality - A number from 0 to 100 specifying the desired quality of JPEG encoding.
+ *
+ * @return The promise solved successfully when the picture is taken with the data as a parameter or rejected with an error as a parameter in case of error.
+ */
+ getPicture(options?: {width?: number; height?: number; quality?: number}): angular.IPromise;
+
+ // <- $meteorCamera END
+
+ /**
+ * A service that binds a scope variable to a Meteor Session variable.
+ *
+ * @param sessionKey - The name of the session variable
+ * @return An object with a single function bind - to bind to that variable.
+ */
+ session(sessionKey: string): {
+ /**
+ * @param scope - The scope the document will be bound to.
+ * @param model - The name of the scope's model variable that the document will be bound to.
+ */
+ bind: (scope: IScope, model: string) => void;
+ };
+ }
+
+ /**
+ * An object that connects a Meteor Object to an AngularJS scope variable.
*
- * @return Returns a promise with an error in case for an error or a number of successful docs changed in case of success.
- */
- save(doc?: T): angular.IPromise;
-
- /**
- * Reset the current value of the object to the one in the server.
- */
- reset(): void;
-
- /**
- * Returns a copy of the AngularMeteorObject with all the AngularMeteor-specific internal properties removed.
- * The returned object is then safe to use as a parameter for method calls, or anywhere else where the data needs to be converted to JSON.
- */
- getRawObject(): T;
-
- /**
- * A shorten (Syntactic sugar) function for the $meteor.subscribe function.
- * Takes only one parameter and not returns a promise like $meteor.subscribe does.
+ * The object contains also all the properties from the generic type T,
+ * unfortunately TypeScript doesn't at the moment allow to extend a generic type (see https://github.com/Microsoft/TypeScript/issues/2225 for details and updates).
+ * For a workaround, you'll need to implement an interface which will merge AngularMeteorObject together with T and cast it, like this:
*
- * @param subscriptionName - The subscription name to subscribe to. Exactly like the first parameter in $meteor.subscribe service.
+ * interface TodoAngularMeteorObject extends ITodo, AngularMeteorObject { }
+ * var todo = $meteor.object(TodoCollection, 'TodoID');
*/
- subscribe(subscriptionName:string): AngularMeteorObject;
- }
+ interface AngularMeteorObject {
+ /**
+ * @param [doc] - The doc to save to the Meteor Object. If nothing is passed, the method saves everything in the AngularMeteorObject as is.
+ * - Unchanged properties will be overridden with their existing values, which may trigger hooks.
+ * - If doc is passed, the method only updates the Meteor Object with the properties passed, and no other changes will be saved.
+ *
+ * @return Returns a promise with an error in case for an error or a number of successful docs changed in case of success.
+ */
+ save(doc?: T): angular.IPromise;
- /**
- * An object that connects a Meteor Collection to an AngularJS scope variable
- */
- interface AngularMeteorCollection extends AngularMeteorCollection2 { }
+ /**
+ * Reset the current value of the object to the one in the server.
+ */
+ reset(): void;
- /**
- * An object that connects a Meteor Collection to an AngularJS scope variable,
- * but can use a differen type for updates.
- */
- interface AngularMeteorCollection2 extends Array {
- /**
- * @param [docs] - The docs to save to the Meteor Collection.
- * - If the docs parameter is empty, the method saves everything in the AngularMeteorCollection as is.
- * - If an object is passed, the method pushes that object into the AngularMeteorCollection.
- * - If an array is passed, the method pushes all objects in the array into the AngularMeteorCollection.
- */
- save(docs?: U|U[]): void;
+ /**
+ * Returns a copy of the AngularMeteorObject with all the AngularMeteor-specific internal properties removed.
+ * The returned object is then safe to use as a parameter for method calls, or anywhere else where the data needs to be converted to JSON.
+ */
+ getRawObject(): T;
+
+ /**
+ * A shorten (Syntactic sugar) function for the $meteor.subscribe function.
+ * Takes only one parameter and not returns a promise like $meteor.subscribe does.
+ *
+ * @param subscriptionName - The subscription name to subscribe to. Exactly like the first parameter in $meteor.subscribe service.
+ */
+ subscribe(subscriptionName:string): AngularMeteorObject;
+ }
/**
- * @param [keys] - The keys of the object to remove from the Meteor Collection.
- * - If nothing is passed, the method removes all the documents from the AngularMeteorCollection.
- * - If an object is passed, the method removes the object with that key from the AngularMeteorCollection.
- * - If an array is passed, the method removes all objects that matches the keys in the array from the AngularMeteorCollection.
+ * An object that connects a Meteor Collection to an AngularJS scope variable
*/
- remove(keys?: U|string|number|string[]|number[]): void;
+ interface AngularMeteorCollection extends AngularMeteorCollection2 { }
/**
- * A shorten (Syntactic sugar) function for the $meteor.subscribe function.
- * Takes only one parameter and not returns a promise like $meteor.subscribe does.
- *
- * @param subscriptionName - The subscription name to subscribe to. Exactly like the first parameter in $meteor.subscribe service.
+ * An object that connects a Meteor Collection to an AngularJS scope variable,
+ * but can use a differen type for updates.
*/
- subscribe(subscriptionName:string): AngularMeteorCollection2;
- }
+ interface AngularMeteorCollection2 extends Array {
+ /**
+ * @param [docs] - The docs to save to the Meteor Collection.
+ * - If the docs parameter is empty, the method saves everything in the AngularMeteorCollection as is.
+ * - If an object is passed, the method pushes that object into the AngularMeteorCollection.
+ * - If an array is passed, the method pushes all objects in the array into the AngularMeteorCollection.
+ */
+ save(docs?: U|U[]): void;
- interface ILoginWithExternalService {
- (options: Meteor.LoginWithExternalServiceOptions): angular.IPromise;
- }
+ /**
+ * @param [keys] - The keys of the object to remove from the Meteor Collection.
+ * - If nothing is passed, the method removes all the documents from the AngularMeteorCollection.
+ * - If an object is passed, the method removes the object with that key from the AngularMeteorCollection.
+ * - If an array is passed, the method removes all objects that matches the keys in the array from the AngularMeteorCollection.
+ */
+ remove(keys?: U|string|number|string[]|number[]): void;
- interface ReactiveResult { }
+ /**
+ * A shorten (Syntactic sugar) function for the $meteor.subscribe function.
+ * Takes only one parameter and not returns a promise like $meteor.subscribe does.
+ *
+ * @param subscriptionName - The subscription name to subscribe to. Exactly like the first parameter in $meteor.subscribe service.
+ */
+ subscribe(subscriptionName:string): AngularMeteorCollection2;
+ }
+
+ interface ILoginWithExternalService {
+ (options: Meteor.LoginWithExternalServiceOptions): angular.IPromise;
+ }
+
+ interface ReactiveResult { }
+ }
}
diff --git a/angular-notifications/index.d.ts b/angular-notifications/index.d.ts
index 72ceff3f96..209e4a1c22 100644
--- a/angular-notifications/index.d.ts
+++ b/angular-notifications/index.d.ts
@@ -5,78 +5,82 @@
///
-declare namespace angular.notifications {
+import * as angular from 'angularjs';
- interface IAnimation {
- duration: number;
- enabled: boolean;
- }
+declare module 'angularjs' {
+ export namespace notifications {
- interface ISettings {
- info: IAnimation;
- warning: IAnimation;
- error: IAnimation;
- success: IAnimation;
- progress: IAnimation;
- custom: IAnimation;
- details: boolean;
- localStorage: boolean;
- html5Mode: boolean;
- html5DefaultIcon: string;
- }
+ interface IAnimation {
+ duration: number;
+ enabled: boolean;
+ }
- interface INotification {
- type: string;
- image: string;
- icon: string;
- title: string;
- content: string;
- timestamp: string;
- userData: string;
- }
+ interface ISettings {
+ info: IAnimation;
+ warning: IAnimation;
+ error: IAnimation;
+ success: IAnimation;
+ progress: IAnimation;
+ custom: IAnimation;
+ details: boolean;
+ localStorage: boolean;
+ html5Mode: boolean;
+ html5DefaultIcon: string;
+ }
- interface INotificationFactory extends angular.IModule {
+ interface INotification {
+ type: string;
+ image: string;
+ icon: string;
+ title: string;
+ content: string;
+ timestamp: string;
+ userData: string;
+ }
- /* ========== SETTINGS RELATED METHODS =============*/
+ interface INotificationFactory extends angular.IModule {
- disableHtml5Mode(): void;
- disableType(notificationType: string): void;
- enableHtml5Mode(): void;
- enableType(notificationType: string): void;
- getSettings(): ISettings;
- toggleType(notificationType: string): void;
- toggleHtml5Mode(): void;
- requestHtml5ModePermissions(): boolean;
+ /* ========== SETTINGS RELATED METHODS =============*/
- /* ============ QUERYING RELATED METHODS ============*/
+ disableHtml5Mode(): void;
+ disableType(notificationType: string): void;
+ enableHtml5Mode(): void;
+ enableType(notificationType: string): void;
+ getSettings(): ISettings;
+ toggleType(notificationType: string): void;
+ toggleHtml5Mode(): void;
+ requestHtml5ModePermissions(): boolean;
- getAll(): Array;
- getQueue(): Array;
+ /* ============ QUERYING RELATED METHODS ============*/
- /* ============== NOTIFICATION METHODS ==============*/
+ getAll(): Array;
+ getQueue(): Array;
- info(title: string): INotification;
- info(title: string, content: string): INotification;
- info(title: string, content: string, userData: any): INotification;
- error(title: string): INotification;
- error(title: string, content: string): INotification;
- error(title: string, content: string, userData: any): INotification;
- success(title: string): INotification;
- success(title: string, content: string): INotification;
- success(title: string, content: string, userData: any): INotification;
- warning(title: string): INotification;
- warning(title: string, content: string): INotification;
- warning(title: string, content: string, userData: any): INotification;
- awesomeNotify(type: string, icon: string, title: string, content: string, userData: any): INotification;
- notify(image: string, title: string, content: string, userData: any): INotification;
- makeNotification(type: string, image: string, icon: string, title: string, content: string, userData: any): INotification;
+ /* ============== NOTIFICATION METHODS ==============*/
- /* ============ PERSISTENCE METHODS ============ */
+ info(title: string): INotification;
+ info(title: string, content: string): INotification;
+ info(title: string, content: string, userData: any): INotification;
+ error(title: string): INotification;
+ error(title: string, content: string): INotification;
+ error(title: string, content: string, userData: any): INotification;
+ success(title: string): INotification;
+ success(title: string, content: string): INotification;
+ success(title: string, content: string, userData: any): INotification;
+ warning(title: string): INotification;
+ warning(title: string, content: string): INotification;
+ warning(title: string, content: string, userData: any): INotification;
+ awesomeNotify(type: string, icon: string, title: string, content: string, userData: any): INotification;
+ notify(image: string, title: string, content: string, userData: any): INotification;
+ makeNotification(type: string, image: string, icon: string, title: string, content: string, userData: any): INotification;
- save(): void;
- restore(): void;
- clear(): void;
- }
+ /* ============ PERSISTENCE METHODS ============ */
+
+ save(): void;
+ restore(): void;
+ clear(): void;
+ }
+}
}
diff --git a/angular-notify/index.d.ts b/angular-notify/index.d.ts
index 58f680a09b..bff27531f2 100644
--- a/angular-notify/index.d.ts
+++ b/angular-notify/index.d.ts
@@ -5,122 +5,126 @@
///
-declare namespace angular.cgNotify {
+import * as angular from 'angularjs';
- interface INotifyService {
+declare module 'angularjs' {
+ export namespace cgNotify {
- /**
- * The notify function can either be passed a string or an object.
- * This function will return an object with a close() method and a message property.
- * @param message
- */
- (message:string):INotify;
-
- /**
- * When passing an object, the object parameters can be:
- * @param option
- */
- (option:{
- /**
- * Required. The message to show.
- */
- message : string;
+ interface INotifyService {
/**
- * Optional. A custom template for the UI of the message.
+ * The notify function can either be passed a string or an object.
+ * This function will return an object with a close() method and a message property.
+ * @param message
*/
- templateUrl? : string;
+ (message: string): INotify;
/**
- * Optional. A list of custom CSS classes to apply to the message element.
+ * When passing an object, the object parameters can be:
+ * @param option
*/
- classes? : string;
+ (option: {
+ /**
+ * Required. The message to show.
+ */
+ message: string;
+
+ /**
+ * Optional. A custom template for the UI of the message.
+ */
+ templateUrl?: string;
+
+ /**
+ * Optional. A list of custom CSS classes to apply to the message element.
+ */
+ classes?: string;
+
+ /**
+ * Optional. A string containing any valid Angular HTML which will be shown instead of the regular message text.
+ * The string must contain one root element like all valid Angular HTML templates (so wrap everything in a ).
+ */
+ messageTemplate?: string;
+
+ /**
+ * Optional. A valid Angular scope object. The scope of the template will be created by calling $new() on this scope.
+ */
+ $scope?: ng.IScope;
+
+ /**
+ * Optional. Currently center and right are the only acceptable values.
+ */
+ position?: string;
+
+ /**
+ * Optional. The duration (in milliseconds) of the message. A duration of 0 will prevent the message from closing automatically.
+ */
+ duration?: number;
+
+ /**
+ * Optional. Element that contains each notification. Defaults to document.body.
+ */
+ container?: any;
+ }): INotify;
+
/**
- * Optional. A string containing any valid Angular HTML which will be shown instead of the regular message text.
- * The string must contain one root element like all valid Angular HTML templates (so wrap everything in a ).
+ * Call config to set the default configuration options for angular-notify.
+ * The following options may be specified in the given object:
+ * @param option
*/
- messageTemplate? : string;
+ config(option: {
+ /**
+ * The default duration (in milliseconds) of each message. A duration of 0 will prevent messages from closing automatically.
+ */
+ duration?: number;
+
+ /**
+ * The Y pixel value where messages will be shown.
+ */
+ startTop?: number;
+
+ /**
+ * The number of pixels that should be reserved between messages vertically.
+ */
+ verticalSpacing?: number;
+
+ /**
+ * The default message template.
+ */
+ templateUrl?: string;
+
+ /**
+ * The default position of each message. Currently only center and right are the supported values.
+ */
+ position?: string;
+
+ /**
+ * The default element that contains each notification. Defaults to document.body.
+ */
+ container?: any;
+
+ /**
+ * The maximum number of total notifications that can be visible at one time. Older notifications will be closed when the maximum is reached.
+ */
+ maximumOpen?: number;
+ }): void;
/**
- * Optional. A valid Angular scope object. The scope of the template will be created by calling $new() on this scope.
+ * Closes all currently open notifications.
*/
- $scope? : ng.IScope;
+ closeAll(): void;
+ }
+
+ interface INotify {
+ /**
+ * The message to show.
+ */
+ message: string;
/**
- * Optional. Currently center and right are the only acceptable values.
+ * Close this open notifications.
*/
- position? : string;
-
- /**
- * Optional. The duration (in milliseconds) of the message. A duration of 0 will prevent the message from closing automatically.
- */
- duration? : number;
-
- /**
- * Optional. Element that contains each notification. Defaults to document.body.
- */
- container? : any;
- }):INotify;
-
-
- /**
- * Call config to set the default configuration options for angular-notify.
- * The following options may be specified in the given object:
- * @param option
- */
- config(option:{
- /**
- * The default duration (in milliseconds) of each message. A duration of 0 will prevent messages from closing automatically.
- */
- duration? : number;
-
- /**
- * The Y pixel value where messages will be shown.
- */
- startTop? : number;
-
- /**
- * The number of pixels that should be reserved between messages vertically.
- */
- verticalSpacing? : number;
-
- /**
- * The default message template.
- */
- templateUrl? : string;
-
- /**
- * The default position of each message. Currently only center and right are the supported values.
- */
- position? : string;
-
- /**
- * The default element that contains each notification. Defaults to document.body.
- */
- container? : any;
-
- /**
- * The maximum number of total notifications that can be visible at one time. Older notifications will be closed when the maximum is reached.
- */
- maximumOpen? : number;
- }):void;
-
- /**
- * Closes all currently open notifications.
- */
- closeAll():void;
- }
-
- interface INotify{
- /**
- * The message to show.
- */
- message:string;
-
- /**
- * Close this open notifications.
- */
- close():void;
+ close(): void;
+ }
}
}
diff --git a/angular-permission/index.d.ts b/angular-permission/index.d.ts
index a32366b218..c743faa1cc 100644
--- a/angular-permission/index.d.ts
+++ b/angular-permission/index.d.ts
@@ -6,170 +6,174 @@
///
///
-declare namespace angular.permission {
- /**
- * Used as optional parameter provided on definitions of permissions and roles
- */
- export interface TransitionProperties {
- fromState?: angular.ui.IState;
- fromParams?: angular.ui.IStateParamsService;
- toState?: angular.ui.IState;
- toParams?: angular.ui.IStateParamsService;
- options?: angular.ui.IStateOptions;
- }
+import * as angular from 'angularjs';
- export interface PermissionStore {
+declare module 'angularjs' {
+ export namespace permission {
/**
- * Allows to define permission on application configuration
- * @method
- *
- * @param permissionName {String} Name of defined permission
- * @param validationFunction {Function} Function used to validate if permission is valid
+ * Used as optional parameter provided on definitions of permissions and roles
*/
- definePermission(
- name: string,
- validationFunction: (permission?: string, transitionProperties?: TransitionProperties) => boolean | angular.IPromise
- ): void;
+ export interface TransitionProperties {
+ fromState?: angular.ui.IState;
+ fromParams?: angular.ui.IStateParamsService;
+ toState?: angular.ui.IState;
+ toParams?: angular.ui.IStateParamsService;
+ options?: angular.ui.IStateOptions;
+ }
- /**
- * Allows to define set of permissionNames with shared validation function on application configuration
- * @method
- * @throws {TypeError}
- *
- * @param permissionNames {Array} Set of permission names
- * @param validationFunction {Function} Function used to validate if permission is valid
- */
- defineManyPermissions(
- permissions: string[],
- validationFunction: (permission?: string, transitionProperties?: TransitionProperties) => boolean | angular.IPromise
- ): void;
+ export interface PermissionStore {
+ /**
+ * Allows to define permission on application configuration
+ * @method
+ *
+ * @param permissionName {String} Name of defined permission
+ * @param validationFunction {Function} Function used to validate if permission is valid
+ */
+ definePermission(
+ name: string,
+ validationFunction: (permission?: string, transitionProperties?: TransitionProperties) => boolean | angular.IPromise
+ ): void;
- clearStore(): void;
+ /**
+ * Allows to define set of permissionNames with shared validation function on application configuration
+ * @method
+ * @throws {TypeError}
+ *
+ * @param permissionNames {Array} Set of permission names
+ * @param validationFunction {Function} Function used to validate if permission is valid
+ */
+ defineManyPermissions(
+ permissions: string[],
+ validationFunction: (permission?: string, transitionProperties?: TransitionProperties) => boolean | angular.IPromise
+ ): void;
- /**
- * Deletes permission
- * @method
- *
- * @param permissionName {String} Name of defined permission
- */
- removePermissionDefinition(permission: string): void;
+ clearStore(): void;
- /**
- * Checks if permission exists
- * @method
- *
- * @param permissionName {String} Name of defined permission
- * @returns {Boolean}
- */
- hasPermissionDefinition(permissionName: string): boolean;
+ /**
+ * Deletes permission
+ * @method
+ *
+ * @param permissionName {String} Name of defined permission
+ */
+ removePermissionDefinition(permission: string): void;
- /**
- * Returns all permissions
- * @method
- *
- * @returns {Object} Permissions collection
- */
- getStore(): Permission[];
- }
+ /**
+ * Checks if permission exists
+ * @method
+ *
+ * @param permissionName {String} Name of defined permission
+ * @returns {Boolean}
+ */
+ hasPermissionDefinition(permissionName: string): boolean;
- export interface RoleStore {
- /**
- * Allows to define role
- * @method
- *
- * @param roleName {String} Name of defined role
- * @param permissions {Array} Set of permission names
- * @param [validationFunction] {Function} Function used to validate if permissions in role are valid
- */
- defineRole(
- role: string,
- permissions: Array,
- validationFunction: RoleValidationFunction
- ): void;
+ /**
+ * Returns all permissions
+ * @method
+ *
+ * @returns {Object} Permissions collection
+ */
+ getStore(): Permission[];
+ }
- /**
- * Allows to define role
- * @method
- *
- * @param roleName {String} Name of defined role
- * @param permissions {Array} Set of permission names
- */
- defineRole(role: string, permissions: Array): void;
+ export interface RoleStore {
+ /**
+ * Allows to define role
+ * @method
+ *
+ * @param roleName {String} Name of defined role
+ * @param permissions {Array} Set of permission names
+ * @param [validationFunction] {Function} Function used to validate if permissions in role are valid
+ */
+ defineRole(
+ role: string,
+ permissions: Array,
+ validationFunction: RoleValidationFunction
+ ): void;
- /**
- * Checks if role is defined in store
- * @method
- *
- * @param roleName {String} Name of role
- * @returns {Boolean}
- */
- hasRoleDefinition(role: string): boolean;
+ /**
+ * Allows to define role
+ * @method
+ *
+ * @param roleName {String} Name of defined role
+ * @param permissions {Array} Set of permission names
+ */
+ defineRole(role: string, permissions: Array): void;
- /**
- * Returns role definition object by it's name
- * @method
- *
- * @returns {permission.Role} Role definition object
- */
- getRoleDefinition(roleName: string): Role;
+ /**
+ * Checks if role is defined in store
+ * @method
+ *
+ * @param roleName {String} Name of role
+ * @returns {Boolean}
+ */
+ hasRoleDefinition(role: string): boolean;
- /**
- * Removes all role definitions
- * @method
- */
- clearStore(): void;
+ /**
+ * Returns role definition object by it's name
+ * @method
+ *
+ * @returns {permission.Role} Role definition object
+ */
+ getRoleDefinition(roleName: string): Role;
- /**
- * Deletes role from store
- * @method
- *
- * @param roleName {String} Name of defined permission
- */
- removeRoleDefinition(roleName: string): void;
+ /**
+ * Removes all role definitions
+ * @method
+ */
+ clearStore(): void;
- /**
- * Returns all role definitions
- * @method
- *
- * @returns {Object} Defined roles collection
- */
- getStore(): Role[];
- }
+ /**
+ * Deletes role from store
+ * @method
+ *
+ * @param roleName {String} Name of defined permission
+ */
+ removeRoleDefinition(roleName: string): void;
- export interface Role {
- roleName: string;
- permissionNames: string[];
- validationFunction?: RoleValidationFunction;
- }
+ /**
+ * Returns all role definitions
+ * @method
+ *
+ * @returns {Object} Defined roles collection
+ */
+ getStore(): Role[];
+ }
- export interface Permission {
- permissionName: string;
- validationFunction?: PermissionValidationFunction;
- }
+ export interface Role {
+ roleName: string;
+ permissionNames: string[];
+ validationFunction?: RoleValidationFunction;
+ }
- interface RoleValidationFunction {
- (permission?: string, transitionProperties?: TransitionProperties): boolean | angular.IPromise;
- }
+ export interface Permission {
+ permissionName: string;
+ validationFunction?: PermissionValidationFunction;
+ }
- interface PermissionValidationFunction {
- (permission?: string, transitionProperties?: TransitionProperties): boolean | angular.IPromise;
- }
+ interface RoleValidationFunction {
+ (permission?: string, transitionProperties?: TransitionProperties): boolean | angular.IPromise;
+ }
- export interface IPermissionState extends angular.ui.IState {
- data?: any | DataWithPermissions;
- }
+ interface PermissionValidationFunction {
+ (permission?: string, transitionProperties?: TransitionProperties): boolean | angular.IPromise;
+ }
- export interface DataWithPermissions {
- permissions?: {
- only?: (() => void) | Array | angular.IPromise;
- except?: (() => void) | Array | angular.IPromise;
- redirectTo: string | (() => string) | (() => PermissionRedirectConfigation) | {[index: string]: PermissionRedirectConfigation}
- };
- }
+ export interface IPermissionState extends angular.ui.IState {
+ data?: any | DataWithPermissions;
+ }
- export interface PermissionRedirectConfigation {
- state: string;
- params?: {};
- options?: angular.ui.IStateOptions;
+ export interface DataWithPermissions {
+ permissions?: {
+ only?: (() => void) | Array | angular.IPromise;
+ except?: (() => void) | Array | angular.IPromise;
+ redirectTo: string | (() => string) | (() => PermissionRedirectConfigation) | { [index: string]: PermissionRedirectConfigation }
+ };
+ }
+
+ export interface PermissionRedirectConfigation {
+ state: string;
+ params?: {};
+ options?: angular.ui.IStateOptions;
+ }
}
}
diff --git a/angular-storage/index.d.ts b/angular-storage/index.d.ts
index b9e57edf26..3ed3aff94f 100644
--- a/angular-storage/index.d.ts
+++ b/angular-storage/index.d.ts
@@ -5,51 +5,55 @@
///
-declare namespace angular.a0.storage {
- interface IStoreService extends INamespacedStoreService {
- /**
- * Returns a namespaced store
- *
- * @param {String} namespace - The namespace
- * @param {String} storage - The name of the storage service. Defaults to local storage.
- * @param {String} delimiter - The delimiter to use to separate the namespace and the keys.
- * @returns {INamespacedStoreService}
- */
- getNamespacedStore(namespace: string, storage?: string, delimiter?: string): INamespacedStoreService;
- }
+import * as angular from 'angularjs';
- interface INamespacedStoreService {
- /**
- * Sets a new value to the storage with the key name. It can be any object.
- *
- * @param {String} name - The key name for the location of the value
- * @param value - The value to store
- */
- set(name: string, value: any): void;
+declare module 'angularjs' {
+ export namespace a0.storage {
+ interface IStoreService extends INamespacedStoreService {
+ /**
+ * Returns a namespaced store
+ *
+ * @param {String} namespace - The namespace
+ * @param {String} storage - The name of the storage service. Defaults to local storage.
+ * @param {String} delimiter - The delimiter to use to separate the namespace and the keys.
+ * @returns {INamespacedStoreService}
+ */
+ getNamespacedStore(namespace: string, storage?: string, delimiter?: string): INamespacedStoreService;
+ }
- /**
- * Returns the saved value with they key name.
- *
- * @param {String} name - The key name for the location of the value
- * @returns The saved value; if you saved an object, you get an object
- */
- get(name: string): any;
+ interface INamespacedStoreService {
+ /**
+ * Sets a new value to the storage with the key name. It can be any object.
+ *
+ * @param {String} name - The key name for the location of the value
+ * @param value - The value to store
+ */
+ set(name: string, value: any): void;
- /**
- * Deletes the saved value with the key name
- *
- * @param {String} name - The key name for the location of the value to remove
- */
- remove(name: string): void;
- }
+ /**
+ * Returns the saved value with they key name.
+ *
+ * @param {String} name - The key name for the location of the value
+ * @returns The saved value; if you saved an object, you get an object
+ */
+ get(name: string): any;
- interface IStoreProvider {
+ /**
+ * Deletes the saved value with the key name
+ *
+ * @param {String} name - The key name for the location of the value to remove
+ */
+ remove(name: string): void;
+ }
- /**
- * Sets the storage.
- *
- * @param {String} storage - The storage name
- */
- setStore(storage: string): void;
+ interface IStoreProvider {
+
+ /**
+ * Sets the storage.
+ *
+ * @param {String} storage - The storage name
+ */
+ setStore(storage: string): void;
+ }
}
}
diff --git a/angular-translate/index.d.ts b/angular-translate/index.d.ts
index e2e72cced9..9f5cd79837 100644
--- a/angular-translate/index.d.ts
+++ b/angular-translate/index.d.ts
@@ -5,119 +5,116 @@
///
-declare module "angular-translate" {
- import ngt = angular.translate;
- export = ngt;
-}
+import * as angular from 'angularjs';
-declare namespace angular.translate {
+declare module 'angularjs' {
+ export namespace translate {
- interface ITranslationTable {
- [key: string]: any;
+ interface ITranslationTable {
+ [key: string]: any;
+ }
+
+ interface ILanguageKeyAlias {
+ [key: string]: string;
+ }
+
+ interface IStorage {
+ get(name: string): string;
+ put(name: string, value: string): void;
+ }
+
+ interface IStaticFilesLoaderOptions {
+ prefix: string;
+ suffix: string;
+ key?: string;
+ }
+
+ interface IPartialLoader {
+ addPart(name: string, priority?: number): T;
+ deletePart(name: string): T;
+ isPartAvailable(name: string): boolean;
+ }
+
+ interface ITranslatePartialLoaderService extends IPartialLoader {
+ getRegisteredParts(): Array;
+ isPartLoaded(name: string, lang: string): boolean;
+ }
+
+ interface ITranslatePartialLoaderProvider extends angular.IServiceProvider, IPartialLoader {
+ setPart(lang: string, part: string, table: ITranslationTable): ITranslatePartialLoaderProvider;
+ }
+
+ interface ITranslateService {
+ (translationId: string, interpolateParams?: any, interpolationId?: string): angular.IPromise;
+ (translationId: string[], interpolateParams?: any, interpolationId?: string): angular.IPromise<{ [key: string]: string }>;
+ cloakClassName(): string;
+ cloakClassName(name: string): ITranslateProvider;
+ fallbackLanguage(langKey?: string): string;
+ fallbackLanguage(langKey?: string[]): string;
+ instant(translationId: string, interpolateParams?: any, interpolationId?: string): string;
+ instant(translationId: string[], interpolateParams?: any, interpolationId?: string): { [key: string]: string };
+ isPostCompilingEnabled(): boolean;
+ preferredLanguage(langKey?: string): string;
+ proposedLanguage(): string;
+ refresh(langKey?: string): angular.IPromise;
+ storage(): IStorage;
+ storageKey(): string;
+ use(): string;
+ use(key: string): angular.IPromise;
+ useFallbackLanguage(langKey?: string): void;
+ versionInfo(): string;
+ loaderCache(): any;
+ isReady(): boolean;
+ onReady(): angular.IPromise;
+ }
+
+ interface ITranslateProvider extends angular.IServiceProvider {
+ translations(): ITranslationTable;
+ translations(key: string, translationTable: ITranslationTable): ITranslateProvider;
+ cloakClassName(): string;
+ cloakClassName(name: string): ITranslateProvider;
+ addInterpolation(factory: any): ITranslateProvider;
+ useMessageFormatInterpolation(): ITranslateProvider;
+ useInterpolation(factory: string): ITranslateProvider;
+ useSanitizeValueStrategy(value: string): ITranslateProvider;
+ preferredLanguage(): ITranslateProvider;
+ preferredLanguage(language: string): ITranslateProvider;
+ translationNotFoundIndicator(indicator: string): ITranslateProvider;
+ translationNotFoundIndicatorLeft(): string;
+ translationNotFoundIndicatorLeft(indicator: string): ITranslateProvider;
+ translationNotFoundIndicatorRight(): string;
+ translationNotFoundIndicatorRight(indicator: string): ITranslateProvider;
+ fallbackLanguage(): ITranslateProvider;
+ fallbackLanguage(language: string): ITranslateProvider;
+ fallbackLanguage(languages: string[]): ITranslateProvider;
+ forceAsyncReload(value: boolean): ITranslateProvider;
+ use(): string;
+ use(key: string): ITranslateProvider;
+ storageKey(): string;
+ storageKey(key: string): void; // JeroMiya - the library should probably return ITranslateProvider but it doesn't here
+ useUrlLoader(url: string): ITranslateProvider;
+ useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider;
+ useLoader(loaderFactory: string, options?: any): ITranslateProvider;
+ useLocalStorage(): ITranslateProvider;
+ useCookieStorage(): ITranslateProvider;
+ useStorage(storageFactory: any): ITranslateProvider;
+ storagePrefix(): string;
+ storagePrefix(prefix: string): ITranslateProvider;
+ useMissingTranslationHandlerLog(): ITranslateProvider;
+ useMissingTranslationHandler(factory: string): ITranslateProvider;
+ usePostCompiling(value: boolean): ITranslateProvider;
+ directivePriority(): number;
+ directivePriority(priority: number): ITranslateProvider;
+ determinePreferredLanguage(fn?: () => void): ITranslateProvider;
+ registerAvailableLanguageKeys(): string[];
+ registerAvailableLanguageKeys(languageKeys: string[], aliases?: ILanguageKeyAlias): ITranslateProvider;
+ useLoaderCache(cache?: any): ITranslateProvider;
+ }
}
- interface ILanguageKeyAlias {
- [key: string]: string;
- }
-
- interface IStorage {
- get(name: string): string;
- put(name: string, value: string): void;
- }
-
- interface IStaticFilesLoaderOptions {
- prefix: string;
- suffix: string;
- key?: string;
- }
-
- interface IPartialLoader {
- addPart(name : string, priority? : number) : T;
- deletePart(name : string) : T;
- isPartAvailable(name : string) : boolean;
- }
-
- interface ITranslatePartialLoaderService extends IPartialLoader {
- getRegisteredParts() : Array;
- isPartLoaded(name : string, lang : string) : boolean;
- }
-
- interface ITranslatePartialLoaderProvider extends angular.IServiceProvider, IPartialLoader {
- setPart(lang : string, part : string, table : ITranslationTable) : ITranslatePartialLoaderProvider;
- }
-
- interface ITranslateService {
- (translationId: string, interpolateParams?: any, interpolationId?: string): angular.IPromise;
- (translationId: string[], interpolateParams?: any, interpolationId?: string): angular.IPromise<{ [key: string]: string }>;
- cloakClassName(): string;
- cloakClassName(name: string): ITranslateProvider;
- fallbackLanguage(langKey?: string): string;
- fallbackLanguage(langKey?: string[]): string;
- instant(translationId: string, interpolateParams?: any, interpolationId?: string): string;
- instant(translationId: string[], interpolateParams?: any, interpolationId?: string): { [key: string]: string };
- isPostCompilingEnabled(): boolean;
- preferredLanguage(langKey?: string): string;
- proposedLanguage(): string;
- refresh(langKey?: string): angular.IPromise;
- storage(): IStorage;
- storageKey(): string;
- use(): string;
- use(key: string): angular.IPromise;
- useFallbackLanguage(langKey?: string): void;
- versionInfo(): string;
- loaderCache(): any;
- isReady(): boolean;
- onReady(): angular.IPromise;
- }
-
- interface ITranslateProvider extends angular.IServiceProvider {
- translations(): ITranslationTable;
- translations(key: string, translationTable: ITranslationTable): ITranslateProvider;
- cloakClassName(): string;
- cloakClassName(name: string): ITranslateProvider;
- addInterpolation(factory: any): ITranslateProvider;
- useMessageFormatInterpolation(): ITranslateProvider;
- useInterpolation(factory: string): ITranslateProvider;
- useSanitizeValueStrategy(value: string): ITranslateProvider;
- preferredLanguage(): ITranslateProvider;
- preferredLanguage(language: string): ITranslateProvider;
- translationNotFoundIndicator(indicator: string): ITranslateProvider;
- translationNotFoundIndicatorLeft(): string;
- translationNotFoundIndicatorLeft(indicator: string): ITranslateProvider;
- translationNotFoundIndicatorRight(): string;
- translationNotFoundIndicatorRight(indicator: string): ITranslateProvider;
- fallbackLanguage(): ITranslateProvider;
- fallbackLanguage(language: string): ITranslateProvider;
- fallbackLanguage(languages: string[]): ITranslateProvider;
- forceAsyncReload(value: boolean): ITranslateProvider;
- use(): string;
- use(key: string): ITranslateProvider;
- storageKey(): string;
- storageKey(key: string): void; // JeroMiya - the library should probably return ITranslateProvider but it doesn't here
- useUrlLoader(url: string): ITranslateProvider;
- useStaticFilesLoader(options: IStaticFilesLoaderOptions): ITranslateProvider;
- useLoader(loaderFactory: string, options?: any): ITranslateProvider;
- useLocalStorage(): ITranslateProvider;
- useCookieStorage(): ITranslateProvider;
- useStorage(storageFactory: any): ITranslateProvider;
- storagePrefix(): string;
- storagePrefix(prefix: string): ITranslateProvider;
- useMissingTranslationHandlerLog(): ITranslateProvider;
- useMissingTranslationHandler(factory: string): ITranslateProvider;
- usePostCompiling(value: boolean): ITranslateProvider;
- directivePriority(): number;
- directivePriority(priority: number): ITranslateProvider;
- determinePreferredLanguage(fn?: () => void): ITranslateProvider;
- registerAvailableLanguageKeys(): string[];
- registerAvailableLanguageKeys(languageKeys: string[], aliases?: ILanguageKeyAlias): ITranslateProvider;
- useLoaderCache(cache?: any): ITranslateProvider;
- }
-}
-
-declare namespace angular {
interface IFilterService {
(name:'translate'): {
(translationId: string, interpolateParams?: any, interpolation?: string): string;
};
}
-}
+}
\ No newline at end of file
diff --git a/angular-ui-bootstrap/index.d.ts b/angular-ui-bootstrap/index.d.ts
index 65dee80e5a..3f740de5a1 100644
--- a/angular-ui-bootstrap/index.d.ts
+++ b/angular-ui-bootstrap/index.d.ts
@@ -5,748 +5,740 @@
///
-// Support for AMD require
-declare module 'angular-bootstrap' {
- let _: string;
- export = _;
-}
-
-declare module 'angular-ui-bootstrap' {
- let _: string;
- export = _;
-}
-
-declare namespace angular.ui.bootstrap {
-
- interface IAccordionConfig {
- /**
- * Controls whether expanding an item will cause the other items to close.
- *
- * @default true
- */
- closeOthers?: boolean;
- }
-
-
- interface IButtonConfig {
- /**
- * @default: 'active'
- */
- activeClass?: string;
-
- /**
- * @default: 'Click'
- */
- toggleEvent?: string;
- }
-
-
- interface IDatepickerConfig {
- /**
- * Format of day in month.
- *
- * @default 'dd'
- */
- formatDay?: string;
-
- /**
- * Format of month in year.
- *
- * @default 'MMM'
- */
- formatMonth?: string;
-
- /**
- * Format of year in year range.
- *
- * @default 'yyyy'
- */
- formatYear?: string;
-
- /**
- * Format of day in week header.
- *
- * @default 'EEE'
- */
- formatDayHeader?: string;
-
- /**
- * Format of title when selecting day.
- *
- * @default 'MMM yyyy'
- */
- formatDayTitle?: string;
-
- /**
- * Format of title when selecting month.
- *
- * @default 'yyyy'
- */
- formatMonthTitle?: string;
-
- /**
- * Current mode of the datepicker (day|month|year). Can be used to initialize datepicker to specific mode.
- *
- * @default 'day'
- */
- datepickerMode?: string;
-
- /**
- * Set a lower limit for mode.
- *
- * @default 'day'
- */
- minMode?: string;
-
- /**
- * Set an upper limit for mode.
- *
- * @default 'year'
- */
- maxMode?: string;
-
- /**
- * Whether to display week numbers.
- *
- * @default true
- */
- showWeeks?: boolean;
-
- /**
- * Starting day of the week from 0-6 where 0=Sunday and 6=Saturday.
- *
- * @default 0
- */
- startingDay?: number;
-
- /**
- * Number of years displayed in year selection.
- *
- * @default 20
- */
- yearRange?: number;
-
- /**
- * Defines the minimum available date.
- *
- * @default null
- */
- minDate?: any;
-
- /**
- * Defines the maximum available date.
- *
- * @default null
- */
- maxDate?: any;
-
- /**
- * An option to disable or enable shortcut's event propagation
- *
- * @default false
- */
- shortcutPropagation?: boolean;
- }
-
- interface IDatepickerPopupConfig {
- /**
- * The format for displayed dates.
- *
- * @default 'yyyy-MM-dd'
- */
- datepickerPopup?: string;
-
- /**
- * Allows overriding of default template of the popup.
- *
- * @default 'template/datepicker/popup.html'
- */
- datepickerPopupTemplateUrl?: string;
-
- /**
- * Allows overriding of default template of the datepicker used in popup.
- *
- * @default 'template/datepicker/popup.html'
- */
- datepickerTemplateUrl?: string;
-
- /**
- * Allows overriding of the default format for html5 date inputs.
- */
- html5Types?: {
- date?: string;
- 'datetime-local'?: string;
- month?: string;
- };
-
- /**
- * The text to display for the current day button.
- *
- * @default 'Today'
- */
- currentText?: string;
-
- /**
- * The text to display for the clear button.
- *
- * @default 'Clear'
- */
- clearText?: string;
-
- /**
- * The text to display for the close button.
- *
- * @default 'Done'
- */
- closeText?: string;
-
- /**
- * Whether to close calendar when a date is chosen.
- *
- * @default true
- */
- closeOnDateSelection?: boolean;
-
- /**
- * Append the datepicker popup element to `body`, rather than inserting after `datepicker-popup`.
- *
- * @default false
- */
- appendToBody?: boolean;
-
- /**
- * Whether to display a button bar underneath the datepicker.
- *
- * @default true
- */
- showButtonBar?: boolean;
-
- /**
- * Whether to focus the datepicker popup upon opening.
- *
- * @default true
- */
- onOpenFocus?: boolean;
- }
-
-
- interface IModalProvider {
- /**
- * Default options all modals will use.
- */
- options: IModalSettings;
- }
-
- interface IModalService {
- /**
- * @param {IModalSettings} options
- * @returns {IModalServiceInstance}
- */
- open(options: IModalSettings): IModalServiceInstance;
- }
-
- interface IModalServiceInstance {
- /**
- * A method that can be used to close a modal, passing a result. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
- */
- close(result?: any): void;
-
- /**
- * A method that can be used to dismiss a modal, passing a reason. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
- */
- dismiss(reason?: any): void;
-
- /**
- * A promise that is resolved when a modal is closed and rejected when a modal is dismissed.
- */
- result: angular.IPromise;
-
- /**
- * A promise that is resolved when a modal gets opened after downloading content's template and resolving all variables.
- */
- opened: angular.IPromise;
-
- /**
- * A promise that is resolved when a modal is rendered.
- */
- rendered: angular.IPromise;
- }
-
- interface IModalScope extends angular.IScope {
- /**
- * Dismiss the dialog without assigning a value to the promise output. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
- *
- * @returns true if the modal was closed; otherwise false
- */
- $dismiss(reason?: any): boolean;
-
- /**
- * Close the dialog resolving the promise to the given value. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
- *
- * @returns true if the modal was closed; otherwise false
- */
- $close(result?: any): boolean;
- }
-
- interface IModalSettings {
- /**
- * a path to a template representing modal's content
- */
- templateUrl?: string | (() => string);
-
- /**
- * inline template representing the modal's content
- */
- template?: string;
-
- /**
- * a scope instance to be used for the modal's content (actually the $modal service is going to create a child scope of a provided scope).
- * Defaults to `$rootScope`.
- */
- scope?: angular.IScope|IModalScope;
-
- /**
- * a controller for a modal instance - it can initialize scope used by modal.
- * A controller can be injected with `$modalInstance`
- * If value is an array, it must be in Inline Array Annotation format for injection (strings followed by factory method)
- */
- controller?: string | Function | Array;
-
- /**
- * an alternative to the controller-as syntax, matching the API of directive definitions.
- * Requires the controller option to be provided as well
- */
- controllerAs?: string;
-
- /**
- * When used with controllerAs and set to true, it will bind the controller properties onto the $scope directly.
- *
- * @default false
- */
- bindToController?: boolean;
-
- /**
- * members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
- * If property value is an array, it must be in Inline Array Annotation format for injection (strings followed by factory method)
- */
- resolve?: { [ key: string ]: string | Function | Array | Object };
-
- /**
- * Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
- *
- * @default true
- */
- animation?: boolean;
-
- /**
- * controls the presence of a backdrop
- * Allowed values:
- * - true (default)
- * - false (no backdrop)
- * - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window
- *
- * @default true
- */
- backdrop?: boolean | string;
-
- /**
- * indicates whether the dialog should be closable by hitting the ESC key
- *
- * @default true
- */
- keyboard?: boolean;
-
- /**
- * additional CSS class(es) to be added to a modal backdrop template
- */
- backdropClass?: string;
-
- /**
- * additional CSS class(es) to be added to a modal window template
- */
- windowClass?: string;
-
- /**
- * Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`.
- */
- size?: string;
-
- /**
- * a path to a template overriding modal's window template
- */
- windowTemplateUrl?: string;
-
- /**
- * The class added to the body element when the modal is opened.
- *
- * @default 'model-open'
- */
- openedClass?: string;
- }
-
- interface IModalStackService {
- /**
- * Opens a new modal instance.
- */
- open(modalInstance: IModalServiceInstance, modal: any): void;
-
- /**
- * Closes a modal instance with an optional result.
- */
- close(modalInstance: IModalServiceInstance, result?: any): void;
-
- /**
- * Dismisses a modal instance with an optional reason.
- */
- dismiss(modalInstance: IModalServiceInstance, reason?: any): void;
-
- /**
- * Dismiss all open modal instances with an optional reason that will be passed to each instance.
- */
- dismissAll(reason?: any): void;
-
- /**
- * Gets the topmost modal instance that is open.
- */
- getTop(): IModalStackedMapKeyValuePair;
- }
-
- interface IModalStackedMapKeyValuePair {
- key: IModalServiceInstance;
- value: any;
- }
-
-
- interface IPaginationConfig {
- /**
- * Total number of items in all pages.
- */
- totalItems?: number;
-
- /**
- * Maximum number of items per page. A value less than one indicates all items on one page.
- *
- * @default 10
- */
- itemsPerPage?: number;
-
- /**
- * Limit number for pagination size.
- *
- * @default: null
- */
- maxSize?: number;
-
- /**
- * An optional expression assigned the total number of pages to display.
- *
- * @default angular.noop
- */
- numPages?: number;
-
- /**
- * Whether to keep current page in the middle of the visible ones.
- *
- * @default true
- */
- rotate?: boolean;
-
- /**
- * Whether to display Previous / Next buttons.
- *
- * @default true
- */
- directionLinks?: boolean;
-
- /**
- * Text for Previous button.
- *
- * @default 'Previous'
- */
- previousText?: string;
-
- /**
- * Text for Next button.
- *
- * @default 'Next'
- */
- nextText?: string;
-
- /**
- * Whether to display First / Last buttons.
- *
- * @default false
- */
- boundaryLinks?: boolean;
-
- /**
- * Text for First button.
- *
- * @default 'First'
- */
- firstText?: string;
-
- /**
- * Text for Last button.
- *
- * @default 'Last'
- */
- lastText?: string;
-
- /**
- * Override the template for the component with a custom provided template.
- *
- * @default 'template/pagination/pagination.html'
- */
- templateUrl?: string;
- }
-
- interface IPagerConfig {
- /**
- * Whether to align each link to the sides.
- *
- * @default true
- */
- align?: boolean;
-
- /**
- * Maximum number of items per page. A value less than one indicates all items on one page.
- *
- * @default 10
- */
- itemsPerPage?: number;
-
- /**
- * Text for Previous button.
- *
- * @default '« Previous'
- */
- previousText?: string;
-
- /**
- * Text for Next button.
- *
- * @default 'Next »'
- */
- nextText?: string;
- }
-
-
- interface IPositionCoordinates {
- width?: number;
- height?: number;
- top?: number;
- left?: number;
- }
-
- interface IPositionService {
- /**
- * Provides a read-only equivalent of jQuery's position function.
- */
- position(element: JQuery): IPositionCoordinates;
-
- /**
- * Provides a read-only equivalent of jQuery's offset function.
- */
- offset(element: JQuery): IPositionCoordinates;
- }
-
-
- interface IProgressConfig {
- /**
- * Whether bars use transitions to achieve the width change.
- *
- * @default: true
- */
- animate?: boolean;
-
- /**
- * A number that specifies the total value of bars that is required.
- *
- * @default: 100
- */
- max?: number;
- }
-
-
- interface IRatingConfig {
- /**
- * Changes the number of icons.
- *
- * @default: 5
- */
- max?: number;
-
- /**
- * A variable used in the template to specify the state for selected icons.
- *
- * @default: null
- */
- stateOn?: string;
-
- /**
- * A variable used in the template to specify the state for unselected icons.
- *
- * @default: null
- */
- stateOff?: string;
-
- /**
- * An array of strings defining titles for all icons.
- *
- * @default: ["one", "two", "three", "four", "five"]
- */
- titles?: Array;
- }
-
-
- interface ITimepickerConfig {
- /**
- * Number of hours to increase or decrease when using a button.
- *
- * @default 1
- */
- hourStep?: number;
-
- /**
- * Number of minutes to increase or decrease when using a button.
- *
- * @default 1
- */
- minuteStep?: number;
-
- /**
- * Whether to display 12H or 24H mode.
- *
- * @default true
- */
- showMeridian?: boolean;
-
- /**
- * Meridian labels based on locale. To override you must supply an array like ['AM', 'PM'].
- *
- * @default null
- */
- meridians?: Array;
-
- /**
- * Whether the user can type inside the hours & minutes input.
- *
- * @default false
- */
- readonlyInput?: boolean;
-
- /**
- * Whether the user can scroll inside the hours & minutes input to increase or decrease it's values.
- *
- * @default true
- */
- mousewheel?: boolean;
-
- /**
- * Whether the user can use up/down arrowkeys inside the hours & minutes input to increase or decrease it's values.
- *
- * @default true
- */
- arrowkeys?: boolean;
-
- /**
- * Shows spinner arrows above and below the inputs.
- *
- * @default true
- */
- showSpinners?: boolean;
- }
-
-
- interface ITooltipOptions {
- /**
- * Where to place it? Defaults to 'top', but also accepts 'right', 'bottom', or 'left'.
- *
- * @default 'top'
- */
- placement?: string;
-
- /**
- * Should the modal fade in and out?
- *
- * @default true
- */
- animation?: boolean;
-
- /**
- * For how long should the user have to have the mouse over the element before the tooltip shows (in milliseconds)?
- *
- * @default 0
- */
- popupDelay?: number;
-
- /**
- * Should the tooltip be appended to `$body` instead of the parent element?
- *
- * @default false
- */
- appendToBody?: boolean;
-
- /**
- * What should trigger a show of the tooltip? Supports a space separated list of event names.
- *
- * @default 'mouseenter' for tooltip, 'click' for popover
- */
- trigger?: string;
-
- /**
- * Should an expression on the scope be used to load the content?
- *
- * @default false
- */
- useContentExp?: boolean;
- }
-
- interface ITooltipProvider {
- /**
- * Provide a set of defaults for certain tooltip and popover attributes.
- */
- options(value: ITooltipOptions): void;
-
- /**
- * Extends the default trigger mappings with mappings of your own. E.g. `{ 'openTrigger': 'closeTrigger' }`.
- */
- setTriggers(triggers: Object): void;
- }
-
-
- /**
- * WARNING: $transition is now deprecated. Use $animate from ngAnimate instead.
- */
- interface ITransitionService {
- /**
- * The browser specific animation event name.
- */
- animationEndEventName: string;
-
- /**
- * The browser specific transition event name.
- */
- transitionEndEventName: string;
-
- /**
- * Provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
- *
- * @param element The DOMElement that will be animated
- * @param trigger The thing that will cause the transition to start:
- * - As a string, it represents the css class to be added to the element.
- * - As an object, it represents a hash of style attributes to be applied to the element.
- * - As a function, it represents a function to be called that will cause the transition to occur.
- * @param options Optional settings for the transition.
- *
- * @return A promise that is resolved when the transition finishes.
- */
- (element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise;
- }
-
- interface ITransitionServiceOptions {
- animation?: boolean;
- }
-
+import * as angular from 'angularjs';
+
+declare module 'angularjs' {
+ export namespace ui.bootstrap {
+
+ interface IAccordionConfig {
+ /**
+ * Controls whether expanding an item will cause the other items to close.
+ *
+ * @default true
+ */
+ closeOthers?: boolean;
+ }
+
+
+ interface IButtonConfig {
+ /**
+ * @default: 'active'
+ */
+ activeClass?: string;
+
+ /**
+ * @default: 'Click'
+ */
+ toggleEvent?: string;
+ }
+
+
+ interface IDatepickerConfig {
+ /**
+ * Format of day in month.
+ *
+ * @default 'dd'
+ */
+ formatDay?: string;
+
+ /**
+ * Format of month in year.
+ *
+ * @default 'MMM'
+ */
+ formatMonth?: string;
+
+ /**
+ * Format of year in year range.
+ *
+ * @default 'yyyy'
+ */
+ formatYear?: string;
+
+ /**
+ * Format of day in week header.
+ *
+ * @default 'EEE'
+ */
+ formatDayHeader?: string;
+
+ /**
+ * Format of title when selecting day.
+ *
+ * @default 'MMM yyyy'
+ */
+ formatDayTitle?: string;
+
+ /**
+ * Format of title when selecting month.
+ *
+ * @default 'yyyy'
+ */
+ formatMonthTitle?: string;
+
+ /**
+ * Current mode of the datepicker (day|month|year). Can be used to initialize datepicker to specific mode.
+ *
+ * @default 'day'
+ */
+ datepickerMode?: string;
+
+ /**
+ * Set a lower limit for mode.
+ *
+ * @default 'day'
+ */
+ minMode?: string;
+
+ /**
+ * Set an upper limit for mode.
+ *
+ * @default 'year'
+ */
+ maxMode?: string;
+
+ /**
+ * Whether to display week numbers.
+ *
+ * @default true
+ */
+ showWeeks?: boolean;
+
+ /**
+ * Starting day of the week from 0-6 where 0=Sunday and 6=Saturday.
+ *
+ * @default 0
+ */
+ startingDay?: number;
+
+ /**
+ * Number of years displayed in year selection.
+ *
+ * @default 20
+ */
+ yearRange?: number;
+
+ /**
+ * Defines the minimum available date.
+ *
+ * @default null
+ */
+ minDate?: any;
+
+ /**
+ * Defines the maximum available date.
+ *
+ * @default null
+ */
+ maxDate?: any;
+
+ /**
+ * An option to disable or enable shortcut's event propagation
+ *
+ * @default false
+ */
+ shortcutPropagation?: boolean;
+ }
+
+ interface IDatepickerPopupConfig {
+ /**
+ * The format for displayed dates.
+ *
+ * @default 'yyyy-MM-dd'
+ */
+ datepickerPopup?: string;
+
+ /**
+ * Allows overriding of default template of the popup.
+ *
+ * @default 'template/datepicker/popup.html'
+ */
+ datepickerPopupTemplateUrl?: string;
+
+ /**
+ * Allows overriding of default template of the datepicker used in popup.
+ *
+ * @default 'template/datepicker/popup.html'
+ */
+ datepickerTemplateUrl?: string;
+
+ /**
+ * Allows overriding of the default format for html5 date inputs.
+ */
+ html5Types?: {
+ date?: string;
+ 'datetime-local'?: string;
+ month?: string;
+ };
+
+ /**
+ * The text to display for the current day button.
+ *
+ * @default 'Today'
+ */
+ currentText?: string;
+
+ /**
+ * The text to display for the clear button.
+ *
+ * @default 'Clear'
+ */
+ clearText?: string;
+
+ /**
+ * The text to display for the close button.
+ *
+ * @default 'Done'
+ */
+ closeText?: string;
+
+ /**
+ * Whether to close calendar when a date is chosen.
+ *
+ * @default true
+ */
+ closeOnDateSelection?: boolean;
+
+ /**
+ * Append the datepicker popup element to `body`, rather than inserting after `datepicker-popup`.
+ *
+ * @default false
+ */
+ appendToBody?: boolean;
+
+ /**
+ * Whether to display a button bar underneath the datepicker.
+ *
+ * @default true
+ */
+ showButtonBar?: boolean;
+
+ /**
+ * Whether to focus the datepicker popup upon opening.
+ *
+ * @default true
+ */
+ onOpenFocus?: boolean;
+ }
+
+
+ interface IModalProvider {
+ /**
+ * Default options all modals will use.
+ */
+ options: IModalSettings;
+ }
+
+ interface IModalService {
+ /**
+ * @param {IModalSettings} options
+ * @returns {IModalServiceInstance}
+ */
+ open(options: IModalSettings): IModalServiceInstance;
+ }
+
+ interface IModalServiceInstance {
+ /**
+ * A method that can be used to close a modal, passing a result. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
+ */
+ close(result?: any): void;
+
+ /**
+ * A method that can be used to dismiss a modal, passing a reason. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
+ */
+ dismiss(reason?: any): void;
+
+ /**
+ * A promise that is resolved when a modal is closed and rejected when a modal is dismissed.
+ */
+ result: angular.IPromise;
+
+ /**
+ * A promise that is resolved when a modal gets opened after downloading content's template and resolving all variables.
+ */
+ opened: angular.IPromise;
+
+ /**
+ * A promise that is resolved when a modal is rendered.
+ */
+ rendered: angular.IPromise;
+ }
+
+ interface IModalScope extends angular.IScope {
+ /**
+ * Dismiss the dialog without assigning a value to the promise output. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
+ *
+ * @returns true if the modal was closed; otherwise false
+ */
+ $dismiss(reason?: any): boolean;
+
+ /**
+ * Close the dialog resolving the promise to the given value. If `preventDefault` is called on the `modal.closing` event then the modal will remain open.
+ *
+ * @returns true if the modal was closed; otherwise false
+ */
+ $close(result?: any): boolean;
+ }
+
+ interface IModalSettings {
+ /**
+ * a path to a template representing modal's content
+ */
+ templateUrl?: string | (() => string);
+
+ /**
+ * inline template representing the modal's content
+ */
+ template?: string;
+
+ /**
+ * a scope instance to be used for the modal's content (actually the $modal service is going to create a child scope of a provided scope).
+ * Defaults to `$rootScope`.
+ */
+ scope?: angular.IScope | IModalScope;
+
+ /**
+ * a controller for a modal instance - it can initialize scope used by modal.
+ * A controller can be injected with `$modalInstance`
+ * If value is an array, it must be in Inline Array Annotation format for injection (strings followed by factory method)
+ */
+ controller?: string | Function | Array;
+
+ /**
+ * an alternative to the controller-as syntax, matching the API of directive definitions.
+ * Requires the controller option to be provided as well
+ */
+ controllerAs?: string;
+
+ /**
+ * When used with controllerAs and set to true, it will bind the controller properties onto the $scope directly.
+ *
+ * @default false
+ */
+ bindToController?: boolean;
+
+ /**
+ * members that will be resolved and passed to the controller as locals; it is equivalent of the `resolve` property for AngularJS routes
+ * If property value is an array, it must be in Inline Array Annotation format for injection (strings followed by factory method)
+ */
+ resolve?: { [key: string]: string | Function | Array | Object };
+
+ /**
+ * Set to false to disable animations on new modal/backdrop. Does not toggle animations for modals/backdrops that are already displayed.
+ *
+ * @default true
+ */
+ animation?: boolean;
+
+ /**
+ * controls the presence of a backdrop
+ * Allowed values:
+ * - true (default)
+ * - false (no backdrop)
+ * - 'static' backdrop is present but modal window is not closed when clicking outside of the modal window
+ *
+ * @default true
+ */
+ backdrop?: boolean | string;
+
+ /**
+ * indicates whether the dialog should be closable by hitting the ESC key
+ *
+ * @default true
+ */
+ keyboard?: boolean;
+
+ /**
+ * additional CSS class(es) to be added to a modal backdrop template
+ */
+ backdropClass?: string;
+
+ /**
+ * additional CSS class(es) to be added to a modal window template
+ */
+ windowClass?: string;
+
+ /**
+ * Optional suffix of modal window class. The value used is appended to the `modal-` class, i.e. a value of `sm` gives `modal-sm`.
+ */
+ size?: string;
+
+ /**
+ * a path to a template overriding modal's window template
+ */
+ windowTemplateUrl?: string;
+
+ /**
+ * The class added to the body element when the modal is opened.
+ *
+ * @default 'model-open'
+ */
+ openedClass?: string;
+ }
+
+ interface IModalStackService {
+ /**
+ * Opens a new modal instance.
+ */
+ open(modalInstance: IModalServiceInstance, modal: any): void;
+
+ /**
+ * Closes a modal instance with an optional result.
+ */
+ close(modalInstance: IModalServiceInstance, result?: any): void;
+
+ /**
+ * Dismisses a modal instance with an optional reason.
+ */
+ dismiss(modalInstance: IModalServiceInstance, reason?: any): void;
+
+ /**
+ * Dismiss all open modal instances with an optional reason that will be passed to each instance.
+ */
+ dismissAll(reason?: any): void;
+
+ /**
+ * Gets the topmost modal instance that is open.
+ */
+ getTop(): IModalStackedMapKeyValuePair;
+ }
+
+ interface IModalStackedMapKeyValuePair {
+ key: IModalServiceInstance;
+ value: any;
+ }
+
+
+ interface IPaginationConfig {
+ /**
+ * Total number of items in all pages.
+ */
+ totalItems?: number;
+
+ /**
+ * Maximum number of items per page. A value less than one indicates all items on one page.
+ *
+ * @default 10
+ */
+ itemsPerPage?: number;
+
+ /**
+ * Limit number for pagination size.
+ *
+ * @default: null
+ */
+ maxSize?: number;
+
+ /**
+ * An optional expression assigned the total number of pages to display.
+ *
+ * @default angular.noop
+ */
+ numPages?: number;
+
+ /**
+ * Whether to keep current page in the middle of the visible ones.
+ *
+ * @default true
+ */
+ rotate?: boolean;
+
+ /**
+ * Whether to display Previous / Next buttons.
+ *
+ * @default true
+ */
+ directionLinks?: boolean;
+
+ /**
+ * Text for Previous button.
+ *
+ * @default 'Previous'
+ */
+ previousText?: string;
+
+ /**
+ * Text for Next button.
+ *
+ * @default 'Next'
+ */
+ nextText?: string;
+
+ /**
+ * Whether to display First / Last buttons.
+ *
+ * @default false
+ */
+ boundaryLinks?: boolean;
+
+ /**
+ * Text for First button.
+ *
+ * @default 'First'
+ */
+ firstText?: string;
+
+ /**
+ * Text for Last button.
+ *
+ * @default 'Last'
+ */
+ lastText?: string;
+
+ /**
+ * Override the template for the component with a custom provided template.
+ *
+ * @default 'template/pagination/pagination.html'
+ */
+ templateUrl?: string;
+ }
+
+ interface IPagerConfig {
+ /**
+ * Whether to align each link to the sides.
+ *
+ * @default true
+ */
+ align?: boolean;
+
+ /**
+ * Maximum number of items per page. A value less than one indicates all items on one page.
+ *
+ * @default 10
+ */
+ itemsPerPage?: number;
+
+ /**
+ * Text for Previous button.
+ *
+ * @default '« Previous'
+ */
+ previousText?: string;
+
+ /**
+ * Text for Next button.
+ *
+ * @default 'Next »'
+ */
+ nextText?: string;
+ }
+
+
+ interface IPositionCoordinates {
+ width?: number;
+ height?: number;
+ top?: number;
+ left?: number;
+ }
+
+ interface IPositionService {
+ /**
+ * Provides a read-only equivalent of jQuery's position function.
+ */
+ position(element: JQuery): IPositionCoordinates;
+
+ /**
+ * Provides a read-only equivalent of jQuery's offset function.
+ */
+ offset(element: JQuery): IPositionCoordinates;
+ }
+
+
+ interface IProgressConfig {
+ /**
+ * Whether bars use transitions to achieve the width change.
+ *
+ * @default: true
+ */
+ animate?: boolean;
+
+ /**
+ * A number that specifies the total value of bars that is required.
+ *
+ * @default: 100
+ */
+ max?: number;
+ }
+
+
+ interface IRatingConfig {
+ /**
+ * Changes the number of icons.
+ *
+ * @default: 5
+ */
+ max?: number;
+
+ /**
+ * A variable used in the template to specify the state for selected icons.
+ *
+ * @default: null
+ */
+ stateOn?: string;
+
+ /**
+ * A variable used in the template to specify the state for unselected icons.
+ *
+ * @default: null
+ */
+ stateOff?: string;
+
+ /**
+ * An array of strings defining titles for all icons.
+ *
+ * @default: ["one", "two", "three", "four", "five"]
+ */
+ titles?: Array;
+ }
+
+
+ interface ITimepickerConfig {
+ /**
+ * Number of hours to increase or decrease when using a button.
+ *
+ * @default 1
+ */
+ hourStep?: number;
+
+ /**
+ * Number of minutes to increase or decrease when using a button.
+ *
+ * @default 1
+ */
+ minuteStep?: number;
+
+ /**
+ * Whether to display 12H or 24H mode.
+ *
+ * @default true
+ */
+ showMeridian?: boolean;
+
+ /**
+ * Meridian labels based on locale. To override you must supply an array like ['AM', 'PM'].
+ *
+ * @default null
+ */
+ meridians?: Array;
+
+ /**
+ * Whether the user can type inside the hours & minutes input.
+ *
+ * @default false
+ */
+ readonlyInput?: boolean;
+
+ /**
+ * Whether the user can scroll inside the hours & minutes input to increase or decrease it's values.
+ *
+ * @default true
+ */
+ mousewheel?: boolean;
+
+ /**
+ * Whether the user can use up/down arrowkeys inside the hours & minutes input to increase or decrease it's values.
+ *
+ * @default true
+ */
+ arrowkeys?: boolean;
+
+ /**
+ * Shows spinner arrows above and below the inputs.
+ *
+ * @default true
+ */
+ showSpinners?: boolean;
+ }
+
+
+ interface ITooltipOptions {
+ /**
+ * Where to place it? Defaults to 'top', but also accepts 'right', 'bottom', or 'left'.
+ *
+ * @default 'top'
+ */
+ placement?: string;
+
+ /**
+ * Should the modal fade in and out?
+ *
+ * @default true
+ */
+ animation?: boolean;
+
+ /**
+ * For how long should the user have to have the mouse over the element before the tooltip shows (in milliseconds)?
+ *
+ * @default 0
+ */
+ popupDelay?: number;
+
+ /**
+ * Should the tooltip be appended to `$body` instead of the parent element?
+ *
+ * @default false
+ */
+ appendToBody?: boolean;
+
+ /**
+ * What should trigger a show of the tooltip? Supports a space separated list of event names.
+ *
+ * @default 'mouseenter' for tooltip, 'click' for popover
+ */
+ trigger?: string;
+
+ /**
+ * Should an expression on the scope be used to load the content?
+ *
+ * @default false
+ */
+ useContentExp?: boolean;
+ }
+
+ interface ITooltipProvider {
+ /**
+ * Provide a set of defaults for certain tooltip and popover attributes.
+ */
+ options(value: ITooltipOptions): void;
+
+ /**
+ * Extends the default trigger mappings with mappings of your own. E.g. `{ 'openTrigger': 'closeTrigger' }`.
+ */
+ setTriggers(triggers: Object): void;
+ }
+
+
+ /**
+ * WARNING: $transition is now deprecated. Use $animate from ngAnimate instead.
+ */
+ interface ITransitionService {
+ /**
+ * The browser specific animation event name.
+ */
+ animationEndEventName: string;
+
+ /**
+ * The browser specific transition event name.
+ */
+ transitionEndEventName: string;
+
+ /**
+ * Provides a consistent interface to trigger CSS 3 transitions and to be informed when they complete.
+ *
+ * @param element The DOMElement that will be animated
+ * @param trigger The thing that will cause the transition to start:
+ * - As a string, it represents the css class to be added to the element.
+ * - As an object, it represents a hash of style attributes to be applied to the element.
+ * - As a function, it represents a function to be called that will cause the transition to occur.
+ * @param options Optional settings for the transition.
+ *
+ * @return A promise that is resolved when the transition finishes.
+ */
+ (element: angular.IAugmentedJQuery, trigger: any, options?: ITransitionServiceOptions): angular.IPromise;
+ }
+
+ interface ITransitionServiceOptions {
+ animation?: boolean;
+ }
+ }
}
diff --git a/angular-ui-scroll/index.d.ts b/angular-ui-scroll/index.d.ts
index e8a04c4eeb..ddeca0c20b 100644
--- a/angular-ui-scroll/index.d.ts
+++ b/angular-ui-scroll/index.d.ts
@@ -5,81 +5,85 @@
///
-declare namespace angular.ui {
- interface IScrollDatasource {
- /**
- * The datasource object implements methods and properties to be used by the directive to access the data
- *
- * @param index indicates the first data row requested
- *
- * @param count indicates number of data rows requested
- *
- * @param success function to call when the data are retrieved. The implementation of the service has to call
- * this function when the data are retrieved and pass it an array of the items retrieved. If no items are
- * retrieved, an empty array has to be passed.
- *
- * Important: Make sure to respect the index and count parameters of the request. The array passed to the
- * success method should have exactly count elements unless it hit eof/bof
- */
- get(index: number, count: number, success: (results: Array) => any): void;
- }
+import * as angular from 'angularjs';
- interface IScrollAdapter {
- /**
- * a boolean value indicating whether there are any pending load requests.
- */
- isLoading: boolean;
- /**
- * a reference to the item currently in the topmost visible position.
- */
- topVisible: any;
- /**
- * a reference to the DOM element currently in the topmost visible position.
- */
- topVisibleElement: ng.IAugmentedJQueryStatic;
- /**
- * a reference to the scope created for the item currently in the topmost visible position.
- */
- topVisibleScope: ng.IRepeatScope;
- /**
- * calling this method reinitializes and reloads the scroller content.
- */
- reload(): void;
- /**
- * Replaces the item in the buffer at the given index with the new items.
- *
- * @param index provides position of the item to be affected in the dataset (not in the buffer). If the item with
- * the given index currently is not in the buffer no updates will be applied. $index property of the item $scope
- * can be used to access the index value for a given item
- *
- * @param newItems is an array of items to replace the affected item. If the array is empty ([]) the item will
- * be deleted, otherwise the items in the array replace the item. If the newItem array contains the old item,
- * the old item stays in place.
- */
- applyUpdates(index: number, newItems: any[]): void;
- /**
- * Replaces the item in the buffer at the given index with the new items.
- *
- * @param updater is a function to be applied to every item currently in the buffer. The function will receive
- * 3 parameters: item, scope, and element. Here item is the item to be affected, scope is the item $scope, and
- * element is the html element for the item. The return value of the function should be an array of items.
- * Similarly to the newItem parameter (see above), if the array is empty([]), the item is deleted, otherwise
- * the item is replaced by the items in the array. If the return value is not an array, the item remains
- * unaffected, unless some updates were made to the item in the updater function. This can be thought of as
- * in place update.
- */
- applyUpdates(updater: (item: any, scope: ng.IRepeatScope) => any): void;
- /**
- * Adds new items after the last item in the buffer
- *
- * @param newItems provides an array of items to be appended.
- */
- append(newItems: any[]): void;
- /**
- * Adds new items before the first item in the buffer
- *
- * @param newItems provides an array of items to be prepended.
- */
- prepend(newItems: any[]): void;
+declare module 'angularjs' {
+ export namespace ui {
+ interface IScrollDatasource {
+ /**
+ * The datasource object implements methods and properties to be used by the directive to access the data
+ *
+ * @param index indicates the first data row requested
+ *
+ * @param count indicates number of data rows requested
+ *
+ * @param success function to call when the data are retrieved. The implementation of the service has to call
+ * this function when the data are retrieved and pass it an array of the items retrieved. If no items are
+ * retrieved, an empty array has to be passed.
+ *
+ * Important: Make sure to respect the index and count parameters of the request. The array passed to the
+ * success method should have exactly count elements unless it hit eof/bof
+ */
+ get(index: number, count: number, success: (results: Array) => any): void;
+ }
+
+ interface IScrollAdapter {
+ /**
+ * a boolean value indicating whether there are any pending load requests.
+ */
+ isLoading: boolean;
+ /**
+ * a reference to the item currently in the topmost visible position.
+ */
+ topVisible: any;
+ /**
+ * a reference to the DOM element currently in the topmost visible position.
+ */
+ topVisibleElement: ng.IAugmentedJQueryStatic;
+ /**
+ * a reference to the scope created for the item currently in the topmost visible position.
+ */
+ topVisibleScope: ng.IRepeatScope;
+ /**
+ * calling this method reinitializes and reloads the scroller content.
+ */
+ reload(): void;
+ /**
+ * Replaces the item in the buffer at the given index with the new items.
+ *
+ * @param index provides position of the item to be affected in the dataset (not in the buffer). If the item with
+ * the given index currently is not in the buffer no updates will be applied. $index property of the item $scope
+ * can be used to access the index value for a given item
+ *
+ * @param newItems is an array of items to replace the affected item. If the array is empty ([]) the item will
+ * be deleted, otherwise the items in the array replace the item. If the newItem array contains the old item,
+ * the old item stays in place.
+ */
+ applyUpdates(index: number, newItems: any[]): void;
+ /**
+ * Replaces the item in the buffer at the given index with the new items.
+ *
+ * @param updater is a function to be applied to every item currently in the buffer. The function will receive
+ * 3 parameters: item, scope, and element. Here item is the item to be affected, scope is the item $scope, and
+ * element is the html element for the item. The return value of the function should be an array of items.
+ * Similarly to the newItem parameter (see above), if the array is empty([]), the item is deleted, otherwise
+ * the item is replaced by the items in the array. If the return value is not an array, the item remains
+ * unaffected, unless some updates were made to the item in the updater function. This can be thought of as
+ * in place update.
+ */
+ applyUpdates(updater: (item: any, scope: ng.IRepeatScope) => any): void;
+ /**
+ * Adds new items after the last item in the buffer
+ *
+ * @param newItems provides an array of items to be appended.
+ */
+ append(newItems: any[]): void;
+ /**
+ * Adds new items before the first item in the buffer
+ *
+ * @param newItems provides an array of items to be prepended.
+ */
+ prepend(newItems: any[]): void;
+ }
}
}
diff --git a/angular-ui-sortable/index.d.ts b/angular-ui-sortable/index.d.ts
index 1b3508143d..ce1cebe57f 100644
--- a/angular-ui-sortable/index.d.ts
+++ b/angular-ui-sortable/index.d.ts
@@ -5,206 +5,209 @@
///
-declare namespace angular.ui {
+import * as angular from 'angularjs';
- interface UISortableOptions extends SortableOptions {
- 'ui-floating'?: string|boolean;
+declare module 'angularjs' {
+ export namespace ui {
+
+ interface UISortableOptions extends SortableOptions {
+ 'ui-floating'?: string | boolean;
+ }
+
+ interface UISortableProperties {
+ /**
+ * Holds the index of the drop target that the dragged item was dropped.
+ */
+ dropindex: number;
+
+ /**
+ * Holds the ui-sortable element that the dragged item was dropped on.
+ */
+ droptarget: number;
+
+ /**
+ * Holds the array that is specified by the `ng-model` attribute of the [`droptarget`](#droptarget) ui-sortable element.
+ */
+ droptargetModel: Array;
+
+ /**
+ * Holds the original index of the item dragged.
+ */
+ index: number;
+
+ /**
+ * Holds the JavaScript object that is used as the model of the dragged item, as specified by the ng-repeat of the [`source`](#source) ui-sortable element and the item's [`index`](#index).
+ */
+ model: T;
+
+ /**
+ * Holds the model of the dragged item only when a sorting happens between two connected ui-sortable elements.
+ * In other words: `'moved' in ui.item.sortable` will return false only when a sorting is withing the same ui-sortable element ([`source`](#source) equals to the [`droptarget`](#droptarget)).
+ */
+ moved?: T;
+
+ /**
+ * When sorting between two connected sortables, it will be set to true inside the `update` callback of the [`droptarget`](#droptarget).
+ */
+ received: Boolean;
+
+ /**
+ * Holds the ui-sortable element that the dragged item originated from.
+ */
+ source: ng.IAugmentedJQuery
+
+ /**
+ * Holds the array that is specified by the `ng-model` of the [`source`](#source) ui-sortable element.
+ */
+ sourceModel: Array