first commit
This commit is contained in:
22
WebRoot/node_modules/sweetalert/LICENSE.md
generated
vendored
Normal file
22
WebRoot/node_modules/sweetalert/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-present Tristan Edwards
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
166
WebRoot/node_modules/sweetalert/README.md
generated
vendored
Normal file
166
WebRoot/node_modules/sweetalert/README.md
generated
vendored
Normal file
@ -0,0 +1,166 @@
|
||||
<p align="center">
|
||||
<a href="http://sweetalert.js.org">
|
||||
<img alt="SweetAlert" src="https://github.com/t4t5/sweetalert/blob/e3c2085473a0eb5a6b022e43eb22e746380bb955/assets/logotype.png" width="300">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
A beautiful replacement for JavaScript's "alert"
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://badge.fury.io/js/sweetalert"><img src="https://badge.fury.io/js/sweetalert.svg" alt="npm version" height="18"></a>
|
||||
<a href="https://travis-ci.org/t4t5/sweetalert"><img src="https://travis-ci.org/t4t5/sweetalert.svg" alt="Build status" /><a>
|
||||
<a href="https://www.npmjs.com/package/sweetalert">
|
||||
<img src="https://img.shields.io/npm/dm/sweetalert.svg" />
|
||||
</a>
|
||||
<a href="https://github.com/t4t5/sweetalert/blob/master/LICENSE">
|
||||
<img src="https://img.shields.io/github/license/t4t5/sweetalert.svg" />
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<img alt="A success modal" src="https://github.com/t4t5/sweetalert/blob/e3c2085473a0eb5a6b022e43eb22e746380bb955/assets/swal.gif">
|
||||
</p>
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
$ npm install --save sweetalert
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
import swal from 'sweetalert'
|
||||
|
||||
swal("Hello world!")
|
||||
```
|
||||
|
||||
## Upgrading from 1.X
|
||||
|
||||
Many improvements and breaking changes have been introduced in the 2.0 release. Make sure you read the [upgrade guide](https://sweetalert.js.org/guides/#upgrading-from-1x) to avoid nasty suprises!
|
||||
|
||||
## Guides
|
||||
|
||||
- [Installation](https://sweetalert.js.org/guides/#installation)
|
||||
- [Getting started](https://sweetalert.js.org/guides/#getting-started)
|
||||
- [Advanced examples](https://sweetalert.js.org/guides/#advanced-examples)
|
||||
- [Upgrading from 1.X](https://sweetalert.js.org/guides/#upgrading-from-1x)
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Configuration](https://sweetalert.js.org/docs/#configuration)
|
||||
- [Methods](https://sweetalert.js.org/docs/#methods)
|
||||
- [Theming](https://sweetalert.js.org/docs/#theming)
|
||||
|
||||
## Examples
|
||||
|
||||
### An error message:
|
||||
```javascript
|
||||
swal("Oops!", "Something went wrong!", "error")
|
||||
```
|
||||
|
||||
### A warning message, with a function attached to the confirm message:
|
||||
- Using promises:
|
||||
```javascript
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Are you sure that you want to leave this page?",
|
||||
icon: "warning",
|
||||
dangerMode: true,
|
||||
})
|
||||
.then(willDelete => {
|
||||
if (willDelete) {
|
||||
swal("Deleted!", "Your imaginary file has been deleted!", "success");
|
||||
}
|
||||
});
|
||||
```
|
||||
- Using async/await:
|
||||
```javascript
|
||||
const willDelete = await swal({
|
||||
title: "Are you sure?",
|
||||
text: "Are you sure that you want to delete this file?",
|
||||
icon: "warning",
|
||||
dangerMode: true,
|
||||
})
|
||||
|
||||
if (willDelete) {
|
||||
swal("Deleted!", "Your imaginary file has been deleted!", "success");
|
||||
}
|
||||
```
|
||||
|
||||
### A prompt modal, where the user's input is logged:
|
||||
- Using promises:
|
||||
```javascript
|
||||
swal("Type something:", {
|
||||
content: "input",
|
||||
})
|
||||
.then((value) => {
|
||||
swal(`You typed: ${value}`);
|
||||
})
|
||||
```
|
||||
- Using async/await:
|
||||
```javascript
|
||||
const value = await swal("Type something:", {
|
||||
content: "input",
|
||||
})
|
||||
|
||||
swal(`You typed: ${value}`);
|
||||
```
|
||||
|
||||
### In combination with Fetch:
|
||||
- Using promises:
|
||||
```javascript
|
||||
swal({
|
||||
text: 'Wanna log some information about Bulbasaur?',
|
||||
button: {
|
||||
text: "Search!",
|
||||
closeModal: false,
|
||||
},
|
||||
})
|
||||
.then(willSearch => {
|
||||
if (willSearch) {
|
||||
return fetch(`http://pokeapi.co/api/v2/pokemon/1`)
|
||||
}
|
||||
})
|
||||
.then(result => result.json())
|
||||
.then(json => console.log(json))
|
||||
.catch(err => {
|
||||
swal("Oops!", "Seems like we couldn't fetch the info", "error")
|
||||
})
|
||||
```
|
||||
- Using async/await:
|
||||
```javascript
|
||||
const willSearch = await swal({
|
||||
text: 'Wanna log some information about Bulbasaur?',
|
||||
button: {
|
||||
text: "Search!",
|
||||
closeModal: false,
|
||||
},
|
||||
})
|
||||
|
||||
if (willSearch) {
|
||||
try {
|
||||
const result = await fetch(`http://pokeapi.co/api/v2/pokemon/1`)
|
||||
const json = await result.json()
|
||||
console.log(json)
|
||||
} catch (err) {
|
||||
swal("Oops!", "Seems like we couldn't fetch the info", "error")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
### If you're changing the core library:
|
||||
1. Make changes in the `src` folder.
|
||||
2. Preview changes by running `npm run docs`
|
||||
3. Submit pull request
|
||||
|
||||
### If you're changing the documentation:
|
||||
1. Make changes in the `docs-src` folder.
|
||||
2. Preview changes by running `npm run docs`
|
||||
3. Run `npm run builddocs` to compile the changes to the `docs` folder
|
||||
4. Submit pull request
|
||||
1
WebRoot/node_modules/sweetalert/dist/sweetalert.min.js
generated
vendored
Normal file
1
WebRoot/node_modules/sweetalert/dist/sweetalert.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
131
WebRoot/node_modules/sweetalert/package.json
generated
vendored
Normal file
131
WebRoot/node_modules/sweetalert/package.json
generated
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
{
|
||||
"_from": "sweetalert",
|
||||
"_id": "sweetalert@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-9YKj0SvjKyBfRWco50UOsIbXVeifYbxzT9Qda7EsqC01eafHGCSG0IR7g942ufjzt7lnwO8ZZBwr6emXv2fQrg==",
|
||||
"_location": "/sweetalert",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "sweetalert",
|
||||
"name": "sweetalert",
|
||||
"escapedName": "sweetalert",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/sweetalert/-/sweetalert-2.1.0.tgz",
|
||||
"_shasum": "d605dec840058fa8ad4a1f7c2c8c194bc72c27fa",
|
||||
"_spec": "sweetalert",
|
||||
"_where": "D:\\Workspaces\\SSMBootstrap\\WebRoot\\node_modules",
|
||||
"author": {
|
||||
"name": "Tristan Edwards",
|
||||
"email": "tristan.edwards@me.com",
|
||||
"url": "http://tristanedwards.me"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/t4t5/sweetalert/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"es6-object-assign": "^1.1.0",
|
||||
"promise-polyfill": "^6.0.2"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "A beautiful replacement for JavaScript's \"alert\"",
|
||||
"devDependencies": {
|
||||
"@types/jest": "19.2.3",
|
||||
"autoprefixer": "6.7.7",
|
||||
"babel-core": "6.24.1",
|
||||
"babel-loader": "6.4.1",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "6.24.1",
|
||||
"babel-plugin-transform-runtime": "6.23.0",
|
||||
"babel-preset-env": "1.4.0",
|
||||
"babel-preset-es2015": "6.24.1",
|
||||
"babel-preset-react": "6.24.1",
|
||||
"babel-standalone": "^6.26.0",
|
||||
"babelify": "^6.0.2",
|
||||
"browserify": "^9.0.8",
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"css-loader": "0.28.7",
|
||||
"dts-bundle": "0.7.3",
|
||||
"exports-loader": "0.6.4",
|
||||
"expose-loader": "0.7.3",
|
||||
"glob": "^5.0.3",
|
||||
"jest": "19.0.2",
|
||||
"jquery": "3.2.1",
|
||||
"jus": "0.24.1",
|
||||
"nodelist-foreach-polyfill": "^1.2.0",
|
||||
"path": "^0.11.14",
|
||||
"postcss-color-function": "3.0.0",
|
||||
"postcss-custom-properties": "5.0.2",
|
||||
"postcss-easy-import": "2.0.0",
|
||||
"postcss-loader": "1.3.3",
|
||||
"postcss-nesting": "2.3.1",
|
||||
"react": "15.5.4",
|
||||
"react-dom": "15.5.4",
|
||||
"source-map-loader": "0.2.1",
|
||||
"style-loader": "0.18.2",
|
||||
"ts-jest": "19.0.14",
|
||||
"ts-loader": "2.0.3",
|
||||
"tslint": "5.1.0",
|
||||
"tslint-loader": "3.5.2",
|
||||
"typescript": "2.2.2",
|
||||
"vinyl-buffer": "^1.0.0",
|
||||
"vinyl-source-stream": "^1.1.0",
|
||||
"webpack": "3.5.5",
|
||||
"webpack-bundle-analyzer": "2.9.0",
|
||||
"webpack-dev-server": "2.4.2",
|
||||
"webpack-merge": "4.1.0",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"LICENSE.md",
|
||||
"README.md",
|
||||
"typings"
|
||||
],
|
||||
"homepage": "http://tristanedwards.me/sweetalert",
|
||||
"jest": {
|
||||
"verbose": true,
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"json"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"sweetalert",
|
||||
"alert",
|
||||
"modal",
|
||||
"popup"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "dist/sweetalert.min.js",
|
||||
"name": "sweetalert",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/t4t5/sweetalert.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "webpack -p",
|
||||
"builddocs": "node_modules/jus/cli.js build docs-src docs",
|
||||
"buildtest": "npm run build && jest",
|
||||
"docs": "npm run build && node_modules/jus/cli.js serve docs-src",
|
||||
"prepare": "npm run build && npm run builddocs",
|
||||
"prepublish": "npm run build",
|
||||
"test": "jest"
|
||||
},
|
||||
"types": "typings/sweetalert.d.ts",
|
||||
"version": "2.1.0"
|
||||
}
|
||||
13
WebRoot/node_modules/sweetalert/typings/core.d.ts
generated
vendored
Normal file
13
WebRoot/node_modules/sweetalert/typings/core.d.ts
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import { ActionOptions, SwalState } from './modules/state';
|
||||
import { SwalOptions } from './modules/options';
|
||||
export declare type SwalParams = (string | Partial<SwalOptions>)[];
|
||||
export interface SweetAlert {
|
||||
(...params: SwalParams): Promise<any>;
|
||||
close?(namespace: string): void;
|
||||
getState?(): SwalState;
|
||||
setActionValue?(opts: string | ActionOptions): void;
|
||||
stopLoading?(): void;
|
||||
setDefaults?(opts: object): void;
|
||||
}
|
||||
declare const swal: SweetAlert;
|
||||
export default swal;
|
||||
5
WebRoot/node_modules/sweetalert/typings/modules/actions.d.ts
generated
vendored
Normal file
5
WebRoot/node_modules/sweetalert/typings/modules/actions.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { SwalState } from './state';
|
||||
export declare const openModal: () => void;
|
||||
export declare const onAction: (namespace?: string) => void;
|
||||
export declare const getState: () => SwalState;
|
||||
export declare const stopLoading: () => void;
|
||||
5
WebRoot/node_modules/sweetalert/typings/modules/class-list/index.d.ts
generated
vendored
Normal file
5
WebRoot/node_modules/sweetalert/typings/modules/class-list/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export interface ClassNameList {
|
||||
[key: string]: string;
|
||||
}
|
||||
export declare const CLASS_NAMES: ClassNameList;
|
||||
export default CLASS_NAMES;
|
||||
3
WebRoot/node_modules/sweetalert/typings/modules/event-listeners.d.ts
generated
vendored
Normal file
3
WebRoot/node_modules/sweetalert/typings/modules/event-listeners.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { SwalOptions } from './options';
|
||||
declare const addEventListeners: (opts: SwalOptions) => void;
|
||||
export default addEventListeners;
|
||||
3
WebRoot/node_modules/sweetalert/typings/modules/init/buttons.d.ts
generated
vendored
Normal file
3
WebRoot/node_modules/sweetalert/typings/modules/init/buttons.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { ButtonList } from '../options/buttons';
|
||||
declare const initButtons: (buttons: ButtonList, dangerMode: boolean) => void;
|
||||
export default initButtons;
|
||||
3
WebRoot/node_modules/sweetalert/typings/modules/init/content.d.ts
generated
vendored
Normal file
3
WebRoot/node_modules/sweetalert/typings/modules/init/content.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { ContentOptions } from '../options/content';
|
||||
declare const initContent: (opts: ContentOptions) => void;
|
||||
export default initContent;
|
||||
2
WebRoot/node_modules/sweetalert/typings/modules/init/icon.d.ts
generated
vendored
Normal file
2
WebRoot/node_modules/sweetalert/typings/modules/init/icon.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const initIcon: (str: string) => void;
|
||||
export default initIcon;
|
||||
3
WebRoot/node_modules/sweetalert/typings/modules/init/index.d.ts
generated
vendored
Normal file
3
WebRoot/node_modules/sweetalert/typings/modules/init/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { SwalOptions } from '../options';
|
||||
export declare const init: (opts: SwalOptions) => void;
|
||||
export default init;
|
||||
5
WebRoot/node_modules/sweetalert/typings/modules/init/modal.d.ts
generated
vendored
Normal file
5
WebRoot/node_modules/sweetalert/typings/modules/init/modal.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
import { SwalOptions } from '../options';
|
||||
export declare const injectElIntoModal: (markup: string) => HTMLElement;
|
||||
export declare const initModalContent: (opts: SwalOptions) => void;
|
||||
declare const initModalOnce: () => void;
|
||||
export default initModalOnce;
|
||||
2
WebRoot/node_modules/sweetalert/typings/modules/init/overlay.d.ts
generated
vendored
Normal file
2
WebRoot/node_modules/sweetalert/typings/modules/init/overlay.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const initOverlayOnce: () => void;
|
||||
export default initOverlayOnce;
|
||||
2
WebRoot/node_modules/sweetalert/typings/modules/init/text.d.ts
generated
vendored
Normal file
2
WebRoot/node_modules/sweetalert/typings/modules/init/text.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare const initTitle: (title: string) => void;
|
||||
export declare const initText: (text: string) => void;
|
||||
1
WebRoot/node_modules/sweetalert/typings/modules/markup/buttons.d.ts
generated
vendored
Normal file
1
WebRoot/node_modules/sweetalert/typings/modules/markup/buttons.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare const buttonMarkup: string;
|
||||
1
WebRoot/node_modules/sweetalert/typings/modules/markup/content.d.ts
generated
vendored
Normal file
1
WebRoot/node_modules/sweetalert/typings/modules/markup/content.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare const contentMarkup: string;
|
||||
3
WebRoot/node_modules/sweetalert/typings/modules/markup/icons.d.ts
generated
vendored
Normal file
3
WebRoot/node_modules/sweetalert/typings/modules/markup/icons.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export declare const errorIconMarkup: () => string;
|
||||
export declare const warningIconMarkup: () => string;
|
||||
export declare const successIconMarkup: () => string;
|
||||
9
WebRoot/node_modules/sweetalert/typings/modules/markup/index.d.ts
generated
vendored
Normal file
9
WebRoot/node_modules/sweetalert/typings/modules/markup/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export * from './modal';
|
||||
export { default as overlayMarkup } from './overlay';
|
||||
export * from './icons';
|
||||
export * from './content';
|
||||
export * from './buttons';
|
||||
export declare const iconMarkup: string;
|
||||
export declare const titleMarkup: string;
|
||||
export declare const textMarkup: string;
|
||||
export declare const footerMarkup: string;
|
||||
2
WebRoot/node_modules/sweetalert/typings/modules/markup/modal.d.ts
generated
vendored
Normal file
2
WebRoot/node_modules/sweetalert/typings/modules/markup/modal.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare const modalMarkup: string;
|
||||
export default modalMarkup;
|
||||
2
WebRoot/node_modules/sweetalert/typings/modules/markup/overlay.d.ts
generated
vendored
Normal file
2
WebRoot/node_modules/sweetalert/typings/modules/markup/overlay.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const overlay: string;
|
||||
export default overlay;
|
||||
14
WebRoot/node_modules/sweetalert/typings/modules/options/buttons.d.ts
generated
vendored
Normal file
14
WebRoot/node_modules/sweetalert/typings/modules/options/buttons.d.ts
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
export interface ButtonOptions {
|
||||
visible?: boolean;
|
||||
text?: string;
|
||||
value?: any;
|
||||
className?: string | Array<string>;
|
||||
closeModal?: boolean;
|
||||
}
|
||||
export interface ButtonList {
|
||||
[buttonNamespace: string]: ButtonOptions | boolean;
|
||||
}
|
||||
export declare const CONFIRM_KEY = "confirm";
|
||||
export declare const CANCEL_KEY = "cancel";
|
||||
export declare const defaultButtonList: ButtonList;
|
||||
export declare const getButtonListOpts: (opts: string | boolean | object) => ButtonList;
|
||||
5
WebRoot/node_modules/sweetalert/typings/modules/options/content.d.ts
generated
vendored
Normal file
5
WebRoot/node_modules/sweetalert/typings/modules/options/content.d.ts
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
export interface ContentOptions {
|
||||
element: string | Node;
|
||||
attributes?: object;
|
||||
}
|
||||
export declare const getContentOpts: (contentParam: string | object) => ContentOptions;
|
||||
11
WebRoot/node_modules/sweetalert/typings/modules/options/deprecations.d.ts
generated
vendored
Normal file
11
WebRoot/node_modules/sweetalert/typings/modules/options/deprecations.d.ts
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export declare const logDeprecation: (name: string) => void;
|
||||
export interface OptionReplacement {
|
||||
replacement?: string;
|
||||
onlyRename?: boolean;
|
||||
subOption?: string;
|
||||
link?: string;
|
||||
}
|
||||
export interface OptionReplacementsList {
|
||||
[name: string]: OptionReplacement;
|
||||
}
|
||||
export declare const DEPRECATED_OPTS: OptionReplacementsList;
|
||||
16
WebRoot/node_modules/sweetalert/typings/modules/options/index.d.ts
generated
vendored
Normal file
16
WebRoot/node_modules/sweetalert/typings/modules/options/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
import { ButtonList } from './buttons';
|
||||
import { ContentOptions } from './content';
|
||||
export interface SwalOptions {
|
||||
title: string;
|
||||
text: string;
|
||||
icon: string;
|
||||
buttons: ButtonList | Array<string | boolean>;
|
||||
content: ContentOptions;
|
||||
className: string;
|
||||
closeOnClickOutside: boolean;
|
||||
closeOnEsc: boolean;
|
||||
dangerMode: boolean;
|
||||
timer: number;
|
||||
}
|
||||
export declare const setDefaults: (opts: object) => void;
|
||||
export declare const getOpts: (...params: (string | Partial<SwalOptions>)[]) => SwalOptions;
|
||||
27
WebRoot/node_modules/sweetalert/typings/modules/state.d.ts
generated
vendored
Normal file
27
WebRoot/node_modules/sweetalert/typings/modules/state.d.ts
generated
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
export interface SwalState {
|
||||
isOpen: boolean;
|
||||
promise: {
|
||||
resolve?(value: string): void;
|
||||
reject?(): void;
|
||||
};
|
||||
actions: {
|
||||
[namespace: string]: {
|
||||
value?: string | any;
|
||||
closeModal?: boolean;
|
||||
};
|
||||
};
|
||||
timer: number;
|
||||
}
|
||||
export interface ActionOptions {
|
||||
[buttonNamespace: string]: {
|
||||
value?: string;
|
||||
closeModal?: boolean;
|
||||
};
|
||||
}
|
||||
declare let state: SwalState;
|
||||
export declare const resetState: () => void;
|
||||
export declare const setActionValue: (opts: string | ActionOptions) => void;
|
||||
export declare const setActionOptionsFor: (buttonKey: string, {closeModal}?: {
|
||||
closeModal?: boolean;
|
||||
}) => void;
|
||||
export default state;
|
||||
7
WebRoot/node_modules/sweetalert/typings/modules/utils.d.ts
generated
vendored
Normal file
7
WebRoot/node_modules/sweetalert/typings/modules/utils.d.ts
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
export declare const getNode: (className: string) => HTMLElement;
|
||||
export declare const stringToNode: (html: string) => HTMLElement;
|
||||
export declare const insertAfter: (newNode: Node, referenceNode: Node) => void;
|
||||
export declare const removeNode: (node: Node) => void;
|
||||
export declare const throwErr: (message: string) => never;
|
||||
export declare const isPlainObject: (value: any) => boolean;
|
||||
export declare const ordinalSuffixOf: (num: number) => string;
|
||||
9
WebRoot/node_modules/sweetalert/typings/sweetalert.d.ts
generated
vendored
Normal file
9
WebRoot/node_modules/sweetalert/typings/sweetalert.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import swal, { SweetAlert } from "./core";
|
||||
|
||||
declare global {
|
||||
const swal: SweetAlert;
|
||||
const sweetAlert: SweetAlert;
|
||||
}
|
||||
|
||||
export default swal;
|
||||
export as namespace swal;
|
||||
Reference in New Issue
Block a user