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