1
- ( function ( ) { var o ; "use strict" ; try { if ( typeof document < "u" ) { var e = document . createElement ( "style" ) ; e . nonce = ( o = document . head . querySelector ( "meta[property=csp-nonce]" ) ) == null ?void 0 :o . content , e . appendChild ( document . createTextNode ( ".vue-notification-group{display:block;position:fixed;z-index:5000}.vue-notification-wrapper{display:block;overflow:hidden;width:100%;margin:0;padding:0}.notification-title{font-weight:600}.vue-notification-template{display:block;box-sizing:border-box;background:white;text-align:left}.vue-notification{display:block;box-sizing:border-box;text-align:left;font-size:12px;padding:10px;margin:0 5px 5px;color:#fff;background:#44A4FC;border-left:5px solid #187FE7}.vue-notification.warn{background:#ffb648;border-left-color:#f48a06}.vue-notification.error{background:#E54D42;border-left-color:#b82e24}.vue-notification.success{background:#68CD86;border-left-color:#42a85f}.vn-fade-enter-active,.vn-fade-leave-active,.vn-fade-move{transition:all .5s}.vn-fade-enter-from,.vn-fade-leave-to{opacity:0}" ) ) , document . head . appendChild ( e ) } } catch ( i ) { console . error ( "vite-plugin-css-injected-by-js" , i ) } } ) ( ) ;
1
+ ( function ( ) { "use strict" ; var o ; try { if ( typeof document < "u" ) { var e = document . createElement ( "style" ) ; e . nonce = ( o = document . head . querySelector ( "meta[property=csp-nonce]" ) ) == null ?void 0 :o . content , e . appendChild ( document . createTextNode ( ".vue-notification-group{display:block;position:fixed;z-index:5000}.vue-notification-wrapper{display:block;overflow:hidden;width:100%;margin:0;padding:0}.notification-title{font-weight:600}.vue-notification-template{display:block;box-sizing:border-box;background:#fff;text-align:left}.vue-notification{display:block;box-sizing:border-box;text-align:left;font-size:12px;padding:10px;margin:0 5px 5px;color:#fff;background:#44a4fc;border-left:5px solid #187FE7}.vue-notification.warn{background:#ffb648;border-left-color:#f48a06}.vue-notification.error{background:#e54d42;border-left-color:#b82e24}.vue-notification.success{background:#68cd86;border-left-color:#42a85f}.vn-fade-enter-active,.vn-fade-leave-active,.vn-fade-move{transition:all .5s}.vn-fade-enter-from,.vn-fade-leave-to{opacity:0}" ) ) , document . head . appendChild ( e ) } } catch ( n ) { console . error ( "vite-plugin-css-injected-by-js" , n ) } } ) ( ) ;
2
2
import { defineComponent as D , createVNode as l , TransitionGroup as H , ref as $ , computed as g , onMounted as et , Fragment as C , isVNode as nt } from "vue" ;
3
3
const R = /* @__PURE__ */ new Map ( ) ;
4
4
class it {
@@ -28,22 +28,22 @@ function ot(t) {
28
28
} ) ;
29
29
} } ;
30
30
}
31
- const T = ot ( ) , b = "[-+]?[0-9]*.?[0-9]+" , M = [
31
+ const b = ot ( ) , T = "[-+]?[0-9]*.?[0-9]+" , M = [
32
32
{
33
33
name : "px" ,
34
- regexp : new RegExp ( `^${ b } px$` )
34
+ regexp : new RegExp ( `^${ T } px$` )
35
35
} ,
36
36
{
37
37
name : "%" ,
38
- regexp : new RegExp ( `^${ b } %$` )
38
+ regexp : new RegExp ( `^${ T } %$` )
39
39
} ,
40
40
/**
41
41
* Fallback option
42
42
* If no suffix specified, assigning "px"
43
43
*/
44
44
{
45
45
name : "px" ,
46
- regexp : new RegExp ( `^${ b } $` )
46
+ regexp : new RegExp ( `^${ T } $` )
47
47
}
48
48
] , at = ( t ) => {
49
49
if ( t === "auto" )
@@ -75,7 +75,7 @@ const T = ot(), b = "[-+]?[0-9]*.?[0-9]+", M = [
75
75
} , k = {
76
76
x : /* @__PURE__ */ new Set ( [ "left" , "center" , "right" ] ) ,
77
77
y : /* @__PURE__ */ new Set ( [ "top" , "bottom" ] )
78
- } , st = ( ( t ) => ( ) => t ++ ) ( 0 ) , lt = ( t ) => typeof t != "string" ? [ ] : t . split ( / \s + / gi) . filter ( Boolean ) , ct = ( t ) => {
78
+ } , st = /* @__PURE__ */ ( ( t ) => ( ) => t ++ ) ( 0 ) , lt = ( t ) => typeof t != "string" ? [ ] : t . split ( / \s + / gi) . filter ( Boolean ) , ct = ( t ) => {
79
79
typeof t == "string" && ( t = lt ( t ) ) ;
80
80
let n = null , o = null ;
81
81
return t . forEach ( ( a ) => {
@@ -249,20 +249,21 @@ const x = {
249
249
start : ( t ) => ! 0
250
250
/* eslint-enable @typescript-eslint/no-unused-vars */
251
251
} ,
252
+ slots : Object ,
252
253
setup : ( t , {
253
254
emit : n ,
254
255
slots : o ,
255
256
expose : a
256
257
} ) => {
257
- const s = $ ( [ ] ) , h = $ ( null ) , c = R . get ( "velocity" ) , u = g ( ( ) => t . animationType === "velocity" ) , B = g ( ( ) => u . value ? ut : ft ) , f = g ( ( ) => s . value . filter ( ( e ) => e . state !== x . DESTROYED ) ) , N = g ( ( ) => rt ( t . width ) ) , A = g ( ( ) => {
258
+ const s = $ ( [ ] ) , h = $ ( null ) , c = R . get ( "velocity" ) , u = g ( ( ) => t . animationType === "velocity" ) , j = g ( ( ) => u . value ? ut : ft ) , f = g ( ( ) => s . value . filter ( ( e ) => e . state !== x . DESTROYED ) ) , A = g ( ( ) => rt ( t . width ) ) , N = g ( ( ) => {
258
259
const {
259
260
x : e ,
260
261
y : i
261
- } = ct ( t . position ) , r = N . value . value , d = N . value . type , m = {
262
+ } = ct ( t . position ) , r = A . value . value , d = A . value . type , m = {
262
263
width : r + d
263
264
} ;
264
265
return i && ( m [ i ] = "0px" ) , e && ( e === "center" ? m . left = `calc(50% - ${ + r / 2 } ${ d } )` : m [ e ] = "0px" ) , m ;
265
- } ) , w = g ( ( ) => "bottom" in A . value ) , j = ( e ) => {
266
+ } ) , O = g ( ( ) => "bottom" in N . value ) , B = ( e ) => {
266
267
n ( "click" , e ) , t . closeOnClick && y ( e ) ;
267
268
} , V = ( ) => {
268
269
var e ;
@@ -294,7 +295,7 @@ const x = {
294
295
data : U
295
296
} ;
296
297
i >= 0 && ( h . value = new it ( ( ) => y ( p ) , p . length , p ) ) ;
297
- const Z = t . reverse ? ! w . value : w . value ;
298
+ const Z = t . reverse ? ! O . value : O . value ;
298
299
let v = - 1 ;
299
300
const tt = f . value . some ( ( L ) => L . title === e . title && L . text === e . text ) ;
300
301
( ! d || ! tt ) && ( Z ? ( s . value . push ( p ) , n ( "start" , p ) , f . value . length > t . max && ( v = 0 ) ) : ( s . value . unshift ( p ) , n ( "start" , p ) , f . value . length > t . max && ( v = f . value . length - 1 ) ) , v !== - 1 && y ( f . value [ v ] ) ) ;
@@ -309,22 +310,22 @@ const x = {
309
310
i && y ( i ) ;
310
311
} , q = ( ) => {
311
312
f . value . forEach ( y ) ;
312
- } , O = ( e , i ) => {
313
+ } , w = ( e , i ) => {
313
314
var d ;
314
315
const r = ( d = t . animation ) == null ? void 0 : d [ e ] ;
315
316
return typeof r == "function" ? r ( i ) : r ;
316
317
} , z = ( e , i ) => {
317
318
if ( ! u . value )
318
319
return ;
319
- const r = O ( "enter" , e ) ;
320
+ const r = w ( "enter" , e ) ;
320
321
c ( e , r , {
321
322
duration : t . speed ,
322
323
complete : i
323
324
} ) ;
324
325
} , J = ( e , i ) => {
325
326
if ( ! u . value )
326
327
return ;
327
- const r = O ( "leave" , e ) ;
328
+ const r = w ( "leave" , e ) ;
328
329
c ( e , r , {
329
330
duration : t . speed ,
330
331
complete : i
@@ -334,13 +335,13 @@ const x = {
334
335
s . value = s . value . filter ( ( e ) => e . state !== x . DESTROYED ) ;
335
336
}
336
337
return et ( ( ) => {
337
- T . on ( "add" , G ) , T . on ( "close" , _ ) ;
338
+ b . on ( "add" , G ) , b . on ( "close" , _ ) ;
338
339
} ) , ( ) => {
339
340
let e ;
340
341
return l ( "div" , {
341
342
class : "vue-notification-group" ,
342
- style : A . value
343
- } , [ l ( B . value , {
343
+ style : N . value
344
+ } , [ l ( j . value , {
344
345
name : t . animationName ,
345
346
onEnter : z ,
346
347
onLeave : J ,
@@ -358,7 +359,7 @@ const x = {
358
359
close : ( ) => y ( i )
359
360
} ) : l ( "div" , {
360
361
class : F ( i ) ,
361
- onClick : ( ) => j ( i )
362
+ onClick : ( ) => B ( i )
362
363
} , [ t . dangerouslySetInnerHtml ? l ( C , null , [ i . title ? l ( "div" , {
363
364
class : "notification-title" ,
364
365
innerHTML : i . title
@@ -375,10 +376,10 @@ const x = {
375
376
} ;
376
377
}
377
378
} ) , S = ( t ) => {
378
- typeof t == "string" && ( t = { title : "" , text : t } ) , typeof t == "object" && T . emit ( "add" , t ) ;
379
+ typeof t == "string" && ( t = { title : "" , text : t } ) , typeof t == "object" && b . emit ( "add" , t ) ;
379
380
} ;
380
381
S . close = ( t ) => {
381
- T . emit ( "close" , t ) ;
382
+ b . emit ( "close" , t ) ;
382
383
} ;
383
384
const vt = ( ) => ( { notify : S } ) , yt = "Notifications" ;
384
385
function mt ( t , n = { } ) {
0 commit comments