@burdenoff/microfe-buildmyiq 2026.715.2 → 2026.720.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/buildmyiq/BuildmyiqAdminRoot.d.ts.map +1 -1
- package/dist/buildmyiq/BuildmyiqAdminRoot.js +149 -135
- package/dist/buildmyiq/BuildmyiqAdminRoot.js.map +1 -1
- package/dist/buildmyiq/BuildmyiqRoot.d.ts.map +1 -1
- package/dist/buildmyiq/BuildmyiqRoot.js +59 -54
- package/dist/buildmyiq/BuildmyiqRoot.js.map +1 -1
- package/dist/buildmyiq/BuildmyiqRoutes.js.map +1 -1
- package/dist/buildmyiq/components/Avatar.js.map +1 -1
- package/dist/buildmyiq/components/BuiDiscussion.js.map +1 -1
- package/dist/buildmyiq/components/BuiPermissionButton.d.ts +25 -0
- package/dist/buildmyiq/components/BuiPermissionButton.d.ts.map +1 -0
- package/dist/buildmyiq/components/BuiPermissionButton.js +15 -0
- package/dist/buildmyiq/components/BuiPermissionButton.js.map +1 -0
- package/dist/buildmyiq/components/BuiTags.js.map +1 -1
- package/dist/buildmyiq/components/DataTable.js.map +1 -1
- package/dist/buildmyiq/components/EmptyState.js.map +1 -1
- package/dist/buildmyiq/components/EvidenceUpload.js.map +1 -1
- package/dist/buildmyiq/components/FileLink.js.map +1 -1
- package/dist/buildmyiq/components/FilterTabs.js.map +1 -1
- package/dist/buildmyiq/components/MetricsCard.js.map +1 -1
- package/dist/buildmyiq/components/MiniBar.js.map +1 -1
- package/dist/buildmyiq/components/PageLayout.js.map +1 -1
- package/dist/buildmyiq/components/Pagination.js.map +1 -1
- package/dist/buildmyiq/components/StateViews.js.map +1 -1
- package/dist/buildmyiq/components/StatusBadge.js.map +1 -1
- package/dist/buildmyiq/components/Tabs.js.map +1 -1
- package/dist/buildmyiq/components/Viz.js.map +1 -1
- package/dist/buildmyiq/components/index.d.ts +1 -0
- package/dist/buildmyiq/components/index.d.ts.map +1 -1
- package/dist/buildmyiq/components/index.js +1 -0
- package/dist/buildmyiq/context/BuildmyiqContext.js.map +1 -1
- package/dist/buildmyiq/hooks/index.d.ts +1 -0
- package/dist/buildmyiq/hooks/index.d.ts.map +1 -1
- package/dist/buildmyiq/hooks/index.js +1 -0
- package/dist/buildmyiq/hooks/useBuiComments.js.map +1 -1
- package/dist/buildmyiq/hooks/useBuiFiles.js.map +1 -1
- package/dist/buildmyiq/hooks/useBuiPermissions.d.ts +54 -0
- package/dist/buildmyiq/hooks/useBuiPermissions.d.ts.map +1 -0
- package/dist/buildmyiq/hooks/useBuiPermissions.js +2 -0
- package/dist/buildmyiq/hooks/useBuiTags.js.map +1 -1
- package/dist/buildmyiq/hooks/useBuildmyiqApi.js.map +1 -1
- package/dist/buildmyiq/hooks/useCursorPager.js.map +1 -1
- package/dist/buildmyiq/pages/DashboardPage.js.map +1 -1
- package/dist/buildmyiq/pages/_shared/CourseCard.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentDetailPage.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/AssessmentsPage.js.map +1 -1
- package/dist/buildmyiq/pages/assessments/TakeAssessmentPage.js.map +1 -1
- package/dist/buildmyiq/pages/authoring/AuthoringPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/authoring/AuthoringPage.js +97 -86
- package/dist/buildmyiq/pages/authoring/AuthoringPage.js.map +1 -1
- package/dist/buildmyiq/pages/authoring/CourseBuilderPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js +159 -118
- package/dist/buildmyiq/pages/authoring/CourseBuilderPage.js.map +1 -1
- package/dist/buildmyiq/pages/authoring/_forms.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CatalogPage.js.map +1 -1
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js +75 -69
- package/dist/buildmyiq/pages/catalog/CourseDetailPage.js.map +1 -1
- package/dist/buildmyiq/pages/certificates/CertificatesPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/certificates/CertificatesPage.js +186 -170
- package/dist/buildmyiq/pages/certificates/CertificatesPage.js.map +1 -1
- package/dist/buildmyiq/pages/cohorts/CohortsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/cohorts/CohortsPage.js +177 -166
- package/dist/buildmyiq/pages/cohorts/CohortsPage.js.map +1 -1
- package/dist/buildmyiq/pages/insights/InsightsPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/LessonPlayerPage.js.map +1 -1
- package/dist/buildmyiq/pages/learning/MyLearningPage.js.map +1 -1
- package/dist/buildmyiq/pages/paths/PathsPage.js.map +1 -1
- package/dist/buildmyiq/pages/skills/SkillsPage.js.map +1 -1
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.d.ts.map +1 -1
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.js +160 -154
- package/dist/buildmyiq/pages/submissions/SubmissionsPage.js.map +1 -1
- package/dist/buildmyiq/shared/hooks/useTr.js.map +1 -1
- package/dist/buildmyiq/types/index.d.ts.map +1 -1
- package/dist/buildmyiq/types/index.js.map +1 -1
- package/dist/buildmyiq/utils/cn.js.map +1 -1
- package/dist/buildmyiq/utils/formatters.js.map +1 -1
- package/dist/buildmyiq/utils/navigation.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/stories/EmptyState.stories.d.ts +10 -0
- package/dist/stories/EmptyState.stories.d.ts.map +1 -0
- package/dist/stories/MetricsCard.stories.d.ts +10 -0
- package/dist/stories/MetricsCard.stories.d.ts.map +1 -0
- package/dist/stories/StatusBadge.stories.d.ts +12 -0
- package/dist/stories/StatusBadge.stories.d.ts.map +1 -0
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +14 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildmyiqAdminRoot.d.ts","sourceRoot":"","sources":["../../src/buildmyiq/BuildmyiqAdminRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BuildmyiqAdminRoot.d.ts","sourceRoot":"","sources":["../../src/buildmyiq/BuildmyiqAdminRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA0BhC,OAAO,KAAK,EACV,kBAAkB,EAQnB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,uBAAwB,SAAQ,kBAAkB;IACjE,0GAA0G;IAC1G,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAsoBD,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAsB1D,CAAC;AAEF,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,CAAC"}
|
|
@@ -9,18 +9,20 @@ import { FilterTabs as p } from "./components/FilterTabs.js";
|
|
|
9
9
|
import { Tabs as m } from "./components/Tabs.js";
|
|
10
10
|
import { Pagination as h } from "./components/Pagination.js";
|
|
11
11
|
import { useBuiArchiveCourse as g, useBuiAssessments as _, useBuiCourses as v, useBuiEnrollments as y, useBuiPublishCourse as b, useBuiSubmissions as x } from "./hooks/useBuildmyiqApi.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
12
|
+
import { BuiPermissionButton as S } from "./components/BuiPermissionButton.js";
|
|
13
|
+
import { useMemo as C, useState as w } from "react";
|
|
14
|
+
import { QueryClient as T, QueryClientProvider as E } from "@tanstack/react-query";
|
|
15
|
+
import { FeatureFlagProvider as D } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
16
|
+
import { PermissionProvider as O } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
17
|
+
import { BookOpen as k, CheckSquare as A, ClipboardCheck as j, GraduationCap as M, Users as N } from "lucide-react";
|
|
18
|
+
import { Fragment as P, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
19
|
+
import { Button as L } from "@burdenoff/fe-libs/ui";
|
|
18
20
|
//#region src/buildmyiq/BuildmyiqAdminRoot.tsx
|
|
19
|
-
var
|
|
21
|
+
var R = new T({ defaultOptions: { queries: {
|
|
20
22
|
staleTime: 30 * 1e3,
|
|
21
23
|
retry: 1,
|
|
22
24
|
refetchOnWindowFocus: !1
|
|
23
|
-
} } }),
|
|
25
|
+
} } }), z = 12, B = [
|
|
24
26
|
{
|
|
25
27
|
value: "ALL",
|
|
26
28
|
label: "All"
|
|
@@ -41,7 +43,7 @@ var I = new w({ defaultOptions: { queries: {
|
|
|
41
43
|
value: "ARCHIVED",
|
|
42
44
|
label: "Archived"
|
|
43
45
|
}
|
|
44
|
-
],
|
|
46
|
+
], V = [
|
|
45
47
|
{
|
|
46
48
|
value: "ALL",
|
|
47
49
|
label: "All"
|
|
@@ -66,7 +68,7 @@ var I = new w({ defaultOptions: { queries: {
|
|
|
66
68
|
value: "EXPIRED",
|
|
67
69
|
label: "Expired"
|
|
68
70
|
}
|
|
69
|
-
],
|
|
71
|
+
], H = [
|
|
70
72
|
{
|
|
71
73
|
value: "ALL",
|
|
72
74
|
label: "All"
|
|
@@ -88,47 +90,55 @@ var I = new w({ defaultOptions: { queries: {
|
|
|
88
90
|
label: "Returned"
|
|
89
91
|
}
|
|
90
92
|
];
|
|
91
|
-
function
|
|
93
|
+
function U({ course: e }) {
|
|
92
94
|
let t = b(), n = g();
|
|
93
|
-
return /* @__PURE__ */
|
|
95
|
+
return /* @__PURE__ */ I("div", {
|
|
94
96
|
className: "flex flex-wrap items-center gap-2",
|
|
95
97
|
children: [
|
|
96
|
-
e.status === "DRAFT" && /* @__PURE__ */
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
e.status === "DRAFT" && /* @__PURE__ */ F(S, {
|
|
99
|
+
resource: "buildmyiq-course",
|
|
100
|
+
action: "update",
|
|
101
|
+
children: /* @__PURE__ */ F(L, {
|
|
102
|
+
variant: "outline",
|
|
103
|
+
size: "sm",
|
|
104
|
+
onClick: () => t.mutate(e.id),
|
|
105
|
+
disabled: t.isPending,
|
|
106
|
+
children: "Publish"
|
|
107
|
+
})
|
|
102
108
|
}),
|
|
103
|
-
e.status !== "ARCHIVED" && /* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
+
e.status !== "ARCHIVED" && /* @__PURE__ */ F(S, {
|
|
110
|
+
resource: "buildmyiq-course",
|
|
111
|
+
action: "delete",
|
|
112
|
+
children: /* @__PURE__ */ F(L, {
|
|
113
|
+
variant: "outline",
|
|
114
|
+
size: "sm",
|
|
115
|
+
onClick: () => n.mutate(e.id),
|
|
116
|
+
disabled: n.isPending,
|
|
117
|
+
children: "Archive"
|
|
118
|
+
})
|
|
109
119
|
}),
|
|
110
|
-
e.status === "ARCHIVED" && /* @__PURE__ */
|
|
120
|
+
e.status === "ARCHIVED" && /* @__PURE__ */ F("span", {
|
|
111
121
|
className: "text-xs text-text-secondary",
|
|
112
122
|
children: "Archived"
|
|
113
123
|
})
|
|
114
124
|
]
|
|
115
125
|
});
|
|
116
126
|
}
|
|
117
|
-
function
|
|
118
|
-
let [e, t] =
|
|
127
|
+
function W() {
|
|
128
|
+
let [e, t] = w("ALL"), [r, o] = w(0), [m, g] = w([]), _ = r > 0 ? m[r - 1] : void 0, { data: y, isLoading: b, error: x, refetch: S } = v({
|
|
119
129
|
status: e === "ALL" ? void 0 : e,
|
|
120
130
|
cursor: _,
|
|
121
|
-
limit:
|
|
122
|
-
}), T =
|
|
131
|
+
limit: z
|
|
132
|
+
}), T = C(() => [
|
|
123
133
|
{
|
|
124
134
|
key: "title",
|
|
125
135
|
header: "Course",
|
|
126
|
-
render: (e) => /* @__PURE__ */
|
|
136
|
+
render: (e) => /* @__PURE__ */ I("div", {
|
|
127
137
|
className: "min-w-0",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ F("p", {
|
|
129
139
|
className: "font-medium text-text-primary truncate",
|
|
130
140
|
children: e.title
|
|
131
|
-
}), /* @__PURE__ */
|
|
141
|
+
}), /* @__PURE__ */ F("p", {
|
|
132
142
|
className: "text-xs text-text-secondary",
|
|
133
143
|
children: e.slug
|
|
134
144
|
})]
|
|
@@ -138,12 +148,12 @@ function H() {
|
|
|
138
148
|
{
|
|
139
149
|
key: "status",
|
|
140
150
|
header: "Status",
|
|
141
|
-
render: (e) => /* @__PURE__ */
|
|
151
|
+
render: (e) => /* @__PURE__ */ F(s, { status: e.status })
|
|
142
152
|
},
|
|
143
153
|
{
|
|
144
154
|
key: "level",
|
|
145
155
|
header: "Level",
|
|
146
|
-
render: (e) => /* @__PURE__ */
|
|
156
|
+
render: (e) => /* @__PURE__ */ F(s, { status: e.level })
|
|
147
157
|
},
|
|
148
158
|
{
|
|
149
159
|
key: "lessons",
|
|
@@ -174,65 +184,65 @@ function H() {
|
|
|
174
184
|
key: "actions",
|
|
175
185
|
header: "Actions",
|
|
176
186
|
align: "right",
|
|
177
|
-
render: (e) => /* @__PURE__ */
|
|
187
|
+
render: (e) => /* @__PURE__ */ F(U, { course: e })
|
|
178
188
|
}
|
|
179
189
|
], []), E = (e) => {
|
|
180
190
|
e > r && y?.pageInfo.cursor ? g((e) => [...e, y.pageInfo.cursor]) : e < r && g((e) => e.slice(0, -1)), o(e);
|
|
181
191
|
};
|
|
182
|
-
if (b) return /* @__PURE__ */
|
|
183
|
-
if (x) return /* @__PURE__ */
|
|
192
|
+
if (b) return /* @__PURE__ */ F(u, { label: "Loading courses…" });
|
|
193
|
+
if (x) return /* @__PURE__ */ F(l, {
|
|
184
194
|
title: "Could not load courses",
|
|
185
195
|
message: x.message,
|
|
186
|
-
onRetry:
|
|
196
|
+
onRetry: S
|
|
187
197
|
});
|
|
188
|
-
let
|
|
189
|
-
return /* @__PURE__ */
|
|
198
|
+
let D = y?.items ?? [];
|
|
199
|
+
return /* @__PURE__ */ I(d, {
|
|
190
200
|
title: "Course catalog",
|
|
191
201
|
description: "Publish, archive and inspect courses.",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ F("div", {
|
|
193
203
|
className: "mb-4",
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
-
options:
|
|
204
|
+
children: /* @__PURE__ */ F(p, {
|
|
205
|
+
options: B,
|
|
196
206
|
value: e,
|
|
197
207
|
onChange: (e) => {
|
|
198
208
|
t(e), o(0), g([]);
|
|
199
209
|
}
|
|
200
210
|
})
|
|
201
|
-
}),
|
|
202
|
-
icon: /* @__PURE__ */
|
|
211
|
+
}), D.length === 0 ? /* @__PURE__ */ F(c, {
|
|
212
|
+
icon: /* @__PURE__ */ F(k, { size: 40 }),
|
|
203
213
|
title: "No courses found",
|
|
204
214
|
description: `There are no ${e === "ALL" ? "" : e.toLowerCase()} courses in this workspace.`
|
|
205
|
-
}) : /* @__PURE__ */ P
|
|
215
|
+
}) : /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(f, {
|
|
206
216
|
columns: T,
|
|
207
|
-
rows:
|
|
217
|
+
rows: D,
|
|
208
218
|
rowKey: (e) => e.id,
|
|
209
219
|
defaultSort: {
|
|
210
220
|
key: "created",
|
|
211
221
|
dir: "desc"
|
|
212
222
|
}
|
|
213
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ F(h, {
|
|
214
224
|
page: r,
|
|
215
|
-
pageSize:
|
|
216
|
-
itemCount:
|
|
225
|
+
pageSize: z,
|
|
226
|
+
itemCount: D.length,
|
|
217
227
|
hasMore: y?.pageInfo.hasMore ?? !1,
|
|
218
228
|
onPageChange: E
|
|
219
229
|
})] })]
|
|
220
230
|
});
|
|
221
231
|
}
|
|
222
|
-
function
|
|
223
|
-
let [e, t] =
|
|
232
|
+
function G() {
|
|
233
|
+
let [e, t] = w(""), { data: n, isLoading: r, error: i } = v({
|
|
224
234
|
status: "PUBLISHED",
|
|
225
235
|
limit: 100
|
|
226
|
-
}), { data: p, isLoading: m, error: h } = _(e || void 0), g =
|
|
236
|
+
}), { data: p, isLoading: m, error: h } = _(e || void 0), g = C(() => [
|
|
227
237
|
{
|
|
228
238
|
key: "title",
|
|
229
239
|
header: "Assessment",
|
|
230
|
-
render: (e) => /* @__PURE__ */
|
|
240
|
+
render: (e) => /* @__PURE__ */ I("div", {
|
|
231
241
|
className: "min-w-0",
|
|
232
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ F("p", {
|
|
233
243
|
className: "font-medium text-text-primary truncate",
|
|
234
244
|
children: e.title
|
|
235
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ F("p", {
|
|
236
246
|
className: "text-xs text-text-secondary",
|
|
237
247
|
children: e.type
|
|
238
248
|
})]
|
|
@@ -242,7 +252,7 @@ function U() {
|
|
|
242
252
|
{
|
|
243
253
|
key: "status",
|
|
244
254
|
header: "Status",
|
|
245
|
-
render: (e) => /* @__PURE__ */
|
|
255
|
+
render: (e) => /* @__PURE__ */ F(s, { status: e.status })
|
|
246
256
|
},
|
|
247
257
|
{
|
|
248
258
|
key: "questions",
|
|
@@ -270,43 +280,43 @@ function U() {
|
|
|
270
280
|
render: (e) => e.timeLimitMin > 0 ? `${e.timeLimitMin} min` : "—"
|
|
271
281
|
}
|
|
272
282
|
], []);
|
|
273
|
-
if (r) return /* @__PURE__ */
|
|
274
|
-
if (i) return /* @__PURE__ */
|
|
283
|
+
if (r) return /* @__PURE__ */ F(u, { label: "Loading courses…" });
|
|
284
|
+
if (i) return /* @__PURE__ */ F(l, {
|
|
275
285
|
title: "Could not load courses",
|
|
276
286
|
message: i.message
|
|
277
287
|
});
|
|
278
288
|
let y = n?.items ?? [];
|
|
279
|
-
return /* @__PURE__ */
|
|
289
|
+
return /* @__PURE__ */ F(d, {
|
|
280
290
|
title: "Assessments",
|
|
281
291
|
description: "Inspect assessments attached to a published course.",
|
|
282
|
-
action: /* @__PURE__ */
|
|
292
|
+
action: /* @__PURE__ */ I("div", {
|
|
283
293
|
className: "min-w-[16rem]",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ F("label", {
|
|
285
295
|
htmlFor: "bui-admin-course-select",
|
|
286
296
|
className: "sr-only",
|
|
287
297
|
children: "Select course"
|
|
288
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ I("select", {
|
|
289
299
|
id: "bui-admin-course-select",
|
|
290
300
|
value: e,
|
|
291
301
|
onChange: (e) => t(e.target.value),
|
|
292
302
|
className: "w-full rounded-lg border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-action-primary-bg",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ F("option", {
|
|
294
304
|
value: "",
|
|
295
305
|
children: "Choose a course…"
|
|
296
|
-
}), y.map((e) => /* @__PURE__ */
|
|
306
|
+
}), y.map((e) => /* @__PURE__ */ F("option", {
|
|
297
307
|
value: e.id,
|
|
298
308
|
children: e.title
|
|
299
309
|
}, e.id))]
|
|
300
310
|
})]
|
|
301
311
|
}),
|
|
302
|
-
children: e ? m ? /* @__PURE__ */
|
|
312
|
+
children: e ? m ? /* @__PURE__ */ F(u, { label: "Loading assessments…" }) : h ? /* @__PURE__ */ F(l, {
|
|
303
313
|
title: "Could not load assessments",
|
|
304
314
|
message: h.message
|
|
305
|
-
}) : p?.length === 0 ? /* @__PURE__ */
|
|
306
|
-
icon: /* @__PURE__ */
|
|
315
|
+
}) : p?.length === 0 ? /* @__PURE__ */ F(c, {
|
|
316
|
+
icon: /* @__PURE__ */ F(j, { size: 40 }),
|
|
307
317
|
title: "No assessments",
|
|
308
318
|
description: "This course has no assessments yet."
|
|
309
|
-
}) : /* @__PURE__ */
|
|
319
|
+
}) : /* @__PURE__ */ F(f, {
|
|
310
320
|
columns: g,
|
|
311
321
|
rows: p ?? [],
|
|
312
322
|
rowKey: (e) => e.id,
|
|
@@ -314,23 +324,23 @@ function U() {
|
|
|
314
324
|
key: "title",
|
|
315
325
|
dir: "asc"
|
|
316
326
|
}
|
|
317
|
-
}) : /* @__PURE__ */
|
|
318
|
-
icon: /* @__PURE__ */
|
|
327
|
+
}) : /* @__PURE__ */ F(c, {
|
|
328
|
+
icon: /* @__PURE__ */ F(j, { size: 40 }),
|
|
319
329
|
title: "Select a course",
|
|
320
330
|
description: "Choose a published course above to view its assessments."
|
|
321
331
|
})
|
|
322
332
|
});
|
|
323
333
|
}
|
|
324
|
-
function
|
|
325
|
-
let [e, t] =
|
|
334
|
+
function K() {
|
|
335
|
+
let [e, t] = w("ALL"), [n, i] = w(0), [a, m] = w([]), g = n > 0 ? a[n - 1] : void 0, { data: _, isLoading: v, error: b, refetch: x } = y({
|
|
326
336
|
status: e === "ALL" ? void 0 : e,
|
|
327
337
|
cursor: g,
|
|
328
|
-
limit:
|
|
329
|
-
}),
|
|
338
|
+
limit: z
|
|
339
|
+
}), S = C(() => [
|
|
330
340
|
{
|
|
331
341
|
key: "learner",
|
|
332
342
|
header: "Learner",
|
|
333
|
-
render: (e) => /* @__PURE__ */
|
|
343
|
+
render: (e) => /* @__PURE__ */ F("span", {
|
|
334
344
|
className: "font-mono text-xs text-text-secondary",
|
|
335
345
|
children: e.learnerId
|
|
336
346
|
})
|
|
@@ -338,7 +348,7 @@ function W() {
|
|
|
338
348
|
{
|
|
339
349
|
key: "course",
|
|
340
350
|
header: "Course ID",
|
|
341
|
-
render: (e) => /* @__PURE__ */
|
|
351
|
+
render: (e) => /* @__PURE__ */ F("span", {
|
|
342
352
|
className: "font-mono text-xs text-text-secondary",
|
|
343
353
|
children: e.courseId
|
|
344
354
|
})
|
|
@@ -346,7 +356,7 @@ function W() {
|
|
|
346
356
|
{
|
|
347
357
|
key: "status",
|
|
348
358
|
header: "Status",
|
|
349
|
-
render: (e) => /* @__PURE__ */
|
|
359
|
+
render: (e) => /* @__PURE__ */ F(s, { status: e.status })
|
|
350
360
|
},
|
|
351
361
|
{
|
|
352
362
|
key: "progress",
|
|
@@ -370,70 +380,70 @@ function W() {
|
|
|
370
380
|
{
|
|
371
381
|
key: "lastActive",
|
|
372
382
|
header: "Last Active",
|
|
373
|
-
render: (e) => e.lastActiveAt ?
|
|
383
|
+
render: (e) => e.lastActiveAt ? q(e.lastActiveAt) : "—",
|
|
374
384
|
sortValue: (e) => e.lastActiveAt ? new Date(e.lastActiveAt).getTime() : 0,
|
|
375
385
|
hideOnMobile: !0
|
|
376
386
|
}
|
|
377
387
|
], []), T = (e) => {
|
|
378
388
|
e > n && _?.pageInfo.cursor ? m((e) => [...e, _.pageInfo.cursor]) : e < n && m((e) => e.slice(0, -1)), i(e);
|
|
379
389
|
};
|
|
380
|
-
if (v) return /* @__PURE__ */
|
|
381
|
-
if (b) return /* @__PURE__ */
|
|
390
|
+
if (v) return /* @__PURE__ */ F(u, { label: "Loading enrollments…" });
|
|
391
|
+
if (b) return /* @__PURE__ */ F(l, {
|
|
382
392
|
title: "Could not load enrollments",
|
|
383
393
|
message: b.message,
|
|
384
394
|
onRetry: x
|
|
385
395
|
});
|
|
386
396
|
let E = _?.items ?? [];
|
|
387
|
-
return /* @__PURE__ */
|
|
397
|
+
return /* @__PURE__ */ I(d, {
|
|
388
398
|
title: "Enrollments",
|
|
389
399
|
description: "Workspace-wide learner enrollment overview.",
|
|
390
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ F("div", {
|
|
391
401
|
className: "mb-4",
|
|
392
|
-
children: /* @__PURE__ */
|
|
393
|
-
options:
|
|
402
|
+
children: /* @__PURE__ */ F(p, {
|
|
403
|
+
options: V,
|
|
394
404
|
value: e,
|
|
395
405
|
onChange: (e) => {
|
|
396
406
|
t(e), i(0), m([]);
|
|
397
407
|
}
|
|
398
408
|
})
|
|
399
|
-
}), E.length === 0 ? /* @__PURE__ */
|
|
400
|
-
icon: /* @__PURE__ */ N
|
|
409
|
+
}), E.length === 0 ? /* @__PURE__ */ F(c, {
|
|
410
|
+
icon: /* @__PURE__ */ F(N, { size: 40 }),
|
|
401
411
|
title: "No enrollments",
|
|
402
412
|
description: `There are no ${e === "ALL" ? "" : e.toLowerCase()} enrollments in this workspace.`
|
|
403
|
-
}) : /* @__PURE__ */ P
|
|
404
|
-
columns:
|
|
413
|
+
}) : /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(f, {
|
|
414
|
+
columns: S,
|
|
405
415
|
rows: E,
|
|
406
416
|
rowKey: (e) => e.id,
|
|
407
417
|
defaultSort: {
|
|
408
418
|
key: "enrolled",
|
|
409
419
|
dir: "desc"
|
|
410
420
|
}
|
|
411
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ F(h, {
|
|
412
422
|
page: n,
|
|
413
|
-
pageSize:
|
|
423
|
+
pageSize: z,
|
|
414
424
|
itemCount: E.length,
|
|
415
425
|
hasMore: _?.pageInfo.hasMore ?? !1,
|
|
416
426
|
onPageChange: T
|
|
417
427
|
})] })]
|
|
418
428
|
});
|
|
419
429
|
}
|
|
420
|
-
function
|
|
430
|
+
function q(e) {
|
|
421
431
|
let t = typeof e == "string" ? new Date(e) : e, n = /* @__PURE__ */ new Date(), r = t.getTime() - n.getTime(), i = r >= 0, a = Math.floor(Math.abs(r) / 1e3), o = Math.floor(a / 60), s = Math.floor(o / 60), c = Math.floor(s / 24), l = (e, t) => {
|
|
422
432
|
let n = `${e} ${t}${e === 1 ? "" : "s"}`;
|
|
423
433
|
return i ? `in ${n}` : `${n} ago`;
|
|
424
434
|
};
|
|
425
435
|
return a < 60 ? i ? "soon" : "just now" : o < 60 ? l(o, "min") : s < 24 ? l(s, "hour") : l(c, "day");
|
|
426
436
|
}
|
|
427
|
-
function
|
|
428
|
-
let [e, t] =
|
|
437
|
+
function J() {
|
|
438
|
+
let [e, t] = w("ALL"), [n, i] = w(0), [m, g] = w([]), _ = n > 0 ? m[n - 1] : void 0, { data: v, isLoading: y, error: b, refetch: S } = x({
|
|
429
439
|
status: e === "ALL" ? void 0 : e,
|
|
430
440
|
cursor: _,
|
|
431
|
-
limit:
|
|
432
|
-
}), T =
|
|
441
|
+
limit: z
|
|
442
|
+
}), T = C(() => [
|
|
433
443
|
{
|
|
434
444
|
key: "learner",
|
|
435
445
|
header: "Learner",
|
|
436
|
-
render: (e) => /* @__PURE__ */
|
|
446
|
+
render: (e) => /* @__PURE__ */ F("span", {
|
|
437
447
|
className: "font-mono text-xs text-text-secondary",
|
|
438
448
|
children: e.learnerId
|
|
439
449
|
})
|
|
@@ -441,7 +451,7 @@ function K() {
|
|
|
441
451
|
{
|
|
442
452
|
key: "assessment",
|
|
443
453
|
header: "Assessment ID",
|
|
444
|
-
render: (e) => /* @__PURE__ */
|
|
454
|
+
render: (e) => /* @__PURE__ */ F("span", {
|
|
445
455
|
className: "font-mono text-xs text-text-secondary",
|
|
446
456
|
children: e.assessmentId
|
|
447
457
|
})
|
|
@@ -455,7 +465,7 @@ function K() {
|
|
|
455
465
|
{
|
|
456
466
|
key: "status",
|
|
457
467
|
header: "Status",
|
|
458
|
-
render: (e) => /* @__PURE__ */
|
|
468
|
+
render: (e) => /* @__PURE__ */ F(s, { status: e.status })
|
|
459
469
|
},
|
|
460
470
|
{
|
|
461
471
|
key: "score",
|
|
@@ -481,7 +491,7 @@ function K() {
|
|
|
481
491
|
key: "actions",
|
|
482
492
|
header: "Review",
|
|
483
493
|
align: "right",
|
|
484
|
-
render: () => /* @__PURE__ */
|
|
494
|
+
render: () => /* @__PURE__ */ F(L, {
|
|
485
495
|
variant: "ghost",
|
|
486
496
|
size: "sm",
|
|
487
497
|
disabled: !0,
|
|
@@ -491,30 +501,30 @@ function K() {
|
|
|
491
501
|
], []), E = (e) => {
|
|
492
502
|
e > n && v?.pageInfo.cursor ? g((e) => [...e, v.pageInfo.cursor]) : e < n && g((e) => e.slice(0, -1)), i(e);
|
|
493
503
|
};
|
|
494
|
-
if (y) return /* @__PURE__ */
|
|
495
|
-
if (b) return /* @__PURE__ */
|
|
504
|
+
if (y) return /* @__PURE__ */ F(u, { label: "Loading submissions…" });
|
|
505
|
+
if (b) return /* @__PURE__ */ F(l, {
|
|
496
506
|
title: "Could not load submissions",
|
|
497
507
|
message: b.message,
|
|
498
|
-
onRetry:
|
|
508
|
+
onRetry: S
|
|
499
509
|
});
|
|
500
510
|
let D = v?.items ?? [];
|
|
501
|
-
return /* @__PURE__ */
|
|
511
|
+
return /* @__PURE__ */ I(d, {
|
|
502
512
|
title: "Submission review",
|
|
503
513
|
description: "Review learner submissions and grading status.",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
514
|
+
children: [/* @__PURE__ */ F("div", {
|
|
505
515
|
className: "mb-4",
|
|
506
|
-
children: /* @__PURE__ */
|
|
507
|
-
options:
|
|
516
|
+
children: /* @__PURE__ */ F(p, {
|
|
517
|
+
options: H,
|
|
508
518
|
value: e,
|
|
509
519
|
onChange: (e) => {
|
|
510
520
|
t(e), i(0), g([]);
|
|
511
521
|
}
|
|
512
522
|
})
|
|
513
|
-
}), D.length === 0 ? /* @__PURE__ */
|
|
514
|
-
icon: /* @__PURE__ */
|
|
523
|
+
}), D.length === 0 ? /* @__PURE__ */ F(c, {
|
|
524
|
+
icon: /* @__PURE__ */ F(A, { size: 40 }),
|
|
515
525
|
title: "No submissions",
|
|
516
526
|
description: `There are no ${e === "ALL" ? "" : e.toLowerCase()} submissions in this workspace.`
|
|
517
|
-
}) : /* @__PURE__ */ P
|
|
527
|
+
}) : /* @__PURE__ */ I(P, { children: [/* @__PURE__ */ F(f, {
|
|
518
528
|
columns: T,
|
|
519
529
|
rows: D,
|
|
520
530
|
rowKey: (e) => e.id,
|
|
@@ -522,76 +532,80 @@ function K() {
|
|
|
522
532
|
key: "submitted",
|
|
523
533
|
dir: "desc"
|
|
524
534
|
}
|
|
525
|
-
}), /* @__PURE__ */
|
|
535
|
+
}), /* @__PURE__ */ F(h, {
|
|
526
536
|
page: n,
|
|
527
|
-
pageSize:
|
|
537
|
+
pageSize: z,
|
|
528
538
|
itemCount: D.length,
|
|
529
539
|
hasMore: v?.pageInfo.hasMore ?? !1,
|
|
530
540
|
onPageChange: E
|
|
531
541
|
})] })]
|
|
532
542
|
});
|
|
533
543
|
}
|
|
534
|
-
function
|
|
535
|
-
let [e, n] =
|
|
544
|
+
function Y() {
|
|
545
|
+
let [e, n] = w("courses"), r = C(() => [
|
|
536
546
|
{
|
|
537
547
|
value: "courses",
|
|
538
548
|
label: "Courses",
|
|
539
|
-
icon: /* @__PURE__ */
|
|
549
|
+
icon: /* @__PURE__ */ F(k, { size: 18 })
|
|
540
550
|
},
|
|
541
551
|
{
|
|
542
552
|
value: "assessments",
|
|
543
553
|
label: "Assessments",
|
|
544
|
-
icon: /* @__PURE__ */
|
|
554
|
+
icon: /* @__PURE__ */ F(j, { size: 18 })
|
|
545
555
|
},
|
|
546
556
|
{
|
|
547
557
|
value: "enrollments",
|
|
548
558
|
label: "Enrollments",
|
|
549
|
-
icon: /* @__PURE__ */ N
|
|
559
|
+
icon: /* @__PURE__ */ F(N, { size: 18 })
|
|
550
560
|
},
|
|
551
561
|
{
|
|
552
562
|
value: "submissions",
|
|
553
563
|
label: "Submissions",
|
|
554
|
-
icon: /* @__PURE__ */
|
|
564
|
+
icon: /* @__PURE__ */ F(A, { size: 18 })
|
|
555
565
|
}
|
|
556
566
|
], []);
|
|
557
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ I(t, {
|
|
558
568
|
title: "BuildMyIQ Admin",
|
|
559
569
|
description: "Course, assessment, enrollment and submission governance.",
|
|
560
|
-
actions: /* @__PURE__ */
|
|
570
|
+
actions: /* @__PURE__ */ I("span", {
|
|
561
571
|
className: "inline-flex items-center gap-2 text-sm text-text-secondary",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ F(M, { size: 18 }), "Workspace-scoped"]
|
|
563
573
|
}),
|
|
564
|
-
children: [/* @__PURE__ */
|
|
574
|
+
children: [/* @__PURE__ */ F(m, {
|
|
565
575
|
items: r,
|
|
566
576
|
value: e,
|
|
567
577
|
onChange: (e) => n(e)
|
|
568
|
-
}), /* @__PURE__ */
|
|
578
|
+
}), /* @__PURE__ */ I("div", {
|
|
569
579
|
className: "mt-6",
|
|
570
580
|
children: [
|
|
571
|
-
e === "courses" && /* @__PURE__ */
|
|
572
|
-
e === "assessments" && /* @__PURE__ */
|
|
573
|
-
e === "enrollments" && /* @__PURE__ */
|
|
574
|
-
e === "submissions" && /* @__PURE__ */
|
|
581
|
+
e === "courses" && /* @__PURE__ */ F(W, {}),
|
|
582
|
+
e === "assessments" && /* @__PURE__ */ F(G, {}),
|
|
583
|
+
e === "enrollments" && /* @__PURE__ */ F(K, {}),
|
|
584
|
+
e === "submissions" && /* @__PURE__ */ F(J, {})
|
|
575
585
|
]
|
|
576
586
|
})]
|
|
577
587
|
});
|
|
578
588
|
}
|
|
579
|
-
var
|
|
589
|
+
var X = (t) => {
|
|
580
590
|
let n = t;
|
|
581
|
-
return /* @__PURE__ */
|
|
582
|
-
client:
|
|
583
|
-
children: /* @__PURE__ */
|
|
591
|
+
return /* @__PURE__ */ F(E, {
|
|
592
|
+
client: R,
|
|
593
|
+
children: /* @__PURE__ */ F(D, {
|
|
584
594
|
workspaceId: t.workspaceId ?? null,
|
|
585
595
|
gateway: "global",
|
|
586
596
|
defaultEnabled: !0,
|
|
587
|
-
children: /* @__PURE__ */
|
|
588
|
-
|
|
589
|
-
|
|
597
|
+
children: /* @__PURE__ */ F(O, {
|
|
598
|
+
scopeId: t.workspaceId ?? null,
|
|
599
|
+
gateway: "workspace",
|
|
600
|
+
children: /* @__PURE__ */ F(e, {
|
|
601
|
+
...n,
|
|
602
|
+
children: /* @__PURE__ */ F(Y, {})
|
|
603
|
+
})
|
|
590
604
|
})
|
|
591
605
|
})
|
|
592
606
|
});
|
|
593
607
|
};
|
|
594
608
|
//#endregion
|
|
595
|
-
export {
|
|
609
|
+
export { X as BuildmyiqAdminRoot };
|
|
596
610
|
|
|
597
611
|
//# sourceMappingURL=BuildmyiqAdminRoot.js.map
|