@burdenoff/microfe-buildmyiq 2026.730.2 → 2026.731.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/buildmyiq/BuildmyiqRoot.d.ts.map +1 -1
  2. package/dist/buildmyiq/BuildmyiqRoot.js +68 -52
  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 +36 -24
  6. package/dist/buildmyiq/BuildmyiqRoutes.js.map +1 -1
  7. package/dist/buildmyiq/hooks/useBuiPermissions.d.ts +1 -1
  8. package/dist/buildmyiq/hooks/useBuiPermissions.d.ts.map +1 -1
  9. package/dist/buildmyiq/hooks/useBuildmyiqApi.d.ts +38 -1
  10. package/dist/buildmyiq/hooks/useBuildmyiqApi.d.ts.map +1 -1
  11. package/dist/buildmyiq/hooks/useBuildmyiqApi.js +131 -86
  12. package/dist/buildmyiq/hooks/useBuildmyiqApi.js.map +1 -1
  13. package/dist/buildmyiq/pages/authoring/AuthoringPage.d.ts.map +1 -1
  14. package/dist/buildmyiq/pages/authoring/AuthoringPage.js +351 -124
  15. package/dist/buildmyiq/pages/authoring/AuthoringPage.js.map +1 -1
  16. package/dist/buildmyiq/pages/copilot/AdminCopilotPage.d.ts +4 -0
  17. package/dist/buildmyiq/pages/copilot/AdminCopilotPage.d.ts.map +1 -0
  18. package/dist/buildmyiq/pages/copilot/AdminCopilotPage.js +164 -0
  19. package/dist/buildmyiq/pages/copilot/AdminCopilotPage.js.map +1 -0
  20. package/dist/buildmyiq/pages/integrations/LtiPlatformsPage.d.ts +4 -0
  21. package/dist/buildmyiq/pages/integrations/LtiPlatformsPage.d.ts.map +1 -0
  22. package/dist/buildmyiq/pages/integrations/LtiPlatformsPage.js +269 -0
  23. package/dist/buildmyiq/pages/integrations/LtiPlatformsPage.js.map +1 -0
  24. package/dist/buildmyiq/pages/submissions/BulkGradingPage.d.ts +4 -0
  25. package/dist/buildmyiq/pages/submissions/BulkGradingPage.d.ts.map +1 -0
  26. package/dist/buildmyiq/pages/submissions/BulkGradingPage.js +229 -0
  27. package/dist/buildmyiq/pages/submissions/BulkGradingPage.js.map +1 -0
  28. package/dist/buildmyiq/pages/submissions/SubmissionsPage.d.ts.map +1 -1
  29. package/dist/buildmyiq/pages/submissions/SubmissionsPage.js +294 -177
  30. package/dist/buildmyiq/pages/submissions/SubmissionsPage.js.map +1 -1
  31. package/dist/buildmyiq/types/index.d.ts +95 -0
  32. package/dist/buildmyiq/types/index.d.ts.map +1 -1
  33. package/dist/buildmyiq/types/index.js.map +1 -1
  34. package/package.json +4 -4
@@ -6,21 +6,21 @@ import { EmptyState as r } from "../../components/EmptyState.js";
6
6
  import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
7
7
  import { FilterTabs as o } from "../../components/FilterTabs.js";
8
8
  import { Pagination as s } from "../../components/Pagination.js";
9
- import { useBuiCourses as c, useBuiCreateCourse as l, useBuiSkills as u } from "../../hooks/useBuildmyiqApi.js";
10
- import { useCursorPager as d } from "../../hooks/useCursorPager.js";
9
+ import { useBuiApplyCourseOutline as c, useBuiCourses as l, useBuiCreateCourse as u, useBuiSkills as d, useBuiSuggestCourseOutline as f } from "../../hooks/useBuildmyiqApi.js";
10
+ import { useCursorPager as p } from "../../hooks/useCursorPager.js";
11
11
  import "../../hooks/index.js";
