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