first commit

This commit is contained in:
s2
2024-12-13 08:53:01 +01:00
commit 2746dc9c4e
5477 changed files with 682458 additions and 0 deletions

20
node_modules/noty/LICENSE.txt generated vendored Normal file
View File

@@ -0,0 +1,20 @@
Copyright (c) 2012 Nedim Arabacı
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.

124
node_modules/noty/README.markdown generated vendored Normal file
View File

@@ -0,0 +1,124 @@
<p align="center">
<a href="http://ned.im/noty?ref=readme">
<img src="http://ned.im/noty/_media/noty-v3-logo.png" width=200 height=70>
</a>
<p align="center">
Dependency-free notification library.
<br>
<a href="http://ned.im/noty"><strong>Documentation &raquo;</strong></a>
</p>
<p align="center">
<a href="https://github.com/needim/noty/releases"><img src="https://img.shields.io/github/release/needim/noty.svg" alt="GitHub release"></a>
<a href="https://bower.io/"><img src="https://img.shields.io/bower/v/noty.svg" alt="Bower version"></a>
<a href="https://www.npmjs.com/package/noty"><img src="https://img.shields.io/npm/v/noty.svg" alt="NPM version"></a>
<a href="https://packagist.org/packages/needim/noty"><img src="https://img.shields.io/packagist/v/needim/noty.svg" alt="Packagist version"></a>
<a href="https://cdnjs.com/libraries/noty"><img src="https://img.shields.io/cdnjs/v/noty.svg" alt="CDNJS version"></a>
<br>
<img src="https://img.shields.io/david/needim/noty.svg" alt="Dependencies">
<img src="https://img.shields.io/david/dev/needim/noty.svg" alt="Dev Dependencies">
<br>
<a href="https://travis-ci.org/needim/noty"><img src="https://img.shields.io/travis/needim/noty/master.svg" alt="Travis"></a>
<a href="https://www.npmjs.com/package/noty"><img src="https://img.shields.io/npm/dm/noty.svg?label=npm%20downloads" alt="NPM Downloads"></a>
<a href="https://github.com/needim/noty/graphs/contributors"><img src="https://img.shields.io/github/contributors/needim/noty.svg" alt="Contributors"></a>
</p>
</p>
<br>
## Hi
**NOTY** is a notification library that makes it easy to create **alert** - **success** - **error** - **warning** - **information** - **confirmation** messages as an alternative the standard alert dialog.
The notifications can be positioned at the;
**top** - **topLeft** - **topCenter** - **topRight** - **center** - **centerLeft** - **centerRight** - **bottom** - **bottomLeft** - **bottomCenter** - **bottomRight**
There are lots of other options in the API to customise the text, animation, buttons and much more.
It also has various callbacks for the buttons, opening closing the notifications and queue control.
### Sponsored By
<table>
<tr>
<td vlign="center">
<a target="_blank" href="https://pusher.com/?utm_source=needim&utm_medium=paid&utm_campaign=needim">
<img src="http://ned.im/noty/_media/pusher_logo_dark.png" width="160" alt="">
</a>
</td>
<td vlign="center">
<a target="_blank" href="https://www.jetbrains.com?ref=notyjs">
<img src="http://ned.im/noty/_media/logo_JetBrains_4.svg" width="80" alt="">
</a>
</td>
<td vlign="center">
<a target="_blank" href="https://www.browserstack.com?ref=notyjs">
<img src="http://ned.im/noty/_media/browserstack.svg" width="220" alt="">
</a>
</td>
</tr>
</table>
***
### Features
- [x] Dependency-free
- [x] Web Push Notifications with Service Worker support
- [x] UMD
- [x] Named queue system
- [x] Has 11 layouts, 5 notification styles, 5+ themes
- [x] Custom container (inline notifications)
- [x] Confirm notifications
- [x] TTL
- [x] Progress bar indicator for timed notifications
- [x] Supports css animations, [animate.css](https://github.com/daneden/animate.css), [mojs](https://github.com/legomushroom/mojs), [bounce.js](https://github.com/tictail/bounce.js), [velocity](https://github.com/julianshapiro/velocity) and other animation libraries
- [x] 2 close options: click, button
- [x] API & Callbacks
- [x] Custom templating
- [x] Document visibility control (blur, focus)
### Documentation
Documentation and examples are here: <http://ned.im/noty>
***
##### Basic Usage
```js
import Noty from 'noty';
new Noty({
text: 'Notification text'
}).show();
// or
const Noty = require('noty');
new Noty({
text: 'Notification text'
}).show();
```
##### Development
```console
$ npm run dev
$ npm test
$ npm run build
$ npm run browserstack
$ npm run serve-docs
```
##### Development environment
- [x] Standard
- [x] Prettier
- [x] ES6 & Babel & Webpack
- [x] Sass
- [x] Autoprefixer
- [x] QUnit
- [x] BrowserStack
- [x] Pre-commit tests
- [x] Travis CI
[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

121
node_modules/noty/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,121 @@
declare module 'noty' {
export = Noty;
}
declare class Noty {
constructor(options?: Noty.Options);
/**
* Show a NOTY
*/
show: () => void;
/**
* Close a NOTY
*/
close: () => void;
/**
* Notification text updater. Important: .noty_body class is required for setText API method
*/
setText: (text: string, overrideConstructorOption?: true) => void;
/**
* Notification type updater
*/
setType: (type: Noty.Type, overrideConstructorOption?: true) => void;
/**
* Notification theme updater
*/
setTheme: (theme: Noty.Theme, overrideConstructorOption?: true) => void;
/**
* false (clears timeout) or integer (clears timer, starts for given value)
*/
setTimeout: (option: false | number) => void; //
/**
* Clears the timeout
*/
stop: () => void;
/**
* Restarts the timeout
*/
resume: () => void;
/**
* Register event handlers for Noty outside of constructior options
* Important: You need to call on() methods before the show() method
*/
on: (eventName: Noty.Event, callback: Function) => void;
/**
* Without queue name: Closes all notifications
* With queue name: Closes all notifications for the named queue
*/
static closeAll: (queueName?: string) => void;
/**
* Without queue name: Sets the maxVisible notification count for global queue
* With parameter: Sets the maxVisible notification count for the named queue
*/
static setMaxVisible: (max: number, queueName?: string) => void;
/**
* Change default values for new instances of NOTY
*/
static overrideDefaults: (obj: { [i: string]: any }) => Noty;
static button: (text: string, classNames: string, cb: Function, attributes?: any) => Noty.Button;
}
declare namespace Noty {
type Type = 'alert' | 'success' | 'warning' | 'error' | 'info' | 'information';
type Theme = 'mint' | 'sunset' | 'relax' | 'metroui' | 'bootstrap-v3' | 'bootstrap-v4' | 'semanticui' | 'nest';
type Layout = 'top' | 'topLeft' | 'topCenter' | 'topRight' | 'center' | 'centerLeft' | 'centerRight' | 'bottom' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
type Event = 'beforeShow' | 'onShow' | 'afterShow' | 'onClose' | 'afterClose' | 'onHover' | 'onTemplate';
interface Button {
new(text: string, classNames: string, cb: Function, attributes: any) : Noty.Button
}
interface Options {
type?: Noty.Type;
layout?: Noty.Layout;
theme?: Noty.Theme;
text?: string;
timeout?: false | number;
progressBar?: boolean;
closeWith?: ('click' | 'button')[];
animation?: {
open?: string | null | Function,
close?: string | null | Function
};
id?: false | string;
force?: boolean;
killer?: boolean | string;
queue?: string;
container?: false | string;
buttons?: Noty.Button[],
callbacks?: {
beforeShow?: () => void,
onShow?: () => void,
afterShow?: () => void,
onClose?: () => void,
afterClose?: () => void,
onHover?: () => void,
onTemplate?: () => void
};
sounds?: {
sources?: string[],
volume?: number,
conditions?: string[]
};
docTitle?: {
conditions?: string[]
};
modal?: boolean,
}
}

216
node_modules/noty/lib/noty.css generated vendored Normal file
View File

@@ -0,0 +1,216 @@
.noty_layout_mixin, #noty_layout__top, #noty_layout__topLeft, #noty_layout__topCenter, #noty_layout__topRight, #noty_layout__bottom, #noty_layout__bottomLeft, #noty_layout__bottomCenter, #noty_layout__bottomRight, #noty_layout__center, #noty_layout__centerLeft, #noty_layout__centerRight {
position: fixed;
margin: 0;
padding: 0;
z-index: 9999999;
-webkit-transform: translateZ(0) scale(1, 1);
transform: translateZ(0) scale(1, 1);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-font-smoothing: subpixel-antialiased;
filter: blur(0);
-webkit-filter: blur(0);
max-width: 90%; }
#noty_layout__top {
top: 0;
left: 5%;
width: 90%; }
#noty_layout__topLeft {
top: 20px;
left: 20px;
width: 325px; }
#noty_layout__topCenter {
top: 5%;
left: 50%;
width: 325px;
-webkit-transform: translate(-webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
transform: translate(calc(-50% - .5px)) translateZ(0) scale(1, 1); }
#noty_layout__topRight {
top: 20px;
right: 20px;
width: 325px; }
#noty_layout__bottom {
bottom: 0;
left: 5%;
width: 90%; }
#noty_layout__bottomLeft {
bottom: 20px;
left: 20px;
width: 325px; }
#noty_layout__bottomCenter {
bottom: 5%;
left: 50%;
width: 325px;
-webkit-transform: translate(-webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
transform: translate(calc(-50% - .5px)) translateZ(0) scale(1, 1); }
#noty_layout__bottomRight {
bottom: 20px;
right: 20px;
width: 325px; }
#noty_layout__center {
top: 50%;
left: 50%;
width: 325px;
-webkit-transform: translate(-webkit-calc(-50% - .5px), -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
transform: translate(calc(-50% - .5px), calc(-50% - .5px)) translateZ(0) scale(1, 1); }
#noty_layout__centerLeft {
top: 50%;
left: 20px;
width: 325px;
-webkit-transform: translate(0, -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1); }
#noty_layout__centerRight {
top: 50%;
right: 20px;
width: 325px;
-webkit-transform: translate(0, -webkit-calc(-50% - .5px)) translateZ(0) scale(1, 1);
transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1); }
.noty_progressbar {
display: none; }
.noty_has_timeout.noty_has_progressbar .noty_progressbar {
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 100%;
background-color: #646464;
opacity: 0.2;
filter: alpha(opacity=10); }
.noty_bar {
-webkit-backface-visibility: hidden;
-webkit-transform: translate(0, 0) translateZ(0) scale(1, 1);
-ms-transform: translate(0, 0) scale(1, 1);
transform: translate(0, 0) scale(1, 1);
-webkit-font-smoothing: subpixel-antialiased;
overflow: hidden; }
.noty_effects_open {
opacity: 0;
-webkit-transform: translate(50%);
-ms-transform: translate(50%);
transform: translate(50%);
-webkit-animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
animation: noty_anim_in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards; }
.noty_effects_close {
-webkit-animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
animation: noty_anim_out 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards; }
.noty_fix_effects_height {
-webkit-animation: noty_anim_height 75ms ease-out;
animation: noty_anim_height 75ms ease-out; }
.noty_close_with_click {
cursor: pointer; }
.noty_close_button {
position: absolute;
top: 2px;
right: 2px;
font-weight: bold;
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 2px;
cursor: pointer;
-webkit-transition: all .2s ease-out;
transition: all .2s ease-out; }
.noty_close_button:hover {
background-color: rgba(0, 0, 0, 0.1); }
.noty_modal {
position: fixed;
width: 100%;
height: 100%;
background-color: #000;
z-index: 10000;
opacity: .3;
left: 0;
top: 0; }
.noty_modal.noty_modal_open {
opacity: 0;
-webkit-animation: noty_modal_in .3s ease-out;
animation: noty_modal_in .3s ease-out; }
.noty_modal.noty_modal_close {
-webkit-animation: noty_modal_out .3s ease-out;
animation: noty_modal_out .3s ease-out;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards; }
@-webkit-keyframes noty_modal_in {
100% {
opacity: .3; } }
@keyframes noty_modal_in {
100% {
opacity: .3; } }
@-webkit-keyframes noty_modal_out {
100% {
opacity: 0; } }
@keyframes noty_modal_out {
100% {
opacity: 0; } }
@keyframes noty_modal_out {
100% {
opacity: 0; } }
@-webkit-keyframes noty_anim_in {
100% {
-webkit-transform: translate(0);
transform: translate(0);
opacity: 1; } }
@keyframes noty_anim_in {
100% {
-webkit-transform: translate(0);
transform: translate(0);
opacity: 1; } }
@-webkit-keyframes noty_anim_out {
100% {
-webkit-transform: translate(50%);
transform: translate(50%);
opacity: 0; } }
@keyframes noty_anim_out {
100% {
-webkit-transform: translate(50%);
transform: translate(50%);
opacity: 0; } }
@-webkit-keyframes noty_anim_height {
100% {
height: 0; } }
@keyframes noty_anim_height {
100% {
height: 0; } }
/*# sourceMappingURL=noty.css.map*/