12
- import { BuiPermissionButton as f } from "../../components/BuiPermissionButton.js";
12
+ import { BuiPermissionButton as m } from "../../components/BuiPermissionButton.js";
13
13
  import "../../components/index.js";
14
- import { CourseCard as p } from "../_shared/CourseCard.js";
14
+ import { CourseCard as h } from "../_shared/CourseCard.js";
15
15
  import "../_shared/index.js";
16
- import { COURSE_LEVELS as m } from "../../types/index.js";
17
- import { Field as h, Modal as g, NO_SKILL as _, SelectField as v, slugify as y } from "./_forms.js";
18
- import { useMemo as b, useState as x } from "react";
19
- import { Plus as S } from "lucide-react";
20
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
21
- import { Button as E, GlassCard as D, Input as O, Switch as k, Textarea as A } from "@burdenoff/fe-libs/ui";
16
+ import { COURSE_LEVELS as g } from "../../types/index.js";
17
+ import { Field as _, Modal as v, NO_SKILL as y, SelectField as b, slugify as x } from "./_forms.js";
18
+ import { useMemo as S, useState as C } from "react";
19
+ import { Plus as w, Sparkles as T, Trash2 as E } from "lucide-react";
20
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
21
+ import { Button as A, GlassCard as j, Input as M, Switch as N, Textarea as P } from "@burdenoff/fe-libs/ui";
22
22
  //#region src/buildmyiq/pages/authoring/AuthoringPage.tsx
