@burdenoff/microfe-tours 2026.527.2 → 2026.527.4
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/tours/ToursUserRoutes.js +2 -4
- package/dist/tours/ToursUserRoutes.js.map +1 -1
- package/dist/tours/components/RouteHelpers.js +4 -4
- package/dist/tours/components/RouteHelpers.js.map +1 -1
- package/dist/tours/hooks/useTourPreview.js +39 -39
- package/dist/tours/hooks/useTourPreview.js.map +1 -1
- package/dist/tours/hooks/useToursList.js.map +1 -1
- package/dist/tours/pages/MediaLibraryPage.js +11 -8
- package/dist/tours/pages/MediaLibraryPage.js.map +1 -1
- package/dist/tours/pages/MyToursPage.js +59 -57
- package/dist/tours/pages/MyToursPage.js.map +1 -1
- package/dist/tours/pages/MyToursProgressPage.js +65 -61
- package/dist/tours/pages/MyToursProgressPage.js.map +1 -1
- package/dist/tours/pages/SchedulerPage.js +18 -4
- package/dist/tours/pages/SchedulerPage.js.map +1 -1
- package/dist/tours/pages/StepEditorPage.js +330 -276
- package/dist/tours/pages/StepEditorPage.js.map +1 -1
- package/dist/tours/pages/TemplateLibraryPage.js +7 -2
- package/dist/tours/pages/TemplateLibraryPage.js.map +1 -1
- package/dist/tours/pages/TourBuilderPage.js +25 -11
- package/dist/tours/pages/TourBuilderPage.js.map +1 -1
- package/dist/tours/pages/TourPreviewPage.js +12 -4
- package/dist/tours/pages/TourPreviewPage.js.map +1 -1
- package/dist/tours/pages/ToursListPage.js +165 -149
- package/dist/tours/pages/ToursListPage.js.map +1 -1
- package/dist/tours/providers/ToursProvider.js +1 -1
- package/dist/tours/providers/ToursProvider.js.map +1 -1
- package/dist/tours/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,229 +1,244 @@
|
|
|
1
1
|
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
|
-
import { useToursI18n as
|
|
5
|
-
import { emitToursApiFailed as
|
|
6
|
-
import { useMediaLibrary as
|
|
7
|
-
import { useStepSequencer as
|
|
8
|
-
import { useTourBuilder as
|
|
9
|
-
import { useEffect as
|
|
10
|
-
import { PermissionGate as
|
|
11
|
-
import { ArrowLeft as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { useNavigate as
|
|
14
|
-
import { useEventBus as
|
|
4
|
+
import { useToursI18n as ee } from "../i18n.js";
|
|
5
|
+
import { emitToursApiFailed as r } from "../telemetry.js";
|
|
6
|
+
import { useMediaLibrary as te } from "../hooks/useMediaLibrary.js";
|
|
7
|
+
import { useStepSequencer as i } from "../hooks/useStepSequencer.js";
|
|
8
|
+
import { useTourBuilder as a } from "../hooks/useTourBuilder.js";
|
|
9
|
+
import { useEffect as o, useState as s } from "react";
|
|
10
|
+
import { PermissionGate as ne } from "@burdenoff/fe-libs/shared/components";
|
|
11
|
+
import { ArrowLeft as re, ChevronDown as ie, ChevronLeft as ae, ChevronRight as c, ChevronUp as l, Menu as u, Paperclip as d, Plus as f, Save as p, Trash2 as m, X as h } from "lucide-react";
|
|
12
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
|
+
import { useNavigate as v, useParams as y } from "react-router-dom";
|
|
14
|
+
import { useEventBus as oe } from "@burdenoff/fe-libs/shared/events";
|
|
15
15
|
//#region src/tours/pages/StepEditorPage.tsx
|
|
16
|
-
function
|
|
17
|
-
let { tr:
|
|
18
|
-
|
|
16
|
+
function b() {
|
|
17
|
+
let { tr: b } = ee(), { tourId: x, stepId: S } = y(), se = v(), C = e(), { basePath: ce = "/" } = C, w = oe(), { hasPermission: T } = t(), E = T(n.TOUR_STEP_CREATE), D = T(n.TOUR_STEP_UPDATE), O = T(n.TOUR_STEP_DELETE), { tour: k, loadTour: A, syncSteps: j, saving: M } = a(x), { steps: N, selectedStep: P, selectStep: F, createStep: I, deleteStep: L, updateStepField: R, moveStep: z } = i(), { media: B, fetchMedia: V, attachToStep: H, loading: U } = te(), [W, G] = s(!1), [K, le] = s(() => typeof window < "u" && window.innerWidth < 768), [q, J] = s(""), [Y, X] = s("body"), [ue, Z] = s(!1);
|
|
18
|
+
o(() => {
|
|
19
19
|
let e = () => {
|
|
20
20
|
let e = window.innerWidth < 768;
|
|
21
|
-
|
|
21
|
+
le(e), e || G(!1);
|
|
22
22
|
};
|
|
23
|
-
return
|
|
24
|
-
}, []),
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
|
|
28
|
-
}, [
|
|
29
|
-
let e =
|
|
30
|
-
if (e &&
|
|
31
|
-
let t =
|
|
32
|
-
t &&
|
|
23
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
24
|
+
}, []), o(() => {
|
|
25
|
+
x && A(x);
|
|
26
|
+
}, [x, A]), o(() => {
|
|
27
|
+
V();
|
|
28
|
+
}, [V]), o(() => {
|
|
29
|
+
let e = S || P?.id;
|
|
30
|
+
if (e && N.length > 0) {
|
|
31
|
+
let t = N.find((t) => t.id === e);
|
|
32
|
+
t && F(t);
|
|
33
33
|
}
|
|
34
34
|
}, [
|
|
35
|
-
|
|
35
|
+
S,
|
|
36
|
+
N,
|
|
36
37
|
F,
|
|
37
|
-
|
|
38
|
-
I?.id
|
|
38
|
+
P?.id
|
|
39
39
|
]);
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
if (
|
|
44
|
-
await
|
|
40
|
+
let Q = () => {
|
|
41
|
+
I();
|
|
42
|
+
}, de = async () => {
|
|
43
|
+
if (x) try {
|
|
44
|
+
await j(x, N);
|
|
45
45
|
} catch {
|
|
46
|
-
|
|
46
|
+
r(w, "step.save", C);
|
|
47
47
|
}
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
if (!(!
|
|
52
|
-
if (
|
|
48
|
+
}, fe = () => {
|
|
49
|
+
se(`${ce}/${x}/edit`);
|
|
50
|
+
}, pe = async () => {
|
|
51
|
+
if (!(!P || !x || !q)) {
|
|
52
|
+
if (P.id.startsWith("temp_")) {
|
|
53
53
|
window.alert("Save your steps before attaching media to them.");
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
try {
|
|
57
|
-
|
|
57
|
+
Z(!0), await H(P.id, q, Y, (P.media?.length ?? 0) + 1), await A(x), J("");
|
|
58
58
|
} catch {
|
|
59
|
-
|
|
59
|
+
r(w, "media.attach", C);
|
|
60
60
|
} finally {
|
|
61
|
-
|
|
61
|
+
Z(!1);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
},
|
|
65
|
-
|
|
64
|
+
}, $ = (e) => {
|
|
65
|
+
F(e), K && G(!1);
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ _("div", {
|
|
68
68
|
className: "flex flex-col h-full bg-background",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
69
|
+
children: [/* @__PURE__ */ _("div", {
|
|
70
70
|
className: "border-b border-border p-3 sm:p-4 flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4 bg-card",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
71
|
+
children: [/* @__PURE__ */ _("div", {
|
|
72
72
|
className: "flex items-center gap-3",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
-
|
|
73
|
+
children: [/* @__PURE__ */ g("button", {
|
|
74
|
+
type: "button",
|
|
75
|
+
onClick: fe,
|
|
75
76
|
className: "p-2 hover:bg-accent rounded-md shrink-0",
|
|
76
|
-
"aria-label":
|
|
77
|
-
children: /* @__PURE__ */
|
|
78
|
-
}), /* @__PURE__ */
|
|
77
|
+
"aria-label": b("stepEditor.goBack"),
|
|
78
|
+
children: /* @__PURE__ */ g(re, { size: 20 })
|
|
79
|
+
}), /* @__PURE__ */ _("div", {
|
|
79
80
|
className: "flex-1 min-w-0",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ _("h1", {
|
|
81
82
|
className: "text-base sm:text-lg font-semibold truncate",
|
|
82
83
|
children: [
|
|
83
|
-
|
|
84
|
+
k?.name || b("stepEditor.tourFallback"),
|
|
84
85
|
" - ",
|
|
85
|
-
|
|
86
|
+
b("stepEditor.stepsLabel")
|
|
86
87
|
]
|
|
87
|
-
}), /* @__PURE__ */
|
|
88
|
+
}), /* @__PURE__ */ _("p", {
|
|
88
89
|
className: "text-xs sm:text-sm text-muted-foreground",
|
|
89
90
|
children: [
|
|
90
|
-
|
|
91
|
+
N.length,
|
|
91
92
|
" ",
|
|
92
|
-
|
|
93
|
+
b("stepEditor.stepsCount")
|
|
93
94
|
]
|
|
94
95
|
})]
|
|
95
96
|
})]
|
|
96
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ _("div", {
|
|
97
98
|
className: "flex items-center gap-2 sm:gap-3 ml-auto",
|
|
98
99
|
children: [
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
K && /* @__PURE__ */ _("button", {
|
|
101
|
+
type: "button",
|
|
102
|
+
onClick: () => G(!W),
|
|
101
103
|
className: "px-3 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2 sm:hidden",
|
|
102
104
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ g(u, { size: 18 }),
|
|
106
|
+
/* @__PURE__ */ g("span", {
|
|
105
107
|
className: "text-sm",
|
|
106
|
-
children:
|
|
108
|
+
children: b("stepEditor.steps")
|
|
107
109
|
}),
|
|
108
|
-
|
|
110
|
+
N.length > 0 && /* @__PURE__ */ g("span", {
|
|
109
111
|
className: "px-1.5 py-0.5 text-xs bg-primary/20 rounded-full",
|
|
110
|
-
children:
|
|
112
|
+
children: N.length
|
|
111
113
|
})
|
|
112
114
|
]
|
|
113
115
|
}),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
E && /* @__PURE__ */ _("button", {
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: Q,
|
|
116
119
|
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",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ g(f, { size: 18 }), /* @__PURE__ */ g("span", {
|
|
118
121
|
className: "hidden xs:inline",
|
|
119
|
-
children:
|
|
122
|
+
children: b("stepEditor.addStep")
|
|
120
123
|
})]
|
|
121
124
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ g(ne, {
|
|
123
126
|
permission: n.TOUR_STEP_UPDATE,
|
|
124
|
-
children: /* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
children: /* @__PURE__ */ _("button", {
|
|
128
|
+
type: "button",
|
|
129
|
+
onClick: de,
|
|
130
|
+
disabled: M || !D,
|
|
127
131
|
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",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ g(p, { size: 18 }), /* @__PURE__ */ g("span", {
|
|
129
133
|
className: "hidden xs:inline",
|
|
130
|
-
children:
|
|
134
|
+
children: b(M ? "stepEditor.saving" : "stepEditor.save")
|
|
131
135
|
})]
|
|
132
136
|
})
|
|
133
137
|
})
|
|
134
138
|
]
|
|
135
139
|
})]
|
|
136
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ _("div", {
|
|
137
141
|
className: "flex-1 flex overflow-hidden relative",
|
|
138
142
|
children: [
|
|
139
|
-
|
|
143
|
+
K && W && /* @__PURE__ */ g("button", {
|
|
144
|
+
type: "button",
|
|
145
|
+
"aria-label": b("stepEditor.closeSteps"),
|
|
140
146
|
className: "fixed inset-0 bg-foreground/40 z-40 md:hidden",
|
|
141
|
-
onClick: () =>
|
|
147
|
+
onClick: () => G(!1)
|
|
142
148
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ _("div", {
|
|
144
150
|
className: `
|
|
145
|
-
${
|
|
146
|
-
${
|
|
151
|
+
${K ? "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"}
|
|
152
|
+
${K && !W ? "-translate-x-full" : "translate-x-0"}
|
|
147
153
|
border-r border-border overflow-y-auto bg-card
|
|
148
154
|
`,
|
|
149
|
-
children: [
|
|
155
|
+
children: [K && /* @__PURE__ */ _("div", {
|
|
150
156
|
className: "flex items-center justify-between p-4 border-b border-border sticky top-0 bg-card z-10",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
152
158
|
className: "font-semibold",
|
|
153
|
-
children:
|
|
154
|
-
}), /* @__PURE__ */
|
|
155
|
-
|
|
159
|
+
children: b("stepEditor.tourSteps")
|
|
160
|
+
}), /* @__PURE__ */ g("button", {
|
|
161
|
+
type: "button",
|
|
162
|
+
onClick: () => G(!1),
|
|
156
163
|
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md",
|
|
157
|
-
"aria-label":
|
|
158
|
-
children: /* @__PURE__ */
|
|
164
|
+
"aria-label": b("stepEditor.closeSteps"),
|
|
165
|
+
children: /* @__PURE__ */ g(h, { size: 20 })
|
|
159
166
|
})]
|
|
160
|
-
}), /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ g("div", {
|
|
161
168
|
className: "p-3 sm:p-4 space-y-2",
|
|
162
|
-
children:
|
|
169
|
+
children: N.length === 0 ? /* @__PURE__ */ _("div", {
|
|
163
170
|
className: "text-center py-8 text-muted-foreground",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ g("p", {
|
|
165
172
|
className: "text-sm",
|
|
166
|
-
children:
|
|
167
|
-
}), /* @__PURE__ */
|
|
173
|
+
children: b("stepEditor.noStepsYet")
|
|
174
|
+
}), /* @__PURE__ */ g("p", {
|
|
168
175
|
className: "text-xs mt-1",
|
|
169
|
-
children:
|
|
176
|
+
children: b("stepEditor.clickAddStep")
|
|
170
177
|
})]
|
|
171
|
-
}) :
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
178
|
+
}) : N.map((e, t) => /* @__PURE__ */ g("div", {
|
|
179
|
+
role: "button",
|
|
180
|
+
tabIndex: 0,
|
|
181
|
+
onClick: () => $(e),
|
|
182
|
+
onKeyDown: (t) => {
|
|
183
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), $(e));
|
|
184
|
+
},
|
|
185
|
+
className: `p-3 border rounded-md cursor-pointer transition-colors ${P?.id === e.id ? "border-primary bg-primary/10" : "border-border hover:bg-accent"}`,
|
|
186
|
+
children: /* @__PURE__ */ _("div", {
|
|
175
187
|
className: "flex items-start justify-between gap-2",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ _("div", {
|
|
177
189
|
className: "flex-1 min-w-0",
|
|
178
190
|
children: [
|
|
179
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ _("div", {
|
|
180
192
|
className: "text-xs text-muted-foreground mb-1",
|
|
181
193
|
children: [
|
|
182
|
-
|
|
194
|
+
b("stepEditor.stepNumber"),
|
|
183
195
|
" ",
|
|
184
196
|
t + 1
|
|
185
197
|
]
|
|
186
198
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ g("div", {
|
|
188
200
|
className: "font-medium text-sm truncate",
|
|
189
|
-
children: e.title ||
|
|
201
|
+
children: e.title || b("stepEditor.untitled")
|
|
190
202
|
}),
|
|
191
|
-
e.targetSelector && /* @__PURE__ */
|
|
203
|
+
e.targetSelector && /* @__PURE__ */ g("div", {
|
|
192
204
|
className: "text-xs text-muted-foreground mt-1 truncate font-mono",
|
|
193
205
|
children: e.targetSelector
|
|
194
206
|
})
|
|
195
207
|
]
|
|
196
|
-
}),
|
|
208
|
+
}), O && /* @__PURE__ */ _("div", {
|
|
197
209
|
className: "flex items-center gap-1 shrink-0",
|
|
198
210
|
children: [
|
|
199
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ g("button", {
|
|
212
|
+
type: "button",
|
|
200
213
|
onClick: (e) => {
|
|
201
|
-
e.stopPropagation(), t > 0 &&
|
|
214
|
+
e.stopPropagation(), t > 0 && z(t, t - 1);
|
|
202
215
|
},
|
|
203
216
|
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",
|
|
204
217
|
title: "Move step up",
|
|
205
218
|
"aria-label": "Move step up",
|
|
206
219
|
disabled: t === 0,
|
|
207
|
-
children: /* @__PURE__ */
|
|
220
|
+
children: /* @__PURE__ */ g(l, { size: 14 })
|
|
208
221
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ g("button", {
|
|
223
|
+
type: "button",
|
|
210
224
|
onClick: (e) => {
|
|
211
|
-
e.stopPropagation(), t <
|
|
225
|
+
e.stopPropagation(), t < N.length - 1 && z(t, t + 1);
|
|
212
226
|
},
|
|
213
227
|
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",
|
|
214
228
|
title: "Move step down",
|
|
215
229
|
"aria-label": "Move step down",
|
|
216
|
-
disabled: t ===
|
|
217
|
-
children: /* @__PURE__ */
|
|
230
|
+
disabled: t === N.length - 1,
|
|
231
|
+
children: /* @__PURE__ */ g(ie, { size: 14 })
|
|
218
232
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ g("button", {
|
|
234
|
+
type: "button",
|
|
220
235
|
onClick: (t) => {
|
|
221
|
-
t.stopPropagation(),
|
|
236
|
+
t.stopPropagation(), L(e.id);
|
|
222
237
|
},
|
|
223
238
|
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",
|
|
224
|
-
title:
|
|
225
|
-
"aria-label":
|
|
226
|
-
children: /* @__PURE__ */
|
|
239
|
+
title: b("stepEditor.deleteStep"),
|
|
240
|
+
"aria-label": b("stepEditor.deleteStep"),
|
|
241
|
+
children: /* @__PURE__ */ g(m, { size: 14 })
|
|
227
242
|
})
|
|
228
243
|
]
|
|
229
244
|
})]
|
|
@@ -231,290 +246,327 @@ function S() {
|
|
|
231
246
|
}, e.id))
|
|
232
247
|
})]
|
|
233
248
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ g("div", {
|
|
235
250
|
className: "flex-1 overflow-y-auto p-4 sm:p-6",
|
|
236
|
-
children:
|
|
251
|
+
children: P ? /* @__PURE__ */ _("div", {
|
|
237
252
|
className: "max-w-2xl mx-auto space-y-4 sm:space-y-6",
|
|
238
253
|
children: [
|
|
239
|
-
|
|
254
|
+
K && N.length > 1 && /* @__PURE__ */ _("div", {
|
|
240
255
|
className: "flex items-center justify-between bg-muted/50 rounded-lg p-2 mb-4",
|
|
241
256
|
children: [
|
|
242
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ g("button", {
|
|
258
|
+
type: "button",
|
|
243
259
|
onClick: () => {
|
|
244
|
-
let e =
|
|
245
|
-
e > 0 &&
|
|
260
|
+
let e = N.findIndex((e) => e.id === P.id);
|
|
261
|
+
e > 0 && F(N[e - 1]);
|
|
246
262
|
},
|
|
247
|
-
disabled:
|
|
263
|
+
disabled: N.findIndex((e) => e.id === P.id) === 0,
|
|
248
264
|
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md disabled:opacity-30",
|
|
249
|
-
"aria-label":
|
|
250
|
-
children: /* @__PURE__ */
|
|
265
|
+
"aria-label": b("stepEditor.previousStep"),
|
|
266
|
+
children: /* @__PURE__ */ g(ae, { size: 20 })
|
|
251
267
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ _("span", {
|
|
253
269
|
className: "text-sm text-muted-foreground",
|
|
254
270
|
children: [
|
|
255
|
-
|
|
271
|
+
b("stepEditor.stepNumber"),
|
|
256
272
|
" ",
|
|
257
|
-
|
|
273
|
+
N.findIndex((e) => e.id === P.id) + 1,
|
|
258
274
|
" ",
|
|
259
|
-
|
|
275
|
+
b("stepEditor.of"),
|
|
260
276
|
" ",
|
|
261
|
-
|
|
277
|
+
N.length
|
|
262
278
|
]
|
|
263
279
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ g("button", {
|
|
281
|
+
type: "button",
|
|
265
282
|
onClick: () => {
|
|
266
|
-
let e =
|
|
267
|
-
e <
|
|
283
|
+
let e = N.findIndex((e) => e.id === P.id);
|
|
284
|
+
e < N.length - 1 && F(N[e + 1]);
|
|
268
285
|
},
|
|
269
|
-
disabled:
|
|
286
|
+
disabled: N.findIndex((e) => e.id === P.id) === N.length - 1,
|
|
270
287
|
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md disabled:opacity-30",
|
|
271
|
-
"aria-label":
|
|
272
|
-
children: /* @__PURE__ */
|
|
288
|
+
"aria-label": b("stepEditor.nextStep"),
|
|
289
|
+
children: /* @__PURE__ */ g(c, { size: 20 })
|
|
273
290
|
})
|
|
274
291
|
]
|
|
275
292
|
}),
|
|
276
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ g("h2", {
|
|
277
294
|
className: "text-lg sm:text-xl font-semibold",
|
|
278
|
-
children:
|
|
295
|
+
children: b("stepEditor.editStep")
|
|
279
296
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
281
298
|
className: "block text-sm font-medium mb-2",
|
|
282
|
-
|
|
283
|
-
|
|
299
|
+
htmlFor: "step-editor-title",
|
|
300
|
+
children: [b("stepEditor.stepTitle"), " *"]
|
|
301
|
+
}), /* @__PURE__ */ g("input", {
|
|
302
|
+
id: "step-editor-title",
|
|
284
303
|
type: "text",
|
|
285
|
-
value:
|
|
286
|
-
onChange: (e) =>
|
|
304
|
+
value: P.title,
|
|
305
|
+
onChange: (e) => R(P.id, "title", e.target.value),
|
|
287
306
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm sm:text-base",
|
|
288
|
-
placeholder:
|
|
307
|
+
placeholder: b("stepEditor.stepTitlePlaceholder"),
|
|
308
|
+
"aria-label": b("stepEditor.stepTitle")
|
|
289
309
|
})] }),
|
|
290
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
291
311
|
className: "block text-sm font-medium mb-2",
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
312
|
+
htmlFor: "step-editor-content",
|
|
313
|
+
children: [b("stepEditor.content"), " *"]
|
|
314
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
315
|
+
id: "step-editor-content",
|
|
316
|
+
value: P.content,
|
|
317
|
+
onChange: (e) => R(P.id, "content", e.target.value),
|
|
296
318
|
rows: 4,
|
|
297
319
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm sm:text-base resize-y min-h-[100px]",
|
|
298
|
-
placeholder:
|
|
320
|
+
placeholder: b("stepEditor.contentPlaceholder"),
|
|
321
|
+
"aria-label": b("stepEditor.content")
|
|
299
322
|
})] }),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ _("div", { children: [
|
|
324
|
+
/* @__PURE__ */ _("label", {
|
|
302
325
|
className: "block text-sm font-medium mb-2",
|
|
326
|
+
htmlFor: "step-editor-css-selector",
|
|
303
327
|
children: [
|
|
304
|
-
|
|
328
|
+
b("stepEditor.cssSelector"),
|
|
305
329
|
" *",
|
|
306
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ _("span", {
|
|
307
331
|
className: "text-muted-foreground font-normal ml-2",
|
|
308
332
|
children: [
|
|
309
333
|
"(",
|
|
310
|
-
|
|
334
|
+
b("stepEditor.targetElement"),
|
|
311
335
|
")"
|
|
312
336
|
]
|
|
313
337
|
})
|
|
314
338
|
]
|
|
315
339
|
}),
|
|
316
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ g("input", {
|
|
341
|
+
id: "step-editor-css-selector",
|
|
317
342
|
type: "text",
|
|
318
|
-
value:
|
|
319
|
-
onChange: (e) =>
|
|
320
|
-
placeholder:
|
|
321
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background font-mono text-sm"
|
|
343
|
+
value: P.targetSelector || "",
|
|
344
|
+
onChange: (e) => R(P.id, "targetSelector", e.target.value),
|
|
345
|
+
placeholder: b("stepEditor.cssSelectorPlaceholder"),
|
|
346
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background font-mono text-sm",
|
|
347
|
+
"aria-label": "{tr('stepEditor.cssSelector')} *\n \n ({tr('stepEditor.targetElement')})"
|
|
322
348
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ g("p", {
|
|
324
350
|
className: "text-xs text-muted-foreground mt-1",
|
|
325
|
-
children:
|
|
351
|
+
children: b("stepEditor.dataTourHint")
|
|
326
352
|
})
|
|
327
353
|
] }),
|
|
328
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
329
355
|
className: "block text-sm font-medium mb-2",
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
356
|
+
htmlFor: "step-editor-placement",
|
|
357
|
+
children: b("stepEditor.tooltipPlacement")
|
|
358
|
+
}), /* @__PURE__ */ _("select", {
|
|
359
|
+
id: "step-editor-placement",
|
|
360
|
+
value: P.placement,
|
|
361
|
+
onChange: (e) => R(P.id, "placement", e.target.value),
|
|
334
362
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm sm:text-base",
|
|
363
|
+
"aria-label": b("stepEditor.tooltipPlacement"),
|
|
335
364
|
children: [
|
|
336
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ g("option", {
|
|
337
366
|
value: "AUTO",
|
|
338
|
-
children:
|
|
367
|
+
children: b("stepEditor.placementAuto")
|
|
339
368
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ g("option", {
|
|
341
370
|
value: "TOP",
|
|
342
|
-
children:
|
|
371
|
+
children: b("stepEditor.placementTop")
|
|
343
372
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ g("option", {
|
|
345
374
|
value: "BOTTOM",
|
|
346
|
-
children:
|
|
375
|
+
children: b("stepEditor.placementBottom")
|
|
347
376
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ g("option", {
|
|
349
378
|
value: "LEFT",
|
|
350
|
-
children:
|
|
379
|
+
children: b("stepEditor.placementLeft")
|
|
351
380
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ g("option", {
|
|
353
382
|
value: "RIGHT",
|
|
354
|
-
children:
|
|
383
|
+
children: b("stepEditor.placementRight")
|
|
355
384
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ g("option", {
|
|
357
386
|
value: "CENTER",
|
|
358
|
-
children:
|
|
387
|
+
children: b("stepEditor.placementCenter")
|
|
359
388
|
})
|
|
360
389
|
]
|
|
361
390
|
})] }),
|
|
362
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ _("details", {
|
|
363
392
|
className: "border border-border rounded-md",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
393
|
+
children: [/* @__PURE__ */ g("summary", {
|
|
365
394
|
className: "px-4 py-3 cursor-pointer font-medium text-sm hover:bg-accent/50 rounded-t-md",
|
|
366
|
-
children:
|
|
367
|
-
}), /* @__PURE__ */
|
|
395
|
+
children: b("stepEditor.deviceSpecificSelectors")
|
|
396
|
+
}), /* @__PURE__ */ _("div", {
|
|
368
397
|
className: "p-4 pt-0 space-y-3 border-t border-border",
|
|
369
398
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ g("p", {
|
|
371
400
|
className: "text-xs text-muted-foreground mb-3",
|
|
372
|
-
children:
|
|
401
|
+
children: b("stepEditor.deviceSelectorHint")
|
|
373
402
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
375
404
|
className: "block text-xs font-medium mb-1",
|
|
376
|
-
|
|
377
|
-
|
|
405
|
+
htmlFor: "step-editor-mobile-selector",
|
|
406
|
+
children: b("stepEditor.mobileSelector")
|
|
407
|
+
}), /* @__PURE__ */ g("input", {
|
|
408
|
+
id: "step-editor-mobile-selector",
|
|
378
409
|
type: "text",
|
|
379
|
-
value:
|
|
380
|
-
onChange: (e) =>
|
|
381
|
-
placeholder:
|
|
382
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono"
|
|
410
|
+
value: P.targetSelectorMobile || "",
|
|
411
|
+
onChange: (e) => R(P.id, "targetSelectorMobile", e.target.value),
|
|
412
|
+
placeholder: b("stepEditor.leaveEmptyDefault"),
|
|
413
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono",
|
|
414
|
+
"aria-label": b("stepEditor.mobileSelector")
|
|
383
415
|
})] }),
|
|
384
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
385
417
|
className: "block text-xs font-medium mb-1",
|
|
386
|
-
|
|
387
|
-
|
|
418
|
+
htmlFor: "step-editor-tablet-selector",
|
|
419
|
+
children: b("stepEditor.tabletSelector")
|
|
420
|
+
}), /* @__PURE__ */ g("input", {
|
|
421
|
+
id: "step-editor-tablet-selector",
|
|
388
422
|
type: "text",
|
|
389
|
-
value:
|
|
390
|
-
onChange: (e) =>
|
|
391
|
-
placeholder:
|
|
392
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono"
|
|
423
|
+
value: P.targetSelectorTablet || "",
|
|
424
|
+
onChange: (e) => R(P.id, "targetSelectorTablet", e.target.value),
|
|
425
|
+
placeholder: b("stepEditor.leaveEmptyDefault"),
|
|
426
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono",
|
|
427
|
+
"aria-label": b("stepEditor.tabletSelector")
|
|
393
428
|
})] }),
|
|
394
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
395
430
|
className: "block text-xs font-medium mb-1",
|
|
396
|
-
|
|
397
|
-
|
|
431
|
+
htmlFor: "step-editor-desktop-selector",
|
|
432
|
+
children: b("stepEditor.desktopSelector")
|
|
433
|
+
}), /* @__PURE__ */ g("input", {
|
|
434
|
+
id: "step-editor-desktop-selector",
|
|
398
435
|
type: "text",
|
|
399
|
-
value:
|
|
400
|
-
onChange: (e) =>
|
|
401
|
-
placeholder:
|
|
402
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono"
|
|
436
|
+
value: P.targetSelectorDesktop || "",
|
|
437
|
+
onChange: (e) => R(P.id, "targetSelectorDesktop", e.target.value),
|
|
438
|
+
placeholder: b("stepEditor.leaveEmptyDefault"),
|
|
439
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono",
|
|
440
|
+
"aria-label": b("stepEditor.desktopSelector")
|
|
403
441
|
})] })
|
|
404
442
|
]
|
|
405
443
|
})]
|
|
406
444
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ _("div", {
|
|
408
446
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
447
|
+
children: [/* @__PURE__ */ _("label", {
|
|
410
448
|
className: "flex items-center gap-3 cursor-pointer rounded-md border border-border p-3",
|
|
411
|
-
children: [/* @__PURE__ */
|
|
449
|
+
children: [/* @__PURE__ */ g("input", {
|
|
412
450
|
type: "checkbox",
|
|
413
|
-
checked:
|
|
414
|
-
onChange: (e) =>
|
|
415
|
-
className: "
|
|
416
|
-
|
|
451
|
+
checked: P.requireInteraction ?? !1,
|
|
452
|
+
onChange: (e) => R(P.id, "requireInteraction", e.target.checked),
|
|
453
|
+
className: "size-4 rounded",
|
|
454
|
+
"aria-label": "Require interaction"
|
|
455
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("div", {
|
|
417
456
|
className: "text-sm font-medium",
|
|
418
457
|
children: "Require interaction"
|
|
419
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ g("div", {
|
|
420
459
|
className: "text-xs text-muted-foreground",
|
|
421
460
|
children: "User must interact with the highlighted element before advancing."
|
|
422
461
|
})] })]
|
|
423
|
-
}), /* @__PURE__ */
|
|
462
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
424
463
|
className: "block text-sm font-medium mb-2",
|
|
464
|
+
htmlFor: "step-editor-wait-timeout",
|
|
425
465
|
children: "Wait for timeout (ms)"
|
|
426
|
-
}), /* @__PURE__ */
|
|
466
|
+
}), /* @__PURE__ */ g("input", {
|
|
467
|
+
id: "step-editor-wait-timeout",
|
|
427
468
|
type: "number",
|
|
428
469
|
min: "0",
|
|
429
|
-
value:
|
|
430
|
-
onChange: (e) =>
|
|
470
|
+
value: P.waitForTimeout ?? "",
|
|
471
|
+
onChange: (e) => R(P.id, "waitForTimeout", e.target.value ? Number(e.target.value) : void 0),
|
|
431
472
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
432
|
-
placeholder: "1500"
|
|
473
|
+
placeholder: "1500",
|
|
474
|
+
"aria-label": "Wait for timeout (ms)"
|
|
433
475
|
})] })]
|
|
434
476
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ _("div", {
|
|
436
478
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
437
|
-
children: [/* @__PURE__ */
|
|
479
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
438
480
|
className: "block text-sm font-medium mb-2",
|
|
481
|
+
htmlFor: "step-editor-wait-selector",
|
|
439
482
|
children: "Wait for selector"
|
|
440
|
-
}), /* @__PURE__ */
|
|
483
|
+
}), /* @__PURE__ */ g("input", {
|
|
484
|
+
id: "step-editor-wait-selector",
|
|
441
485
|
type: "text",
|
|
442
|
-
value:
|
|
443
|
-
onChange: (e) =>
|
|
486
|
+
value: P.waitForSelector || "",
|
|
487
|
+
onChange: (e) => R(P.id, "waitForSelector", e.target.value || void 0),
|
|
444
488
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono",
|
|
445
|
-
placeholder: "[data-tour='agents-tabs']"
|
|
446
|
-
|
|
489
|
+
placeholder: "[data-tour='agents-tabs']",
|
|
490
|
+
"aria-label": "Wait for selector"
|
|
491
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
447
492
|
className: "block text-sm font-medium mb-2",
|
|
493
|
+
htmlFor: "step-editor-wait-event",
|
|
448
494
|
children: "Wait for event"
|
|
449
|
-
}), /* @__PURE__ */
|
|
495
|
+
}), /* @__PURE__ */ g("input", {
|
|
496
|
+
id: "step-editor-wait-event",
|
|
450
497
|
type: "text",
|
|
451
|
-
value:
|
|
452
|
-
onChange: (e) =>
|
|
498
|
+
value: P.waitForEvent || "",
|
|
499
|
+
onChange: (e) => R(P.id, "waitForEvent", e.target.value || void 0),
|
|
453
500
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
454
|
-
placeholder: "tour:ready"
|
|
501
|
+
placeholder: "tour:ready",
|
|
502
|
+
"aria-label": "Wait for event"
|
|
455
503
|
})] })]
|
|
456
504
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
458
506
|
className: "block text-sm font-medium mb-2",
|
|
507
|
+
htmlFor: "step-editor-skip-conditions",
|
|
459
508
|
children: "Skip conditions (JSON)"
|
|
460
|
-
}), /* @__PURE__ */
|
|
461
|
-
|
|
509
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
510
|
+
id: "step-editor-skip-conditions",
|
|
511
|
+
value: P.skipConditions ? JSON.stringify(P.skipConditions, null, 2) : "",
|
|
462
512
|
onChange: (e) => {
|
|
463
513
|
let t = e.target.value.trim();
|
|
464
514
|
if (!t) {
|
|
465
|
-
|
|
515
|
+
R(P.id, "skipConditions", void 0);
|
|
466
516
|
return;
|
|
467
517
|
}
|
|
468
518
|
try {
|
|
469
|
-
|
|
519
|
+
R(P.id, "skipConditions", JSON.parse(t));
|
|
470
520
|
} catch {
|
|
471
|
-
|
|
521
|
+
R(P.id, "skipConditions", t);
|
|
472
522
|
}
|
|
473
523
|
},
|
|
474
524
|
rows: 4,
|
|
475
525
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm font-mono",
|
|
476
|
-
placeholder: "{\"selectorMissing\":\"[data-tour=\\\"missing\\\"]\"}"
|
|
526
|
+
placeholder: "{\"selectorMissing\":\"[data-tour=\\\"missing\\\"]\"}",
|
|
527
|
+
"aria-label": "Skip conditions (JSON)"
|
|
477
528
|
})] }),
|
|
478
|
-
/* @__PURE__ */
|
|
529
|
+
/* @__PURE__ */ _("div", {
|
|
479
530
|
className: "border border-border rounded-md p-4 space-y-4",
|
|
480
531
|
children: [
|
|
481
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ _("div", {
|
|
482
533
|
className: "flex items-center gap-2",
|
|
483
|
-
children: [/* @__PURE__ */
|
|
534
|
+
children: [/* @__PURE__ */ g(d, { size: 18 }), /* @__PURE__ */ g("h3", {
|
|
484
535
|
className: "text-sm font-semibold",
|
|
485
536
|
children: "Step media"
|
|
486
537
|
})]
|
|
487
538
|
}),
|
|
488
|
-
|
|
539
|
+
P.media && P.media.length > 0 ? /* @__PURE__ */ g("div", {
|
|
489
540
|
className: "space-y-2",
|
|
490
|
-
children:
|
|
541
|
+
children: P.media.map((e) => /* @__PURE__ */ _("div", {
|
|
491
542
|
className: "flex items-center justify-between rounded-md border border-border p-2 text-sm",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
543
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("div", {
|
|
493
544
|
className: "font-medium",
|
|
494
545
|
children: e.media.name
|
|
495
|
-
}), /* @__PURE__ */
|
|
546
|
+
}), /* @__PURE__ */ g("div", {
|
|
496
547
|
className: "text-xs text-muted-foreground",
|
|
497
548
|
children: e.position
|
|
498
|
-
})] }), /* @__PURE__ */
|
|
549
|
+
})] }), /* @__PURE__ */ g("span", {
|
|
499
550
|
className: "text-xs text-muted-foreground",
|
|
500
551
|
children: e.media.type
|
|
501
552
|
})]
|
|
502
553
|
}, e.id))
|
|
503
|
-
}) : /* @__PURE__ */
|
|
554
|
+
}) : /* @__PURE__ */ g("p", {
|
|
504
555
|
className: "text-sm text-muted-foreground",
|
|
505
556
|
children: "No media attached to this step yet."
|
|
506
557
|
}),
|
|
507
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ _("div", {
|
|
508
559
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-[minmax(0,1fr)_160px_auto]",
|
|
509
560
|
children: [
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
value:
|
|
512
|
-
onChange: (e) =>
|
|
561
|
+
/* @__PURE__ */ _("select", {
|
|
562
|
+
value: q,
|
|
563
|
+
onChange: (e) => J(e.target.value),
|
|
513
564
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
514
|
-
|
|
565
|
+
"aria-label": "Select media to attach",
|
|
566
|
+
children: [/* @__PURE__ */ g("option", {
|
|
515
567
|
value: "",
|
|
516
|
-
children:
|
|
517
|
-
}),
|
|
568
|
+
children: U ? "Loading media..." : "Select uploaded media"
|
|
569
|
+
}), B.map((e) => /* @__PURE__ */ _("option", {
|
|
518
570
|
value: e.id,
|
|
519
571
|
children: [
|
|
520
572
|
e.name,
|
|
@@ -524,29 +576,30 @@ function S() {
|
|
|
524
576
|
]
|
|
525
577
|
}, e.id))]
|
|
526
578
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
value:
|
|
529
|
-
onChange: (e) =>
|
|
579
|
+
/* @__PURE__ */ _("select", {
|
|
580
|
+
value: Y,
|
|
581
|
+
onChange: (e) => X(e.target.value),
|
|
530
582
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-sm",
|
|
583
|
+
"aria-label": "Attachment position",
|
|
531
584
|
children: [
|
|
532
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ g("option", {
|
|
533
586
|
value: "header",
|
|
534
587
|
children: "Header"
|
|
535
588
|
}),
|
|
536
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ g("option", {
|
|
537
590
|
value: "body",
|
|
538
591
|
children: "Body"
|
|
539
592
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ g("option", {
|
|
541
594
|
value: "footer",
|
|
542
595
|
children: "Footer"
|
|
543
596
|
})
|
|
544
597
|
]
|
|
545
598
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
599
|
+
/* @__PURE__ */ g("button", {
|
|
547
600
|
type: "button",
|
|
548
|
-
onClick:
|
|
549
|
-
disabled:
|
|
601
|
+
onClick: pe,
|
|
602
|
+
disabled: ue || !q,
|
|
550
603
|
className: "px-4 py-2 min-h-[44px] border border-border rounded-md hover:bg-accent disabled:opacity-50",
|
|
551
604
|
children: "Attach"
|
|
552
605
|
})
|
|
@@ -555,28 +608,29 @@ function S() {
|
|
|
555
608
|
]
|
|
556
609
|
})
|
|
557
610
|
]
|
|
558
|
-
}) : /* @__PURE__ */
|
|
611
|
+
}) : /* @__PURE__ */ _("div", {
|
|
559
612
|
className: "flex flex-col items-center justify-center h-full text-center px-4",
|
|
560
613
|
children: [
|
|
561
|
-
/* @__PURE__ */
|
|
562
|
-
className: "
|
|
563
|
-
children: /* @__PURE__ */
|
|
614
|
+
/* @__PURE__ */ g("div", {
|
|
615
|
+
className: "size-16 bg-muted rounded-full flex items-center justify-center mb-4",
|
|
616
|
+
children: /* @__PURE__ */ g(f, {
|
|
564
617
|
size: 24,
|
|
565
618
|
className: "text-muted-foreground"
|
|
566
619
|
})
|
|
567
620
|
}),
|
|
568
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ g("p", {
|
|
569
622
|
className: "text-muted-foreground mb-2",
|
|
570
|
-
children:
|
|
623
|
+
children: b("stepEditor.noStepSelected")
|
|
571
624
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ g("p", {
|
|
573
626
|
className: "text-sm text-muted-foreground mb-4",
|
|
574
|
-
children:
|
|
627
|
+
children: N.length > 0 ? b("stepEditor.selectStepToEdit") : b("stepEditor.createFirstStep")
|
|
575
628
|
}),
|
|
576
|
-
|
|
577
|
-
|
|
629
|
+
N.length === 0 && E && /* @__PURE__ */ _("button", {
|
|
630
|
+
type: "button",
|
|
631
|
+
onClick: Q,
|
|
578
632
|
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__ */
|
|
633
|
+
children: [/* @__PURE__ */ g(f, { size: 18 }), b("stepEditor.addFirstStep")]
|
|
580
634
|
})
|
|
581
635
|
]
|
|
582
636
|
})
|
|
@@ -586,6 +640,6 @@ function S() {
|
|
|
586
640
|
});
|
|
587
641
|
}
|
|
588
642
|
//#endregion
|
|
589
|
-
export {
|
|
643
|
+
export { b as StepEditorPage };
|
|
590
644
|
|
|
591
645
|
//# sourceMappingURL=StepEditorPage.js.map
|