@burdenoff/microfe-tours 2026.1002.1 → 2026.1004.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.
|
@@ -9,15 +9,15 @@ import { MarkdownEditor as ee } from "../components/MarkdownEditor.js";
|
|
|
9
9
|
import { useTourBuilder as te } from "../hooks/useTourBuilder.js";
|
|
10
10
|
import { useEffect as s, useMemo as c, useRef as ne, useState as l } from "react";
|
|
11
11
|
import { PermissionGate as re } from "@burdenoff/fe-libs/shared/components";
|
|
12
|
-
import { ArrowLeft as ie, BarChart3 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
|
|
12
|
+
import { ArrowLeft as ie, BarChart3 as ae, Calendar as oe, Eye as se, LayoutTemplate as ce, ListOrdered as le, Save as ue, Sparkles as u } from "lucide-react";
|
|
13
|
+
import { Fragment as de, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
14
|
+
import { useNavigate as fe, useParams as pe } from "react-router";
|
|
15
|
+
import { Button as me, CTAOverflowMenu as he, EmphasisPanel as p, GlassCard as ge, NextSteps as _e, PagePurpose as ve } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { useGatewayClient as ye } from "@burdenoff/fe-libs/shared/graphql";
|
|
17
|
+
import { useEventBus as be } from "@burdenoff/fe-libs/shared/events";
|
|
18
|
+
import { gql as m } from "@apollo/client/core";
|
|
19
19
|
//#region src/tours/pages/TourBuilderPage.tsx
|
|
20
|
-
var
|
|
20
|
+
var xe = 250, Se = m`
|
|
21
21
|
mutation SeedVibeControlsUserTours {
|
|
22
22
|
seedVibeControlsUserTours {
|
|
23
23
|
productId
|
|
@@ -34,7 +34,7 @@ var ve = 250, ye = _`
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
`,
|
|
37
|
+
`, Ce = m`
|
|
38
38
|
mutation SeedBuildmyiqUserTours {
|
|
39
39
|
seedBuildmyiqUserTours {
|
|
40
40
|
productId
|
|
@@ -51,8 +51,25 @@ var ve = 250, ye = _`
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
+
`, we = m`
|
|
55
|
+
mutation SeedBigconsoleUserTours {
|
|
56
|
+
seedBigconsoleUserTours {
|
|
57
|
+
productId
|
|
58
|
+
workspaceId
|
|
59
|
+
createdCount
|
|
60
|
+
updatedCount
|
|
61
|
+
totalCount
|
|
62
|
+
tours {
|
|
63
|
+
tourId
|
|
64
|
+
slug
|
|
65
|
+
name
|
|
66
|
+
action
|
|
67
|
+
stepCount
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
54
71
|
`;
|
|
55
|
-
function
|
|
72
|
+
function h(e, t) {
|
|
56
73
|
if (!e || typeof e != "object") return null;
|
|
57
74
|
let n = e, r = n.error;
|
|
58
75
|
if (r instanceof Error) return r.message;
|
|
@@ -66,7 +83,56 @@ function xe(e, t) {
|
|
|
66
83
|
}).filter((e) => !!e);
|
|
67
84
|
return a.length > 0 ? a.join("; ") : t;
|
|
68
85
|
}
|
|
69
|
-
var
|
|
86
|
+
var g = [
|
|
87
|
+
{
|
|
88
|
+
productId: "bigconsole",
|
|
89
|
+
moduleId: "bigconsole",
|
|
90
|
+
moduleLabel: "BigConsole",
|
|
91
|
+
pageId: "home",
|
|
92
|
+
pageLabel: "Overview",
|
|
93
|
+
path: "/bigconsole",
|
|
94
|
+
isModuleHome: !0
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
productId: "bigconsole",
|
|
98
|
+
moduleId: "bigconsole",
|
|
99
|
+
moduleLabel: "BigConsole",
|
|
100
|
+
pageId: "dashboards",
|
|
101
|
+
pageLabel: "Dashboards",
|
|
102
|
+
path: "/bigconsole/dashboards"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
productId: "bigconsole",
|
|
106
|
+
moduleId: "bigconsole",
|
|
107
|
+
moduleLabel: "BigConsole",
|
|
108
|
+
pageId: "datasink-builder",
|
|
109
|
+
pageLabel: "Create data sink",
|
|
110
|
+
path: "/bigconsole/datasinks/new"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
productId: "bigconsole",
|
|
114
|
+
moduleId: "bigconsole",
|
|
115
|
+
moduleLabel: "BigConsole",
|
|
116
|
+
pageId: "parser-builder",
|
|
117
|
+
pageLabel: "Create parser",
|
|
118
|
+
path: "/bigconsole/parsers/new"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
productId: "bigconsole",
|
|
122
|
+
moduleId: "bigconsole",
|
|
123
|
+
moduleLabel: "BigConsole",
|
|
124
|
+
pageId: "workflows",
|
|
125
|
+
pageLabel: "Workflows",
|
|
126
|
+
path: "/bigconsole/workflows/list"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
productId: "bigconsole",
|
|
130
|
+
moduleId: "bigconsole",
|
|
131
|
+
moduleLabel: "BigConsole",
|
|
132
|
+
pageId: "insights",
|
|
133
|
+
pageLabel: "AI Insights",
|
|
134
|
+
path: "/bigconsole/insights"
|
|
135
|
+
},
|
|
70
136
|
{
|
|
71
137
|
productId: "vibecontrols",
|
|
72
138
|
moduleId: "dashboard",
|
|
@@ -663,39 +729,39 @@ var v = [
|
|
|
663
729
|
path: "/collabkin/timeline"
|
|
664
730
|
}
|
|
665
731
|
];
|
|
666
|
-
function
|
|
732
|
+
function _(e) {
|
|
667
733
|
return e?.trim() || void 0;
|
|
668
734
|
}
|
|
669
|
-
function
|
|
670
|
-
let t =
|
|
671
|
-
return t ?
|
|
735
|
+
function v(e) {
|
|
736
|
+
let t = _(e);
|
|
737
|
+
return t ? g.filter((e) => e.productId === t) : [];
|
|
672
738
|
}
|
|
673
|
-
function
|
|
739
|
+
function Te(e) {
|
|
674
740
|
let t = /* @__PURE__ */ new Map();
|
|
675
|
-
for (let n of
|
|
741
|
+
for (let n of v(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
|
|
676
742
|
moduleId: n.moduleId,
|
|
677
743
|
label: n.moduleLabel,
|
|
678
744
|
path: n.path
|
|
679
745
|
});
|
|
680
746
|
return [...t.values()];
|
|
681
747
|
}
|
|
682
|
-
function
|
|
683
|
-
let n =
|
|
684
|
-
return n ?
|
|
748
|
+
function Ee(e, t) {
|
|
749
|
+
let n = _(t);
|
|
750
|
+
return n ? v(e).flatMap((e) => e.moduleId === n ? [{
|
|
685
751
|
pageId: e.pageId,
|
|
686
752
|
label: e.pageLabel,
|
|
687
753
|
path: e.path
|
|
688
754
|
}] : []) : [];
|
|
689
755
|
}
|
|
690
|
-
function
|
|
691
|
-
let { tr:
|
|
756
|
+
function y() {
|
|
757
|
+
let { tr: m } = e(), { tourId: g } = pe(), _ = fe(), v = t(), { basePath: y = "/" } = v, b = be(), x = ye("global"), { hasPermission: S, isLoading: C } = i(), w = !g || g === "new", T = S(a.TOUR_CREATE), E = S(a.TOUR_UPDATE), De = S(a.TOUR_TEMPLATE_CREATE), D = w ? T : E, O = T && E, k = T && E, A = T && E, { tour: j, loadTour: M, createTour: Oe, updateTour: ke, saving: N, validationErrors: P, error: Ae } = te(g), { saveAsTemplate: je } = r(), { data: Me, loading: F } = n({
|
|
692
758
|
variables: {
|
|
693
|
-
limit:
|
|
759
|
+
limit: xe,
|
|
694
760
|
offset: 0
|
|
695
761
|
},
|
|
696
762
|
fetchPolicy: "cache-and-network",
|
|
697
|
-
skip:
|
|
698
|
-
}), [
|
|
763
|
+
skip: C || !D
|
|
764
|
+
}), [I, L] = l({
|
|
699
765
|
name: "",
|
|
700
766
|
description: "",
|
|
701
767
|
productId: "",
|
|
@@ -708,356 +774,423 @@ function x() {
|
|
|
708
774
|
displayOrder: 1,
|
|
709
775
|
startDate: "",
|
|
710
776
|
endDate: ""
|
|
711
|
-
}), [
|
|
777
|
+
}), [R, z] = l(!1), [B, V] = l(!1), [H, U] = l(!1), [Ne, Pe] = l(!1), [W, Fe] = l(null), [Ie, Le] = l(null), [Re, ze] = l(!1), [G, Be] = l(null), [Ve, He] = l(null), [Ue, We] = l(!1), [K, Ge] = l(null), [Ke, qe] = l(null), q = ne(!1), J = c(() => [...Me?.platformProducts.items ?? []].sort((e, t) => e.name.localeCompare(t.name)), [Me]), Y = c(() => new Set(J.map((e) => e.slug)), [J]), X = c(() => Te(I.productId), [I.productId]), Z = c(() => new Set(X.map((e) => e.moduleId)), [X]), Q = c(() => Ee(I.productId, I.moduleId), [I.moduleId, I.productId]), $ = c(() => new Set(Q.map((e) => e.pageId)), [Q]);
|
|
712
778
|
s(() => {
|
|
713
|
-
|
|
779
|
+
q.current || !C && D && g && g !== "new" && M(g);
|
|
714
780
|
}, [
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
781
|
+
D,
|
|
782
|
+
M,
|
|
783
|
+
C,
|
|
784
|
+
g
|
|
719
785
|
]), s(() => {
|
|
720
|
-
|
|
721
|
-
}, [
|
|
722
|
-
if (!
|
|
723
|
-
|
|
786
|
+
j && !q.current && (L(j), q.current = !0);
|
|
787
|
+
}, [j]), s(() => {
|
|
788
|
+
if (!I.productId || F) {
|
|
789
|
+
z(!1);
|
|
724
790
|
return;
|
|
725
791
|
}
|
|
726
|
-
|
|
792
|
+
z(J.length > 0 && !Y.has(I.productId));
|
|
727
793
|
}, [
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
794
|
+
I.productId,
|
|
795
|
+
Y,
|
|
796
|
+
J.length,
|
|
797
|
+
F
|
|
732
798
|
]), s(() => {
|
|
733
|
-
if (!
|
|
734
|
-
|
|
799
|
+
if (!I.productId || !I.moduleId) {
|
|
800
|
+
V(!1);
|
|
735
801
|
return;
|
|
736
802
|
}
|
|
737
|
-
|
|
803
|
+
V(X.length === 0 || !Z.has(I.moduleId));
|
|
738
804
|
}, [
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
805
|
+
I.moduleId,
|
|
806
|
+
I.productId,
|
|
807
|
+
Z,
|
|
808
|
+
X.length
|
|
743
809
|
]), s(() => {
|
|
744
|
-
if (!
|
|
745
|
-
|
|
810
|
+
if (!I.productId || !I.pageId) {
|
|
811
|
+
U(!1);
|
|
746
812
|
return;
|
|
747
813
|
}
|
|
748
|
-
|
|
814
|
+
U(Q.length === 0 || !$.has(I.pageId));
|
|
749
815
|
}, [
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
816
|
+
I.pageId,
|
|
817
|
+
I.productId,
|
|
818
|
+
$,
|
|
819
|
+
Q.length
|
|
754
820
|
]);
|
|
755
|
-
let
|
|
821
|
+
let Je = !!(I.productId && !R && !Y.has(I.productId)), Ye = !!(I.moduleId && !B && !Z.has(I.moduleId)), Xe = !!(I.pageId && !H && !$.has(I.pageId)), Ze = async (e) => {
|
|
756
822
|
e.preventDefault();
|
|
757
823
|
try {
|
|
758
|
-
|
|
824
|
+
g && g !== "new" ? await ke(g, I) : await Oe(I);
|
|
759
825
|
} catch {
|
|
760
|
-
o(
|
|
826
|
+
o(b, "tour.save", v);
|
|
761
827
|
}
|
|
762
|
-
},
|
|
763
|
-
|
|
764
|
-
},
|
|
828
|
+
}, Qe = () => {
|
|
829
|
+
_(`${y}/list`);
|
|
830
|
+
}, $e = (e) => {
|
|
765
831
|
if (!e) return "";
|
|
766
832
|
let t = new Date(e);
|
|
767
833
|
return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
768
|
-
},
|
|
769
|
-
if (!
|
|
770
|
-
let e =
|
|
834
|
+
}, et = async () => {
|
|
835
|
+
if (!g || g === "new") return;
|
|
836
|
+
let e = m("tourBuilder.templateDefaultName", "{{name}} Template", { name: I.name || j?.name || "Tour" }), t = window.prompt(m("tourBuilder.templateNamePrompt", "Template name"), e);
|
|
771
837
|
if (!t) return;
|
|
772
|
-
let n = window.prompt(
|
|
838
|
+
let n = window.prompt(m("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
|
|
773
839
|
try {
|
|
774
|
-
await
|
|
840
|
+
await je(g, {
|
|
775
841
|
name: t,
|
|
776
|
-
description:
|
|
842
|
+
description: I.description,
|
|
777
843
|
category: n,
|
|
778
844
|
isPublic: !1
|
|
779
|
-
}),
|
|
845
|
+
}), _(`${y}/templates`);
|
|
780
846
|
} catch {
|
|
781
|
-
o(
|
|
847
|
+
o(b, "template.save", v);
|
|
782
848
|
}
|
|
783
|
-
},
|
|
784
|
-
if (window.confirm(
|
|
785
|
-
|
|
849
|
+
}, tt = async () => {
|
|
850
|
+
if (window.confirm(m("tourBuilder.seedVibeControls.confirm"))) {
|
|
851
|
+
Pe(!0), Fe(null), Le(null);
|
|
786
852
|
try {
|
|
787
|
-
let e = await
|
|
853
|
+
let e = await x.mutate({ mutation: Se }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
788
854
|
if (t) throw Error(t);
|
|
789
855
|
let n = e.data?.seedVibeControlsUserTours;
|
|
790
|
-
if (!n) throw Error(
|
|
791
|
-
|
|
856
|
+
if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
857
|
+
Fe(n);
|
|
792
858
|
} catch (e) {
|
|
793
|
-
let t = e instanceof Error ? e.message :
|
|
794
|
-
|
|
859
|
+
let t = e instanceof Error ? e.message : m("tourBuilder.seedVibeControls.error");
|
|
860
|
+
Le(t), b.emit("tours.api.failed", {
|
|
795
861
|
route: "/tours",
|
|
796
862
|
operation: "tour.seed_vibecontrols_user_tours",
|
|
797
863
|
errorMessage: t,
|
|
798
|
-
productId:
|
|
799
|
-
workspaceId:
|
|
864
|
+
productId: v.productId,
|
|
865
|
+
workspaceId: v.workspaceId
|
|
800
866
|
}, { component: "microfe-tours" });
|
|
801
867
|
} finally {
|
|
802
|
-
|
|
868
|
+
Pe(!1);
|
|
803
869
|
}
|
|
804
870
|
}
|
|
805
|
-
},
|
|
806
|
-
if (window.confirm(
|
|
807
|
-
|
|
871
|
+
}, nt = async () => {
|
|
872
|
+
if (window.confirm(m("tourBuilder.seedBuildmyiq.confirm"))) {
|
|
873
|
+
ze(!0), Be(null), He(null);
|
|
808
874
|
try {
|
|
809
|
-
let e = await
|
|
875
|
+
let e = await x.mutate({ mutation: Ce }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
810
876
|
if (t) throw Error(t);
|
|
811
877
|
let n = e.data?.seedBuildmyiqUserTours;
|
|
812
|
-
if (!n) throw Error(
|
|
813
|
-
|
|
878
|
+
if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
879
|
+
Be(n);
|
|
814
880
|
} catch (e) {
|
|
815
|
-
let t = e instanceof Error ? e.message :
|
|
816
|
-
|
|
881
|
+
let t = e instanceof Error ? e.message : m("tourBuilder.seedBuildmyiq.error");
|
|
882
|
+
He(t), b.emit("tours.api.failed", {
|
|
817
883
|
route: "/tours",
|
|
818
884
|
operation: "tour.seed_buildmyiq_user_tours",
|
|
819
885
|
errorMessage: t,
|
|
820
|
-
productId:
|
|
821
|
-
workspaceId:
|
|
886
|
+
productId: v.productId,
|
|
887
|
+
workspaceId: v.workspaceId
|
|
888
|
+
}, { component: "microfe-tours" });
|
|
889
|
+
} finally {
|
|
890
|
+
ze(!1);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
}, rt = async () => {
|
|
894
|
+
if (window.confirm(m("tourBuilder.seedBigconsole.confirm"))) {
|
|
895
|
+
We(!0), Ge(null), qe(null);
|
|
896
|
+
try {
|
|
897
|
+
let e = await x.mutate({ mutation: we }), t = h(e, m("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
898
|
+
if (t) throw Error(t);
|
|
899
|
+
let n = e.data?.seedBigconsoleUserTours;
|
|
900
|
+
if (!n) throw Error(m("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
901
|
+
Ge(n);
|
|
902
|
+
} catch (e) {
|
|
903
|
+
let t = e instanceof Error ? e.message : m("tourBuilder.seedBigconsole.error");
|
|
904
|
+
qe(t), b.emit("tours.api.failed", {
|
|
905
|
+
route: "/tours",
|
|
906
|
+
operation: "tour.seed_bigconsole_user_tours",
|
|
907
|
+
errorMessage: t,
|
|
908
|
+
productId: v.productId,
|
|
909
|
+
workspaceId: v.workspaceId
|
|
822
910
|
}, { component: "microfe-tours" });
|
|
823
911
|
} finally {
|
|
824
|
-
|
|
912
|
+
We(!1);
|
|
825
913
|
}
|
|
826
914
|
}
|
|
827
|
-
},
|
|
915
|
+
}, it = g && g !== "new" ? [
|
|
828
916
|
{
|
|
829
|
-
label:
|
|
830
|
-
onSelect: () =>
|
|
831
|
-
icon: /* @__PURE__ */
|
|
917
|
+
label: j?.steps && j.steps.length > 0 ? `${m("tourBuilder.editSteps")} (${j.steps.length})` : m("tourBuilder.editSteps"),
|
|
918
|
+
onSelect: () => _(`${y}/${g}/steps`),
|
|
919
|
+
icon: /* @__PURE__ */ d(le, { size: 16 })
|
|
832
920
|
},
|
|
833
921
|
{
|
|
834
|
-
label:
|
|
835
|
-
onSelect: () =>
|
|
836
|
-
icon: /* @__PURE__ */
|
|
922
|
+
label: m("tourBuilder.preview"),
|
|
923
|
+
onSelect: () => _(`${y}/${g}/preview`),
|
|
924
|
+
icon: /* @__PURE__ */ d(se, { size: 16 })
|
|
837
925
|
},
|
|
838
926
|
{
|
|
839
|
-
label:
|
|
840
|
-
onSelect: () =>
|
|
841
|
-
icon: /* @__PURE__ */
|
|
927
|
+
label: m("tourBuilder.analytics"),
|
|
928
|
+
onSelect: () => _(`${y}/${g}/analytics`),
|
|
929
|
+
icon: /* @__PURE__ */ d(ae, { size: 16 })
|
|
842
930
|
},
|
|
843
931
|
{
|
|
844
|
-
label:
|
|
845
|
-
onSelect: () =>
|
|
846
|
-
icon: /* @__PURE__ */
|
|
932
|
+
label: m("tourBuilder.schedule", "Schedule"),
|
|
933
|
+
onSelect: () => _(`${y}/${g}/schedule`),
|
|
934
|
+
icon: /* @__PURE__ */ d(oe, { size: 16 })
|
|
847
935
|
},
|
|
848
|
-
...
|
|
849
|
-
label:
|
|
850
|
-
onSelect: () => void
|
|
851
|
-
icon: /* @__PURE__ */
|
|
936
|
+
...De ? [{
|
|
937
|
+
label: m("tourBuilder.saveAsTemplate", "Save as Template"),
|
|
938
|
+
onSelect: () => void et(),
|
|
939
|
+
icon: /* @__PURE__ */ d(ce, { size: 16 })
|
|
852
940
|
}] : []
|
|
853
|
-
] : [],
|
|
941
|
+
] : [], at = g && g !== "new" && E ? [
|
|
854
942
|
{
|
|
855
943
|
id: "edit-steps",
|
|
856
|
-
label:
|
|
857
|
-
description:
|
|
858
|
-
icon: /* @__PURE__ */
|
|
859
|
-
onClick: () =>
|
|
944
|
+
label: m("tourBuilder.nextStepEditSteps"),
|
|
945
|
+
description: m("tourBuilder.nextStepEditStepsDesc"),
|
|
946
|
+
icon: /* @__PURE__ */ d(le, { size: 16 }),
|
|
947
|
+
onClick: () => _(`${y}/${g}/steps`)
|
|
860
948
|
},
|
|
861
949
|
{
|
|
862
950
|
id: "preview",
|
|
863
|
-
label:
|
|
864
|
-
description:
|
|
865
|
-
icon: /* @__PURE__ */
|
|
866
|
-
onClick: () =>
|
|
951
|
+
label: m("tourBuilder.nextStepPreview"),
|
|
952
|
+
description: m("tourBuilder.nextStepPreviewDesc"),
|
|
953
|
+
icon: /* @__PURE__ */ d(se, { size: 16 }),
|
|
954
|
+
onClick: () => _(`${y}/${g}/preview`)
|
|
867
955
|
},
|
|
868
956
|
{
|
|
869
957
|
id: "schedule",
|
|
870
|
-
label:
|
|
871
|
-
description:
|
|
872
|
-
icon: /* @__PURE__ */
|
|
873
|
-
onClick: () =>
|
|
958
|
+
label: m("tourBuilder.nextStepSchedule"),
|
|
959
|
+
description: m("tourBuilder.nextStepScheduleDesc"),
|
|
960
|
+
icon: /* @__PURE__ */ d(oe, { size: 16 }),
|
|
961
|
+
onClick: () => _(`${y}/${g}/schedule`)
|
|
874
962
|
},
|
|
875
963
|
{
|
|
876
964
|
id: "analytics",
|
|
877
|
-
label:
|
|
878
|
-
description:
|
|
879
|
-
icon: /* @__PURE__ */
|
|
880
|
-
onClick: () =>
|
|
965
|
+
label: m("tourBuilder.nextStepAnalytics"),
|
|
966
|
+
description: m("tourBuilder.nextStepAnalyticsDesc"),
|
|
967
|
+
icon: /* @__PURE__ */ d(ae, { size: 16 }),
|
|
968
|
+
onClick: () => _(`${y}/${g}/analytics`)
|
|
881
969
|
}
|
|
882
970
|
] : [];
|
|
883
|
-
return
|
|
971
|
+
return C ? /* @__PURE__ */ d("div", {
|
|
884
972
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
885
|
-
children: /* @__PURE__ */
|
|
973
|
+
children: /* @__PURE__ */ d("p", {
|
|
886
974
|
className: "text-sm text-text-secondary",
|
|
887
|
-
children:
|
|
975
|
+
children: m("tourBuilder.loading")
|
|
888
976
|
})
|
|
889
|
-
}) :
|
|
977
|
+
}) : D ? /* @__PURE__ */ f("div", {
|
|
890
978
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
|
|
891
979
|
children: [
|
|
892
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ f("div", {
|
|
893
981
|
className: "flex items-center gap-4",
|
|
894
|
-
children: [/* @__PURE__ */
|
|
982
|
+
children: [/* @__PURE__ */ d("button", {
|
|
895
983
|
type: "button",
|
|
896
|
-
onClick:
|
|
984
|
+
onClick: Qe,
|
|
897
985
|
className: "p-2 hover:bg-accent rounded-md",
|
|
898
|
-
"aria-label":
|
|
899
|
-
children: /* @__PURE__ */
|
|
900
|
-
}), /* @__PURE__ */
|
|
986
|
+
"aria-label": m("tourBuilder.goBack"),
|
|
987
|
+
children: /* @__PURE__ */ d(ie, { size: 20 })
|
|
988
|
+
}), /* @__PURE__ */ f("div", {
|
|
901
989
|
className: "flex-1",
|
|
902
|
-
children: [/* @__PURE__ */
|
|
990
|
+
children: [/* @__PURE__ */ d("h1", {
|
|
903
991
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
904
|
-
children:
|
|
905
|
-
}), /* @__PURE__ */
|
|
992
|
+
children: m(g && g !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
|
|
993
|
+
}), /* @__PURE__ */ d("p", {
|
|
906
994
|
className: "text-sm text-text-secondary",
|
|
907
|
-
children:
|
|
995
|
+
children: m("tourBuilder.subtitle")
|
|
908
996
|
})]
|
|
909
997
|
})]
|
|
910
998
|
}),
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
|
|
999
|
+
/* @__PURE__ */ d(ve, { children: m("tourBuilder.purpose") }),
|
|
1000
|
+
at.length > 0 ? /* @__PURE__ */ d(_e, {
|
|
913
1001
|
storageKey: "tours-builder",
|
|
914
|
-
title:
|
|
915
|
-
steps:
|
|
1002
|
+
title: m("tourBuilder.nextStepsTitle"),
|
|
1003
|
+
steps: at
|
|
916
1004
|
}) : null,
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
1005
|
+
w ? /* @__PURE__ */ f(de, { children: [
|
|
1006
|
+
/* @__PURE__ */ f(p, {
|
|
1007
|
+
className: "p-4 sm:p-6",
|
|
1008
|
+
children: [
|
|
1009
|
+
/* @__PURE__ */ f("div", {
|
|
1010
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
1011
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1012
|
+
className: "space-y-1",
|
|
1013
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1014
|
+
className: "text-lg font-semibold text-text-primary",
|
|
1015
|
+
children: m("tourBuilder.seedVibeControls.title")
|
|
1016
|
+
}), /* @__PURE__ */ d("p", {
|
|
1017
|
+
className: "text-sm text-text-secondary",
|
|
1018
|
+
children: m("tourBuilder.seedVibeControls.description")
|
|
1019
|
+
})]
|
|
1020
|
+
}), /* @__PURE__ */ f("button", {
|
|
1021
|
+
type: "button",
|
|
1022
|
+
onClick: () => void tt(),
|
|
1023
|
+
disabled: Ne || !O,
|
|
1024
|
+
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",
|
|
1025
|
+
children: [/* @__PURE__ */ d(u, { size: 18 }), m(Ne ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
|
|
930
1026
|
})]
|
|
931
|
-
}),
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
1027
|
+
}),
|
|
1028
|
+
O ? null : /* @__PURE__ */ d("p", {
|
|
1029
|
+
className: "mt-3 text-sm text-text-secondary",
|
|
1030
|
+
children: m("tourBuilder.seedVibeControls.permissionHint")
|
|
1031
|
+
}),
|
|
1032
|
+
Ie ? /* @__PURE__ */ d("p", {
|
|
1033
|
+
className: "mt-3 text-sm text-status-error-text",
|
|
1034
|
+
children: Ie
|
|
1035
|
+
}) : null,
|
|
1036
|
+
W ? /* @__PURE__ */ d("div", {
|
|
1037
|
+
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
1038
|
+
children: m("tourBuilder.seedVibeControls.result", {
|
|
1039
|
+
totalCount: W.totalCount,
|
|
1040
|
+
productId: W.productId,
|
|
1041
|
+
workspaceId: W.workspaceId,
|
|
1042
|
+
createdCount: W.createdCount,
|
|
1043
|
+
updatedCount: W.updatedCount
|
|
1044
|
+
})
|
|
1045
|
+
}) : null
|
|
1046
|
+
]
|
|
1047
|
+
}),
|
|
1048
|
+
/* @__PURE__ */ f(p, {
|
|
1049
|
+
className: "p-4 sm:p-6",
|
|
1050
|
+
children: [
|
|
1051
|
+
/* @__PURE__ */ f("div", {
|
|
1052
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
1053
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1054
|
+
className: "space-y-1",
|
|
1055
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1056
|
+
className: "text-lg font-semibold text-text-primary",
|
|
1057
|
+
children: m("tourBuilder.seedBuildmyiq.title")
|
|
1058
|
+
}), /* @__PURE__ */ d("p", {
|
|
1059
|
+
className: "text-sm text-text-secondary",
|
|
1060
|
+
children: m("tourBuilder.seedBuildmyiq.description")
|
|
1061
|
+
})]
|
|
1062
|
+
}), /* @__PURE__ */ f("button", {
|
|
1063
|
+
type: "button",
|
|
1064
|
+
onClick: () => void nt(),
|
|
1065
|
+
disabled: Re || !k,
|
|
1066
|
+
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",
|
|
1067
|
+
children: [/* @__PURE__ */ d(u, { size: 18 }), m(Re ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
|
|
971
1068
|
})]
|
|
972
|
-
}),
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1069
|
+
}),
|
|
1070
|
+
k ? null : /* @__PURE__ */ d("p", {
|
|
1071
|
+
className: "mt-3 text-sm text-text-secondary",
|
|
1072
|
+
children: m("tourBuilder.seedBuildmyiq.permissionHint")
|
|
1073
|
+
}),
|
|
1074
|
+
Ve ? /* @__PURE__ */ d("p", {
|
|
1075
|
+
className: "mt-3 text-sm text-status-error-text",
|
|
1076
|
+
children: Ve
|
|
1077
|
+
}) : null,
|
|
1078
|
+
G ? /* @__PURE__ */ d("div", {
|
|
1079
|
+
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
1080
|
+
children: m("tourBuilder.seedBuildmyiq.result", {
|
|
1081
|
+
totalCount: G.totalCount,
|
|
1082
|
+
productId: G.productId,
|
|
1083
|
+
workspaceId: G.workspaceId,
|
|
1084
|
+
createdCount: G.createdCount,
|
|
1085
|
+
updatedCount: G.updatedCount
|
|
1086
|
+
})
|
|
1087
|
+
}) : null
|
|
1088
|
+
]
|
|
1089
|
+
}),
|
|
1090
|
+
/* @__PURE__ */ f(p, {
|
|
1091
|
+
className: "p-4 sm:p-6",
|
|
1092
|
+
children: [
|
|
1093
|
+
/* @__PURE__ */ f("div", {
|
|
1094
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
1095
|
+
children: [/* @__PURE__ */ f("div", {
|
|
1096
|
+
className: "space-y-1",
|
|
1097
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1098
|
+
className: "text-lg font-semibold text-text-primary",
|
|
1099
|
+
children: m("tourBuilder.seedBigconsole.title")
|
|
1100
|
+
}), /* @__PURE__ */ d("p", {
|
|
1101
|
+
className: "text-sm text-text-secondary",
|
|
1102
|
+
children: m("tourBuilder.seedBigconsole.description")
|
|
1103
|
+
})]
|
|
1104
|
+
}), /* @__PURE__ */ f("button", {
|
|
1105
|
+
type: "button",
|
|
1106
|
+
onClick: () => void rt(),
|
|
1107
|
+
disabled: Ue || !A,
|
|
1108
|
+
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",
|
|
1109
|
+
children: [/* @__PURE__ */ d(u, { size: 18 }), m(Ue ? "tourBuilder.seedBigconsole.loading" : "tourBuilder.seedBigconsole.button")]
|
|
1110
|
+
})]
|
|
1111
|
+
}),
|
|
1112
|
+
A ? null : /* @__PURE__ */ d("p", {
|
|
1113
|
+
className: "mt-3 text-sm text-text-secondary",
|
|
1114
|
+
children: m("tourBuilder.seedBigconsole.permissionHint")
|
|
1115
|
+
}),
|
|
1116
|
+
Ke ? /* @__PURE__ */ d("p", {
|
|
1117
|
+
className: "mt-3 text-sm text-status-error-text",
|
|
1118
|
+
children: Ke
|
|
1119
|
+
}) : null,
|
|
1120
|
+
K ? /* @__PURE__ */ d("div", {
|
|
1121
|
+
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
1122
|
+
children: m("tourBuilder.seedBigconsole.result", {
|
|
1123
|
+
totalCount: K.totalCount,
|
|
1124
|
+
productId: K.productId,
|
|
1125
|
+
workspaceId: K.workspaceId,
|
|
1126
|
+
createdCount: K.createdCount,
|
|
1127
|
+
updatedCount: K.updatedCount
|
|
1128
|
+
})
|
|
1129
|
+
}) : null
|
|
1130
|
+
]
|
|
1131
|
+
})
|
|
1132
|
+
] }) : null,
|
|
1133
|
+
/* @__PURE__ */ f("form", {
|
|
1134
|
+
onSubmit: Ze,
|
|
1002
1135
|
className: "space-y-6",
|
|
1003
1136
|
children: [
|
|
1004
|
-
/* @__PURE__ */
|
|
1137
|
+
/* @__PURE__ */ f(ge, {
|
|
1005
1138
|
treatment: "plain",
|
|
1006
1139
|
className: "p-4 sm:p-6 border-border-seam",
|
|
1007
|
-
children: [/* @__PURE__ */
|
|
1140
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1008
1141
|
className: "text-lg font-semibold mb-4",
|
|
1009
|
-
children:
|
|
1010
|
-
}), /* @__PURE__ */
|
|
1142
|
+
children: m("tourBuilder.sectionBasicInfo")
|
|
1143
|
+
}), /* @__PURE__ */ f("div", {
|
|
1011
1144
|
className: "space-y-4",
|
|
1012
1145
|
children: [
|
|
1013
|
-
/* @__PURE__ */
|
|
1146
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
1014
1147
|
className: "block text-sm font-medium mb-2",
|
|
1015
1148
|
htmlFor: "tour-name",
|
|
1016
|
-
children:
|
|
1017
|
-
}), /* @__PURE__ */
|
|
1149
|
+
children: m("tourBuilder.labelName")
|
|
1150
|
+
}), /* @__PURE__ */ d("input", {
|
|
1018
1151
|
id: "tour-name",
|
|
1019
1152
|
type: "text",
|
|
1020
|
-
value:
|
|
1021
|
-
onChange: (e) =>
|
|
1022
|
-
...
|
|
1153
|
+
value: I.name || "",
|
|
1154
|
+
onChange: (e) => L({
|
|
1155
|
+
...I,
|
|
1023
1156
|
name: e.target.value
|
|
1024
1157
|
}),
|
|
1025
1158
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1026
1159
|
required: !0,
|
|
1027
|
-
"aria-label":
|
|
1160
|
+
"aria-label": m("tourBuilder.labelName")
|
|
1028
1161
|
})] }),
|
|
1029
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ d(ee, {
|
|
1030
1163
|
id: "tour-description",
|
|
1031
|
-
label:
|
|
1032
|
-
value:
|
|
1033
|
-
onChange: (e) =>
|
|
1034
|
-
...
|
|
1164
|
+
label: m("tourBuilder.labelDescription"),
|
|
1165
|
+
value: I.description || "",
|
|
1166
|
+
onChange: (e) => L({
|
|
1167
|
+
...I,
|
|
1035
1168
|
description: e
|
|
1036
1169
|
}),
|
|
1037
1170
|
rows: 4,
|
|
1038
|
-
"aria-label":
|
|
1171
|
+
"aria-label": m("tourBuilder.labelDescription")
|
|
1039
1172
|
}),
|
|
1040
|
-
/* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1173
|
+
/* @__PURE__ */ f("div", { children: [
|
|
1174
|
+
/* @__PURE__ */ d("label", {
|
|
1042
1175
|
className: "block text-sm font-medium mb-2",
|
|
1043
1176
|
htmlFor: "product-id",
|
|
1044
|
-
children:
|
|
1177
|
+
children: m("tourBuilder.labelProductId")
|
|
1045
1178
|
}),
|
|
1046
|
-
/* @__PURE__ */
|
|
1179
|
+
/* @__PURE__ */ f("select", {
|
|
1047
1180
|
id: "product-id",
|
|
1048
|
-
value:
|
|
1181
|
+
value: R ? "__custom__" : I.productId || "",
|
|
1049
1182
|
onChange: (e) => {
|
|
1050
1183
|
if (e.target.value === "__custom__") {
|
|
1051
|
-
|
|
1052
|
-
...
|
|
1184
|
+
z(!0), L({
|
|
1185
|
+
...I,
|
|
1053
1186
|
productId: "",
|
|
1054
1187
|
moduleId: void 0,
|
|
1055
1188
|
pageId: void 0
|
|
1056
1189
|
});
|
|
1057
1190
|
return;
|
|
1058
1191
|
}
|
|
1059
|
-
|
|
1060
|
-
...
|
|
1192
|
+
z(!1), V(!1), U(!1), L({
|
|
1193
|
+
...I,
|
|
1061
1194
|
productId: e.target.value,
|
|
1062
1195
|
moduleId: void 0,
|
|
1063
1196
|
pageId: void 0
|
|
@@ -1065,17 +1198,17 @@ function x() {
|
|
|
1065
1198
|
},
|
|
1066
1199
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1067
1200
|
required: !0,
|
|
1068
|
-
"aria-label":
|
|
1201
|
+
"aria-label": m("tourBuilder.labelProductId"),
|
|
1069
1202
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1203
|
+
/* @__PURE__ */ d("option", {
|
|
1071
1204
|
value: "",
|
|
1072
|
-
children:
|
|
1205
|
+
children: m("tourBuilder.selectProduct", "Select product")
|
|
1073
1206
|
}),
|
|
1074
|
-
|
|
1207
|
+
F ? /* @__PURE__ */ d("option", {
|
|
1075
1208
|
disabled: !0,
|
|
1076
|
-
children:
|
|
1209
|
+
children: m("tourBuilder.loadingProducts", "Loading products…")
|
|
1077
1210
|
}) : null,
|
|
1078
|
-
|
|
1211
|
+
J.map((e) => /* @__PURE__ */ f("option", {
|
|
1079
1212
|
value: e.slug,
|
|
1080
1213
|
children: [
|
|
1081
1214
|
e.name,
|
|
@@ -1084,67 +1217,67 @@ function x() {
|
|
|
1084
1217
|
")"
|
|
1085
1218
|
]
|
|
1086
1219
|
}, e.id)),
|
|
1087
|
-
|
|
1088
|
-
value:
|
|
1089
|
-
children:
|
|
1220
|
+
Je ? /* @__PURE__ */ d("option", {
|
|
1221
|
+
value: I.productId,
|
|
1222
|
+
children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.productId ?? "" })
|
|
1090
1223
|
}) : null,
|
|
1091
|
-
/* @__PURE__ */
|
|
1224
|
+
/* @__PURE__ */ d("option", {
|
|
1092
1225
|
value: "__custom__",
|
|
1093
|
-
children:
|
|
1226
|
+
children: m("tourBuilder.customProductSlug", "Custom product slug")
|
|
1094
1227
|
})
|
|
1095
1228
|
]
|
|
1096
1229
|
}),
|
|
1097
|
-
|
|
1230
|
+
R ? /* @__PURE__ */ d("input", {
|
|
1098
1231
|
id: "product-id-custom",
|
|
1099
|
-
"aria-label":
|
|
1232
|
+
"aria-label": m("tourBuilder.customProductSlug", "Custom product slug"),
|
|
1100
1233
|
type: "text",
|
|
1101
|
-
value:
|
|
1102
|
-
onChange: (e) =>
|
|
1103
|
-
...
|
|
1234
|
+
value: I.productId || "",
|
|
1235
|
+
onChange: (e) => L({
|
|
1236
|
+
...I,
|
|
1104
1237
|
productId: e.target.value,
|
|
1105
1238
|
moduleId: void 0,
|
|
1106
1239
|
pageId: void 0
|
|
1107
1240
|
}),
|
|
1108
1241
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1109
|
-
placeholder:
|
|
1242
|
+
placeholder: m("tourBuilder.productSlugPlaceholder", "vibecontrols"),
|
|
1110
1243
|
required: !0
|
|
1111
1244
|
}) : null
|
|
1112
1245
|
] }),
|
|
1113
|
-
/* @__PURE__ */
|
|
1246
|
+
/* @__PURE__ */ f("div", {
|
|
1114
1247
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1115
|
-
children: [/* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1248
|
+
children: [/* @__PURE__ */ f("div", { children: [
|
|
1249
|
+
/* @__PURE__ */ d("label", {
|
|
1117
1250
|
className: "block text-sm font-medium mb-2",
|
|
1118
1251
|
htmlFor: "module-id",
|
|
1119
|
-
children:
|
|
1252
|
+
children: m("tourBuilder.labelModuleId", "Module ID")
|
|
1120
1253
|
}),
|
|
1121
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ f("select", {
|
|
1122
1255
|
id: "module-id",
|
|
1123
|
-
value:
|
|
1256
|
+
value: B ? "__custom__" : I.moduleId || "",
|
|
1124
1257
|
onChange: (e) => {
|
|
1125
1258
|
if (e.target.value === "__custom__") {
|
|
1126
|
-
|
|
1127
|
-
...
|
|
1259
|
+
V(!0), L({
|
|
1260
|
+
...I,
|
|
1128
1261
|
moduleId: "",
|
|
1129
1262
|
pageId: void 0
|
|
1130
1263
|
});
|
|
1131
1264
|
return;
|
|
1132
1265
|
}
|
|
1133
|
-
|
|
1134
|
-
...
|
|
1266
|
+
V(!1), U(!1), L({
|
|
1267
|
+
...I,
|
|
1135
1268
|
moduleId: e.target.value || void 0,
|
|
1136
1269
|
pageId: void 0
|
|
1137
1270
|
});
|
|
1138
1271
|
},
|
|
1139
1272
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1140
|
-
disabled: !
|
|
1141
|
-
"aria-label":
|
|
1273
|
+
disabled: !I.productId,
|
|
1274
|
+
"aria-label": m("tourBuilder.labelModuleId", "Module ID"),
|
|
1142
1275
|
children: [
|
|
1143
|
-
/* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ d("option", {
|
|
1144
1277
|
value: "",
|
|
1145
|
-
children:
|
|
1278
|
+
children: m("tourBuilder.allModules", "All modules")
|
|
1146
1279
|
}),
|
|
1147
|
-
|
|
1280
|
+
X.map((e) => /* @__PURE__ */ f("option", {
|
|
1148
1281
|
value: e.moduleId,
|
|
1149
1282
|
children: [
|
|
1150
1283
|
e.label,
|
|
@@ -1153,60 +1286,60 @@ function x() {
|
|
|
1153
1286
|
")"
|
|
1154
1287
|
]
|
|
1155
1288
|
}, e.moduleId)),
|
|
1156
|
-
|
|
1157
|
-
value:
|
|
1158
|
-
children:
|
|
1289
|
+
Ye ? /* @__PURE__ */ d("option", {
|
|
1290
|
+
value: I.moduleId,
|
|
1291
|
+
children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.moduleId ?? "" })
|
|
1159
1292
|
}) : null,
|
|
1160
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ d("option", {
|
|
1161
1294
|
value: "__custom__",
|
|
1162
|
-
children:
|
|
1295
|
+
children: m("tourBuilder.customModuleId", "Custom module ID")
|
|
1163
1296
|
})
|
|
1164
1297
|
]
|
|
1165
1298
|
}),
|
|
1166
|
-
|
|
1299
|
+
B ? /* @__PURE__ */ d("input", {
|
|
1167
1300
|
id: "module-id-custom",
|
|
1168
|
-
"aria-label":
|
|
1301
|
+
"aria-label": m("tourBuilder.customModuleId", "Custom module ID"),
|
|
1169
1302
|
type: "text",
|
|
1170
|
-
value:
|
|
1171
|
-
onChange: (e) =>
|
|
1172
|
-
...
|
|
1303
|
+
value: I.moduleId || "",
|
|
1304
|
+
onChange: (e) => L({
|
|
1305
|
+
...I,
|
|
1173
1306
|
moduleId: e.target.value || void 0,
|
|
1174
1307
|
pageId: void 0
|
|
1175
1308
|
}),
|
|
1176
1309
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1177
|
-
placeholder:
|
|
1310
|
+
placeholder: m("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
|
|
1178
1311
|
}) : null
|
|
1179
|
-
] }), /* @__PURE__ */
|
|
1180
|
-
/* @__PURE__ */
|
|
1312
|
+
] }), /* @__PURE__ */ f("div", { children: [
|
|
1313
|
+
/* @__PURE__ */ d("label", {
|
|
1181
1314
|
className: "block text-sm font-medium mb-2",
|
|
1182
1315
|
htmlFor: "page-id",
|
|
1183
|
-
children:
|
|
1316
|
+
children: m("tourBuilder.labelPageId", "Page ID")
|
|
1184
1317
|
}),
|
|
1185
|
-
/* @__PURE__ */
|
|
1318
|
+
/* @__PURE__ */ f("select", {
|
|
1186
1319
|
id: "page-id",
|
|
1187
|
-
value:
|
|
1320
|
+
value: H ? "__custom__" : I.pageId || "",
|
|
1188
1321
|
onChange: (e) => {
|
|
1189
1322
|
if (e.target.value === "__custom__") {
|
|
1190
|
-
|
|
1191
|
-
...
|
|
1323
|
+
U(!0), L({
|
|
1324
|
+
...I,
|
|
1192
1325
|
pageId: ""
|
|
1193
1326
|
});
|
|
1194
1327
|
return;
|
|
1195
1328
|
}
|
|
1196
|
-
|
|
1197
|
-
...
|
|
1329
|
+
U(!1), L({
|
|
1330
|
+
...I,
|
|
1198
1331
|
pageId: e.target.value || void 0
|
|
1199
1332
|
});
|
|
1200
1333
|
},
|
|
1201
1334
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1202
|
-
disabled: !
|
|
1203
|
-
"aria-label":
|
|
1335
|
+
disabled: !I.productId,
|
|
1336
|
+
"aria-label": m("tourBuilder.labelPageId", "Page ID"),
|
|
1204
1337
|
children: [
|
|
1205
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ d("option", {
|
|
1206
1339
|
value: "",
|
|
1207
|
-
children:
|
|
1340
|
+
children: m("tourBuilder.allPages", "All pages")
|
|
1208
1341
|
}),
|
|
1209
|
-
|
|
1342
|
+
Q.map((e) => /* @__PURE__ */ f("option", {
|
|
1210
1343
|
value: e.pageId,
|
|
1211
1344
|
children: [
|
|
1212
1345
|
e.label,
|
|
@@ -1215,207 +1348,207 @@ function x() {
|
|
|
1215
1348
|
")"
|
|
1216
1349
|
]
|
|
1217
1350
|
}, e.pageId)),
|
|
1218
|
-
|
|
1219
|
-
value:
|
|
1220
|
-
children:
|
|
1351
|
+
Xe ? /* @__PURE__ */ d("option", {
|
|
1352
|
+
value: I.pageId,
|
|
1353
|
+
children: m("tourBuilder.currentValue", "Current: {{value}}", { value: I.pageId ?? "" })
|
|
1221
1354
|
}) : null,
|
|
1222
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ d("option", {
|
|
1223
1356
|
value: "__custom__",
|
|
1224
|
-
children:
|
|
1357
|
+
children: m("tourBuilder.customPageId", "Custom page ID")
|
|
1225
1358
|
})
|
|
1226
1359
|
]
|
|
1227
1360
|
}),
|
|
1228
|
-
|
|
1361
|
+
H ? /* @__PURE__ */ d("input", {
|
|
1229
1362
|
id: "page-id-custom",
|
|
1230
|
-
"aria-label":
|
|
1363
|
+
"aria-label": m("tourBuilder.customPageId", "Custom page ID"),
|
|
1231
1364
|
type: "text",
|
|
1232
|
-
value:
|
|
1233
|
-
onChange: (e) =>
|
|
1234
|
-
...
|
|
1365
|
+
value: I.pageId || "",
|
|
1366
|
+
onChange: (e) => L({
|
|
1367
|
+
...I,
|
|
1235
1368
|
pageId: e.target.value || void 0
|
|
1236
1369
|
}),
|
|
1237
1370
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1238
|
-
placeholder:
|
|
1371
|
+
placeholder: m("tourBuilder.pageSlugPlaceholder", "agents")
|
|
1239
1372
|
}) : null
|
|
1240
1373
|
] })]
|
|
1241
1374
|
}),
|
|
1242
|
-
/* @__PURE__ */
|
|
1375
|
+
/* @__PURE__ */ f("label", {
|
|
1243
1376
|
className: "flex items-center gap-3 cursor-pointer",
|
|
1244
|
-
children: [/* @__PURE__ */
|
|
1377
|
+
children: [/* @__PURE__ */ d("input", {
|
|
1245
1378
|
type: "checkbox",
|
|
1246
|
-
checked:
|
|
1247
|
-
onChange: (e) =>
|
|
1248
|
-
...
|
|
1379
|
+
checked: I.isActive ?? !0,
|
|
1380
|
+
onChange: (e) => L({
|
|
1381
|
+
...I,
|
|
1249
1382
|
isActive: e.target.checked
|
|
1250
1383
|
}),
|
|
1251
1384
|
className: "size-4 rounded",
|
|
1252
|
-
"aria-label":
|
|
1253
|
-
}), /* @__PURE__ */
|
|
1385
|
+
"aria-label": m("tourBuilder.labelActive", "Active")
|
|
1386
|
+
}), /* @__PURE__ */ d("span", {
|
|
1254
1387
|
className: "text-sm font-medium",
|
|
1255
|
-
children:
|
|
1388
|
+
children: m("tourBuilder.labelActive", "Active")
|
|
1256
1389
|
})]
|
|
1257
1390
|
})
|
|
1258
1391
|
]
|
|
1259
1392
|
})]
|
|
1260
1393
|
}),
|
|
1261
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ f(ge, {
|
|
1262
1395
|
treatment: "plain",
|
|
1263
1396
|
className: "p-4 sm:p-6 border-border-seam",
|
|
1264
|
-
children: [/* @__PURE__ */
|
|
1397
|
+
children: [/* @__PURE__ */ d("h2", {
|
|
1265
1398
|
className: "text-lg font-semibold mb-4",
|
|
1266
|
-
children:
|
|
1267
|
-
}), /* @__PURE__ */
|
|
1399
|
+
children: m("tourBuilder.sectionTriggerSettings")
|
|
1400
|
+
}), /* @__PURE__ */ f("div", {
|
|
1268
1401
|
className: "space-y-4",
|
|
1269
1402
|
children: [
|
|
1270
|
-
/* @__PURE__ */
|
|
1403
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
1271
1404
|
className: "block text-sm font-medium mb-2",
|
|
1272
1405
|
htmlFor: "trigger-type",
|
|
1273
|
-
children:
|
|
1274
|
-
}), /* @__PURE__ */
|
|
1406
|
+
children: m("tourBuilder.labelTriggerType")
|
|
1407
|
+
}), /* @__PURE__ */ f("select", {
|
|
1275
1408
|
id: "trigger-type",
|
|
1276
|
-
value:
|
|
1277
|
-
onChange: (e) =>
|
|
1278
|
-
...
|
|
1409
|
+
value: I.triggerType || "MANUAL",
|
|
1410
|
+
onChange: (e) => L({
|
|
1411
|
+
...I,
|
|
1279
1412
|
triggerType: e.target.value
|
|
1280
1413
|
}),
|
|
1281
1414
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1282
|
-
"aria-label":
|
|
1415
|
+
"aria-label": m("tourBuilder.labelTriggerType"),
|
|
1283
1416
|
children: [
|
|
1284
|
-
/* @__PURE__ */
|
|
1417
|
+
/* @__PURE__ */ d("option", {
|
|
1285
1418
|
value: "MANUAL",
|
|
1286
|
-
children:
|
|
1419
|
+
children: m("tourBuilder.triggerManual")
|
|
1287
1420
|
}),
|
|
1288
|
-
/* @__PURE__ */
|
|
1421
|
+
/* @__PURE__ */ d("option", {
|
|
1289
1422
|
value: "AUTO_FIRST_VISIT",
|
|
1290
|
-
children:
|
|
1423
|
+
children: m("tourBuilder.triggerAutoFirstVisit")
|
|
1291
1424
|
}),
|
|
1292
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ d("option", {
|
|
1293
1426
|
value: "AUTO_ALWAYS",
|
|
1294
|
-
children:
|
|
1427
|
+
children: m("tourBuilder.triggerAutoAlways")
|
|
1295
1428
|
}),
|
|
1296
|
-
/* @__PURE__ */
|
|
1429
|
+
/* @__PURE__ */ d("option", {
|
|
1297
1430
|
value: "ON_EVENT",
|
|
1298
|
-
children:
|
|
1431
|
+
children: m("tourBuilder.triggerOnEvent")
|
|
1299
1432
|
}),
|
|
1300
|
-
/* @__PURE__ */
|
|
1433
|
+
/* @__PURE__ */ d("option", {
|
|
1301
1434
|
value: "SCHEDULED",
|
|
1302
|
-
children:
|
|
1435
|
+
children: m("tourBuilder.triggerScheduled")
|
|
1303
1436
|
})
|
|
1304
1437
|
]
|
|
1305
1438
|
})] }),
|
|
1306
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
1307
1440
|
className: "block text-sm font-medium mb-2",
|
|
1308
1441
|
htmlFor: "priority",
|
|
1309
|
-
children:
|
|
1310
|
-
}), /* @__PURE__ */
|
|
1442
|
+
children: m("tourBuilder.labelPriority")
|
|
1443
|
+
}), /* @__PURE__ */ d("input", {
|
|
1311
1444
|
id: "priority",
|
|
1312
1445
|
type: "number",
|
|
1313
1446
|
min: "1",
|
|
1314
1447
|
max: "100",
|
|
1315
|
-
value:
|
|
1448
|
+
value: I.priority || 50,
|
|
1316
1449
|
onChange: (e) => {
|
|
1317
1450
|
let t = Number.parseInt(e.target.value, 10) || 50;
|
|
1318
|
-
|
|
1319
|
-
...
|
|
1451
|
+
L({
|
|
1452
|
+
...I,
|
|
1320
1453
|
priority: t
|
|
1321
1454
|
});
|
|
1322
1455
|
},
|
|
1323
1456
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1324
|
-
"aria-label":
|
|
1457
|
+
"aria-label": m("tourBuilder.labelPriority")
|
|
1325
1458
|
})] }),
|
|
1326
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ f("div", {
|
|
1327
1460
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1328
|
-
children: [/* @__PURE__ */
|
|
1461
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
1329
1462
|
className: "block text-sm font-medium mb-2",
|
|
1330
1463
|
htmlFor: "tour-start-date",
|
|
1331
|
-
children:
|
|
1332
|
-
}), /* @__PURE__ */
|
|
1464
|
+
children: m("tourBuilder.labelStartDate", "Start Date")
|
|
1465
|
+
}), /* @__PURE__ */ d("input", {
|
|
1333
1466
|
id: "tour-start-date",
|
|
1334
1467
|
type: "datetime-local",
|
|
1335
|
-
value:
|
|
1336
|
-
onChange: (e) =>
|
|
1337
|
-
...
|
|
1468
|
+
value: $e(I.startDate),
|
|
1469
|
+
onChange: (e) => L({
|
|
1470
|
+
...I,
|
|
1338
1471
|
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1339
1472
|
}),
|
|
1340
1473
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1341
|
-
"aria-label":
|
|
1342
|
-
})] }), /* @__PURE__ */
|
|
1474
|
+
"aria-label": m("tourBuilder.labelStartDate", "Start Date")
|
|
1475
|
+
})] }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("label", {
|
|
1343
1476
|
className: "block text-sm font-medium mb-2",
|
|
1344
1477
|
htmlFor: "tour-end-date",
|
|
1345
|
-
children:
|
|
1346
|
-
}), /* @__PURE__ */
|
|
1478
|
+
children: m("tourBuilder.labelEndDate", "End Date")
|
|
1479
|
+
}), /* @__PURE__ */ d("input", {
|
|
1347
1480
|
id: "tour-end-date",
|
|
1348
1481
|
type: "datetime-local",
|
|
1349
|
-
value:
|
|
1350
|
-
onChange: (e) =>
|
|
1351
|
-
...
|
|
1482
|
+
value: $e(I.endDate),
|
|
1483
|
+
onChange: (e) => L({
|
|
1484
|
+
...I,
|
|
1352
1485
|
endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1353
1486
|
}),
|
|
1354
1487
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1355
|
-
"aria-label":
|
|
1488
|
+
"aria-label": m("tourBuilder.labelEndDate", "End Date")
|
|
1356
1489
|
})] })]
|
|
1357
1490
|
})
|
|
1358
1491
|
]
|
|
1359
1492
|
})]
|
|
1360
1493
|
}),
|
|
1361
|
-
|
|
1494
|
+
Ae && /* @__PURE__ */ f("div", {
|
|
1362
1495
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1363
|
-
children: [/* @__PURE__ */
|
|
1496
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
1364
1497
|
className: "font-semibold text-status-error-text mb-2",
|
|
1365
|
-
children:
|
|
1366
|
-
}), /* @__PURE__ */
|
|
1498
|
+
children: m("tourBuilder.errorTitle")
|
|
1499
|
+
}), /* @__PURE__ */ d("p", {
|
|
1367
1500
|
className: "text-sm text-status-error-text",
|
|
1368
|
-
children:
|
|
1501
|
+
children: Ae.message
|
|
1369
1502
|
})]
|
|
1370
1503
|
}),
|
|
1371
|
-
|
|
1504
|
+
P.length > 0 && /* @__PURE__ */ f("div", {
|
|
1372
1505
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1373
|
-
children: [/* @__PURE__ */
|
|
1506
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
1374
1507
|
className: "font-semibold text-status-error-text mb-2",
|
|
1375
|
-
children:
|
|
1376
|
-
}), /* @__PURE__ */
|
|
1508
|
+
children: m("tourBuilder.validationErrorsTitle")
|
|
1509
|
+
}), /* @__PURE__ */ d("ul", {
|
|
1377
1510
|
className: "list-disc list-inside space-y-1",
|
|
1378
|
-
children:
|
|
1511
|
+
children: P.map((e) => /* @__PURE__ */ d("li", {
|
|
1379
1512
|
className: "text-sm text-status-error-text",
|
|
1380
|
-
children:
|
|
1513
|
+
children: m(e.message, e.params)
|
|
1381
1514
|
}, e.field))
|
|
1382
1515
|
})]
|
|
1383
1516
|
}),
|
|
1384
|
-
/* @__PURE__ */
|
|
1517
|
+
/* @__PURE__ */ f("div", {
|
|
1385
1518
|
className: "flex flex-wrap items-center gap-3",
|
|
1386
|
-
children: [/* @__PURE__ */
|
|
1387
|
-
permission:
|
|
1388
|
-
children: /* @__PURE__ */
|
|
1519
|
+
children: [/* @__PURE__ */ d(re, {
|
|
1520
|
+
permission: w ? a.TOUR_CREATE : a.TOUR_UPDATE,
|
|
1521
|
+
children: /* @__PURE__ */ f(me, {
|
|
1389
1522
|
type: "submit",
|
|
1390
|
-
disabled:
|
|
1523
|
+
disabled: N || !D,
|
|
1391
1524
|
className: "flex-1 min-w-[200px] min-h-[44px]",
|
|
1392
|
-
children: [/* @__PURE__ */
|
|
1525
|
+
children: [/* @__PURE__ */ d(ue, { size: 20 }), m(N ? "tourBuilder.saving" : g && g !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
1393
1526
|
})
|
|
1394
|
-
}),
|
|
1527
|
+
}), g && g !== "new" && it.length > 0 && /* @__PURE__ */ d(he, { actions: it })]
|
|
1395
1528
|
})
|
|
1396
1529
|
]
|
|
1397
1530
|
})
|
|
1398
1531
|
]
|
|
1399
|
-
}) : /* @__PURE__ */
|
|
1532
|
+
}) : /* @__PURE__ */ d("div", {
|
|
1400
1533
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
1401
|
-
children: /* @__PURE__ */
|
|
1534
|
+
children: /* @__PURE__ */ f("div", {
|
|
1402
1535
|
className: "text-center space-y-4",
|
|
1403
|
-
children: [/* @__PURE__ */
|
|
1536
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h2", {
|
|
1404
1537
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
1405
|
-
children:
|
|
1406
|
-
}), /* @__PURE__ */
|
|
1538
|
+
children: m("tourBuilder.accessDeniedTitle")
|
|
1539
|
+
}), /* @__PURE__ */ d("p", {
|
|
1407
1540
|
className: "text-sm text-text-secondary",
|
|
1408
|
-
children:
|
|
1409
|
-
})] }), /* @__PURE__ */
|
|
1541
|
+
children: m(w ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
|
|
1542
|
+
})] }), /* @__PURE__ */ d("button", {
|
|
1410
1543
|
type: "button",
|
|
1411
|
-
onClick:
|
|
1544
|
+
onClick: Qe,
|
|
1412
1545
|
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",
|
|
1413
|
-
children:
|
|
1546
|
+
children: m("tourBuilder.goBack")
|
|
1414
1547
|
})]
|
|
1415
1548
|
})
|
|
1416
1549
|
});
|
|
1417
1550
|
}
|
|
1418
1551
|
//#endregion
|
|
1419
|
-
export {
|
|
1552
|
+
export { y as TourBuilderPage };
|
|
1420
1553
|
|
|
1421
1554
|
//# sourceMappingURL=TourBuilderPage.js.map
|