@burdenoff/microfe-buildmyiq 2026.705.13 → 2026.706.10

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.
Files changed (67) hide show
  1. package/dist/buildmyiq/BuildmyiqRoot.d.ts.map +1 -1
  2. package/dist/buildmyiq/BuildmyiqRoot.js +57 -49
  3. package/dist/buildmyiq/BuildmyiqRoot.js.map +1 -1
  4. package/dist/buildmyiq/BuildmyiqRoutes.d.ts.map +1 -1
  5. package/dist/buildmyiq/BuildmyiqRoutes.js +15 -11
  6. package/dist/buildmyiq/BuildmyiqRoutes.js.map +1 -1
  7. package/dist/buildmyiq/components/Avatar.d.ts +15 -0
  8. package/dist/buildmyiq/components/Avatar.d.ts.map +1 -0
  9. package/dist/buildmyiq/components/Avatar.js +42 -0
  10. package/dist/buildmyiq/components/Avatar.js.map +1 -0
  11. package/dist/buildmyiq/components/Viz.d.ts +25 -0
  12. package/dist/buildmyiq/components/Viz.d.ts.map +1 -0
  13. package/dist/buildmyiq/components/Viz.js +78 -0
  14. package/dist/buildmyiq/components/Viz.js.map +1 -0
  15. package/dist/buildmyiq/components/index.d.ts +2 -0
  16. package/dist/buildmyiq/components/index.d.ts.map +1 -1
  17. package/dist/buildmyiq/components/index.js +2 -0
  18. package/dist/buildmyiq/pages/DashboardPage.d.ts.map +1 -1
  19. package/dist/buildmyiq/pages/DashboardPage.js +200 -98
  20. package/dist/buildmyiq/pages/DashboardPage.js.map +1 -1
  21. package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.d.ts.map +1 -1
  22. package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js +262 -241
  23. package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js.map +1 -1
  24. package/dist/buildmyiq/pages/assessments/AssessmentsPage.d.ts.map +1 -1
  25. package/dist/buildmyiq/pages/assessments/AssessmentsPage.js +142 -115
  26. package/dist/buildmyiq/pages/assessments/AssessmentsPage.js.map +1 -1
  27. package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.d.ts.map +1 -1
  28. package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js +220 -156
  29. package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js.map +1 -1
  30. package/dist/buildmyiq/pages/authoring/AuthoringPage.d.ts.map +1 -1
  31. package/dist/buildmyiq/pages/authoring/AuthoringPage.js +51 -46
  32. package/dist/buildmyiq/pages/authoring/AuthoringPage.js.map +1 -1
  33. package/dist/buildmyiq/pages/authoring/CourseBuilderPage.d.ts.map +1 -1
  34. package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js +581 -448
  35. package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js.map +1 -1
  36. package/dist/buildmyiq/pages/catalog/CatalogPage.d.ts.map +1 -1
  37. package/dist/buildmyiq/pages/catalog/CatalogPage.js +52 -42
  38. package/dist/buildmyiq/pages/catalog/CatalogPage.js.map +1 -1
  39. package/dist/buildmyiq/pages/catalog/CourseDetailPage.d.ts.map +1 -1
  40. package/dist/buildmyiq/pages/catalog/CourseDetailPage.js +422 -301
  41. package/dist/buildmyiq/pages/catalog/CourseDetailPage.js.map +1 -1
  42. package/dist/buildmyiq/pages/certificates/CertificatesPage.d.ts.map +1 -1
  43. package/dist/buildmyiq/pages/certificates/CertificatesPage.js +237 -151
  44. package/dist/buildmyiq/pages/certificates/CertificatesPage.js.map +1 -1
  45. package/dist/buildmyiq/pages/cohorts/CohortsPage.d.ts.map +1 -1
  46. package/dist/buildmyiq/pages/cohorts/CohortsPage.js +219 -138
  47. package/dist/buildmyiq/pages/cohorts/CohortsPage.js.map +1 -1
  48. package/dist/buildmyiq/pages/insights/InsightsPage.d.ts.map +1 -1
  49. package/dist/buildmyiq/pages/insights/InsightsPage.js +276 -152
  50. package/dist/buildmyiq/pages/insights/InsightsPage.js.map +1 -1
  51. package/dist/buildmyiq/pages/learning/LessonPlayerPage.d.ts.map +1 -1
  52. package/dist/buildmyiq/pages/learning/LessonPlayerPage.js +237 -174
  53. package/dist/buildmyiq/pages/learning/LessonPlayerPage.js.map +1 -1
  54. package/dist/buildmyiq/pages/learning/MyLearningPage.d.ts.map +1 -1
  55. package/dist/buildmyiq/pages/learning/MyLearningPage.js +307 -169
  56. package/dist/buildmyiq/pages/learning/MyLearningPage.js.map +1 -1
  57. package/dist/buildmyiq/pages/paths/PathsPage.d.ts +4 -0
  58. package/dist/buildmyiq/pages/paths/PathsPage.d.ts.map +1 -0
  59. package/dist/buildmyiq/pages/paths/PathsPage.js +187 -0
  60. package/dist/buildmyiq/pages/paths/PathsPage.js.map +1 -0
  61. package/dist/buildmyiq/pages/skills/SkillsPage.d.ts.map +1 -1
  62. package/dist/buildmyiq/pages/skills/SkillsPage.js +233 -140
  63. package/dist/buildmyiq/pages/skills/SkillsPage.js.map +1 -1
  64. package/dist/buildmyiq/pages/submissions/SubmissionsPage.d.ts.map +1 -1
  65. package/dist/buildmyiq/pages/submissions/SubmissionsPage.js +379 -275
  66. package/dist/buildmyiq/pages/submissions/SubmissionsPage.js.map +1 -1
  67. package/package.json +1 -1
