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