@burdenoff/microfe-tours 2026.608.1 → 2026.625.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.
@@ -4,114 +4,118 @@ 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 { useEventBus as f } from "@burdenoff/fe-libs/shared/events";
7
+ import { EmphasisPanel as f } from "@burdenoff/fe-libs/ui";
8
+ import { useEventBus as p } from "@burdenoff/fe-libs/shared/events";
8
9
  //#region src/tours/pages/MyToursProgressPage.tsx
9
- function p() {
10
- let { tr: p } = n(), { currentUser: h, productId: g, moduleId: _, pageId: v, workspaceId: y } = e(), b = f(), x = a(!1);
10
+ function m() {
11
+ let { tr: m } = n(), { currentUser: g, productId: _, moduleId: v, pageId: y, workspaceId: b } = e(), x = p(), S = a(!1);
11
12
  r(() => {
12
- x.current || (x.current = !0, b.emit("tours.page.viewed", {
13
+ S.current || (S.current = !0, x.emit("tours.page.viewed", {
13
14
  page: "/tours/progress",
14
- productId: g,
15
- moduleId: _,
16
- pageId: v,
17
- workspaceId: y
15
+ productId: _,
16
+ moduleId: v,
17
+ pageId: y,
18
+ workspaceId: b
18
19
  }));
19
20
  }, [
20
- b,
21
- g,
21
+ x,
22
22
  _,
23
23
  v,
24
- y
24
+ y,
25
+ b
25
26
  ]);
26
- let { data: S, loading: C } = t({
27
+ let { data: C, loading: w } = t({
27
28
  variables: {
28
- userId: h?.id,
29
+ userId: g?.id,
29
30
  pagination: {
30
31
  limit: 100,
31
32
  offset: 0
32
33
  }
33
34
  },
34
- skip: !h?.id,
35
+ skip: !g?.id,
35
36
  fetchPolicy: "cache-and-network"
36
- }), w = i(() => {
37
+ }), T = i(() => {
37
38
  let e = {
38
39
  IN_PROGRESS: [],
39
40
  COMPLETED: [],
40
41
  SKIPPED: [],
41
42
  OTHER: []
42
- }, t = (S?.userTourProgresses ?? []).filter((e) => !(g && e.tour.productId !== g || _ && e.tour.moduleId && e.tour.moduleId !== _ || v && e.tour.pageId && e.tour.pageId !== v));
43
+ }, t = (C?.userTourProgresses ?? []).filter((e) => !(_ && e.tour.productId !== _ || v && e.tour.moduleId && e.tour.moduleId !== v || y && e.tour.pageId && e.tour.pageId !== y));
43
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);
44
45
  return e;
45
46
  }, [
46
- S,
47
- g,
47
+ C,
48
48
  _,
49
- v
49
+ v,
50
+ y
50
51
  ]);
51
52
  return /* @__PURE__ */ d("div", {
52
53
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
53
54
  children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
54
- className: "text-xl sm:text-2xl font-bold text-foreground",
55
- children: p("myToursProgress.title")
55
+ className: "text-xl sm:text-2xl font-bold text-text-primary",
56
+ children: m("myToursProgress.title")
56
57
  }), /* @__PURE__ */ u("p", {
57
- className: "text-sm sm:text-base text-muted-foreground",
58
- children: p("myToursProgress.subtitle")
59
- })] }), C && (S?.userTourProgresses?.length ?? 0) === 0 ? /* @__PURE__ */ u("output", {
60
- className: "text-sm text-muted-foreground",
61
- children: p("myToursProgress.loading")
58
+ className: "text-sm sm:text-base text-text-secondary",
59
+ children: m("myToursProgress.subtitle")
60
+ })] }), w && (C?.userTourProgresses?.length ?? 0) === 0 ? /* @__PURE__ */ u("output", {
61
+ className: "text-sm text-text-secondary",
62
+ children: m("myToursProgress.loading")
62
63
  }) : /* @__PURE__ */ d("div", {
63
64
  className: "space-y-6",
64
65
  children: [
65
- /* @__PURE__ */ u(m, {
66
- title: p("myToursProgress.inProgress"),
67
- icon: /* @__PURE__ */ u(l, {
68
- size: 16,
69
- className: "text-warning"
70
- }),
71
- rows: w.IN_PROGRESS,
72
- emptyText: p("myToursProgress.emptyInProgress")
66
+ /* @__PURE__ */ u(f, {
67
+ className: "p-4 sm:p-5",
68
+ children: /* @__PURE__ */ u(h, {
69
+ title: m("myToursProgress.inProgress"),
70
+ icon: /* @__PURE__ */ u(l, {
71
+ size: 16,
72
+ className: "text-warning"
73
+ }),
74
+ rows: T.IN_PROGRESS,
75
+ emptyText: m("myToursProgress.emptyInProgress")
76
+ })
73
77
  }),
74
- /* @__PURE__ */ u(m, {
75
- title: p("myToursProgress.completed"),
78
+ /* @__PURE__ */ u(h, {
79
+ title: m("myToursProgress.completed"),
76
80
  icon: /* @__PURE__ */ u(o, {
77
81
  size: 16,
78
82
  className: "text-success"
79
83
  }),
80
- rows: w.COMPLETED,
81
- emptyText: p("myToursProgress.emptyCompleted")
84
+ rows: T.COMPLETED,
85
+ emptyText: m("myToursProgress.emptyCompleted")
82
86
  }),
83
- /* @__PURE__ */ u(m, {
84
- title: p("myToursProgress.skipped"),
87
+ /* @__PURE__ */ u(h, {
88
+ title: m("myToursProgress.skipped"),
85
89
  icon: /* @__PURE__ */ u(c, {
86
90
  size: 16,
87
- className: "text-muted-foreground"
91
+ className: "text-text-secondary"
88
92
  }),
89
- rows: w.SKIPPED,
90
- emptyText: p("myToursProgress.emptySkipped")
93
+ rows: T.SKIPPED,
94
+ emptyText: m("myToursProgress.emptySkipped")
91
95
  }),
92
- w.OTHER.length > 0 ? /* @__PURE__ */ u(m, {
93
- title: p("myToursProgress.other"),
96
+ T.OTHER.length > 0 ? /* @__PURE__ */ u(h, {
97
+ title: m("myToursProgress.other"),
94
98
  icon: /* @__PURE__ */ u(s, {
95
99
  size: 16,
96
- className: "text-muted-foreground"
100
+ className: "text-text-secondary"
97
101
  }),
98
- rows: w.OTHER,
99
- emptyText: p("myToursProgress.emptyOther")
102
+ rows: T.OTHER,
103
+ emptyText: m("myToursProgress.emptyOther")
100
104
  }) : null
101
105
  ]
102
106
  })]
103
107
  });
104
108
  }
105
- function m({ title: e, icon: t, rows: n, emptyText: r }) {
109
+ function h({ title: e, icon: t, rows: n, emptyText: r }) {
106
110
  return /* @__PURE__ */ d("section", {
107
111
  className: "space-y-2",
108
112
  children: [/* @__PURE__ */ d("h2", {
109
- className: "flex items-center gap-2 text-sm font-semibold text-foreground",
113
+ className: "flex items-center gap-2 text-sm font-semibold text-text-primary",
110
114
  children: [
111
115
  t,
112
116
  e,
113
117
  /* @__PURE__ */ d("span", {
114
- className: "text-xs text-muted-foreground font-normal",
118
+ className: "text-xs text-text-secondary font-normal",
115
119
  children: [
116
120
  "(",
117
121
  n.length,
@@ -120,19 +124,19 @@ function m({ title: e, icon: t, rows: n, emptyText: r }) {
120
124
  })
121
125
  ]
122
126
  }), n.length === 0 ? /* @__PURE__ */ u("p", {
123
- className: "text-sm text-muted-foreground",
127
+ className: "text-sm text-text-secondary",
124
128
  role: "status",
125
129
  "aria-live": "polite",
126
130
  children: r
127
131
  }) : /* @__PURE__ */ u("ul", {
128
- className: "divide-y divide-border rounded-md border border-border",
132
+ className: "divide-y divide-border-seam rounded-md border border-border-seam",
129
133
  children: n.map((e) => /* @__PURE__ */ d("li", {
130
134
  className: "flex items-center justify-between gap-3 p-3",
131
135
  children: [/* @__PURE__ */ u("span", {
132
- className: "text-sm text-foreground line-clamp-1",
136
+ className: "text-sm text-text-primary line-clamp-1",
133
137
  children: e.tour.name
134
138
  }), e.lastViewedAt ? /* @__PURE__ */ u("time", {
135
- className: "text-xs text-muted-foreground",
139
+ className: "text-xs text-text-secondary",
136
140
  dateTime: e.lastViewedAt,
137
141
  children: new Date(e.lastViewedAt).toLocaleDateString()
138
142
  }) : null]
@@ -141,6 +145,6 @@ function m({ title: e, icon: t, rows: n, emptyText: r }) {
141
145
  });
142
146
  }
143
147
  //#endregion
144
- export { p as MyToursProgressPage };
148
+ export { m as MyToursProgressPage };
145
149
 
146
150
  //# 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';\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-foreground\">\n {tr('myToursProgress.title')}\n </h1>\n <p className=\"text-sm sm:text-base text-muted-foreground\">\n {tr('myToursProgress.subtitle')}\n </p>\n </div>\n\n {loading && (data?.userTourProgresses?.length ?? 0) === 0 ? (\n <output className=\"text-sm text-muted-foreground\">{tr('myToursProgress.loading')}</output>\n ) : (\n <div className=\"space-y-6\">\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 <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-muted-foreground\" />}\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-muted-foreground\" />}\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-foreground\">\n {icon}\n {title}\n <span className=\"text-xs text-muted-foreground font-normal\">({rows.length})</span>\n </h2>\n {rows.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\" role=\"status\" aria-live=\"polite\">\n {emptyText}\n </p>\n ) : (\n <ul className=\"divide-y divide-border rounded-md border border-border\">\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-foreground line-clamp-1\">{row.tour.name}</span>\n {row.lastViewedAt ? (\n <time className=\"text-xs text-muted-foreground\" 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":";;;;;;;;AAoBA,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;CAEv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"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;EAA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PI,EAAI,GAOR,CACL;GACC,CAAA,CAEC"}
@@ -8,45 +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 { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { useEventBus as v } from "@burdenoff/fe-libs/shared/events";
11
+ import { Button as _, GlassCard as v } from "@burdenoff/fe-libs/ui";
12
+ import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
+ import { useEventBus as b } from "@burdenoff/fe-libs/shared/events";
13
14
  //#region src/tours/pages/SchedulerPage.tsx
14
- function y() {
15
- let { t: y } = _(), b = o((e, t) => {
16
- let n = y(e);
15
+ function x() {
16
+ let { t: x } = y(), S = o((e, t) => {
17
+ let n = x(e);
17
18
  return n === e ? t : n;
18
- }, [y]), { tourId: x } = g(), S = h(), C = e(), { basePath: w = "/" } = C, T = v(), { hasPermission: E } = r(), D = E(i.TOUR_SCHEDULE_CREATE), O = E(i.TOUR_SCHEDULE_LIST), [k, A] = s({
19
+ }, [x]), { tourId: C } = g(), w = h(), T = e(), { basePath: E = "/" } = T, D = b(), { hasPermission: O } = r(), k = O(i.TOUR_SCHEDULE_CREATE), A = O(i.TOUR_SCHEDULE_LIST), [j, M] = s({
19
20
  startDate: "",
20
21
  endDate: "",
21
22
  recurrencePattern: "DAILY",
22
23
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
23
24
  isActive: !0
24
- }), [j, M] = s(!1), [N] = t(), { data: P } = n({
25
- variables: { tourId: x },
26
- skip: !x || !O
27
- }), F = P?.tourSchedules ?? [], I = async (e) => {
28
- if (e.preventDefault(), x) {
29
- M(!0);
25
+ }), [N, P] = s(!1), [F] = t(), { data: I } = n({
26
+ variables: { tourId: C },
27
+ skip: !C || !A
28
+ }), L = I?.tourSchedules ?? [], R = async (e) => {
29
+ if (e.preventDefault(), C) {
30
+ P(!0);
30
31
  try {
31
- let e = k.recurrencePattern === "DAILY" ? "FREQ=DAILY" : k.recurrencePattern === "WEEKLY" ? "FREQ=WEEKLY" : k.recurrencePattern === "MONTHLY" ? "FREQ=MONTHLY" : void 0;
32
- await N({
32
+ let e = j.recurrencePattern === "DAILY" ? "FREQ=DAILY" : j.recurrencePattern === "WEEKLY" ? "FREQ=WEEKLY" : j.recurrencePattern === "MONTHLY" ? "FREQ=MONTHLY" : void 0;
33
+ await F({
33
34
  variables: { input: {
34
- tourId: x,
35
- startDate: new Date(k.startDate).toISOString(),
36
- endDate: k.endDate ? new Date(k.endDate).toISOString() : void 0,
35
+ tourId: C,
36
+ startDate: new Date(j.startDate).toISOString(),
37
+ endDate: j.endDate ? new Date(j.endDate).toISOString() : void 0,
37
38
  recurrenceRule: e,
38
- timezone: k.timezone
39
+ timezone: j.timezone
39
40
  } },
40
41
  refetchQueries: ["GetTourSchedules"]
41
- }), S(`${w}/${x}/edit`);
42
+ }), w(`${E}/${C}/edit`);
42
43
  } catch {
43
- a(T, "schedule.create", C);
44
+ a(D, "schedule.create", T);
44
45
  } finally {
45
- M(!1);
46
+ P(!1);
46
47
  }
47
48
  }
48
- }, L = () => {
49
- S(`${w}/${x}/edit`);
49
+ }, z = () => {
50
+ w(`${E}/${C}/edit`);
50
51
  };
51
52
  return /* @__PURE__ */ m("div", {
52
53
  className: "space-y-4 sm:space-y-6 p-3 sm:p-6 max-w-3xl mx-auto",
@@ -55,43 +56,44 @@ function y() {
55
56
  className: "flex items-center gap-3 sm:gap-4",
56
57
  children: [/* @__PURE__ */ p("button", {
57
58
  type: "button",
58
- onClick: L,
59
+ onClick: z,
59
60
  className: "p-2 min-h-[44px] min-w-[44px] hover:bg-accent rounded-md",
60
- "aria-label": b("tourScheduler.goBack", "Go back"),
61
+ "aria-label": S("tourScheduler.goBack", "Go back"),
61
62
  children: /* @__PURE__ */ p(l, { size: 20 })
62
63
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
63
64
  className: "text-xl sm:text-2xl font-bold",
64
- children: b("tourScheduler.title", "Schedule Tour")
65
+ children: S("tourScheduler.title", "Schedule Tour")
65
66
  }), /* @__PURE__ */ p("p", {
66
- className: "text-sm text-muted-foreground",
67
- children: b("tourScheduler.subtitle", "Configure when this tour should be activated")
67
+ className: "text-sm text-text-secondary",
68
+ children: S("tourScheduler.subtitle", "Configure when this tour should be activated")
68
69
  })] })]
69
70
  }),
70
- F.length > 0 && /* @__PURE__ */ m("div", {
71
- className: "border border-border rounded-md p-4 sm:p-6 bg-card",
71
+ L.length > 0 && /* @__PURE__ */ m(v, {
72
+ treatment: "plain",
73
+ className: "p-4 sm:p-6 border-border-seam",
72
74
  children: [/* @__PURE__ */ p("h2", {
73
75
  className: "text-lg font-semibold mb-4",
74
- children: b("tourScheduler.existingSchedules", "Existing Schedules")
76
+ children: S("tourScheduler.existingSchedules", "Existing Schedules")
75
77
  }), /* @__PURE__ */ p("div", {
76
78
  className: "space-y-2",
77
- children: F.map((e) => /* @__PURE__ */ m("div", {
78
- className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between p-3 border border-border rounded-md",
79
+ children: L.map((e) => /* @__PURE__ */ m("div", {
80
+ className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between p-3 border border-border-seam rounded-md",
79
81
  children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("div", {
80
82
  className: "text-sm font-medium",
81
- children: [new Date(e.startDate).toLocaleDateString(), e.endDate ? ` — ${new Date(e.endDate).toLocaleDateString()}` : ` — ${b("tourScheduler.noEndDate", "No end date")}`]
83
+ children: [new Date(e.startDate).toLocaleDateString(), e.endDate ? ` — ${new Date(e.endDate).toLocaleDateString()}` : ` — ${S("tourScheduler.noEndDate", "No end date")}`]
82
84
  }), /* @__PURE__ */ m("div", {
83
- className: "text-xs text-muted-foreground",
85
+ className: "text-xs text-text-secondary",
84
86
  children: [
85
- e.recurrenceRule || b("tourScheduler.oneTime", "One-time"),
87
+ e.recurrenceRule || S("tourScheduler.oneTime", "One-time"),
86
88
  " ·",
87
89
  " ",
88
90
  e.timezone,
89
- e.isActive ? ` · ${b("tourScheduler.active", "Active")}` : ` · ${b("tourScheduler.inactive", "Inactive")}`
91
+ e.isActive ? ` · ${S("tourScheduler.active", "Active")}` : ` · ${S("tourScheduler.inactive", "Inactive")}`
90
92
  ]
91
93
  })] }), /* @__PURE__ */ m("div", {
92
- className: "text-xs text-muted-foreground",
94
+ className: "text-xs text-text-secondary tabular-nums",
93
95
  children: [
94
- b("tourScheduler.runs", "Runs"),
96
+ S("tourScheduler.runs", "Runs"),
95
97
  ": ",
96
98
  e.executionCount
97
99
  ]
@@ -100,140 +102,144 @@ function y() {
100
102
  })]
101
103
  }),
102
104
  /* @__PURE__ */ m("form", {
103
- onSubmit: I,
105
+ onSubmit: R,
104
106
  className: "space-y-6",
105
107
  children: [
106
- /* @__PURE__ */ m("div", {
107
- className: "border border-border rounded-md p-4 sm:p-6 bg-card",
108
+ /* @__PURE__ */ m(v, {
109
+ treatment: "plain",
110
+ className: "p-4 sm:p-6 border-border-seam",
108
111
  children: [/* @__PURE__ */ m("h2", {
109
112
  className: "text-lg font-semibold mb-4 flex items-center gap-2",
110
- children: [/* @__PURE__ */ p(u, { size: 20 }), b("tourScheduler.sectionDateRange", "Date Range")]
113
+ children: [/* @__PURE__ */ p(u, { size: 20 }), S("tourScheduler.sectionDateRange", "Date Range")]
111
114
  }), /* @__PURE__ */ m("div", {
112
115
  className: "space-y-4",
113
116
  children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
114
117
  htmlFor: "scheduler-start-date",
115
118
  className: "block text-sm font-medium mb-2",
116
- children: b("tourScheduler.labelStartDate", "Start Date *")
119
+ children: S("tourScheduler.labelStartDate", "Start Date *")
117
120
  }), /* @__PURE__ */ p("input", {
118
121
  id: "scheduler-start-date",
119
122
  type: "datetime-local",
120
- value: k.startDate,
121
- onChange: (e) => A({
122
- ...k,
123
+ value: j.startDate,
124
+ onChange: (e) => M({
125
+ ...j,
123
126
  startDate: e.target.value
124
127
  }),
125
- className: "w-full px-3 py-2 min-h-[44px] border border-border rounded-md bg-background",
128
+ className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
126
129
  required: !0,
127
- "aria-label": b("tourScheduler.labelStartDate", "Start Date *")
130
+ "aria-label": S("tourScheduler.labelStartDate", "Start Date *")
128
131
  })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
129
132
  htmlFor: "scheduler-end-date",
130
133
  className: "block text-sm font-medium mb-2",
131
- children: b("tourScheduler.labelEndDate", "End Date (Optional)")
134
+ children: S("tourScheduler.labelEndDate", "End Date (Optional)")
132
135
  }), /* @__PURE__ */ p("input", {
133
136
  id: "scheduler-end-date",
134
137
  type: "datetime-local",
135
- value: k.endDate,
136
- onChange: (e) => A({
137
- ...k,
138
+ value: j.endDate,
139
+ onChange: (e) => M({
140
+ ...j,
138
141
  endDate: e.target.value
139
142
  }),
140
- className: "w-full px-3 py-2 min-h-[44px] border border-border rounded-md bg-background",
141
- "aria-label": b("tourScheduler.labelEndDate", "End Date (Optional)")
143
+ className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
144
+ "aria-label": S("tourScheduler.labelEndDate", "End Date (Optional)")
142
145
  })] })]
143
146
  })]
144
147
  }),
145
- /* @__PURE__ */ m("div", {
146
- className: "border border-border rounded-md p-4 sm:p-6 bg-card",
148
+ /* @__PURE__ */ m(v, {
149
+ treatment: "plain",
150
+ className: "p-4 sm:p-6 border-border-seam",
147
151
  children: [/* @__PURE__ */ m("h2", {
148
152
  className: "text-lg font-semibold mb-4 flex items-center gap-2",
149
- children: [/* @__PURE__ */ p(d, { size: 20 }), b("tourScheduler.sectionRecurrence", "Recurrence")]
153
+ children: [/* @__PURE__ */ p(d, { size: 20 }), S("tourScheduler.sectionRecurrence", "Recurrence")]
150
154
  }), /* @__PURE__ */ m("div", {
151
155
  className: "space-y-4",
152
156
  children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
153
157
  htmlFor: "scheduler-recurrence",
154
158
  className: "block text-sm font-medium mb-2",
155
- children: b("tourScheduler.labelRecurrencePattern", "Recurrence Pattern")
159
+ children: S("tourScheduler.labelRecurrencePattern", "Recurrence Pattern")
156
160
  }), /* @__PURE__ */ m("select", {
157
161
  id: "scheduler-recurrence",
158
- value: k.recurrencePattern,
159
- onChange: (e) => A({
160
- ...k,
162
+ value: j.recurrencePattern,
163
+ onChange: (e) => M({
164
+ ...j,
161
165
  recurrencePattern: e.target.value
162
166
  }),
163
- className: "w-full px-3 py-2 min-h-[44px] border border-border rounded-md bg-background",
164
- "aria-label": b("tourScheduler.labelRecurrencePattern", "Recurrence Pattern"),
167
+ className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
168
+ "aria-label": S("tourScheduler.labelRecurrencePattern", "Recurrence Pattern"),
165
169
  children: [
166
170
  /* @__PURE__ */ p("option", {
167
171
  value: "DAILY",
168
- children: b("tourScheduler.recurrenceDaily", "Daily")
172
+ children: S("tourScheduler.recurrenceDaily", "Daily")
169
173
  }),
170
174
  /* @__PURE__ */ p("option", {
171
175
  value: "WEEKLY",
172
- children: b("tourScheduler.recurrenceWeekly", "Weekly")
176
+ children: S("tourScheduler.recurrenceWeekly", "Weekly")
173
177
  }),
174
178
  /* @__PURE__ */ p("option", {
175
179
  value: "MONTHLY",
176
- children: b("tourScheduler.recurrenceMonthly", "Monthly")
180
+ children: S("tourScheduler.recurrenceMonthly", "Monthly")
177
181
  }),
178
182
  /* @__PURE__ */ p("option", {
179
183
  value: "CUSTOM",
180
- children: b("tourScheduler.recurrenceCustom", "Custom")
184
+ children: S("tourScheduler.recurrenceCustom", "Custom")
181
185
  })
182
186
  ]
183
187
  })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
184
188
  htmlFor: "scheduler-timezone",
185
189
  className: "block text-sm font-medium mb-2",
186
- children: b("tourScheduler.labelTimezone", "Timezone")
190
+ children: S("tourScheduler.labelTimezone", "Timezone")
187
191
  }), /* @__PURE__ */ p("input", {
188
192
  id: "scheduler-timezone",
189
193
  type: "text",
190
- value: k.timezone,
191
- onChange: (e) => A({
192
- ...k,
194
+ value: j.timezone,
195
+ onChange: (e) => M({
196
+ ...j,
193
197
  timezone: e.target.value
194
198
  }),
195
- className: "w-full px-3 py-2 min-h-[44px] border border-border rounded-md bg-background",
199
+ className: "w-full px-3 py-2 min-h-[44px] border border-border-subtle rounded-md bg-bg-surface",
196
200
  readOnly: !0,
197
- "aria-label": b("tourScheduler.labelTimezone", "Timezone")
201
+ "aria-label": S("tourScheduler.labelTimezone", "Timezone")
198
202
  })] })]
199
203
  })]
200
204
  }),
201
- /* @__PURE__ */ p("div", {
202
- className: "border border-border rounded-md p-4 sm:p-6 bg-card",
205
+ /* @__PURE__ */ p(v, {
206
+ treatment: "plain",
207
+ className: "p-4 sm:p-6 border-border-seam",
203
208
  children: /* @__PURE__ */ m("label", {
204
209
  className: "flex items-center gap-3 cursor-pointer",
205
210
  children: [/* @__PURE__ */ p("input", {
206
211
  type: "checkbox",
207
- checked: k.isActive,
208
- onChange: (e) => A({
209
- ...k,
212
+ checked: j.isActive,
213
+ onChange: (e) => M({
214
+ ...j,
210
215
  isActive: e.target.checked
211
216
  }),
212
217
  className: "size-5 rounded",
213
- "aria-label": b("tourScheduler.statusActiveLabel", "Active")
218
+ "aria-label": S("tourScheduler.statusActiveLabel", "Active")
214
219
  }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("div", {
215
220
  className: "font-medium",
216
- children: b("tourScheduler.statusActiveLabel", "Active")
221
+ children: S("tourScheduler.statusActiveLabel", "Active")
217
222
  }), /* @__PURE__ */ p("div", {
218
- className: "text-sm text-muted-foreground",
219
- children: b("tourScheduler.statusActiveDescription", "Enable this schedule immediately after creation")
223
+ className: "text-sm text-text-secondary",
224
+ children: S("tourScheduler.statusActiveDescription", "Enable this schedule immediately after creation")
220
225
  })] })]
221
226
  })
222
227
  }),
223
228
  /* @__PURE__ */ m("div", {
224
229
  className: "flex flex-col sm:flex-row gap-3",
225
- children: [/* @__PURE__ */ p("button", {
230
+ children: [/* @__PURE__ */ p(_, {
226
231
  type: "button",
227
- onClick: L,
228
- className: "flex-1 px-4 py-2 min-h-[44px] border border-border rounded-md hover:bg-accent",
229
- children: b("tourScheduler.cancel", "Cancel")
232
+ variant: "outline",
233
+ onClick: z,
234
+ className: "flex-1 min-h-[44px]",
235
+ children: S("tourScheduler.cancel", "Cancel")
230
236
  }), /* @__PURE__ */ p(c, {
231
237
  permission: i.TOUR_SCHEDULE_CREATE,
232
- children: /* @__PURE__ */ m("button", {
238
+ children: /* @__PURE__ */ m(_, {
233
239
  type: "submit",
234
- disabled: j || !D,
235
- className: "flex-1 px-4 py-2 min-h-[44px] bg-primary text-primary-foreground rounded-md hover:bg-primary/90 disabled:opacity-50 flex items-center justify-center gap-2",
236
- children: [/* @__PURE__ */ p(f, { size: 20 }), j ? b("tourScheduler.creating", "Creating...") : b("tourScheduler.createSchedule", "Create Schedule")]
240
+ disabled: N || !k,
241
+ className: "flex-1 min-h-[44px]",
242
+ children: [/* @__PURE__ */ p(f, { size: 20 }), N ? S("tourScheduler.creating", "Creating...") : S("tourScheduler.createSchedule", "Create Schedule")]
237
243
  })
238
244
  })]
239
245
  })
@@ -243,6 +249,6 @@ function y() {
243
249
  });
244
250
  }
245
251
  //#endregion
246
- export { y as SchedulerPage };
252
+ export { x as SchedulerPage };
247
253
 
248
254
  //# sourceMappingURL=SchedulerPage.js.map