@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
|
@@ -3,15 +3,51 @@ import { useGetPlatformProductsForToursQuery as t } from "../../generated/global
|
|
|
3
3
|
import { useTourLifecycle as n } from "../hooks/useTourLifecycle.js";
|
|
4
4
|
import { useToursPermissionAccess as r } from "../hooks/useToursPermissionAccess.js";
|
|
5
5
|
import { TOUR_PERMISSIONS as i } from "../../constants/permissions.js";
|
|
6
|
-
import { useToursI18n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
6
|
+
import { useToursI18n as ee } from "../i18n.js";
|
|
7
|
+
import { emitToursApiFailed as a } from "../telemetry.js";
|
|
8
|
+
import { useTourBuilder as te } from "../hooks/useTourBuilder.js";
|
|
9
|
+
import { useEffect as o, useMemo as s, useRef as ne, useState as c } from "react";
|
|
10
|
+
import { PermissionGate as l } from "@burdenoff/fe-libs/shared/components";
|
|
11
|
+
import { ArrowLeft as re, BarChart3 as ie, Calendar as ae, Eye as oe, LayoutTemplate as se, ListOrdered as ce, Save as le, Sparkles as ue } from "lucide-react";
|
|
12
|
+
import { Fragment as de, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
13
|
+
import { useNavigate as fe, useParams as pe } from "react-router-dom";
|
|
14
|
+
import { useGatewayClient as f } from "@burdenoff/fe-libs/shared/graphql";
|
|
15
|
+
import { useEventBus as me } from "@burdenoff/fe-libs/shared/events";
|
|
16
|
+
import { gql as p } from "@apollo/client/core";
|
|
13
17
|
//#region src/tours/pages/TourBuilderPage.tsx
|
|
14
|
-
var
|
|
18
|
+
var he = 250, ge = p`
|
|
19
|
+
mutation SeedVibeControlsUserTours {
|
|
20
|
+
seedVibeControlsUserTours {
|
|
21
|
+
productId
|
|
22
|
+
workspaceId
|
|
23
|
+
createdCount
|
|
24
|
+
updatedCount
|
|
25
|
+
totalCount
|
|
26
|
+
tours {
|
|
27
|
+
tourId
|
|
28
|
+
slug
|
|
29
|
+
name
|
|
30
|
+
action
|
|
31
|
+
stepCount
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
function _e(e) {
|
|
37
|
+
if (!e || typeof e != "object") return null;
|
|
38
|
+
let t = e, n = t.error;
|
|
39
|
+
if (n instanceof Error) return n.message;
|
|
40
|
+
let r = t.errors;
|
|
41
|
+
if (!Array.isArray(r) || r.length === 0) return null;
|
|
42
|
+
let i = r.map((e) => {
|
|
43
|
+
if (e instanceof Error) return e.message;
|
|
44
|
+
if (!e || typeof e != "object") return null;
|
|
45
|
+
let t = e.message;
|
|
46
|
+
return typeof t == "string" ? t : null;
|
|
47
|
+
}).filter((e) => !!e);
|
|
48
|
+
return i.length > 0 ? i.join("; ") : "Seed mutation returned errors.";
|
|
49
|
+
}
|
|
50
|
+
var m = [
|
|
15
51
|
{
|
|
16
52
|
productId: "vibecontrols",
|
|
17
53
|
moduleId: "dashboard",
|
|
@@ -167,40 +203,115 @@ var y = 250, b = [
|
|
|
167
203
|
pageLabel: "Sandbox",
|
|
168
204
|
path: "/sandbox",
|
|
169
205
|
isModuleHome: !0
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
productId: "vibecontrols",
|
|
209
|
+
moduleId: "support",
|
|
210
|
+
moduleLabel: "Support",
|
|
211
|
+
pageId: "tickets",
|
|
212
|
+
pageLabel: "Tickets",
|
|
213
|
+
path: "/support/tickets",
|
|
214
|
+
isModuleHome: !0
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
productId: "vibecontrols",
|
|
218
|
+
moduleId: "support",
|
|
219
|
+
moduleLabel: "Support",
|
|
220
|
+
pageId: "knowledge-base",
|
|
221
|
+
pageLabel: "Knowledge Base",
|
|
222
|
+
path: "/support/kb"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
productId: "vibecontrols",
|
|
226
|
+
moduleId: "notifications",
|
|
227
|
+
moduleLabel: "Notifications",
|
|
228
|
+
pageId: "center",
|
|
229
|
+
pageLabel: "Notification Center",
|
|
230
|
+
path: "/notifications/center",
|
|
231
|
+
isModuleHome: !0
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
productId: "vibecontrols",
|
|
235
|
+
moduleId: "notifications",
|
|
236
|
+
moduleLabel: "Notifications",
|
|
237
|
+
pageId: "history",
|
|
238
|
+
pageLabel: "History",
|
|
239
|
+
path: "/notifications/history"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
productId: "vibecontrols",
|
|
243
|
+
moduleId: "notifications",
|
|
244
|
+
moduleLabel: "Notifications",
|
|
245
|
+
pageId: "preferences",
|
|
246
|
+
pageLabel: "Preferences",
|
|
247
|
+
path: "/notifications/preferences"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
productId: "vibecontrols",
|
|
251
|
+
moduleId: "conversations",
|
|
252
|
+
moduleLabel: "Conversations",
|
|
253
|
+
pageId: "home",
|
|
254
|
+
pageLabel: "All Conversations",
|
|
255
|
+
path: "/conversations",
|
|
256
|
+
isModuleHome: !0
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
productId: "vibecontrols",
|
|
260
|
+
moduleId: "conversations",
|
|
261
|
+
moduleLabel: "Conversations",
|
|
262
|
+
pageId: "list",
|
|
263
|
+
pageLabel: "Conversation List",
|
|
264
|
+
path: "/conversations/list"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
productId: "vibecontrols",
|
|
268
|
+
moduleId: "conversations",
|
|
269
|
+
moduleLabel: "Conversations",
|
|
270
|
+
pageId: "new",
|
|
271
|
+
pageLabel: "New Conversation",
|
|
272
|
+
path: "/conversations/new"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
productId: "vibecontrols",
|
|
276
|
+
moduleId: "conversations",
|
|
277
|
+
moduleLabel: "Conversations",
|
|
278
|
+
pageId: "settings",
|
|
279
|
+
pageLabel: "Settings",
|
|
280
|
+
path: "/conversations/settings"
|
|
170
281
|
}
|
|
171
282
|
];
|
|
172
|
-
function
|
|
283
|
+
function h(e) {
|
|
173
284
|
return e?.trim() || void 0;
|
|
174
285
|
}
|
|
175
|
-
function
|
|
176
|
-
let t =
|
|
177
|
-
return t ?
|
|
286
|
+
function g(e) {
|
|
287
|
+
let t = h(e);
|
|
288
|
+
return t ? m.filter((e) => e.productId === t) : [];
|
|
178
289
|
}
|
|
179
|
-
function
|
|
290
|
+
function ve(e) {
|
|
180
291
|
let t = /* @__PURE__ */ new Map();
|
|
181
|
-
for (let n of
|
|
292
|
+
for (let n of g(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
|
|
182
293
|
moduleId: n.moduleId,
|
|
183
294
|
label: n.moduleLabel,
|
|
184
295
|
path: n.path
|
|
185
296
|
});
|
|
186
297
|
return [...t.values()];
|
|
187
298
|
}
|
|
188
|
-
function
|
|
189
|
-
let n =
|
|
190
|
-
return n ?
|
|
299
|
+
function ye(e, t) {
|
|
300
|
+
let n = h(t);
|
|
301
|
+
return n ? g(e).filter((e) => e.moduleId === n).map((e) => ({
|
|
191
302
|
pageId: e.pageId,
|
|
192
303
|
label: e.pageLabel,
|
|
193
304
|
path: e.path
|
|
194
305
|
})) : [];
|
|
195
306
|
}
|
|
196
|
-
function
|
|
197
|
-
let { tr:
|
|
307
|
+
function _() {
|
|
308
|
+
let { tr: p } = ee(), { tourId: m } = pe(), h = fe(), g = e(), { basePath: _ = "/" } = g, v = me(), be = f("global"), { hasPermission: y } = r(), b = !m || m === "new", x = y(i.TOUR_CREATE), S = y(i.TOUR_UPDATE), xe = y(i.TOUR_TEMPLATE_CREATE), Se = b ? x : S, C = x && S, { tour: w, loadTour: T, createTour: Ce, updateTour: we, saving: E, validationErrors: D, error: O } = te(m), { saveAsTemplate: k } = n(), { data: A, loading: j } = t({
|
|
198
309
|
variables: {
|
|
199
|
-
limit:
|
|
310
|
+
limit: he,
|
|
200
311
|
offset: 0
|
|
201
312
|
},
|
|
202
313
|
fetchPolicy: "cache-and-network"
|
|
203
|
-
}), [
|
|
314
|
+
}), [M, N] = c({
|
|
204
315
|
name: "",
|
|
205
316
|
description: "",
|
|
206
317
|
productId: "",
|
|
@@ -213,525 +324,592 @@ function T() {
|
|
|
213
324
|
displayOrder: 1,
|
|
214
325
|
startDate: "",
|
|
215
326
|
endDate: ""
|
|
216
|
-
}), [B, V] =
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}, [
|
|
220
|
-
|
|
221
|
-
}, [
|
|
222
|
-
if (!
|
|
223
|
-
|
|
327
|
+
}), [P, F] = c(!1), [I, L] = c(!1), [R, z] = c(!1), [B, V] = c(!1), [H, U] = c(null), [W, G] = c(null), K = ne(!1), q = s(() => [...A?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [A]), J = s(() => new Set(q.map((e) => e.slug)), [q]), Y = s(() => ve(M.productId), [M.productId]), X = s(() => new Set(Y.map((e) => e.moduleId)), [Y]), Z = s(() => ye(M.productId, M.moduleId), [M.moduleId, M.productId]), Q = s(() => new Set(Z.map((e) => e.pageId)), [Z]);
|
|
328
|
+
o(() => {
|
|
329
|
+
m && m !== "new" && (K.current = !1, T(m));
|
|
330
|
+
}, [m, T]), o(() => {
|
|
331
|
+
w && !K.current && (N(w), K.current = !0);
|
|
332
|
+
}, [w]), o(() => {
|
|
333
|
+
if (!M.productId || j) {
|
|
334
|
+
F(!1);
|
|
224
335
|
return;
|
|
225
336
|
}
|
|
226
|
-
|
|
337
|
+
F(q.length > 0 && !J.has(M.productId));
|
|
227
338
|
}, [
|
|
228
|
-
|
|
339
|
+
M.productId,
|
|
229
340
|
J,
|
|
230
341
|
q.length,
|
|
231
|
-
|
|
232
|
-
]),
|
|
233
|
-
if (!
|
|
234
|
-
|
|
342
|
+
j
|
|
343
|
+
]), o(() => {
|
|
344
|
+
if (!M.productId || !M.moduleId) {
|
|
345
|
+
L(!1);
|
|
235
346
|
return;
|
|
236
347
|
}
|
|
237
|
-
|
|
348
|
+
L(Y.length === 0 || !X.has(M.moduleId));
|
|
238
349
|
}, [
|
|
239
|
-
|
|
240
|
-
|
|
350
|
+
M.moduleId,
|
|
351
|
+
M.productId,
|
|
241
352
|
X,
|
|
242
353
|
Y.length
|
|
243
|
-
]),
|
|
244
|
-
if (!
|
|
245
|
-
|
|
354
|
+
]), o(() => {
|
|
355
|
+
if (!M.productId || !M.pageId) {
|
|
356
|
+
z(!1);
|
|
246
357
|
return;
|
|
247
358
|
}
|
|
248
|
-
|
|
359
|
+
z(Z.length === 0 || !Q.has(M.pageId));
|
|
249
360
|
}, [
|
|
250
|
-
|
|
251
|
-
|
|
361
|
+
M.pageId,
|
|
362
|
+
M.productId,
|
|
252
363
|
Q,
|
|
253
364
|
Z.length
|
|
254
365
|
]);
|
|
255
|
-
let
|
|
366
|
+
let Te = !!(M.productId && !P && !J.has(M.productId)), Ee = !!(M.moduleId && !I && !X.has(M.moduleId)), De = !!(M.pageId && !R && !Q.has(M.pageId)), Oe = async (e) => {
|
|
256
367
|
e.preventDefault();
|
|
257
368
|
try {
|
|
258
|
-
|
|
259
|
-
} catch
|
|
260
|
-
|
|
369
|
+
m && m !== "new" ? await we(m, M) : await Ce(M);
|
|
370
|
+
} catch {
|
|
371
|
+
a(v, "tour.save", g);
|
|
261
372
|
}
|
|
262
|
-
},
|
|
263
|
-
|
|
373
|
+
}, ke = () => {
|
|
374
|
+
h(`${_}/list`);
|
|
264
375
|
}, $ = (e) => {
|
|
265
376
|
if (!e) return "";
|
|
266
377
|
let t = new Date(e);
|
|
267
378
|
return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
379
|
+
}, Ae = async () => {
|
|
380
|
+
if (!m || m === "new") return;
|
|
381
|
+
let e = `${M.name || w?.name || "Tour"} Template`, t = window.prompt("Template name", e);
|
|
382
|
+
if (!t) return;
|
|
383
|
+
let n = window.prompt("Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)", "ONBOARDING") || "ONBOARDING";
|
|
384
|
+
try {
|
|
385
|
+
await k(m, {
|
|
386
|
+
name: t,
|
|
387
|
+
description: M.description,
|
|
388
|
+
category: n,
|
|
389
|
+
isPublic: !1
|
|
390
|
+
}), h(`${_}/templates`);
|
|
391
|
+
} catch {
|
|
392
|
+
a(v, "template.save", g);
|
|
393
|
+
}
|
|
394
|
+
}, je = async () => {
|
|
395
|
+
if (window.confirm(p("tourBuilder.seedVibeControls.confirm"))) {
|
|
396
|
+
V(!0), U(null), G(null);
|
|
397
|
+
try {
|
|
398
|
+
let e = await be.mutate({ mutation: ge }), t = _e(e);
|
|
399
|
+
if (t) throw Error(t);
|
|
400
|
+
let n = e.data?.seedVibeControlsUserTours;
|
|
401
|
+
if (!n) throw Error("Seed mutation returned no result.");
|
|
402
|
+
U(n);
|
|
403
|
+
} catch (e) {
|
|
404
|
+
let t = e instanceof Error ? e.message : p("tourBuilder.seedVibeControls.error");
|
|
405
|
+
G(t), v.emit("tours.api.failed", {
|
|
406
|
+
route: "/tours",
|
|
407
|
+
operation: "tour.seed_vibecontrols_user_tours",
|
|
408
|
+
errorMessage: t,
|
|
409
|
+
productId: g.productId,
|
|
410
|
+
workspaceId: g.workspaceId
|
|
411
|
+
}, { component: "microfe-tours" });
|
|
412
|
+
} finally {
|
|
413
|
+
V(!1);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
268
416
|
};
|
|
269
|
-
return /* @__PURE__ */
|
|
417
|
+
return /* @__PURE__ */ d("div", {
|
|
270
418
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
|
|
271
|
-
children: [
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ d("div", {
|
|
421
|
+
className: "flex items-center gap-4",
|
|
422
|
+
children: [/* @__PURE__ */ u("button", {
|
|
423
|
+
onClick: ke,
|
|
424
|
+
className: "p-2 hover:bg-accent rounded-md",
|
|
425
|
+
"aria-label": p("tourBuilder.goBack"),
|
|
426
|
+
children: /* @__PURE__ */ u(re, { size: 20 })
|
|
427
|
+
}), /* @__PURE__ */ d("div", {
|
|
428
|
+
className: "flex-1",
|
|
429
|
+
children: [/* @__PURE__ */ u("h1", {
|
|
430
|
+
className: "text-xl sm:text-2xl font-bold text-foreground",
|
|
431
|
+
children: p(m && m !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
|
|
432
|
+
}), /* @__PURE__ */ u("p", {
|
|
433
|
+
className: "text-sm text-muted-foreground",
|
|
434
|
+
children: p("tourBuilder.subtitle")
|
|
435
|
+
})]
|
|
286
436
|
})]
|
|
287
|
-
})
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
437
|
+
}),
|
|
438
|
+
b ? /* @__PURE__ */ d("div", {
|
|
439
|
+
className: "rounded-md border border-border bg-card p-4 sm:p-6",
|
|
440
|
+
children: [
|
|
441
|
+
/* @__PURE__ */ d("div", {
|
|
442
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
443
|
+
children: [/* @__PURE__ */ d("div", {
|
|
444
|
+
className: "space-y-1",
|
|
445
|
+
children: [/* @__PURE__ */ u("h2", {
|
|
446
|
+
className: "text-lg font-semibold text-foreground",
|
|
447
|
+
children: p("tourBuilder.seedVibeControls.title")
|
|
448
|
+
}), /* @__PURE__ */ u("p", {
|
|
449
|
+
className: "text-sm text-muted-foreground",
|
|
450
|
+
children: p("tourBuilder.seedVibeControls.description")
|
|
451
|
+
})]
|
|
452
|
+
}), /* @__PURE__ */ d("button", {
|
|
453
|
+
type: "button",
|
|
454
|
+
onClick: () => void je(),
|
|
455
|
+
disabled: B || !C,
|
|
456
|
+
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
|
|
457
|
+
children: [/* @__PURE__ */ u(ue, { size: 18 }), p(B ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
|
|
458
|
+
})]
|
|
459
|
+
}),
|
|
460
|
+
C ? null : /* @__PURE__ */ u("p", {
|
|
461
|
+
className: "mt-3 text-sm text-muted-foreground",
|
|
462
|
+
children: p("tourBuilder.seedVibeControls.permissionHint")
|
|
463
|
+
}),
|
|
464
|
+
W ? /* @__PURE__ */ u("p", {
|
|
465
|
+
className: "mt-3 text-sm text-destructive",
|
|
466
|
+
children: W
|
|
467
|
+
}) : null,
|
|
468
|
+
H ? /* @__PURE__ */ u("div", {
|
|
469
|
+
className: "mt-3 rounded-md border border-border bg-background p-3 text-sm text-muted-foreground",
|
|
470
|
+
children: p("tourBuilder.seedVibeControls.result", {
|
|
471
|
+
totalCount: H.totalCount,
|
|
472
|
+
productId: H.productId,
|
|
473
|
+
workspaceId: H.workspaceId,
|
|
474
|
+
createdCount: H.createdCount,
|
|
475
|
+
updatedCount: H.updatedCount
|
|
476
|
+
})
|
|
477
|
+
}) : null
|
|
478
|
+
]
|
|
479
|
+
}) : null,
|
|
480
|
+
/* @__PURE__ */ d("form", {
|
|
481
|
+
onSubmit: Oe,
|
|
482
|
+
className: "space-y-6",
|
|
483
|
+
children: [
|
|
484
|
+
/* @__PURE__ */ d("div", {
|
|
485
|
+
className: "border border-border rounded-md p-4 sm:p-6 bg-card",
|
|
486
|
+
children: [/* @__PURE__ */ u("h2", {
|
|
487
|
+
className: "text-lg font-semibold mb-4",
|
|
488
|
+
children: p("tourBuilder.sectionBasicInfo")
|
|
489
|
+
}), /* @__PURE__ */ d("div", {
|
|
490
|
+
className: "space-y-4",
|
|
491
|
+
children: [
|
|
492
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
331
493
|
className: "block text-sm font-medium mb-2",
|
|
332
|
-
htmlFor: "
|
|
333
|
-
children:
|
|
334
|
-
}),
|
|
335
|
-
|
|
336
|
-
id: "product-id",
|
|
337
|
-
value: B ? "__custom__" : R.productId || "",
|
|
338
|
-
onChange: (e) => {
|
|
339
|
-
if (e.target.value === "__custom__") {
|
|
340
|
-
V(!0), z({
|
|
341
|
-
...R,
|
|
342
|
-
productId: "",
|
|
343
|
-
moduleId: void 0,
|
|
344
|
-
pageId: void 0
|
|
345
|
-
});
|
|
346
|
-
return;
|
|
347
|
-
}
|
|
348
|
-
V(!1), U(!1), G(!1), z({
|
|
349
|
-
...R,
|
|
350
|
-
productId: e.target.value,
|
|
351
|
-
moduleId: void 0,
|
|
352
|
-
pageId: void 0
|
|
353
|
-
});
|
|
354
|
-
},
|
|
355
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
356
|
-
required: !0,
|
|
357
|
-
children: [
|
|
358
|
-
/* @__PURE__ */ _("option", {
|
|
359
|
-
value: "",
|
|
360
|
-
children: "Select product"
|
|
361
|
-
}),
|
|
362
|
-
L ? /* @__PURE__ */ _("option", {
|
|
363
|
-
disabled: !0,
|
|
364
|
-
children: "Loading products..."
|
|
365
|
-
}) : null,
|
|
366
|
-
q.map((e) => /* @__PURE__ */ v("option", {
|
|
367
|
-
value: e.slug,
|
|
368
|
-
children: [
|
|
369
|
-
e.name,
|
|
370
|
-
" (",
|
|
371
|
-
e.slug,
|
|
372
|
-
")"
|
|
373
|
-
]
|
|
374
|
-
}, e.id)),
|
|
375
|
-
le ? /* @__PURE__ */ v("option", {
|
|
376
|
-
value: R.productId,
|
|
377
|
-
children: ["Current: ", R.productId]
|
|
378
|
-
}) : null,
|
|
379
|
-
/* @__PURE__ */ _("option", {
|
|
380
|
-
value: "__custom__",
|
|
381
|
-
children: "Custom product slug"
|
|
382
|
-
})
|
|
383
|
-
]
|
|
384
|
-
}),
|
|
385
|
-
B ? /* @__PURE__ */ _("input", {
|
|
386
|
-
id: "product-id-custom",
|
|
494
|
+
htmlFor: "tour-name",
|
|
495
|
+
children: p("tourBuilder.labelName")
|
|
496
|
+
}), /* @__PURE__ */ u("input", {
|
|
497
|
+
id: "tour-name",
|
|
387
498
|
type: "text",
|
|
388
|
-
value:
|
|
389
|
-
onChange: (e) =>
|
|
390
|
-
...
|
|
391
|
-
|
|
392
|
-
moduleId: void 0,
|
|
393
|
-
pageId: void 0
|
|
499
|
+
value: M.name || "",
|
|
500
|
+
onChange: (e) => N({
|
|
501
|
+
...M,
|
|
502
|
+
name: e.target.value
|
|
394
503
|
}),
|
|
395
|
-
className: "
|
|
396
|
-
placeholder: "vibecontrols",
|
|
504
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
397
505
|
required: !0
|
|
398
|
-
})
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
506
|
+
})] }),
|
|
507
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
508
|
+
className: "block text-sm font-medium mb-2",
|
|
509
|
+
htmlFor: "tour-description",
|
|
510
|
+
children: p("tourBuilder.labelDescription")
|
|
511
|
+
}), /* @__PURE__ */ u("textarea", {
|
|
512
|
+
id: "tour-description",
|
|
513
|
+
value: M.description || "",
|
|
514
|
+
onChange: (e) => N({
|
|
515
|
+
...M,
|
|
516
|
+
description: e.target.value
|
|
517
|
+
}),
|
|
518
|
+
rows: 3,
|
|
519
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground"
|
|
520
|
+
})] }),
|
|
521
|
+
/* @__PURE__ */ d("div", { children: [
|
|
522
|
+
/* @__PURE__ */ u("label", {
|
|
404
523
|
className: "block text-sm font-medium mb-2",
|
|
405
|
-
htmlFor: "
|
|
406
|
-
children: "
|
|
524
|
+
htmlFor: "product-id",
|
|
525
|
+
children: p("tourBuilder.labelProductId")
|
|
407
526
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
-
id: "
|
|
410
|
-
value:
|
|
527
|
+
/* @__PURE__ */ d("select", {
|
|
528
|
+
id: "product-id",
|
|
529
|
+
value: P ? "__custom__" : M.productId || "",
|
|
411
530
|
onChange: (e) => {
|
|
412
531
|
if (e.target.value === "__custom__") {
|
|
413
|
-
|
|
414
|
-
...
|
|
415
|
-
|
|
532
|
+
F(!0), N({
|
|
533
|
+
...M,
|
|
534
|
+
productId: "",
|
|
535
|
+
moduleId: void 0,
|
|
416
536
|
pageId: void 0
|
|
417
537
|
});
|
|
418
538
|
return;
|
|
419
539
|
}
|
|
420
|
-
|
|
421
|
-
...
|
|
422
|
-
|
|
540
|
+
F(!1), L(!1), z(!1), N({
|
|
541
|
+
...M,
|
|
542
|
+
productId: e.target.value,
|
|
543
|
+
moduleId: void 0,
|
|
423
544
|
pageId: void 0
|
|
424
545
|
});
|
|
425
546
|
},
|
|
426
547
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
427
|
-
|
|
548
|
+
required: !0,
|
|
428
549
|
children: [
|
|
429
|
-
/* @__PURE__ */
|
|
550
|
+
/* @__PURE__ */ u("option", {
|
|
430
551
|
value: "",
|
|
431
|
-
children: "
|
|
552
|
+
children: "Select product"
|
|
432
553
|
}),
|
|
433
|
-
|
|
434
|
-
|
|
554
|
+
j ? /* @__PURE__ */ u("option", {
|
|
555
|
+
disabled: !0,
|
|
556
|
+
children: "Loading products..."
|
|
557
|
+
}) : null,
|
|
558
|
+
q.map((e) => /* @__PURE__ */ d("option", {
|
|
559
|
+
value: e.slug,
|
|
435
560
|
children: [
|
|
436
|
-
e.
|
|
561
|
+
e.name,
|
|
437
562
|
" (",
|
|
438
|
-
e.
|
|
563
|
+
e.slug,
|
|
439
564
|
")"
|
|
440
565
|
]
|
|
441
|
-
}, e.
|
|
442
|
-
|
|
443
|
-
value:
|
|
444
|
-
children: ["Current: ",
|
|
566
|
+
}, e.id)),
|
|
567
|
+
Te ? /* @__PURE__ */ d("option", {
|
|
568
|
+
value: M.productId,
|
|
569
|
+
children: ["Current: ", M.productId]
|
|
445
570
|
}) : null,
|
|
446
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ u("option", {
|
|
447
572
|
value: "__custom__",
|
|
448
|
-
children: "Custom
|
|
573
|
+
children: "Custom product slug"
|
|
449
574
|
})
|
|
450
575
|
]
|
|
451
576
|
}),
|
|
452
|
-
|
|
453
|
-
id: "
|
|
577
|
+
P ? /* @__PURE__ */ u("input", {
|
|
578
|
+
id: "product-id-custom",
|
|
454
579
|
type: "text",
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
457
|
-
...
|
|
458
|
-
|
|
580
|
+
value: M.productId || "",
|
|
581
|
+
onChange: (e) => N({
|
|
582
|
+
...M,
|
|
583
|
+
productId: e.target.value,
|
|
584
|
+
moduleId: void 0,
|
|
459
585
|
pageId: void 0
|
|
460
586
|
}),
|
|
461
587
|
className: "mt-2 w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
462
|
-
placeholder: "vibecontrols"
|
|
588
|
+
placeholder: "vibecontrols",
|
|
589
|
+
required: !0
|
|
463
590
|
}) : null
|
|
464
|
-
] }),
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
591
|
+
] }),
|
|
592
|
+
/* @__PURE__ */ d("div", {
|
|
593
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
594
|
+
children: [/* @__PURE__ */ d("div", { children: [
|
|
595
|
+
/* @__PURE__ */ u("label", {
|
|
596
|
+
className: "block text-sm font-medium mb-2",
|
|
597
|
+
htmlFor: "module-id",
|
|
598
|
+
children: "Module ID"
|
|
599
|
+
}),
|
|
600
|
+
/* @__PURE__ */ d("select", {
|
|
601
|
+
id: "module-id",
|
|
602
|
+
value: I ? "__custom__" : M.moduleId || "",
|
|
603
|
+
onChange: (e) => {
|
|
604
|
+
if (e.target.value === "__custom__") {
|
|
605
|
+
L(!0), N({
|
|
606
|
+
...M,
|
|
607
|
+
moduleId: "",
|
|
608
|
+
pageId: void 0
|
|
609
|
+
});
|
|
610
|
+
return;
|
|
611
|
+
}
|
|
612
|
+
L(!1), z(!1), N({
|
|
613
|
+
...M,
|
|
614
|
+
moduleId: e.target.value || void 0,
|
|
615
|
+
pageId: void 0
|
|
478
616
|
});
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
617
|
+
},
|
|
618
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
619
|
+
disabled: !M.productId,
|
|
620
|
+
children: [
|
|
621
|
+
/* @__PURE__ */ u("option", {
|
|
622
|
+
value: "",
|
|
623
|
+
children: "All modules"
|
|
624
|
+
}),
|
|
625
|
+
Y.map((e) => /* @__PURE__ */ d("option", {
|
|
626
|
+
value: e.moduleId,
|
|
627
|
+
children: [
|
|
628
|
+
e.label,
|
|
629
|
+
" (",
|
|
630
|
+
e.moduleId,
|
|
631
|
+
")"
|
|
632
|
+
]
|
|
633
|
+
}, e.moduleId)),
|
|
634
|
+
Ee ? /* @__PURE__ */ d("option", {
|
|
635
|
+
value: M.moduleId,
|
|
636
|
+
children: ["Current: ", M.moduleId]
|
|
637
|
+
}) : null,
|
|
638
|
+
/* @__PURE__ */ u("option", {
|
|
639
|
+
value: "__custom__",
|
|
640
|
+
children: "Custom module ID"
|
|
641
|
+
})
|
|
642
|
+
]
|
|
643
|
+
}),
|
|
644
|
+
I ? /* @__PURE__ */ u("input", {
|
|
645
|
+
id: "module-id-custom",
|
|
646
|
+
type: "text",
|
|
647
|
+
value: M.moduleId || "",
|
|
648
|
+
onChange: (e) => N({
|
|
649
|
+
...M,
|
|
650
|
+
moduleId: e.target.value || void 0,
|
|
651
|
+
pageId: void 0
|
|
492
652
|
}),
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}, e.pageId)),
|
|
502
|
-
de ? /* @__PURE__ */ v("option", {
|
|
503
|
-
value: R.pageId,
|
|
504
|
-
children: ["Current: ", R.pageId]
|
|
505
|
-
}) : null,
|
|
506
|
-
/* @__PURE__ */ _("option", {
|
|
507
|
-
value: "__custom__",
|
|
508
|
-
children: "Custom page ID"
|
|
509
|
-
})
|
|
510
|
-
]
|
|
511
|
-
}),
|
|
512
|
-
W ? /* @__PURE__ */ _("input", {
|
|
513
|
-
id: "page-id-custom",
|
|
514
|
-
type: "text",
|
|
515
|
-
value: R.pageId || "",
|
|
516
|
-
onChange: (e) => z({
|
|
517
|
-
...R,
|
|
518
|
-
pageId: e.target.value || void 0
|
|
653
|
+
className: "mt-2 w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
654
|
+
placeholder: "vibecontrols"
|
|
655
|
+
}) : null
|
|
656
|
+
] }), /* @__PURE__ */ d("div", { children: [
|
|
657
|
+
/* @__PURE__ */ u("label", {
|
|
658
|
+
className: "block text-sm font-medium mb-2",
|
|
659
|
+
htmlFor: "page-id",
|
|
660
|
+
children: "Page ID"
|
|
519
661
|
}),
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
662
|
+
/* @__PURE__ */ d("select", {
|
|
663
|
+
id: "page-id",
|
|
664
|
+
value: R ? "__custom__" : M.pageId || "",
|
|
665
|
+
onChange: (e) => {
|
|
666
|
+
if (e.target.value === "__custom__") {
|
|
667
|
+
z(!0), N({
|
|
668
|
+
...M,
|
|
669
|
+
pageId: ""
|
|
670
|
+
});
|
|
671
|
+
return;
|
|
672
|
+
}
|
|
673
|
+
z(!1), N({
|
|
674
|
+
...M,
|
|
675
|
+
pageId: e.target.value || void 0
|
|
676
|
+
});
|
|
677
|
+
},
|
|
678
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
679
|
+
disabled: !M.productId,
|
|
680
|
+
children: [
|
|
681
|
+
/* @__PURE__ */ u("option", {
|
|
682
|
+
value: "",
|
|
683
|
+
children: "All pages"
|
|
684
|
+
}),
|
|
685
|
+
Z.map((e) => /* @__PURE__ */ d("option", {
|
|
686
|
+
value: e.pageId,
|
|
687
|
+
children: [
|
|
688
|
+
e.label,
|
|
689
|
+
" (",
|
|
690
|
+
e.pageId,
|
|
691
|
+
")"
|
|
692
|
+
]
|
|
693
|
+
}, e.pageId)),
|
|
694
|
+
De ? /* @__PURE__ */ d("option", {
|
|
695
|
+
value: M.pageId,
|
|
696
|
+
children: ["Current: ", M.pageId]
|
|
697
|
+
}) : null,
|
|
698
|
+
/* @__PURE__ */ u("option", {
|
|
699
|
+
value: "__custom__",
|
|
700
|
+
children: "Custom page ID"
|
|
701
|
+
})
|
|
702
|
+
]
|
|
703
|
+
}),
|
|
704
|
+
R ? /* @__PURE__ */ u("input", {
|
|
705
|
+
id: "page-id-custom",
|
|
706
|
+
type: "text",
|
|
707
|
+
value: M.pageId || "",
|
|
708
|
+
onChange: (e) => N({
|
|
709
|
+
...M,
|
|
710
|
+
pageId: e.target.value || void 0
|
|
711
|
+
}),
|
|
712
|
+
className: "mt-2 w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
713
|
+
placeholder: "agents"
|
|
714
|
+
}) : null
|
|
715
|
+
] })]
|
|
561
716
|
}),
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
/* @__PURE__ */
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
|
|
574
|
-
children:
|
|
575
|
-
})
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
children: b("tourBuilder.labelPriority")
|
|
590
|
-
}), /* @__PURE__ */ _("input", {
|
|
591
|
-
id: "priority",
|
|
592
|
-
type: "number",
|
|
593
|
-
min: "1",
|
|
594
|
-
max: "100",
|
|
595
|
-
value: R.priority || 50,
|
|
596
|
-
onChange: (e) => {
|
|
597
|
-
let t = Number.parseInt(e.target.value, 10) || 50;
|
|
598
|
-
z({
|
|
599
|
-
...R,
|
|
600
|
-
priority: t
|
|
601
|
-
});
|
|
602
|
-
},
|
|
603
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground"
|
|
604
|
-
})] }),
|
|
605
|
-
/* @__PURE__ */ v("div", {
|
|
606
|
-
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
607
|
-
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
717
|
+
/* @__PURE__ */ d("label", {
|
|
718
|
+
className: "flex items-center gap-3 cursor-pointer",
|
|
719
|
+
children: [/* @__PURE__ */ u("input", {
|
|
720
|
+
type: "checkbox",
|
|
721
|
+
checked: M.isActive ?? !0,
|
|
722
|
+
onChange: (e) => N({
|
|
723
|
+
...M,
|
|
724
|
+
isActive: e.target.checked
|
|
725
|
+
}),
|
|
726
|
+
className: "w-4 h-4 rounded"
|
|
727
|
+
}), /* @__PURE__ */ u("span", {
|
|
728
|
+
className: "text-sm font-medium",
|
|
729
|
+
children: "Active"
|
|
730
|
+
})]
|
|
731
|
+
})
|
|
732
|
+
]
|
|
733
|
+
})]
|
|
734
|
+
}),
|
|
735
|
+
/* @__PURE__ */ d("div", {
|
|
736
|
+
className: "border border-border rounded-md p-4 sm:p-6 bg-card",
|
|
737
|
+
children: [/* @__PURE__ */ u("h2", {
|
|
738
|
+
className: "text-lg font-semibold mb-4",
|
|
739
|
+
children: p("tourBuilder.sectionTriggerSettings")
|
|
740
|
+
}), /* @__PURE__ */ d("div", {
|
|
741
|
+
className: "space-y-4",
|
|
742
|
+
children: [
|
|
743
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
608
744
|
className: "block text-sm font-medium mb-2",
|
|
609
|
-
htmlFor: "
|
|
610
|
-
children: "
|
|
611
|
-
}), /* @__PURE__ */
|
|
612
|
-
id: "
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
745
|
+
htmlFor: "trigger-type",
|
|
746
|
+
children: p("tourBuilder.labelTriggerType")
|
|
747
|
+
}), /* @__PURE__ */ d("select", {
|
|
748
|
+
id: "trigger-type",
|
|
749
|
+
value: M.triggerType || "MANUAL",
|
|
750
|
+
onChange: (e) => N({
|
|
751
|
+
...M,
|
|
752
|
+
triggerType: e.target.value
|
|
618
753
|
}),
|
|
619
|
-
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground"
|
|
620
|
-
|
|
754
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground",
|
|
755
|
+
children: [
|
|
756
|
+
/* @__PURE__ */ u("option", {
|
|
757
|
+
value: "MANUAL",
|
|
758
|
+
children: p("tourBuilder.triggerManual")
|
|
759
|
+
}),
|
|
760
|
+
/* @__PURE__ */ u("option", {
|
|
761
|
+
value: "AUTO_FIRST_VISIT",
|
|
762
|
+
children: p("tourBuilder.triggerAutoFirstVisit")
|
|
763
|
+
}),
|
|
764
|
+
/* @__PURE__ */ u("option", {
|
|
765
|
+
value: "AUTO_ALWAYS",
|
|
766
|
+
children: p("tourBuilder.triggerAutoAlways")
|
|
767
|
+
}),
|
|
768
|
+
/* @__PURE__ */ u("option", {
|
|
769
|
+
value: "ON_EVENT",
|
|
770
|
+
children: p("tourBuilder.triggerOnEvent")
|
|
771
|
+
}),
|
|
772
|
+
/* @__PURE__ */ u("option", {
|
|
773
|
+
value: "SCHEDULED",
|
|
774
|
+
children: p("tourBuilder.triggerScheduled")
|
|
775
|
+
})
|
|
776
|
+
]
|
|
777
|
+
})] }),
|
|
778
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
621
779
|
className: "block text-sm font-medium mb-2",
|
|
622
|
-
htmlFor: "
|
|
623
|
-
children: "
|
|
624
|
-
}), /* @__PURE__ */
|
|
625
|
-
id: "
|
|
626
|
-
type: "
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
780
|
+
htmlFor: "priority",
|
|
781
|
+
children: p("tourBuilder.labelPriority")
|
|
782
|
+
}), /* @__PURE__ */ u("input", {
|
|
783
|
+
id: "priority",
|
|
784
|
+
type: "number",
|
|
785
|
+
min: "1",
|
|
786
|
+
max: "100",
|
|
787
|
+
value: M.priority || 50,
|
|
788
|
+
onChange: (e) => {
|
|
789
|
+
let t = Number.parseInt(e.target.value, 10) || 50;
|
|
790
|
+
N({
|
|
791
|
+
...M,
|
|
792
|
+
priority: t
|
|
793
|
+
});
|
|
794
|
+
},
|
|
632
795
|
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground"
|
|
633
|
-
})] })
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
children: [/* @__PURE__ */ _(d, {
|
|
664
|
-
permission: D ? i.TOUR_CREATE : i.TOUR_UPDATE,
|
|
665
|
-
children: /* @__PURE__ */ v("button", {
|
|
666
|
-
type: "submit",
|
|
667
|
-
disabled: M || !se,
|
|
668
|
-
className: "flex-1 min-w-[200px] px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 disabled:opacity-50 flex items-center justify-center gap-2",
|
|
669
|
-
children: [/* @__PURE__ */ _(h, { size: 20 }), b(M ? "tourBuilder.saving" : x && x !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
670
|
-
})
|
|
671
|
-
}), x && x !== "new" && /* @__PURE__ */ v(g, { children: [
|
|
672
|
-
/* @__PURE__ */ v("button", {
|
|
673
|
-
type: "button",
|
|
674
|
-
onClick: () => S(`${T}/${x}/steps`),
|
|
675
|
-
className: "px-4 py-2 bg-secondary text-secondary-foreground rounded-md hover:bg-secondary/80 flex items-center gap-2",
|
|
676
|
-
children: [
|
|
677
|
-
/* @__PURE__ */ _(m, { size: 20 }),
|
|
678
|
-
b("tourBuilder.editSteps"),
|
|
679
|
-
k?.steps && k.steps.length > 0 && /* @__PURE__ */ _("span", {
|
|
680
|
-
className: "ml-1 px-2 py-0.5 text-xs bg-primary/20 rounded-full",
|
|
681
|
-
children: k.steps.length
|
|
796
|
+
})] }),
|
|
797
|
+
/* @__PURE__ */ d("div", {
|
|
798
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
799
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
800
|
+
className: "block text-sm font-medium mb-2",
|
|
801
|
+
htmlFor: "tour-start-date",
|
|
802
|
+
children: "Start Date"
|
|
803
|
+
}), /* @__PURE__ */ u("input", {
|
|
804
|
+
id: "tour-start-date",
|
|
805
|
+
type: "datetime-local",
|
|
806
|
+
value: $(M.startDate),
|
|
807
|
+
onChange: (e) => N({
|
|
808
|
+
...M,
|
|
809
|
+
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
810
|
+
}),
|
|
811
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground"
|
|
812
|
+
})] }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("label", {
|
|
813
|
+
className: "block text-sm font-medium mb-2",
|
|
814
|
+
htmlFor: "tour-end-date",
|
|
815
|
+
children: "End Date"
|
|
816
|
+
}), /* @__PURE__ */ u("input", {
|
|
817
|
+
id: "tour-end-date",
|
|
818
|
+
type: "datetime-local",
|
|
819
|
+
value: $(M.endDate),
|
|
820
|
+
onChange: (e) => N({
|
|
821
|
+
...M,
|
|
822
|
+
endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
823
|
+
}),
|
|
824
|
+
className: "w-full px-3 py-2 border border-border rounded-md bg-background text-foreground"
|
|
825
|
+
})] })]
|
|
682
826
|
})
|
|
683
827
|
]
|
|
684
|
-
})
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
828
|
+
})]
|
|
829
|
+
}),
|
|
830
|
+
O && /* @__PURE__ */ d("div", {
|
|
831
|
+
className: "border border-destructive rounded-md p-4 bg-destructive/10",
|
|
832
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
833
|
+
className: "font-semibold text-destructive mb-2",
|
|
834
|
+
children: p("tourBuilder.errorTitle")
|
|
835
|
+
}), /* @__PURE__ */ u("p", {
|
|
836
|
+
className: "text-sm text-destructive",
|
|
837
|
+
children: O.message
|
|
838
|
+
})]
|
|
839
|
+
}),
|
|
840
|
+
D.length > 0 && /* @__PURE__ */ d("div", {
|
|
841
|
+
className: "border border-destructive rounded-md p-4 bg-destructive/10",
|
|
842
|
+
children: [/* @__PURE__ */ u("h3", {
|
|
843
|
+
className: "font-semibold text-destructive mb-2",
|
|
844
|
+
children: p("tourBuilder.validationErrorsTitle")
|
|
845
|
+
}), /* @__PURE__ */ u("ul", {
|
|
846
|
+
className: "list-disc list-inside space-y-1",
|
|
847
|
+
children: D.map((e, t) => /* @__PURE__ */ u("li", {
|
|
848
|
+
className: "text-sm text-destructive",
|
|
849
|
+
children: e.message
|
|
850
|
+
}, t))
|
|
851
|
+
})]
|
|
852
|
+
}),
|
|
853
|
+
/* @__PURE__ */ d("div", {
|
|
854
|
+
className: "flex flex-wrap gap-3",
|
|
855
|
+
children: [/* @__PURE__ */ u(l, {
|
|
856
|
+
permission: b ? i.TOUR_CREATE : i.TOUR_UPDATE,
|
|
857
|
+
children: /* @__PURE__ */ d("button", {
|
|
858
|
+
type: "submit",
|
|
859
|
+
disabled: E || !Se,
|
|
860
|
+
className: "flex-1 min-w-[200px] px-4 py-2 bg-primary text-primary-foreground rounded-md hover:bg-primary/90 disabled:opacity-50 flex items-center justify-center gap-2",
|
|
861
|
+
children: [/* @__PURE__ */ u(le, { size: 20 }), p(E ? "tourBuilder.saving" : m && m !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
862
|
+
})
|
|
863
|
+
}), m && m !== "new" && /* @__PURE__ */ d(de, { children: [
|
|
864
|
+
/* @__PURE__ */ d("button", {
|
|
865
|
+
type: "button",
|
|
866
|
+
onClick: () => h(`${_}/${m}/steps`),
|
|
867
|
+
className: "px-4 py-2 bg-secondary text-secondary-foreground rounded-md hover:bg-secondary/80 flex items-center gap-2",
|
|
868
|
+
children: [
|
|
869
|
+
/* @__PURE__ */ u(ce, { size: 20 }),
|
|
870
|
+
p("tourBuilder.editSteps"),
|
|
871
|
+
w?.steps && w.steps.length > 0 && /* @__PURE__ */ u("span", {
|
|
872
|
+
className: "ml-1 px-2 py-0.5 text-xs bg-primary/20 rounded-full",
|
|
873
|
+
children: w.steps.length
|
|
874
|
+
})
|
|
875
|
+
]
|
|
876
|
+
}),
|
|
877
|
+
/* @__PURE__ */ d("button", {
|
|
878
|
+
type: "button",
|
|
879
|
+
onClick: () => h(`${_}/${m}/preview`),
|
|
880
|
+
className: "px-4 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2",
|
|
881
|
+
children: [/* @__PURE__ */ u(oe, { size: 20 }), p("tourBuilder.preview")]
|
|
882
|
+
}),
|
|
883
|
+
/* @__PURE__ */ d("button", {
|
|
706
884
|
type: "button",
|
|
707
|
-
onClick:
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
885
|
+
onClick: () => h(`${_}/${m}/analytics`),
|
|
886
|
+
className: "px-4 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2",
|
|
887
|
+
children: [/* @__PURE__ */ u(ie, { size: 20 }), p("tourBuilder.analytics")]
|
|
888
|
+
}),
|
|
889
|
+
/* @__PURE__ */ d("button", {
|
|
890
|
+
type: "button",
|
|
891
|
+
onClick: () => h(`${_}/${m}/schedule`),
|
|
892
|
+
className: "px-4 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2",
|
|
893
|
+
children: [/* @__PURE__ */ u(ae, { size: 20 }), "Schedule"]
|
|
894
|
+
}),
|
|
895
|
+
/* @__PURE__ */ u(l, {
|
|
896
|
+
permission: i.TOUR_TEMPLATE_CREATE,
|
|
897
|
+
children: /* @__PURE__ */ d("button", {
|
|
898
|
+
type: "button",
|
|
899
|
+
onClick: Ae,
|
|
900
|
+
disabled: !xe,
|
|
901
|
+
className: "px-4 py-2 border border-border rounded-md hover:bg-accent flex items-center gap-2 disabled:opacity-50",
|
|
902
|
+
children: [/* @__PURE__ */ u(se, { size: 20 }), "Save as Template"]
|
|
903
|
+
})
|
|
726
904
|
})
|
|
727
|
-
})
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
905
|
+
] })]
|
|
906
|
+
})
|
|
907
|
+
]
|
|
908
|
+
})
|
|
909
|
+
]
|
|
732
910
|
});
|
|
733
911
|
}
|
|
734
912
|
//#endregion
|
|
735
|
-
export {
|
|
913
|
+
export { _ as TourBuilderPage };
|
|
736
914
|
|
|
737
915
|
//# sourceMappingURL=TourBuilderPage.js.map
|