@burdenoff/microfe-tours 2026.830.1 → 2026.918.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/ToursAdminRoot.js +28 -27
- package/dist/tours/ToursAdminRoot.js.map +1 -1
- package/dist/tours/ToursAdminRoutes.js +56 -55
- package/dist/tours/ToursAdminRoutes.js.map +1 -1
- package/dist/tours/ToursUserRoot.js +34 -29
- package/dist/tours/ToursUserRoot.js.map +1 -1
- package/dist/tours/ToursUserRoutes.js +33 -33
- package/dist/tours/ToursUserRoutes.js.map +1 -1
- package/dist/tours/components/MarkdownEditor.js +85 -80
- package/dist/tours/components/MarkdownEditor.js.map +1 -1
- package/dist/tours/components/RouteHelpers.js +47 -42
- package/dist/tours/components/RouteHelpers.js.map +1 -1
- package/dist/tours/components/ToursAdminNavRegistrar.js +32 -27
- package/dist/tours/components/ToursAdminNavRegistrar.js.map +1 -1
- package/dist/tours/hooks/useStepSequencer.js +45 -36
- package/dist/tours/hooks/useStepSequencer.js.map +1 -1
- package/dist/tours/hooks/useTourBuilder.js +106 -93
- package/dist/tours/hooks/useTourBuilder.js.map +1 -1
- package/dist/tours/hooks/useTourPreview.js +51 -41
- package/dist/tours/hooks/useTourPreview.js.map +1 -1
- package/dist/tours/hooks/useToursList.js +28 -27
- package/dist/tours/hooks/useToursList.js.map +1 -1
- package/dist/tours/i18n.js +187 -5
- package/dist/tours/i18n.js.map +1 -1
- package/dist/tours/pages/AnalyticsDashboardPage.js +108 -109
- package/dist/tours/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/tours/pages/MediaLibraryPage.js +58 -61
- package/dist/tours/pages/MediaLibraryPage.js.map +1 -1
- package/dist/tours/pages/MyToursPage.js +5 -5
- package/dist/tours/pages/MyToursProgressPage.js +5 -5
- package/dist/tours/pages/SchedulerPage.js +78 -81
- package/dist/tours/pages/SchedulerPage.js.map +1 -1
- package/dist/tours/pages/StepEditorPage.js +32 -32
- package/dist/tours/pages/StepEditorPage.js.map +1 -1
- package/dist/tours/pages/SystemAnalyticsPage.js +75 -79
- package/dist/tours/pages/SystemAnalyticsPage.js.map +1 -1
- package/dist/tours/pages/TemplateLibraryPage.js +8 -8
- package/dist/tours/pages/TourBuilderPage.js +295 -279
- package/dist/tours/pages/TourBuilderPage.js.map +1 -1
- package/dist/tours/pages/TourPreviewPage.js +6 -6
- package/dist/tours/pages/ToursListPage.js +155 -155
- package/dist/tours/pages/ToursListPage.js.map +1 -1
- package/dist/tours/store/toursStore.js +11 -7
- package/dist/tours/store/toursStore.js.map +1 -1
- package/dist/tours/utils/index.js +32 -19
- package/dist/tours/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { emitToursApiFailed as
|
|
8
|
-
import { MarkdownEditor as
|
|
9
|
-
import { useTourBuilder as
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { PermissionGate as
|
|
12
|
-
import { ArrowLeft as
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import { useNavigate as
|
|
15
|
-
import { Button as
|
|
16
|
-
import { useGatewayClient as
|
|
17
|
-
import { useEventBus as
|
|
18
|
-
import { gql as
|
|
1
|
+
import { useToursI18n as e } from "../i18n.js";
|
|
2
|
+
import { useToursContext as t } from "../providers/ToursProvider.js";
|
|
3
|
+
import { useGetPlatformProductsForToursQuery as n } from "../../generated/global-operations.js";
|
|
4
|
+
import { useTourLifecycle as r } from "../hooks/useTourLifecycle.js";
|
|
5
|
+
import { useToursPermissionAccess as i } from "../hooks/useToursPermissionAccess.js";
|
|
6
|
+
import { TOUR_PERMISSIONS as a } from "../../constants/permissions.js";
|
|
7
|
+
import { emitToursApiFailed as o } from "../telemetry.js";
|
|
8
|
+
import { MarkdownEditor as ee } from "../components/MarkdownEditor.js";
|
|
9
|
+
import { useTourBuilder as te } from "../hooks/useTourBuilder.js";
|
|
10
|
+
import { useEffect as s, useMemo as c, useRef as ne, useState as l } from "react";
|
|
11
|
+
import { PermissionGate as re } from "@burdenoff/fe-libs/shared/components";
|
|
12
|
+
import { ArrowLeft as ie, BarChart3 as u, Calendar as d, Eye as f, LayoutTemplate as ae, ListOrdered as p, Save as oe, Sparkles as m } from "lucide-react";
|
|
13
|
+
import { Fragment as se, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
14
|
+
import { useNavigate as ce, useParams as le } from "react-router";
|
|
15
|
+
import { Button as ue, CTAOverflowMenu as de, EmphasisPanel as fe, GlassCard as pe, NextSteps as me, PagePurpose as he } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { useGatewayClient as ge } from "@burdenoff/fe-libs/shared/graphql";
|
|
17
|
+
import { useEventBus as _e } from "@burdenoff/fe-libs/shared/events";
|
|
18
|
+
import { gql as _ } from "@apollo/client/core";
|
|
19
19
|
//#region src/tours/pages/TourBuilderPage.tsx
|
|
20
|
-
var
|
|
20
|
+
var ve = 250, ye = _`
|
|
21
21
|
mutation SeedVibeControlsUserTours {
|
|
22
22
|
seedVibeControlsUserTours {
|
|
23
23
|
productId
|
|
@@ -34,7 +34,7 @@ var be = 250, xe = h`
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`, be = _`
|
|
38
38
|
mutation SeedBuildmyiqUserTours {
|
|
39
39
|
seedBuildmyiqUserTours {
|
|
40
40
|
productId
|
|
@@ -52,21 +52,21 @@ var be = 250, xe = h`
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
`;
|
|
55
|
-
function
|
|
55
|
+
function xe(e, t) {
|
|
56
56
|
if (!e || typeof e != "object") return null;
|
|
57
|
-
let
|
|
58
|
-
if (
|
|
59
|
-
let
|
|
60
|
-
if (!Array.isArray(
|
|
61
|
-
let
|
|
57
|
+
let n = e, r = n.error;
|
|
58
|
+
if (r instanceof Error) return r.message;
|
|
59
|
+
let i = n.errors;
|
|
60
|
+
if (!Array.isArray(i) || i.length === 0) return null;
|
|
61
|
+
let a = i.map((e) => {
|
|
62
62
|
if (e instanceof Error) return e.message;
|
|
63
63
|
if (!e || typeof e != "object") return null;
|
|
64
64
|
let t = e.message;
|
|
65
65
|
return typeof t == "string" ? t : null;
|
|
66
66
|
}).filter((e) => !!e);
|
|
67
|
-
return
|
|
67
|
+
return a.length > 0 ? a.join("; ") : t;
|
|
68
68
|
}
|
|
69
|
-
var
|
|
69
|
+
var v = [
|
|
70
70
|
{
|
|
71
71
|
productId: "vibecontrols",
|
|
72
72
|
moduleId: "dashboard",
|
|
@@ -467,6 +467,22 @@ var g = [
|
|
|
467
467
|
pageLabel: "Runs",
|
|
468
468
|
path: "/workflows/runs"
|
|
469
469
|
},
|
|
470
|
+
{
|
|
471
|
+
productId: "fluidgrids",
|
|
472
|
+
moduleId: "workflows",
|
|
473
|
+
moduleLabel: "Workflows",
|
|
474
|
+
pageId: "history",
|
|
475
|
+
pageLabel: "History",
|
|
476
|
+
path: "/workflows/history"
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
productId: "fluidgrids",
|
|
480
|
+
moduleId: "workflows",
|
|
481
|
+
moduleLabel: "Workflows",
|
|
482
|
+
pageId: "templates",
|
|
483
|
+
pageLabel: "Templates",
|
|
484
|
+
path: "/workflows/templates"
|
|
485
|
+
},
|
|
470
486
|
{
|
|
471
487
|
productId: "buildmyiq",
|
|
472
488
|
moduleId: "catalog",
|
|
@@ -647,39 +663,39 @@ var g = [
|
|
|
647
663
|
path: "/collabkin/timeline"
|
|
648
664
|
}
|
|
649
665
|
];
|
|
650
|
-
function
|
|
666
|
+
function y(e) {
|
|
651
667
|
return e?.trim() || void 0;
|
|
652
668
|
}
|
|
653
|
-
function
|
|
654
|
-
let t =
|
|
655
|
-
return t ?
|
|
669
|
+
function b(e) {
|
|
670
|
+
let t = y(e);
|
|
671
|
+
return t ? v.filter((e) => e.productId === t) : [];
|
|
656
672
|
}
|
|
657
|
-
function
|
|
673
|
+
function Se(e) {
|
|
658
674
|
let t = /* @__PURE__ */ new Map();
|
|
659
|
-
for (let n of
|
|
675
|
+
for (let n of b(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
|
|
660
676
|
moduleId: n.moduleId,
|
|
661
677
|
label: n.moduleLabel,
|
|
662
678
|
path: n.path
|
|
663
679
|
});
|
|
664
680
|
return [...t.values()];
|
|
665
681
|
}
|
|
666
|
-
function
|
|
667
|
-
let n =
|
|
668
|
-
return n ?
|
|
682
|
+
function Ce(e, t) {
|
|
683
|
+
let n = y(t);
|
|
684
|
+
return n ? b(e).flatMap((e) => e.moduleId === n ? [{
|
|
669
685
|
pageId: e.pageId,
|
|
670
686
|
label: e.pageLabel,
|
|
671
687
|
path: e.path
|
|
672
688
|
}] : []) : [];
|
|
673
689
|
}
|
|
674
|
-
function
|
|
675
|
-
let { tr:
|
|
690
|
+
function x() {
|
|
691
|
+
let { tr: _ } = e(), { tourId: v } = le(), y = ce(), b = t(), { basePath: x = "/" } = b, S = _e(), C = ge("global"), { hasPermission: w, isLoading: T } = i(), E = !v || v === "new", D = w(a.TOUR_CREATE), O = w(a.TOUR_UPDATE), we = w(a.TOUR_TEMPLATE_CREATE), k = E ? D : O, A = D && O, j = D && O, { tour: M, loadTour: N, createTour: Te, updateTour: Ee, saving: De, validationErrors: Oe, error: ke } = te(v), { saveAsTemplate: Ae } = r(), { data: je, loading: P } = n({
|
|
676
692
|
variables: {
|
|
677
|
-
limit:
|
|
693
|
+
limit: ve,
|
|
678
694
|
offset: 0
|
|
679
695
|
},
|
|
680
696
|
fetchPolicy: "cache-and-network",
|
|
681
|
-
skip:
|
|
682
|
-
}), [F, I] =
|
|
697
|
+
skip: T || !k
|
|
698
|
+
}), [F, I] = l({
|
|
683
699
|
name: "",
|
|
684
700
|
description: "",
|
|
685
701
|
productId: "",
|
|
@@ -692,17 +708,17 @@ function y() {
|
|
|
692
708
|
displayOrder: 1,
|
|
693
709
|
startDate: "",
|
|
694
710
|
endDate: ""
|
|
695
|
-
}), [L, R] =
|
|
696
|
-
|
|
697
|
-
G.current || !
|
|
711
|
+
}), [L, R] = l(!1), [z, B] = l(!1), [V, H] = l(!1), [Me, Ne] = l(!1), [U, Pe] = l(null), [Fe, Ie] = l(null), [Le, Re] = l(!1), [W, ze] = l(null), [Be, Ve] = l(null), G = ne(!1), K = c(() => [...je?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [je]), q = c(() => new Set(K.map((e) => e.slug)), [K]), J = c(() => Se(F.productId), [F.productId]), Y = c(() => new Set(J.map((e) => e.moduleId)), [J]), X = c(() => Ce(F.productId, F.moduleId), [F.moduleId, F.productId]), Z = c(() => new Set(X.map((e) => e.pageId)), [X]);
|
|
712
|
+
s(() => {
|
|
713
|
+
G.current || !T && k && v && v !== "new" && N(v);
|
|
698
714
|
}, [
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
]),
|
|
704
|
-
|
|
705
|
-
}, [
|
|
715
|
+
k,
|
|
716
|
+
N,
|
|
717
|
+
T,
|
|
718
|
+
v
|
|
719
|
+
]), s(() => {
|
|
720
|
+
M && !G.current && (I(M), G.current = !0);
|
|
721
|
+
}, [M]), s(() => {
|
|
706
722
|
if (!F.productId || P) {
|
|
707
723
|
R(!1);
|
|
708
724
|
return;
|
|
@@ -713,7 +729,7 @@ function y() {
|
|
|
713
729
|
q,
|
|
714
730
|
K.length,
|
|
715
731
|
P
|
|
716
|
-
]),
|
|
732
|
+
]), s(() => {
|
|
717
733
|
if (!F.productId || !F.moduleId) {
|
|
718
734
|
B(!1);
|
|
719
735
|
return;
|
|
@@ -724,7 +740,7 @@ function y() {
|
|
|
724
740
|
F.productId,
|
|
725
741
|
Y,
|
|
726
742
|
J.length
|
|
727
|
-
]),
|
|
743
|
+
]), s(() => {
|
|
728
744
|
if (!F.productId || !F.pageId) {
|
|
729
745
|
H(!1);
|
|
730
746
|
return;
|
|
@@ -739,198 +755,198 @@ function y() {
|
|
|
739
755
|
let He = !!(F.productId && !L && !q.has(F.productId)), Ue = !!(F.moduleId && !z && !Y.has(F.moduleId)), We = !!(F.pageId && !V && !Z.has(F.pageId)), Ge = async (e) => {
|
|
740
756
|
e.preventDefault();
|
|
741
757
|
try {
|
|
742
|
-
|
|
758
|
+
v && v !== "new" ? await Ee(v, F) : await Te(F);
|
|
743
759
|
} catch {
|
|
744
|
-
|
|
760
|
+
o(S, "tour.save", b);
|
|
745
761
|
}
|
|
746
762
|
}, Q = () => {
|
|
747
|
-
|
|
763
|
+
y(`${x}/list`);
|
|
748
764
|
}, Ke = (e) => {
|
|
749
765
|
if (!e) return "";
|
|
750
766
|
let t = new Date(e);
|
|
751
767
|
return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
752
768
|
}, qe = async () => {
|
|
753
|
-
if (!
|
|
754
|
-
let e =
|
|
769
|
+
if (!v || v === "new") return;
|
|
770
|
+
let e = _("tourBuilder.templateDefaultName", "{{name}} Template", { name: F.name || M?.name || "Tour" }), t = window.prompt(_("tourBuilder.templateNamePrompt", "Template name"), e);
|
|
755
771
|
if (!t) return;
|
|
756
|
-
let n = window.prompt("Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)", "ONBOARDING") || "ONBOARDING";
|
|
772
|
+
let n = window.prompt(_("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
|
|
757
773
|
try {
|
|
758
|
-
await Ae(
|
|
774
|
+
await Ae(v, {
|
|
759
775
|
name: t,
|
|
760
776
|
description: F.description,
|
|
761
777
|
category: n,
|
|
762
778
|
isPublic: !1
|
|
763
|
-
}),
|
|
779
|
+
}), y(`${x}/templates`);
|
|
764
780
|
} catch {
|
|
765
|
-
|
|
781
|
+
o(S, "template.save", b);
|
|
766
782
|
}
|
|
767
783
|
}, Je = async () => {
|
|
768
|
-
if (window.confirm(
|
|
784
|
+
if (window.confirm(_("tourBuilder.seedVibeControls.confirm"))) {
|
|
769
785
|
Ne(!0), Pe(null), Ie(null);
|
|
770
786
|
try {
|
|
771
|
-
let e = await
|
|
787
|
+
let e = await C.mutate({ mutation: ye }), t = xe(e, _("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
772
788
|
if (t) throw Error(t);
|
|
773
789
|
let n = e.data?.seedVibeControlsUserTours;
|
|
774
|
-
if (!n) throw Error("Seed mutation returned no result.");
|
|
790
|
+
if (!n) throw Error(_("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
775
791
|
Pe(n);
|
|
776
792
|
} catch (e) {
|
|
777
|
-
let t = e instanceof Error ? e.message :
|
|
778
|
-
Ie(t),
|
|
793
|
+
let t = e instanceof Error ? e.message : _("tourBuilder.seedVibeControls.error");
|
|
794
|
+
Ie(t), S.emit("tours.api.failed", {
|
|
779
795
|
route: "/tours",
|
|
780
796
|
operation: "tour.seed_vibecontrols_user_tours",
|
|
781
797
|
errorMessage: t,
|
|
782
|
-
productId:
|
|
783
|
-
workspaceId:
|
|
798
|
+
productId: b.productId,
|
|
799
|
+
workspaceId: b.workspaceId
|
|
784
800
|
}, { component: "microfe-tours" });
|
|
785
801
|
} finally {
|
|
786
802
|
Ne(!1);
|
|
787
803
|
}
|
|
788
804
|
}
|
|
789
805
|
}, Ye = async () => {
|
|
790
|
-
if (window.confirm(
|
|
806
|
+
if (window.confirm(_("tourBuilder.seedBuildmyiq.confirm"))) {
|
|
791
807
|
Re(!0), ze(null), Ve(null);
|
|
792
808
|
try {
|
|
793
|
-
let e = await
|
|
809
|
+
let e = await C.mutate({ mutation: be }), t = xe(e, _("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
794
810
|
if (t) throw Error(t);
|
|
795
811
|
let n = e.data?.seedBuildmyiqUserTours;
|
|
796
|
-
if (!n) throw Error("Seed mutation returned no result.");
|
|
812
|
+
if (!n) throw Error(_("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
797
813
|
ze(n);
|
|
798
814
|
} catch (e) {
|
|
799
|
-
let t = e instanceof Error ? e.message :
|
|
800
|
-
Ve(t),
|
|
815
|
+
let t = e instanceof Error ? e.message : _("tourBuilder.seedBuildmyiq.error");
|
|
816
|
+
Ve(t), S.emit("tours.api.failed", {
|
|
801
817
|
route: "/tours",
|
|
802
818
|
operation: "tour.seed_buildmyiq_user_tours",
|
|
803
819
|
errorMessage: t,
|
|
804
|
-
productId:
|
|
805
|
-
workspaceId:
|
|
820
|
+
productId: b.productId,
|
|
821
|
+
workspaceId: b.workspaceId
|
|
806
822
|
}, { component: "microfe-tours" });
|
|
807
823
|
} finally {
|
|
808
824
|
Re(!1);
|
|
809
825
|
}
|
|
810
826
|
}
|
|
811
|
-
}, Xe =
|
|
827
|
+
}, Xe = v && v !== "new" ? [
|
|
812
828
|
{
|
|
813
|
-
label:
|
|
814
|
-
onSelect: () =>
|
|
815
|
-
icon: /* @__PURE__ */ p
|
|
829
|
+
label: M?.steps && M.steps.length > 0 ? `${_("tourBuilder.editSteps")} (${M.steps.length})` : _("tourBuilder.editSteps"),
|
|
830
|
+
onSelect: () => y(`${x}/${v}/steps`),
|
|
831
|
+
icon: /* @__PURE__ */ h(p, { size: 16 })
|
|
816
832
|
},
|
|
817
833
|
{
|
|
818
|
-
label:
|
|
819
|
-
onSelect: () =>
|
|
820
|
-
icon: /* @__PURE__ */
|
|
834
|
+
label: _("tourBuilder.preview"),
|
|
835
|
+
onSelect: () => y(`${x}/${v}/preview`),
|
|
836
|
+
icon: /* @__PURE__ */ h(f, { size: 16 })
|
|
821
837
|
},
|
|
822
838
|
{
|
|
823
|
-
label:
|
|
824
|
-
onSelect: () =>
|
|
825
|
-
icon: /* @__PURE__ */
|
|
839
|
+
label: _("tourBuilder.analytics"),
|
|
840
|
+
onSelect: () => y(`${x}/${v}/analytics`),
|
|
841
|
+
icon: /* @__PURE__ */ h(u, { size: 16 })
|
|
826
842
|
},
|
|
827
843
|
{
|
|
828
|
-
label: "Schedule",
|
|
829
|
-
onSelect: () =>
|
|
830
|
-
icon: /* @__PURE__ */
|
|
844
|
+
label: _("tourBuilder.schedule", "Schedule"),
|
|
845
|
+
onSelect: () => y(`${x}/${v}/schedule`),
|
|
846
|
+
icon: /* @__PURE__ */ h(d, { size: 16 })
|
|
831
847
|
},
|
|
832
|
-
...
|
|
833
|
-
label: "Save as Template",
|
|
848
|
+
...we ? [{
|
|
849
|
+
label: _("tourBuilder.saveAsTemplate", "Save as Template"),
|
|
834
850
|
onSelect: () => void qe(),
|
|
835
|
-
icon: /* @__PURE__ */
|
|
851
|
+
icon: /* @__PURE__ */ h(ae, { size: 16 })
|
|
836
852
|
}] : []
|
|
837
|
-
] : [], $ =
|
|
853
|
+
] : [], $ = v && v !== "new" && O ? [
|
|
838
854
|
{
|
|
839
855
|
id: "edit-steps",
|
|
840
|
-
label:
|
|
841
|
-
description:
|
|
842
|
-
icon: /* @__PURE__ */ p
|
|
843
|
-
onClick: () =>
|
|
856
|
+
label: _("tourBuilder.nextStepEditSteps"),
|
|
857
|
+
description: _("tourBuilder.nextStepEditStepsDesc"),
|
|
858
|
+
icon: /* @__PURE__ */ h(p, { size: 16 }),
|
|
859
|
+
onClick: () => y(`${x}/${v}/steps`)
|
|
844
860
|
},
|
|
845
861
|
{
|
|
846
862
|
id: "preview",
|
|
847
|
-
label:
|
|
848
|
-
description:
|
|
849
|
-
icon: /* @__PURE__ */
|
|
850
|
-
onClick: () =>
|
|
863
|
+
label: _("tourBuilder.nextStepPreview"),
|
|
864
|
+
description: _("tourBuilder.nextStepPreviewDesc"),
|
|
865
|
+
icon: /* @__PURE__ */ h(f, { size: 16 }),
|
|
866
|
+
onClick: () => y(`${x}/${v}/preview`)
|
|
851
867
|
},
|
|
852
868
|
{
|
|
853
869
|
id: "schedule",
|
|
854
|
-
label:
|
|
855
|
-
description:
|
|
856
|
-
icon: /* @__PURE__ */
|
|
857
|
-
onClick: () =>
|
|
870
|
+
label: _("tourBuilder.nextStepSchedule"),
|
|
871
|
+
description: _("tourBuilder.nextStepScheduleDesc"),
|
|
872
|
+
icon: /* @__PURE__ */ h(d, { size: 16 }),
|
|
873
|
+
onClick: () => y(`${x}/${v}/schedule`)
|
|
858
874
|
},
|
|
859
875
|
{
|
|
860
876
|
id: "analytics",
|
|
861
|
-
label:
|
|
862
|
-
description:
|
|
863
|
-
icon: /* @__PURE__ */
|
|
864
|
-
onClick: () =>
|
|
877
|
+
label: _("tourBuilder.nextStepAnalytics"),
|
|
878
|
+
description: _("tourBuilder.nextStepAnalyticsDesc"),
|
|
879
|
+
icon: /* @__PURE__ */ h(u, { size: 16 }),
|
|
880
|
+
onClick: () => y(`${x}/${v}/analytics`)
|
|
865
881
|
}
|
|
866
882
|
] : [];
|
|
867
|
-
return
|
|
883
|
+
return T ? /* @__PURE__ */ h("div", {
|
|
868
884
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
869
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ h("p", {
|
|
870
886
|
className: "text-sm text-text-secondary",
|
|
871
|
-
children:
|
|
887
|
+
children: _("tourBuilder.loading")
|
|
872
888
|
})
|
|
873
|
-
}) :
|
|
889
|
+
}) : k ? /* @__PURE__ */ g("div", {
|
|
874
890
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
|
|
875
891
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ g("div", {
|
|
877
893
|
className: "flex items-center gap-4",
|
|
878
|
-
children: [/* @__PURE__ */
|
|
894
|
+
children: [/* @__PURE__ */ h("button", {
|
|
879
895
|
type: "button",
|
|
880
896
|
onClick: Q,
|
|
881
897
|
className: "p-2 hover:bg-accent rounded-md",
|
|
882
|
-
"aria-label":
|
|
883
|
-
children: /* @__PURE__ */
|
|
884
|
-
}), /* @__PURE__ */
|
|
898
|
+
"aria-label": _("tourBuilder.goBack"),
|
|
899
|
+
children: /* @__PURE__ */ h(ie, { size: 20 })
|
|
900
|
+
}), /* @__PURE__ */ g("div", {
|
|
885
901
|
className: "flex-1",
|
|
886
|
-
children: [/* @__PURE__ */
|
|
902
|
+
children: [/* @__PURE__ */ h("h1", {
|
|
887
903
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
888
|
-
children:
|
|
889
|
-
}), /* @__PURE__ */
|
|
904
|
+
children: _(v && v !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
|
|
905
|
+
}), /* @__PURE__ */ h("p", {
|
|
890
906
|
className: "text-sm text-text-secondary",
|
|
891
|
-
children:
|
|
907
|
+
children: _("tourBuilder.subtitle")
|
|
892
908
|
})]
|
|
893
909
|
})]
|
|
894
910
|
}),
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
$.length > 0 ? /* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ h(he, { children: _("tourBuilder.purpose") }),
|
|
912
|
+
$.length > 0 ? /* @__PURE__ */ h(me, {
|
|
897
913
|
storageKey: "tours-builder",
|
|
898
|
-
title:
|
|
914
|
+
title: _("tourBuilder.nextStepsTitle"),
|
|
899
915
|
steps: $
|
|
900
916
|
}) : null,
|
|
901
|
-
|
|
917
|
+
E ? /* @__PURE__ */ g(se, { children: [/* @__PURE__ */ g(fe, {
|
|
902
918
|
className: "p-4 sm:p-6",
|
|
903
919
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ g("div", {
|
|
905
921
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
906
|
-
children: [/* @__PURE__ */
|
|
922
|
+
children: [/* @__PURE__ */ g("div", {
|
|
907
923
|
className: "space-y-1",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
924
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
909
925
|
className: "text-lg font-semibold text-text-primary",
|
|
910
|
-
children:
|
|
911
|
-
}), /* @__PURE__ */
|
|
926
|
+
children: _("tourBuilder.seedVibeControls.title")
|
|
927
|
+
}), /* @__PURE__ */ h("p", {
|
|
912
928
|
className: "text-sm text-text-secondary",
|
|
913
|
-
children:
|
|
929
|
+
children: _("tourBuilder.seedVibeControls.description")
|
|
914
930
|
})]
|
|
915
|
-
}), /* @__PURE__ */
|
|
931
|
+
}), /* @__PURE__ */ g("button", {
|
|
916
932
|
type: "button",
|
|
917
933
|
onClick: () => void Je(),
|
|
918
|
-
disabled: Me || !
|
|
934
|
+
disabled: Me || !A,
|
|
919
935
|
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",
|
|
920
|
-
children: [/* @__PURE__ */
|
|
936
|
+
children: [/* @__PURE__ */ h(m, { size: 18 }), _(Me ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
|
|
921
937
|
})]
|
|
922
938
|
}),
|
|
923
|
-
|
|
939
|
+
A ? null : /* @__PURE__ */ h("p", {
|
|
924
940
|
className: "mt-3 text-sm text-text-secondary",
|
|
925
|
-
children:
|
|
941
|
+
children: _("tourBuilder.seedVibeControls.permissionHint")
|
|
926
942
|
}),
|
|
927
|
-
Fe ? /* @__PURE__ */
|
|
943
|
+
Fe ? /* @__PURE__ */ h("p", {
|
|
928
944
|
className: "mt-3 text-sm text-status-error-text",
|
|
929
945
|
children: Fe
|
|
930
946
|
}) : null,
|
|
931
|
-
U ? /* @__PURE__ */
|
|
947
|
+
U ? /* @__PURE__ */ h("div", {
|
|
932
948
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
933
|
-
children:
|
|
949
|
+
children: _("tourBuilder.seedVibeControls.result", {
|
|
934
950
|
totalCount: U.totalCount,
|
|
935
951
|
productId: U.productId,
|
|
936
952
|
workspaceId: U.workspaceId,
|
|
@@ -939,39 +955,39 @@ function y() {
|
|
|
939
955
|
})
|
|
940
956
|
}) : null
|
|
941
957
|
]
|
|
942
|
-
}), /* @__PURE__ */
|
|
958
|
+
}), /* @__PURE__ */ g(fe, {
|
|
943
959
|
className: "p-4 sm:p-6",
|
|
944
960
|
children: [
|
|
945
|
-
/* @__PURE__ */
|
|
961
|
+
/* @__PURE__ */ g("div", {
|
|
946
962
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
947
|
-
children: [/* @__PURE__ */
|
|
963
|
+
children: [/* @__PURE__ */ g("div", {
|
|
948
964
|
className: "space-y-1",
|
|
949
|
-
children: [/* @__PURE__ */
|
|
965
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
950
966
|
className: "text-lg font-semibold text-text-primary",
|
|
951
|
-
children:
|
|
952
|
-
}), /* @__PURE__ */
|
|
967
|
+
children: _("tourBuilder.seedBuildmyiq.title")
|
|
968
|
+
}), /* @__PURE__ */ h("p", {
|
|
953
969
|
className: "text-sm text-text-secondary",
|
|
954
|
-
children:
|
|
970
|
+
children: _("tourBuilder.seedBuildmyiq.description")
|
|
955
971
|
})]
|
|
956
|
-
}), /* @__PURE__ */
|
|
972
|
+
}), /* @__PURE__ */ g("button", {
|
|
957
973
|
type: "button",
|
|
958
974
|
onClick: () => void Ye(),
|
|
959
|
-
disabled: Le || !
|
|
975
|
+
disabled: Le || !j,
|
|
960
976
|
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",
|
|
961
|
-
children: [/* @__PURE__ */
|
|
977
|
+
children: [/* @__PURE__ */ h(m, { size: 18 }), _(Le ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
|
|
962
978
|
})]
|
|
963
979
|
}),
|
|
964
|
-
|
|
980
|
+
j ? null : /* @__PURE__ */ h("p", {
|
|
965
981
|
className: "mt-3 text-sm text-text-secondary",
|
|
966
|
-
children:
|
|
982
|
+
children: _("tourBuilder.seedBuildmyiq.permissionHint")
|
|
967
983
|
}),
|
|
968
|
-
Be ? /* @__PURE__ */
|
|
984
|
+
Be ? /* @__PURE__ */ h("p", {
|
|
969
985
|
className: "mt-3 text-sm text-status-error-text",
|
|
970
986
|
children: Be
|
|
971
987
|
}) : null,
|
|
972
|
-
W ? /* @__PURE__ */
|
|
988
|
+
W ? /* @__PURE__ */ h("div", {
|
|
973
989
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
974
|
-
children:
|
|
990
|
+
children: _("tourBuilder.seedBuildmyiq.result", {
|
|
975
991
|
totalCount: W.totalCount,
|
|
976
992
|
productId: W.productId,
|
|
977
993
|
workspaceId: W.workspaceId,
|
|
@@ -981,24 +997,24 @@ function y() {
|
|
|
981
997
|
}) : null
|
|
982
998
|
]
|
|
983
999
|
})] }) : null,
|
|
984
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ g("form", {
|
|
985
1001
|
onSubmit: Ge,
|
|
986
1002
|
className: "space-y-6",
|
|
987
1003
|
children: [
|
|
988
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ g(pe, {
|
|
989
1005
|
treatment: "plain",
|
|
990
1006
|
className: "p-4 sm:p-6 border-border-seam",
|
|
991
|
-
children: [/* @__PURE__ */
|
|
1007
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
992
1008
|
className: "text-lg font-semibold mb-4",
|
|
993
|
-
children:
|
|
994
|
-
}), /* @__PURE__ */
|
|
1009
|
+
children: _("tourBuilder.sectionBasicInfo")
|
|
1010
|
+
}), /* @__PURE__ */ g("div", {
|
|
995
1011
|
className: "space-y-4",
|
|
996
1012
|
children: [
|
|
997
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
998
1014
|
className: "block text-sm font-medium mb-2",
|
|
999
1015
|
htmlFor: "tour-name",
|
|
1000
|
-
children:
|
|
1001
|
-
}), /* @__PURE__ */
|
|
1016
|
+
children: _("tourBuilder.labelName")
|
|
1017
|
+
}), /* @__PURE__ */ h("input", {
|
|
1002
1018
|
id: "tour-name",
|
|
1003
1019
|
type: "text",
|
|
1004
1020
|
value: F.name || "",
|
|
@@ -1008,26 +1024,26 @@ function y() {
|
|
|
1008
1024
|
}),
|
|
1009
1025
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1010
1026
|
required: !0,
|
|
1011
|
-
"aria-label":
|
|
1027
|
+
"aria-label": _("tourBuilder.labelName")
|
|
1012
1028
|
})] }),
|
|
1013
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ h(ee, {
|
|
1014
1030
|
id: "tour-description",
|
|
1015
|
-
label:
|
|
1031
|
+
label: _("tourBuilder.labelDescription"),
|
|
1016
1032
|
value: F.description || "",
|
|
1017
1033
|
onChange: (e) => I({
|
|
1018
1034
|
...F,
|
|
1019
1035
|
description: e
|
|
1020
1036
|
}),
|
|
1021
1037
|
rows: 4,
|
|
1022
|
-
"aria-label":
|
|
1038
|
+
"aria-label": _("tourBuilder.labelDescription")
|
|
1023
1039
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1040
|
+
/* @__PURE__ */ g("div", { children: [
|
|
1041
|
+
/* @__PURE__ */ h("label", {
|
|
1026
1042
|
className: "block text-sm font-medium mb-2",
|
|
1027
1043
|
htmlFor: "product-id",
|
|
1028
|
-
children:
|
|
1044
|
+
children: _("tourBuilder.labelProductId")
|
|
1029
1045
|
}),
|
|
1030
|
-
/* @__PURE__ */
|
|
1046
|
+
/* @__PURE__ */ g("select", {
|
|
1031
1047
|
id: "product-id",
|
|
1032
1048
|
value: L ? "__custom__" : F.productId || "",
|
|
1033
1049
|
onChange: (e) => {
|
|
@@ -1049,17 +1065,17 @@ function y() {
|
|
|
1049
1065
|
},
|
|
1050
1066
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1051
1067
|
required: !0,
|
|
1052
|
-
"aria-label":
|
|
1068
|
+
"aria-label": _("tourBuilder.labelProductId"),
|
|
1053
1069
|
children: [
|
|
1054
|
-
/* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ h("option", {
|
|
1055
1071
|
value: "",
|
|
1056
|
-
children: "Select product"
|
|
1072
|
+
children: _("tourBuilder.selectProduct", "Select product")
|
|
1057
1073
|
}),
|
|
1058
|
-
P ? /* @__PURE__ */
|
|
1074
|
+
P ? /* @__PURE__ */ h("option", {
|
|
1059
1075
|
disabled: !0,
|
|
1060
|
-
children: "Loading products…"
|
|
1076
|
+
children: _("tourBuilder.loadingProducts", "Loading products…")
|
|
1061
1077
|
}) : null,
|
|
1062
|
-
K.map((e) => /* @__PURE__ */
|
|
1078
|
+
K.map((e) => /* @__PURE__ */ g("option", {
|
|
1063
1079
|
value: e.slug,
|
|
1064
1080
|
children: [
|
|
1065
1081
|
e.name,
|
|
@@ -1068,19 +1084,19 @@ function y() {
|
|
|
1068
1084
|
")"
|
|
1069
1085
|
]
|
|
1070
1086
|
}, e.id)),
|
|
1071
|
-
He ? /* @__PURE__ */
|
|
1087
|
+
He ? /* @__PURE__ */ h("option", {
|
|
1072
1088
|
value: F.productId,
|
|
1073
|
-
children:
|
|
1089
|
+
children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.productId ?? "" })
|
|
1074
1090
|
}) : null,
|
|
1075
|
-
/* @__PURE__ */
|
|
1091
|
+
/* @__PURE__ */ h("option", {
|
|
1076
1092
|
value: "__custom__",
|
|
1077
|
-
children: "Custom product slug"
|
|
1093
|
+
children: _("tourBuilder.customProductSlug", "Custom product slug")
|
|
1078
1094
|
})
|
|
1079
1095
|
]
|
|
1080
1096
|
}),
|
|
1081
|
-
L ? /* @__PURE__ */
|
|
1097
|
+
L ? /* @__PURE__ */ h("input", {
|
|
1082
1098
|
id: "product-id-custom",
|
|
1083
|
-
"aria-label": "Custom product slug",
|
|
1099
|
+
"aria-label": _("tourBuilder.customProductSlug", "Custom product slug"),
|
|
1084
1100
|
type: "text",
|
|
1085
1101
|
value: F.productId || "",
|
|
1086
1102
|
onChange: (e) => I({
|
|
@@ -1090,19 +1106,19 @@ function y() {
|
|
|
1090
1106
|
pageId: void 0
|
|
1091
1107
|
}),
|
|
1092
1108
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1093
|
-
placeholder: "vibecontrols",
|
|
1109
|
+
placeholder: _("tourBuilder.productSlugPlaceholder", "vibecontrols"),
|
|
1094
1110
|
required: !0
|
|
1095
1111
|
}) : null
|
|
1096
1112
|
] }),
|
|
1097
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ g("div", {
|
|
1098
1114
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1099
|
-
children: [/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1115
|
+
children: [/* @__PURE__ */ g("div", { children: [
|
|
1116
|
+
/* @__PURE__ */ h("label", {
|
|
1101
1117
|
className: "block text-sm font-medium mb-2",
|
|
1102
1118
|
htmlFor: "module-id",
|
|
1103
|
-
children: "Module ID"
|
|
1119
|
+
children: _("tourBuilder.labelModuleId", "Module ID")
|
|
1104
1120
|
}),
|
|
1105
|
-
/* @__PURE__ */
|
|
1121
|
+
/* @__PURE__ */ g("select", {
|
|
1106
1122
|
id: "module-id",
|
|
1107
1123
|
value: z ? "__custom__" : F.moduleId || "",
|
|
1108
1124
|
onChange: (e) => {
|
|
@@ -1122,13 +1138,13 @@ function y() {
|
|
|
1122
1138
|
},
|
|
1123
1139
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1124
1140
|
disabled: !F.productId,
|
|
1125
|
-
"aria-label": "Module ID",
|
|
1141
|
+
"aria-label": _("tourBuilder.labelModuleId", "Module ID"),
|
|
1126
1142
|
children: [
|
|
1127
|
-
/* @__PURE__ */
|
|
1143
|
+
/* @__PURE__ */ h("option", {
|
|
1128
1144
|
value: "",
|
|
1129
|
-
children: "All modules"
|
|
1145
|
+
children: _("tourBuilder.allModules", "All modules")
|
|
1130
1146
|
}),
|
|
1131
|
-
J.map((e) => /* @__PURE__ */
|
|
1147
|
+
J.map((e) => /* @__PURE__ */ g("option", {
|
|
1132
1148
|
value: e.moduleId,
|
|
1133
1149
|
children: [
|
|
1134
1150
|
e.label,
|
|
@@ -1137,19 +1153,19 @@ function y() {
|
|
|
1137
1153
|
")"
|
|
1138
1154
|
]
|
|
1139
1155
|
}, e.moduleId)),
|
|
1140
|
-
Ue ? /* @__PURE__ */
|
|
1156
|
+
Ue ? /* @__PURE__ */ h("option", {
|
|
1141
1157
|
value: F.moduleId,
|
|
1142
|
-
children:
|
|
1158
|
+
children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.moduleId ?? "" })
|
|
1143
1159
|
}) : null,
|
|
1144
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ h("option", {
|
|
1145
1161
|
value: "__custom__",
|
|
1146
|
-
children: "Custom module ID"
|
|
1162
|
+
children: _("tourBuilder.customModuleId", "Custom module ID")
|
|
1147
1163
|
})
|
|
1148
1164
|
]
|
|
1149
1165
|
}),
|
|
1150
|
-
z ? /* @__PURE__ */
|
|
1166
|
+
z ? /* @__PURE__ */ h("input", {
|
|
1151
1167
|
id: "module-id-custom",
|
|
1152
|
-
"aria-label": "Custom module ID",
|
|
1168
|
+
"aria-label": _("tourBuilder.customModuleId", "Custom module ID"),
|
|
1153
1169
|
type: "text",
|
|
1154
1170
|
value: F.moduleId || "",
|
|
1155
1171
|
onChange: (e) => I({
|
|
@@ -1158,15 +1174,15 @@ function y() {
|
|
|
1158
1174
|
pageId: void 0
|
|
1159
1175
|
}),
|
|
1160
1176
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1161
|
-
placeholder: "vibecontrols"
|
|
1177
|
+
placeholder: _("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
|
|
1162
1178
|
}) : null
|
|
1163
|
-
] }), /* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1179
|
+
] }), /* @__PURE__ */ g("div", { children: [
|
|
1180
|
+
/* @__PURE__ */ h("label", {
|
|
1165
1181
|
className: "block text-sm font-medium mb-2",
|
|
1166
1182
|
htmlFor: "page-id",
|
|
1167
|
-
children: "Page ID"
|
|
1183
|
+
children: _("tourBuilder.labelPageId", "Page ID")
|
|
1168
1184
|
}),
|
|
1169
|
-
/* @__PURE__ */
|
|
1185
|
+
/* @__PURE__ */ g("select", {
|
|
1170
1186
|
id: "page-id",
|
|
1171
1187
|
value: V ? "__custom__" : F.pageId || "",
|
|
1172
1188
|
onChange: (e) => {
|
|
@@ -1184,13 +1200,13 @@ function y() {
|
|
|
1184
1200
|
},
|
|
1185
1201
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1186
1202
|
disabled: !F.productId,
|
|
1187
|
-
"aria-label": "Page ID",
|
|
1203
|
+
"aria-label": _("tourBuilder.labelPageId", "Page ID"),
|
|
1188
1204
|
children: [
|
|
1189
|
-
/* @__PURE__ */
|
|
1205
|
+
/* @__PURE__ */ h("option", {
|
|
1190
1206
|
value: "",
|
|
1191
|
-
children: "All pages"
|
|
1207
|
+
children: _("tourBuilder.allPages", "All pages")
|
|
1192
1208
|
}),
|
|
1193
|
-
X.map((e) => /* @__PURE__ */
|
|
1209
|
+
X.map((e) => /* @__PURE__ */ g("option", {
|
|
1194
1210
|
value: e.pageId,
|
|
1195
1211
|
children: [
|
|
1196
1212
|
e.label,
|
|
@@ -1199,19 +1215,19 @@ function y() {
|
|
|
1199
1215
|
")"
|
|
1200
1216
|
]
|
|
1201
1217
|
}, e.pageId)),
|
|
1202
|
-
We ? /* @__PURE__ */
|
|
1218
|
+
We ? /* @__PURE__ */ h("option", {
|
|
1203
1219
|
value: F.pageId,
|
|
1204
|
-
children:
|
|
1220
|
+
children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.pageId ?? "" })
|
|
1205
1221
|
}) : null,
|
|
1206
|
-
/* @__PURE__ */
|
|
1222
|
+
/* @__PURE__ */ h("option", {
|
|
1207
1223
|
value: "__custom__",
|
|
1208
|
-
children: "Custom page ID"
|
|
1224
|
+
children: _("tourBuilder.customPageId", "Custom page ID")
|
|
1209
1225
|
})
|
|
1210
1226
|
]
|
|
1211
1227
|
}),
|
|
1212
|
-
V ? /* @__PURE__ */
|
|
1228
|
+
V ? /* @__PURE__ */ h("input", {
|
|
1213
1229
|
id: "page-id-custom",
|
|
1214
|
-
"aria-label": "Custom page ID",
|
|
1230
|
+
"aria-label": _("tourBuilder.customPageId", "Custom page ID"),
|
|
1215
1231
|
type: "text",
|
|
1216
1232
|
value: F.pageId || "",
|
|
1217
1233
|
onChange: (e) => I({
|
|
@@ -1219,13 +1235,13 @@ function y() {
|
|
|
1219
1235
|
pageId: e.target.value || void 0
|
|
1220
1236
|
}),
|
|
1221
1237
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1222
|
-
placeholder: "agents"
|
|
1238
|
+
placeholder: _("tourBuilder.pageSlugPlaceholder", "agents")
|
|
1223
1239
|
}) : null
|
|
1224
1240
|
] })]
|
|
1225
1241
|
}),
|
|
1226
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ g("label", {
|
|
1227
1243
|
className: "flex items-center gap-3 cursor-pointer",
|
|
1228
|
-
children: [/* @__PURE__ */
|
|
1244
|
+
children: [/* @__PURE__ */ h("input", {
|
|
1229
1245
|
type: "checkbox",
|
|
1230
1246
|
checked: F.isActive ?? !0,
|
|
1231
1247
|
onChange: (e) => I({
|
|
@@ -1233,29 +1249,29 @@ function y() {
|
|
|
1233
1249
|
isActive: e.target.checked
|
|
1234
1250
|
}),
|
|
1235
1251
|
className: "size-4 rounded",
|
|
1236
|
-
"aria-label": "Active"
|
|
1237
|
-
}), /* @__PURE__ */
|
|
1252
|
+
"aria-label": _("tourBuilder.labelActive", "Active")
|
|
1253
|
+
}), /* @__PURE__ */ h("span", {
|
|
1238
1254
|
className: "text-sm font-medium",
|
|
1239
|
-
children: "Active"
|
|
1255
|
+
children: _("tourBuilder.labelActive", "Active")
|
|
1240
1256
|
})]
|
|
1241
1257
|
})
|
|
1242
1258
|
]
|
|
1243
1259
|
})]
|
|
1244
1260
|
}),
|
|
1245
|
-
/* @__PURE__ */
|
|
1261
|
+
/* @__PURE__ */ g(pe, {
|
|
1246
1262
|
treatment: "plain",
|
|
1247
1263
|
className: "p-4 sm:p-6 border-border-seam",
|
|
1248
|
-
children: [/* @__PURE__ */
|
|
1264
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
1249
1265
|
className: "text-lg font-semibold mb-4",
|
|
1250
|
-
children:
|
|
1251
|
-
}), /* @__PURE__ */
|
|
1266
|
+
children: _("tourBuilder.sectionTriggerSettings")
|
|
1267
|
+
}), /* @__PURE__ */ g("div", {
|
|
1252
1268
|
className: "space-y-4",
|
|
1253
1269
|
children: [
|
|
1254
|
-
/* @__PURE__ */
|
|
1270
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1255
1271
|
className: "block text-sm font-medium mb-2",
|
|
1256
1272
|
htmlFor: "trigger-type",
|
|
1257
|
-
children:
|
|
1258
|
-
}), /* @__PURE__ */
|
|
1273
|
+
children: _("tourBuilder.labelTriggerType")
|
|
1274
|
+
}), /* @__PURE__ */ g("select", {
|
|
1259
1275
|
id: "trigger-type",
|
|
1260
1276
|
value: F.triggerType || "MANUAL",
|
|
1261
1277
|
onChange: (e) => I({
|
|
@@ -1263,35 +1279,35 @@ function y() {
|
|
|
1263
1279
|
triggerType: e.target.value
|
|
1264
1280
|
}),
|
|
1265
1281
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1266
|
-
"aria-label":
|
|
1282
|
+
"aria-label": _("tourBuilder.labelTriggerType"),
|
|
1267
1283
|
children: [
|
|
1268
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ h("option", {
|
|
1269
1285
|
value: "MANUAL",
|
|
1270
|
-
children:
|
|
1286
|
+
children: _("tourBuilder.triggerManual")
|
|
1271
1287
|
}),
|
|
1272
|
-
/* @__PURE__ */
|
|
1288
|
+
/* @__PURE__ */ h("option", {
|
|
1273
1289
|
value: "AUTO_FIRST_VISIT",
|
|
1274
|
-
children:
|
|
1290
|
+
children: _("tourBuilder.triggerAutoFirstVisit")
|
|
1275
1291
|
}),
|
|
1276
|
-
/* @__PURE__ */
|
|
1292
|
+
/* @__PURE__ */ h("option", {
|
|
1277
1293
|
value: "AUTO_ALWAYS",
|
|
1278
|
-
children:
|
|
1294
|
+
children: _("tourBuilder.triggerAutoAlways")
|
|
1279
1295
|
}),
|
|
1280
|
-
/* @__PURE__ */
|
|
1296
|
+
/* @__PURE__ */ h("option", {
|
|
1281
1297
|
value: "ON_EVENT",
|
|
1282
|
-
children:
|
|
1298
|
+
children: _("tourBuilder.triggerOnEvent")
|
|
1283
1299
|
}),
|
|
1284
|
-
/* @__PURE__ */
|
|
1300
|
+
/* @__PURE__ */ h("option", {
|
|
1285
1301
|
value: "SCHEDULED",
|
|
1286
|
-
children:
|
|
1302
|
+
children: _("tourBuilder.triggerScheduled")
|
|
1287
1303
|
})
|
|
1288
1304
|
]
|
|
1289
1305
|
})] }),
|
|
1290
|
-
/* @__PURE__ */
|
|
1306
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1291
1307
|
className: "block text-sm font-medium mb-2",
|
|
1292
1308
|
htmlFor: "priority",
|
|
1293
|
-
children:
|
|
1294
|
-
}), /* @__PURE__ */
|
|
1309
|
+
children: _("tourBuilder.labelPriority")
|
|
1310
|
+
}), /* @__PURE__ */ h("input", {
|
|
1295
1311
|
id: "priority",
|
|
1296
1312
|
type: "number",
|
|
1297
1313
|
min: "1",
|
|
@@ -1305,15 +1321,15 @@ function y() {
|
|
|
1305
1321
|
});
|
|
1306
1322
|
},
|
|
1307
1323
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1308
|
-
"aria-label":
|
|
1324
|
+
"aria-label": _("tourBuilder.labelPriority")
|
|
1309
1325
|
})] }),
|
|
1310
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ g("div", {
|
|
1311
1327
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1312
|
-
children: [/* @__PURE__ */
|
|
1328
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1313
1329
|
className: "block text-sm font-medium mb-2",
|
|
1314
1330
|
htmlFor: "tour-start-date",
|
|
1315
|
-
children: "Start Date"
|
|
1316
|
-
}), /* @__PURE__ */
|
|
1331
|
+
children: _("tourBuilder.labelStartDate", "Start Date")
|
|
1332
|
+
}), /* @__PURE__ */ h("input", {
|
|
1317
1333
|
id: "tour-start-date",
|
|
1318
1334
|
type: "datetime-local",
|
|
1319
1335
|
value: Ke(F.startDate),
|
|
@@ -1322,12 +1338,12 @@ function y() {
|
|
|
1322
1338
|
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1323
1339
|
}),
|
|
1324
1340
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1325
|
-
"aria-label": "Start Date"
|
|
1326
|
-
})] }), /* @__PURE__ */
|
|
1341
|
+
"aria-label": _("tourBuilder.labelStartDate", "Start Date")
|
|
1342
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1327
1343
|
className: "block text-sm font-medium mb-2",
|
|
1328
1344
|
htmlFor: "tour-end-date",
|
|
1329
|
-
children: "End Date"
|
|
1330
|
-
}), /* @__PURE__ */
|
|
1345
|
+
children: _("tourBuilder.labelEndDate", "End Date")
|
|
1346
|
+
}), /* @__PURE__ */ h("input", {
|
|
1331
1347
|
id: "tour-end-date",
|
|
1332
1348
|
type: "datetime-local",
|
|
1333
1349
|
value: Ke(F.endDate),
|
|
@@ -1336,70 +1352,70 @@ function y() {
|
|
|
1336
1352
|
endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1337
1353
|
}),
|
|
1338
1354
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1339
|
-
"aria-label": "End Date"
|
|
1355
|
+
"aria-label": _("tourBuilder.labelEndDate", "End Date")
|
|
1340
1356
|
})] })]
|
|
1341
1357
|
})
|
|
1342
1358
|
]
|
|
1343
1359
|
})]
|
|
1344
1360
|
}),
|
|
1345
|
-
ke && /* @__PURE__ */
|
|
1361
|
+
ke && /* @__PURE__ */ g("div", {
|
|
1346
1362
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1347
|
-
children: [/* @__PURE__ */
|
|
1363
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
1348
1364
|
className: "font-semibold text-status-error-text mb-2",
|
|
1349
|
-
children:
|
|
1350
|
-
}), /* @__PURE__ */
|
|
1365
|
+
children: _("tourBuilder.errorTitle")
|
|
1366
|
+
}), /* @__PURE__ */ h("p", {
|
|
1351
1367
|
className: "text-sm text-status-error-text",
|
|
1352
1368
|
children: ke.message
|
|
1353
1369
|
})]
|
|
1354
1370
|
}),
|
|
1355
|
-
|
|
1371
|
+
Oe.length > 0 && /* @__PURE__ */ g("div", {
|
|
1356
1372
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1357
|
-
children: [/* @__PURE__ */
|
|
1373
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
1358
1374
|
className: "font-semibold text-status-error-text mb-2",
|
|
1359
|
-
children:
|
|
1360
|
-
}), /* @__PURE__ */
|
|
1375
|
+
children: _("tourBuilder.validationErrorsTitle")
|
|
1376
|
+
}), /* @__PURE__ */ h("ul", {
|
|
1361
1377
|
className: "list-disc list-inside space-y-1",
|
|
1362
|
-
children:
|
|
1378
|
+
children: Oe.map((e) => /* @__PURE__ */ h("li", {
|
|
1363
1379
|
className: "text-sm text-status-error-text",
|
|
1364
|
-
children: e.message
|
|
1365
|
-
}, e.
|
|
1380
|
+
children: _(e.message, e.params)
|
|
1381
|
+
}, e.field))
|
|
1366
1382
|
})]
|
|
1367
1383
|
}),
|
|
1368
|
-
/* @__PURE__ */
|
|
1384
|
+
/* @__PURE__ */ g("div", {
|
|
1369
1385
|
className: "flex flex-wrap items-center gap-3",
|
|
1370
|
-
children: [/* @__PURE__ */
|
|
1371
|
-
permission:
|
|
1372
|
-
children: /* @__PURE__ */
|
|
1386
|
+
children: [/* @__PURE__ */ h(re, {
|
|
1387
|
+
permission: E ? a.TOUR_CREATE : a.TOUR_UPDATE,
|
|
1388
|
+
children: /* @__PURE__ */ g(ue, {
|
|
1373
1389
|
type: "submit",
|
|
1374
|
-
disabled:
|
|
1390
|
+
disabled: De || !k,
|
|
1375
1391
|
className: "flex-1 min-w-[200px] min-h-[44px]",
|
|
1376
|
-
children: [/* @__PURE__ */
|
|
1392
|
+
children: [/* @__PURE__ */ h(oe, { size: 20 }), _(De ? "tourBuilder.saving" : v && v !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
1377
1393
|
})
|
|
1378
|
-
}),
|
|
1394
|
+
}), v && v !== "new" && Xe.length > 0 && /* @__PURE__ */ h(de, { actions: Xe })]
|
|
1379
1395
|
})
|
|
1380
1396
|
]
|
|
1381
1397
|
})
|
|
1382
1398
|
]
|
|
1383
|
-
}) : /* @__PURE__ */
|
|
1399
|
+
}) : /* @__PURE__ */ h("div", {
|
|
1384
1400
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1401
|
+
children: /* @__PURE__ */ g("div", {
|
|
1386
1402
|
className: "text-center space-y-4",
|
|
1387
|
-
children: [/* @__PURE__ */
|
|
1403
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
1388
1404
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
1389
|
-
children:
|
|
1390
|
-
}), /* @__PURE__ */
|
|
1405
|
+
children: _("tourBuilder.accessDeniedTitle")
|
|
1406
|
+
}), /* @__PURE__ */ h("p", {
|
|
1391
1407
|
className: "text-sm text-text-secondary",
|
|
1392
|
-
children:
|
|
1393
|
-
})] }), /* @__PURE__ */
|
|
1408
|
+
children: _(E ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
|
|
1409
|
+
})] }), /* @__PURE__ */ h("button", {
|
|
1394
1410
|
type: "button",
|
|
1395
1411
|
onClick: Q,
|
|
1396
1412
|
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",
|
|
1397
|
-
children:
|
|
1413
|
+
children: _("tourBuilder.goBack")
|
|
1398
1414
|
})]
|
|
1399
1415
|
})
|
|
1400
1416
|
});
|
|
1401
1417
|
}
|
|
1402
1418
|
//#endregion
|
|
1403
|
-
export {
|
|
1419
|
+
export { x as TourBuilderPage };
|
|
1404
1420
|
|
|
1405
1421
|
//# sourceMappingURL=TourBuilderPage.js.map
|