@burdenoff/microfe-tours 2026.830.1 → 2026.830.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +279 -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",
|
|
@@ -647,39 +647,39 @@ var g = [
|
|
|
647
647
|
path: "/collabkin/timeline"
|
|
648
648
|
}
|
|
649
649
|
];
|
|
650
|
-
function
|
|
650
|
+
function y(e) {
|
|
651
651
|
return e?.trim() || void 0;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
let t =
|
|
655
|
-
return t ?
|
|
653
|
+
function b(e) {
|
|
654
|
+
let t = y(e);
|
|
655
|
+
return t ? v.filter((e) => e.productId === t) : [];
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function Se(e) {
|
|
658
658
|
let t = /* @__PURE__ */ new Map();
|
|
659
|
-
for (let n of
|
|
659
|
+
for (let n of b(e)) (!t.get(n.moduleId) || n.isModuleHome) && t.set(n.moduleId, {
|
|
660
660
|
moduleId: n.moduleId,
|
|
661
661
|
label: n.moduleLabel,
|
|
662
662
|
path: n.path
|
|
663
663
|
});
|
|
664
664
|
return [...t.values()];
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
let n =
|
|
668
|
-
return n ?
|
|
666
|
+
function Ce(e, t) {
|
|
667
|
+
let n = y(t);
|
|
668
|
+
return n ? b(e).flatMap((e) => e.moduleId === n ? [{
|
|
669
669
|
pageId: e.pageId,
|
|
670
670
|
label: e.pageLabel,
|
|
671
671
|
path: e.path
|
|
672
672
|
}] : []) : [];
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
let { tr:
|
|
674
|
+
function x() {
|
|
675
|
+
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
676
|
variables: {
|
|
677
|
-
limit:
|
|
677
|
+
limit: ve,
|
|
678
678
|
offset: 0
|
|
679
679
|
},
|
|
680
680
|
fetchPolicy: "cache-and-network",
|
|
681
|
-
skip:
|
|
682
|
-
}), [F, I] =
|
|
681
|
+
skip: T || !k
|
|
682
|
+
}), [F, I] = l({
|
|
683
683
|
name: "",
|
|
684
684
|
description: "",
|
|
685
685
|
productId: "",
|
|
@@ -692,17 +692,17 @@ function y() {
|
|
|
692
692
|
displayOrder: 1,
|
|
693
693
|
startDate: "",
|
|
694
694
|
endDate: ""
|
|
695
|
-
}), [L, R] =
|
|
696
|
-
|
|
697
|
-
G.current || !
|
|
695
|
+
}), [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]);
|
|
696
|
+
s(() => {
|
|
697
|
+
G.current || !T && k && v && v !== "new" && N(v);
|
|
698
698
|
}, [
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
]),
|
|
704
|
-
|
|
705
|
-
}, [
|
|
699
|
+
k,
|
|
700
|
+
N,
|
|
701
|
+
T,
|
|
702
|
+
v
|
|
703
|
+
]), s(() => {
|
|
704
|
+
M && !G.current && (I(M), G.current = !0);
|
|
705
|
+
}, [M]), s(() => {
|
|
706
706
|
if (!F.productId || P) {
|
|
707
707
|
R(!1);
|
|
708
708
|
return;
|
|
@@ -713,7 +713,7 @@ function y() {
|
|
|
713
713
|
q,
|
|
714
714
|
K.length,
|
|
715
715
|
P
|
|
716
|
-
]),
|
|
716
|
+
]), s(() => {
|
|
717
717
|
if (!F.productId || !F.moduleId) {
|
|
718
718
|
B(!1);
|
|
719
719
|
return;
|
|
@@ -724,7 +724,7 @@ function y() {
|
|
|
724
724
|
F.productId,
|
|
725
725
|
Y,
|
|
726
726
|
J.length
|
|
727
|
-
]),
|
|
727
|
+
]), s(() => {
|
|
728
728
|
if (!F.productId || !F.pageId) {
|
|
729
729
|
H(!1);
|
|
730
730
|
return;
|
|
@@ -739,198 +739,198 @@ function y() {
|
|
|
739
739
|
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
740
|
e.preventDefault();
|
|
741
741
|
try {
|
|
742
|
-
|
|
742
|
+
v && v !== "new" ? await Ee(v, F) : await Te(F);
|
|
743
743
|
} catch {
|
|
744
|
-
|
|
744
|
+
o(S, "tour.save", b);
|
|
745
745
|
}
|
|
746
746
|
}, Q = () => {
|
|
747
|
-
|
|
747
|
+
y(`${x}/list`);
|
|
748
748
|
}, Ke = (e) => {
|
|
749
749
|
if (!e) return "";
|
|
750
750
|
let t = new Date(e);
|
|
751
751
|
return Number.isNaN(t.getTime()) ? "" : (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 16);
|
|
752
752
|
}, qe = async () => {
|
|
753
|
-
if (!
|
|
754
|
-
let e =
|
|
753
|
+
if (!v || v === "new") return;
|
|
754
|
+
let e = _("tourBuilder.templateDefaultName", "{{name}} Template", { name: F.name || M?.name || "Tour" }), t = window.prompt(_("tourBuilder.templateNamePrompt", "Template name"), e);
|
|
755
755
|
if (!t) return;
|
|
756
|
-
let n = window.prompt("Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)", "ONBOARDING") || "ONBOARDING";
|
|
756
|
+
let n = window.prompt(_("tourBuilder.templateCategoryPrompt", "Template category (ONBOARDING, FEATURE_ANNOUNCEMENT, HELP, CUSTOM)"), "ONBOARDING") || "ONBOARDING";
|
|
757
757
|
try {
|
|
758
|
-
await Ae(
|
|
758
|
+
await Ae(v, {
|
|
759
759
|
name: t,
|
|
760
760
|
description: F.description,
|
|
761
761
|
category: n,
|
|
762
762
|
isPublic: !1
|
|
763
|
-
}),
|
|
763
|
+
}), y(`${x}/templates`);
|
|
764
764
|
} catch {
|
|
765
|
-
|
|
765
|
+
o(S, "template.save", b);
|
|
766
766
|
}
|
|
767
767
|
}, Je = async () => {
|
|
768
|
-
if (window.confirm(
|
|
768
|
+
if (window.confirm(_("tourBuilder.seedVibeControls.confirm"))) {
|
|
769
769
|
Ne(!0), Pe(null), Ie(null);
|
|
770
770
|
try {
|
|
771
|
-
let e = await
|
|
771
|
+
let e = await C.mutate({ mutation: ye }), t = xe(e, _("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
772
772
|
if (t) throw Error(t);
|
|
773
773
|
let n = e.data?.seedVibeControlsUserTours;
|
|
774
|
-
if (!n) throw Error("Seed mutation returned no result.");
|
|
774
|
+
if (!n) throw Error(_("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
775
775
|
Pe(n);
|
|
776
776
|
} catch (e) {
|
|
777
|
-
let t = e instanceof Error ? e.message :
|
|
778
|
-
Ie(t),
|
|
777
|
+
let t = e instanceof Error ? e.message : _("tourBuilder.seedVibeControls.error");
|
|
778
|
+
Ie(t), S.emit("tours.api.failed", {
|
|
779
779
|
route: "/tours",
|
|
780
780
|
operation: "tour.seed_vibecontrols_user_tours",
|
|
781
781
|
errorMessage: t,
|
|
782
|
-
productId:
|
|
783
|
-
workspaceId:
|
|
782
|
+
productId: b.productId,
|
|
783
|
+
workspaceId: b.workspaceId
|
|
784
784
|
}, { component: "microfe-tours" });
|
|
785
785
|
} finally {
|
|
786
786
|
Ne(!1);
|
|
787
787
|
}
|
|
788
788
|
}
|
|
789
789
|
}, Ye = async () => {
|
|
790
|
-
if (window.confirm(
|
|
790
|
+
if (window.confirm(_("tourBuilder.seedBuildmyiq.confirm"))) {
|
|
791
791
|
Re(!0), ze(null), Ve(null);
|
|
792
792
|
try {
|
|
793
|
-
let e = await
|
|
793
|
+
let e = await C.mutate({ mutation: be }), t = xe(e, _("tourBuilder.seedMutationErrors", "Seed mutation returned errors."));
|
|
794
794
|
if (t) throw Error(t);
|
|
795
795
|
let n = e.data?.seedBuildmyiqUserTours;
|
|
796
|
-
if (!n) throw Error("Seed mutation returned no result.");
|
|
796
|
+
if (!n) throw Error(_("tourBuilder.seedMutationNoResult", "Seed mutation returned no result."));
|
|
797
797
|
ze(n);
|
|
798
798
|
} catch (e) {
|
|
799
|
-
let t = e instanceof Error ? e.message :
|
|
800
|
-
Ve(t),
|
|
799
|
+
let t = e instanceof Error ? e.message : _("tourBuilder.seedBuildmyiq.error");
|
|
800
|
+
Ve(t), S.emit("tours.api.failed", {
|
|
801
801
|
route: "/tours",
|
|
802
802
|
operation: "tour.seed_buildmyiq_user_tours",
|
|
803
803
|
errorMessage: t,
|
|
804
|
-
productId:
|
|
805
|
-
workspaceId:
|
|
804
|
+
productId: b.productId,
|
|
805
|
+
workspaceId: b.workspaceId
|
|
806
806
|
}, { component: "microfe-tours" });
|
|
807
807
|
} finally {
|
|
808
808
|
Re(!1);
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
}, Xe =
|
|
811
|
+
}, Xe = v && v !== "new" ? [
|
|
812
812
|
{
|
|
813
|
-
label:
|
|
814
|
-
onSelect: () =>
|
|
815
|
-
icon: /* @__PURE__ */ p
|
|
813
|
+
label: M?.steps && M.steps.length > 0 ? `${_("tourBuilder.editSteps")} (${M.steps.length})` : _("tourBuilder.editSteps"),
|
|
814
|
+
onSelect: () => y(`${x}/${v}/steps`),
|
|
815
|
+
icon: /* @__PURE__ */ h(p, { size: 16 })
|
|
816
816
|
},
|
|
817
817
|
{
|
|
818
|
-
label:
|
|
819
|
-
onSelect: () =>
|
|
820
|
-
icon: /* @__PURE__ */
|
|
818
|
+
label: _("tourBuilder.preview"),
|
|
819
|
+
onSelect: () => y(`${x}/${v}/preview`),
|
|
820
|
+
icon: /* @__PURE__ */ h(f, { size: 16 })
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
|
-
label:
|
|
824
|
-
onSelect: () =>
|
|
825
|
-
icon: /* @__PURE__ */
|
|
823
|
+
label: _("tourBuilder.analytics"),
|
|
824
|
+
onSelect: () => y(`${x}/${v}/analytics`),
|
|
825
|
+
icon: /* @__PURE__ */ h(u, { size: 16 })
|
|
826
826
|
},
|
|
827
827
|
{
|
|
828
|
-
label: "Schedule",
|
|
829
|
-
onSelect: () =>
|
|
830
|
-
icon: /* @__PURE__ */
|
|
828
|
+
label: _("tourBuilder.schedule", "Schedule"),
|
|
829
|
+
onSelect: () => y(`${x}/${v}/schedule`),
|
|
830
|
+
icon: /* @__PURE__ */ h(d, { size: 16 })
|
|
831
831
|
},
|
|
832
|
-
...
|
|
833
|
-
label: "Save as Template",
|
|
832
|
+
...we ? [{
|
|
833
|
+
label: _("tourBuilder.saveAsTemplate", "Save as Template"),
|
|
834
834
|
onSelect: () => void qe(),
|
|
835
|
-
icon: /* @__PURE__ */
|
|
835
|
+
icon: /* @__PURE__ */ h(ae, { size: 16 })
|
|
836
836
|
}] : []
|
|
837
|
-
] : [], $ =
|
|
837
|
+
] : [], $ = v && v !== "new" && O ? [
|
|
838
838
|
{
|
|
839
839
|
id: "edit-steps",
|
|
840
|
-
label:
|
|
841
|
-
description:
|
|
842
|
-
icon: /* @__PURE__ */ p
|
|
843
|
-
onClick: () =>
|
|
840
|
+
label: _("tourBuilder.nextStepEditSteps"),
|
|
841
|
+
description: _("tourBuilder.nextStepEditStepsDesc"),
|
|
842
|
+
icon: /* @__PURE__ */ h(p, { size: 16 }),
|
|
843
|
+
onClick: () => y(`${x}/${v}/steps`)
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
846
|
id: "preview",
|
|
847
|
-
label:
|
|
848
|
-
description:
|
|
849
|
-
icon: /* @__PURE__ */
|
|
850
|
-
onClick: () =>
|
|
847
|
+
label: _("tourBuilder.nextStepPreview"),
|
|
848
|
+
description: _("tourBuilder.nextStepPreviewDesc"),
|
|
849
|
+
icon: /* @__PURE__ */ h(f, { size: 16 }),
|
|
850
|
+
onClick: () => y(`${x}/${v}/preview`)
|
|
851
851
|
},
|
|
852
852
|
{
|
|
853
853
|
id: "schedule",
|
|
854
|
-
label:
|
|
855
|
-
description:
|
|
856
|
-
icon: /* @__PURE__ */
|
|
857
|
-
onClick: () =>
|
|
854
|
+
label: _("tourBuilder.nextStepSchedule"),
|
|
855
|
+
description: _("tourBuilder.nextStepScheduleDesc"),
|
|
856
|
+
icon: /* @__PURE__ */ h(d, { size: 16 }),
|
|
857
|
+
onClick: () => y(`${x}/${v}/schedule`)
|
|
858
858
|
},
|
|
859
859
|
{
|
|
860
860
|
id: "analytics",
|
|
861
|
-
label:
|
|
862
|
-
description:
|
|
863
|
-
icon: /* @__PURE__ */
|
|
864
|
-
onClick: () =>
|
|
861
|
+
label: _("tourBuilder.nextStepAnalytics"),
|
|
862
|
+
description: _("tourBuilder.nextStepAnalyticsDesc"),
|
|
863
|
+
icon: /* @__PURE__ */ h(u, { size: 16 }),
|
|
864
|
+
onClick: () => y(`${x}/${v}/analytics`)
|
|
865
865
|
}
|
|
866
866
|
] : [];
|
|
867
|
-
return
|
|
867
|
+
return T ? /* @__PURE__ */ h("div", {
|
|
868
868
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
869
|
-
children: /* @__PURE__ */
|
|
869
|
+
children: /* @__PURE__ */ h("p", {
|
|
870
870
|
className: "text-sm text-text-secondary",
|
|
871
|
-
children:
|
|
871
|
+
children: _("tourBuilder.loading")
|
|
872
872
|
})
|
|
873
|
-
}) :
|
|
873
|
+
}) : k ? /* @__PURE__ */ g("div", {
|
|
874
874
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-4xl mx-auto",
|
|
875
875
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ g("div", {
|
|
877
877
|
className: "flex items-center gap-4",
|
|
878
|
-
children: [/* @__PURE__ */
|
|
878
|
+
children: [/* @__PURE__ */ h("button", {
|
|
879
879
|
type: "button",
|
|
880
880
|
onClick: Q,
|
|
881
881
|
className: "p-2 hover:bg-accent rounded-md",
|
|
882
|
-
"aria-label":
|
|
883
|
-
children: /* @__PURE__ */
|
|
884
|
-
}), /* @__PURE__ */
|
|
882
|
+
"aria-label": _("tourBuilder.goBack"),
|
|
883
|
+
children: /* @__PURE__ */ h(ie, { size: 20 })
|
|
884
|
+
}), /* @__PURE__ */ g("div", {
|
|
885
885
|
className: "flex-1",
|
|
886
|
-
children: [/* @__PURE__ */
|
|
886
|
+
children: [/* @__PURE__ */ h("h1", {
|
|
887
887
|
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
888
|
-
children:
|
|
889
|
-
}), /* @__PURE__ */
|
|
888
|
+
children: _(v && v !== "new" ? "tourBuilder.titleEdit" : "tourBuilder.titleCreate")
|
|
889
|
+
}), /* @__PURE__ */ h("p", {
|
|
890
890
|
className: "text-sm text-text-secondary",
|
|
891
|
-
children:
|
|
891
|
+
children: _("tourBuilder.subtitle")
|
|
892
892
|
})]
|
|
893
893
|
})]
|
|
894
894
|
}),
|
|
895
|
-
/* @__PURE__ */
|
|
896
|
-
$.length > 0 ? /* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ h(he, { children: _("tourBuilder.purpose") }),
|
|
896
|
+
$.length > 0 ? /* @__PURE__ */ h(me, {
|
|
897
897
|
storageKey: "tours-builder",
|
|
898
|
-
title:
|
|
898
|
+
title: _("tourBuilder.nextStepsTitle"),
|
|
899
899
|
steps: $
|
|
900
900
|
}) : null,
|
|
901
|
-
|
|
901
|
+
E ? /* @__PURE__ */ g(se, { children: [/* @__PURE__ */ g(fe, {
|
|
902
902
|
className: "p-4 sm:p-6",
|
|
903
903
|
children: [
|
|
904
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ g("div", {
|
|
905
905
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
906
|
-
children: [/* @__PURE__ */
|
|
906
|
+
children: [/* @__PURE__ */ g("div", {
|
|
907
907
|
className: "space-y-1",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
908
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
909
909
|
className: "text-lg font-semibold text-text-primary",
|
|
910
|
-
children:
|
|
911
|
-
}), /* @__PURE__ */
|
|
910
|
+
children: _("tourBuilder.seedVibeControls.title")
|
|
911
|
+
}), /* @__PURE__ */ h("p", {
|
|
912
912
|
className: "text-sm text-text-secondary",
|
|
913
|
-
children:
|
|
913
|
+
children: _("tourBuilder.seedVibeControls.description")
|
|
914
914
|
})]
|
|
915
|
-
}), /* @__PURE__ */
|
|
915
|
+
}), /* @__PURE__ */ g("button", {
|
|
916
916
|
type: "button",
|
|
917
917
|
onClick: () => void Je(),
|
|
918
|
-
disabled: Me || !
|
|
918
|
+
disabled: Me || !A,
|
|
919
919
|
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__ */
|
|
920
|
+
children: [/* @__PURE__ */ h(m, { size: 18 }), _(Me ? "tourBuilder.seedVibeControls.loading" : "tourBuilder.seedVibeControls.button")]
|
|
921
921
|
})]
|
|
922
922
|
}),
|
|
923
|
-
|
|
923
|
+
A ? null : /* @__PURE__ */ h("p", {
|
|
924
924
|
className: "mt-3 text-sm text-text-secondary",
|
|
925
|
-
children:
|
|
925
|
+
children: _("tourBuilder.seedVibeControls.permissionHint")
|
|
926
926
|
}),
|
|
927
|
-
Fe ? /* @__PURE__ */
|
|
927
|
+
Fe ? /* @__PURE__ */ h("p", {
|
|
928
928
|
className: "mt-3 text-sm text-status-error-text",
|
|
929
929
|
children: Fe
|
|
930
930
|
}) : null,
|
|
931
|
-
U ? /* @__PURE__ */
|
|
931
|
+
U ? /* @__PURE__ */ h("div", {
|
|
932
932
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
933
|
-
children:
|
|
933
|
+
children: _("tourBuilder.seedVibeControls.result", {
|
|
934
934
|
totalCount: U.totalCount,
|
|
935
935
|
productId: U.productId,
|
|
936
936
|
workspaceId: U.workspaceId,
|
|
@@ -939,39 +939,39 @@ function y() {
|
|
|
939
939
|
})
|
|
940
940
|
}) : null
|
|
941
941
|
]
|
|
942
|
-
}), /* @__PURE__ */
|
|
942
|
+
}), /* @__PURE__ */ g(fe, {
|
|
943
943
|
className: "p-4 sm:p-6",
|
|
944
944
|
children: [
|
|
945
|
-
/* @__PURE__ */
|
|
945
|
+
/* @__PURE__ */ g("div", {
|
|
946
946
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
947
|
-
children: [/* @__PURE__ */
|
|
947
|
+
children: [/* @__PURE__ */ g("div", {
|
|
948
948
|
className: "space-y-1",
|
|
949
|
-
children: [/* @__PURE__ */
|
|
949
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
950
950
|
className: "text-lg font-semibold text-text-primary",
|
|
951
|
-
children:
|
|
952
|
-
}), /* @__PURE__ */
|
|
951
|
+
children: _("tourBuilder.seedBuildmyiq.title")
|
|
952
|
+
}), /* @__PURE__ */ h("p", {
|
|
953
953
|
className: "text-sm text-text-secondary",
|
|
954
|
-
children:
|
|
954
|
+
children: _("tourBuilder.seedBuildmyiq.description")
|
|
955
955
|
})]
|
|
956
|
-
}), /* @__PURE__ */
|
|
956
|
+
}), /* @__PURE__ */ g("button", {
|
|
957
957
|
type: "button",
|
|
958
958
|
onClick: () => void Ye(),
|
|
959
|
-
disabled: Le || !
|
|
959
|
+
disabled: Le || !j,
|
|
960
960
|
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__ */
|
|
961
|
+
children: [/* @__PURE__ */ h(m, { size: 18 }), _(Le ? "tourBuilder.seedBuildmyiq.loading" : "tourBuilder.seedBuildmyiq.button")]
|
|
962
962
|
})]
|
|
963
963
|
}),
|
|
964
|
-
|
|
964
|
+
j ? null : /* @__PURE__ */ h("p", {
|
|
965
965
|
className: "mt-3 text-sm text-text-secondary",
|
|
966
|
-
children:
|
|
966
|
+
children: _("tourBuilder.seedBuildmyiq.permissionHint")
|
|
967
967
|
}),
|
|
968
|
-
Be ? /* @__PURE__ */
|
|
968
|
+
Be ? /* @__PURE__ */ h("p", {
|
|
969
969
|
className: "mt-3 text-sm text-status-error-text",
|
|
970
970
|
children: Be
|
|
971
971
|
}) : null,
|
|
972
|
-
W ? /* @__PURE__ */
|
|
972
|
+
W ? /* @__PURE__ */ h("div", {
|
|
973
973
|
className: "mt-3 rounded-md border border-border-seam bg-bg-surface p-3 text-sm text-text-secondary",
|
|
974
|
-
children:
|
|
974
|
+
children: _("tourBuilder.seedBuildmyiq.result", {
|
|
975
975
|
totalCount: W.totalCount,
|
|
976
976
|
productId: W.productId,
|
|
977
977
|
workspaceId: W.workspaceId,
|
|
@@ -981,24 +981,24 @@ function y() {
|
|
|
981
981
|
}) : null
|
|
982
982
|
]
|
|
983
983
|
})] }) : null,
|
|
984
|
-
/* @__PURE__ */
|
|
984
|
+
/* @__PURE__ */ g("form", {
|
|
985
985
|
onSubmit: Ge,
|
|
986
986
|
className: "space-y-6",
|
|
987
987
|
children: [
|
|
988
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ g(pe, {
|
|
989
989
|
treatment: "plain",
|
|
990
990
|
className: "p-4 sm:p-6 border-border-seam",
|
|
991
|
-
children: [/* @__PURE__ */
|
|
991
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
992
992
|
className: "text-lg font-semibold mb-4",
|
|
993
|
-
children:
|
|
994
|
-
}), /* @__PURE__ */
|
|
993
|
+
children: _("tourBuilder.sectionBasicInfo")
|
|
994
|
+
}), /* @__PURE__ */ g("div", {
|
|
995
995
|
className: "space-y-4",
|
|
996
996
|
children: [
|
|
997
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
998
998
|
className: "block text-sm font-medium mb-2",
|
|
999
999
|
htmlFor: "tour-name",
|
|
1000
|
-
children:
|
|
1001
|
-
}), /* @__PURE__ */
|
|
1000
|
+
children: _("tourBuilder.labelName")
|
|
1001
|
+
}), /* @__PURE__ */ h("input", {
|
|
1002
1002
|
id: "tour-name",
|
|
1003
1003
|
type: "text",
|
|
1004
1004
|
value: F.name || "",
|
|
@@ -1008,26 +1008,26 @@ function y() {
|
|
|
1008
1008
|
}),
|
|
1009
1009
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1010
1010
|
required: !0,
|
|
1011
|
-
"aria-label":
|
|
1011
|
+
"aria-label": _("tourBuilder.labelName")
|
|
1012
1012
|
})] }),
|
|
1013
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ h(ee, {
|
|
1014
1014
|
id: "tour-description",
|
|
1015
|
-
label:
|
|
1015
|
+
label: _("tourBuilder.labelDescription"),
|
|
1016
1016
|
value: F.description || "",
|
|
1017
1017
|
onChange: (e) => I({
|
|
1018
1018
|
...F,
|
|
1019
1019
|
description: e
|
|
1020
1020
|
}),
|
|
1021
1021
|
rows: 4,
|
|
1022
|
-
"aria-label":
|
|
1022
|
+
"aria-label": _("tourBuilder.labelDescription")
|
|
1023
1023
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1024
|
+
/* @__PURE__ */ g("div", { children: [
|
|
1025
|
+
/* @__PURE__ */ h("label", {
|
|
1026
1026
|
className: "block text-sm font-medium mb-2",
|
|
1027
1027
|
htmlFor: "product-id",
|
|
1028
|
-
children:
|
|
1028
|
+
children: _("tourBuilder.labelProductId")
|
|
1029
1029
|
}),
|
|
1030
|
-
/* @__PURE__ */
|
|
1030
|
+
/* @__PURE__ */ g("select", {
|
|
1031
1031
|
id: "product-id",
|
|
1032
1032
|
value: L ? "__custom__" : F.productId || "",
|
|
1033
1033
|
onChange: (e) => {
|
|
@@ -1049,17 +1049,17 @@ function y() {
|
|
|
1049
1049
|
},
|
|
1050
1050
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1051
1051
|
required: !0,
|
|
1052
|
-
"aria-label":
|
|
1052
|
+
"aria-label": _("tourBuilder.labelProductId"),
|
|
1053
1053
|
children: [
|
|
1054
|
-
/* @__PURE__ */
|
|
1054
|
+
/* @__PURE__ */ h("option", {
|
|
1055
1055
|
value: "",
|
|
1056
|
-
children: "Select product"
|
|
1056
|
+
children: _("tourBuilder.selectProduct", "Select product")
|
|
1057
1057
|
}),
|
|
1058
|
-
P ? /* @__PURE__ */
|
|
1058
|
+
P ? /* @__PURE__ */ h("option", {
|
|
1059
1059
|
disabled: !0,
|
|
1060
|
-
children: "Loading products…"
|
|
1060
|
+
children: _("tourBuilder.loadingProducts", "Loading products…")
|
|
1061
1061
|
}) : null,
|
|
1062
|
-
K.map((e) => /* @__PURE__ */
|
|
1062
|
+
K.map((e) => /* @__PURE__ */ g("option", {
|
|
1063
1063
|
value: e.slug,
|
|
1064
1064
|
children: [
|
|
1065
1065
|
e.name,
|
|
@@ -1068,19 +1068,19 @@ function y() {
|
|
|
1068
1068
|
")"
|
|
1069
1069
|
]
|
|
1070
1070
|
}, e.id)),
|
|
1071
|
-
He ? /* @__PURE__ */
|
|
1071
|
+
He ? /* @__PURE__ */ h("option", {
|
|
1072
1072
|
value: F.productId,
|
|
1073
|
-
children:
|
|
1073
|
+
children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.productId ?? "" })
|
|
1074
1074
|
}) : null,
|
|
1075
|
-
/* @__PURE__ */
|
|
1075
|
+
/* @__PURE__ */ h("option", {
|
|
1076
1076
|
value: "__custom__",
|
|
1077
|
-
children: "Custom product slug"
|
|
1077
|
+
children: _("tourBuilder.customProductSlug", "Custom product slug")
|
|
1078
1078
|
})
|
|
1079
1079
|
]
|
|
1080
1080
|
}),
|
|
1081
|
-
L ? /* @__PURE__ */
|
|
1081
|
+
L ? /* @__PURE__ */ h("input", {
|
|
1082
1082
|
id: "product-id-custom",
|
|
1083
|
-
"aria-label": "Custom product slug",
|
|
1083
|
+
"aria-label": _("tourBuilder.customProductSlug", "Custom product slug"),
|
|
1084
1084
|
type: "text",
|
|
1085
1085
|
value: F.productId || "",
|
|
1086
1086
|
onChange: (e) => I({
|
|
@@ -1090,19 +1090,19 @@ function y() {
|
|
|
1090
1090
|
pageId: void 0
|
|
1091
1091
|
}),
|
|
1092
1092
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1093
|
-
placeholder: "vibecontrols",
|
|
1093
|
+
placeholder: _("tourBuilder.productSlugPlaceholder", "vibecontrols"),
|
|
1094
1094
|
required: !0
|
|
1095
1095
|
}) : null
|
|
1096
1096
|
] }),
|
|
1097
|
-
/* @__PURE__ */
|
|
1097
|
+
/* @__PURE__ */ g("div", {
|
|
1098
1098
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1099
|
-
children: [/* @__PURE__ */
|
|
1100
|
-
/* @__PURE__ */
|
|
1099
|
+
children: [/* @__PURE__ */ g("div", { children: [
|
|
1100
|
+
/* @__PURE__ */ h("label", {
|
|
1101
1101
|
className: "block text-sm font-medium mb-2",
|
|
1102
1102
|
htmlFor: "module-id",
|
|
1103
|
-
children: "Module ID"
|
|
1103
|
+
children: _("tourBuilder.labelModuleId", "Module ID")
|
|
1104
1104
|
}),
|
|
1105
|
-
/* @__PURE__ */
|
|
1105
|
+
/* @__PURE__ */ g("select", {
|
|
1106
1106
|
id: "module-id",
|
|
1107
1107
|
value: z ? "__custom__" : F.moduleId || "",
|
|
1108
1108
|
onChange: (e) => {
|
|
@@ -1122,13 +1122,13 @@ function y() {
|
|
|
1122
1122
|
},
|
|
1123
1123
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1124
1124
|
disabled: !F.productId,
|
|
1125
|
-
"aria-label": "Module ID",
|
|
1125
|
+
"aria-label": _("tourBuilder.labelModuleId", "Module ID"),
|
|
1126
1126
|
children: [
|
|
1127
|
-
/* @__PURE__ */
|
|
1127
|
+
/* @__PURE__ */ h("option", {
|
|
1128
1128
|
value: "",
|
|
1129
|
-
children: "All modules"
|
|
1129
|
+
children: _("tourBuilder.allModules", "All modules")
|
|
1130
1130
|
}),
|
|
1131
|
-
J.map((e) => /* @__PURE__ */
|
|
1131
|
+
J.map((e) => /* @__PURE__ */ g("option", {
|
|
1132
1132
|
value: e.moduleId,
|
|
1133
1133
|
children: [
|
|
1134
1134
|
e.label,
|
|
@@ -1137,19 +1137,19 @@ function y() {
|
|
|
1137
1137
|
")"
|
|
1138
1138
|
]
|
|
1139
1139
|
}, e.moduleId)),
|
|
1140
|
-
Ue ? /* @__PURE__ */
|
|
1140
|
+
Ue ? /* @__PURE__ */ h("option", {
|
|
1141
1141
|
value: F.moduleId,
|
|
1142
|
-
children:
|
|
1142
|
+
children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.moduleId ?? "" })
|
|
1143
1143
|
}) : null,
|
|
1144
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ h("option", {
|
|
1145
1145
|
value: "__custom__",
|
|
1146
|
-
children: "Custom module ID"
|
|
1146
|
+
children: _("tourBuilder.customModuleId", "Custom module ID")
|
|
1147
1147
|
})
|
|
1148
1148
|
]
|
|
1149
1149
|
}),
|
|
1150
|
-
z ? /* @__PURE__ */
|
|
1150
|
+
z ? /* @__PURE__ */ h("input", {
|
|
1151
1151
|
id: "module-id-custom",
|
|
1152
|
-
"aria-label": "Custom module ID",
|
|
1152
|
+
"aria-label": _("tourBuilder.customModuleId", "Custom module ID"),
|
|
1153
1153
|
type: "text",
|
|
1154
1154
|
value: F.moduleId || "",
|
|
1155
1155
|
onChange: (e) => I({
|
|
@@ -1158,15 +1158,15 @@ function y() {
|
|
|
1158
1158
|
pageId: void 0
|
|
1159
1159
|
}),
|
|
1160
1160
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1161
|
-
placeholder: "vibecontrols"
|
|
1161
|
+
placeholder: _("tourBuilder.moduleSlugPlaceholder", "vibecontrols")
|
|
1162
1162
|
}) : null
|
|
1163
|
-
] }), /* @__PURE__ */
|
|
1164
|
-
/* @__PURE__ */
|
|
1163
|
+
] }), /* @__PURE__ */ g("div", { children: [
|
|
1164
|
+
/* @__PURE__ */ h("label", {
|
|
1165
1165
|
className: "block text-sm font-medium mb-2",
|
|
1166
1166
|
htmlFor: "page-id",
|
|
1167
|
-
children: "Page ID"
|
|
1167
|
+
children: _("tourBuilder.labelPageId", "Page ID")
|
|
1168
1168
|
}),
|
|
1169
|
-
/* @__PURE__ */
|
|
1169
|
+
/* @__PURE__ */ g("select", {
|
|
1170
1170
|
id: "page-id",
|
|
1171
1171
|
value: V ? "__custom__" : F.pageId || "",
|
|
1172
1172
|
onChange: (e) => {
|
|
@@ -1184,13 +1184,13 @@ function y() {
|
|
|
1184
1184
|
},
|
|
1185
1185
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1186
1186
|
disabled: !F.productId,
|
|
1187
|
-
"aria-label": "Page ID",
|
|
1187
|
+
"aria-label": _("tourBuilder.labelPageId", "Page ID"),
|
|
1188
1188
|
children: [
|
|
1189
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ h("option", {
|
|
1190
1190
|
value: "",
|
|
1191
|
-
children: "All pages"
|
|
1191
|
+
children: _("tourBuilder.allPages", "All pages")
|
|
1192
1192
|
}),
|
|
1193
|
-
X.map((e) => /* @__PURE__ */
|
|
1193
|
+
X.map((e) => /* @__PURE__ */ g("option", {
|
|
1194
1194
|
value: e.pageId,
|
|
1195
1195
|
children: [
|
|
1196
1196
|
e.label,
|
|
@@ -1199,19 +1199,19 @@ function y() {
|
|
|
1199
1199
|
")"
|
|
1200
1200
|
]
|
|
1201
1201
|
}, e.pageId)),
|
|
1202
|
-
We ? /* @__PURE__ */
|
|
1202
|
+
We ? /* @__PURE__ */ h("option", {
|
|
1203
1203
|
value: F.pageId,
|
|
1204
|
-
children:
|
|
1204
|
+
children: _("tourBuilder.currentValue", "Current: {{value}}", { value: F.pageId ?? "" })
|
|
1205
1205
|
}) : null,
|
|
1206
|
-
/* @__PURE__ */
|
|
1206
|
+
/* @__PURE__ */ h("option", {
|
|
1207
1207
|
value: "__custom__",
|
|
1208
|
-
children: "Custom page ID"
|
|
1208
|
+
children: _("tourBuilder.customPageId", "Custom page ID")
|
|
1209
1209
|
})
|
|
1210
1210
|
]
|
|
1211
1211
|
}),
|
|
1212
|
-
V ? /* @__PURE__ */
|
|
1212
|
+
V ? /* @__PURE__ */ h("input", {
|
|
1213
1213
|
id: "page-id-custom",
|
|
1214
|
-
"aria-label": "Custom page ID",
|
|
1214
|
+
"aria-label": _("tourBuilder.customPageId", "Custom page ID"),
|
|
1215
1215
|
type: "text",
|
|
1216
1216
|
value: F.pageId || "",
|
|
1217
1217
|
onChange: (e) => I({
|
|
@@ -1219,13 +1219,13 @@ function y() {
|
|
|
1219
1219
|
pageId: e.target.value || void 0
|
|
1220
1220
|
}),
|
|
1221
1221
|
className: "mt-2 w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1222
|
-
placeholder: "agents"
|
|
1222
|
+
placeholder: _("tourBuilder.pageSlugPlaceholder", "agents")
|
|
1223
1223
|
}) : null
|
|
1224
1224
|
] })]
|
|
1225
1225
|
}),
|
|
1226
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ g("label", {
|
|
1227
1227
|
className: "flex items-center gap-3 cursor-pointer",
|
|
1228
|
-
children: [/* @__PURE__ */
|
|
1228
|
+
children: [/* @__PURE__ */ h("input", {
|
|
1229
1229
|
type: "checkbox",
|
|
1230
1230
|
checked: F.isActive ?? !0,
|
|
1231
1231
|
onChange: (e) => I({
|
|
@@ -1233,29 +1233,29 @@ function y() {
|
|
|
1233
1233
|
isActive: e.target.checked
|
|
1234
1234
|
}),
|
|
1235
1235
|
className: "size-4 rounded",
|
|
1236
|
-
"aria-label": "Active"
|
|
1237
|
-
}), /* @__PURE__ */
|
|
1236
|
+
"aria-label": _("tourBuilder.labelActive", "Active")
|
|
1237
|
+
}), /* @__PURE__ */ h("span", {
|
|
1238
1238
|
className: "text-sm font-medium",
|
|
1239
|
-
children: "Active"
|
|
1239
|
+
children: _("tourBuilder.labelActive", "Active")
|
|
1240
1240
|
})]
|
|
1241
1241
|
})
|
|
1242
1242
|
]
|
|
1243
1243
|
})]
|
|
1244
1244
|
}),
|
|
1245
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ g(pe, {
|
|
1246
1246
|
treatment: "plain",
|
|
1247
1247
|
className: "p-4 sm:p-6 border-border-seam",
|
|
1248
|
-
children: [/* @__PURE__ */
|
|
1248
|
+
children: [/* @__PURE__ */ h("h2", {
|
|
1249
1249
|
className: "text-lg font-semibold mb-4",
|
|
1250
|
-
children:
|
|
1251
|
-
}), /* @__PURE__ */
|
|
1250
|
+
children: _("tourBuilder.sectionTriggerSettings")
|
|
1251
|
+
}), /* @__PURE__ */ g("div", {
|
|
1252
1252
|
className: "space-y-4",
|
|
1253
1253
|
children: [
|
|
1254
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1255
1255
|
className: "block text-sm font-medium mb-2",
|
|
1256
1256
|
htmlFor: "trigger-type",
|
|
1257
|
-
children:
|
|
1258
|
-
}), /* @__PURE__ */
|
|
1257
|
+
children: _("tourBuilder.labelTriggerType")
|
|
1258
|
+
}), /* @__PURE__ */ g("select", {
|
|
1259
1259
|
id: "trigger-type",
|
|
1260
1260
|
value: F.triggerType || "MANUAL",
|
|
1261
1261
|
onChange: (e) => I({
|
|
@@ -1263,35 +1263,35 @@ function y() {
|
|
|
1263
1263
|
triggerType: e.target.value
|
|
1264
1264
|
}),
|
|
1265
1265
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1266
|
-
"aria-label":
|
|
1266
|
+
"aria-label": _("tourBuilder.labelTriggerType"),
|
|
1267
1267
|
children: [
|
|
1268
|
-
/* @__PURE__ */
|
|
1268
|
+
/* @__PURE__ */ h("option", {
|
|
1269
1269
|
value: "MANUAL",
|
|
1270
|
-
children:
|
|
1270
|
+
children: _("tourBuilder.triggerManual")
|
|
1271
1271
|
}),
|
|
1272
|
-
/* @__PURE__ */
|
|
1272
|
+
/* @__PURE__ */ h("option", {
|
|
1273
1273
|
value: "AUTO_FIRST_VISIT",
|
|
1274
|
-
children:
|
|
1274
|
+
children: _("tourBuilder.triggerAutoFirstVisit")
|
|
1275
1275
|
}),
|
|
1276
|
-
/* @__PURE__ */
|
|
1276
|
+
/* @__PURE__ */ h("option", {
|
|
1277
1277
|
value: "AUTO_ALWAYS",
|
|
1278
|
-
children:
|
|
1278
|
+
children: _("tourBuilder.triggerAutoAlways")
|
|
1279
1279
|
}),
|
|
1280
|
-
/* @__PURE__ */
|
|
1280
|
+
/* @__PURE__ */ h("option", {
|
|
1281
1281
|
value: "ON_EVENT",
|
|
1282
|
-
children:
|
|
1282
|
+
children: _("tourBuilder.triggerOnEvent")
|
|
1283
1283
|
}),
|
|
1284
|
-
/* @__PURE__ */
|
|
1284
|
+
/* @__PURE__ */ h("option", {
|
|
1285
1285
|
value: "SCHEDULED",
|
|
1286
|
-
children:
|
|
1286
|
+
children: _("tourBuilder.triggerScheduled")
|
|
1287
1287
|
})
|
|
1288
1288
|
]
|
|
1289
1289
|
})] }),
|
|
1290
|
-
/* @__PURE__ */
|
|
1290
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1291
1291
|
className: "block text-sm font-medium mb-2",
|
|
1292
1292
|
htmlFor: "priority",
|
|
1293
|
-
children:
|
|
1294
|
-
}), /* @__PURE__ */
|
|
1293
|
+
children: _("tourBuilder.labelPriority")
|
|
1294
|
+
}), /* @__PURE__ */ h("input", {
|
|
1295
1295
|
id: "priority",
|
|
1296
1296
|
type: "number",
|
|
1297
1297
|
min: "1",
|
|
@@ -1305,15 +1305,15 @@ function y() {
|
|
|
1305
1305
|
});
|
|
1306
1306
|
},
|
|
1307
1307
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1308
|
-
"aria-label":
|
|
1308
|
+
"aria-label": _("tourBuilder.labelPriority")
|
|
1309
1309
|
})] }),
|
|
1310
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ g("div", {
|
|
1311
1311
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
1312
|
-
children: [/* @__PURE__ */
|
|
1312
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1313
1313
|
className: "block text-sm font-medium mb-2",
|
|
1314
1314
|
htmlFor: "tour-start-date",
|
|
1315
|
-
children: "Start Date"
|
|
1316
|
-
}), /* @__PURE__ */
|
|
1315
|
+
children: _("tourBuilder.labelStartDate", "Start Date")
|
|
1316
|
+
}), /* @__PURE__ */ h("input", {
|
|
1317
1317
|
id: "tour-start-date",
|
|
1318
1318
|
type: "datetime-local",
|
|
1319
1319
|
value: Ke(F.startDate),
|
|
@@ -1322,12 +1322,12 @@ function y() {
|
|
|
1322
1322
|
startDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1323
1323
|
}),
|
|
1324
1324
|
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__ */
|
|
1325
|
+
"aria-label": _("tourBuilder.labelStartDate", "Start Date")
|
|
1326
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
1327
1327
|
className: "block text-sm font-medium mb-2",
|
|
1328
1328
|
htmlFor: "tour-end-date",
|
|
1329
|
-
children: "End Date"
|
|
1330
|
-
}), /* @__PURE__ */
|
|
1329
|
+
children: _("tourBuilder.labelEndDate", "End Date")
|
|
1330
|
+
}), /* @__PURE__ */ h("input", {
|
|
1331
1331
|
id: "tour-end-date",
|
|
1332
1332
|
type: "datetime-local",
|
|
1333
1333
|
value: Ke(F.endDate),
|
|
@@ -1336,70 +1336,70 @@ function y() {
|
|
|
1336
1336
|
endDate: e.target.value ? new Date(e.target.value).toISOString() : void 0
|
|
1337
1337
|
}),
|
|
1338
1338
|
className: "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-text-primary",
|
|
1339
|
-
"aria-label": "End Date"
|
|
1339
|
+
"aria-label": _("tourBuilder.labelEndDate", "End Date")
|
|
1340
1340
|
})] })]
|
|
1341
1341
|
})
|
|
1342
1342
|
]
|
|
1343
1343
|
})]
|
|
1344
1344
|
}),
|
|
1345
|
-
ke && /* @__PURE__ */
|
|
1345
|
+
ke && /* @__PURE__ */ g("div", {
|
|
1346
1346
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1347
|
-
children: [/* @__PURE__ */
|
|
1347
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
1348
1348
|
className: "font-semibold text-status-error-text mb-2",
|
|
1349
|
-
children:
|
|
1350
|
-
}), /* @__PURE__ */
|
|
1349
|
+
children: _("tourBuilder.errorTitle")
|
|
1350
|
+
}), /* @__PURE__ */ h("p", {
|
|
1351
1351
|
className: "text-sm text-status-error-text",
|
|
1352
1352
|
children: ke.message
|
|
1353
1353
|
})]
|
|
1354
1354
|
}),
|
|
1355
|
-
|
|
1355
|
+
Oe.length > 0 && /* @__PURE__ */ g("div", {
|
|
1356
1356
|
className: "border border-status-error-border rounded-md p-4 bg-status-error-bg/10",
|
|
1357
|
-
children: [/* @__PURE__ */
|
|
1357
|
+
children: [/* @__PURE__ */ h("h3", {
|
|
1358
1358
|
className: "font-semibold text-status-error-text mb-2",
|
|
1359
|
-
children:
|
|
1360
|
-
}), /* @__PURE__ */
|
|
1359
|
+
children: _("tourBuilder.validationErrorsTitle")
|
|
1360
|
+
}), /* @__PURE__ */ h("ul", {
|
|
1361
1361
|
className: "list-disc list-inside space-y-1",
|
|
1362
|
-
children:
|
|
1362
|
+
children: Oe.map((e) => /* @__PURE__ */ h("li", {
|
|
1363
1363
|
className: "text-sm text-status-error-text",
|
|
1364
|
-
children: e.message
|
|
1365
|
-
}, e.
|
|
1364
|
+
children: _(e.message, e.params)
|
|
1365
|
+
}, e.field))
|
|
1366
1366
|
})]
|
|
1367
1367
|
}),
|
|
1368
|
-
/* @__PURE__ */
|
|
1368
|
+
/* @__PURE__ */ g("div", {
|
|
1369
1369
|
className: "flex flex-wrap items-center gap-3",
|
|
1370
|
-
children: [/* @__PURE__ */
|
|
1371
|
-
permission:
|
|
1372
|
-
children: /* @__PURE__ */
|
|
1370
|
+
children: [/* @__PURE__ */ h(re, {
|
|
1371
|
+
permission: E ? a.TOUR_CREATE : a.TOUR_UPDATE,
|
|
1372
|
+
children: /* @__PURE__ */ g(ue, {
|
|
1373
1373
|
type: "submit",
|
|
1374
|
-
disabled:
|
|
1374
|
+
disabled: De || !k,
|
|
1375
1375
|
className: "flex-1 min-w-[200px] min-h-[44px]",
|
|
1376
|
-
children: [/* @__PURE__ */
|
|
1376
|
+
children: [/* @__PURE__ */ h(oe, { size: 20 }), _(De ? "tourBuilder.saving" : v && v !== "new" ? "tourBuilder.updateTour" : "tourBuilder.createAndAddSteps")]
|
|
1377
1377
|
})
|
|
1378
|
-
}),
|
|
1378
|
+
}), v && v !== "new" && Xe.length > 0 && /* @__PURE__ */ h(de, { actions: Xe })]
|
|
1379
1379
|
})
|
|
1380
1380
|
]
|
|
1381
1381
|
})
|
|
1382
1382
|
]
|
|
1383
|
-
}) : /* @__PURE__ */
|
|
1383
|
+
}) : /* @__PURE__ */ h("div", {
|
|
1384
1384
|
className: "flex h-full items-center justify-center p-3 sm:p-6",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1385
|
+
children: /* @__PURE__ */ g("div", {
|
|
1386
1386
|
className: "text-center space-y-4",
|
|
1387
|
-
children: [/* @__PURE__ */
|
|
1387
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h2", {
|
|
1388
1388
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
1389
|
-
children:
|
|
1390
|
-
}), /* @__PURE__ */
|
|
1389
|
+
children: _("tourBuilder.accessDeniedTitle")
|
|
1390
|
+
}), /* @__PURE__ */ h("p", {
|
|
1391
1391
|
className: "text-sm text-text-secondary",
|
|
1392
|
-
children:
|
|
1393
|
-
})] }), /* @__PURE__ */
|
|
1392
|
+
children: _(E ? "tourBuilder.createAccessDeniedMessage" : "tourBuilder.updateAccessDeniedMessage")
|
|
1393
|
+
})] }), /* @__PURE__ */ h("button", {
|
|
1394
1394
|
type: "button",
|
|
1395
1395
|
onClick: Q,
|
|
1396
1396
|
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:
|
|
1397
|
+
children: _("tourBuilder.goBack")
|
|
1398
1398
|
})]
|
|
1399
1399
|
})
|
|
1400
1400
|
});
|
|
1401
1401
|
}
|
|
1402
1402
|
//#endregion
|
|
1403
|
-
export {
|
|
1403
|
+
export { x as TourBuilderPage };
|
|
1404
1404
|
|
|
1405
1405
|
//# sourceMappingURL=TourBuilderPage.js.map
|