23
- var j = [
23
+ var F = [
24
24
  {
25
25
  value: "ALL",
26
26
  label: "All"
@@ -41,32 +41,32 @@ var j = [
41
41
  value: "ARCHIVED",
42
42
  label: "Archived"
43
43
  }
44
- ], M = 24, N = ({ onClose: t, onCreated: r }) => {
45
- let { currentUser: i } = e(), a = u(), o = l(), [s, c] = x(""), [d, f] = x(""), [p, b] = x(!1), [S, D] = x(""), [k, j] = x("BEGINNER"), [M, N] = x("en"), [P, F] = x(""), [I, L] = x(_), [R, z] = x(null), B = a.data ?? [], V = (e) => {
46
- c(e), p || f(y(e));
47
- }, H = s.trim().length > 0 && d.trim().length > 0 && !o.isPending;
48
- return /* @__PURE__ */ w(g, {
44
+ ], I = 24, L = ({ onClose: t, onCreated: r }) => {
45
+ let { currentUser: i } = e(), a = d(), o = u(), [s, c] = C(""), [l, f] = C(""), [p, m] = C(!1), [h, S] = C(""), [w, T] = C("BEGINNER"), [E, j] = C("en"), [N, F] = C(""), [I, L] = C(y), [R, z] = C(null), B = a.data ?? [], V = (e) => {
46
+ c(e), p || f(x(e));
47
+ }, H = s.trim().length > 0 && l.trim().length > 0 && !o.isPending;
48
+ return /* @__PURE__ */ O(v, {
49
49
  open: !0,
50
50
  onClose: t,
51
51
  title: "New course",
52
52
  description: "Create a draft course — you can add modules, lessons and assessments next.",
53
53
  className: "sm:max-w-xl",
54
- footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(E, {
54
+ footer: /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(A, {
55
55
  variant: "ghost",
56
56
  onClick: t,
57
57
  disabled: o.isPending,
58
58
  children: "Cancel"
59
- }), /* @__PURE__ */ w(E, {
59
+ }), /* @__PURE__ */ O(A, {
60
60
  onClick: async () => {
61
61
  if (!H) return;
62
62
  z(null);
63
63
  let e = {
64
64
  title: s.trim(),
65
- slug: d.trim(),
66
- summary: S.trim() || void 0,
67
- level: k,
68
- language: M.trim() || "en",
69
- estimatedHours: P.trim() ? Number(P) : void 0,
65
+ slug: l.trim(),
66
+ summary: h.trim() || void 0,
67
+ level: w,
68
+ language: E.trim() || "en",
69
+ estimatedHours: N.trim() ? Number(N) : void 0,
70
70
  skillId: I === "__none__" ? void 0 : I,
71
71
  instructorId: i?.id
72
72
  };
@@ -79,92 +79,92 @@ var j = [
79
79
  disabled: !H,
80
80
  children: o.isPending ? "Creating…" : "Create course"
81
81
  })] }),
82
- children: /* @__PURE__ */ T("div", {
82
+ children: /* @__PURE__ */ k("div", {
83
83
  className: "grid gap-4",
84
84
  children: [
85
- /* @__PURE__ */ w(h, {
85
+ /* @__PURE__ */ O(_, {
86
86
  label: "Title",
87
87
  htmlFor: "new-course-title",
88
88
  required: !0,
89
- children: /* @__PURE__ */ w(O, {
89
+ children: /* @__PURE__ */ O(M, {
90
90
  id: "new-course-title",
91
91
  value: s,
92
92
  onChange: (e) => V(e.target.value),
93
93
  placeholder: "e.g. Foundations of Data Literacy"
94
94
  })
95
95
  }),
96
- /* @__PURE__ */ w(h, {
96
+ /* @__PURE__ */ O(_, {
97
97
  label: "Slug",
98
98
  htmlFor: "new-course-slug",
99
99
  required: !0,
100
100
  hint: "Used in the course URL. Auto-generated from the title — edit if you like.",
101
- children: /* @__PURE__ */ w(O, {
101
+ children: /* @__PURE__ */ O(M, {
102
102
  id: "new-course-slug",
103
- value: d,
103
+ value: l,
104
104
  onChange: (e) => {
105
- f(e.target.value), b(!0);
105
+ f(e.target.value), m(!0);
106
106
  },
107
107
  placeholder: "foundations-of-data-literacy"
108
108
  })
109
109
  }),
110
- /* @__PURE__ */ w(h, {
110
+ /* @__PURE__ */ O(_, {
111
111
  label: "Summary",
112
112
  htmlFor: "new-course-summary",
113
- children: /* @__PURE__ */ w(A, {
113
+ children: /* @__PURE__ */ O(P, {
114
114
  id: "new-course-summary",
115
115
  rows: 3,
116
- value: S,
117
- onChange: (e) => D(e.target.value),
116
+ value: h,
117
+ onChange: (e) => S(e.target.value),
118
118
  placeholder: "A short description shown on the catalog card."
119
119
  })
120
120
  }),
121
- /* @__PURE__ */ T("div", {
121
+ /* @__PURE__ */ k("div", {
122
122
  className: "grid gap-4 sm:grid-cols-2",
123
123
  children: [
124
- /* @__PURE__ */ w(h, {
124
+ /* @__PURE__ */ O(_, {
125
125
  label: "Level",
126
126
  htmlFor: "new-course-level",
127
- children: /* @__PURE__ */ w(v, {
127
+ children: /* @__PURE__ */ O(b, {
128
128
  id: "new-course-level",
129
- value: k,
130
- onChange: (e) => j(e),
131
- options: m.map((e) => ({
129
+ value: w,
130
+ onChange: (e) => T(e),
131
+ options: g.map((e) => ({
132
132
  value: e,
133
133
  label: n(e)
134
134
  }))
135
135
  })
136
136
  }),
137
- /* @__PURE__ */ w(h, {
137
+ /* @__PURE__ */ O(_, {
138
138
  label: "Language",
139
139
  htmlFor: "new-course-language",
140
- children: /* @__PURE__ */ w(O, {
140
+ children: /* @__PURE__ */ O(M, {
141
141
  id: "new-course-language",
142
- value: M,
143
- onChange: (e) => N(e.target.value),
142
+ value: E,
143
+ onChange: (e) => j(e.target.value),
144
144
  placeholder: "en"
145
145
  })
146
146
  }),
147
- /* @__PURE__ */ w(h, {
147
+ /* @__PURE__ */ O(_, {
148
148
  label: "Estimated hours",
149
149
  htmlFor: "new-course-hours",
150
- children: /* @__PURE__ */ w(O, {
150
+ children: /* @__PURE__ */ O(M, {
151
151
  id: "new-course-hours",
152
152
  type: "number",
153
153
  min: 0,
154
- value: P,
154
+ value: N,
155
155
  onChange: (e) => F(e.target.value),
156
156
  placeholder: "0"
157
157
  })
158
158
  }),
159
- /* @__PURE__ */ w(h, {
159
+ /* @__PURE__ */ O(_, {
160
160
  label: "Skill",
161
161
  htmlFor: "new-course-skill",
162
- children: /* @__PURE__ */ w(v, {
162
+ children: /* @__PURE__ */ O(b, {
163
163
  id: "new-course-skill",
164
164
  value: I,
165
165
  onChange: L,
166
166
  options: [{
167
- value: _,
167
+ value: y,
168
168
  label: a.isLoading ? "Loading…" : "No skill"
169
169
  }, ...B.map((e) => ({
170
170
  value: e.id,
@@ -174,99 +174,326 @@ var j = [
174
174
  })
175
175
  ]
176
176
  }),
177
- R && /* @__PURE__ */ w("p", {
177
+ R && /* @__PURE__ */ O("p", {
178
178
  className: "text-sm text-status-error-text",
179
179
  children: R
180
180
  })
181
181
  ]
182
182
  })
183
183
  });
184
- }, P = () => {
185
- let { currentUser: l, navigateTo: u } = e(), m = l?.id, [h, g] = x("ALL"), [_, v] = x(!1), [y, O] = x(!1), A = d(), P = c({
186
- status: h === "ALL" ? void 0 : h,
187
- cursor: A.cursor,
188
- limit: M
189
- }), F = b(() => P.data?.items ?? [], [P.data]), I = b(() => _ && m ? F.filter((e) => e.instructorId === m) : F, [
190
- F,
184
+ }, R = ({ onClose: e, onCreated: t }) => {
185
+ let n = f(), r = c(), [i, a] = C(""), [o, s] = C(""), [l, u] = C("4"), [d, p] = C(null), [m, h] = C(null), [g, y] = C(null), [b, S] = C(""), [w, N] = C(""), [F, I] = C(null), L = async () => {
186
+ if (!(!i.trim() || n.isPending)) {
187
+ p(null);
188
+ try {
189
+ let e = await n.mutateAsync({
190
+ topic: i.trim(),
191
+ audienceLevel: o.trim() || null,
192
+ moduleCount: l.trim() ? Number(l) : null
193
+ });
194
+ h(e.rationale), y(e.modules), S(i.trim()), N(x(i.trim()));
195
+ } catch (e) {
196
+ p(e instanceof Error ? e.message : "The AI course builder is unavailable right now.");
197
+ }
198
+ }
199
+ }, R = (e) => {
200
+ y((t) => t && t.filter((t, n) => n !== e));
201
+ }, z = (e, t) => {
202
+ y((n) => n && n.map((n, r) => r === e ? {
203
+ ...n,
204
+ lessons: n.lessons.filter((e, n) => n !== t)
205
+ } : n));
206
+ }, B = !!g && g.length > 0 && b.trim().length > 0 && w.trim().length > 0 && !r.isPending;
207
+ return /* @__PURE__ */ O(v, {
208
+ open: !0,
209
+ onClose: e,
210
+ title: "Course builder — suggest with AI",
211
+ description: "Describe a topic and get a draft module/lesson outline to review and edit before it becomes a real course.",
212
+ className: "sm:max-w-2xl",
213
+ footer: g ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(A, {
214
+ variant: "ghost",
215
+ onClick: e,
216
+ disabled: r.isPending,
217
+ children: "Cancel"
218
+ }), /* @__PURE__ */ O(A, {
219
+ onClick: async () => {
220
+ if (!B || !g) return;
221
+ I(null);
222
+ let e = {
223
+ title: b.trim(),
224
+ slug: w.trim(),
225
+ modules: g.map((e) => ({
226
+ title: e.title,
227
+ description: e.description ?? void 0,
228
+ lessons: e.lessons.map((e) => ({
229
+ title: e.title,
230
+ description: e.description ?? void 0
231
+ }))
232
+ }))
233
+ };
234
+ try {
235
+ t(await r.mutateAsync(e));
236
+ } catch (e) {
237
+ I(e instanceof Error ? e.message : "Failed to create the course from this outline.");
238
+ }
239
+ },
240
+ disabled: !B,
241
+ children: r.isPending ? "Creating…" : "Create draft course"
242
+ })] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(A, {
243
+ variant: "ghost",
244
+ onClick: e,
245
+ disabled: n.isPending,
246
+ children: "Cancel"
247
+ }), /* @__PURE__ */ k(A, {
248
+ onClick: L,
249
+ disabled: !i.trim() || n.isPending,
250
+ children: [/* @__PURE__ */ O(T, { className: "mr-1.5 h-4 w-4" }), n.isPending ? "Drafting outline…" : "Generate outline"]
251
+ })] }),
252
+ children: g ? /* @__PURE__ */ k("div", {
253
+ className: "grid gap-4",
254
+ children: [
255
+ m && /* @__PURE__ */ O("p", {
256
+ className: "text-sm text-text-secondary",
257
+ children: m
258
+ }),
259
+ /* @__PURE__ */ k("div", {
260
+ className: "grid gap-4 sm:grid-cols-2",
261
+ children: [/* @__PURE__ */ O(_, {
262
+ label: "Course title",
263
+ htmlFor: "outline-title",
264
+ required: !0,
265
+ children: /* @__PURE__ */ O(M, {
266
+ id: "outline-title",
267
+ value: b,
268
+ onChange: (e) => S(e.target.value)
269
+ })
270
+ }), /* @__PURE__ */ O(_, {
271
+ label: "Slug",
272
+ htmlFor: "outline-slug",
273
+ required: !0,
274
+ children: /* @__PURE__ */ O(M, {
275
+ id: "outline-slug",
276
+ value: w,
277
+ onChange: (e) => N(e.target.value)
278
+ })
279
+ })]
280
+ }),
281
+ /* @__PURE__ */ k("div", {
282
+ className: "flex flex-col gap-3",
283
+ children: [g.map((e, t) => /* @__PURE__ */ k(j, {
284
+ treatment: "plain",
285
+ className: "p-3",
286
+ children: [/* @__PURE__ */ k("div", {
287
+ className: "flex items-start justify-between gap-2",
288
+ children: [/* @__PURE__ */ k("div", {
289
+ className: "min-w-0",
290
+ children: [/* @__PURE__ */ k("p", {
291
+ className: "font-medium text-text-primary",
292
+ children: [
293
+ "Module ",
294
+ t + 1,
295
+ " · ",
296
+ e.title
297
+ ]
298
+ }), e.description && /* @__PURE__ */ O("p", {
299
+ className: "text-xs text-text-secondary",
300
+ children: e.description
301
+ })]
302
+ }), /* @__PURE__ */ O(A, {
303
+ type: "button",
304
+ variant: "ghost",
305
+ size: "sm",
306
+ onClick: () => R(t),
307
+ "aria-label": `Remove module ${e.title}`,
308
+ children: /* @__PURE__ */ O(E, { className: "h-4 w-4" })
309
+ })]
310
+ }), /* @__PURE__ */ O("ul", {
311
+ className: "mt-2 flex flex-col gap-1 pl-3",
312
+ children: e.lessons.map((e, n) => /* @__PURE__ */ k("li", {
313
+ className: "flex items-center justify-between gap-2 text-sm",
314
+ children: [/* @__PURE__ */ k("span", {
315
+ className: "min-w-0 truncate text-text-secondary",
316
+ children: [
317
+ /* @__PURE__ */ k("span", {
318
+ className: "text-text-tertiary",
319
+ children: [
320
+ t + 1,
321
+ ".",
322
+ n + 1
323
+ ]
324
+ }),
325
+ " ",
326
+ e.title
327
+ ]
328
+ }), /* @__PURE__ */ O(A, {
329
+ type: "button",
330
+ variant: "ghost",
331
+ size: "sm",
332
+ onClick: () => z(t, n),
333
+ "aria-label": `Remove lesson ${e.title}`,
334
+ children: /* @__PURE__ */ O(E, { className: "h-3.5 w-3.5" })
335
+ })]
336
+ }, `${e.title}-${n}`))
337
+ })]
338
+ }, `${e.title}-${t}`)), g.length === 0 && /* @__PURE__ */ O("p", {
339
+ className: "text-sm text-text-secondary",
340
+ children: "Every module was removed — go back and generate again, or cancel."
341
+ })]
342
+ }),
343
+ F && /* @__PURE__ */ O("p", {
344
+ className: "text-sm text-status-error-text",
345
+ children: F
346
+ })
347
+ ]
348
+ }) : /* @__PURE__ */ k("div", {
349
+ className: "grid gap-4",
350
+ children: [
351
+ /* @__PURE__ */ O(_, {
352
+ label: "Topic",
353
+ htmlFor: "outline-topic",
354
+ required: !0,
355
+ hint: "What should the course teach?",
356
+ children: /* @__PURE__ */ O(P, {
357
+ id: "outline-topic",
358
+ rows: 2,
359
+ value: i,
360
+ onChange: (e) => a(e.target.value),
361
+ placeholder: "e.g. Introduction to SQL for data analysts"
362
+ })
363
+ }),
364
+ /* @__PURE__ */ k("div", {
365
+ className: "grid gap-4 sm:grid-cols-2",
366
+ children: [/* @__PURE__ */ O(_, {
367
+ label: "Audience level (optional)",
368
+ htmlFor: "outline-audience",
369
+ children: /* @__PURE__ */ O(M, {
370
+ id: "outline-audience",
371
+ value: o,
372
+ onChange: (e) => s(e.target.value),
373
+ placeholder: "e.g. beginners with no prior SQL"
374
+ })
375
+ }), /* @__PURE__ */ O(_, {
376
+ label: "Target module count",
377
+ htmlFor: "outline-modules",
378
+ children: /* @__PURE__ */ O(M, {
379
+ id: "outline-modules",
380
+ type: "number",
381
+ min: 1,
382
+ max: 10,
383
+ value: l,
384
+ onChange: (e) => u(e.target.value)
385
+ })
386
+ })]
387
+ }),
388
+ d && /* @__PURE__ */ O("p", {
389
+ className: "text-sm text-status-error-text",
390
+ children: d
391
+ })
392
+ ]
393
+ })
394
+ });
395
+ }, z = () => {
396
+ let { currentUser: c, navigateTo: u } = e(), d = c?.id, [f, g] = C("ALL"), [_, v] = C(!1), [y, b] = C(!1), [x, E] = C(!1), M = p(), P = l({
397
+ status: f === "ALL" ? void 0 : f,
398
+ cursor: M.cursor,
399
+ limit: I
400
+ }), z = S(() => P.data?.items ?? [], [P.data]), B = S(() => _ && d ? z.filter((e) => e.instructorId === d) : z, [
401
+ z,
191
402
  _,
192
- m
193
- ]), L = (e) => {
194
- g(e), A.reset();
195
- }, R = _ ? "No courses you author yet" : h === "ALL" ? "No courses yet" : `No ${n(h).toLowerCase()} courses`;
196
- return /* @__PURE__ */ T(t, {
403
+ d
404
+ ]), V = (e) => {
405
+ g(e), M.reset();
406
+ }, H = _ ? "No courses you author yet" : f === "ALL" ? "No courses yet" : `No ${n(f).toLowerCase()} courses`;
407
+ return /* @__PURE__ */ k(t, {
197
408
  title: "Authoring",
198
409
  description: "Create, curate and publish your workspace courses.",
199
410
  titleGradient: !0,
200
411
  aurora: !0,
201
- actions: /* @__PURE__ */ w(f, {
412
+ actions: /* @__PURE__ */ O(m, {
202
413
  resource: "buildmyiq-course",
203
414
  action: "create",
204
415
  deniedBehavior: "hide",
205
- children: /* @__PURE__ */ T(E, {
206
- onClick: () => O(!0),
207
- children: [/* @__PURE__ */ w(S, { className: "mr-1.5 h-4 w-4" }), " New course"]
416
+ children: /* @__PURE__ */ k("div", {
417
+ className: "flex gap-2",
418
+ children: [/* @__PURE__ */ k(A, {
419
+ variant: "outline",
420
+ onClick: () => E(!0),
421
+ children: [/* @__PURE__ */ O(T, { className: "mr-1.5 h-4 w-4" }), " Suggest with AI"]
422
+ }), /* @__PURE__ */ k(A, {
423
+ onClick: () => b(!0),
424
+ children: [/* @__PURE__ */ O(w, { className: "mr-1.5 h-4 w-4" }), " New course"]
425
+ })]
208
426
  })
209
427
  }),
210
- children: [/* @__PURE__ */ T("div", {
211
- className: "flex flex-col gap-5",
212
- children: [/* @__PURE__ */ T(D, {
213
- treatment: "plain",
214
- className: "flex flex-col gap-3 p-3 sm:flex-row sm:items-center sm:justify-between",
215
- children: [/* @__PURE__ */ w("div", {
216
- className: "-mx-1 overflow-x-auto px-1",
217
- children: /* @__PURE__ */ w(o, {
218
- options: j,
219
- value: h,
220
- onChange: L,
221
- className: "border-0 bg-transparent p-0"
222
- })
223
- }), /* @__PURE__ */ T("label", {
224
- className: "inline-flex shrink-0 cursor-pointer items-center gap-2 text-sm text-text-secondary",
225
- children: [/* @__PURE__ */ w(k, {
226
- checked: _,
227
- onCheckedChange: v,
228
- disabled: !l?.id
229
- }), "Mine only"]
230
- })]
231
- }), P.isLoading ? /* @__PURE__ */ w(a, { label: "Loading courses…" }) : P.isError ? /* @__PURE__ */ w(i, {
232
- message: "We couldn't load your courses.",
233
- onRetry: () => P.refetch()
234
- }) : /* @__PURE__ */ T(C, { children: [I.length === 0 ? /* @__PURE__ */ w(r, {
235
- illustration: "empty-data",
236
- title: R,
237
- description: _ ? "None of the courses on this page are authored by you — clear \"Mine only\" or page through to find them." : "Create your first course to start building curriculum, assessments and cohorts.",
238
- action: /* @__PURE__ */ w(f, {
239
- resource: "buildmyiq-course",
240
- action: "create",
241
- deniedBehavior: "hide",
242
- children: /* @__PURE__ */ T(E, {
243
- onClick: () => O(!0),
244
- children: [/* @__PURE__ */ w(S, { className: "mr-1.5 h-4 w-4" }), " New course"]
428
+ children: [
429
+ /* @__PURE__ */ k("div", {
430
+ className: "flex flex-col gap-5",
431
+ children: [/* @__PURE__ */ k(j, {
432
+ treatment: "plain",
433
+ className: "flex flex-col gap-3 p-3 sm:flex-row sm:items-center sm:justify-between",
434
+ children: [/* @__PURE__ */ O("div", {
435
+ className: "-mx-1 overflow-x-auto px-1",
436
+ children: /* @__PURE__ */ O(o, {
437
+ options: F,
438
+ value: f,
439
+ onChange: V,
440
+ className: "border-0 bg-transparent p-0"
441
+ })
442
+ }), /* @__PURE__ */ k("label", {
443
+ className: "inline-flex shrink-0 cursor-pointer items-center gap-2 text-sm text-text-secondary",
444
+ children: [/* @__PURE__ */ O(N, {
445
+ checked: _,
446
+ onCheckedChange: v,
447
+ disabled: !c?.id
448
+ }), "Mine only"]
449
+ })]
450
+ }), P.isLoading ? /* @__PURE__ */ O(a, { label: "Loading courses…" }) : P.isError ? /* @__PURE__ */ O(i, {
451
+ message: "We couldn't load your courses.",
452
+ onRetry: () => P.refetch()
453
+ }) : /* @__PURE__ */ k(D, { children: [B.length === 0 ? /* @__PURE__ */ O(r, {
454
+ illustration: "empty-data",
455
+ title: H,
456
+ description: _ ? "None of the courses on this page are authored by you — clear \"Mine only\" or page through to find them." : "Create your first course to start building curriculum, assessments and cohorts.",
457
+ action: /* @__PURE__ */ O(m, {
458
+ resource: "buildmyiq-course",
459
+ action: "create",
460
+ deniedBehavior: "hide",
461
+ children: /* @__PURE__ */ k(A, {
462
+ onClick: () => b(!0),
463
+ children: [/* @__PURE__ */ O(w, { className: "mr-1.5 h-4 w-4" }), " New course"]
464
+ })
245
465
  })
246
- })
247
- }) : /* @__PURE__ */ w("div", {
248
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4",
249
- children: I.map((e) => /* @__PURE__ */ w(p, {
250
- course: e,
251
- showStatus: !0,
252
- onClick: () => u(`authoring/${e.id}`)
253
- }, e.id))
254
- }), /* @__PURE__ */ w(s, {
255
- page: A.page,
256
- pageSize: M,
257
- itemCount: I.length,
258
- hasMore: P.data?.pageInfo.hasMore ?? !1,
259
- onPageChange: (e) => A.onPageChange(e, P.data?.pageInfo.cursor)
260
- })] })]
261
- }), y && /* @__PURE__ */ w(N, {
262
- onClose: () => O(!1),
263
- onCreated: (e) => {
264
- O(!1), u(`authoring/${e.id}`);
265
- }
266
- })]
466
+ }) : /* @__PURE__ */ O("div", {
467
+ className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4",
468
+ children: B.map((e) => /* @__PURE__ */ O(h, {
469
+ course: e,
470
+ showStatus: !0,
471
+ onClick: () => u(`authoring/${e.id}`)
472
+ }, e.id))
473
+ }), /* @__PURE__ */ O(s, {
474
+ page: M.page,
475
+ pageSize: I,
476
+ itemCount: B.length,
477
+ hasMore: P.data?.pageInfo.hasMore ?? !1,
478
+ onPageChange: (e) => M.onPageChange(e, P.data?.pageInfo.cursor)
479
+ })] })]
480
+ }),
481
+ y && /* @__PURE__ */ O(L, {
482
+ onClose: () => b(!1),
483
+ onCreated: (e) => {
484
+ b(!1), u(`authoring/${e.id}`);
485
+ }
486
+ }),
487
+ x && /* @__PURE__ */ O(R, {
488
+ onClose: () => E(!1),
489
+ onCreated: (e) => {
490
+ E(!1), u(`authoring/${e.id}`);
491
+ }
492
+ })
493
+ ]
267
494
  });
268
495
  };
269
496
  //#endregion
270
- export { P as AuthoringPage };
497
+ export { z as AuthoringPage };
271
498
 
272
499
  //# sourceMappingURL=AuthoringPage.js.map