1
node_modules/noty/lib/noty.css.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"noty.css","sourceRoot":""}

3124
node_modules/noty/lib/noty.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/noty/lib/noty.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

17
node_modules/noty/lib/noty.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
node_modules/noty/lib/noty.min.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

51
node_modules/noty/lib/themes/bootstrap-v3.css generated vendored Normal file
View File

@@ -0,0 +1,51 @@
.noty_theme__bootstrap-v3.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
border: 1px solid transparent;
border-radius: 4px; }
.noty_theme__bootstrap-v3.noty_bar .noty_body {
padding: 15px; }
.noty_theme__bootstrap-v3.noty_bar .noty_buttons {
padding: 10px; }
.noty_theme__bootstrap-v3.noty_bar .noty_close_button {
font-size: 21px;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
filter: alpha(opacity=20);
opacity: .2;
background: transparent; }
.noty_theme__bootstrap-v3.noty_bar .noty_close_button:hover {
background: transparent;
text-decoration: none;
cursor: pointer;
filter: alpha(opacity=50);
opacity: .5; }
.noty_theme__bootstrap-v3.noty_type__alert,
.noty_theme__bootstrap-v3.noty_type__notification {
background-color: #fff;
color: inherit; }
.noty_theme__bootstrap-v3.noty_type__warning {
background-color: #fcf8e3;
color: #8a6d3b;
border-color: #faebcc; }
.noty_theme__bootstrap-v3.noty_type__error {
background-color: #f2dede;
color: #a94442;
border-color: #ebccd1; }
.noty_theme__bootstrap-v3.noty_type__info,
.noty_theme__bootstrap-v3.noty_type__information {
background-color: #d9edf7;
color: #31708f;
border-color: #bce8f1; }
.noty_theme__bootstrap-v3.noty_type__success {
background-color: #dff0d8;
color: #3c763d;
border-color: #d6e9c6; }

51
node_modules/noty/lib/themes/bootstrap-v4.css generated vendored Normal file
View File

@@ -0,0 +1,51 @@
.noty_theme__bootstrap-v4.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
border: 1px solid transparent;
border-radius: .25rem; }
.noty_theme__bootstrap-v4.noty_bar .noty_body {
padding: .75rem 1.25rem; }
.noty_theme__bootstrap-v4.noty_bar .noty_buttons {
padding: 10px; }
.noty_theme__bootstrap-v4.noty_bar .noty_close_button {
font-size: 1.5rem;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
filter: alpha(opacity=20);
opacity: .5;
background: transparent; }
.noty_theme__bootstrap-v4.noty_bar .noty_close_button:hover {
background: transparent;
text-decoration: none;
cursor: pointer;
filter: alpha(opacity=50);
opacity: .75; }
.noty_theme__bootstrap-v4.noty_type__alert,
.noty_theme__bootstrap-v4.noty_type__notification {
background-color: #fff;
color: inherit; }
.noty_theme__bootstrap-v4.noty_type__warning {
background-color: #fcf8e3;
color: #8a6d3b;
border-color: #faebcc; }
.noty_theme__bootstrap-v4.noty_type__error {
background-color: #f2dede;
color: #a94442;
border-color: #ebccd1; }
.noty_theme__bootstrap-v4.noty_type__info,
.noty_theme__bootstrap-v4.noty_type__information {
background-color: #d9edf7;
color: #31708f;
border-color: #bce8f1; }
.noty_theme__bootstrap-v4.noty_type__success {
background-color: #dff0d8;
color: #3c763d;
border-color: #d6e9c6; }

46
node_modules/noty/lib/themes/light.css generated vendored Normal file
View File

@@ -0,0 +1,46 @@
.noty_theme__light.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative; }
.noty_theme__light.noty_bar .noty_body {
padding: 10px; }
.noty_theme__light.noty_bar .noty_buttons {
border-top: 1px solid #e7e7e7;
padding: 5px 10px; }
.noty_theme__light.noty_type__alert,
.noty_theme__light.noty_type__notification {
background-color: #fff;
border: 1px solid #dedede;
color: #444; }
.noty_theme__light.noty_type__warning {
background-color: #FFEAA8;
border: 1px solid #FFC237;
color: #826200; }
.noty_theme__light.noty_type__warning .noty_buttons {
border-color: #dfaa30; }
.noty_theme__light.noty_type__error {
background-color: #ED7000;
border: 1px solid #e25353;
color: #FFF; }
.noty_theme__light.noty_type__error .noty_buttons {
border-color: darkred; }
.noty_theme__light.noty_type__info,
.noty_theme__light.noty_type__information {
background-color: #78C5E7;
border: 1px solid #3badd6;
color: #FFF; }
.noty_theme__light.noty_type__info .noty_buttons,
.noty_theme__light.noty_type__information .noty_buttons {
border-color: #0B90C4; }
.noty_theme__light.noty_type__success {
background-color: #57C880;
border: 1px solid #7cdd77;
color: darkgreen; }
.noty_theme__light.noty_type__success .noty_buttons {
border-color: #50C24E; }

41
node_modules/noty/lib/themes/metroui.css generated vendored Normal file
View File

@@ -0,0 +1,41 @@
.noty_theme__metroui.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
box-shadow: rgba(0, 0, 0, 0.298039) 0 0 5px 0; }
.noty_theme__metroui.noty_bar .noty_progressbar {
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 100%;
background-color: #000;
opacity: 0.2;
filter: alpha(opacity=20); }
.noty_theme__metroui.noty_bar .noty_body {
padding: 1.25em;
font-size: 14px; }
.noty_theme__metroui.noty_bar .noty_buttons {
padding: 0 10px .5em 10px; }
.noty_theme__metroui.noty_type__alert,
.noty_theme__metroui.noty_type__notification {
background-color: #fff;
color: #1d1d1d; }
.noty_theme__metroui.noty_type__warning {
background-color: #FA6800;
color: #fff; }
.noty_theme__metroui.noty_type__error {
background-color: #CE352C;
color: #FFF; }
.noty_theme__metroui.noty_type__info,
.noty_theme__metroui.noty_type__information {
background-color: #1BA1E2;
color: #FFF; }
.noty_theme__metroui.noty_type__success {
background-color: #60A917;
color: #fff; }

37
node_modules/noty/lib/themes/mint.css generated vendored Normal file
View File

@@ -0,0 +1,37 @@
.noty_theme__mint.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative; }
.noty_theme__mint.noty_bar .noty_body {
padding: 10px;
font-size: 14px; }
.noty_theme__mint.noty_bar .noty_buttons {
padding: 10px; }
.noty_theme__mint.noty_type__alert,
.noty_theme__mint.noty_type__notification {
background-color: #fff;
border-bottom: 1px solid #D1D1D1;
color: #2F2F2F; }
.noty_theme__mint.noty_type__warning {
background-color: #FFAE42;
border-bottom: 1px solid #E89F3C;
color: #fff; }
.noty_theme__mint.noty_type__error {
background-color: #DE636F;
border-bottom: 1px solid #CA5A65;
color: #fff; }
.noty_theme__mint.noty_type__info,
.noty_theme__mint.noty_type__information {
background-color: #7F7EFF;
border-bottom: 1px solid #7473E8;
color: #fff; }
.noty_theme__mint.noty_type__success {
background-color: #AFC765;
border-bottom: 1px solid #A0B55C;
color: #fff; }

120
node_modules/noty/lib/themes/nest.css generated vendored Normal file
View File

@@ -0,0 +1,120 @@
.noty_theme__nest.noty_bar {
margin: 0 0 15px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
box-shadow: rgba(0, 0, 0, 0.098039) 5px 4px 10px 0; }
.noty_theme__nest.noty_bar .noty_body {
padding: 10px;
font-size: 14px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); }
.noty_theme__nest.noty_bar .noty_buttons {
padding: 10px; }
.noty_layout .noty_theme__nest.noty_bar {
z-index: 5; }
.noty_layout .noty_theme__nest.noty_bar:nth-child(2) {
position: absolute;
top: 0;
margin-top: 4px;
margin-right: -4px;
margin-left: 4px;
z-index: 4;
width: 100%; }
.noty_layout .noty_theme__nest.noty_bar:nth-child(3) {
position: absolute;
top: 0;
margin-top: 8px;
margin-right: -8px;
margin-left: 8px;
z-index: 3;
width: 100%; }
.noty_layout .noty_theme__nest.noty_bar:nth-child(4) {
position: absolute;
top: 0;
margin-top: 12px;
margin-right: -12px;
margin-left: 12px;
z-index: 2;
width: 100%; }
.noty_layout .noty_theme__nest.noty_bar:nth-child(5) {
position: absolute;
top: 0;
margin-top: 16px;
margin-right: -16px;
margin-left: 16px;
z-index: 1;
width: 100%; }
.noty_layout .noty_theme__nest.noty_bar:nth-child(n+6) {
position: absolute;
top: 0;
margin-top: 20px;
margin-right: -20px;
margin-left: 20px;
z-index: -1;
width: 100%; }
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(2),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(2) {
margin-top: 4px;
margin-left: -4px;
margin-right: 4px; }
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(3),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(3) {
margin-top: 8px;
margin-left: -8px;
margin-right: 8px; }
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(4),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(4) {
margin-top: 12px;
margin-left: -12px;
margin-right: 12px; }
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(5),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(5) {
margin-top: 16px;
margin-left: -16px;
margin-right: 16px; }
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(n+6),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(n+6) {
margin-top: 20px;
margin-left: -20px;
margin-right: 20px; }
.noty_theme__nest.noty_type__alert,
.noty_theme__nest.noty_type__notification {
background-color: #073B4C;
color: #fff; }
.noty_theme__nest.noty_type__alert .noty_progressbar,
.noty_theme__nest.noty_type__notification .noty_progressbar {
background-color: #fff; }
.noty_theme__nest.noty_type__warning {
background-color: #FFD166;
color: #fff; }
.noty_theme__nest.noty_type__error {
background-color: #EF476F;
color: #fff; }
.noty_theme__nest.noty_type__error .noty_progressbar {
opacity: .4; }
.noty_theme__nest.noty_type__info,
.noty_theme__nest.noty_type__information {
background-color: #118AB2;
color: #fff; }
.noty_theme__nest.noty_type__info .noty_progressbar,
.noty_theme__nest.noty_type__information .noty_progressbar {
opacity: .6; }
.noty_theme__nest.noty_type__success {
background-color: #06D6A0;
color: #fff; }

46
node_modules/noty/lib/themes/relax.css generated vendored Normal file
View File

@@ -0,0 +1,46 @@
.noty_theme__relax.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative; }
.noty_theme__relax.noty_bar .noty_body {
padding: 10px; }
.noty_theme__relax.noty_bar .noty_buttons {
border-top: 1px solid #e7e7e7;
padding: 5px 10px; }
.noty_theme__relax.noty_type__alert,
.noty_theme__relax.noty_type__notification {
background-color: #fff;
border: 1px solid #dedede;
color: #444; }
.noty_theme__relax.noty_type__warning {
background-color: #FFEAA8;
border: 1px solid #FFC237;
color: #826200; }
.noty_theme__relax.noty_type__warning .noty_buttons {
border-color: #dfaa30; }
.noty_theme__relax.noty_type__error {
background-color: #FF8181;
border: 1px solid #e25353;
color: #FFF; }
.noty_theme__relax.noty_type__error .noty_buttons {
border-color: darkred; }
.noty_theme__relax.noty_type__info,
.noty_theme__relax.noty_type__information {
background-color: #78C5E7;
border: 1px solid #3badd6;
color: #FFF; }
.noty_theme__relax.noty_type__info .noty_buttons,
.noty_theme__relax.noty_type__information .noty_buttons {
border-color: #0B90C4; }
.noty_theme__relax.noty_type__success {
background-color: #BCF5BC;
border: 1px solid #7cdd77;
color: darkgreen; }
.noty_theme__relax.noty_type__success .noty_buttons {
border-color: #50C24E; }

39
node_modules/noty/lib/themes/semanticui.css generated vendored Normal file
View File

@@ -0,0 +1,39 @@
.noty_theme__semanticui.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
border: 1px solid transparent;
font-size: 1em;
border-radius: .28571429rem;
box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.22) inset, 0 0 0 0 transparent; }
.noty_theme__semanticui.noty_bar .noty_body {
padding: 1em 1.5em;
line-height: 1.4285em; }
.noty_theme__semanticui.noty_bar .noty_buttons {
padding: 10px; }
.noty_theme__semanticui.noty_type__alert,
.noty_theme__semanticui.noty_type__notification {
background-color: #f8f8f9;
color: rgba(0, 0, 0, 0.87); }
.noty_theme__semanticui.noty_type__warning {
background-color: #fffaf3;
color: #573a08;
box-shadow: 0 0 0 1px #c9ba9b inset, 0 0 0 0 transparent; }
.noty_theme__semanticui.noty_type__error {
background-color: #fff6f6;
color: #9f3a38;
box-shadow: 0 0 0 1px #e0b4b4 inset, 0 0 0 0 transparent; }
.noty_theme__semanticui.noty_type__info,
.noty_theme__semanticui.noty_type__information {
background-color: #f8ffff;
color: #276f86;
box-shadow: 0 0 0 1px #a9d5de inset, 0 0 0 0 transparent; }
.noty_theme__semanticui.noty_type__success {
background-color: #fcfff5;
color: #2c662d;
box-shadow: 0 0 0 1px #a3c293 inset, 0 0 0 0 transparent; }

41
node_modules/noty/lib/themes/sunset.css generated vendored Normal file
View File

@@ -0,0 +1,41 @@
.noty_theme__sunset.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative; }
.noty_theme__sunset.noty_bar .noty_body {
padding: 10px;
font-size: 14px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); }
.noty_theme__sunset.noty_bar .noty_buttons {
padding: 10px; }
.noty_theme__sunset.noty_type__alert,
.noty_theme__sunset.noty_type__notification {
background-color: #073B4C;
color: #fff; }
.noty_theme__sunset.noty_type__alert .noty_progressbar,
.noty_theme__sunset.noty_type__notification .noty_progressbar {
background-color: #fff; }
.noty_theme__sunset.noty_type__warning {
background-color: #FFD166;
color: #fff; }
.noty_theme__sunset.noty_type__error {
background-color: #EF476F;
color: #fff; }
.noty_theme__sunset.noty_type__error .noty_progressbar {
opacity: .4; }
.noty_theme__sunset.noty_type__info,
.noty_theme__sunset.noty_type__information {
background-color: #118AB2;
color: #fff; }
.noty_theme__sunset.noty_type__info .noty_progressbar,
.noty_theme__sunset.noty_type__information .noty_progressbar {
opacity: .6; }
.noty_theme__sunset.noty_type__success {
background-color: #06D6A0;
color: #fff; }

121
node_modules/noty/package.json generated vendored Normal file
View File

@@ -0,0 +1,121 @@
{
"_from": "noty",
"_id": "noty@3.2.0-beta",
"_inBundle": false,
"_integrity": "sha512-a1//Rth1MTQ/GCvGzwBXrZqCwOPyxiIKMdHT1TlcdrDYBYVfb7vzwsU0N4x+j/HeIQTi6/pbP8lRtY9gBz/d3Q==",
"_location": "/noty",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "noty",
"name": "noty",
"escapedName": "noty",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/noty/-/noty-3.2.0-beta.tgz",
"_shasum": "cd1117277a1b83c9b08dfc78f968c6c5960d3cfa",
"_spec": "noty",
"_where": "D:\\Projects\\siag\\vanillajs-seed",
"author": {
"name": "Nedim Arabacı",
"url": "http://ned.im"
},
"bugs": {
"url": "https://github.com/needim/noty/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Noty is a dependency-free notification library that makes it easy to create alert - success - error - warning - information - confirmation messages as an alternative the standard alert dialog. Each notification is added to a queue. (Optional)",
"devDependencies": {
"autoprefixer": "^6.3.6",
"babel-core": "6.24.1",
"babel-eslint": "7.2.2",
"babel-loader": "6.4.1",
"babel-plugin-add-module-exports": "0.2.1",
"babel-preset-es2015": "6.24.1",
"browser-sync": "^2.19.0",
"browser-sync-webpack-plugin": "^1.2.0",
"browserstack-runner": "^0.5.2",
"css-loader": "^0.26.0",
"docsify-cli": "^4.1.9",
"es6-promise": "^4.1.0",
"eslint": "^4.3.0",
"eslint-loader": "1.9.0",
"extract-text-webpack-plugin": "2.1.0",
"grunt": "^1.0.1",
"grunt-banner": "^0.6.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-qunit": "^2.0.0",
"grunt-curl": "^2.2.1",
"grunt-exec": "^2.0.0",
"grunt-sass": "^2.0.0",
"load-grunt-tasks": "^3.5.2",
"node-sass": "^4.1.0",
"postcss-loader": "^1.0.0",
"pre-commit": "^1.2.2",
"prettier-standard": "^3.0.1",
"sass-loader": "^4.0.1",
"standard": "^10.0.2",
"standard-loader": "^6.0.1",
"style-loader": "^0.13.1",
"web-push": "^3.2.2",
"webpack": "2.4.1",
"yargs": "7.0.2"
},
"files": [
"lib",
"src",
"index.d.ts"
],
"homepage": "https://ned.im/noty",
"keywords": [
"noty",
"notification",
"alert",
"confirm",
"confirmation",
"success",
"error",
"warning",
"information"
],
"license": "MIT",
"main": "lib/noty.js",
"name": "noty",
"pre-commit": [
"precommit-msg",
"test"
],
"repository": {
"type": "git",
"url": "git://github.com/needim/noty.git"
},
"scripts": {
"browserstack": "browserstack-runner",
"build": "grunt themes && webpack --env dev && webpack --env build && grunt banner",
"dev": "grunt themes && webpack --progress --colors --watch --env dev",
"format": "prettier-standard 'src/**/*.js'",
"precommit-msg": "echo 'Pre-commit checks...' && exit 0",
"serve-docs": "docsify start ./docs",
"test": "npm run format && standard && grunt test"
},
"standard": {
"ignore": [
"demo/**/*",
"docs/**/*",
"lib/**",
"test/**"
],
"parser": "babel-eslint"
},
"title": "Noty - Dependency-free notification library",
"types": "index.d.ts",
"version": "3.2.0-beta"
}

419
node_modules/noty/src/api.js generated vendored Normal file
View File

@@ -0,0 +1,419 @@
import * as Utils from 'utils'
export let PageHidden = false
export let DocModalCount = 0
const DocTitleProps = {
originalTitle: null,
count: 0,
changed: false,
timer: -1
}
export const docTitle = {
increment: () => {
DocTitleProps.count++
docTitle._update()
},
decrement: () => {
DocTitleProps.count--
if (DocTitleProps.count <= 0) {
docTitle._clear()
return
}
docTitle._update()
},
_update: () => {
let title = document.title
if (!DocTitleProps.changed) {
DocTitleProps.originalTitle = title
document.title = `(${DocTitleProps.count}) ${title}`
DocTitleProps.changed = true
} else {
document.title = `(${DocTitleProps.count}) ${DocTitleProps.originalTitle}`
}
},
_clear: () => {
if (DocTitleProps.changed) {
DocTitleProps.count = 0
document.title = DocTitleProps.originalTitle
DocTitleProps.changed = false
}
}
}
export const DefaultMaxVisible = 5
export const Queues = {
global: {
maxVisible: DefaultMaxVisible,
queue: []
}
}
export const Store = {}
export let Defaults = {
type: 'alert',
layout: 'topRight',
theme: 'mint',
text: '',
timeout: false,
progressBar: true,
closeWith: ['click'],
animation: {
open: 'noty_effects_open',
close: 'noty_effects_close'
},
id: false,
force: false,
killer: false,
queue: 'global',
container: false,
buttons: [],
callbacks: {
beforeShow: null,
onShow: null,
afterShow: null,
onClose: null,
afterClose: null,
onClick: null,
onHover: null,
onTemplate: null
},
sounds: {
sources: [],
volume: 1,
conditions: []
},
titleCount: {
conditions: []
},
modal: false,
visibilityControl: false
}
/**
* @param {string} queueName
* @return {object}
*/
export function getQueueCounts (queueName = 'global') {
let count = 0
let max = DefaultMaxVisible
if (Queues.hasOwnProperty(queueName)) {
max = Queues[queueName].maxVisible
Object.keys(Store).forEach(i => {
if (Store[i].options.queue === queueName && !Store[i].closed) count++
})
}
return {
current: count,
maxVisible: max
}
}
/**
* @param {Noty} ref
* @return {void}
*/
export function addToQueue (ref) {
if (!Queues.hasOwnProperty(ref.options.queue)) {
Queues[ref.options.queue] = {maxVisible: DefaultMaxVisible, queue: []}
}
Queues[ref.options.queue].queue.push(ref)
}
/**
* @param {Noty} ref
* @return {void}
*/
export function removeFromQueue (ref) {
if (Queues.hasOwnProperty(ref.options.queue)) {
const queue = []
Object.keys(Queues[ref.options.queue].queue).forEach(i => {
if (Queues[ref.options.queue].queue[i].id !== ref.id) {
queue.push(Queues[ref.options.queue].queue[i])
}
})
Queues[ref.options.queue].queue = queue
}
}
/**
* @param {string} queueName
* @return {void}
*/
export function queueRender (queueName = 'global') {
if (Queues.hasOwnProperty(queueName)) {
const noty = Queues[queueName].queue.shift()
if (noty) noty.show()
}
}
/**
* @return {void}
*/
export function queueRenderAll () {
Object.keys(Queues).forEach(queueName => {
queueRender(queueName)
})
}
/**
* @param {Noty} ref
* @return {void}
*/
export function ghostFix (ref) {
const ghostID = Utils.generateID('ghost')
let ghost = document.createElement('div')
ghost.setAttribute('id', ghostID)
Utils.css(ghost, {
height: Utils.outerHeight(ref.barDom) + 'px'
})
ref.barDom.insertAdjacentHTML('afterend', ghost.outerHTML)
Utils.remove(ref.barDom)
ghost = document.getElementById(ghostID)
Utils.addClass(ghost, 'noty_fix_effects_height')
Utils.addListener(ghost, Utils.animationEndEvents, () => {
Utils.remove(ghost)
})
}
/**
* @param {Noty} ref
* @return {void}
*/
export function build (ref) {
findOrCreateContainer(ref)
const markup = `<div class="noty_body">${ref.options.text}</div>${buildButtons(ref)}<div class="noty_progressbar"></div>`
ref.barDom = document.createElement('div')
ref.barDom.setAttribute('id', ref.id)
Utils.addClass(
ref.barDom,
`noty_bar noty_type__${ref.options.type} noty_theme__${ref.options.theme}`
)
ref.barDom.innerHTML = markup
fire(ref, 'onTemplate')
}
/**
* @param {Noty} ref
* @return {boolean}
*/
export function hasButtons (ref) {
return !!(ref.options.buttons && Object.keys(ref.options.buttons).length)
}
/**
* @param {Noty} ref
* @return {string}
*/
function buildButtons (ref) {
if (hasButtons(ref)) {
let buttons = document.createElement('div')
Utils.addClass(buttons, 'noty_buttons')
Object.keys(ref.options.buttons).forEach(key => {
buttons.appendChild(ref.options.buttons[key].dom)
})
ref.options.buttons.forEach(btn => {
buttons.appendChild(btn.dom)
})
return buttons.outerHTML
}
return ''
}
/**
* @param {Noty} ref
* @return {void}
*/
export function handleModal (ref) {
if (ref.options.modal) {
if (DocModalCount === 0) {
createModal(ref)
}
DocModalCount++
}
}
/**
* @param {Noty} ref
* @return {void}
*/
export function handleModalClose (ref) {
if (ref.options.modal && DocModalCount > 0) {
DocModalCount--
if (DocModalCount <= 0) {
const modal = document.querySelector('.noty_modal')
if (modal) {
Utils.removeClass(modal, 'noty_modal_open')
Utils.addClass(modal, 'noty_modal_close')
Utils.addListener(modal, Utils.animationEndEvents, () => {
Utils.remove(modal)
})
}
}
}
}
/**
* @return {void}
*/
function createModal () {
const body = document.querySelector('body')
const modal = document.createElement('div')
Utils.addClass(modal, 'noty_modal')
body.insertBefore(modal, body.firstChild)
Utils.addClass(modal, 'noty_modal_open')
Utils.addListener(modal, Utils.animationEndEvents, () => {
Utils.removeClass(modal, 'noty_modal_open')
})
}
/**
* @param {Noty} ref
* @return {void}
*/
function findOrCreateContainer (ref) {
if (ref.options.container) {
ref.layoutDom = document.querySelector(ref.options.container)
return
}
const layoutID = `noty_layout__${ref.options.layout}`
ref.layoutDom = document.querySelector(`div#${layoutID}`)
if (!ref.layoutDom) {
ref.layoutDom = document.createElement('div')
ref.layoutDom.setAttribute('id', layoutID)
ref.layoutDom.setAttribute('role', 'alert')
ref.layoutDom.setAttribute('aria-live', 'polite')
Utils.addClass(ref.layoutDom, 'noty_layout')
document.querySelector('body').appendChild(ref.layoutDom)
}
}
/**
* @param {Noty} ref
* @return {void}
*/
export function queueClose (ref) {
if (ref.options.timeout) {
if (ref.options.progressBar && ref.progressDom) {
Utils.css(ref.progressDom, {
transition: `width ${ref.options.timeout}ms linear`,
width: '0%'
})
}
clearTimeout(ref.closeTimer)
ref.closeTimer = setTimeout(
() => {
ref.close()
},
ref.options.timeout
)
}
}
/**
* @param {Noty} ref
* @return {void}
*/
export function dequeueClose (ref) {
if (ref.options.timeout && ref.closeTimer) {
clearTimeout(ref.closeTimer)
ref.closeTimer = -1
if (ref.options.progressBar && ref.progressDom) {
Utils.css(ref.progressDom, {
transition: 'width 0ms linear',
width: '100%'
})
}
}
}
/**
* @param {Noty} ref
* @param {string} eventName
* @return {void}
*/
export function fire (ref, eventName) {
if (ref.listeners.hasOwnProperty(eventName)) {
ref.listeners[eventName].forEach(cb => {
if (typeof cb === 'function') {
cb.apply(ref)
}
})
}
}
/**
* @param {Noty} ref
* @return {void}
*/
export function openFlow (ref) {
fire(ref, 'afterShow')
queueClose(ref)
Utils.addListener(ref.barDom, 'mouseenter', () => {
dequeueClose(ref)
})
Utils.addListener(ref.barDom, 'mouseleave', () => {
queueClose(ref)
})
}
/**
* @param {Noty} ref
* @return {void}
*/
export function closeFlow (ref) {
delete Store[ref.id]
ref.closing = false
fire(ref, 'afterClose')
Utils.remove(ref.barDom)
if (
ref.layoutDom.querySelectorAll('.noty_bar').length === 0 &&
!ref.options.container
) {
Utils.remove(ref.layoutDom)
}
if (
Utils.inArray('docVisible', ref.options.titleCount.conditions) ||
Utils.inArray('docHidden', ref.options.titleCount.conditions)
) {
docTitle.decrement()
}
queueRender(ref.options.queue)
}

16
node_modules/noty/src/button.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import * as Utils from 'utils'
export class NotyButton {
constructor (html, classes, cb, attributes = {}) {
this.dom = document.createElement('button')
this.dom.innerHTML = html
this.id = (attributes.id = attributes.id || Utils.generateID('button'))
this.cb = cb
Object.keys(attributes).forEach(propertyName => {
this.dom.setAttribute(propertyName, attributes[propertyName])
})
Utils.addClass(this.dom, classes || 'noty_btn')
return this
}
}

493
node_modules/noty/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,493 @@
/* global VERSION */
import 'noty.scss'
import Promise from 'es6-promise'
import * as Utils from 'utils'
import * as API from 'api'
import { NotyButton } from 'button'
import { Push } from 'push'
export default class Noty {
/**
* @param {object} options
* @return {Noty}
*/
constructor (options = {}) {
this.options = Utils.deepExtend({}, API.Defaults, options)
if (API.Store[this.options.id]) {
return API.Store[this.options.id]
}
this.id = this.options.id || Utils.generateID('bar')
this.closeTimer = -1
this.barDom = null
this.layoutDom = null
this.progressDom = null
this.showing = false
this.shown = false
this.closed = false
this.closing = false
this.killable = this.options.timeout || this.options.closeWith.length > 0
this.hasSound = this.options.sounds.sources.length > 0
this.soundPlayed = false
this.listeners = {
beforeShow: [],
onShow: [],
afterShow: [],
onClose: [],
afterClose: [],
onClick: [],
onHover: [],
onTemplate: []
}
this.promises = {
show: null,
close: null
}
this.on('beforeShow', this.options.callbacks.beforeShow)
this.on('onShow', this.options.callbacks.onShow)
this.on('afterShow', this.options.callbacks.afterShow)
this.on('onClose', this.options.callbacks.onClose)
this.on('afterClose', this.options.callbacks.afterClose)
this.on('onClick', this.options.callbacks.onClick)
this.on('onHover', this.options.callbacks.onHover)
this.on('onTemplate', this.options.callbacks.onTemplate)
return this
}
/**
* @param {string} eventName
* @param {function} cb
* @return {Noty}
*/
on (eventName, cb = () => {}) {
if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {
this.listeners[eventName].push(cb)
}
return this
}
/**
* @return {Noty}
*/
show () {
if (this.showing || this.shown) {
return this // preventing multiple show
}
if (this.options.killer === true) {
Noty.closeAll()
} else if (typeof this.options.killer === 'string') {
Noty.closeAll(this.options.killer)
}
let queueCounts = API.getQueueCounts(this.options.queue)
if (
queueCounts.current >= queueCounts.maxVisible ||
(API.PageHidden && this.options.visibilityControl)
) {
API.addToQueue(this)
if (
API.PageHidden &&
this.hasSound &&
Utils.inArray('docHidden', this.options.sounds.conditions)
) {
Utils.createAudioElements(this)
}
if (
API.PageHidden &&
Utils.inArray('docHidden', this.options.titleCount.conditions)
) {
API.docTitle.increment()
}
return this
}
API.Store[this.id] = this
API.fire(this, 'beforeShow')
this.showing = true
if (this.closing) {
this.showing = false
return this
}
API.build(this)
API.handleModal(this)
if (this.options.force) {
this.layoutDom.insertBefore(this.barDom, this.layoutDom.firstChild)
} else {
this.layoutDom.appendChild(this.barDom)
}
if (
this.hasSound &&
!this.soundPlayed &&
Utils.inArray('docVisible', this.options.sounds.conditions)
) {
Utils.createAudioElements(this)
}
if (Utils.inArray('docVisible', this.options.titleCount.conditions)) {
API.docTitle.increment()
}
this.shown = true
this.closed = false
// bind button events if any
if (API.hasButtons(this)) {
Object.keys(this.options.buttons).forEach(key => {
const btn = this.barDom.querySelector(
`#${this.options.buttons[key].id}`
)
Utils.addListener(btn, 'click', e => {
Utils.stopPropagation(e)
this.options.buttons[key].cb(this)
})
})
}
this.progressDom = this.barDom.querySelector('.noty_progressbar')
if (Utils.inArray('click', this.options.closeWith)) {
Utils.addClass(this.barDom, 'noty_close_with_click')
Utils.addListener(
this.barDom,
'click',
e => {
Utils.stopPropagation(e)
API.fire(this, 'onClick')
this.close()
},
false
)
}
Utils.addListener(
this.barDom,
'mouseenter',
() => {
API.fire(this, 'onHover')
},
false
)
if (this.options.timeout) Utils.addClass(this.barDom, 'noty_has_timeout')
if (this.options.progressBar) {
Utils.addClass(this.barDom, 'noty_has_progressbar')
}
if (Utils.inArray('button', this.options.closeWith)) {
Utils.addClass(this.barDom, 'noty_close_with_button')
const closeButton = document.createElement('div')
Utils.addClass(closeButton, 'noty_close_button')
closeButton.innerHTML = '×'
this.barDom.appendChild(closeButton)
Utils.addListener(
closeButton,
'click',
e => {
Utils.stopPropagation(e)
this.close()
},
false
)
}
API.fire(this, 'onShow')
if (this.options.animation.open === null) {
this.promises.show = new Promise(resolve => {
resolve()
})
} else if (typeof this.options.animation.open === 'function') {
this.promises.show = new Promise(this.options.animation.open.bind(this))
} else {
Utils.addClass(this.barDom, this.options.animation.open)
this.promises.show = new Promise(resolve => {
Utils.addListener(this.barDom, Utils.animationEndEvents, () => {
Utils.removeClass(this.barDom, this.options.animation.open)
resolve()
})
})
}
this.promises.show.then(() => {
const _t = this
setTimeout(
() => {
API.openFlow(_t)
},
100
)
})
return this
}
/**
* @return {Noty}
*/
stop () {
API.dequeueClose(this)
return this
}
/**
* @return {Noty}
*/
resume () {
API.queueClose(this)
return this
}
/**
* @param {int|boolean} ms
* @return {Noty}
*/
setTimeout (ms) {
this.stop()
this.options.timeout = ms
if (this.barDom) {
if (this.options.timeout) {
Utils.addClass(this.barDom, 'noty_has_timeout')
} else {
Utils.removeClass(this.barDom, 'noty_has_timeout')
}
const _t = this
setTimeout(
function () {
// ugly fix for progressbar display bug
_t.resume()
},
100
)
}
return this
}
/**
* @param {string} html
* @param {boolean} optionsOverride
* @return {Noty}
*/
setText (html, optionsOverride = false) {
if (this.barDom) {
this.barDom.querySelector('.noty_body').innerHTML = html
}
if (optionsOverride) this.options.text = html
return this
}
/**
* @param {string} type
* @param {boolean} optionsOverride
* @return {Noty}
*/
setType (type, optionsOverride = false) {
if (this.barDom) {
let classList = Utils.classList(this.barDom).split(' ')
classList.forEach(c => {
if (c.substring(0, 11) === 'noty_type__') {
Utils.removeClass(this.barDom, c)
}
})
Utils.addClass(this.barDom, `noty_type__${type}`)
}
if (optionsOverride) this.options.type = type
return this
}
/**
* @param {string} theme
* @param {boolean} optionsOverride
* @return {Noty}
*/
setTheme (theme, optionsOverride = false) {
if (this.barDom) {
let classList = Utils.classList(this.barDom).split(' ')
classList.forEach(c => {
if (c.substring(0, 12) === 'noty_theme__') {
Utils.removeClass(this.barDom, c)
}
})
Utils.addClass(this.barDom, `noty_theme__${theme}`)
}
if (optionsOverride) this.options.theme = theme
return this
}
/**
* @return {Noty}
*/
close () {
if (this.closed) return this
if (!this.shown) {
// it's in the queue
API.removeFromQueue(this)
return this
}
API.fire(this, 'onClose')
this.closing = true
if (this.options.animation.close === null || this.options.animation.close === false) {
this.promises.close = new Promise(resolve => {
resolve()
})
} else if (typeof this.options.animation.close === 'function') {
this.promises.close = new Promise(
this.options.animation.close.bind(this)
)
} else {
Utils.addClass(this.barDom, this.options.animation.close)
this.promises.close = new Promise(resolve => {
Utils.addListener(this.barDom, Utils.animationEndEvents, () => {
if (this.options.force) {
Utils.remove(this.barDom)
} else {
API.ghostFix(this)
}
resolve()
})
})
}
this.promises.close.then(() => {
API.closeFlow(this)
API.handleModalClose(this)
})
this.closed = true
return this
}
// API functions
/**
* @param {boolean|string} queueName
* @return {Noty}
*/
static closeAll (queueName = false) {
Object.keys(API.Store).forEach(id => {
if (queueName) {
if (
API.Store[id].options.queue === queueName && API.Store[id].killable
) {
API.Store[id].close()
}
} else if (API.Store[id].killable) {
API.Store[id].close()
}
})
return this
}
/**
* @param {string} queueName
* @return {Noty}
*/
static clearQueue (queueName = 'global') {
if (API.Queues.hasOwnProperty(queueName)) {
API.Queues[queueName].queue = []
}
return this
}
/**
* @return {API.Queues}
*/
static get Queues () {
return API.Queues
}
/**
* @return {API.PageHidden}
*/
static get PageHidden () {
return API.PageHidden
}
/**
* @param {Object} obj
* @return {Noty}
*/
static overrideDefaults (obj) {
API.Defaults = Utils.deepExtend({}, API.Defaults, obj)
return this
}
/**
* @param {int} amount
* @param {string} queueName
* @return {Noty}
*/
static setMaxVisible (amount = API.DefaultMaxVisible, queueName = 'global') {
if (!API.Queues.hasOwnProperty(queueName)) {
API.Queues[queueName] = {maxVisible: amount, queue: []}
}
API.Queues[queueName].maxVisible = amount
return this
}
/**
* @param {string} innerHtml
* @param {String} classes
* @param {Function} cb
* @param {Object} attributes
* @return {NotyButton}
*/
static button (innerHtml, classes = null, cb, attributes = {}) {
return new NotyButton(innerHtml, classes, cb, attributes)
}
/**
* @return {string}
*/
static version () {
return VERSION
}
/**
* @param {String} workerPath
* @return {Push}
*/
static Push (workerPath) {
return new Push(workerPath)
}
}
// Document visibility change controller
if (typeof window !== 'undefined') {
Utils.visibilityChangeFlow()
}

228
node_modules/noty/src/noty.scss generated vendored Normal file
View File

@@ -0,0 +1,228 @@
$noty-primary-color: #333;
$noty-default-width: 325px;
$noty-corner-space: 20px;
.noty_layout_mixin {
position: fixed;
margin: 0;
padding: 0;
z-index: 9999999;
transform: translateZ(0) scale(1.0, 1.0);
backface-visibility: hidden;
-webkit-font-smoothing: subpixel-antialiased;
filter: blur(0);
-webkit-filter: blur(0);
max-width: 90%;
}
#noty_layout__top {
@extend .noty_layout_mixin;
top: 0;
left: 5%;
width: 90%;
}
#noty_layout__topLeft {
@extend .noty_layout_mixin;
top: $noty-corner-space;
left: $noty-corner-space;
width: $noty-default-width;
}
#noty_layout__topCenter {
@extend .noty_layout_mixin;
top: 5%;
left: 50%;
width: $noty-default-width;
transform: translate(calc(-50% - .5px)) translateZ(0) scale(1.0, 1.0);
}
#noty_layout__topRight {
@extend .noty_layout_mixin;
top: $noty-corner-space;
right: $noty-corner-space;
width: $noty-default-width;
}
#noty_layout__bottom {
@extend .noty_layout_mixin;
bottom: 0;
left: 5%;
width: 90%;
}
#noty_layout__bottomLeft {
@extend .noty_layout_mixin;
bottom: $noty-corner-space;
left: $noty-corner-space;
width: $noty-default-width;
}
#noty_layout__bottomCenter {
@extend .noty_layout_mixin;
bottom: 5%;
left: 50%;
width: $noty-default-width;
transform: translate(calc(-50% - .5px)) translateZ(0) scale(1.0, 1.0);
}
#noty_layout__bottomRight {
@extend .noty_layout_mixin;
bottom: $noty-corner-space;
right: $noty-corner-space;
width: $noty-default-width;
}
#noty_layout__center {
@extend .noty_layout_mixin;
top: 50%;
left: 50%;
width: $noty-default-width;
transform: translate(calc(-50% - .5px), calc(-50% - .5px)) translateZ(0) scale(1.0, 1.0);
}
#noty_layout__centerLeft {
@extend .noty_layout_mixin;
top: 50%;
left: $noty-corner-space;
width: $noty-default-width;
transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1.0, 1.0);
}
#noty_layout__centerRight {
@extend .noty_layout_mixin;
top: 50%;
right: $noty-corner-space;
width: $noty-default-width;
transform: translate(0, calc(-50% - .5px)) translateZ(0) scale(1, 1);
}
.noty_progressbar {
display: none;
}
.noty_has_timeout.noty_has_progressbar .noty_progressbar {
display: block;
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 100%;
background-color: #646464;
opacity: 0.2;
filter: alpha(opacity=10)
}
.noty_bar {
-webkit-backface-visibility: hidden;
-webkit-transform: translate(0, 0) translateZ(0) scale(1.0, 1.0);
transform: translate(0, 0) scale(1.0, 1.0);
-webkit-font-smoothing: subpixel-antialiased;
overflow: hidden;
}
.noty_effects_open {
opacity: 0;
transform: translate(50%);
animation: noty_anim_in .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
animation-fill-mode: forwards;
}
.noty_effects_close {
animation: noty_anim_out .5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
animation-fill-mode: forwards;
}
.noty_fix_effects_height {
animation: noty_anim_height 75ms ease-out;
}
.noty_close_with_click {
cursor: pointer;
}
.noty_close_button {
position: absolute;
top: 2px;
right: 2px;
font-weight: bold;
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
background-color: rgba(0, 0, 0, .05);
border-radius: 2px;
cursor: pointer;
transition: all .2s ease-out;
}
.noty_close_button:hover {
background-color: rgba(0, 0, 0, .1);
}
.noty_modal {
position: fixed;
width: 100%;
height: 100%;
background-color: #000;
z-index: 10000;
opacity: .3;
left: 0;
top: 0;
}
.noty_modal.noty_modal_open {
opacity: 0;
animation: noty_modal_in .3s ease-out;
}
.noty_modal.noty_modal_close {
animation: noty_modal_out .3s ease-out;
animation-fill-mode: forwards;
}
@keyframes noty_modal_in {
100% {
opacity: .3;
}
}
@keyframes noty_modal_out {
100% {
opacity: 0;
}
}
@keyframes noty_modal_out {
100% {
opacity: 0;
}
}
@keyframes noty_anim_in {
100% {
transform: translate(0);
opacity: 1;
}
}
@keyframes noty_anim_out {
100% {
transform: translate(50%);
opacity: 0;
}
}
@keyframes noty_anim_height {
100% {
height: 0;
}
}
//@import "themes/relax";
//@import "themes/metroui";
//@import "themes/mint";
//@import "themes/sunset";
//@import "themes/bootstrap-v3";
//@import "themes/bootstrap-v4";
//@import "themes/semanticui";
//@import "themes/nest";
//@import "themes/light";

204
node_modules/noty/src/push.js generated vendored Normal file
View File

@@ -0,0 +1,204 @@
export class Push {
constructor (workerPath = '/service-worker.js') {
this.subData = {}
this.workerPath = workerPath
this.listeners = {
onPermissionGranted: [],
onPermissionDenied: [],
onSubscriptionSuccess: [],
onSubscriptionCancel: [],
onWorkerError: [],
onWorkerSuccess: [],
onWorkerNotSupported: []
}
return this
}
/**
* @param {string} eventName
* @param {function} cb
* @return {Push}
*/
on (eventName, cb = () => {}) {
if (typeof cb === 'function' && this.listeners.hasOwnProperty(eventName)) {
this.listeners[eventName].push(cb)
}
return this
}
fire (eventName, params = []) {
if (this.listeners.hasOwnProperty(eventName)) {
this.listeners[eventName].forEach(cb => {
if (typeof cb === 'function') {
cb.apply(this, params)
}
})
}
}
create () {
console.log('NOT IMPLEMENTED YET')
}
/**
* @return {boolean}
*/
isSupported () {
let result = false
try {
result = window.Notification ||
window.webkitNotifications ||
navigator.mozNotification ||
(window.external && window.external.msIsSiteMode() !== undefined)
} catch (e) {}
return result
}
/**
* @return {string}
*/
getPermissionStatus () {
let perm = 'default'
if (window.Notification && window.Notification.permissionLevel) {
perm = window.Notification.permissionLevel
} else if (
window.webkitNotifications && window.webkitNotifications.checkPermission
) {
switch (window.webkitNotifications.checkPermission()) {
case 1:
perm = 'default'
break
case 0:
perm = 'granted'
break
default:
perm = 'denied'
}
} else if (window.Notification && window.Notification.permission) {
perm = window.Notification.permission
} else if (navigator.mozNotification) {
perm = 'granted'
} else if (
window.external && window.external.msIsSiteMode() !== undefined
) {
perm = window.external.msIsSiteMode() ? 'granted' : 'default'
}
return perm.toString().toLowerCase()
}
/**
* @return {string}
*/
getEndpoint (subscription) {
let endpoint = subscription.endpoint
const subscriptionId = subscription.subscriptionId
// fix for Chrome < 45
if (subscriptionId && endpoint.indexOf(subscriptionId) === -1) {
endpoint += '/' + subscriptionId
}
return endpoint
}
/**
* @return {boolean}
*/
isSWRegistered () {
try {
return navigator.serviceWorker.controller.state === 'activated'
} catch (e) {
return false
}
}
/**
* @return {void}
*/
unregisterWorker () {
const self = this
if ('serviceWorker' in navigator) {
navigator.serviceWorker.getRegistrations().then(function (registrations) {
for (let registration of registrations) {
registration.unregister()
self.fire('onSubscriptionCancel')
}
})
}
}
/**
* @return {void}
*/
requestSubscription (userVisibleOnly = true) {
const self = this
const current = this.getPermissionStatus()
const cb = result => {
if (result === 'granted') {
this.fire('onPermissionGranted')
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register(this.workerPath).then(function () {
navigator.serviceWorker.ready.then(
function (serviceWorkerRegistration) {
self.fire('onWorkerSuccess')
serviceWorkerRegistration.pushManager
.subscribe({
userVisibleOnly: userVisibleOnly
})
.then(function (subscription) {
const key = subscription.getKey('p256dh')
const token = subscription.getKey('auth')
self.subData = {
endpoint: self.getEndpoint(subscription),
p256dh: key
? window.btoa(
String.fromCharCode.apply(null, new Uint8Array(key))
)
: null,
auth: token
? window.btoa(
String.fromCharCode.apply(
null,
new Uint8Array(token)
)
)
: null
}
self.fire('onSubscriptionSuccess', [self.subData])
})
.catch(function (err) {
self.fire('onWorkerError', [err])
})
}
)
})
} else {
self.fire('onWorkerNotSupported')
}
} else if (result === 'denied') {
this.fire('onPermissionDenied')
this.unregisterWorker()
}
}
if (current === 'default') {
if (window.Notification && window.Notification.requestPermission) {
window.Notification.requestPermission(cb)
} else if (
window.webkitNotifications && window.webkitNotifications.checkPermission
) {
window.webkitNotifications.requestPermission(cb)
}
} else {
cb(current)
}
}
}

64
node_modules/noty/src/themes/bootstrap-v3.scss generated vendored Normal file
View File

@@ -0,0 +1,64 @@
.noty_theme__bootstrap-v3.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
border: 1px solid transparent;
border-radius: 4px;
.noty_body {
padding: 15px;
}
.noty_buttons {
padding: 10px;
}
.noty_close_button {
font-size: 21px;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
filter: alpha(opacity=20);
opacity: .2;
background: transparent;
}
.noty_close_button:hover {
background: transparent;
text-decoration: none;
cursor: pointer;
filter: alpha(opacity=50);
opacity: .5;
}
}
.noty_theme__bootstrap-v3.noty_type__alert,
.noty_theme__bootstrap-v3.noty_type__notification {
background-color: #fff;
color: inherit;
}
.noty_theme__bootstrap-v3.noty_type__warning {
background-color: #fcf8e3;
color: #8a6d3b;
border-color: #faebcc;
}
.noty_theme__bootstrap-v3.noty_type__error {
background-color: #f2dede;
color: #a94442;
border-color: #ebccd1;
}
.noty_theme__bootstrap-v3.noty_type__info,
.noty_theme__bootstrap-v3.noty_type__information {
background-color: #d9edf7;
color: #31708f;
border-color: #bce8f1;
}
.noty_theme__bootstrap-v3.noty_type__success {
background-color: #dff0d8;
color: #3c763d;
border-color: #d6e9c6;
}

65
node_modules/noty/src/themes/bootstrap-v4.scss generated vendored Normal file
View File

@@ -0,0 +1,65 @@
.noty_theme__bootstrap-v4.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
border: 1px solid transparent;
border-radius: .25rem;
.noty_body {
padding: .75rem 1.25rem;
}
.noty_buttons {
padding: 10px;
}
.noty_close_button {
font-size: 1.5rem;
font-weight: 700;
line-height: 1;
color: #000;
text-shadow: 0 1px 0 #fff;
filter: alpha(opacity=20);
opacity: .5;
background: transparent;
}
.noty_close_button:hover {
background: transparent;
text-decoration: none;
cursor: pointer;
filter: alpha(opacity=50);
opacity: .75;
}
}
.noty_theme__bootstrap-v4.noty_type__alert,
.noty_theme__bootstrap-v4.noty_type__notification {
background-color: #fff;
color: inherit;
}
.noty_theme__bootstrap-v4.noty_type__warning {
background-color: #fcf8e3;
color: #8a6d3b;
border-color: #faebcc;
}
.noty_theme__bootstrap-v4.noty_type__error {
background-color: #f2dede;
color: #a94442;
border-color: #ebccd1;
}
.noty_theme__bootstrap-v4.noty_type__info,
.noty_theme__bootstrap-v4.noty_type__information {
background-color: #d9edf7;
color: #31708f;
border-color: #bce8f1;
}
.noty_theme__bootstrap-v4.noty_type__success {
background-color: #dff0d8;
color: #3c763d;
border-color: #d6e9c6;
}

63
node_modules/noty/src/themes/light.scss generated vendored Normal file
View File

@@ -0,0 +1,63 @@
.noty_theme__light.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
.noty_body {
padding: 10px;
}
.noty_buttons {
border-top: 1px solid #e7e7e7;
padding: 5px 10px;
}
}
.noty_theme__light.noty_type__alert,
.noty_theme__light.noty_type__notification {
background-color: #fff;
border: 1px solid #dedede;
color: #444;
}
.noty_theme__light.noty_type__warning {
background-color: #FFEAA8;
border: 1px solid #FFC237;
color: #826200;
.noty_buttons {
border-color: #dfaa30;
}
}
.noty_theme__light.noty_type__error {
background-color: #ED7000;
border: 1px solid #e25353;
color: #FFF;
.noty_buttons {
border-color: darkred;
}
}
.noty_theme__light.noty_type__info,
.noty_theme__light.noty_type__information {
background-color: #78C5E7;
border: 1px solid #3badd6;
color: #FFF;
.noty_buttons {
border-color: #0B90C4;
}
}
.noty_theme__light.noty_type__success {
background-color: #57C880;
border: 1px solid #7cdd77;
color: darkgreen;
.noty_buttons {
border-color: #50C24E;
}
}

53
node_modules/noty/src/themes/metroui.scss generated vendored Normal file
View File

@@ -0,0 +1,53 @@
.noty_theme__metroui.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
box-shadow: rgba(0, 0, 0, 0.298039) 0 0 5px 0;
.noty_progressbar {
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 100%;
background-color: #000;
opacity: 0.2;
filter: alpha(opacity=20)
}
.noty_body {
padding: 1.25em;
font-size: 14px;
}
.noty_buttons {
padding: 0 10px .5em 10px;
}
}
.noty_theme__metroui.noty_type__alert,
.noty_theme__metroui.noty_type__notification {
background-color: #fff;
color: #1d1d1d;
}
.noty_theme__metroui.noty_type__warning {
background-color: #FA6800;
color: #fff;
}
.noty_theme__metroui.noty_type__error {
background-color: #CE352C;
color: #FFF;
}
.noty_theme__metroui.noty_type__info,
.noty_theme__metroui.noty_type__information {
background-color: #1BA1E2;
color: #FFF;
}
.noty_theme__metroui.noty_type__success {
background-color: #60A917;
color: #fff;
}

47
node_modules/noty/src/themes/mint.scss generated vendored Normal file
View File

@@ -0,0 +1,47 @@
.noty_theme__mint.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
.noty_body {
padding: 10px;
font-size: 14px;
}
.noty_buttons {
padding: 10px;
}
}
.noty_theme__mint.noty_type__alert,
.noty_theme__mint.noty_type__notification {
background-color: #fff;
border-bottom: 1px solid #D1D1D1;
color: #2F2F2F;
}
.noty_theme__mint.noty_type__warning {
background-color: #FFAE42;
border-bottom: 1px solid #E89F3C;
color: #fff;
}
.noty_theme__mint.noty_type__error {
background-color: #DE636F;
border-bottom: 1px solid #CA5A65;
color: #fff;
}
.noty_theme__mint.noty_type__info,
.noty_theme__mint.noty_type__information {
background-color: #7F7EFF;
border-bottom: 1px solid #7473E8;
color: #fff;
}
.noty_theme__mint.noty_type__success {
background-color: #AFC765;
border-bottom: 1px solid #A0B55C;
color: #fff;
}

146
node_modules/noty/src/themes/nest.scss generated vendored Normal file
View File

@@ -0,0 +1,146 @@
.noty_theme__nest.noty_bar {
margin: 0 0 15px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
box-shadow: rgba(0, 0, 0, 0.098039) 5px 4px 10px 0;
.noty_body {
padding: 10px;
font-size: 14px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, .1);
}
.noty_buttons {
padding: 10px;
}
}
.noty_layout .noty_theme__nest.noty_bar {
z-index: 5;
}
.noty_layout .noty_theme__nest.noty_bar:nth-child(2) {
position: absolute;
top: 0;
margin-top: 4px;
margin-right: -4px;
margin-left: 4px;
z-index: 4;
width: 100%;
}
.noty_layout .noty_theme__nest.noty_bar:nth-child(3) {
position: absolute;
top: 0;
margin-top: 8px;
margin-right: -8px;
margin-left: 8px;
z-index: 3;
width: 100%;
}
.noty_layout .noty_theme__nest.noty_bar:nth-child(4) {
position: absolute;
top: 0;
margin-top: 12px;
margin-right: -12px;
margin-left: 12px;
z-index: 2;
width: 100%;
}
.noty_layout .noty_theme__nest.noty_bar:nth-child(5) {
position: absolute;
top: 0;
margin-top: 16px;
margin-right: -16px;
margin-left: 16px;
z-index: 1;
width: 100%;
}
.noty_layout .noty_theme__nest.noty_bar:nth-child(n+6) {
position: absolute;
top: 0;
margin-top: 20px;
margin-right: -20px;
margin-left: 20px;
z-index: -1;
width: 100%;
}
// left corner stacks
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(2),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(2) {
margin-top: 4px;
margin-left: -4px;
margin-right: 4px;
}
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(3),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(3) {
margin-top: 8px;
margin-left: -8px;
margin-right: 8px;
}
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(4),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(4) {
margin-top: 12px;
margin-left: -12px;
margin-right: 12px;
}
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(5),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(5) {
margin-top: 16px;
margin-left: -16px;
margin-right: 16px;
}
#noty_layout__bottomLeft .noty_theme__nest.noty_bar:nth-child(n+6),
#noty_layout__topLeft .noty_theme__nest.noty_bar:nth-child(n+6) {
margin-top: 20px;
margin-left: -20px;
margin-right: 20px;
}
.noty_theme__nest.noty_type__alert,
.noty_theme__nest.noty_type__notification {
background-color: #073B4C;
color: #fff;
.noty_progressbar {
background-color: #fff;
}
}
.noty_theme__nest.noty_type__warning {
background-color: #FFD166;
color: #fff;
}
.noty_theme__nest.noty_type__error {
background-color: #EF476F;
color: #fff;
.noty_progressbar {
opacity: .4;
}
}
.noty_theme__nest.noty_type__info,
.noty_theme__nest.noty_type__information {
background-color: #118AB2;
color: #fff;
.noty_progressbar {
opacity: .6;
}
}
.noty_theme__nest.noty_type__success {
background-color: #06D6A0;
color: #fff;
}

63
node_modules/noty/src/themes/relax.scss generated vendored Normal file
View File

@@ -0,0 +1,63 @@
.noty_theme__relax.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
.noty_body {
padding: 10px;
}
.noty_buttons {
border-top: 1px solid #e7e7e7;
padding: 5px 10px;
}
}
.noty_theme__relax.noty_type__alert,
.noty_theme__relax.noty_type__notification {
background-color: #fff;
border: 1px solid #dedede;
color: #444;
}
.noty_theme__relax.noty_type__warning {
background-color: #FFEAA8;
border: 1px solid #FFC237;
color: #826200;
.noty_buttons {
border-color: #dfaa30;
}
}
.noty_theme__relax.noty_type__error {
background-color: #FF8181;
border: 1px solid #e25353;
color: #FFF;
.noty_buttons {
border-color: darkred;
}
}
.noty_theme__relax.noty_type__info,
.noty_theme__relax.noty_type__information {
background-color: #78C5E7;
border: 1px solid #3badd6;
color: #FFF;
.noty_buttons {
border-color: #0B90C4;
}
}
.noty_theme__relax.noty_type__success {
background-color: #BCF5BC;
border: 1px solid #7cdd77;
color: darkgreen;
.noty_buttons {
border-color: #50C24E;
}
}

53
node_modules/noty/src/themes/semanticui.scss generated vendored Normal file
View File

@@ -0,0 +1,53 @@
.noty_theme__semanticui.noty_bar {
margin: 4px 0;
overflow: hidden;
position: relative;
border: 1px solid transparent;
font-size: 1em;
border-radius: .28571429rem;
box-shadow: 0 0 0 1px rgba(34,36,38,.22) inset, 0 0 0 0 transparent;
.noty_body {
padding: 1em 1.5em;
line-height: 1.4285em;
}
.noty_buttons {
padding: 10px;
}
}
.noty_theme__semanticui.noty_type__alert,
.noty_theme__semanticui.noty_type__notification {
background-color: #f8f8f9;
color: rgba(0,0,0,.87);
}
.noty_theme__semanticui.noty_type__warning {
background-color: #fffaf3;
color: #573a08;
box-shadow: 0 0 0 1px #c9ba9b inset, 0 0 0 0 transparent;
}
.noty_theme__semanticui.noty_type__error {
background-color: #fff6f6;
color: #9f3a38;
box-shadow: 0 0 0 1px #e0b4b4 inset, 0 0 0 0 transparent;
}
.noty_theme__semanticui.noty_type__info,
.noty_theme__semanticui.noty_type__information {
background-color: #f8ffff;
color: #276f86;
box-shadow: 0 0 0 1px #a9d5de inset, 0 0 0 0 transparent;
}
.noty_theme__semanticui.noty_type__success {
background-color: #fcfff5;
color: #2c662d;
box-shadow: 0 0 0 1px #a3c293 inset, 0 0 0 0 transparent;
}

55
node_modules/noty/src/themes/sunset.scss generated vendored Normal file
View File

@@ -0,0 +1,55 @@
.noty_theme__sunset.noty_bar {
margin: 4px 0;
overflow: hidden;
border-radius: 2px;
position: relative;
.noty_body {
padding: 10px;
font-size: 14px;
text-shadow: 1px 1px 1px rgba(0, 0, 0, .1);
}
.noty_buttons {
padding: 10px;
}
}
.noty_theme__sunset.noty_type__alert,
.noty_theme__sunset.noty_type__notification {
background-color: #073B4C;
color: #fff;
.noty_progressbar {
background-color: #fff;
}
}
.noty_theme__sunset.noty_type__warning {
background-color: #FFD166;
color: #fff;
}
.noty_theme__sunset.noty_type__error {
background-color: #EF476F;
color: #fff;
.noty_progressbar {
opacity: .4;
}
}
.noty_theme__sunset.noty_type__info,
.noty_theme__sunset.noty_type__information {
background-color: #118AB2;
color: #fff;
.noty_progressbar {
opacity: .6;
}
}
.noty_theme__sunset.noty_type__success {
background-color: #06D6A0;
color: #fff;
}

295
node_modules/noty/src/utils.js generated vendored Normal file
View File

@@ -0,0 +1,295 @@
import * as API from 'api'
export const animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'
export function inArray (needle, haystack, argStrict) {
let key
let strict = !!argStrict
if (strict) {
for (key in haystack) {
if (haystack.hasOwnProperty(key) && haystack[key] === needle) {
return true
}
}
} else {
for (key in haystack) {
if (haystack.hasOwnProperty(key) && haystack[key] === needle) {
return true
}
}
}
return false
}
export function stopPropagation (evt) {
evt = evt || window.event
if (typeof evt.stopPropagation !== 'undefined') {
evt.stopPropagation()
} else {
evt.cancelBubble = true
}
}
export const deepExtend = function (out) {
out = out || {}
for (let i = 1; i < arguments.length; i++) {
let obj = arguments[i]
if (!obj) continue
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
if (Array.isArray(obj[key])) {
out[key] = obj[key]
} else if (typeof obj[key] === 'object' && obj[key] !== null) {
out[key] = deepExtend(out[key], obj[key])
} else {
out[key] = obj[key]
}
}
}
}
return out
}
export function generateID (prefix = '') {
let id = `noty_${prefix}_`
id += 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
let r = Math.random() * 16 | 0
let v = c === 'x' ? r : r & 0x3 | 0x8
return v.toString(16)
})
return id
}
export function outerHeight (el) {
let height = el.offsetHeight
let style = window.getComputedStyle(el)
height += parseInt(style.marginTop) + parseInt(style.marginBottom)
return height
}
export let css = (function () {
let cssPrefixes = ['Webkit', 'O', 'Moz', 'ms']
let cssProps = {}
function camelCase (string) {
return string
.replace(/^-ms-/, 'ms-')
.replace(/-([\da-z])/gi, function (match, letter) {
return letter.toUpperCase()
})
}
function getVendorProp (name) {
let style = document.body.style
if (name in style) return name
let i = cssPrefixes.length
let capName = name.charAt(0).toUpperCase() + name.slice(1)
let vendorName
while (i--) {
vendorName = cssPrefixes[i] + capName
if (vendorName in style) return vendorName
}
return name
}
function getStyleProp (name) {
name = camelCase(name)
return cssProps[name] || (cssProps[name] = getVendorProp(name))
}
function applyCss (element, prop, value) {
prop = getStyleProp(prop)
element.style[prop] = value
}
return function (element, properties) {
let args = arguments
let prop
let value
if (args.length === 2) {
for (prop in properties) {
if (properties.hasOwnProperty(prop)) {
value = properties[prop]
if (value !== undefined && properties.hasOwnProperty(prop)) {
applyCss(element, prop, value)
}
}
}
} else {
applyCss(element, args[1], args[2])
}
}
})()
export function addListener (el, events, cb, useCapture = false) {
events = events.split(' ')
for (let i = 0; i < events.length; i++) {
if (document.addEventListener) {
el.addEventListener(events[i], cb, useCapture)
} else if (document.attachEvent) {
el.attachEvent('on' + events[i], cb)
}
}
}
export function hasClass (element, name) {
let list = typeof element === 'string' ? element : classList(element)
return list.indexOf(' ' + name + ' ') >= 0
}
export function addClass (element, name) {
let oldList = classList(element)
let newList = oldList + name
if (hasClass(oldList, name)) return
// Trim the opening space.
element.className = newList.substring(1)
}
export function removeClass (element, name) {
let oldList = classList(element)
let newList
if (!hasClass(element, name)) return
// Replace the class name.
newList = oldList.replace(' ' + name + ' ', ' ')
// Trim the opening and closing spaces.
element.className = newList.substring(1, newList.length - 1)
}
export function remove (element) {
if (element.parentNode) {
element.parentNode.removeChild(element)
}
}
export function classList (element) {
return (' ' + ((element && element.className) || '') + ' ').replace(
/\s+/gi,
' '
)
}
export function visibilityChangeFlow () {
let hidden
let visibilityChange
if (typeof document.hidden !== 'undefined') {
// Opera 12.10 and Firefox 18 and later support
hidden = 'hidden'
visibilityChange = 'visibilitychange'
} else if (typeof document.msHidden !== 'undefined') {
hidden = 'msHidden'
visibilityChange = 'msvisibilitychange'
} else if (typeof document.webkitHidden !== 'undefined') {
hidden = 'webkitHidden'
visibilityChange = 'webkitvisibilitychange'
}
function onVisibilityChange () {
API.PageHidden = document[hidden]
handleVisibilityChange()
}
function onBlur () {
API.PageHidden = true
handleVisibilityChange()
}
function onFocus () {
API.PageHidden = false
handleVisibilityChange()
}
function handleVisibilityChange () {
if (API.PageHidden) stopAll()
else resumeAll()
}
function stopAll () {
setTimeout(
function () {
Object.keys(API.Store).forEach(id => {
if (API.Store.hasOwnProperty(id)) {
if (API.Store[id].options.visibilityControl) {
API.Store[id].stop()
}
}
})
},
100
)
}
function resumeAll () {
setTimeout(
function () {
Object.keys(API.Store).forEach(id => {
if (API.Store.hasOwnProperty(id)) {
if (API.Store[id].options.visibilityControl) {
API.Store[id].resume()
}
}
})
API.queueRenderAll()
},
100
)
}
if (visibilityChange) {
addListener(document, visibilityChange, onVisibilityChange)
}
addListener(window, 'blur', onBlur)
addListener(window, 'focus', onFocus)
}
export function createAudioElements (ref) {
if (ref.hasSound) {
const audioElement = document.createElement('audio')
ref.options.sounds.sources.forEach(s => {
const source = document.createElement('source')
source.src = s
source.type = `audio/${getExtension(s)}`
audioElement.appendChild(source)
})
if (ref.barDom) {
ref.barDom.appendChild(audioElement)
} else {
document.querySelector('body').appendChild(audioElement)
}
audioElement.volume = ref.options.sounds.volume
if (!ref.soundPlayed) {
audioElement.play()
ref.soundPlayed = true
}
audioElement.onended = function () {
remove(audioElement)
}
}
}
function getExtension (fileName) {
return fileName.match(/\.([^.]+)$/)[1]
}