@ulu/frontend-vue 0.6.31 → 0.6.33
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluTourDisplay.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/tour/UluTourDisplay.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluTourDisplay.vue.d.ts","sourceRoot":"","sources":["../../../lib/plugins/tour/UluTourDisplay.vue"],"names":[],"mappings":"AA8EA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA8jByqQ,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAvXttQ,KAAK"}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { computed as v, ref as f, watch as B, nextTick as T, onMounted as b, onUnmounted as z, createBlock as a, openBlock as o, Teleport as L, createElementBlock as y, createCommentVNode as x, unref as l, Fragment as F, resolveDynamicComponent as g, mergeProps as d, createSlots as $, withCtx as c, createVNode as k, normalizeStyle as I } from "vue";
|
|
2
|
+
import R from "../../components/collapsible/UluModal.vue.js";
|
|
3
|
+
import V from "../popovers/UluPopoverBase.vue.js";
|
|
4
|
+
import w from "./UluTourPager.vue.js";
|
|
5
5
|
import _ from "./UluTourContent.vue.js";
|
|
6
|
-
import { useTour as
|
|
7
|
-
const
|
|
6
|
+
import { useTour as D } from "./useTour.js";
|
|
7
|
+
const G = {
|
|
8
8
|
__name: "UluTourDisplay",
|
|
9
|
-
setup(
|
|
10
|
-
const { api:
|
|
9
|
+
setup(M) {
|
|
10
|
+
const { api: u, state: r } = D(), t = v(() => r.active?.steps[r.stepIndex]), i = f(null), m = f(null), C = v(() => ({
|
|
11
11
|
placement: t.value?.placement || "bottom",
|
|
12
12
|
arrow: !0,
|
|
13
13
|
offset: 8
|
|
14
|
-
})),
|
|
15
|
-
...
|
|
14
|
+
})), P = v(() => ({
|
|
15
|
+
...r.active?.modalProps || {},
|
|
16
16
|
...t.value?.modalProps || {}
|
|
17
|
-
})),
|
|
17
|
+
})), S = v(() => ({
|
|
18
18
|
modifiers: "large",
|
|
19
|
-
...
|
|
19
|
+
...r.active?.popoverProps || {},
|
|
20
20
|
...t.value?.popoverProps || {}
|
|
21
|
-
})),
|
|
22
|
-
if (
|
|
23
|
-
const e =
|
|
24
|
-
|
|
21
|
+
})), p = f(null), s = () => {
|
|
22
|
+
if (i.value) {
|
|
23
|
+
const e = i.value.getBoundingClientRect();
|
|
24
|
+
p.value = {
|
|
25
25
|
top: e.top,
|
|
26
26
|
left: e.left,
|
|
27
27
|
width: e.width,
|
|
28
28
|
height: e.height
|
|
29
29
|
};
|
|
30
30
|
} else
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
if (!
|
|
34
|
-
const e =
|
|
31
|
+
p.value = null;
|
|
32
|
+
}, E = v(() => {
|
|
33
|
+
if (!p.value) return {};
|
|
34
|
+
const e = p.value;
|
|
35
35
|
return {
|
|
36
36
|
position: "fixed",
|
|
37
37
|
top: 0,
|
|
@@ -56,35 +56,44 @@ const H = {
|
|
|
56
56
|
)`
|
|
57
57
|
};
|
|
58
58
|
});
|
|
59
|
-
return
|
|
59
|
+
return B(t, async (e) => {
|
|
60
60
|
if (e?.target) {
|
|
61
61
|
await T();
|
|
62
62
|
const n = document.querySelector(e.target);
|
|
63
|
-
n ? (
|
|
63
|
+
n ? (i.value = n, m.value && m.value.update(), e.highlight && s()) : console.warn(`Tour target not found: ${e.target}`);
|
|
64
64
|
} else
|
|
65
|
-
|
|
65
|
+
i.value = null, p.value = null;
|
|
66
66
|
}, { immediate: !0 }), b(() => {
|
|
67
|
-
window.addEventListener("resize",
|
|
68
|
-
}),
|
|
69
|
-
window.removeEventListener("resize",
|
|
70
|
-
}), (e, n) => (o(),
|
|
71
|
-
|
|
72
|
-
t.value?.component ? (o(),
|
|
67
|
+
window.addEventListener("resize", s), window.addEventListener("scroll", s);
|
|
68
|
+
}), z(() => {
|
|
69
|
+
window.removeEventListener("resize", s), window.removeEventListener("scroll", s);
|
|
70
|
+
}), (e, n) => (o(), a(L, { to: "body" }, [
|
|
71
|
+
l(r).active ? (o(), y(F, { key: 0 }, [
|
|
72
|
+
t.value?.component ? (o(), a(g(t.value.component), d({
|
|
73
73
|
key: 0,
|
|
74
|
-
"data-ulu-tour-ui": "true"
|
|
75
|
-
|
|
74
|
+
"data-ulu-tour-ui": "true",
|
|
75
|
+
step: t.value,
|
|
76
|
+
tourState: l(r),
|
|
77
|
+
api: l(u)
|
|
78
|
+
}, t.value.componentProps), null, 16, ["step", "tourState", "api"])) : t.value?.target ? (o(), a(V, d({
|
|
76
79
|
key: 2,
|
|
77
80
|
ref_key: "popoverBase",
|
|
78
81
|
ref: m,
|
|
79
|
-
trigger:
|
|
82
|
+
trigger: i.value,
|
|
80
83
|
config: C.value,
|
|
81
84
|
style: { zIndex: 9999 },
|
|
82
85
|
isOpen: !0,
|
|
83
86
|
"data-ulu-tour-ui": "true",
|
|
84
|
-
onClose: n[1] || (n[1] = (h) =>
|
|
85
|
-
},
|
|
87
|
+
onClose: n[1] || (n[1] = (h) => l(u).stop())
|
|
88
|
+
}, S.value), $({
|
|
86
89
|
default: c(() => [
|
|
87
|
-
t.value?.contentComponent ? (o(),
|
|
90
|
+
t.value?.contentComponent ? (o(), a(g(t.value.contentComponent), d({
|
|
91
|
+
key: 0,
|
|
92
|
+
step: t.value,
|
|
93
|
+
tourState: l(r),
|
|
94
|
+
api: l(u),
|
|
95
|
+
"is-modal": !1
|
|
96
|
+
}, t.value.componentProps), null, 16, ["step", "tourState", "api"])) : (o(), a(_, {
|
|
88
97
|
key: 1,
|
|
89
98
|
step: t.value,
|
|
90
99
|
"is-modal": !1
|
|
@@ -95,19 +104,25 @@ const H = {
|
|
|
95
104
|
t.value?.hideFooter ? void 0 : {
|
|
96
105
|
name: "footer",
|
|
97
106
|
fn: c(() => [
|
|
98
|
-
w
|
|
107
|
+
k(w)
|
|
99
108
|
]),
|
|
100
109
|
key: "0"
|
|
101
110
|
}
|
|
102
|
-
]), 1040, ["trigger", "config"])) : (o(),
|
|
111
|
+
]), 1040, ["trigger", "config"])) : (o(), a(R, d({
|
|
103
112
|
key: 1,
|
|
104
113
|
modelValue: !0,
|
|
105
114
|
"data-ulu-tour-ui": "true"
|
|
106
|
-
},
|
|
107
|
-
onClose: n[0] || (n[0] = (h) =>
|
|
115
|
+
}, P.value, {
|
|
116
|
+
onClose: n[0] || (n[0] = (h) => l(u).stop())
|
|
108
117
|
}), $({
|
|
109
118
|
default: c(() => [
|
|
110
|
-
t.value?.contentComponent ? (o(),
|
|
119
|
+
t.value?.contentComponent ? (o(), a(g(t.value.contentComponent), d({
|
|
120
|
+
key: 0,
|
|
121
|
+
step: t.value,
|
|
122
|
+
tourState: l(r),
|
|
123
|
+
api: l(u),
|
|
124
|
+
"is-modal": !0
|
|
125
|
+
}, t.value.componentProps), null, 16, ["step", "tourState", "api"])) : (o(), a(_, {
|
|
111
126
|
key: 1,
|
|
112
127
|
step: t.value,
|
|
113
128
|
"is-modal": !0
|
|
@@ -118,22 +133,22 @@ const H = {
|
|
|
118
133
|
t.value?.hideFooter ? void 0 : {
|
|
119
134
|
name: "footer",
|
|
120
135
|
fn: c(() => [
|
|
121
|
-
w
|
|
136
|
+
k(w)
|
|
122
137
|
]),
|
|
123
138
|
key: "0"
|
|
124
139
|
}
|
|
125
140
|
]), 1040)),
|
|
126
|
-
t.value?.target && t.value?.highlight &&
|
|
141
|
+
t.value?.target && t.value?.highlight && p.value ? (o(), y("div", {
|
|
127
142
|
key: 3,
|
|
128
143
|
class: "tour-highlight-backdrop",
|
|
129
|
-
style:
|
|
144
|
+
style: I(E.value),
|
|
130
145
|
"data-ulu-tour-ui": "true",
|
|
131
|
-
onClick: n[2] || (n[2] = (h) =>
|
|
146
|
+
onClick: n[2] || (n[2] = (h) => l(u).stop())
|
|
132
147
|
}, null, 4)) : x("", !0)
|
|
133
148
|
], 64)) : x("", !0)
|
|
134
149
|
]));
|
|
135
150
|
}
|
|
136
151
|
};
|
|
137
152
|
export {
|
|
138
|
-
|
|
153
|
+
G as default
|
|
139
154
|
};
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
v-if="currentStep?.component"
|
|
8
8
|
:is="currentStep.component"
|
|
9
9
|
data-ulu-tour-ui="true"
|
|
10
|
+
:step="currentStep"
|
|
11
|
+
:tourState="tourState"
|
|
12
|
+
:api="api"
|
|
10
13
|
v-bind="currentStep.componentProps"
|
|
11
14
|
/>
|
|
12
15
|
|
|
@@ -21,6 +24,10 @@
|
|
|
21
24
|
<component
|
|
22
25
|
v-if="currentStep?.contentComponent"
|
|
23
26
|
:is="currentStep.contentComponent"
|
|
27
|
+
:step="currentStep"
|
|
28
|
+
:tourState="tourState"
|
|
29
|
+
:api="api"
|
|
30
|
+
:is-modal="true"
|
|
24
31
|
v-bind="currentStep.componentProps"
|
|
25
32
|
/>
|
|
26
33
|
<UluTourContent v-else :step="currentStep" :is-modal="true" />
|
|
@@ -45,6 +52,10 @@
|
|
|
45
52
|
<component
|
|
46
53
|
v-if="currentStep?.contentComponent"
|
|
47
54
|
:is="currentStep.contentComponent"
|
|
55
|
+
:step="currentStep"
|
|
56
|
+
:tourState="tourState"
|
|
57
|
+
:api="api"
|
|
58
|
+
:is-modal="false"
|
|
48
59
|
v-bind="currentStep.componentProps"
|
|
49
60
|
/>
|
|
50
61
|
<UluTourContent v-else :step="currentStep" :is-modal="false" />
|
package/package.json
CHANGED