@@ -1,250 +1,388 @@
1
1
  import { useBuildmyiq as e } from "../../context/BuildmyiqContext.js";
2
- import { PageLayout as t } from "../../components/PageLayout.js";
3
- import { formatDate as n, formatRelativeTime as r } from "../../utils/formatters.js";
4
- import { StatusBadge as i } from "../../components/StatusBadge.js";
5
- import { EmptyState as a } from "../../components/EmptyState.js";
6
- import { ErrorView as o, LoadingView as s, Section as c } from "../../components/StateViews.js";
7
- import { Tabs as l } from "../../components/Tabs.js";
8
- import { MiniBar as u } from "../../components/MiniBar.js";
2
+ import { cn as t } from "../../utils/cn.js";
3
+ import { PageLayout as n } from "../../components/PageLayout.js";
4
+ import { formatDate as r, formatDateTime as i, formatRelativeTime as a } from "../../utils/formatters.js";
5
+ import { StatusBadge as o } from "../../components/StatusBadge.js";
6
+ import { EmptyState as s } from "../../components/EmptyState.js";
7
+ import { ErrorView as c, LoadingView as l, Section as u } from "../../components/StateViews.js";
8
+ import { DataTable as d } from "../../components/DataTable.js";
9
+ import { Tabs as f } from "../../components/Tabs.js";
10
+ import { MiniBar as p } from "../../components/MiniBar.js";
11
+ import { ProgressRing as m, Sparkline as h } from "../../components/Viz.js";
9
12
  import "../../context/index.js";
10
- import { useBuiCertificates as d, useBuiCourses as f, useBuiEnrollments as p, useBuiSubmissions as m } from "../../hooks/useBuildmyiqApi.js";
13
+ import { useBuiCertificates as g, useBuiCourses as ee, useBuiEnrollments as te, useBuiSubmissions as ne } from "../../hooks/useBuildmyiqApi.js";
11
14
  import "../../hooks/index.js";
12
- import { FileLink as h } from "../../components/FileLink.js";
15
+ import { FileLink as _ } from "../../components/FileLink.js";
13
16
  import "../../components/index.js";
14
- import { useMemo as g, useState as _ } from "react";
15
- import { ArrowRight as v, Award as y, ClipboardCheck as b, GraduationCap as x, PlayCircle as S } from "lucide-react";
16
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
17
- import { Button as T, GlassCard as E } from "@burdenoff/fe-libs/ui";
17
+ import { useMemo as v, useState as y } from "react";
18
+ import { ArrowRight as b, Award as x, Calendar as re, CheckCircle2 as S, ClipboardCheck as C, GraduationCap as ie, PlayCircle as ae, TrendingUp as w, Users as T, XCircle as E } from "lucide-react";
19
+ import { jsx as D, jsxs as O } from "react/jsx-runtime";
20
+ import { Button as k, GlassCard as A } from "@burdenoff/fe-libs/ui";
18
21
  //#region src/buildmyiq/pages/learning/MyLearningPage.tsx
