@burdenoff/microfe-tours 2026.625.2 → 2026.626.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/i18n.js +19 -1
- package/dist/tours/i18n.js.map +1 -1
- package/dist/tours/pages/AnalyticsDashboardPage.js +43 -41
- package/dist/tours/pages/AnalyticsDashboardPage.js.map +1 -1
- package/dist/tours/pages/MediaLibraryPage.js +66 -59
- package/dist/tours/pages/MediaLibraryPage.js.map +1 -1
- package/dist/tours/pages/MyToursPage.js +75 -53
- package/dist/tours/pages/MyToursPage.js.map +1 -1
- package/dist/tours/pages/MyToursProgressPage.js +81 -74
- package/dist/tours/pages/MyToursProgressPage.js.map +1 -1
- package/dist/tours/pages/SchedulerPage.js +78 -78
- package/dist/tours/pages/SchedulerPage.js.map +1 -1
- package/dist/tours/pages/StepEditorPage.js +570 -575
- package/dist/tours/pages/StepEditorPage.js.map +1 -1
- package/dist/tours/pages/SystemAnalyticsPage.js +128 -118
- package/dist/tours/pages/SystemAnalyticsPage.js.map +1 -1
- package/dist/tours/pages/TemplateLibraryPage.js +54 -65
- package/dist/tours/pages/TemplateLibraryPage.js.map +1 -1
- package/dist/tours/pages/TourBuilderPage.js +307 -272
- package/dist/tours/pages/TourBuilderPage.js.map +1 -1
- package/dist/tours/pages/TourPreviewPage.js +114 -122
- package/dist/tours/pages/TourPreviewPage.js.map +1 -1
- package/dist/tours/pages/ToursListPage.js +148 -147
- package/dist/tours/pages/ToursListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -4,109 +4,116 @@ import { useToursI18n as n } from "../i18n.js";
|
|
|
4
4
|
import { useEffect as r, useMemo as i, useRef as a } from "react";
|
|
5
5
|
import { CheckCircle2 as o, HelpCircle as s, MinusCircle as c, Play as l } from "lucide-react";
|
|
6
6
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
-
import { EmphasisPanel as f } from "@burdenoff/fe-libs/ui";
|
|
8
|
-
import { useEventBus as
|
|
7
|
+
import { EmphasisPanel as f, IllustratedEmptyState as p, PagePurpose as m } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { useEventBus as h } from "@burdenoff/fe-libs/shared/events";
|
|
9
9
|
//#region src/tours/pages/MyToursProgressPage.tsx
|
|
10
|
-
function
|
|
11
|
-
let { tr:
|
|
10
|
+
function g() {
|
|
11
|
+
let { tr: g } = n(), { currentUser: v, productId: y, moduleId: b, pageId: x, workspaceId: S } = e(), C = h(), w = a(!1);
|
|
12
12
|
r(() => {
|
|
13
|
-
|
|
13
|
+
w.current || (w.current = !0, C.emit("tours.page.viewed", {
|
|
14
14
|
page: "/tours/progress",
|
|
15
|
-
productId:
|
|
16
|
-
moduleId:
|
|
17
|
-
pageId:
|
|
18
|
-
workspaceId:
|
|
15
|
+
productId: y,
|
|
16
|
+
moduleId: b,
|
|
17
|
+
pageId: x,
|
|
18
|
+
workspaceId: S
|
|
19
19
|
}));
|
|
20
20
|
}, [
|
|
21
|
-
|
|
22
|
-
_,
|
|
23
|
-
v,
|
|
21
|
+
C,
|
|
24
22
|
y,
|
|
25
|
-
b
|
|
23
|
+
b,
|
|
24
|
+
x,
|
|
25
|
+
S
|
|
26
26
|
]);
|
|
27
|
-
let { data:
|
|
27
|
+
let { data: T, loading: E } = t({
|
|
28
28
|
variables: {
|
|
29
|
-
userId:
|
|
29
|
+
userId: v?.id,
|
|
30
30
|
pagination: {
|
|
31
31
|
limit: 100,
|
|
32
32
|
offset: 0
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
skip: !
|
|
35
|
+
skip: !v?.id,
|
|
36
36
|
fetchPolicy: "cache-and-network"
|
|
37
|
-
}),
|
|
37
|
+
}), D = i(() => {
|
|
38
38
|
let e = {
|
|
39
39
|
IN_PROGRESS: [],
|
|
40
40
|
COMPLETED: [],
|
|
41
41
|
SKIPPED: [],
|
|
42
42
|
OTHER: []
|
|
43
|
-
}, t = (
|
|
43
|
+
}, t = (T?.userTourProgresses ?? []).filter((e) => !(y && e.tour.productId !== y || b && e.tour.moduleId && e.tour.moduleId !== b || x && e.tour.pageId && e.tour.pageId !== x));
|
|
44
44
|
for (let n of t) n.status === "COMPLETED" ? e.COMPLETED.push(n) : n.status === "IN_PROGRESS" ? e.IN_PROGRESS.push(n) : n.status === "SKIPPED" || n.status === "DISMISSED" ? e.SKIPPED.push(n) : e.OTHER.push(n);
|
|
45
45
|
return e;
|
|
46
46
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
]);
|
|
47
|
+
T,
|
|
48
|
+
y,
|
|
49
|
+
b,
|
|
50
|
+
x
|
|
51
|
+
]), O = D.IN_PROGRESS.length + D.COMPLETED.length + D.SKIPPED.length + D.OTHER.length;
|
|
52
52
|
return /* @__PURE__ */ d("div", {
|
|
53
53
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
54
|
-
children: [
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
children:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
|
|
56
|
+
className: "text-xl sm:text-2xl font-bold text-text-primary",
|
|
57
|
+
children: g("myToursProgress.title")
|
|
58
|
+
}), /* @__PURE__ */ u("p", {
|
|
59
|
+
className: "text-sm sm:text-base text-text-secondary",
|
|
60
|
+
children: g("myToursProgress.subtitle")
|
|
61
|
+
})] }),
|
|
62
|
+
/* @__PURE__ */ u(m, { children: g("myToursProgress.purpose") }),
|
|
63
|
+
E && (T?.userTourProgresses?.length ?? 0) === 0 ? /* @__PURE__ */ u("output", {
|
|
64
|
+
className: "text-sm text-text-secondary",
|
|
65
|
+
children: g("myToursProgress.loading")
|
|
66
|
+
}) : O === 0 ? /* @__PURE__ */ u(p, {
|
|
67
|
+
illustration: "empty-data",
|
|
68
|
+
title: g("myToursProgress.empty")
|
|
69
|
+
}) : /* @__PURE__ */ d("div", {
|
|
70
|
+
className: "space-y-6",
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ u(f, {
|
|
73
|
+
className: "p-4 sm:p-5",
|
|
74
|
+
children: /* @__PURE__ */ u(_, {
|
|
75
|
+
title: g("myToursProgress.inProgress"),
|
|
76
|
+
icon: /* @__PURE__ */ u(l, {
|
|
77
|
+
size: 16,
|
|
78
|
+
className: "text-warning"
|
|
79
|
+
}),
|
|
80
|
+
rows: D.IN_PROGRESS,
|
|
81
|
+
emptyText: g("myToursProgress.emptyInProgress")
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ u(_, {
|
|
85
|
+
title: g("myToursProgress.completed"),
|
|
86
|
+
icon: /* @__PURE__ */ u(o, {
|
|
71
87
|
size: 16,
|
|
72
|
-
className: "text-
|
|
88
|
+
className: "text-success"
|
|
73
89
|
}),
|
|
74
|
-
rows:
|
|
75
|
-
emptyText:
|
|
76
|
-
})
|
|
77
|
-
}),
|
|
78
|
-
/* @__PURE__ */ u(h, {
|
|
79
|
-
title: m("myToursProgress.completed"),
|
|
80
|
-
icon: /* @__PURE__ */ u(o, {
|
|
81
|
-
size: 16,
|
|
82
|
-
className: "text-success"
|
|
83
|
-
}),
|
|
84
|
-
rows: T.COMPLETED,
|
|
85
|
-
emptyText: m("myToursProgress.emptyCompleted")
|
|
86
|
-
}),
|
|
87
|
-
/* @__PURE__ */ u(h, {
|
|
88
|
-
title: m("myToursProgress.skipped"),
|
|
89
|
-
icon: /* @__PURE__ */ u(c, {
|
|
90
|
-
size: 16,
|
|
91
|
-
className: "text-text-secondary"
|
|
90
|
+
rows: D.COMPLETED,
|
|
91
|
+
emptyText: g("myToursProgress.emptyCompleted")
|
|
92
92
|
}),
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
/* @__PURE__ */ u(_, {
|
|
94
|
+
title: g("myToursProgress.skipped"),
|
|
95
|
+
icon: /* @__PURE__ */ u(c, {
|
|
96
|
+
size: 16,
|
|
97
|
+
className: "text-text-secondary"
|
|
98
|
+
}),
|
|
99
|
+
rows: D.SKIPPED,
|
|
100
|
+
emptyText: g("myToursProgress.emptySkipped")
|
|
101
101
|
}),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
D.OTHER.length > 0 ? /* @__PURE__ */ u(_, {
|
|
103
|
+
title: g("myToursProgress.other"),
|
|
104
|
+
icon: /* @__PURE__ */ u(s, {
|
|
105
|
+
size: 16,
|
|
106
|
+
className: "text-text-secondary"
|
|
107
|
+
}),
|
|
108
|
+
rows: D.OTHER,
|
|
109
|
+
emptyText: g("myToursProgress.emptyOther")
|
|
110
|
+
}) : null
|
|
111
|
+
]
|
|
112
|
+
})
|
|
113
|
+
]
|
|
107
114
|
});
|
|
108
115
|
}
|
|
109
|
-
function
|
|
116
|
+
function _({ title: e, icon: t, rows: n, emptyText: r }) {
|
|
110
117
|
return /* @__PURE__ */ d("section", {
|
|
111
118
|
className: "space-y-2",
|
|
112
119
|
children: [/* @__PURE__ */ d("h2", {
|
|
@@ -145,6 +152,6 @@ function h({ title: e, icon: t, rows: n, emptyText: r }) {
|
|
|
145
152
|
});
|
|
146
153
|
}
|
|
147
154
|
//#endregion
|
|
148
|
-
export {
|
|
155
|
+
export { g as MyToursProgressPage };
|
|
149
156
|
|
|
150
157
|
//# sourceMappingURL=MyToursProgressPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MyToursProgressPage.js","names":[],"sources":["../../../src/tours/pages/MyToursProgressPage.tsx"],"sourcesContent":["import { useMemo, useEffect, useRef } from 'react';\nimport { CheckCircle2, HelpCircle, MinusCircle, Play } from 'lucide-react';\nimport { useGetUserTourProgressesQuery } from '../../generated/global-operations';\nimport { useToursContext } from '../providers/ToursProvider';\nimport { useToursI18n } from '../i18n';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\nimport { EmphasisPanel } from '@burdenoff/fe-libs/ui';\n\ntype ProgressGroup = 'IN_PROGRESS' | 'COMPLETED' | 'SKIPPED' | 'OTHER';\n\ntype ProgressRow = {\n id: string;\n status: string;\n tour: { id: string; name: string; productId?: string; moduleId?: string; pageId?: string };\n lastViewedAt?: string | null;\n};\n\n/**\n * MyToursProgressPage — user-facing read-only view of the current user's\n * tour interactions, grouped by status (In progress / Completed / Skipped).\n */\nexport function MyToursProgressPage() {\n const { tr } = useToursI18n();\n const {\n currentUser,\n productId: shellProductId,\n moduleId: shellModuleId,\n pageId: shellPageId,\n workspaceId,\n } = useToursContext();\n const eventBus = useEventBus();\n\n // Emit page view event exactly once per mount. A ref guard keeps the effect\n // semantically mount-only while satisfying exhaustive-deps with the real\n // dependency list, so we don't have to disable the lint rule.\n const pageViewedRef = useRef(false);\n useEffect(() => {\n if (pageViewedRef.current) return;\n pageViewedRef.current = true;\n eventBus.emit('tours.page.viewed', {\n page: '/tours/progress',\n productId: shellProductId,\n moduleId: shellModuleId,\n pageId: shellPageId,\n workspaceId,\n });\n }, [eventBus, shellProductId, shellModuleId, shellPageId, workspaceId]);\n\n const { data, loading } = useGetUserTourProgressesQuery({\n variables: { userId: currentUser?.id, pagination: { limit: 100, offset: 0 } },\n skip: !currentUser?.id,\n fetchPolicy: 'cache-and-network',\n });\n\n const grouped = useMemo(() => {\n const result: Record<ProgressGroup, NonNullable<typeof data>['userTourProgresses']> = {\n IN_PROGRESS: [],\n COMPLETED: [],\n SKIPPED: [],\n OTHER: [],\n };\n // Filter the raw progress list to the shell's product/module/page context\n // so a user's vibecontrols session doesn't see workspaces / bigconsole\n // progress rows. `userTourProgresses` returns everything scoped by userId;\n // this MFE is mounted per-shell so we narrow to what the shell advertises.\n // When the shell didn't supply a filter, the corresponding level is not\n // checked (e.g., no shellModuleId → accept any moduleId).\n const rows = (data?.userTourProgresses ?? []).filter((row: ProgressRow) => {\n if (shellProductId && row.tour.productId !== shellProductId) return false;\n if (shellModuleId && row.tour.moduleId && row.tour.moduleId !== shellModuleId) return false;\n if (shellPageId && row.tour.pageId && row.tour.pageId !== shellPageId) return false;\n return true;\n });\n for (const row of rows) {\n if (row.status === 'COMPLETED') result.COMPLETED.push(row);\n else if (row.status === 'IN_PROGRESS') result.IN_PROGRESS.push(row);\n else if (row.status === 'SKIPPED' || row.status === 'DISMISSED') result.SKIPPED.push(row);\n // Unknown / future status values fall through here so nothing is\n // silently dropped if the backend introduces a new state.\n else result.OTHER.push(row);\n }\n return result;\n }, [data, shellProductId, shellModuleId, shellPageId]);\n\n return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-text-primary\">\n {tr('myToursProgress.title')}\n </h1>\n <p className=\"text-sm sm:text-base text-text-secondary\">\n {tr('myToursProgress.subtitle')}\n </p>\n </div>\n\n {loading && (data?.userTourProgresses?.length ?? 0) === 0 ? (\n <output className=\"text-sm text-text-secondary\">{tr('myToursProgress.loading')}</output>\n ) : (\n <div className=\"space-y-6\">\n <EmphasisPanel className=\"p-4 sm:p-5\">\n <ProgressSection\n title={tr('myToursProgress.inProgress')}\n icon={<Play size={16} className=\"text-warning\" />}\n rows={grouped.IN_PROGRESS}\n emptyText={tr('myToursProgress.emptyInProgress')}\n />\n </EmphasisPanel>\n <ProgressSection\n title={tr('myToursProgress.completed')}\n icon={<CheckCircle2 size={16} className=\"text-success\" />}\n rows={grouped.COMPLETED}\n emptyText={tr('myToursProgress.emptyCompleted')}\n />\n <ProgressSection\n title={tr('myToursProgress.skipped')}\n icon={<MinusCircle size={16} className=\"text-text-secondary\" />}\n rows={grouped.SKIPPED}\n emptyText={tr('myToursProgress.emptySkipped')}\n />\n {grouped.OTHER.length > 0 ? (\n <ProgressSection\n title={tr('myToursProgress.other')}\n icon={<HelpCircle size={16} className=\"text-text-secondary\" />}\n rows={grouped.OTHER}\n emptyText={tr('myToursProgress.emptyOther')}\n />\n ) : null}\n </div>\n )}\n </div>\n );\n}\n\nfunction ProgressSection({\n title,\n icon,\n rows,\n emptyText,\n}: {\n title: string;\n icon: React.ReactNode;\n rows: Array<{ id: string; tour: { id: string; name: string }; lastViewedAt?: string | null }>;\n emptyText: string;\n}) {\n return (\n <section className=\"space-y-2\">\n <h2 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n {icon}\n {title}\n <span className=\"text-xs text-text-secondary font-normal\">({rows.length})</span>\n </h2>\n {rows.length === 0 ? (\n <p className=\"text-sm text-text-secondary\" role=\"status\" aria-live=\"polite\">\n {emptyText}\n </p>\n ) : (\n <ul className=\"divide-y divide-border-seam rounded-md border border-border-seam\">\n {rows.map((row) => (\n <li key={row.id} className=\"flex items-center justify-between gap-3 p-3\">\n <span className=\"text-sm text-text-primary line-clamp-1\">{row.tour.name}</span>\n {row.lastViewedAt ? (\n <time className=\"text-xs text-text-secondary\" dateTime={row.lastViewedAt}>\n {new Date(row.lastViewedAt).toLocaleDateString()}\n </time>\n ) : null}\n </li>\n ))}\n </ul>\n )}\n </section>\n );\n}\n"],"mappings":";;;;;;;;;AAqBA,SAAgB,IAAsB;CACpC,IAAM,EAAE,UAAO,GAAc,EACvB,EACJ,gBACA,WAAW,GACX,UAAU,GACV,QAAQ,GACR,mBACE,GAAiB,EACf,IAAW,GAAa,EAKxB,IAAgB,EAAO,GAAM;AACnC,SAAgB;AACV,IAAc,YAClB,EAAc,UAAU,IACxB,EAAS,KAAK,qBAAqB;GACjC,MAAM;GACN,WAAW;GACX,UAAU;GACV,QAAQ;GACR;GACD,CAAC;IACD;EAAC;EAAU;EAAgB;EAAe;EAAa;EAAY,CAAC;CAEvE,IAAM,EAAE,SAAM,eAAY,EAA8B;EACtD,WAAW;GAAE,QAAQ,GAAa;GAAI,YAAY;IAAE,OAAO;IAAK,QAAQ;IAAG;GAAE;EAC7E,MAAM,CAAC,GAAa;EACpB,aAAa;EACd,CAAC,EAEI,IAAU,QAAc;EAC5B,IAAM,IAAgF;GACpF,aAAa,EAAE;GACf,WAAW,EAAE;GACb,SAAS,EAAE;GACX,OAAO,EAAE;GACV,EAOK,KAAQ,GAAM,sBAAsB,EAAE,EAAE,QAAQ,MAGpD,EAFI,KAAkB,EAAI,KAAK,cAAc,KACzC,KAAiB,EAAI,KAAK,YAAY,EAAI,KAAK,aAAa,KAC5D,KAAe,EAAI,KAAK,UAAU,EAAI,KAAK,WAAW,GAE1D;AACF,OAAK,IAAM,KAAO,EAChB,CAAI,EAAI,WAAW,cAAa,EAAO,UAAU,KAAK,EAAI,GACjD,EAAI,WAAW,gBAAe,EAAO,YAAY,KAAK,EAAI,GAC1D,EAAI,WAAW,aAAa,EAAI,WAAW,cAAa,EAAO,QAAQ,KAAK,EAAI,GAGpF,EAAO,MAAM,KAAK,EAAI;AAE7B,SAAO;IACN;EAAC;EAAM;EAAgB;EAAe;EAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"MyToursProgressPage.js","names":[],"sources":["../../../src/tours/pages/MyToursProgressPage.tsx"],"sourcesContent":["import { useMemo, useEffect, useRef } from 'react';\nimport { CheckCircle2, HelpCircle, MinusCircle, Play } from 'lucide-react';\nimport { useGetUserTourProgressesQuery } from '../../generated/global-operations';\nimport { useToursContext } from '../providers/ToursProvider';\nimport { useToursI18n } from '../i18n';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\nimport { EmphasisPanel, IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\n\ntype ProgressGroup = 'IN_PROGRESS' | 'COMPLETED' | 'SKIPPED' | 'OTHER';\n\ntype ProgressRow = {\n id: string;\n status: string;\n tour: { id: string; name: string; productId?: string; moduleId?: string; pageId?: string };\n lastViewedAt?: string | null;\n};\n\n/**\n * MyToursProgressPage — user-facing read-only view of the current user's\n * tour interactions, grouped by status (In progress / Completed / Skipped).\n */\nexport function MyToursProgressPage() {\n const { tr } = useToursI18n();\n const {\n currentUser,\n productId: shellProductId,\n moduleId: shellModuleId,\n pageId: shellPageId,\n workspaceId,\n } = useToursContext();\n const eventBus = useEventBus();\n\n // Emit page view event exactly once per mount. A ref guard keeps the effect\n // semantically mount-only while satisfying exhaustive-deps with the real\n // dependency list, so we don't have to disable the lint rule.\n const pageViewedRef = useRef(false);\n useEffect(() => {\n if (pageViewedRef.current) return;\n pageViewedRef.current = true;\n eventBus.emit('tours.page.viewed', {\n page: '/tours/progress',\n productId: shellProductId,\n moduleId: shellModuleId,\n pageId: shellPageId,\n workspaceId,\n });\n }, [eventBus, shellProductId, shellModuleId, shellPageId, workspaceId]);\n\n const { data, loading } = useGetUserTourProgressesQuery({\n variables: { userId: currentUser?.id, pagination: { limit: 100, offset: 0 } },\n skip: !currentUser?.id,\n fetchPolicy: 'cache-and-network',\n });\n\n const grouped = useMemo(() => {\n const result: Record<ProgressGroup, NonNullable<typeof data>['userTourProgresses']> = {\n IN_PROGRESS: [],\n COMPLETED: [],\n SKIPPED: [],\n OTHER: [],\n };\n // Filter the raw progress list to the shell's product/module/page context\n // so a user's vibecontrols session doesn't see workspaces / bigconsole\n // progress rows. `userTourProgresses` returns everything scoped by userId;\n // this MFE is mounted per-shell so we narrow to what the shell advertises.\n // When the shell didn't supply a filter, the corresponding level is not\n // checked (e.g., no shellModuleId → accept any moduleId).\n const rows = (data?.userTourProgresses ?? []).filter((row: ProgressRow) => {\n if (shellProductId && row.tour.productId !== shellProductId) return false;\n if (shellModuleId && row.tour.moduleId && row.tour.moduleId !== shellModuleId) return false;\n if (shellPageId && row.tour.pageId && row.tour.pageId !== shellPageId) return false;\n return true;\n });\n for (const row of rows) {\n if (row.status === 'COMPLETED') result.COMPLETED.push(row);\n else if (row.status === 'IN_PROGRESS') result.IN_PROGRESS.push(row);\n else if (row.status === 'SKIPPED' || row.status === 'DISMISSED') result.SKIPPED.push(row);\n // Unknown / future status values fall through here so nothing is\n // silently dropped if the backend introduces a new state.\n else result.OTHER.push(row);\n }\n return result;\n }, [data, shellProductId, shellModuleId, shellPageId]);\n\n const totalInContext =\n grouped.IN_PROGRESS.length +\n grouped.COMPLETED.length +\n grouped.SKIPPED.length +\n grouped.OTHER.length;\n\n return (\n <div className=\"space-y-4 sm:space-y-6 p-3 sm:p-6\">\n <div>\n <h1 className=\"text-xl sm:text-2xl font-bold text-text-primary\">\n {tr('myToursProgress.title')}\n </h1>\n <p className=\"text-sm sm:text-base text-text-secondary\">\n {tr('myToursProgress.subtitle')}\n </p>\n </div>\n\n <PagePurpose>{tr('myToursProgress.purpose')}</PagePurpose>\n\n {loading && (data?.userTourProgresses?.length ?? 0) === 0 ? (\n <output className=\"text-sm text-text-secondary\">{tr('myToursProgress.loading')}</output>\n ) : totalInContext === 0 ? (\n <IllustratedEmptyState illustration=\"empty-data\" title={tr('myToursProgress.empty')} />\n ) : (\n <div className=\"space-y-6\">\n <EmphasisPanel className=\"p-4 sm:p-5\">\n <ProgressSection\n title={tr('myToursProgress.inProgress')}\n icon={<Play size={16} className=\"text-warning\" />}\n rows={grouped.IN_PROGRESS}\n emptyText={tr('myToursProgress.emptyInProgress')}\n />\n </EmphasisPanel>\n <ProgressSection\n title={tr('myToursProgress.completed')}\n icon={<CheckCircle2 size={16} className=\"text-success\" />}\n rows={grouped.COMPLETED}\n emptyText={tr('myToursProgress.emptyCompleted')}\n />\n <ProgressSection\n title={tr('myToursProgress.skipped')}\n icon={<MinusCircle size={16} className=\"text-text-secondary\" />}\n rows={grouped.SKIPPED}\n emptyText={tr('myToursProgress.emptySkipped')}\n />\n {grouped.OTHER.length > 0 ? (\n <ProgressSection\n title={tr('myToursProgress.other')}\n icon={<HelpCircle size={16} className=\"text-text-secondary\" />}\n rows={grouped.OTHER}\n emptyText={tr('myToursProgress.emptyOther')}\n />\n ) : null}\n </div>\n )}\n </div>\n );\n}\n\nfunction ProgressSection({\n title,\n icon,\n rows,\n emptyText,\n}: {\n title: string;\n icon: React.ReactNode;\n rows: Array<{ id: string; tour: { id: string; name: string }; lastViewedAt?: string | null }>;\n emptyText: string;\n}) {\n return (\n <section className=\"space-y-2\">\n <h2 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n {icon}\n {title}\n <span className=\"text-xs text-text-secondary font-normal\">({rows.length})</span>\n </h2>\n {rows.length === 0 ? (\n <p className=\"text-sm text-text-secondary\" role=\"status\" aria-live=\"polite\">\n {emptyText}\n </p>\n ) : (\n <ul className=\"divide-y divide-border-seam rounded-md border border-border-seam\">\n {rows.map((row) => (\n <li key={row.id} className=\"flex items-center justify-between gap-3 p-3\">\n <span className=\"text-sm text-text-primary line-clamp-1\">{row.tour.name}</span>\n {row.lastViewedAt ? (\n <time className=\"text-xs text-text-secondary\" dateTime={row.lastViewedAt}>\n {new Date(row.lastViewedAt).toLocaleDateString()}\n </time>\n ) : null}\n </li>\n ))}\n </ul>\n )}\n </section>\n );\n}\n"],"mappings":"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"}
|
|
@@ -8,46 +8,46 @@ import { PermissionGate as c } from "@burdenoff/fe-libs/shared/components";
|
|
|
8
8
|
import { ArrowLeft as l, Calendar as u, Clock as d, Save as f } from "lucide-react";
|
|
9
9
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
import { useNavigate as h, useParams as g } from "react-router-dom";
|
|
11
|
-
import { Button as _,
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import { useEventBus as
|
|
11
|
+
import { Button as _, EmphasisPanel as v, GlassCard as y, PagePurpose as b } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
+
import { useEventBus as S } from "@burdenoff/fe-libs/shared/events";
|
|
14
14
|
//#region src/tours/pages/SchedulerPage.tsx
|
|
15
|
-
function
|
|
16
|
-
let { t:
|
|
17
|
-
let n =
|
|
15
|
+
function C() {
|
|
16
|
+
let { t: C } = x(), w = o((e, t) => {
|
|
17
|
+
let n = C(e);
|
|
18
18
|
return n === e ? t : n;
|
|
19
|
-
}, [
|
|
19
|
+
}, [C]), { tourId: T } = g(), E = h(), D = e(), { basePath: O = "/" } = D, k = S(), { hasPermission: A } = r(), j = A(i.TOUR_SCHEDULE_CREATE), M = A(i.TOUR_SCHEDULE_LIST), [N, P] = s({
|
|
20
20
|
startDate: "",
|
|
21
21
|
endDate: "",
|
|
22
22
|
recurrencePattern: "DAILY",
|
|
23
23
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
24
24
|
isActive: !0
|
|
25
|
-
}), [
|
|
26
|
-
variables: { tourId:
|
|
27
|
-
skip: !
|
|
28
|
-
}),
|
|
29
|
-
if (e.preventDefault(),
|
|
30
|
-
|
|
25
|
+
}), [F, I] = s(!1), [L] = t(), { data: R } = n({
|
|
26
|
+
variables: { tourId: T },
|
|
27
|
+
skip: !T || !M
|
|
28
|
+
}), z = R?.tourSchedules ?? [], B = async (e) => {
|
|
29
|
+
if (e.preventDefault(), T) {
|
|
30
|
+
I(!0);
|
|
31
31
|
try {
|
|
32
|
-
let e =
|
|
33
|
-
await
|
|
32
|
+
let e = N.recurrencePattern === "DAILY" ? "FREQ=DAILY" : N.recurrencePattern === "WEEKLY" ? "FREQ=WEEKLY" : N.recurrencePattern === "MONTHLY" ? "FREQ=MONTHLY" : void 0;
|
|
33
|
+
await L({
|
|
34
34
|
variables: { input: {
|
|
35
|
-
tourId:
|
|
36
|
-
startDate: new Date(
|
|
37
|
-
endDate:
|
|
35
|
+
tourId: T,
|
|
36
|
+
startDate: new Date(N.startDate).toISOString(),
|
|
37
|
+
endDate: N.endDate ? new Date(N.endDate).toISOString() : void 0,
|
|
38
38
|
recurrenceRule: e,
|
|
39
|
-
timezone:
|
|
39
|
+
timezone: N.timezone
|
|
40
40
|
} },
|
|
41
41
|
refetchQueries: ["GetTourSchedules"]
|
|
42
|
-
}),
|
|
42
|
+
}), E(`${O}/${T}/edit`);
|
|
43
43
|
} catch {
|
|
44
|
-
a(
|
|
44
|
+
a(k, "schedule.create", D);
|
|
45
45
|
} finally {
|
|
46
|
-
|
|
46
|
+
I(!1);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
},
|
|
50
|
-
|
|
49
|
+
}, V = () => {
|
|
50
|
+
E(`${O}/${T}/edit`);
|
|
51
51
|
};
|
|
52
52
|
return /* @__PURE__ */ m("div", {
|
|
53
53
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-3xl mx-auto",
|
|
@@ -56,44 +56,44 @@ function x() {
|
|
|
56
56
|
className: "flex items-center gap-3 sm:gap-4",
|
|
57
57
|
children: [/* @__PURE__ */ p("button", {
|
|
58
58
|
type: "button",
|
|
59
|
-
onClick:
|
|
59
|
+
onClick: V,
|
|
60
60
|
className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md",
|
|
61
|
-
"aria-label":
|
|
61
|
+
"aria-label": w("tourScheduler.goBack", "Go back"),
|
|
62
62
|
children: /* @__PURE__ */ p(l, { size: 20 })
|
|
63
63
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
64
64
|
className: "text-xl sm:text-2xl font-bold",
|
|
65
|
-
children:
|
|
65
|
+
children: w("tourScheduler.title", "Schedule Tour")
|
|
66
66
|
}), /* @__PURE__ */ p("p", {
|
|
67
67
|
className: "text-sm text-text-secondary",
|
|
68
|
-
children:
|
|
68
|
+
children: w("tourScheduler.subtitle", "Configure when this tour should be activated")
|
|
69
69
|
})] })]
|
|
70
70
|
}),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
className: "p-4 sm:p-6
|
|
71
|
+
/* @__PURE__ */ p(b, { children: w("tourScheduler.purpose", "Decide exactly when this tour goes live and how often it repeats — for example, run an onboarding tour every Monday, or activate a feature-announcement tour for a single launch window. Set a start (and optional end) date plus a recurrence pattern, and the tour will surface to users automatically on schedule.") }),
|
|
72
|
+
z.length > 0 && /* @__PURE__ */ m(v, {
|
|
73
|
+
className: "p-4 sm:p-6",
|
|
74
74
|
children: [/* @__PURE__ */ p("h2", {
|
|
75
75
|
className: "text-lg font-semibold mb-4",
|
|
76
|
-
children:
|
|
76
|
+
children: w("tourScheduler.existingSchedules", "Existing Schedules")
|
|
77
77
|
}), /* @__PURE__ */ p("div", {
|
|
78
78
|
className: "space-y-2",
|
|
79
|
-
children:
|
|
79
|
+
children: z.map((e) => /* @__PURE__ */ m("div", {
|
|
80
80
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between p-3 border border-border-seam rounded-md",
|
|
81
81
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
|
|
82
82
|
className: "text-sm font-medium",
|
|
83
|
-
children: [new Date(e.startDate).toLocaleDateString(), e.endDate ? ` — ${new Date(e.endDate).toLocaleDateString()}` : ` — ${
|
|
83
|
+
children: [new Date(e.startDate).toLocaleDateString(), e.endDate ? ` — ${new Date(e.endDate).toLocaleDateString()}` : ` — ${w("tourScheduler.noEndDate", "No end date")}`]
|
|
84
84
|
}), /* @__PURE__ */ m("div", {
|
|
85
85
|
className: "text-xs text-text-secondary",
|
|
86
86
|
children: [
|
|
87
|
-
e.recurrenceRule ||
|
|
87
|
+
e.recurrenceRule || w("tourScheduler.oneTime", "One-time"),
|
|
88
88
|
" ·",
|
|
89
89
|
" ",
|
|
90
90
|
e.timezone,
|
|
91
|
-
e.isActive ? ` · ${
|
|
91
|
+
e.isActive ? ` · ${w("tourScheduler.active", "Active")}` : ` · ${w("tourScheduler.inactive", "Inactive")}`
|
|
92
92
|
]
|
|
93
93
|
})] }), /* @__PURE__ */ m("div", {
|
|
94
94
|
className: "text-xs text-text-secondary tabular-nums",
|
|
95
95
|
children: [
|
|
96
|
-
|
|
96
|
+
w("tourScheduler.runs", "Runs"),
|
|
97
97
|
": ",
|
|
98
98
|
e.executionCount
|
|
99
99
|
]
|
|
@@ -102,126 +102,126 @@ function x() {
|
|
|
102
102
|
})]
|
|
103
103
|
}),
|
|
104
104
|
/* @__PURE__ */ m("form", {
|
|
105
|
-
onSubmit:
|
|
105
|
+
onSubmit: B,
|
|
106
106
|
className: "space-y-6",
|
|
107
107
|
children: [
|
|
108
|
-
/* @__PURE__ */ m(
|
|
108
|
+
/* @__PURE__ */ m(y, {
|
|
109
109
|
treatment: "plain",
|
|
110
110
|
className: "p-4 sm:p-6 border-border-seam",
|
|
111
111
|
children: [/* @__PURE__ */ m("h2", {
|
|
112
112
|
className: "text-lg font-semibold mb-4 flex items-center gap-2",
|
|
113
|
-
children: [/* @__PURE__ */ p(u, { size: 20 }),
|
|
113
|
+
children: [/* @__PURE__ */ p(u, { size: 20 }), w("tourScheduler.sectionDateRange", "Date Range")]
|
|
114
114
|
}), /* @__PURE__ */ m("div", {
|
|
115
115
|
className: "space-y-4",
|
|
116
116
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
117
117
|
htmlFor: "scheduler-start-date",
|
|
118
118
|
className: "block text-sm font-medium mb-2",
|
|
119
|
-
children:
|
|
119
|
+
children: w("tourScheduler.labelStartDate", "Start Date *")
|
|
120
120
|
}), /* @__PURE__ */ p("input", {
|
|
121
121
|
id: "scheduler-start-date",
|
|
122
122
|
type: "datetime-local",
|
|
123
|
-
value:
|
|
124
|
-
onChange: (e) =>
|
|
125
|
-
...
|
|
123
|
+
value: N.startDate,
|
|
124
|
+
onChange: (e) => P({
|
|
125
|
+
...N,
|
|
126
126
|
startDate: e.target.value
|
|
127
127
|
}),
|
|
128
128
|
className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
|
|
129
129
|
required: !0,
|
|
130
|
-
"aria-label":
|
|
130
|
+
"aria-label": w("tourScheduler.labelStartDate", "Start Date *")
|
|
131
131
|
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
132
132
|
htmlFor: "scheduler-end-date",
|
|
133
133
|
className: "block text-sm font-medium mb-2",
|
|
134
|
-
children:
|
|
134
|
+
children: w("tourScheduler.labelEndDate", "End Date (Optional)")
|
|
135
135
|
}), /* @__PURE__ */ p("input", {
|
|
136
136
|
id: "scheduler-end-date",
|
|
137
137
|
type: "datetime-local",
|
|
138
|
-
value:
|
|
139
|
-
onChange: (e) =>
|
|
140
|
-
...
|
|
138
|
+
value: N.endDate,
|
|
139
|
+
onChange: (e) => P({
|
|
140
|
+
...N,
|
|
141
141
|
endDate: e.target.value
|
|
142
142
|
}),
|
|
143
143
|
className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
|
|
144
|
-
"aria-label":
|
|
144
|
+
"aria-label": w("tourScheduler.labelEndDate", "End Date (Optional)")
|
|
145
145
|
})] })]
|
|
146
146
|
})]
|
|
147
147
|
}),
|
|
148
|
-
/* @__PURE__ */ m(
|
|
148
|
+
/* @__PURE__ */ m(y, {
|
|
149
149
|
treatment: "plain",
|
|
150
150
|
className: "p-4 sm:p-6 border-border-seam",
|
|
151
151
|
children: [/* @__PURE__ */ m("h2", {
|
|
152
152
|
className: "text-lg font-semibold mb-4 flex items-center gap-2",
|
|
153
|
-
children: [/* @__PURE__ */ p(d, { size: 20 }),
|
|
153
|
+
children: [/* @__PURE__ */ p(d, { size: 20 }), w("tourScheduler.sectionRecurrence", "Recurrence")]
|
|
154
154
|
}), /* @__PURE__ */ m("div", {
|
|
155
155
|
className: "space-y-4",
|
|
156
156
|
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
157
157
|
htmlFor: "scheduler-recurrence",
|
|
158
158
|
className: "block text-sm font-medium mb-2",
|
|
159
|
-
children:
|
|
159
|
+
children: w("tourScheduler.labelRecurrencePattern", "Recurrence Pattern")
|
|
160
160
|
}), /* @__PURE__ */ m("select", {
|
|
161
161
|
id: "scheduler-recurrence",
|
|
162
|
-
value:
|
|
163
|
-
onChange: (e) =>
|
|
164
|
-
...
|
|
162
|
+
value: N.recurrencePattern,
|
|
163
|
+
onChange: (e) => P({
|
|
164
|
+
...N,
|
|
165
165
|
recurrencePattern: e.target.value
|
|
166
166
|
}),
|
|
167
167
|
className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
|
|
168
|
-
"aria-label":
|
|
168
|
+
"aria-label": w("tourScheduler.labelRecurrencePattern", "Recurrence Pattern"),
|
|
169
169
|
children: [
|
|
170
170
|
/* @__PURE__ */ p("option", {
|
|
171
171
|
value: "DAILY",
|
|
172
|
-
children:
|
|
172
|
+
children: w("tourScheduler.recurrenceDaily", "Daily")
|
|
173
173
|
}),
|
|
174
174
|
/* @__PURE__ */ p("option", {
|
|
175
175
|
value: "WEEKLY",
|
|
176
|
-
children:
|
|
176
|
+
children: w("tourScheduler.recurrenceWeekly", "Weekly")
|
|
177
177
|
}),
|
|
178
178
|
/* @__PURE__ */ p("option", {
|
|
179
179
|
value: "MONTHLY",
|
|
180
|
-
children:
|
|
180
|
+
children: w("tourScheduler.recurrenceMonthly", "Monthly")
|
|
181
181
|
}),
|
|
182
182
|
/* @__PURE__ */ p("option", {
|
|
183
183
|
value: "CUSTOM",
|
|
184
|
-
children:
|
|
184
|
+
children: w("tourScheduler.recurrenceCustom", "Custom")
|
|
185
185
|
})
|
|
186
186
|
]
|
|
187
187
|
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
188
188
|
htmlFor: "scheduler-timezone",
|
|
189
189
|
className: "block text-sm font-medium mb-2",
|
|
190
|
-
children:
|
|
190
|
+
children: w("tourScheduler.labelTimezone", "Timezone")
|
|
191
191
|
}), /* @__PURE__ */ p("input", {
|
|
192
192
|
id: "scheduler-timezone",
|
|
193
193
|
type: "text",
|
|
194
|
-
value:
|
|
195
|
-
onChange: (e) =>
|
|
196
|
-
...
|
|
194
|
+
value: N.timezone,
|
|
195
|
+
onChange: (e) => P({
|
|
196
|
+
...N,
|
|
197
197
|
timezone: e.target.value
|
|
198
198
|
}),
|
|
199
199
|
className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
|
|
200
200
|
readOnly: !0,
|
|
201
|
-
"aria-label":
|
|
201
|
+
"aria-label": w("tourScheduler.labelTimezone", "Timezone")
|
|
202
202
|
})] })]
|
|
203
203
|
})]
|
|
204
204
|
}),
|
|
205
|
-
/* @__PURE__ */ p(
|
|
205
|
+
/* @__PURE__ */ p(y, {
|
|
206
206
|
treatment: "plain",
|
|
207
207
|
className: "p-4 sm:p-6 border-border-seam",
|
|
208
208
|
children: /* @__PURE__ */ m("label", {
|
|
209
209
|
className: "flex items-center gap-3 cursor-pointer",
|
|
210
210
|
children: [/* @__PURE__ */ p("input", {
|
|
211
211
|
type: "checkbox",
|
|
212
|
-
checked:
|
|
213
|
-
onChange: (e) =>
|
|
214
|
-
...
|
|
212
|
+
checked: N.isActive,
|
|
213
|
+
onChange: (e) => P({
|
|
214
|
+
...N,
|
|
215
215
|
isActive: e.target.checked
|
|
216
216
|
}),
|
|
217
217
|
className: "size-5 rounded",
|
|
218
|
-
"aria-label":
|
|
218
|
+
"aria-label": w("tourScheduler.statusActiveLabel", "Active")
|
|
219
219
|
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
|
|
220
220
|
className: "font-medium",
|
|
221
|
-
children:
|
|
221
|
+
children: w("tourScheduler.statusActiveLabel", "Active")
|
|
222
222
|
}), /* @__PURE__ */ p("div", {
|
|
223
223
|
className: "text-sm text-text-secondary",
|
|
224
|
-
children:
|
|
224
|
+
children: w("tourScheduler.statusActiveDescription", "Enable this schedule immediately after creation")
|
|
225
225
|
})] })]
|
|
226
226
|
})
|
|
227
227
|
}),
|
|
@@ -230,16 +230,16 @@ function x() {
|
|
|
230
230
|
children: [/* @__PURE__ */ p(_, {
|
|
231
231
|
type: "button",
|
|
232
232
|
variant: "outline",
|
|
233
|
-
onClick:
|
|
233
|
+
onClick: V,
|
|
234
234
|
className: "flex-1 min-h-[44px]",
|
|
235
|
-
children:
|
|
235
|
+
children: w("tourScheduler.cancel", "Cancel")
|
|
236
236
|
}), /* @__PURE__ */ p(c, {
|
|
237
237
|
permission: i.TOUR_SCHEDULE_CREATE,
|
|
238
238
|
children: /* @__PURE__ */ m(_, {
|
|
239
239
|
type: "submit",
|
|
240
|
-
disabled:
|
|
240
|
+
disabled: F || !j,
|
|
241
241
|
className: "flex-1 min-h-[44px]",
|
|
242
|
-
children: [/* @__PURE__ */ p(f, { size: 20 }),
|
|
242
|
+
children: [/* @__PURE__ */ p(f, { size: 20 }), F ? w("tourScheduler.creating", "Creating...") : w("tourScheduler.createSchedule", "Create Schedule")]
|
|
243
243
|
})
|
|
244
244
|
})]
|
|
245
245
|
})
|
|
@@ -249,6 +249,6 @@ function x() {
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
|
-
export {
|
|
252
|
+
export { C as SchedulerPage };
|
|
253
253
|
|
|
254
254
|
//# sourceMappingURL=SchedulerPage.js.map
|