wave-ui 1.65.0 → 1.65.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wave-ui",
|
|
3
|
-
"version": "1.65.
|
|
3
|
+
"version": "1.65.2",
|
|
4
4
|
"description": "An emerging UI framework for Vue.js (2 & 3) with only the bright side. :sunny:",
|
|
5
5
|
"author": "Antoni Andre <antoniandre.web@gmail.com>",
|
|
6
6
|
"homepage": "https://antoniandre.github.io/wave-ui",
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
slot(name="confirm") {{ confirmButton.label }}
|
|
2
|
+
w-menu(v-model="showPopup" v-bind="wMenuProps")
|
|
3
|
+
template(#activator="{ on }")
|
|
4
|
+
w-button.w-confirm(
|
|
5
|
+
v-on="{ ...$listeners, ...(disablePrompt ? {} : on) }"
|
|
6
|
+
v-bind="buttonProps")
|
|
7
|
+
slot
|
|
8
|
+
w-flex(:column="!inline" align-center)
|
|
9
|
+
div
|
|
10
|
+
slot(name="question") {{ question }}
|
|
11
|
+
.w-flex.justify-end(:class="inline ? 'ml2' : 'mt2'")
|
|
12
|
+
w-button.mr2(
|
|
13
|
+
v-if="cancel !== false"
|
|
14
|
+
v-bind="cancelButtonProps"
|
|
15
|
+
:bg-color="(cancelButton || {}).bgColor || 'error'"
|
|
16
|
+
@keyup.escape="!persistent && onCancel()"
|
|
17
|
+
@click="onCancel")
|
|
18
|
+
slot(name="cancel") {{ cancelButton.label }}
|
|
19
|
+
w-button(
|
|
20
|
+
v-bind="confirmButtonProps"
|
|
21
|
+
:bg-color="(confirmButton || {}).bgColor || 'success'"
|
|
22
|
+
v-focus
|
|
23
|
+
@keyup.escape="!persistent && onCancel()"
|
|
24
|
+
@click="onConfirm")
|
|
25
|
+
slot(name="confirm") {{ confirmButton.label }}
|
|
27
26
|
</template>
|
|
28
27
|
|
|
29
28
|
<script>
|
|
30
29
|
export default {
|
|
31
30
|
name: 'w-confirm',
|
|
31
|
+
inheritAttrs: false, // The attrs are only bound to the button, not the w-menu.
|
|
32
32
|
props: {
|
|
33
33
|
// Main button props.
|
|
34
34
|
bgColor: { type: String },
|
|
@@ -10,27 +10,21 @@ transition-group(
|
|
|
10
10
|
v-if="notif._value"
|
|
11
11
|
:key="notif._uid"
|
|
12
12
|
v-model="notif._value"
|
|
13
|
-
@close="
|
|
13
|
+
@close="$waveui._notificationManager.dismiss(notif._uid)"
|
|
14
14
|
v-bind="notifProps(notif)")
|
|
15
15
|
div(v-html="notif.message")
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script>
|
|
19
|
-
import NotificationManager from '../utils/notification-manager'
|
|
20
|
-
|
|
21
19
|
export default {
|
|
22
20
|
name: 'w-notification-manager',
|
|
23
21
|
|
|
24
|
-
data: () => ({
|
|
25
|
-
notifManager: null
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
22
|
computed: {
|
|
29
23
|
conf () {
|
|
30
24
|
return this.$waveui.config.notificationManager
|
|
31
25
|
},
|
|
32
26
|
notifications () {
|
|
33
|
-
return this.
|
|
27
|
+
return this.$waveui._notificationManager.notifications || []
|
|
34
28
|
},
|
|
35
29
|
// Possible transitions: slide-fade-down, slide-fade-left, slide-fade-right,
|
|
36
30
|
// slide-left, slide-right, bounce, twist, fade, scale, scale-fade.
|
|
@@ -46,15 +40,6 @@ export default {
|
|
|
46
40
|
const { _value, _uid, message, timeout, ...props } = notif
|
|
47
41
|
return props
|
|
48
42
|
}
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
created () {
|
|
52
|
-
this.notifManager = new NotificationManager()
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
beforeUnmount () {
|
|
56
|
-
this.notifManager.notifications = []
|
|
57
|
-
delete this.notifManager
|
|
58
43
|
}
|
|
59
44
|
}
|
|
60
45
|
</script>
|