@burdenoff/microfe-tours 2026.625.2 → 2026.626.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/tours/i18n.js +19 -1
- package/dist/tours/i18n.js.map +1 -1
- package/dist/tours/pages/AnalyticsDashboardPage.js +43 -41
- package/dist/tours/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/tours/pages/MediaLibraryPage.js +66 -59
- package/dist/tours/pages/MediaLibraryPage.js.map +1 -1
- package/dist/tours/pages/MyToursPage.js +75 -53
- package/dist/tours/pages/MyToursPage.js.map +1 -1
- package/dist/tours/pages/MyToursProgressPage.js +81 -74
- package/dist/tours/pages/MyToursProgressPage.js.map +1 -1
- package/dist/tours/pages/SchedulerPage.js +78 -78
- package/dist/tours/pages/SchedulerPage.js.map +1 -1
- package/dist/tours/pages/StepEditorPage.js +570 -575
- package/dist/tours/pages/StepEditorPage.js.map +1 -1
- package/dist/tours/pages/SystemAnalyticsPage.js +128 -118
- package/dist/tours/pages/SystemAnalyticsPage.js.map +1 -1
- package/dist/tours/pages/TemplateLibraryPage.js +54 -65
- package/dist/tours/pages/TemplateLibraryPage.js.map +1 -1
- package/dist/tours/pages/TourBuilderPage.js +307 -272
- package/dist/tours/pages/TourBuilderPage.js.map +1 -1
- package/dist/tours/pages/TourPreviewPage.js +114 -122
- package/dist/tours/pages/TourPreviewPage.js.map +1 -1
- package/dist/tours/pages/ToursListPage.js +148 -147
- package/dist/tours/pages/ToursListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,15 +8,15 @@ import { emitToursApiFailed as a } from "../telemetry.js";
|
|
|
8
8
|
import { useTourBuilder as te } from "../hooks/useTourBuilder.js";
|
|
9
9
|
import { useEffect as o, useMemo as s, useRef as ne, useState as c } from "react";
|
|
10
10
|
import { PermissionGate as re } from "@burdenoff/fe-libs/shared/components";
|
|
11
|
-
import { ArrowLeft as ie, BarChart3 as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { useNavigate as
|
|
14
|
-
import { Button as
|
|
15
|
-
import { useGatewayClient as
|
|
16
|
-
import { useEventBus as
|
|
17
|
-
import { gql as
|
|
11
|
+
import { ArrowLeft as ie, BarChart3 as l, Calendar as u, Eye as d, LayoutTemplate as ae, ListOrdered as f, Save as oe, Sparkles as se } from "lucide-react";
|
|
12
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
13
|
+
import { useNavigate as ce, useParams as le } from "react-router-dom";
|
|
14
|
+
import { Button as ue, CTAOverflowMenu as de, EmphasisPanel as fe, GlassCard as pe, NextSteps as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { useGatewayClient as ge } from "@burdenoff/fe-libs/shared/graphql";
|
|
16
|
+
import { useEventBus as _e } from "@burdenoff/fe-libs/shared/events";
|
|
17
|
+
import { gql as h } from "@apollo/client/core";
|
|
18
18
|
//#region src/tours/pages/TourBuilderPage.tsx
|
|
19
|
-
var
|
|
19
|
+
var ve = 250, ye = h`
|
|
20
20
|
mutation SeedVibeControlsUserTours {
|
|
21
21
|
seedVibeControlsUserTours {
|
|
22
22
|
productId
|
|
@@ -34,7 +34,7 @@ var ye = 250, be = f`
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
|
-
function
|
|
37
|
+
function be(e) {
|
|
38
38
|
if (!e || typeof e != "object") return null;
|
|
39
39
|
let t = e, n = t.error;
|
|
40
40
|
if (n instanceof Error) return n.message;
|
|
@@ -48,7 +48,7 @@ function xe(e) {
|
|
|
48
48
|
}).filter((e) => !!e);
|
|
49
49
|
return i.length > 0 ? i.join("; ") : "Seed mutation returned errors.";
|
|
50
50
|
}
|
|
51
|
-
var
|
|
51
|
+
var g = [
|
|
52
52
|
{
|
|
53
53
|
productId: "vibecontrols",
|
|
54
54
|
moduleId: "dashboard",
|
|
@@ -416,39 +416,39 @@ var p = [
|
|
|
416
416
|
isModuleHome: !0
|
|
417
417
|
}
|
|
418
418
|
];
|
|
419
|
-
function
|
|
419
|
+
function _(e) {
|
|
420
420
|
return e?.trim() || void 0;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
let t =
|
|
424
|
-
return t ?
|
|
422
|
+
function v(e) {
|
|
423
|
+
let t = _(e);
|
|
424
|
+
return t ? g.filter((e) => e.productId === t) : [];
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function xe(e) {
|
|
427
427
|
let t = /* @__PURE__ */ new Map();
|
|
428
|
-
for (let n of
|
|
428
|
+
for (let n of v(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
|
|
429
429
|
moduleId: n.moduleId,
|
|
430
430
|
label: n.moduleLabel,
|
|
431
431
|
path: n.path
|
|
432
432
|
});
|
|
433
433
|
return [...t.values()];
|
|
434
434
|
}
|
|
435
|
-
function
|
|
436
|
-
let n =
|
|
437
|
-
return n ?
|
|
435
|
+
function Se(e, t) {
|
|
436
|
+
let n = _(t);
|
|
437
|
+
return n ? v(e).flatMap((e) => e.moduleId === n ? [{
|
|
438
438
|
pageId: e.pageId,
|
|
439
439
|
label: e.pageLabel,
|
|
440
440
|
path: e.path
|
|
441
441
|
}] : []) : [];
|
|
442
442
|
}
|
|
443
|
-
function
|
|
444
|
-
let { tr:
|
|
443
|
+
function y() {
|
|
444
|
+
let { tr: h } = ee(), { tourId: g } = le(), _ = ce(), v = e(), { basePath: y = "/" } = v, b = _e(), Ce = ge("global"), { hasPermission: x, isLoading: S } = r(), C = !g || g === "new", w = x(i.TOUR_CREATE), T = x(i.TOUR_UPDATE), we = x(i.TOUR_TEMPLATE_CREATE), E = C ? w : T, D = w && T, { tour: O, loadTour: k, createTour: Te, updateTour: Ee, saving: A, validationErrors: j, error: M } = te(g), { saveAsTemplate: De } = n(), { data: N, loading: P } = t({
|
|
445
445
|
variables: {
|
|
446
|
-
limit:
|
|
446
|
+
limit: ve,
|
|
447
447
|
offset: 0
|
|
448
448
|
},
|
|
449
449
|
fetchPolicy: "cache-and-network",
|
|
450
|
-
skip:
|
|
451
|
-
}), [
|
|
450
|
+
skip: S || !E
|
|
451
|
+
}), [F, I] = c({
|
|
452
452
|
name: "",
|
|
453
453
|
description: "",
|
|
454
454
|
productId: "",
|
|
@@ -461,262 +461,297 @@ function g() {
|
|
|
461
461
|
displayOrder: 1,
|
|
462
462
|
startDate: "",
|
|
463
463
|
endDate: ""
|
|
464
|
-
}), [
|
|
464
|
+
}), [L, R] = c(!1), [z, B] = c(!1), [V, H] = c(!1), [U, W] = c(!1), [G, Oe] = c(null), [ke, Ae] = c(null), K = ne(!1), q = s(() => [...N?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [N]), J = s(() => new Set(q.map((e) => e.slug)), [q]), Y = s(() => xe(F.productId), [F.productId]), X = s(() => new Set(Y.map((e) => e.moduleId)), [Y]), Z = s(() => Se(F.productId, F.moduleId), [F.moduleId, F.productId]), Q = s(() => new Set(Z.map((e) => e.pageId)), [Z]);
|
|
465
465
|
o(() => {
|
|
466
|
-
K.current || !
|
|
466
|
+
K.current || !S && E && g && g !== "new" && k(g);
|
|
467
467
|
}, [
|
|
468
|
-
C,
|
|
469
468
|
E,
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
k,
|
|
470
|
+
S,
|
|
471
|
+
g
|
|
472
472
|
]), o(() => {
|
|
473
|
-
|
|
474
|
-
}, [
|
|
475
|
-
if (!
|
|
476
|
-
|
|
473
|
+
O && !K.current && (I(O), K.current = !0);
|
|
474
|
+
}, [O]), o(() => {
|
|
475
|
+
if (!F.productId || P) {
|
|
476
|
+
R(!1);
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
|
-
|
|
479
|
+
R(q.length > 0 && !J.has(F.productId));
|
|
480
480
|
}, [
|
|
481
|
-
|
|
481
|
+
F.productId,
|
|
482
482
|
J,
|
|
483
483
|
q.length,
|
|
484
|
-
|
|
484
|
+
P
|
|
485
485
|
]), o(() => {
|
|
486
|
-
if (!
|
|
487
|
-
|
|
486
|
+
if (!F.productId || !F.moduleId) {
|
|
487
|
+
B(!1);
|
|
488
488
|
return;
|
|
489
489
|
}
|
|
490
|
-
|
|
490
|
+
B(Y.length === 0 || !X.has(F.moduleId));
|
|
491
491
|
}, [
|
|
492
|
-
|
|
493
|
-
|
|
492
|
+
F.moduleId,
|
|
493
|
+
F.productId,
|
|
494
494
|
X,
|
|
495
495
|
Y.length
|
|
496
496
|
]), o(() => {
|
|
497
|
-
if (!
|
|
498
|
-
|
|
497
|
+
if (!F.productId || !F.pageId) {
|
|
498
|
+
H(!1);
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
|
-
|
|
501
|
+
H(Z.length === 0 || !Q.has(F.pageId));
|
|
502
502
|
}, [
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
F.pageId,
|
|
504
|
+
F.productId,
|
|
505
505
|
Q,
|
|
506
506
|
Z.length
|
|
507
507
|
]);
|
|
508
|
-
let
|
|
508
|
+
let je = !!(F.productId && !L && !J.has(F.productId)), Me = !!(F.moduleId && !z && !X.has(F.moduleId)), Ne = !!(F.pageId && !V && !Q.has(F.pageId)), Pe = async (e) => {
|
|
509
509
|
e.preventDefault();
|
|
510
510
|
try {
|
|
511
|
-
|
|
511
|
+
g && g !== "new" ? await Ee(g, F) : await Te(F);
|
|
512
512
|
} catch {
|
|
513
|
-
a(
|
|
513
|
+
a(b, "tour.save", v);
|
|
514
514
|
}
|
|
515
|
-
},
|
|
516
|
-
|
|
517
|
-
},
|
|
515
|
+
}, Fe = () => {
|
|
516
|
+
_(`${y}/list`);
|
|
517
|
+
}, Ie = (e) => {
|
|
518
518
|
if (!e) return "";
|
|
519
519
|
let t = new Date(e);
|
|
520
520
|
return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
521
|
-
},
|
|
522
|
-
if (!
|
|
523
|
-
let e = `${
|
|
521
|
+
}, Le = async () => {
|
|
522
|
+
if (!g || g === "new") return;
|
|
523
|
+
let e = `${F.name || O?.name || "Tour"} Template`, t = window.prompt("Template name", e);
|
|
524
524
|
if (!t) return;
|
|
525
525
|
let n = window.prompt("Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)", "ONBOARDING") || "ONBOARDING";
|
|
526
526
|
try {
|
|
527
|
-
await
|
|
527
|
+
await De(g, {
|
|
528
528
|
name: t,
|
|
529
|
-
description:
|
|
529
|
+
description: F.description,
|
|
530
530
|
category: n,
|
|
531
531
|
isPublic: !1
|
|
532
|
-
}),
|
|
532
|
+
}), _(`${y}/templates`);
|
|
533
533
|
} catch {
|
|
534
|
-
a(
|
|
534
|
+
a(b, "template.save", v);
|
|
535
535
|
}
|
|
536
|
-
},
|
|
537
|
-
if (window.confirm(
|
|
538
|
-
|
|
536
|
+
}, Re = async () => {
|
|
537
|
+
if (window.confirm(h("tourBuilder.seedVibeControls.confirm"))) {
|
|
538
|
+
W(!0), Oe(null), Ae(null);
|
|
539
539
|
try {
|
|
540
|
-
let e = await
|
|
540
|
+
let e = await Ce.mutate({ mutation: ye }), t = be(e);
|
|
541
541
|
if (t) throw Error(t);
|
|
542
542
|
let n = e.data?.seedVibeControlsUserTours;
|
|
543
543
|
if (!n) throw Error("Seed mutation returned no result.");
|
|
544
|
-
|
|
544
|
+
Oe(n);
|
|
545
545
|
} catch (e) {
|
|
546
|
-
let t = e instanceof Error ? e.message :
|
|
547
|
-
|
|
546
|
+
let t = e instanceof Error ? e.message : h("tourBuilder.seedVibeControls.error");
|
|
547
|
+
Ae(t), b.emit("tours.api.failed", {
|
|
548
548
|
route: "/tours",
|
|
549
549
|
operation: "tour.seed_vibecontrols_user_tours",
|
|
550
550
|
errorMessage: t,
|
|
551
|
-
productId:
|
|
552
|
-
workspaceId:
|
|
551
|
+
productId: v.productId,
|
|
552
|
+
workspaceId: v.workspaceId
|
|
553
553
|
}, { component: "microfe-tours" });
|
|
554
554
|
} finally {
|
|
555
|
-
|
|
555
|
+
W(!1);
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
|
-
},
|
|
558
|
+
}, ze = g && g !== "new" ? [
|
|
559
559
|
{
|
|
560
|
-
label:
|
|
561
|
-
onSelect: () =>
|
|
562
|
-
icon: /* @__PURE__ */
|
|
560
|
+
label: O?.steps && O.steps.length > 0 ? `${h("tourBuilder.editSteps")} (${O.steps.length})` : h("tourBuilder.editSteps"),
|
|
561
|
+
onSelect: () => _(`${y}/${g}/steps`),
|
|
562
|
+
icon: /* @__PURE__ */ p(f, { size: 16 })
|
|
563
563
|
},
|
|
564
564
|
{
|
|
565
|
-
label:
|
|
566
|
-
onSelect: () =>
|
|
567
|
-
icon: /* @__PURE__ */
|
|
565
|
+
label: h("tourBuilder.preview"),
|
|
566
|
+
onSelect: () => _(`${y}/${g}/preview`),
|
|
567
|
+
icon: /* @__PURE__ */ p(d, { size: 16 })
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
|
-
label:
|
|
571
|
-
onSelect: () =>
|
|
572
|
-
icon: /* @__PURE__ */ l
|
|
570
|
+
label: h("tourBuilder.analytics"),
|
|
571
|
+
onSelect: () => _(`${y}/${g}/analytics`),
|
|
572
|
+
icon: /* @__PURE__ */ p(l, { size: 16 })
|
|
573
573
|
},
|
|
574
574
|
{
|
|
575
575
|
label: "Schedule",
|
|
576
|
-
onSelect: () =>
|
|
577
|
-
icon: /* @__PURE__ */
|
|
576
|
+
onSelect: () => _(`${y}/${g}/schedule`),
|
|
577
|
+
icon: /* @__PURE__ */ p(u, { size: 16 })
|
|
578
578
|
},
|
|
579
|
-
...
|
|
579
|
+
...we ? [{
|
|
580
580
|
label: "Save as Template",
|
|
581
|
-
onSelect: () => void
|
|
582
|
-
icon: /* @__PURE__ */
|
|
581
|
+
onSelect: () => void Le(),
|
|
582
|
+
icon: /* @__PURE__ */ p(ae, { size: 16 })
|
|
583
583
|
}] : []
|
|
584
|
+
] : [], $ = g && g !== "new" && T ? [
|
|
585
|
+
{
|
|
586
|
+
id: "edit-steps",
|
|
587
|
+
label: h("tourBuilder.nextStepEditSteps"),
|
|
588
|
+
description: h("tourBuilder.nextStepEditStepsDesc"),
|
|
589
|
+
icon: /* @__PURE__ */ p(f, { size: 16 }),
|
|
590
|
+
onClick: () => _(`${y}/${g}/steps`)
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
id: "preview",
|
|
594
|
+
label: h("tourBuilder.nextStepPreview"),
|
|
595
|
+
description: h("tourBuilder.nextStepPreviewDesc"),
|
|
596
|
+
icon: /* @__PURE__ */ p(d, { size: 16 }),
|
|
597
|
+
onClick: () => _(`${y}/${g}/preview`)
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
id: "schedule",
|
|
601
|
+
label: h("tourBuilder.nextStepSchedule"),
|
|
602
|
+
description: h("tourBuilder.nextStepScheduleDesc"),
|
|
603
|
+
icon: /* @__PURE__ */ p(u, { size: 16 }),
|
|
604
|
+
onClick: () => _(`${y}/${g}/schedule`)
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
id: "analytics",
|
|
608
|
+
label: h("tourBuilder.nextStepAnalytics"),
|
|
609
|
+
description: h("tourBuilder.nextStepAnalyticsDesc"),
|
|
610
|
+
icon: /* @__PURE__ */ p(l, { size: 16 }),
|
|
611
|
+
onClick: () => _(`${y}/${g}/analytics`)
|
|
612
|
+
}
|
|
584
613
|
] : [];
|
|
585
|
-
return
|
|
614
|
+
return S ? /* @__PURE__ */ p("div", {
|
|
586
615
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
587
|
-
children: /* @__PURE__ */
|
|
616
|
+
children: /* @__PURE__ */ p("p", {
|
|
588
617
|
className: "text-sm text-text-secondary",
|
|
589
|
-
children:
|
|
618
|
+
children: h("tourBuilder.loading")
|
|
590
619
|
})
|
|
591
|
-
}) :
|
|
620
|
+
}) : E ? /* @__PURE__ */ m("div", {
|
|
592
621
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
|
|
593
622
|
children: [
|
|
594
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ m("div", {
|
|
595
624
|
className: "flex items-center gap-4",
|
|
596
|
-
children: [/* @__PURE__ */
|
|
625
|
+
children: [/* @__PURE__ */ p("button", {
|
|
597
626
|
type: "button",
|
|
598
|
-
onClick:
|
|
627
|
+
onClick: Fe,
|
|
599
628
|
className: "p-2 hover:bg-accent rounded-md",
|
|
600
|
-
"aria-label":
|
|
601
|
-
children: /* @__PURE__ */
|
|
602
|
-
}), /* @__PURE__ */
|
|
629
|
+
"aria-label": h("tourBuilder.goBack"),
|
|
630
|
+
children: /* @__PURE__ */ p(ie, { size: 20 })
|
|
631
|
+
}), /* @__PURE__ */ m("div", {
|
|
603
632
|
className: "flex-1",
|
|
604
|
-
children: [/* @__PURE__ */
|
|
633
|
+
children: [/* @__PURE__ */ p("h1", {
|
|
605
634
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
606
|
-
children:
|
|
607
|
-
}), /* @__PURE__ */
|
|
635
|
+
children: h(g && g !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
|
|
636
|
+
}), /* @__PURE__ */ p("p", {
|
|
608
637
|
className: "text-sm text-text-secondary",
|
|
609
|
-
children:
|
|
638
|
+
children: h("tourBuilder.subtitle")
|
|
610
639
|
})]
|
|
611
640
|
})]
|
|
612
641
|
}),
|
|
613
|
-
|
|
642
|
+
/* @__PURE__ */ p(he, { children: h("tourBuilder.purpose") }),
|
|
643
|
+
$.length > 0 ? /* @__PURE__ */ p(me, {
|
|
644
|
+
storageKey: "tours-builder",
|
|
645
|
+
title: h("tourBuilder.nextStepsTitle"),
|
|
646
|
+
steps: $
|
|
647
|
+
}) : null,
|
|
648
|
+
C ? /* @__PURE__ */ m(fe, {
|
|
614
649
|
className: "p-4 sm:p-6",
|
|
615
650
|
children: [
|
|
616
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ m("div", {
|
|
617
652
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
618
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ m("div", {
|
|
619
654
|
className: "space-y-1",
|
|
620
|
-
children: [/* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
621
656
|
className: "text-lg font-semibold text-text-primary",
|
|
622
|
-
children:
|
|
623
|
-
}), /* @__PURE__ */
|
|
657
|
+
children: h("tourBuilder.seedVibeControls.title")
|
|
658
|
+
}), /* @__PURE__ */ p("p", {
|
|
624
659
|
className: "text-sm text-text-secondary",
|
|
625
|
-
children:
|
|
660
|
+
children: h("tourBuilder.seedVibeControls.description")
|
|
626
661
|
})]
|
|
627
|
-
}), /* @__PURE__ */
|
|
662
|
+
}), /* @__PURE__ */ m("button", {
|
|
628
663
|
type: "button",
|
|
629
|
-
onClick: () => void
|
|
630
|
-
disabled:
|
|
664
|
+
onClick: () => void Re(),
|
|
665
|
+
disabled: U || !D,
|
|
631
666
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-md border border-border-subtle bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground hover:bg-secondary/80 disabled:cursor-not-allowed disabled:opacity-50",
|
|
632
|
-
children: [/* @__PURE__ */
|
|
667
|
+
children: [/* @__PURE__ */ p(se, { size: 18 }), h(U ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
|
|
633
668
|
})]
|
|
634
669
|
}),
|
|
635
|
-
|
|
670
|
+
D ? null : /* @__PURE__ */ p("p", {
|
|
636
671
|
className: "mt-3 text-sm text-text-secondary",
|
|
637
|
-
children:
|
|
672
|
+
children: h("tourBuilder.seedVibeControls.permissionHint")
|
|
638
673
|
}),
|
|
639
|
-
|
|
674
|
+
ke ? /* @__PURE__ */ p("p", {
|
|
640
675
|
className: "mt-3 text-sm text-status-error-text",
|
|
641
|
-
children:
|
|
676
|
+
children: ke
|
|
642
677
|
}) : null,
|
|
643
|
-
|
|
678
|
+
G ? /* @__PURE__ */ p("div", {
|
|
644
679
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
645
|
-
children:
|
|
646
|
-
totalCount:
|
|
647
|
-
productId:
|
|
648
|
-
workspaceId:
|
|
649
|
-
createdCount:
|
|
650
|
-
updatedCount:
|
|
680
|
+
children: h("tourBuilder.seedVibeControls.result", {
|
|
681
|
+
totalCount: G.totalCount,
|
|
682
|
+
productId: G.productId,
|
|
683
|
+
workspaceId: G.workspaceId,
|
|
684
|
+
createdCount: G.createdCount,
|
|
685
|
+
updatedCount: G.updatedCount
|
|
651
686
|
})
|
|
652
687
|
}) : null
|
|
653
688
|
]
|
|
654
689
|
}) : null,
|
|
655
|
-
/* @__PURE__ */
|
|
656
|
-
onSubmit:
|
|
690
|
+
/* @__PURE__ */ m("form", {
|
|
691
|
+
onSubmit: Pe,
|
|
657
692
|
className: "space-y-6",
|
|
658
693
|
children: [
|
|
659
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ m(pe, {
|
|
660
695
|
treatment: "plain",
|
|
661
696
|
className: "p-4 sm:p-6 border-border-seam",
|
|
662
|
-
children: [/* @__PURE__ */
|
|
697
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
663
698
|
className: "text-lg font-semibold mb-4",
|
|
664
|
-
children:
|
|
665
|
-
}), /* @__PURE__ */
|
|
699
|
+
children: h("tourBuilder.sectionBasicInfo")
|
|
700
|
+
}), /* @__PURE__ */ m("div", {
|
|
666
701
|
className: "space-y-4",
|
|
667
702
|
children: [
|
|
668
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
669
704
|
className: "block text-sm font-medium mb-2",
|
|
670
705
|
htmlFor: "tour-name",
|
|
671
|
-
children:
|
|
672
|
-
}), /* @__PURE__ */
|
|
706
|
+
children: h("tourBuilder.labelName")
|
|
707
|
+
}), /* @__PURE__ */ p("input", {
|
|
673
708
|
id: "tour-name",
|
|
674
709
|
type: "text",
|
|
675
|
-
value:
|
|
676
|
-
onChange: (e) =>
|
|
677
|
-
...
|
|
710
|
+
value: F.name || "",
|
|
711
|
+
onChange: (e) => I({
|
|
712
|
+
...F,
|
|
678
713
|
name: e.target.value
|
|
679
714
|
}),
|
|
680
715
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
681
716
|
required: !0,
|
|
682
|
-
"aria-label":
|
|
717
|
+
"aria-label": h("tourBuilder.labelName")
|
|
683
718
|
})] }),
|
|
684
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
685
720
|
className: "block text-sm font-medium mb-2",
|
|
686
721
|
htmlFor: "tour-description",
|
|
687
|
-
children:
|
|
688
|
-
}), /* @__PURE__ */
|
|
722
|
+
children: h("tourBuilder.labelDescription")
|
|
723
|
+
}), /* @__PURE__ */ p("textarea", {
|
|
689
724
|
id: "tour-description",
|
|
690
|
-
value:
|
|
691
|
-
onChange: (e) =>
|
|
692
|
-
...
|
|
725
|
+
value: F.description || "",
|
|
726
|
+
onChange: (e) => I({
|
|
727
|
+
...F,
|
|
693
728
|
description: e.target.value
|
|
694
729
|
}),
|
|
695
730
|
rows: 3,
|
|
696
731
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
697
|
-
"aria-label":
|
|
732
|
+
"aria-label": h("tourBuilder.labelDescription")
|
|
698
733
|
})] }),
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
734
|
+
/* @__PURE__ */ m("div", { children: [
|
|
735
|
+
/* @__PURE__ */ p("label", {
|
|
701
736
|
className: "block text-sm font-medium mb-2",
|
|
702
737
|
htmlFor: "product-id",
|
|
703
|
-
children:
|
|
738
|
+
children: h("tourBuilder.labelProductId")
|
|
704
739
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ m("select", {
|
|
706
741
|
id: "product-id",
|
|
707
|
-
value:
|
|
742
|
+
value: L ? "__custom__" : F.productId || "",
|
|
708
743
|
onChange: (e) => {
|
|
709
744
|
if (e.target.value === "__custom__") {
|
|
710
|
-
|
|
711
|
-
...
|
|
745
|
+
R(!0), I({
|
|
746
|
+
...F,
|
|
712
747
|
productId: "",
|
|
713
748
|
moduleId: void 0,
|
|
714
749
|
pageId: void 0
|
|
715
750
|
});
|
|
716
751
|
return;
|
|
717
752
|
}
|
|
718
|
-
|
|
719
|
-
...
|
|
753
|
+
R(!1), B(!1), H(!1), I({
|
|
754
|
+
...F,
|
|
720
755
|
productId: e.target.value,
|
|
721
756
|
moduleId: void 0,
|
|
722
757
|
pageId: void 0
|
|
@@ -724,17 +759,17 @@ function g() {
|
|
|
724
759
|
},
|
|
725
760
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
726
761
|
required: !0,
|
|
727
|
-
"aria-label":
|
|
762
|
+
"aria-label": h("tourBuilder.labelProductId"),
|
|
728
763
|
children: [
|
|
729
|
-
/* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ p("option", {
|
|
730
765
|
value: "",
|
|
731
766
|
children: "Select product"
|
|
732
767
|
}),
|
|
733
|
-
|
|
768
|
+
P ? /* @__PURE__ */ p("option", {
|
|
734
769
|
disabled: !0,
|
|
735
770
|
children: "Loading products…"
|
|
736
771
|
}) : null,
|
|
737
|
-
q.map((e) => /* @__PURE__ */
|
|
772
|
+
q.map((e) => /* @__PURE__ */ m("option", {
|
|
738
773
|
value: e.slug,
|
|
739
774
|
children: [
|
|
740
775
|
e.name,
|
|
@@ -743,23 +778,23 @@ function g() {
|
|
|
743
778
|
")"
|
|
744
779
|
]
|
|
745
780
|
}, e.id)),
|
|
746
|
-
|
|
747
|
-
value:
|
|
748
|
-
children: ["Current: ",
|
|
781
|
+
je ? /* @__PURE__ */ m("option", {
|
|
782
|
+
value: F.productId,
|
|
783
|
+
children: ["Current: ", F.productId]
|
|
749
784
|
}) : null,
|
|
750
|
-
/* @__PURE__ */
|
|
785
|
+
/* @__PURE__ */ p("option", {
|
|
751
786
|
value: "__custom__",
|
|
752
787
|
children: "Custom product slug"
|
|
753
788
|
})
|
|
754
789
|
]
|
|
755
790
|
}),
|
|
756
|
-
|
|
791
|
+
L ? /* @__PURE__ */ p("input", {
|
|
757
792
|
id: "product-id-custom",
|
|
758
793
|
"aria-label": "Custom product slug",
|
|
759
794
|
type: "text",
|
|
760
|
-
value:
|
|
761
|
-
onChange: (e) =>
|
|
762
|
-
...
|
|
795
|
+
value: F.productId || "",
|
|
796
|
+
onChange: (e) => I({
|
|
797
|
+
...F,
|
|
763
798
|
productId: e.target.value,
|
|
764
799
|
moduleId: void 0,
|
|
765
800
|
pageId: void 0
|
|
@@ -769,41 +804,41 @@ function g() {
|
|
|
769
804
|
required: !0
|
|
770
805
|
}) : null
|
|
771
806
|
] }),
|
|
772
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ m("div", {
|
|
773
808
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
774
|
-
children: [/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ m("div", { children: [
|
|
810
|
+
/* @__PURE__ */ p("label", {
|
|
776
811
|
className: "block text-sm font-medium mb-2",
|
|
777
812
|
htmlFor: "module-id",
|
|
778
813
|
children: "Module ID"
|
|
779
814
|
}),
|
|
780
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ m("select", {
|
|
781
816
|
id: "module-id",
|
|
782
|
-
value:
|
|
817
|
+
value: z ? "__custom__" : F.moduleId || "",
|
|
783
818
|
onChange: (e) => {
|
|
784
819
|
if (e.target.value === "__custom__") {
|
|
785
|
-
|
|
786
|
-
...
|
|
820
|
+
B(!0), I({
|
|
821
|
+
...F,
|
|
787
822
|
moduleId: "",
|
|
788
823
|
pageId: void 0
|
|
789
824
|
});
|
|
790
825
|
return;
|
|
791
826
|
}
|
|
792
|
-
|
|
793
|
-
...
|
|
827
|
+
B(!1), H(!1), I({
|
|
828
|
+
...F,
|
|
794
829
|
moduleId: e.target.value || void 0,
|
|
795
830
|
pageId: void 0
|
|
796
831
|
});
|
|
797
832
|
},
|
|
798
833
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
799
|
-
disabled: !
|
|
834
|
+
disabled: !F.productId,
|
|
800
835
|
"aria-label": "Module ID",
|
|
801
836
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ p("option", {
|
|
803
838
|
value: "",
|
|
804
839
|
children: "All modules"
|
|
805
840
|
}),
|
|
806
|
-
Y.map((e) => /* @__PURE__ */
|
|
841
|
+
Y.map((e) => /* @__PURE__ */ m("option", {
|
|
807
842
|
value: e.moduleId,
|
|
808
843
|
children: [
|
|
809
844
|
e.label,
|
|
@@ -812,60 +847,60 @@ function g() {
|
|
|
812
847
|
")"
|
|
813
848
|
]
|
|
814
849
|
}, e.moduleId)),
|
|
815
|
-
|
|
816
|
-
value:
|
|
817
|
-
children: ["Current: ",
|
|
850
|
+
Me ? /* @__PURE__ */ m("option", {
|
|
851
|
+
value: F.moduleId,
|
|
852
|
+
children: ["Current: ", F.moduleId]
|
|
818
853
|
}) : null,
|
|
819
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ p("option", {
|
|
820
855
|
value: "__custom__",
|
|
821
856
|
children: "Custom module ID"
|
|
822
857
|
})
|
|
823
858
|
]
|
|
824
859
|
}),
|
|
825
|
-
|
|
860
|
+
z ? /* @__PURE__ */ p("input", {
|
|
826
861
|
id: "module-id-custom",
|
|
827
862
|
"aria-label": "Custom module ID",
|
|
828
863
|
type: "text",
|
|
829
|
-
value:
|
|
830
|
-
onChange: (e) =>
|
|
831
|
-
...
|
|
864
|
+
value: F.moduleId || "",
|
|
865
|
+
onChange: (e) => I({
|
|
866
|
+
...F,
|
|
832
867
|
moduleId: e.target.value || void 0,
|
|
833
868
|
pageId: void 0
|
|
834
869
|
}),
|
|
835
870
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
836
871
|
placeholder: "vibecontrols"
|
|
837
872
|
}) : null
|
|
838
|
-
] }), /* @__PURE__ */
|
|
839
|
-
/* @__PURE__ */
|
|
873
|
+
] }), /* @__PURE__ */ m("div", { children: [
|
|
874
|
+
/* @__PURE__ */ p("label", {
|
|
840
875
|
className: "block text-sm font-medium mb-2",
|
|
841
876
|
htmlFor: "page-id",
|
|
842
877
|
children: "Page ID"
|
|
843
878
|
}),
|
|
844
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ m("select", {
|
|
845
880
|
id: "page-id",
|
|
846
|
-
value:
|
|
881
|
+
value: V ? "__custom__" : F.pageId || "",
|
|
847
882
|
onChange: (e) => {
|
|
848
883
|
if (e.target.value === "__custom__") {
|
|
849
|
-
|
|
850
|
-
...
|
|
884
|
+
H(!0), I({
|
|
885
|
+
...F,
|
|
851
886
|
pageId: ""
|
|
852
887
|
});
|
|
853
888
|
return;
|
|
854
889
|
}
|
|
855
|
-
|
|
856
|
-
...
|
|
890
|
+
H(!1), I({
|
|
891
|
+
...F,
|
|
857
892
|
pageId: e.target.value || void 0
|
|
858
893
|
});
|
|
859
894
|
},
|
|
860
895
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
861
|
-
disabled: !
|
|
896
|
+
disabled: !F.productId,
|
|
862
897
|
"aria-label": "Page ID",
|
|
863
898
|
children: [
|
|
864
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ p("option", {
|
|
865
900
|
value: "",
|
|
866
901
|
children: "All pages"
|
|
867
902
|
}),
|
|
868
|
-
Z.map((e) => /* @__PURE__ */
|
|
903
|
+
Z.map((e) => /* @__PURE__ */ m("option", {
|
|
869
904
|
value: e.pageId,
|
|
870
905
|
children: [
|
|
871
906
|
e.label,
|
|
@@ -874,23 +909,23 @@ function g() {
|
|
|
874
909
|
")"
|
|
875
910
|
]
|
|
876
911
|
}, e.pageId)),
|
|
877
|
-
|
|
878
|
-
value:
|
|
879
|
-
children: ["Current: ",
|
|
912
|
+
Ne ? /* @__PURE__ */ m("option", {
|
|
913
|
+
value: F.pageId,
|
|
914
|
+
children: ["Current: ", F.pageId]
|
|
880
915
|
}) : null,
|
|
881
|
-
/* @__PURE__ */
|
|
916
|
+
/* @__PURE__ */ p("option", {
|
|
882
917
|
value: "__custom__",
|
|
883
918
|
children: "Custom page ID"
|
|
884
919
|
})
|
|
885
920
|
]
|
|
886
921
|
}),
|
|
887
|
-
|
|
922
|
+
V ? /* @__PURE__ */ p("input", {
|
|
888
923
|
id: "page-id-custom",
|
|
889
924
|
"aria-label": "Custom page ID",
|
|
890
925
|
type: "text",
|
|
891
|
-
value:
|
|
892
|
-
onChange: (e) =>
|
|
893
|
-
...
|
|
926
|
+
value: F.pageId || "",
|
|
927
|
+
onChange: (e) => I({
|
|
928
|
+
...F,
|
|
894
929
|
pageId: e.target.value || void 0
|
|
895
930
|
}),
|
|
896
931
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
@@ -898,18 +933,18 @@ function g() {
|
|
|
898
933
|
}) : null
|
|
899
934
|
] })]
|
|
900
935
|
}),
|
|
901
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ m("label", {
|
|
902
937
|
className: "flex items-center gap-3 cursor-pointer",
|
|
903
|
-
children: [/* @__PURE__ */
|
|
938
|
+
children: [/* @__PURE__ */ p("input", {
|
|
904
939
|
type: "checkbox",
|
|
905
|
-
checked:
|
|
906
|
-
onChange: (e) =>
|
|
907
|
-
...
|
|
940
|
+
checked: F.isActive ?? !0,
|
|
941
|
+
onChange: (e) => I({
|
|
942
|
+
...F,
|
|
908
943
|
isActive: e.target.checked
|
|
909
944
|
}),
|
|
910
945
|
className: "size-4 rounded",
|
|
911
946
|
"aria-label": "Active"
|
|
912
|
-
}), /* @__PURE__ */
|
|
947
|
+
}), /* @__PURE__ */ p("span", {
|
|
913
948
|
className: "text-sm font-medium",
|
|
914
949
|
children: "Active"
|
|
915
950
|
})]
|
|
@@ -917,97 +952,97 @@ function g() {
|
|
|
917
952
|
]
|
|
918
953
|
})]
|
|
919
954
|
}),
|
|
920
|
-
/* @__PURE__ */
|
|
955
|
+
/* @__PURE__ */ m(pe, {
|
|
921
956
|
treatment: "plain",
|
|
922
957
|
className: "p-4 sm:p-6 border-border-seam",
|
|
923
|
-
children: [/* @__PURE__ */
|
|
958
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
924
959
|
className: "text-lg font-semibold mb-4",
|
|
925
|
-
children:
|
|
926
|
-
}), /* @__PURE__ */
|
|
960
|
+
children: h("tourBuilder.sectionTriggerSettings")
|
|
961
|
+
}), /* @__PURE__ */ m("div", {
|
|
927
962
|
className: "space-y-4",
|
|
928
963
|
children: [
|
|
929
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
930
965
|
className: "block text-sm font-medium mb-2",
|
|
931
966
|
htmlFor: "trigger-type",
|
|
932
|
-
children:
|
|
933
|
-
}), /* @__PURE__ */
|
|
967
|
+
children: h("tourBuilder.labelTriggerType")
|
|
968
|
+
}), /* @__PURE__ */ m("select", {
|
|
934
969
|
id: "trigger-type",
|
|
935
|
-
value:
|
|
936
|
-
onChange: (e) =>
|
|
937
|
-
...
|
|
970
|
+
value: F.triggerType || "MANUAL",
|
|
971
|
+
onChange: (e) => I({
|
|
972
|
+
...F,
|
|
938
973
|
triggerType: e.target.value
|
|
939
974
|
}),
|
|
940
975
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
941
|
-
"aria-label":
|
|
976
|
+
"aria-label": h("tourBuilder.labelTriggerType"),
|
|
942
977
|
children: [
|
|
943
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ p("option", {
|
|
944
979
|
value: "MANUAL",
|
|
945
|
-
children:
|
|
980
|
+
children: h("tourBuilder.triggerManual")
|
|
946
981
|
}),
|
|
947
|
-
/* @__PURE__ */
|
|
982
|
+
/* @__PURE__ */ p("option", {
|
|
948
983
|
value: "AUTO_FIRST_VISIT",
|
|
949
|
-
children:
|
|
984
|
+
children: h("tourBuilder.triggerAutoFirstVisit")
|
|
950
985
|
}),
|
|
951
|
-
/* @__PURE__ */
|
|
986
|
+
/* @__PURE__ */ p("option", {
|
|
952
987
|
value: "AUTO_ALWAYS",
|
|
953
|
-
children:
|
|
988
|
+
children: h("tourBuilder.triggerAutoAlways")
|
|
954
989
|
}),
|
|
955
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ p("option", {
|
|
956
991
|
value: "ON_EVENT",
|
|
957
|
-
children:
|
|
992
|
+
children: h("tourBuilder.triggerOnEvent")
|
|
958
993
|
}),
|
|
959
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ p("option", {
|
|
960
995
|
value: "SCHEDULED",
|
|
961
|
-
children:
|
|
996
|
+
children: h("tourBuilder.triggerScheduled")
|
|
962
997
|
})
|
|
963
998
|
]
|
|
964
999
|
})] }),
|
|
965
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
966
1001
|
className: "block text-sm font-medium mb-2",
|
|
967
1002
|
htmlFor: "priority",
|
|
968
|
-
children:
|
|
969
|
-
}), /* @__PURE__ */
|
|
1003
|
+
children: h("tourBuilder.labelPriority")
|
|
1004
|
+
}), /* @__PURE__ */ p("input", {
|
|
970
1005
|
id: "priority",
|
|
971
1006
|
type: "number",
|
|
972
1007
|
min: "1",
|
|
973
1008
|
max: "100",
|
|
974
|
-
value:
|
|
1009
|
+
value: F.priority || 50,
|
|
975
1010
|
onChange: (e) => {
|
|
976
1011
|
let t = Number.parseInt(e.target.value, 10) || 50;
|
|
977
|
-
|
|
978
|
-
...
|
|
1012
|
+
I({
|
|
1013
|
+
...F,
|
|
979
1014
|
priority: t
|
|
980
1015
|
});
|
|
981
1016
|
},
|
|
982
1017
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
983
|
-
"aria-label":
|
|
1018
|
+
"aria-label": h("tourBuilder.labelPriority")
|
|
984
1019
|
})] }),
|
|
985
|
-
/* @__PURE__ */
|
|
1020
|
+
/* @__PURE__ */ m("div", {
|
|
986
1021
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
987
|
-
children: [/* @__PURE__ */
|
|
1022
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
988
1023
|
className: "block text-sm font-medium mb-2",
|
|
989
1024
|
htmlFor: "tour-start-date",
|
|
990
1025
|
children: "Start Date"
|
|
991
|
-
}), /* @__PURE__ */
|
|
1026
|
+
}), /* @__PURE__ */ p("input", {
|
|
992
1027
|
id: "tour-start-date",
|
|
993
1028
|
type: "datetime-local",
|
|
994
|
-
value:
|
|
995
|
-
onChange: (e) =>
|
|
996
|
-
...
|
|
1029
|
+
value: Ie(F.startDate),
|
|
1030
|
+
onChange: (e) => I({
|
|
1031
|
+
...F,
|
|
997
1032
|
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
998
1033
|
}),
|
|
999
1034
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1000
1035
|
"aria-label": "Start Date"
|
|
1001
|
-
})] }), /* @__PURE__ */
|
|
1036
|
+
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
1002
1037
|
className: "block text-sm font-medium mb-2",
|
|
1003
1038
|
htmlFor: "tour-end-date",
|
|
1004
1039
|
children: "End Date"
|
|
1005
|
-
}), /* @__PURE__ */
|
|
1040
|
+
}), /* @__PURE__ */ p("input", {
|
|
1006
1041
|
id: "tour-end-date",
|
|
1007
1042
|
type: "datetime-local",
|
|
1008
|
-
value:
|
|
1009
|
-
onChange: (e) =>
|
|
1010
|
-
...
|
|
1043
|
+
value: Ie(F.endDate),
|
|
1044
|
+
onChange: (e) => I({
|
|
1045
|
+
...F,
|
|
1011
1046
|
endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1012
1047
|
}),
|
|
1013
1048
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
@@ -1017,64 +1052,64 @@ function g() {
|
|
|
1017
1052
|
]
|
|
1018
1053
|
})]
|
|
1019
1054
|
}),
|
|
1020
|
-
|
|
1055
|
+
M && /* @__PURE__ */ m("div", {
|
|
1021
1056
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1022
|
-
children: [/* @__PURE__ */
|
|
1057
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
1023
1058
|
className: "font-semibold text-status-error-text mb-2",
|
|
1024
|
-
children:
|
|
1025
|
-
}), /* @__PURE__ */
|
|
1059
|
+
children: h("tourBuilder.errorTitle")
|
|
1060
|
+
}), /* @__PURE__ */ p("p", {
|
|
1026
1061
|
className: "text-sm text-status-error-text",
|
|
1027
|
-
children:
|
|
1062
|
+
children: M.message
|
|
1028
1063
|
})]
|
|
1029
1064
|
}),
|
|
1030
|
-
|
|
1065
|
+
j.length > 0 && /* @__PURE__ */ m("div", {
|
|
1031
1066
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1032
|
-
children: [/* @__PURE__ */
|
|
1067
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
1033
1068
|
className: "font-semibold text-status-error-text mb-2",
|
|
1034
|
-
children:
|
|
1035
|
-
}), /* @__PURE__ */
|
|
1069
|
+
children: h("tourBuilder.validationErrorsTitle")
|
|
1070
|
+
}), /* @__PURE__ */ p("ul", {
|
|
1036
1071
|
className: "list-disc list-inside space-y-1",
|
|
1037
|
-
children:
|
|
1072
|
+
children: j.map((e) => /* @__PURE__ */ p("li", {
|
|
1038
1073
|
className: "text-sm text-status-error-text",
|
|
1039
1074
|
children: e.message
|
|
1040
1075
|
}, e.message))
|
|
1041
1076
|
})]
|
|
1042
1077
|
}),
|
|
1043
|
-
/* @__PURE__ */
|
|
1078
|
+
/* @__PURE__ */ m("div", {
|
|
1044
1079
|
className: "flex flex-wrap items-center gap-3",
|
|
1045
|
-
children: [/* @__PURE__ */
|
|
1046
|
-
permission:
|
|
1047
|
-
children: /* @__PURE__ */
|
|
1080
|
+
children: [/* @__PURE__ */ p(re, {
|
|
1081
|
+
permission: C ? i.TOUR_CREATE : i.TOUR_UPDATE,
|
|
1082
|
+
children: /* @__PURE__ */ m(ue, {
|
|
1048
1083
|
type: "submit",
|
|
1049
|
-
disabled:
|
|
1084
|
+
disabled: A || !E,
|
|
1050
1085
|
className: "flex-1 min-w-[200px] min-h-[44px]",
|
|
1051
|
-
children: [/* @__PURE__ */
|
|
1086
|
+
children: [/* @__PURE__ */ p(oe, { size: 20 }), h(A ? "tourBuilder.saving" : g && g !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
1052
1087
|
})
|
|
1053
|
-
}),
|
|
1088
|
+
}), g && g !== "new" && ze.length > 0 && /* @__PURE__ */ p(de, { actions: ze })]
|
|
1054
1089
|
})
|
|
1055
1090
|
]
|
|
1056
1091
|
})
|
|
1057
1092
|
]
|
|
1058
|
-
}) : /* @__PURE__ */
|
|
1093
|
+
}) : /* @__PURE__ */ p("div", {
|
|
1059
1094
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
1060
|
-
children: /* @__PURE__ */
|
|
1095
|
+
children: /* @__PURE__ */ m("div", {
|
|
1061
1096
|
className: "text-center space-y-4",
|
|
1062
|
-
children: [/* @__PURE__ */
|
|
1097
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
|
|
1063
1098
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
1064
|
-
children:
|
|
1065
|
-
}), /* @__PURE__ */
|
|
1099
|
+
children: h("tourBuilder.accessDeniedTitle")
|
|
1100
|
+
}), /* @__PURE__ */ p("p", {
|
|
1066
1101
|
className: "text-sm text-text-secondary",
|
|
1067
|
-
children:
|
|
1068
|
-
})] }), /* @__PURE__ */
|
|
1102
|
+
children: h(C ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
|
|
1103
|
+
})] }), /* @__PURE__ */ p("button", {
|
|
1069
1104
|
type: "button",
|
|
1070
|
-
onClick:
|
|
1105
|
+
onClick: Fe,
|
|
1071
1106
|
className: "inline-flex items-center justify-center rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent",
|
|
1072
|
-
children:
|
|
1107
|
+
children: h("tourBuilder.goBack")
|
|
1073
1108
|
})]
|
|
1074
1109
|
})
|
|
1075
1110
|
});
|
|
1076
1111
|
}
|
|
1077
1112
|
//#endregion
|
|
1078
|
-
export {
|
|
1113
|
+
export { y as TourBuilderPage };
|
|
1079
1114
|
|
|
1080
1115
|
//# sourceMappingURL=TourBuilderPage.js.map
|