19
- var D = new Set(["ENROLLED", "IN_PROGRESS"]), O = () => {
20
- let { currentUser: O, navigateTo: k } = e(), A = O?.id, [j, M] = _("in_progress"), N = p({
21
- learnerId: A,
22
+ var oe = new Set(["ENROLLED", "IN_PROGRESS"]), se = (e) => e.passed == null ? "text-text-primary" : e.passed ? "text-status-success-text" : "text-status-error-text", j = () => {
23
+ let { currentUser: j, navigateTo: M } = e(), N = j?.id, [P, F] = y("in_progress"), I = te({
24
+ learnerId: N,
22
25
  limit: 100,
23
- enabled: !!A
24
- }), P = f({ limit: 100 }), F = d(void 0, A), I = m({
25
- learnerId: A,
26
+ enabled: !!N
27
+ }), L = ee({ limit: 100 }), R = g(void 0, N), z = ne({
28
+ learnerId: N,
26
29
  limit: 50,
27
- enabled: !!A
28
- }), L = g(() => [...I.data?.items ?? []].sort((e, t) => (t.submittedAt ?? t.createdAt).localeCompare(e.submittedAt ?? e.createdAt)), [I.data]), R = g(() => N.data?.items ?? [], [N.data]), z = g(() => P.data?.items ?? [], [P.data]), B = g(() => F.data ?? [], [F.data]), V = g(() => {
30
+ enabled: !!N
31
+ }), B = v(() => [...z.data?.items ?? []].sort((e, t) => (t.submittedAt ?? t.createdAt).localeCompare(e.submittedAt ?? e.createdAt)), [z.data]), V = v(() => I.data?.items ?? [], [I.data]), H = v(() => L.data?.items ?? [], [L.data]), U = v(() => R.data ?? [], [R.data]), W = v(() => {
29
32
  let e = /* @__PURE__ */ new Map();
30
- for (let t of z) e.set(t.id, t.title);
33
+ for (let t of H) e.set(t.id, t);
31
34
  return e;
32
- }, [z]), H = (e) => V.get(e) ?? "Course", U = g(() => R.filter((e) => D.has(e.status)), [R]), W = g(() => R.filter((e) => e.status === "COMPLETED"), [R]), G = g(() => [...j === "in_progress" ? U : j === "completed" ? W : R].sort((e, t) => (t.lastActiveAt ?? t.enrolledAt).localeCompare(e.lastActiveAt ?? e.enrolledAt)), [
33
- j,
34
- U,
35
- W,
36
- R
37
- ]), K = g(() => [...B].sort((e, t) => t.issuedAt.localeCompare(e.issuedAt)), [B]), q = [
35
+ }, [H]), G = v(() => {
36
+ let e = /* @__PURE__ */ new Map();
37
+ for (let t of V) e.set(t.id, t);
38
+ return e;
39
+ }, [V]), K = (e) => W.get(e)?.title ?? "Course", ce = (e) => {
40
+ let t = e.enrollmentId ? G.get(e.enrollmentId) : void 0;
41
+ return t ? K(t.courseId) : "Assessment";
42
+ }, q = v(() => V.filter((e) => oe.has(e.status)), [V]), J = v(() => V.filter((e) => e.status === "COMPLETED"), [V]), Y = v(() => [...P === "in_progress" ? q : P === "completed" ? J : V].sort((e, t) => (t.lastActiveAt ?? t.enrolledAt).localeCompare(e.lastActiveAt ?? e.enrolledAt)), [
43
+ P,
44
+ q,
45
+ J,
46
+ V
47
+ ]), X = v(() => [...U].sort((e, t) => t.issuedAt.localeCompare(e.issuedAt)), [U]), Z = v(() => B.filter((e) => e.score != null), [B]), Q = v(() => [...Z].reverse().map((e) => e.score), [Z]), $ = Z.length > 0 ? Math.round(Z.reduce((e, t) => e + (t.score ?? 0), 0) / Z.length) : null, le = v(() => B.filter((e) => e.passed === !0).length, [B]), ue = [
38
48
  {
39
49
  value: "in_progress",
40
50
  label: "In progress",
41
- count: U.length
51
+ count: q.length
42
52
  },
43
53
  {
44
54
  value: "completed",
45
55
  label: "Completed",
46
- count: W.length
56
+ count: J.length
47
57
  },
48
58
  {
49
59
  value: "all",
50
60
  label: "All",
51
- count: R.length
61
+ count: V.length
52
62
  }
53
- ], J = !!A && (N.isLoading || P.isLoading);
54
- return /* @__PURE__ */ C(t, {
63
+ ], de = !!N && (I.isLoading || L.isLoading);
64
+ return /* @__PURE__ */ D(n, {
55
65
  title: "My Learning",
56
66
  description: "Your enrollments, progress and the credentials you've earned.",
57
67
  titleGradient: !0,
58
68
  aurora: !0,
59
- children: /* @__PURE__ */ w("div", {
69
+ children: /* @__PURE__ */ O("div", {
60
70
  className: "flex flex-col gap-6",
61
71
  children: [
62
- /* @__PURE__ */ w(c, {
72
+ /* @__PURE__ */ O(u, {
63
73
  title: "Courses",
64
74
  description: "Everything you're enrolled in.",
65
- children: [A && R.length > 0 && /* @__PURE__ */ C("div", {
75
+ children: [N && V.length > 0 && /* @__PURE__ */ D("div", {
66
76
  className: "mb-4",
67
- children: /* @__PURE__ */ C(l, {
68
- items: q,
69
- value: j,
70
- onChange: M
77
+ children: /* @__PURE__ */ D(f, {
78
+ items: ue,
79
+ value: P,
80
+ onChange: F
71
81
  })
72
- }), A ? J ? /* @__PURE__ */ C(s, { label: "Loading your enrollments…" }) : N.isError ? /* @__PURE__ */ C(o, {
82
+ }), N ? de ? /* @__PURE__ */ D(l, { label: "Loading your enrollments…" }) : I.isError ? /* @__PURE__ */ D(c, {
73
83
  title: "Couldn't load your learning",
74
- message: N.error instanceof Error ? N.error.message : void 0,
75
- onRetry: () => N.refetch()
76
- }) : R.length === 0 ? /* @__PURE__ */ C(a, {
84
+ message: I.error instanceof Error ? I.error.message : void 0,
85
+ onRetry: () => I.refetch()
86
+ }) : V.length === 0 ? /* @__PURE__ */ D(s, {
77
87
  illustration: "onboarding",
78
88
  title: "You're not enrolled in anything yet",
79
89
  description: "Browse the catalog and enrol in a course to start learning.",
80
- action: /* @__PURE__ */ C(T, {
81
- onClick: () => k("catalog"),
90
+ action: /* @__PURE__ */ D(k, {
91
+ onClick: () => M("catalog"),
82
92
  children: "Explore the catalog"
83
93
  })
84
- }) : G.length === 0 ? /* @__PURE__ */ C(a, {
94
+ }) : Y.length === 0 ? /* @__PURE__ */ D(s, {
85
95
  illustration: "empty-data",
86
- title: j === "in_progress" ? "No courses in progress" : j === "completed" ? "No completed courses yet" : "No courses",
87
- description: j === "completed" ? "Finish a course to see it here — and earn a certificate." : "Switch tabs or enrol in a new course to keep learning."
88
- }) : /* @__PURE__ */ C("div", {
89
- className: "flex flex-col gap-3",
90
- children: G.map((e) => /* @__PURE__ */ w(E, {
91
- treatment: "plain",
92
- className: "flex flex-col gap-3 p-4 sm:flex-row sm:items-center sm:gap-4",
93
- children: [
94
- /* @__PURE__ */ C("div", {
95
- className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)]",
96
- children: /* @__PURE__ */ C(S, { className: "h-5 w-5 text-text-primary" })
97
- }),
98
- /* @__PURE__ */ w("div", {
99
- className: "min-w-0 flex-1",
96
+ title: P === "in_progress" ? "No courses in progress" : P === "completed" ? "No completed courses yet" : "No courses",
97
+ description: P === "completed" ? "Finish a course to see it here — and earn a certificate." : "Switch tabs or enrol in a new course to keep learning."
98
+ }) : /* @__PURE__ */ D("div", {
99
+ className: "grid grid-cols-1 gap-4 xl:grid-cols-2",
100
+ children: Y.map((e) => {
101
+ let t = W.get(e.courseId), n = t?.cover?.downloadUrl ?? null, r = e.status === "COMPLETED", i = Math.round(e.progressPct ?? 0);
102
+ return /* @__PURE__ */ O(A, {
103
+ treatment: "plain",
104
+ className: "group flex flex-col overflow-hidden transition-shadow hover:shadow-lg sm:flex-row",
105
+ children: [/* @__PURE__ */ O("div", {
106
+ className: "relative aspect-video w-full shrink-0 overflow-hidden bg-[var(--color-accent-soft)] sm:aspect-auto sm:w-44",
100
107
  children: [
101
- /* @__PURE__ */ w("div", {
102
- className: "flex flex-wrap items-center gap-2",
103
- children: [/* @__PURE__ */ C("p", {
104
- className: "truncate font-medium text-text-primary",
105
- children: H(e.courseId)
106
- }), /* @__PURE__ */ C(i, { status: e.status })]
108
+ n ? /* @__PURE__ */ D("img", {
109
+ src: n,
110
+ alt: "",
111
+ className: "h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
112
+ }) : null,
113
+ /* @__PURE__ */ D("div", {
114
+ className: "absolute inset-0 flex items-center justify-center",
115
+ children: /* @__PURE__ */ D("span", {
116
+ className: "flex h-11 w-11 items-center justify-center rounded-full bg-bg-surface/85 text-text-primary shadow-sm backdrop-blur transition-transform group-hover:scale-110",
117
+ children: /* @__PURE__ */ D(ae, { className: "h-6 w-6" })
118
+ })
119
+ }),
120
+ /* @__PURE__ */ D("div", {
121
+ className: "absolute bottom-2 left-2 rounded-full bg-bg-surface/85 p-0.5 shadow-sm backdrop-blur",
122
+ children: /* @__PURE__ */ D(m, {
123
+ value: i,
124
+ size: 38,
125
+ stroke: 5,
126
+ color: r ? "var(--color-status-success-text)" : "var(--color-accent-teal)"
127
+ })
128
+ })
129
+ ]
130
+ }), /* @__PURE__ */ O("div", {
131
+ className: "flex min-w-0 flex-1 flex-col gap-2 p-4",
132
+ children: [
133
+ /* @__PURE__ */ O("div", {
134
+ className: "flex flex-wrap items-start gap-2",
135
+ children: [/* @__PURE__ */ D("p", {
136
+ className: "min-w-0 flex-1 truncate font-semibold text-text-primary",
137
+ children: K(e.courseId)
138
+ }), /* @__PURE__ */ D(o, { status: e.status })]
139
+ }),
140
+ (t?.level || t?.skill?.name || e.cohort?.name) && /* @__PURE__ */ O("div", {
141
+ className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
142
+ children: [
143
+ t?.level && /* @__PURE__ */ D(o, { status: t.level }),
144
+ t?.skill?.name && /* @__PURE__ */ D("span", {
145
+ className: "rounded-full bg-bg-sunken px-2 py-0.5",
146
+ children: t.skill.name
147
+ }),
148
+ e.cohort?.name && /* @__PURE__ */ O("span", {
149
+ className: "inline-flex items-center gap-1",
150
+ children: [
151
+ /* @__PURE__ */ D(T, { className: "h-3.5 w-3.5" }),
152
+ " ",
153
+ e.cohort.name
154
+ ]
155
+ })
156
+ ]
107
157
  }),
108
- /* @__PURE__ */ w("div", {
109
- className: "mt-2 flex items-center gap-2",
110
- children: [/* @__PURE__ */ C(u, {
158
+ /* @__PURE__ */ O("div", {
159
+ className: "mt-1 flex items-center gap-2",
160
+ children: [/* @__PURE__ */ D(p, {
111
161
  value: e.progressPct,
112
- className: "max-w-sm flex-1"
113
- }), /* @__PURE__ */ w("span", {
114
- className: "shrink-0 text-xs tabular-nums text-text-secondary",
115
- children: [Math.round(e.progressPct ?? 0), "%"]
162
+ barClassName: r ? "bg-[var(--color-status-success-text)]" : "bg-[var(--color-accent-primary)]",
163
+ className: "flex-1"
164
+ }), /* @__PURE__ */ O("span", {
165
+ className: "shrink-0 text-xs font-semibold tabular-nums text-text-secondary",
166
+ children: [i, "%"]
116
167
  })]
117
168
  }),
118
- /* @__PURE__ */ C("p", {
119
- className: "mt-1 text-xs text-text-secondary",
120
- children: e.status === "COMPLETED" && e.completedAt ? `Completed ${r(e.completedAt)}` : `Active ${r(e.lastActiveAt ?? e.enrolledAt)}`
169
+ /* @__PURE__ */ D("p", {
170
+ className: "text-xs text-text-secondary",
171
+ children: r && e.completedAt ? `Completed ${a(e.completedAt)}` : `Active ${a(e.lastActiveAt ?? e.enrolledAt)}`
172
+ }),
173
+ /* @__PURE__ */ O("div", {
174
+ className: "mt-auto flex flex-wrap gap-2 pt-2",
175
+ children: [/* @__PURE__ */ O(k, {
176
+ size: "sm",
177
+ className: "max-sm:flex-1",
178
+ onClick: () => M(`learning/${e.id}`),
179
+ children: [r ? "Review" : "Continue", /* @__PURE__ */ D(b, { className: "ml-1 h-4 w-4" })]
180
+ }), /* @__PURE__ */ D(k, {
181
+ variant: "secondary",
182
+ size: "sm",
183
+ className: "max-sm:flex-1",
184
+ onClick: () => M(`catalog/${e.courseId}`),
185
+ children: "Overview"
186
+ })]
121
187
  })
122
188
  ]
123
- }),
124
- /* @__PURE__ */ w(T, {
125
- variant: "secondary",
126
- size: "sm",
127
- className: "shrink-0 max-sm:w-full",
128
- onClick: () => k(`learning/${e.id}`),
129
- children: [e.status === "COMPLETED" ? "Review" : "Continue", /* @__PURE__ */ C(v, { className: "ml-1 h-4 w-4" })]
130
- })
131
- ]
132
- }, e.id))
133
- }) : /* @__PURE__ */ C(a, {
189
+ })]
190
+ }, e.id);
191
+ })
192
+ }) : /* @__PURE__ */ D(s, {
134
193
  illustration: "empty-people",
135
194
  title: "Sign in to see your learning",
136
195
  description: "Your enrollments and progress appear here once you are signed in to the workspace."
137
196
  })]
138
197
  }),
139
- /* @__PURE__ */ C(c, {
198
+ /* @__PURE__ */ D(u, {
140
199
  title: "Assessment results",
141
200
  description: "Your submitted assessments, scores and educator feedback.",
142
- children: A ? I.isLoading ? /* @__PURE__ */ C(s, { label: "Loading your results…" }) : I.isError ? /* @__PURE__ */ C(o, {
201
+ children: N ? z.isLoading ? /* @__PURE__ */ D(l, { label: "Loading your results…" }) : z.isError ? /* @__PURE__ */ D(c, {
143
202
  title: "Couldn't load your results",
144
- message: I.error instanceof Error ? I.error.message : void 0,
145
- onRetry: () => I.refetch()
146
- }) : L.length === 0 ? /* @__PURE__ */ C(a, {
203
+ message: z.error instanceof Error ? z.error.message : void 0,
204
+ onRetry: () => z.refetch()
205
+ }) : B.length === 0 ? /* @__PURE__ */ D(s, {
147
206
  illustration: "empty-data",
148
207
  title: "No assessment results yet",
149
208
  description: "Take a course assessment and your score and feedback will appear here."
150
- }) : /* @__PURE__ */ C("div", {
209
+ }) : /* @__PURE__ */ O("div", {
151
210
  className: "flex flex-col gap-3",
152
- children: L.map((e) => /* @__PURE__ */ w(E, {
153
- treatment: "plain",
154
- className: "flex flex-wrap items-center gap-3 p-4",
155
- children: [
156
- /* @__PURE__ */ C("div", {
157
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)]",
158
- children: /* @__PURE__ */ C(b, { className: "h-5 w-5 text-text-primary" })
159
- }),
160
- /* @__PURE__ */ w("div", {
161
- className: "min-w-0 flex-1",
211
+ children: [$ != null && /* @__PURE__ */ O(A, {
212
+ treatment: "metric",
213
+ className: "flex flex-wrap items-center justify-between gap-4 p-4",
214
+ children: [/* @__PURE__ */ O("div", {
215
+ className: "flex items-center gap-3",
216
+ children: [/* @__PURE__ */ D(m, {
217
+ value: $,
218
+ size: 54
219
+ }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
220
+ className: "text-sm font-semibold text-text-primary",
221
+ children: "Average score"
222
+ }), /* @__PURE__ */ O("p", {
223
+ className: "text-xs text-text-secondary",
162
224
  children: [
163
- /* @__PURE__ */ w("div", {
164
- className: "flex flex-wrap items-center gap-2",
165
- children: [
166
- /* @__PURE__ */ w("p", {
167
- className: "font-medium text-text-primary",
168
- children: ["Attempt ", e.attempt]
169
- }),
170
- /* @__PURE__ */ C(i, { status: e.status }),
171
- e.passed != null && /* @__PURE__ */ C("span", {
172
- className: `text-xs font-medium ${e.passed ? "text-status-success-text" : "text-status-error-text"}`,
173
- children: e.passed ? "Passed" : "Not passed"
174
- })
175
- ]
176
- }),
177
- e.feedback && /* @__PURE__ */ C("p", {
178
- className: "mt-1 text-sm text-text-secondary",
179
- children: e.feedback
180
- }),
181
- /* @__PURE__ */ w("p", {
182
- className: "mt-1 text-xs text-text-secondary",
183
- children: [
184
- "Submitted ",
185
- n(e.submittedAt ?? e.createdAt),
186
- e.gradedAt ? ` · graded ${n(e.gradedAt)}` : ""
187
- ]
188
- })
225
+ le,
226
+ " of ",
227
+ Z.length,
228
+ " passed · ",
229
+ Z.length,
230
+ " graded"
189
231
  ]
190
- }),
191
- /* @__PURE__ */ w("div", {
192
- className: "shrink-0 text-right",
193
- children: [/* @__PURE__ */ C("p", {
194
- className: "text-lg font-semibold tabular-nums text-text-primary",
232
+ })] })]
233
+ }), Q.length >= 2 && /* @__PURE__ */ O("div", {
234
+ className: "flex items-center gap-2 text-xs text-text-secondary",
235
+ children: [
236
+ /* @__PURE__ */ D(w, { className: "h-4 w-4 text-status-success-text" }),
237
+ /* @__PURE__ */ D(h, {
238
+ data: Q,
239
+ width: 128,
240
+ height: 36
241
+ }),
242
+ /* @__PURE__ */ D("span", { children: "score trend" })
243
+ ]
244
+ })]
245
+ }), /* @__PURE__ */ D(d, {
246
+ columns: [
247
+ {
248
+ key: "assessment",
249
+ header: "Assessment",
250
+ render: (e) => /* @__PURE__ */ O("div", {
251
+ className: "flex min-w-0 items-center gap-3",
252
+ children: [/* @__PURE__ */ D("span", {
253
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)]",
254
+ children: /* @__PURE__ */ D(C, { className: "h-4 w-4 text-text-primary" })
255
+ }), /* @__PURE__ */ O("div", {
256
+ className: "min-w-0",
257
+ children: [/* @__PURE__ */ D("p", {
258
+ className: "truncate font-medium text-text-primary",
259
+ children: ce(e)
260
+ }), /* @__PURE__ */ O("p", {
261
+ className: "text-xs text-text-secondary",
262
+ children: ["Attempt ", e.attempt]
263
+ })]
264
+ })]
265
+ })
266
+ },
267
+ {
268
+ key: "status",
269
+ header: "Status",
270
+ render: (e) => /* @__PURE__ */ D(o, { status: e.status })
271
+ },
272
+ {
273
+ key: "result",
274
+ header: "Result",
275
+ render: (e) => e.passed == null ? /* @__PURE__ */ D("span", {
276
+ className: "text-text-tertiary",
277
+ children: "—"
278
+ }) : /* @__PURE__ */ O("span", {
279
+ className: t("inline-flex items-center gap-1.5 text-sm font-medium", e.passed ? "text-status-success-text" : "text-status-error-text"),
280
+ children: [e.passed ? /* @__PURE__ */ D(S, { className: "h-4 w-4" }) : /* @__PURE__ */ D(E, { className: "h-4 w-4" }), e.passed ? "Passed" : "Not passed"]
281
+ })
282
+ },
283
+ {
284
+ key: "feedback",
285
+ header: "Feedback",
286
+ hideOnMobile: !0,
287
+ render: (e) => e.feedback ? /* @__PURE__ */ D("p", {
288
+ className: "line-clamp-2 max-w-[18rem] text-sm text-text-secondary",
289
+ children: e.feedback
290
+ }) : /* @__PURE__ */ D("span", {
291
+ className: "text-text-tertiary",
292
+ children: "—"
293
+ })
294
+ },
295
+ {
296
+ key: "submitted",
297
+ header: "Submitted",
298
+ hideOnMobile: !0,
299
+ sortValue: (e) => e.submittedAt ?? e.createdAt,
300
+ render: (e) => /* @__PURE__ */ D("span", {
301
+ className: "whitespace-nowrap text-sm text-text-secondary",
302
+ children: i(e.submittedAt ?? e.createdAt)
303
+ })
304
+ },
305
+ {
306
+ key: "score",
307
+ header: "Score",
308
+ align: "right",
309
+ sortValue: (e) => e.score ?? -1,
310
+ render: (e) => /* @__PURE__ */ D("span", {
311
+ className: t("text-lg font-bold tabular-nums", se(e)),
195
312
  children: e.score == null ? "—" : `${e.score}%`
196
- }), /* @__PURE__ */ C("p", {
197
- className: "text-xs text-text-secondary",
198
- children: "score"
199
- })]
200
- })
201
- ]
202
- }, e.id))
313
+ })
314
+ }
315
+ ],
316
+ rows: B,
317
+ rowKey: (e) => e.id,
318
+ defaultSort: {
319
+ key: "submitted",
320
+ dir: "desc"
321
+ }
322
+ })]
203
323
  }) : null
204
324
  }),
205
- /* @__PURE__ */ C(c, {
325
+ /* @__PURE__ */ D(u, {
206
326
  title: "Certificates",
207
327
  description: "Verifiable credentials issued for the courses you've completed.",
208
- action: /* @__PURE__ */ w(T, {
328
+ action: /* @__PURE__ */ O(k, {
209
329
  variant: "ghost",
210
330
  size: "sm",
211
- onClick: () => k("certificates"),
212
- children: [/* @__PURE__ */ C(x, { className: "mr-1 h-4 w-4" }), " All certificates"]
331
+ onClick: () => M("certificates"),
332
+ children: [/* @__PURE__ */ D(ie, { className: "mr-1 h-4 w-4" }), " All certificates"]
213
333
  }),
214
- children: A ? F.isLoading ? /* @__PURE__ */ C(s, { label: "Loading your certificates…" }) : F.isError ? /* @__PURE__ */ C(o, {
334
+ children: N ? R.isLoading ? /* @__PURE__ */ D(l, { label: "Loading your certificates…" }) : R.isError ? /* @__PURE__ */ D(c, {
215
335
  title: "Couldn't load your certificates",
216
- message: F.error instanceof Error ? F.error.message : void 0,
217
- onRetry: () => F.refetch()
218
- }) : K.length === 0 ? /* @__PURE__ */ C(a, {
336
+ message: R.error instanceof Error ? R.error.message : void 0,
337
+ onRetry: () => R.refetch()
338
+ }) : X.length === 0 ? /* @__PURE__ */ D(s, {
219
339
  illustration: "empty-data",
220
340
  title: "No certificates yet",
221
341
  description: "Complete a credentialed course to earn a verifiable certificate."
222
- }) : /* @__PURE__ */ C("div", {
342
+ }) : /* @__PURE__ */ D("div", {
223
343
  className: "grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3",
224
- children: K.map((e) => /* @__PURE__ */ w(E, {
344
+ children: X.map((e) => /* @__PURE__ */ O(A, {
225
345
  treatment: "plain",
226
- className: "flex flex-col gap-3 p-4",
346
+ className: "flex flex-col gap-3 p-4 transition-shadow hover:shadow-lg",
227
347
  children: [
228
- /* @__PURE__ */ w("div", {
348
+ /* @__PURE__ */ O("div", {
229
349
  className: "flex items-start justify-between gap-3",
230
- children: [/* @__PURE__ */ C("div", {
231
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[var(--color-accent-soft)]",
232
- children: /* @__PURE__ */ C(y, { className: "h-5 w-5 text-text-primary" })
233
- }), /* @__PURE__ */ C(i, { status: e.status })]
350
+ children: [/* @__PURE__ */ D("div", {
351
+ className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-xl bg-[color-mix(in_srgb,var(--color-status-warning-text)_16%,transparent)]",
352
+ children: /* @__PURE__ */ D(x, { className: "h-6 w-6 text-status-warning-text" })
353
+ }), /* @__PURE__ */ D(o, { status: e.status })]
234
354
  }),
235
- /* @__PURE__ */ w("div", {
355
+ /* @__PURE__ */ O("div", {
236
356
  className: "min-w-0",
237
- children: [/* @__PURE__ */ C("p", {
238
- className: "truncate font-medium text-text-primary",
239
- children: H(e.courseId)
240
- }), /* @__PURE__ */ C("p", {
241
- className: "mt-0.5 font-mono text-xs text-text-secondary",
242
- children: e.serial
357
+ children: [/* @__PURE__ */ D("p", {
358
+ className: "truncate font-semibold text-text-primary",
359
+ children: K(e.courseId)
360
+ }), /* @__PURE__ */ O("div", {
361
+ className: "mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-text-secondary",
362
+ children: [/* @__PURE__ */ D("span", {
363
+ className: "font-mono",
364
+ children: e.serial
365
+ }), e.finalScore != null && /* @__PURE__ */ O("span", {
366
+ className: "inline-flex items-center gap-1 text-status-success-text",
367
+ children: [
368
+ /* @__PURE__ */ D(S, { className: "h-3.5 w-3.5" }),
369
+ " ",
370
+ e.finalScore,
371
+ "%"
372
+ ]
373
+ })]
243
374
  })]
244
375
  }),
245
- /* @__PURE__ */ w("div", {
246
- className: "mt-auto flex flex-wrap items-center justify-between gap-2 pt-1 text-xs text-text-secondary",
247
- children: [/* @__PURE__ */ w("span", { children: ["Issued ", n(e.issuedAt)] }), e.file ? /* @__PURE__ */ C(h, { fileId: e.file.id }) : null]
376
+ /* @__PURE__ */ O("div", {
377
+ className: "mt-auto flex flex-wrap items-center justify-between gap-2 border-t border-border-seam/60 pt-3 text-xs text-text-secondary",
378
+ children: [/* @__PURE__ */ O("span", {
379
+ className: "inline-flex items-center gap-1.5",
380
+ children: [
381
+ /* @__PURE__ */ D(re, { className: "h-3.5 w-3.5" }),
382
+ " Issued ",
383
+ r(e.issuedAt)
384
+ ]
385
+ }), e.file ? /* @__PURE__ */ D(_, { fileId: e.file.id }) : null]
248
386
  })
249
387
  ]
250
388
  }, e.id))
@@ -255,6 +393,6 @@ var D = new Set(["ENROLLED", "IN_PROGRESS"]), O = () => {
255
393
  });
256
394
  };
257
395
  //#endregion
258
- export { O as MyLearningPage };
396
+ export { j as MyLearningPage };
259
397
 
260
398
  //# sourceMappingURL=MyLearningPage.js.map