Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/ng-dialog

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/ng-dialog - npm Package Compare versions

Comparing version 0.3.21-alpha to 0.3.22-alpha

416

index.d.ts

@@ -8,251 +8,253 @@ // Type definitions for ngDialog

declare module "ng-dialog" {
export type IDialogService = angular.dialog.IDialogService;
export type IDialogOpenResult = angular.dialog.IDialogOpenResult;
export type IDialogClosePromise = angular.dialog.IDialogClosePromise;
export type IDialogProvider = angular.dialog.IDialogProvider;
export type IDialogScope = angular.dialog.IDialogScope;
export type IDialogConfirmScope = angular.dialog.IDialogConfirmScope;
export type IDialogOptions = angular.dialog.IDialogOptions;
export type IDialogOpenOptions = angular.dialog.IDialogOpenOptions;
export type IDialogOpenConfirmOptions = angular.dialog.IDialogOpenConfirmOptions;
}
import * as angular from 'angularjs';
declare namespace angular.dialog {
export type IDialogService = angular.dialog.IDialogService;
export type IDialogOpenResult = angular.dialog.IDialogOpenResult;
export type IDialogClosePromise = angular.dialog.IDialogClosePromise;
export type IDialogProvider = angular.dialog.IDialogProvider;
export type IDialogScope = angular.dialog.IDialogScope;
export type IDialogConfirmScope = angular.dialog.IDialogConfirmScope;
export type IDialogOptions = angular.dialog.IDialogOptions;
export type IDialogOpenOptions = angular.dialog.IDialogOpenOptions;
export type IDialogOpenConfirmOptions = angular.dialog.IDialogOpenConfirmOptions;
interface IDialogService {
getDefaults(): IDialogOptions;
open(options: IDialogOpenOptions): IDialogOpenResult;
openConfirm(options: IDialogOpenConfirmOptions): IPromise<any>;
declare module 'angularjs' {
export namespace dialog {
/**
* Determine whether the specified dialog is open or not.
* @param id Dialog id to check for.
* @returns {boolean} Indicating whether it exists or not.
*/
isOpen(id: string): boolean;
close(id: string, value?: any): void;
closeAll(value?: any): void;
getOpenDialogs(): string[];
}
interface IDialogService {
getDefaults(): IDialogOptions;
open(options: IDialogOpenOptions): IDialogOpenResult;
openConfirm(options: IDialogOpenConfirmOptions): IPromise<any>;
interface IDialogOpenResult {
id: string;
close: (value?: any) => void;
closePromise: IPromise<IDialogClosePromise>;
}
/**
* Determine whether the specified dialog is open or not.
* @param id Dialog id to check for.
* @returns {boolean} Indicating whether it exists or not.
*/
isOpen(id: string): boolean;
close(id: string, value?: any): void;
closeAll(value?: any): void;
getOpenDialogs(): string[];
}
interface IDialogClosePromise {
id: string;
value: any;
}
interface IDialogOpenResult {
id: string;
close: (value?: any) => void;
closePromise: IPromise<IDialogClosePromise>;
}
interface IDialogProvider extends angular.IServiceProvider {
/**
* Default options for the dialogs.
* @param defaultOptions
* @returns {}
*/
setDefaults(defaultOptions: IDialogOptions): void;
interface IDialogClosePromise {
id: string;
value: any;
}
/**
* Adds an additional listener on every $locationChangeSuccess event and gets update version of html into dialog.
* May be useful in some rare cases when you're dependant on DOM changes, defaults to false.
* @param {boolean} force
*/
setForceHtmlReload(force: boolean) : void;
interface IDialogProvider extends angular.IServiceProvider {
/**
* Default options for the dialogs.
* @param defaultOptions
* @returns {}
*/
setDefaults(defaultOptions: IDialogOptions): void;
/**
* Adds additional listener on every $locationChangeSuccess event and gets updated version of body into dialog.
* Maybe useful in some rare cases when you're dependant on DOM changes, defaults to false. Use it in module's
* config as provider instance:
* @param {boolean} force
*/
setForceBodyReload(force: boolean) : void;
}
/**
* Adds an additional listener on every $locationChangeSuccess event and gets update version of html into dialog.
* May be useful in some rare cases when you're dependant on DOM changes, defaults to false.
* @param {boolean} force
*/
setForceHtmlReload(force: boolean) : void;
/**
* Dialog Scope which extends the $scope.
*/
interface IDialogScope extends angular.IScope {
/**
* This allows you to close dialog straight from handler in a popup element.
* @param value Any value passed to this function will be attached to the object which resolves on the close promise for this dialog.
* For dialogs opened with the openConfirm() method the value is used as the reject reason.
*/
closeThisDialog(value?: any): void;
/**
* Adds additional listener on every $locationChangeSuccess event and gets updated version of body into dialog.
* Maybe useful in some rare cases when you're dependant on DOM changes, defaults to false. Use it in module's
* config as provider instance:
* @param {boolean} force
*/
setForceBodyReload(force: boolean) : void;
}
/**
* Any serializable data that you want to be stored in the controller's dialog scope.
* From version 0.3.6 $scope.ngDialogData keeps references to the objects instead of copying them.
* Dialog Scope which extends the $scope.
*/
ngDialogData : string | {} | any[];
interface IDialogScope extends angular.IScope {
/**
* This allows you to close dialog straight from handler in a popup element.
* @param value Any value passed to this function will be attached to the object which resolves on the close promise for this dialog.
* For dialogs opened with the openConfirm() method the value is used as the reject reason.
*/
closeThisDialog(value?: any): void;
/**
* The id of the dialog. If you you ngDialogData, it'll be also available under ngDialogData.ngDialogId
*/
ngDialogId : string;
}
/**
* Any serializable data that you want to be stored in the controller's dialog scope.
* From version 0.3.6 $scope.ngDialogData keeps references to the objects instead of copying them.
*/
ngDialogData : string | {} | any[];
interface IDialogConfirmScope extends IDialogScope {
/**
* Use this method to close the dialog and resolve the promise that was returned when opening the modal.
*
* The function accepts a single optional parameter which is used as the value of the resolved promise.
* @param {any} [value] - The value with which the promise will resolve
*/
confirm(value?:any) : void;
}
/**
* The id of the dialog. If you you ngDialogData, it'll be also available under ngDialogData.ngDialogId
*/
ngDialogId : string;
}
interface IDialogOptions {
/**
* This option allows you to control the dialog's look, you can use built-in themes or create your own styled modals.
* It will be appended with the "ngdialog" class e.g. className is "default-theme flat-ui" it will be class="ngdialog default-theme flat-ui".
*/
className?: string;
interface IDialogConfirmScope extends IDialogScope {
/**
* Use this method to close the dialog and resolve the promise that was returned when opening the modal.
*
* The function accepts a single optional parameter which is used as the value of the resolved promise.
* @param {any} [value] - The value with which the promise will resolve
*/
confirm(value?:any) : void;
}
/**
* If true then animation for the dialog will be disabled, default false.
*/
disableAnimation?: boolean;
interface IDialogOptions {
/**
* This option allows you to control the dialog's look, you can use built-in themes or create your own styled modals.
* It will be appended with the "ngdialog" class e.g. className is "default-theme flat-ui" it will be class="ngdialog default-theme flat-ui".
*/
className?: string;
/**
* If false it allows to hide overlay div behind the modals, default true.
*/
overlay?: boolean;
/**
* If true then animation for the dialog will be disabled, default false.
*/
disableAnimation?: boolean;
/**
* If false it allows to hide close button on modals, default true.
*/
showClose?: boolean;
/**
* If false it allows to hide overlay div behind the modals, default true.
*/
overlay?: boolean;
/**
* It allows to close modals by clicking Esc button, default true.
* This will close all open modals if there several of them open at the same time.
*/
closeByEscape?: boolean;
/**
* If false it allows to hide close button on modals, default true.
*/
showClose?: boolean;
/**
* It allows to close modals by clicking on overlay background, default true. If @see Hammer.js is loaded, it will listen for tap instead of click.
*/
closeByDocument?: boolean;
/**
* It allows to close modals by clicking Esc button, default true.
* This will close all open modals if there several of them open at the same time.
*/
closeByEscape?: boolean;
/**
* Listens for $locationChangeSuccess event and closes open dialogs if true (also handles the ui.router $stateChangeSuccess event if ui.router is used)
* default : false
*/
closeByNavigation?: boolean;
/**
* It allows to close modals by clicking on overlay background, default true. If @see Hammer.js is loaded, it will listen for tap instead of click.
*/
closeByDocument?: boolean;
/**
* If true allows to use plain string as template, default false.
*/
plain?: boolean;
/**
* Listens for $locationChangeSuccess event and closes open dialogs if true (also handles the ui.router $stateChangeSuccess event if ui.router is used)
* default : false
*/
closeByNavigation?: boolean;
/**
* Give a name for a dialog instance. It is useful for identifying specific dialog if there are multiple dialog boxes opened.
*/
name?: string | number;
/**
* If true allows to use plain string as template, default false.
*/
plain?: boolean;
/**
* Provide either the name of a function or a function to be called before the dialog is closed.
* If the callback function specified in the option returns false then the dialog will not be closed.
* Alternatively, if the callback function returns a promise that gets resolved the dialog will be closed.
*
* more: https://github.com/likeastore/ngDialog#preclosecallback-string--function
*/
preCloseCallback?: string|Function;
/**
* Give a name for a dialog instance. It is useful for identifying specific dialog if there are multiple dialog boxes opened.
*/
name?: string | number;
/**
* Pass false to disable template caching. Useful for developing purposes, default is true.
*/
cache?: boolean;
/**
* Provide either the name of a function or a function to be called before the dialog is closed.
* If the callback function specified in the option returns false then the dialog will not be closed.
* Alternatively, if the callback function returns a promise that gets resolved the dialog will be closed.
*
* more: https://github.com/likeastore/ngDialog#preclosecallback-string--function
*/
preCloseCallback?: string|Function;
/**
* Specify your element where to append dialog instance, accepts selector string (e.g. #yourId, .yourClass).
* If not specified appends dialog to body as default behavior.
*/
appendTo?: string;
/**
* Pass false to disable template caching. Useful for developing purposes, default is true.
*/
cache?: boolean;
/**
* When true, ensures that the focused element remains within the dialog to conform to accessibility recommendations.
* Default value is true
*/
trapFocus?: boolean;
/**
* Specify your element where to append dialog instance, accepts selector string (e.g. #yourId, .yourClass).
* If not specified appends dialog to body as default behavior.
*/
appendTo?: string;
/**
* When true, closing the dialog restores focus to the element that launched it. Designed to improve keyboard
* accessibility. Default value is true
*/
preserveFocus?: boolean;
/**
* When true, ensures that the focused element remains within the dialog to conform to accessibility recommendations.
* Default value is true
*/
trapFocus?: boolean;
/**
* When true, automatically selects appropriate values for any unspecified accessibility attributes. Default value is true
*/
ariaAuto? : boolean;
/**
* When true, closing the dialog restores focus to the element that launched it. Designed to improve keyboard
* accessibility. Default value is true
*/
preserveFocus?: boolean;
/**
* Specifies the value for the role attribute that should be applied to the dialog element. Default value is null (unspecified)
*/
ariaRole?: string;
/**
* When true, automatically selects appropriate values for any unspecified accessibility attributes. Default value is true
*/
ariaAuto? : boolean;
/**
* Specifies the value for the aria-labelledby attribute that should be applied to the dialog element.
* Default value is null (unspecified)
*
* If specified, the value is not validated against the DOM
*/
ariaLabelledById?: string;
/**
* Specifies the value for the role attribute that should be applied to the dialog element. Default value is null (unspecified)
*/
ariaRole?: string;
/**
* Specifies the CSS selector for the element to be referenced by the aria-labelledby attribute on the dialog element. Default value is null (unspecified)
*
* If specified, the first matching element is used.
*/
ariaLabelledBySelector?: string;
/**
* Specifies the value for the aria-labelledby attribute that should be applied to the dialog element.
* Default value is null (unspecified)
*
* If specified, the value is not validated against the DOM
*/
ariaLabelledById?: string;
/**
* Specifies the value for the aria-describedby attribute that should be applied to the dialog element. Default value is null (unspecified)
*
* If specified, the value is not validated against the DOM.
*/
ariaDescribedById?: string;
/**
* Specifies the CSS selector for the element to be referenced by the aria-labelledby attribute on the dialog element. Default value is null (unspecified)
*
* If specified, the first matching element is used.
*/
ariaLabelledBySelector?: string;
/**
* Specifies the CSS selector for the element to be referenced by the aria-describedby attribute on the dialog element. Default value is null (unspecified)
*
* If specified, the first matching element is used.
*/
ariaDescribedBySelector?: string;
}
/**
* Specifies the value for the aria-describedby attribute that should be applied to the dialog element. Default value is null (unspecified)
*
* If specified, the value is not validated against the DOM.
*/
ariaDescribedById?: string;
/**
* Options which are provided to open a dialog.
*/
interface IDialogOpenOptions extends IDialogOptions {
template: string;
controller?: string| any[] | any;
controllerAs?: string;
/**
* Specifies the CSS selector for the element to be referenced by the aria-describedby attribute on the dialog element. Default value is null (unspecified)
*
* If specified, the first matching element is used.
*/
ariaDescribedBySelector?: string;
}
/**
* Scope object that will be passed to dialog. If you use controller with separate $scope service this object will be passed to $scope.$parent param.
* Options which are provided to open a dialog.
*/
scope?: IDialogScope;
interface IDialogOpenOptions extends IDialogOptions {
template: string;
controller?: string| any[] | any;
controllerAs?: string;
/**
* An optional map of dependencies which should be injected into the controller. If any of these dependencies
* are promises, ngDialog will wait for them all to be resolved or one to be rejected before the controller
* is instantiated.
*/
resolve?: {[key : string] : string | Function};
/**
* Scope object that will be passed to dialog. If you use controller with separate $scope service this object will be passed to $scope.$parent param.
*/
scope?: IDialogScope;
/**
* Any serializable data that you want to be stored in the controller's dialog scope. ($scope.ngDialogData).
* From version 0.3.6 $scope.ngDialogData keeps references to the objects instead of copying them.
*/
data?: string | {} | any[];
}
/**
* An optional map of dependencies which should be injected into the controller. If any of these dependencies
* are promises, ngDialog will wait for them all to be resolved or one to be rejected before the controller
* is instantiated.
*/
resolve?: {[key : string] : string | Function};
interface IDialogOpenConfirmOptions extends IDialogOpenOptions {
scope?: IDialogConfirmScope;
/**
* Any serializable data that you want to be stored in the controller's dialog scope. ($scope.ngDialogData).
* From version 0.3.6 $scope.ngDialogData keeps references to the objects instead of copying them.
*/
data?: string | {} | any[];
}
interface IDialogOpenConfirmOptions extends IDialogOpenOptions {
scope?: IDialogConfirmScope;
}
}
}
{
"name": "@types/ng-dialog",
"version": "0.3.21-alpha",
"version": "0.3.22-alpha",
"description": "TypeScript definitions for ngDialog",

@@ -8,7 +8,11 @@ "main": "",

"author": "Stephen Lautier <https://github.com/stephenlautier>",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
},
"license": "MIT",
"typings": "index.d.ts",
"dependencies": {
"@types/angularjs": "*"
"@types/angularjs": "1.5.*"
}
}

@@ -11,6 +11,6 @@ # Installation

Additional Details
* Last updated: Wed, 25 May 2016 04:20:26 GMT
* File structure: OldUMD
* Last updated: Fri, 01 Jul 2016 18:42:29 GMT
* File structure: ModuleAugmentation
* Library Dependencies: angularjs
* Module Dependencies: none
* Module Dependencies: angularjs
* Global values: none

@@ -17,0 +17,0 @@

@@ -7,3 +7,5 @@ {

],
"moduleDependencies": [],
"moduleDependencies": [
"angularjs"
],
"libraryMajorVersion": "0",

@@ -16,6 +18,6 @@ "libraryMinorVersion": "3",

"sourceBranch": "types-2.0",
"kind": "OldUMD",
"kind": "ModuleAugmentation",
"globals": [],
"declaredModules": [
"ng-dialog"
"angularjs"
],

@@ -25,3 +27,3 @@ "files": [

],
"contentHash": "cb2bf8e01161448c9549defed1415ec86588ae176eb08282602fe5f8173a9743"
"contentHash": "afd8c5607c03fd3068b26a09d6a9025a11887a67d43f66670b7c7720c089c95e"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc