@burdenoff/microfe-tours 2026.519.1 → 2026.523.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/dist/index.js +2 -1
- package/dist/tours/ToursAdminRoot.d.ts.map +1 -1
- package/dist/tours/ToursAdminRoot.js +23 -20
- package/dist/tours/ToursAdminRoot.js.map +1 -1
- package/dist/tours/ToursUserRoot.d.ts.map +1 -1
- package/dist/tours/ToursUserRoot.js +25 -22
- package/dist/tours/ToursUserRoot.js.map +1 -1
- package/dist/tours/hooks/useMediaLibrary.js +3 -3
- package/dist/tours/hooks/useTourBuilder.js +10 -10
- package/dist/tours/hooks/useTourLifecycle.js +3 -3
- package/dist/tours/i18n.d.ts +13 -1
- package/dist/tours/i18n.d.ts.map +1 -1
- package/dist/tours/i18n.js +12 -0
- package/dist/tours/i18n.js.map +1 -1
- package/dist/tours/index.d.ts +1 -0
- package/dist/tours/index.d.ts.map +1 -1
- package/dist/tours/index.js +1 -0
- package/dist/tours/pages/AnalyticsDashboardPage.d.ts.map +1 -1
- package/dist/tours/pages/AnalyticsDashboardPage.js +5 -5
- package/dist/tours/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/tours/pages/MediaLibraryPage.d.ts.map +1 -1
- package/dist/tours/pages/MediaLibraryPage.js +97 -96
- package/dist/tours/pages/MediaLibraryPage.js.map +1 -1
- package/dist/tours/pages/SchedulerPage.d.ts.map +1 -1
- package/dist/tours/pages/SchedulerPage.js +129 -126
- package/dist/tours/pages/SchedulerPage.js.map +1 -1
- package/dist/tours/pages/StepEditorPage.d.ts.map +1 -1
- package/dist/tours/pages/StepEditorPage.js +133 -128
- package/dist/tours/pages/StepEditorPage.js.map +1 -1
- package/dist/tours/pages/SystemAnalyticsPage.d.ts.map +1 -1
- package/dist/tours/pages/SystemAnalyticsPage.js +3 -3
- package/dist/tours/pages/SystemAnalyticsPage.js.map +1 -1
- package/dist/tours/pages/TemplateLibraryPage.d.ts.map +1 -1
- package/dist/tours/pages/TemplateLibraryPage.js +97 -94
- package/dist/tours/pages/TemplateLibraryPage.js.map +1 -1
- package/dist/tours/pages/TourBuilderPage.d.ts.map +1 -1
- package/dist/tours/pages/TourBuilderPage.js +645 -467
- package/dist/tours/pages/TourBuilderPage.js.map +1 -1
- package/dist/tours/pages/TourPreviewPage.d.ts.map +1 -1
- package/dist/tours/pages/TourPreviewPage.js +20 -18
- package/dist/tours/pages/TourPreviewPage.js.map +1 -1
- package/dist/tours/pages/ToursListPage.js +14 -14
- package/dist/tours/pages/ToursListPage.js.map +1 -1
- package/dist/tours/store/toursStore.d.ts +1 -0
- package/dist/tours/store/toursStore.d.ts.map +1 -1
- package/dist/tours/store/toursStore.js +14 -0
- package/dist/tours/store/toursStore.js.map +1 -1
- package/dist/tours/telemetry.d.ts +9 -0
- package/dist/tours/telemetry.d.ts.map +1 -0
- package/dist/tours/telemetry.js +19 -0
- package/dist/tours/telemetry.js.map +1 -0
- package/package.json +1 -1
|
@@ -2,65 +2,67 @@ import { useToursContext as e } from "../providers/ToursProvider.js";
|
|
|
2
2
|
import { useToursPermissionAccess as t } from "../hooks/useToursPermissionAccess.js";
|
|
3
3
|
import { TOUR_PERMISSIONS as n } from "../../constants/permissions.js";
|
|
4
4
|
import { useToursI18n as r } from "../i18n.js";
|
|
5
|
-
import {
|
|
5
|
+
import { emitToursApiFailed as i } from "../telemetry.js";
|
|
6
|
+
import { useMediaLibrary as ee } from "../hooks/useMediaLibrary.js";
|
|
6
7
|
import { useStepSequencer as a } from "../hooks/useStepSequencer.js";
|
|
7
8
|
import { useTourBuilder as o } from "../hooks/useTourBuilder.js";
|
|
8
9
|
import { useEffect as s, useState as c } from "react";
|
|
9
|
-
import { PermissionGate as
|
|
10
|
-
import { ArrowLeft as
|
|
10
|
+
import { PermissionGate as te } from "@burdenoff/fe-libs/shared/components";
|
|
11
|
+
import { ArrowLeft as ne, ChevronDown as re, ChevronLeft as l, ChevronRight as u, ChevronUp as d, Menu as f, Paperclip as p, Plus as m, Save as h, Trash2 as g, X as _ } from "lucide-react";
|
|
11
12
|
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
12
13
|
import { useNavigate as b, useParams as x } from "react-router-dom";
|
|
14
|
+
import { useEventBus as ie } from "@burdenoff/fe-libs/shared/events";
|
|
13
15
|
//#region src/tours/pages/StepEditorPage.tsx
|
|
14
16
|
function S() {
|
|
15
|
-
let { tr: S } = r(), { tourId: C, stepId: w } = x(),
|
|
17
|
+
let { tr: S } = r(), { tourId: C, stepId: w } = x(), ae = b(), T = e(), { basePath: oe = "/" } = T, E = ie(), { hasPermission: D } = t(), O = D(n.TOUR_STEP_CREATE), k = D(n.TOUR_STEP_UPDATE), A = D(n.TOUR_STEP_DELETE), { tour: j, loadTour: M, syncSteps: N, saving: P } = o(C), { steps: F, selectedStep: I, selectStep: L, createStep: R, deleteStep: z, updateStepField: B, moveStep: V } = a(), { media: se, fetchMedia: H, attachToStep: U, loading: W } = ee(), [G, K] = c(!1), [q, ce] = c(!1), [J, Y] = c(""), [X, Z] = c("body"), [le, Q] = c(!1);
|
|
16
18
|
s(() => {
|
|
17
19
|
let e = () => {
|
|
18
20
|
let e = window.innerWidth < 768;
|
|
19
|
-
|
|
21
|
+
ce(e), e || K(!1);
|
|
20
22
|
};
|
|
21
23
|
return e(), window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
22
24
|
}, []), s(() => {
|
|
23
|
-
C &&
|
|
24
|
-
}, [C,
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
let e = w ||
|
|
28
|
-
if (e &&
|
|
29
|
-
let t =
|
|
30
|
-
t &&
|
|
25
|
+
C && M(C);
|
|
26
|
+
}, [C, M]), s(() => {
|
|
27
|
+
H();
|
|
28
|
+
}, [H]), s(() => {
|
|
29
|
+
let e = w || I?.id;
|
|
30
|
+
if (e && F.length > 0) {
|
|
31
|
+
let t = F.find((t) => t.id === e);
|
|
32
|
+
t && L(t);
|
|
31
33
|
}
|
|
32
34
|
}, [
|
|
33
35
|
w,
|
|
34
|
-
N,
|
|
35
36
|
F,
|
|
36
|
-
|
|
37
|
+
L,
|
|
38
|
+
I?.id
|
|
37
39
|
]);
|
|
38
|
-
let
|
|
39
|
-
|
|
40
|
-
},
|
|
40
|
+
let $ = () => {
|
|
41
|
+
R();
|
|
42
|
+
}, ue = async () => {
|
|
41
43
|
if (C) try {
|
|
42
|
-
await
|
|
43
|
-
} catch
|
|
44
|
-
|
|
44
|
+
await N(C, F);
|
|
45
|
+
} catch {
|
|
46
|
+
i(E, "step.save", T);
|
|
45
47
|
}
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
if (!(!
|
|
50
|
-
if (
|
|
48
|
+
}, de = () => {
|
|
49
|
+
ae(`${oe}/${C}/edit`);
|
|
50
|
+
}, fe = async () => {
|
|
51
|
+
if (!(!I || !C || !J)) {
|
|
52
|
+
if (I.id.startsWith("temp_")) {
|
|
51
53
|
window.alert("Save your steps before attaching media to them.");
|
|
52
54
|
return;
|
|
53
55
|
}
|
|
54
56
|
try {
|
|
55
|
-
|
|
56
|
-
} catch
|
|
57
|
-
|
|
57
|
+
Q(!0), await U(I.id, J, X, (I.media?.length ?? 0) + 1), await M(C), Y("");
|
|
58
|
+
} catch {
|
|
59
|
+
i(E, "media.attach", T);
|
|
58
60
|
} finally {
|
|
59
|
-
|
|
61
|
+
Q(!1);
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
+
}, pe = (e) => {
|
|
65
|
+
L(e), q && K(!1);
|
|
64
66
|
};
|
|
65
67
|
return /* @__PURE__ */ y("div", {
|
|
66
68
|
className: "flex flex-col h-full bg-background",
|
|
@@ -69,23 +71,23 @@ function S() {
|
|
|
69
71
|
children: [/* @__PURE__ */ y("div", {
|
|
70
72
|
className: "flex items-center gap-3",
|
|
71
73
|
children: [/* @__PURE__ */ v("button", {
|
|
72
|
-
onClick:
|
|
74
|
+
onClick: de,
|
|
73
75
|
className: "p-2 hover:bg-accent rounded-md shrink-0",
|
|
74
76
|
"aria-label": S("stepEditor.goBack"),
|
|
75
|
-
children: /* @__PURE__ */ v(
|
|
77
|
+
children: /* @__PURE__ */ v(ne, { size: 20 })
|
|
76
78
|
}), /* @__PURE__ */ y("div", {
|
|
77
79
|
className: "flex-1 min-w-0",
|
|
78
80
|
children: [/* @__PURE__ */ y("h1", {
|
|
79
81
|
className: "text-base sm:text-lg font-semibold truncate",
|
|
80
82
|
children: [
|
|
81
|
-
|
|
83
|
+
j?.name || S("stepEditor.tourFallback"),
|
|
82
84
|
" - ",
|
|
83
85
|
S("stepEditor.stepsLabel")
|
|
84
86
|
]
|
|
85
87
|
}), /* @__PURE__ */ y("p", {
|
|
86
88
|
className: "text-xs sm:text-sm text-muted-foreground",
|
|
87
89
|
children: [
|
|
88
|
-
|
|
90
|
+
F.length,
|
|
89
91
|
" ",
|
|
90
92
|
S("stepEditor.stepsCount")
|
|
91
93
|
]
|
|
@@ -94,38 +96,38 @@ function S() {
|
|
|
94
96
|
}), /* @__PURE__ */ y("div", {
|
|
95
97
|
className: "flex items-center gap-2 sm:gap-3 ml-auto",
|
|
96
98
|
children: [
|
|
97
|
-
|
|
98
|
-
onClick: () =>
|
|
99
|
+
q && /* @__PURE__ */ y("button", {
|
|
100
|
+
onClick: () => K(!G),
|
|
99
101
|
className: "px-3 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2 sm:hidden",
|
|
100
102
|
children: [
|
|
101
|
-
/* @__PURE__ */ v(
|
|
103
|
+
/* @__PURE__ */ v(f, { size: 18 }),
|
|
102
104
|
/* @__PURE__ */ v("span", {
|
|
103
105
|
className: "text-sm",
|
|
104
106
|
children: S("stepEditor.steps")
|
|
105
107
|
}),
|
|
106
|
-
|
|
108
|
+
F.length > 0 && /* @__PURE__ */ v("span", {
|
|
107
109
|
className: "px-1.5 py-0.5 text-xs bg-primary/20 rounded-full",
|
|
108
|
-
children:
|
|
110
|
+
children: F.length
|
|
109
111
|
})
|
|
110
112
|
]
|
|
111
113
|
}),
|
|
112
|
-
|
|
113
|
-
onClick:
|
|
114
|
+
O && /* @__PURE__ */ y("button", {
|
|
115
|
+
onClick: $,
|
|
114
116
|
className: "px-3 sm:px-4 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2 text-sm sm:text-base",
|
|
115
|
-
children: [/* @__PURE__ */ v(
|
|
117
|
+
children: [/* @__PURE__ */ v(m, { size: 18 }), /* @__PURE__ */ v("span", {
|
|
116
118
|
className: "hidden xs:inline",
|
|
117
119
|
children: S("stepEditor.addStep")
|
|
118
120
|
})]
|
|
119
121
|
}),
|
|
120
|
-
/* @__PURE__ */ v(
|
|
122
|
+
/* @__PURE__ */ v(te, {
|
|
121
123
|
permission: n.TOUR_STEP_UPDATE,
|
|
122
124
|
children: /* @__PURE__ */ y("button", {
|
|
123
|
-
onClick:
|
|
124
|
-
disabled:
|
|
125
|
+
onClick: ue,
|
|
126
|
+
disabled: P || !k,
|
|
125
127
|
className: "px-3 sm:px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 disabled:opacity-50 flex items-center gap-2 text-sm sm:text-base",
|
|
126
|
-
children: [/* @__PURE__ */ v(
|
|
128
|
+
children: [/* @__PURE__ */ v(h, { size: 18 }), /* @__PURE__ */ v("span", {
|
|
127
129
|
className: "hidden xs:inline",
|
|
128
|
-
children: S(
|
|
130
|
+
children: S(P ? "stepEditor.saving" : "stepEditor.save")
|
|
129
131
|
})]
|
|
130
132
|
})
|
|
131
133
|
})
|
|
@@ -134,29 +136,30 @@ function S() {
|
|
|
134
136
|
}), /* @__PURE__ */ y("div", {
|
|
135
137
|
className: "flex-1 flex overflow-hidden relative",
|
|
136
138
|
children: [
|
|
137
|
-
|
|
138
|
-
className: "fixed inset-0 bg-
|
|
139
|
-
onClick: () =>
|
|
139
|
+
q && G && /* @__PURE__ */ v("div", {
|
|
140
|
+
className: "fixed inset-0 bg-foreground/40 z-40 md:hidden",
|
|
141
|
+
onClick: () => K(!1)
|
|
140
142
|
}),
|
|
141
143
|
/* @__PURE__ */ y("div", {
|
|
142
144
|
className: `
|
|
143
|
-
${
|
|
144
|
-
${
|
|
145
|
+
${q ? "fixed inset-y-0 left-0 z-50 w-[min(18rem,calc(100vw-2rem))] transform transition-transform duration-300" : "w-64 lg:w-80 shrink-0"}
|
|
146
|
+
${q && !G ? "-translate-x-full" : "translate-x-0"}
|
|
145
147
|
border-r border-border overflow-y-auto bg-card
|
|
146
148
|
`,
|
|
147
|
-
children: [
|
|
149
|
+
children: [q && /* @__PURE__ */ y("div", {
|
|
148
150
|
className: "flex items-center justify-between p-4 border-b border-border sticky top-0 bg-card z-10",
|
|
149
151
|
children: [/* @__PURE__ */ v("h2", {
|
|
150
152
|
className: "font-semibold",
|
|
151
153
|
children: S("stepEditor.tourSteps")
|
|
152
154
|
}), /* @__PURE__ */ v("button", {
|
|
153
|
-
onClick: () =>
|
|
154
|
-
className: "p-2 hover:bg-accent rounded-md",
|
|
155
|
-
|
|
155
|
+
onClick: () => K(!1),
|
|
156
|
+
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md",
|
|
157
|
+
"aria-label": S("stepEditor.closeSteps"),
|
|
158
|
+
children: /* @__PURE__ */ v(_, { size: 20 })
|
|
156
159
|
})]
|
|
157
160
|
}), /* @__PURE__ */ v("div", {
|
|
158
161
|
className: "p-3 sm:p-4 space-y-2",
|
|
159
|
-
children:
|
|
162
|
+
children: F.length === 0 ? /* @__PURE__ */ y("div", {
|
|
160
163
|
className: "text-center py-8 text-muted-foreground",
|
|
161
164
|
children: [/* @__PURE__ */ v("p", {
|
|
162
165
|
className: "text-sm",
|
|
@@ -165,9 +168,9 @@ function S() {
|
|
|
165
168
|
className: "text-xs mt-1",
|
|
166
169
|
children: S("stepEditor.clickAddStep")
|
|
167
170
|
})]
|
|
168
|
-
}) :
|
|
169
|
-
onClick: () =>
|
|
170
|
-
className: `p-3 border rounded-md cursor-pointer transition-colors ${
|
|
171
|
+
}) : F.map((e, t) => /* @__PURE__ */ v("div", {
|
|
172
|
+
onClick: () => pe(e),
|
|
173
|
+
className: `p-3 border rounded-md cursor-pointer transition-colors ${I?.id === e.id ? "border-primary bg-primary/10" : "border-border hover:bg-accent"}`,
|
|
171
174
|
children: /* @__PURE__ */ y("div", {
|
|
172
175
|
className: "flex items-start justify-between gap-2",
|
|
173
176
|
children: [/* @__PURE__ */ y("div", {
|
|
@@ -190,37 +193,37 @@ function S() {
|
|
|
190
193
|
children: e.targetSelector
|
|
191
194
|
})
|
|
192
195
|
]
|
|
193
|
-
}),
|
|
196
|
+
}), A && /* @__PURE__ */ y("div", {
|
|
194
197
|
className: "flex items-center gap-1 shrink-0",
|
|
195
198
|
children: [
|
|
196
199
|
/* @__PURE__ */ v("button", {
|
|
197
200
|
onClick: (e) => {
|
|
198
|
-
e.stopPropagation(), t > 0 &&
|
|
201
|
+
e.stopPropagation(), t > 0 && V(t, t - 1);
|
|
199
202
|
},
|
|
200
|
-
className: "p-1.5 hover:bg-accent rounded",
|
|
203
|
+
className: "p-1.5 sm:p-2 min-h-[32px] min-w-[32px] sm:min-h-[40px] sm:min-w-[40px] hover:bg-accent rounded",
|
|
201
204
|
title: "Move step up",
|
|
202
205
|
"aria-label": "Move step up",
|
|
203
206
|
disabled: t === 0,
|
|
204
|
-
children: /* @__PURE__ */ v(
|
|
207
|
+
children: /* @__PURE__ */ v(d, { size: 14 })
|
|
205
208
|
}),
|
|
206
209
|
/* @__PURE__ */ v("button", {
|
|
207
210
|
onClick: (e) => {
|
|
208
|
-
e.stopPropagation(), t <
|
|
211
|
+
e.stopPropagation(), t < F.length - 1 && V(t, t + 1);
|
|
209
212
|
},
|
|
210
|
-
className: "p-1.5 hover:bg-accent rounded",
|
|
213
|
+
className: "p-1.5 sm:p-2 min-h-[32px] min-w-[32px] sm:min-h-[40px] sm:min-w-[40px] hover:bg-accent rounded",
|
|
211
214
|
title: "Move step down",
|
|
212
215
|
"aria-label": "Move step down",
|
|
213
|
-
disabled: t ===
|
|
214
|
-
children: /* @__PURE__ */ v(
|
|
216
|
+
disabled: t === F.length - 1,
|
|
217
|
+
children: /* @__PURE__ */ v(re, { size: 14 })
|
|
215
218
|
}),
|
|
216
219
|
/* @__PURE__ */ v("button", {
|
|
217
220
|
onClick: (t) => {
|
|
218
|
-
t.stopPropagation(),
|
|
221
|
+
t.stopPropagation(), z(e.id);
|
|
219
222
|
},
|
|
220
|
-
className: "p-1.5 hover:bg-destructive/10 rounded text-destructive",
|
|
223
|
+
className: "p-1.5 sm:p-2 min-h-[32px] min-w-[32px] sm:min-h-[40px] sm:min-w-[40px] hover:bg-destructive/10 rounded text-destructive",
|
|
221
224
|
title: S("stepEditor.deleteStep"),
|
|
222
225
|
"aria-label": S("stepEditor.deleteStep"),
|
|
223
|
-
children: /* @__PURE__ */ v(
|
|
226
|
+
children: /* @__PURE__ */ v(g, { size: 14 })
|
|
224
227
|
})
|
|
225
228
|
]
|
|
226
229
|
})]
|
|
@@ -230,41 +233,43 @@ function S() {
|
|
|
230
233
|
}),
|
|
231
234
|
/* @__PURE__ */ v("div", {
|
|
232
235
|
className: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
233
|
-
children:
|
|
236
|
+
children: I ? /* @__PURE__ */ y("div", {
|
|
234
237
|
className: "max-w-2xl mx-auto space-y-4 sm:space-y-6",
|
|
235
238
|
children: [
|
|
236
|
-
|
|
239
|
+
q && F.length > 1 && /* @__PURE__ */ y("div", {
|
|
237
240
|
className: "flex items-center justify-between bg-muted/50 rounded-lg p-2 mb-4",
|
|
238
241
|
children: [
|
|
239
242
|
/* @__PURE__ */ v("button", {
|
|
240
243
|
onClick: () => {
|
|
241
|
-
let e =
|
|
242
|
-
e > 0 && F
|
|
244
|
+
let e = F.findIndex((e) => e.id === I.id);
|
|
245
|
+
e > 0 && L(F[e - 1]);
|
|
243
246
|
},
|
|
244
|
-
disabled:
|
|
245
|
-
className: "p-2 hover:bg-accent rounded-md disabled:opacity-30",
|
|
246
|
-
|
|
247
|
+
disabled: F.findIndex((e) => e.id === I.id) === 0,
|
|
248
|
+
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md disabled:opacity-30",
|
|
249
|
+
"aria-label": S("stepEditor.previousStep"),
|
|
250
|
+
children: /* @__PURE__ */ v(l, { size: 20 })
|
|
247
251
|
}),
|
|
248
252
|
/* @__PURE__ */ y("span", {
|
|
249
253
|
className: "text-sm text-muted-foreground",
|
|
250
254
|
children: [
|
|
251
255
|
S("stepEditor.stepNumber"),
|
|
252
256
|
" ",
|
|
253
|
-
|
|
257
|
+
F.findIndex((e) => e.id === I.id) + 1,
|
|
254
258
|
" ",
|
|
255
259
|
S("stepEditor.of"),
|
|
256
260
|
" ",
|
|
257
|
-
|
|
261
|
+
F.length
|
|
258
262
|
]
|
|
259
263
|
}),
|
|
260
264
|
/* @__PURE__ */ v("button", {
|
|
261
265
|
onClick: () => {
|
|
262
|
-
let e =
|
|
263
|
-
e <
|
|
266
|
+
let e = F.findIndex((e) => e.id === I.id);
|
|
267
|
+
e < F.length - 1 && L(F[e + 1]);
|
|
264
268
|
},
|
|
265
|
-
disabled:
|
|
266
|
-
className: "p-2 hover:bg-accent rounded-md disabled:opacity-30",
|
|
267
|
-
|
|
269
|
+
disabled: F.findIndex((e) => e.id === I.id) === F.length - 1,
|
|
270
|
+
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md disabled:opacity-30",
|
|
271
|
+
"aria-label": S("stepEditor.nextStep"),
|
|
272
|
+
children: /* @__PURE__ */ v(u, { size: 20 })
|
|
268
273
|
})
|
|
269
274
|
]
|
|
270
275
|
}),
|
|
@@ -277,8 +282,8 @@ function S() {
|
|
|
277
282
|
children: [S("stepEditor.stepTitle"), " *"]
|
|
278
283
|
}), /* @__PURE__ */ v("input", {
|
|
279
284
|
type: "text",
|
|
280
|
-
value:
|
|
281
|
-
onChange: (e) =>
|
|
285
|
+
value: I.title,
|
|
286
|
+
onChange: (e) => B(I.id, "title", e.target.value),
|
|
282
287
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm sm:text-base",
|
|
283
288
|
placeholder: S("stepEditor.stepTitlePlaceholder")
|
|
284
289
|
})] }),
|
|
@@ -286,8 +291,8 @@ function S() {
|
|
|
286
291
|
className: "block text-sm font-medium mb-2",
|
|
287
292
|
children: [S("stepEditor.content"), " *"]
|
|
288
293
|
}), /* @__PURE__ */ v("textarea", {
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
294
|
+
value: I.content,
|
|
295
|
+
onChange: (e) => B(I.id, "content", e.target.value),
|
|
291
296
|
rows: 4,
|
|
292
297
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm sm:text-base resize-y min-h-[100px]",
|
|
293
298
|
placeholder: S("stepEditor.contentPlaceholder")
|
|
@@ -310,8 +315,8 @@ function S() {
|
|
|
310
315
|
}),
|
|
311
316
|
/* @__PURE__ */ v("input", {
|
|
312
317
|
type: "text",
|
|
313
|
-
value:
|
|
314
|
-
onChange: (e) =>
|
|
318
|
+
value: I.targetSelector || "",
|
|
319
|
+
onChange: (e) => B(I.id, "targetSelector", e.target.value),
|
|
315
320
|
placeholder: S("stepEditor.cssSelectorPlaceholder"),
|
|
316
321
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background font-mono text-sm"
|
|
317
322
|
}),
|
|
@@ -324,8 +329,8 @@ function S() {
|
|
|
324
329
|
className: "block text-sm font-medium mb-2",
|
|
325
330
|
children: S("stepEditor.tooltipPlacement")
|
|
326
331
|
}), /* @__PURE__ */ y("select", {
|
|
327
|
-
value:
|
|
328
|
-
onChange: (e) =>
|
|
332
|
+
value: I.placement,
|
|
333
|
+
onChange: (e) => B(I.id, "placement", e.target.value),
|
|
329
334
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm sm:text-base",
|
|
330
335
|
children: [
|
|
331
336
|
/* @__PURE__ */ v("option", {
|
|
@@ -371,8 +376,8 @@ function S() {
|
|
|
371
376
|
children: S("stepEditor.mobileSelector")
|
|
372
377
|
}), /* @__PURE__ */ v("input", {
|
|
373
378
|
type: "text",
|
|
374
|
-
value:
|
|
375
|
-
onChange: (e) =>
|
|
379
|
+
value: I.targetSelectorMobile || "",
|
|
380
|
+
onChange: (e) => B(I.id, "targetSelectorMobile", e.target.value),
|
|
376
381
|
placeholder: S("stepEditor.leaveEmptyDefault"),
|
|
377
382
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono"
|
|
378
383
|
})] }),
|
|
@@ -381,8 +386,8 @@ function S() {
|
|
|
381
386
|
children: S("stepEditor.tabletSelector")
|
|
382
387
|
}), /* @__PURE__ */ v("input", {
|
|
383
388
|
type: "text",
|
|
384
|
-
value:
|
|
385
|
-
onChange: (e) =>
|
|
389
|
+
value: I.targetSelectorTablet || "",
|
|
390
|
+
onChange: (e) => B(I.id, "targetSelectorTablet", e.target.value),
|
|
386
391
|
placeholder: S("stepEditor.leaveEmptyDefault"),
|
|
387
392
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono"
|
|
388
393
|
})] }),
|
|
@@ -391,8 +396,8 @@ function S() {
|
|
|
391
396
|
children: S("stepEditor.desktopSelector")
|
|
392
397
|
}), /* @__PURE__ */ v("input", {
|
|
393
398
|
type: "text",
|
|
394
|
-
value:
|
|
395
|
-
onChange: (e) =>
|
|
399
|
+
value: I.targetSelectorDesktop || "",
|
|
400
|
+
onChange: (e) => B(I.id, "targetSelectorDesktop", e.target.value),
|
|
396
401
|
placeholder: S("stepEditor.leaveEmptyDefault"),
|
|
397
402
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono"
|
|
398
403
|
})] })
|
|
@@ -405,8 +410,8 @@ function S() {
|
|
|
405
410
|
className: "flex items-center gap-3 cursor-pointer rounded-md border border-border p-3",
|
|
406
411
|
children: [/* @__PURE__ */ v("input", {
|
|
407
412
|
type: "checkbox",
|
|
408
|
-
checked:
|
|
409
|
-
onChange: (e) =>
|
|
413
|
+
checked: I.requireInteraction ?? !1,
|
|
414
|
+
onChange: (e) => B(I.id, "requireInteraction", e.target.checked),
|
|
410
415
|
className: "w-4 h-4 rounded"
|
|
411
416
|
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
412
417
|
className: "text-sm font-medium",
|
|
@@ -421,8 +426,8 @@ function S() {
|
|
|
421
426
|
}), /* @__PURE__ */ v("input", {
|
|
422
427
|
type: "number",
|
|
423
428
|
min: "0",
|
|
424
|
-
value:
|
|
425
|
-
onChange: (e) =>
|
|
429
|
+
value: I.waitForTimeout ?? "",
|
|
430
|
+
onChange: (e) => B(I.id, "waitForTimeout", e.target.value ? Number(e.target.value) : void 0),
|
|
426
431
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
427
432
|
placeholder: "1500"
|
|
428
433
|
})] })]
|
|
@@ -434,8 +439,8 @@ function S() {
|
|
|
434
439
|
children: "Wait for selector"
|
|
435
440
|
}), /* @__PURE__ */ v("input", {
|
|
436
441
|
type: "text",
|
|
437
|
-
value:
|
|
438
|
-
onChange: (e) =>
|
|
442
|
+
value: I.waitForSelector || "",
|
|
443
|
+
onChange: (e) => B(I.id, "waitForSelector", e.target.value || void 0),
|
|
439
444
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono",
|
|
440
445
|
placeholder: "[data-tour='agents-tabs']"
|
|
441
446
|
})] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
@@ -443,8 +448,8 @@ function S() {
|
|
|
443
448
|
children: "Wait for event"
|
|
444
449
|
}), /* @__PURE__ */ v("input", {
|
|
445
450
|
type: "text",
|
|
446
|
-
value:
|
|
447
|
-
onChange: (e) =>
|
|
451
|
+
value: I.waitForEvent || "",
|
|
452
|
+
onChange: (e) => B(I.id, "waitForEvent", e.target.value || void 0),
|
|
448
453
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
449
454
|
placeholder: "tour:ready"
|
|
450
455
|
})] })]
|
|
@@ -453,17 +458,17 @@ function S() {
|
|
|
453
458
|
className: "block text-sm font-medium mb-2",
|
|
454
459
|
children: "Skip conditions (JSON)"
|
|
455
460
|
}), /* @__PURE__ */ v("textarea", {
|
|
456
|
-
value:
|
|
461
|
+
value: I.skipConditions ? JSON.stringify(I.skipConditions, null, 2) : "",
|
|
457
462
|
onChange: (e) => {
|
|
458
463
|
let t = e.target.value.trim();
|
|
459
464
|
if (!t) {
|
|
460
|
-
|
|
465
|
+
B(I.id, "skipConditions", void 0);
|
|
461
466
|
return;
|
|
462
467
|
}
|
|
463
468
|
try {
|
|
464
|
-
|
|
469
|
+
B(I.id, "skipConditions", JSON.parse(t));
|
|
465
470
|
} catch {
|
|
466
|
-
|
|
471
|
+
B(I.id, "skipConditions", t);
|
|
467
472
|
}
|
|
468
473
|
},
|
|
469
474
|
rows: 4,
|
|
@@ -475,14 +480,14 @@ function S() {
|
|
|
475
480
|
children: [
|
|
476
481
|
/* @__PURE__ */ y("div", {
|
|
477
482
|
className: "flex items-center gap-2",
|
|
478
|
-
children: [/* @__PURE__ */ v(
|
|
483
|
+
children: [/* @__PURE__ */ v(p, { size: 18 }), /* @__PURE__ */ v("h3", {
|
|
479
484
|
className: "text-sm font-semibold",
|
|
480
485
|
children: "Step media"
|
|
481
486
|
})]
|
|
482
487
|
}),
|
|
483
|
-
|
|
488
|
+
I.media && I.media.length > 0 ? /* @__PURE__ */ v("div", {
|
|
484
489
|
className: "space-y-2",
|
|
485
|
-
children:
|
|
490
|
+
children: I.media.map((e) => /* @__PURE__ */ y("div", {
|
|
486
491
|
className: "flex items-center justify-between rounded-md border border-border p-2 text-sm",
|
|
487
492
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("div", {
|
|
488
493
|
className: "font-medium",
|
|
@@ -508,8 +513,8 @@ function S() {
|
|
|
508
513
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
509
514
|
children: [/* @__PURE__ */ v("option", {
|
|
510
515
|
value: "",
|
|
511
|
-
children:
|
|
512
|
-
}),
|
|
516
|
+
children: W ? "Loading media..." : "Select uploaded media"
|
|
517
|
+
}), se.map((e) => /* @__PURE__ */ y("option", {
|
|
513
518
|
value: e.id,
|
|
514
519
|
children: [
|
|
515
520
|
e.name,
|
|
@@ -521,7 +526,7 @@ function S() {
|
|
|
521
526
|
}),
|
|
522
527
|
/* @__PURE__ */ y("select", {
|
|
523
528
|
value: X,
|
|
524
|
-
onChange: (e) =>
|
|
529
|
+
onChange: (e) => Z(e.target.value),
|
|
525
530
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
526
531
|
children: [
|
|
527
532
|
/* @__PURE__ */ v("option", {
|
|
@@ -540,9 +545,9 @@ function S() {
|
|
|
540
545
|
}),
|
|
541
546
|
/* @__PURE__ */ v("button", {
|
|
542
547
|
type: "button",
|
|
543
|
-
onClick:
|
|
544
|
-
disabled:
|
|
545
|
-
className: "px-4 py-2 border border-border rounded-md hover:bg-accent disabled:opacity-50",
|
|
548
|
+
onClick: fe,
|
|
549
|
+
disabled: le || !J,
|
|
550
|
+
className: "px-4 py-2 min-h-[44px] border border-border rounded-md hover:bg-accent disabled:opacity-50",
|
|
546
551
|
children: "Attach"
|
|
547
552
|
})
|
|
548
553
|
]
|
|
@@ -555,7 +560,7 @@ function S() {
|
|
|
555
560
|
children: [
|
|
556
561
|
/* @__PURE__ */ v("div", {
|
|
557
562
|
className: "w-16 h-16 bg-muted rounded-full flex items-center justify-center mb-4",
|
|
558
|
-
children: /* @__PURE__ */ v(
|
|
563
|
+
children: /* @__PURE__ */ v(m, {
|
|
559
564
|
size: 24,
|
|
560
565
|
className: "text-muted-foreground"
|
|
561
566
|
})
|
|
@@ -566,12 +571,12 @@ function S() {
|
|
|
566
571
|
}),
|
|
567
572
|
/* @__PURE__ */ v("p", {
|
|
568
573
|
className: "text-sm text-muted-foreground mb-4",
|
|
569
|
-
children:
|
|
574
|
+
children: F.length > 0 ? S("stepEditor.selectStepToEdit") : S("stepEditor.createFirstStep")
|
|
570
575
|
}),
|
|
571
|
-
|
|
572
|
-
onClick:
|
|
573
|
-
className: "px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 flex items-center gap-2",
|
|
574
|
-
children: [/* @__PURE__ */ v(
|
|
576
|
+
F.length === 0 && O && /* @__PURE__ */ y("button", {
|
|
577
|
+
onClick: $,
|
|
578
|
+
className: "px-4 py-2 min-h-[44px] bg-primary text-primary-foreground rounded-md hover:bg-primary/90 flex items-center gap-2",
|
|
579
|
+
children: [/* @__PURE__ */ v(m, { size: 18 }), S("stepEditor.addFirstStep")]
|
|
575
580
|
})
|
|
576
581
|
]
|
|
577
582
|
})
|