@instructure/platform-modules 0.2.0 → 0.3.0
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/README.md +5 -5
- package/dist/adapters/canvasGraphql/index.d.ts +1 -1
- package/dist/adapters/canvasGraphql/normalize.d.ts +6 -6
- package/dist/adapters/canvasGraphql/queries.d.ts +2 -2
- package/dist/adapters/inMemory.d.ts +4 -4
- package/dist/adapters/limits.d.ts +4 -4
- package/dist/adapters/types.d.ts +6 -6
- package/dist/cache/keys.d.ts +1 -1
- package/dist/components/FilterChips.d.ts +10 -8
- package/dist/components/FilterChips.d.ts.map +1 -1
- package/dist/components/ModuleCard.d.ts +1 -1
- package/dist/components/ModuleItemRow.d.ts +1 -1
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +9 -9
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/labels.d.ts +3 -3
- package/dist/fixtures/generate.d.ts +1 -1
- package/dist/hooks/constants.d.ts +1 -1
- package/dist/hooks/queryOptions.d.ts +1 -1
- package/dist/hooks/useModuleItemQueries.d.ts +1 -1
- package/dist/hooks/useModuleItems.d.ts +1 -1
- package/dist/hooks/useModules.d.ts +1 -1
- package/dist/i18n.d.ts +2 -2
- package/dist/index.js +760 -770
- package/dist/types/domain.d.ts +3 -3
- package/dist/types/enums.d.ts +2 -2
- package/dist/types/navigation.d.ts +1 -1
- package/dist/types/schemas.d.ts +1 -1
- package/locales/en.json +0 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { z as d } from "zod";
|
|
2
|
-
import { gql as
|
|
3
|
-
import { jsx as o, jsxs as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { useInfiniteQuery as
|
|
6
|
-
import
|
|
7
|
-
import { Button as
|
|
8
|
-
import { Flex as
|
|
9
|
-
import { Text as
|
|
10
|
-
import { View as
|
|
11
|
-
import { politeAnnounce as
|
|
12
|
-
import { Alert as
|
|
13
|
-
import { Heading as
|
|
14
|
-
import { IconLockLine as
|
|
15
|
-
import { ProgressBar as
|
|
16
|
-
import { Spinner as
|
|
17
|
-
import { ScreenReaderContent as
|
|
18
|
-
import { Link as
|
|
19
|
-
import { Pill as
|
|
20
|
-
import { Menu as
|
|
21
|
-
import { TextInput as
|
|
22
|
-
const
|
|
2
|
+
import { gql as J } from "graphql-tag";
|
|
3
|
+
import { jsx as o, jsxs as T } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as Oe, useContext as $e, useMemo as v, useCallback as A, useRef as q, useState as V, useEffect as ce, useId as Be, memo as Ge } from "react";
|
|
5
|
+
import { useInfiniteQuery as _e, useQueryClient as je, InfiniteQueryObserver as kt } from "@tanstack/react-query";
|
|
6
|
+
import qt from "p-limit";
|
|
7
|
+
import { Button as Z, IconButton as Rt } from "@instructure/ui-buttons";
|
|
8
|
+
import { Flex as P } from "@instructure/ui-flex";
|
|
9
|
+
import { Text as M } from "@instructure/ui-text";
|
|
10
|
+
import { View as _ } from "@instructure/ui-view";
|
|
11
|
+
import { politeAnnounce as Ye, getLiveRegion as Qe } from "@instructure/platform-instui-bindings";
|
|
12
|
+
import { Alert as We } from "@instructure/ui-alerts";
|
|
13
|
+
import { Heading as He } from "@instructure/ui-heading";
|
|
14
|
+
import { IconLockLine as Ke, IconWarningLine as Ve, IconCheckLine as de, IconClockLine as Ze, IconArrowNestLine as Ft, IconEmptyLine as zt, IconLtiLine as Ut, IconLinkLine as Ot, IconAttachMediaLine as $t, IconDocumentLine as Bt, IconDiscussionLine as Gt, IconQuizLine as jt, IconAssignmentLine as Yt, IconArrowOpenUpLine as Qt, IconArrowOpenDownLine as Xe, IconSearchLine as Wt } from "@instructure/ui-icons";
|
|
15
|
+
import { ProgressBar as Ht } from "@instructure/ui-progress";
|
|
16
|
+
import { Spinner as Je } from "@instructure/ui-spinner";
|
|
17
|
+
import { ScreenReaderContent as Kt } from "@instructure/ui-a11y-content";
|
|
18
|
+
import { Link as Vt } from "@instructure/ui-link";
|
|
19
|
+
import { Pill as Zt } from "@instructure/ui-pill";
|
|
20
|
+
import { Menu as be } from "@instructure/ui-menu";
|
|
21
|
+
import { TextInput as Xt } from "@instructure/ui-text-input";
|
|
22
|
+
const Jt = d.enum([
|
|
23
23
|
"assignment",
|
|
24
24
|
"quiz",
|
|
25
25
|
"discussion",
|
|
@@ -28,7 +28,7 @@ const tn = d.enum([
|
|
|
28
28
|
"external_url",
|
|
29
29
|
"external_tool",
|
|
30
30
|
"sub_header"
|
|
31
|
-
]),
|
|
31
|
+
]), en = d.enum(["not_started", "in_progress", "submitted", "graded", "missing", "locked"]), tn = d.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), nn = d.enum([
|
|
32
32
|
"must_view",
|
|
33
33
|
"must_mark_done",
|
|
34
34
|
"must_contribute",
|
|
@@ -36,77 +36,77 @@ const tn = d.enum([
|
|
|
36
36
|
"min_score",
|
|
37
37
|
"min_percentage",
|
|
38
38
|
"unknown"
|
|
39
|
-
]),
|
|
40
|
-
status:
|
|
39
|
+
]), sn = d.object({
|
|
40
|
+
status: tn,
|
|
41
41
|
requirementsMet: d.number(),
|
|
42
42
|
requirementCount: d.number(),
|
|
43
43
|
percentComplete: d.number().min(0).max(100),
|
|
44
44
|
latestDueAt: d.string().nullish(),
|
|
45
45
|
missingCount: d.number()
|
|
46
|
-
}),
|
|
46
|
+
}), et = d.object({
|
|
47
47
|
itemId: d.string(),
|
|
48
|
-
type:
|
|
48
|
+
type: nn,
|
|
49
49
|
minScore: d.number().nullish(),
|
|
50
50
|
minPercentage: d.number().nullish()
|
|
51
|
-
}),
|
|
51
|
+
}), tt = d.object({
|
|
52
52
|
id: d.string(),
|
|
53
53
|
moduleId: d.string(),
|
|
54
54
|
title: d.string(),
|
|
55
|
-
type:
|
|
55
|
+
type: Jt,
|
|
56
56
|
position: d.number(),
|
|
57
57
|
indent: d.number(),
|
|
58
58
|
published: d.boolean(),
|
|
59
59
|
url: d.string().nullish(),
|
|
60
60
|
newTab: d.boolean().nullish(),
|
|
61
|
-
completionRequirement:
|
|
61
|
+
completionRequirement: et.nullish(),
|
|
62
62
|
dueAt: d.string().nullish(),
|
|
63
|
-
status:
|
|
63
|
+
status: en.optional(),
|
|
64
64
|
pointsPossible: d.number().nullish(),
|
|
65
65
|
extensions: d.record(d.unknown()).optional()
|
|
66
|
-
}),
|
|
66
|
+
}), rn = d.object({
|
|
67
67
|
id: d.string(),
|
|
68
68
|
name: d.string(),
|
|
69
69
|
position: d.number(),
|
|
70
70
|
published: d.boolean(),
|
|
71
71
|
itemCount: d.number(),
|
|
72
|
-
items: d.array(
|
|
72
|
+
items: d.array(tt).optional(),
|
|
73
73
|
unlockAt: d.string().nullish(),
|
|
74
74
|
prerequisiteModuleIds: d.array(d.string()),
|
|
75
75
|
requirementCount: d.number().nullish(),
|
|
76
76
|
requireSequentialProgress: d.boolean(),
|
|
77
|
-
completionRequirements: d.array(
|
|
78
|
-
progress:
|
|
77
|
+
completionRequirements: d.array(et).optional(),
|
|
78
|
+
progress: sn.optional(),
|
|
79
79
|
extensions: d.record(d.unknown()).optional()
|
|
80
|
-
}),
|
|
80
|
+
}), nt = d.object({
|
|
81
81
|
hasNextPage: d.boolean(),
|
|
82
82
|
endCursor: d.string().nullable()
|
|
83
83
|
}).refine((e) => !e.hasNextPage || e.endCursor !== null, {
|
|
84
84
|
message: 'hasNextPage is true but endCursor is null: there is another page and no cursor to ask for it with, which renders a "Load more" that can never load.',
|
|
85
85
|
path: ["endCursor"]
|
|
86
|
-
}),
|
|
87
|
-
modules: d.array(
|
|
88
|
-
pageInfo:
|
|
89
|
-
}),
|
|
90
|
-
items: d.array(
|
|
91
|
-
pageInfo:
|
|
92
|
-
}),
|
|
93
|
-
function
|
|
86
|
+
}), on = d.object({
|
|
87
|
+
modules: d.array(rn),
|
|
88
|
+
pageInfo: nt
|
|
89
|
+
}), ln = d.object({
|
|
90
|
+
items: d.array(tt),
|
|
91
|
+
pageInfo: nt
|
|
92
|
+
}), st = "career.estimatedDurationMinutes";
|
|
93
|
+
function an(e) {
|
|
94
94
|
var n;
|
|
95
|
-
const t = (n = e.extensions) == null ? void 0 : n[
|
|
95
|
+
const t = (n = e.extensions) == null ? void 0 : n[st];
|
|
96
96
|
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
return t == null ? e : { ...e, [
|
|
98
|
+
function rt(e, t) {
|
|
99
|
+
return t == null ? e : { ...e, [st]: t };
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
class
|
|
101
|
+
const Me = 100, Te = 2e3;
|
|
102
|
+
class un extends Error {
|
|
103
103
|
constructor(t, n) {
|
|
104
104
|
super(
|
|
105
105
|
`This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
|
|
106
106
|
), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
const
|
|
109
|
+
const cn = (e) => `offset:${e}`, dn = (e) => {
|
|
110
110
|
if (!e) return 0;
|
|
111
111
|
const t = Number.parseInt(e.replace("offset:", ""), 10);
|
|
112
112
|
return Number.isFinite(t) && t >= 0 ? t : 0;
|
|
@@ -115,16 +115,16 @@ const mn = (e) => `offset:${e}`, gn = (e) => {
|
|
|
115
115
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
116
116
|
};
|
|
117
117
|
function Le(e, t, n) {
|
|
118
|
-
const s =
|
|
118
|
+
const s = dn(t), r = e.slice(s, s + n), i = s + r.length, u = i < e.length;
|
|
119
119
|
return {
|
|
120
120
|
slice: r,
|
|
121
|
-
pageInfo: { hasNextPage: u, endCursor: u ?
|
|
121
|
+
pageInfo: { hasNextPage: u, endCursor: u ? cn(i) : null }
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
function Qo(e, t = {}) {
|
|
125
125
|
const n = (r) => e.itemsByModuleId[r] ?? [], s = (r) => {
|
|
126
126
|
if (r !== e.courseId)
|
|
127
|
-
throw new
|
|
127
|
+
throw new un(e.courseId, r);
|
|
128
128
|
};
|
|
129
129
|
return {
|
|
130
130
|
async listModules({
|
|
@@ -137,10 +137,10 @@ function Qo(e, t = {}) {
|
|
|
137
137
|
}) {
|
|
138
138
|
var f;
|
|
139
139
|
Ce(g), s(r), (f = t.onRequest) == null || f.call(t, "listModules", { operation: "listModules", courseId: r });
|
|
140
|
-
const { slice: l, pageInfo: m } = Le(e.modules, i, u),
|
|
140
|
+
const { slice: l, pageInfo: m } = Le(e.modules, i, u), S = Math.min(c ?? Me, Me);
|
|
141
141
|
return { modules: l.map((h) => {
|
|
142
|
-
const
|
|
143
|
-
return { ...h, itemCount:
|
|
142
|
+
const w = n(h.id), x = a && w.length <= S;
|
|
143
|
+
return { ...h, itemCount: w.length, items: x ? w : void 0 };
|
|
144
144
|
}), pageInfo: m };
|
|
145
145
|
},
|
|
146
146
|
async listModuleItems({
|
|
@@ -157,7 +157,7 @@ function Qo(e, t = {}) {
|
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
}
|
|
160
|
-
class
|
|
160
|
+
class ot extends Error {
|
|
161
161
|
constructor(t, n, s) {
|
|
162
162
|
const r = t === "module" ? "module" : "module item";
|
|
163
163
|
super(
|
|
@@ -165,11 +165,11 @@ class lt extends Error {
|
|
|
165
165
|
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = s;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function it(e, t, n) {
|
|
169
169
|
if (e != null) return e;
|
|
170
|
-
throw new
|
|
170
|
+
throw new ot(t, n, "published");
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function mn(e, t) {
|
|
173
173
|
if (e.onUnsupportedItem) {
|
|
174
174
|
e.onUnsupportedItem(t);
|
|
175
175
|
return;
|
|
@@ -178,7 +178,7 @@ function fn(e, t) {
|
|
|
178
178
|
`[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
|
|
179
179
|
);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const gn = {
|
|
182
182
|
Assignment: "assignment",
|
|
183
183
|
Quiz: "quiz",
|
|
184
184
|
Discussion: "discussion",
|
|
@@ -196,21 +196,21 @@ const hn = {
|
|
|
196
196
|
// for no better reason than not being listed.
|
|
197
197
|
PeerReviewSubAssignment: "assignment"
|
|
198
198
|
};
|
|
199
|
-
function
|
|
199
|
+
function fn(e) {
|
|
200
200
|
const t = e == null ? void 0 : e.__typename;
|
|
201
201
|
if (!t) return null;
|
|
202
|
-
const n =
|
|
202
|
+
const n = gn[t];
|
|
203
203
|
return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
|
|
204
204
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
205
|
+
const hn = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
|
|
206
|
+
function pn(e) {
|
|
207
207
|
if (!e) return null;
|
|
208
|
-
const t =
|
|
208
|
+
const t = hn.exec(e);
|
|
209
209
|
if (!t) return null;
|
|
210
210
|
const [, n, s, r, i, u] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(s ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(i ?? 0) + Number(u ?? 0) / 60;
|
|
211
211
|
return Math.round(a);
|
|
212
212
|
}
|
|
213
|
-
const
|
|
213
|
+
const In = /* @__PURE__ */ new Set([
|
|
214
214
|
"must_view",
|
|
215
215
|
"must_mark_done",
|
|
216
216
|
"must_contribute",
|
|
@@ -218,31 +218,31 @@ const Mn = /* @__PURE__ */ new Set([
|
|
|
218
218
|
"min_score",
|
|
219
219
|
"min_percentage"
|
|
220
220
|
]);
|
|
221
|
-
function
|
|
222
|
-
return
|
|
221
|
+
function bn(e) {
|
|
222
|
+
return In.has(e) ? e : "unknown";
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function Mn(e) {
|
|
225
225
|
return {
|
|
226
226
|
itemId: String(e.id),
|
|
227
|
-
type:
|
|
227
|
+
type: bn(e.type),
|
|
228
228
|
minScore: e.minScore ?? null,
|
|
229
229
|
minPercentage: e.minPercentage ?? null
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function lt(e) {
|
|
233
233
|
return {
|
|
234
234
|
hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
|
|
235
235
|
endCursor: (e == null ? void 0 : e.endCursor) ?? null
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
238
|
+
const Sn = /* @__PURE__ */ new Set(["graded"]), yn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), _n = /* @__PURE__ */ new Set(["graded", "excused"]);
|
|
239
|
+
function at(e) {
|
|
240
240
|
var t;
|
|
241
241
|
for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
|
|
242
242
|
if (n) return n;
|
|
243
243
|
return null;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function ut(e, t) {
|
|
246
246
|
if (!e) return;
|
|
247
247
|
const n = new Map(t.map((r) => [r.itemId, r.type])), s = /* @__PURE__ */ new Set();
|
|
248
248
|
for (const r of e.requirementsMet ?? []) {
|
|
@@ -258,35 +258,35 @@ function dt(e, t) {
|
|
|
258
258
|
requirementsMetItemIds: s
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Tn(e, t, n) {
|
|
262
262
|
if (n.locked) return "locked";
|
|
263
|
-
const s =
|
|
263
|
+
const s = at(e);
|
|
264
264
|
if (s) {
|
|
265
265
|
if (s.missing === !0) return "missing";
|
|
266
|
-
if (
|
|
266
|
+
if (Sn.has(s.state ?? "") || _n.has(s.gradingStatus ?? ""))
|
|
267
267
|
return "graded";
|
|
268
|
-
if (s.submittedAt != null ||
|
|
268
|
+
if (s.submittedAt != null || yn.has(s.state ?? ""))
|
|
269
269
|
return "submitted";
|
|
270
270
|
if ((s.attempt ?? 0) > 0) return "in_progress";
|
|
271
271
|
}
|
|
272
272
|
return n.requirementsMetItemIds.has(t) ? "in_progress" : "not_started";
|
|
273
273
|
}
|
|
274
|
-
const
|
|
275
|
-
function
|
|
274
|
+
const Pn = (e) => e.pointsPossible != null;
|
|
275
|
+
function wn(e, t, n, s) {
|
|
276
276
|
if (e.locked) return "locked";
|
|
277
277
|
if (t > 0 && !e.completed) return "missing";
|
|
278
278
|
if (e.completed) {
|
|
279
|
-
const r = (s ?? []).filter(
|
|
279
|
+
const r = (s ?? []).filter(Pn);
|
|
280
280
|
return r.length > 0 && r.every((u) => u.status === "graded") ? "all_graded" : "all_submitted";
|
|
281
281
|
}
|
|
282
282
|
return e.started || n > 0 ? "in_progress" : "not_started";
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function En(e, t, n, s) {
|
|
285
285
|
var a, c;
|
|
286
286
|
if (!n) return;
|
|
287
287
|
const r = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, r), u = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0;
|
|
288
288
|
return {
|
|
289
|
-
status:
|
|
289
|
+
status: wn(n, u, i, s),
|
|
290
290
|
requirementsMet: i,
|
|
291
291
|
requirementCount: r,
|
|
292
292
|
percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
|
|
@@ -294,12 +294,12 @@ function Cn(e, t, n, s) {
|
|
|
294
294
|
missingCount: u
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function xn(e, t, n, s = {}, r) {
|
|
298
298
|
var c, g, l;
|
|
299
|
-
const i = String(e._id), u =
|
|
299
|
+
const i = String(e._id), u = fn(e.content);
|
|
300
300
|
if (!u)
|
|
301
|
-
return
|
|
302
|
-
const a =
|
|
301
|
+
return mn(s, { id: i, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
|
|
302
|
+
const a = at(e.content);
|
|
303
303
|
return {
|
|
304
304
|
id: i,
|
|
305
305
|
moduleId: t,
|
|
@@ -307,26 +307,26 @@ function Ln(e, t, n, s = {}, r) {
|
|
|
307
307
|
type: u,
|
|
308
308
|
position: e.position ?? 0,
|
|
309
309
|
indent: e.indent ?? 0,
|
|
310
|
-
published:
|
|
310
|
+
published: it(e.published, "moduleItem", i),
|
|
311
311
|
url: e.url ?? null,
|
|
312
312
|
newTab: e.newTab ?? !1,
|
|
313
313
|
completionRequirement: n.get(i) ?? null,
|
|
314
314
|
dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
|
|
315
|
-
status: r ?
|
|
315
|
+
status: r ? Tn(e.content, i, r) : void 0,
|
|
316
316
|
pointsPossible: ((l = e.content) == null ? void 0 : l.pointsPossible) ?? null,
|
|
317
317
|
// Career-only, so it rides in `extensions` rather than widening the shared
|
|
318
318
|
// model. Absent entirely for a Canvas LMS item, which is every item here.
|
|
319
|
-
extensions:
|
|
319
|
+
extensions: rt(
|
|
320
320
|
void 0,
|
|
321
|
-
|
|
321
|
+
pn(e.estimatedDuration)
|
|
322
322
|
)
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function ct(e, t, n, s, r) {
|
|
326
326
|
const i = [];
|
|
327
327
|
for (const u of e ?? []) {
|
|
328
328
|
if (!u) continue;
|
|
329
|
-
const a =
|
|
329
|
+
const a = xn(
|
|
330
330
|
u,
|
|
331
331
|
t,
|
|
332
332
|
n,
|
|
@@ -337,26 +337,26 @@ function mt(e, t, n, s, r) {
|
|
|
337
337
|
}
|
|
338
338
|
return i;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function dt(e) {
|
|
341
341
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
342
342
|
for (const s of e ?? []) {
|
|
343
343
|
if (!s) continue;
|
|
344
|
-
const r =
|
|
344
|
+
const r = Mn(s);
|
|
345
345
|
t.push(r), n.set(r.itemId, r);
|
|
346
346
|
}
|
|
347
347
|
return { list: t, byItemId: n };
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Cn(e, t = {}) {
|
|
350
350
|
var g;
|
|
351
351
|
const n = String(e._id);
|
|
352
352
|
if (e.moduleItemsTotalCount == null)
|
|
353
|
-
throw new
|
|
354
|
-
const { list: s, byItemId: r } =
|
|
353
|
+
throw new ot("module", n, "moduleItemsTotalCount");
|
|
354
|
+
const { list: s, byItemId: r } = dt(e.completionRequirements), i = e.moduleItemsConnection, u = i != null && !((g = i.pageInfo) != null && g.hasNextPage), a = ut(e.progression, s), c = u ? ct(i.nodes, n, r, t, a) : void 0;
|
|
355
355
|
return {
|
|
356
356
|
id: n,
|
|
357
357
|
name: e.name ?? "",
|
|
358
358
|
position: e.position ?? 0,
|
|
359
|
-
published:
|
|
359
|
+
published: it(e.published, "module", n),
|
|
360
360
|
itemCount: e.moduleItemsTotalCount,
|
|
361
361
|
items: c,
|
|
362
362
|
unlockAt: e.unlockAt ?? null,
|
|
@@ -365,24 +365,24 @@ function An(e, t = {}) {
|
|
|
365
365
|
requireSequentialProgress: e.requireSequentialProgress ?? !1,
|
|
366
366
|
completionRequirements: s,
|
|
367
367
|
// Derived after the items so `all_graded` can see them when they are inline.
|
|
368
|
-
progress:
|
|
368
|
+
progress: En(e, s, a, c)
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Ln(e, t = {}) {
|
|
372
372
|
var r;
|
|
373
373
|
const n = (r = e == null ? void 0 : e.legacyNode) == null ? void 0 : r.modulesConnection, s = [];
|
|
374
374
|
for (const i of (n == null ? void 0 : n.nodes) ?? [])
|
|
375
|
-
i && s.push(
|
|
376
|
-
return { modules: s, pageInfo:
|
|
375
|
+
i && s.push(Cn(i, t));
|
|
376
|
+
return { modules: s, pageInfo: lt(n == null ? void 0 : n.pageInfo) };
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } =
|
|
378
|
+
function An(e, t, n = {}) {
|
|
379
|
+
const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: i } = dt(s == null ? void 0 : s.completionRequirements), u = s == null ? void 0 : s.moduleItemsConnection, a = ut(s == null ? void 0 : s.progression, r);
|
|
380
380
|
return {
|
|
381
|
-
items:
|
|
382
|
-
pageInfo:
|
|
381
|
+
items: ct(u == null ? void 0 : u.nodes, t, i, n, a),
|
|
382
|
+
pageInfo: lt(u == null ? void 0 : u.pageInfo)
|
|
383
383
|
};
|
|
384
384
|
}
|
|
385
|
-
const
|
|
385
|
+
const vn = J`
|
|
386
386
|
fragment PlatformModulesSubmissionFields on Submission {
|
|
387
387
|
_id
|
|
388
388
|
state
|
|
@@ -392,7 +392,7 @@ const Dn = ee`
|
|
|
392
392
|
missing
|
|
393
393
|
cachedDueDate
|
|
394
394
|
}
|
|
395
|
-
`,
|
|
395
|
+
`, mt = J`
|
|
396
396
|
fragment PlatformModulesItemFields on ModuleItem {
|
|
397
397
|
_id
|
|
398
398
|
title
|
|
@@ -439,8 +439,8 @@ const Dn = ee`
|
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
${
|
|
443
|
-
`,
|
|
442
|
+
${vn}
|
|
443
|
+
`, gt = J`
|
|
444
444
|
fragment PlatformModulesProgressionFields on ModuleProgression {
|
|
445
445
|
workflowState
|
|
446
446
|
completed
|
|
@@ -453,7 +453,7 @@ const Dn = ee`
|
|
|
453
453
|
minPercentage
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
`,
|
|
456
|
+
`, Nn = J`
|
|
457
457
|
query PlatformModulesGetModules(
|
|
458
458
|
$courseId: ID!
|
|
459
459
|
$first: Int!
|
|
@@ -509,9 +509,9 @@ const Dn = ee`
|
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
${
|
|
513
|
-
${
|
|
514
|
-
`,
|
|
512
|
+
${mt}
|
|
513
|
+
${gt}
|
|
514
|
+
`, Dn = J`
|
|
515
515
|
query PlatformModulesGetModuleItems(
|
|
516
516
|
$moduleId: ID!
|
|
517
517
|
$first: Int!
|
|
@@ -542,25 +542,25 @@ const Dn = ee`
|
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
${
|
|
546
|
-
${
|
|
545
|
+
${mt}
|
|
546
|
+
${gt}
|
|
547
547
|
`;
|
|
548
|
-
function
|
|
548
|
+
function ft() {
|
|
549
549
|
return new DOMException("The operation was aborted.", "AbortError");
|
|
550
550
|
}
|
|
551
|
-
function
|
|
552
|
-
if (e != null && e.aborted) throw
|
|
551
|
+
function ae(e) {
|
|
552
|
+
if (e != null && e.aborted) throw ft();
|
|
553
553
|
}
|
|
554
554
|
function Ae(e, t) {
|
|
555
555
|
return t ? new Promise((n, s) => {
|
|
556
|
-
const r = () => s(
|
|
556
|
+
const r = () => s(ft());
|
|
557
557
|
t.addEventListener("abort", r, { once: !0 }), e.then(n, s).finally(() => t.removeEventListener("abort", r));
|
|
558
558
|
}) : e;
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Wo({
|
|
561
561
|
executeQuery: e,
|
|
562
|
-
inlineItemLimit: t =
|
|
563
|
-
nodeBudget: n =
|
|
562
|
+
inlineItemLimit: t = Me,
|
|
563
|
+
nodeBudget: n = Te,
|
|
564
564
|
onUnsupportedItem: s,
|
|
565
565
|
studentId: r,
|
|
566
566
|
validate: i = !0
|
|
@@ -575,27 +575,27 @@ function Ho({
|
|
|
575
575
|
cursor: g,
|
|
576
576
|
pageSize: l,
|
|
577
577
|
includeItems: m,
|
|
578
|
-
inlineItemsFirst:
|
|
578
|
+
inlineItemsFirst: S,
|
|
579
579
|
inlineFirst: p,
|
|
580
580
|
signal: f
|
|
581
581
|
}) {
|
|
582
|
-
|
|
583
|
-
const h = m ? Math.min(p ?? l, l) : l,
|
|
584
|
-
e(
|
|
582
|
+
ae(f);
|
|
583
|
+
const h = m ? Math.min(p ?? l, l) : l, w = Math.min(S ?? t, t), x = Math.max(1, Math.min(w, Math.floor(n / h))), L = await Ae(
|
|
584
|
+
e(Nn, {
|
|
585
585
|
courseId: c,
|
|
586
586
|
first: h,
|
|
587
587
|
// Pass through what the caller was given; never derive an offset.
|
|
588
588
|
after: g ?? null,
|
|
589
589
|
includeItems: m,
|
|
590
|
-
itemsFirst:
|
|
590
|
+
itemsFirst: x,
|
|
591
591
|
includeSubmissions: a,
|
|
592
592
|
studentId: r ?? null
|
|
593
593
|
}),
|
|
594
594
|
f
|
|
595
595
|
);
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
return i ?
|
|
596
|
+
ae(f);
|
|
597
|
+
const C = Ln(L, u);
|
|
598
|
+
return i ? on.parse(C) : C;
|
|
599
599
|
},
|
|
600
600
|
async listModuleItems({
|
|
601
601
|
moduleId: c,
|
|
@@ -603,9 +603,9 @@ function Ho({
|
|
|
603
603
|
pageSize: l,
|
|
604
604
|
signal: m
|
|
605
605
|
}) {
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
e(
|
|
606
|
+
ae(m);
|
|
607
|
+
const S = await Ae(
|
|
608
|
+
e(Dn, {
|
|
609
609
|
moduleId: c,
|
|
610
610
|
first: l,
|
|
611
611
|
after: g ?? null,
|
|
@@ -614,13 +614,13 @@ function Ho({
|
|
|
614
614
|
}),
|
|
615
615
|
m
|
|
616
616
|
);
|
|
617
|
-
|
|
618
|
-
const p =
|
|
619
|
-
return i ?
|
|
617
|
+
ae(m);
|
|
618
|
+
const p = An(S, c, u);
|
|
619
|
+
return i ? ln.parse(p) : p;
|
|
620
620
|
}
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
|
-
const
|
|
623
|
+
const fe = {
|
|
624
624
|
formatters: {},
|
|
625
625
|
itemTypes: {},
|
|
626
626
|
itemStatuses: {},
|
|
@@ -630,32 +630,32 @@ const he = {
|
|
|
630
630
|
itemActions: {},
|
|
631
631
|
navigation: {}
|
|
632
632
|
};
|
|
633
|
-
Object.freeze(
|
|
634
|
-
for (const e of Object.values(
|
|
633
|
+
Object.freeze(fe);
|
|
634
|
+
for (const e of Object.values(fe))
|
|
635
635
|
Object.freeze(e);
|
|
636
|
-
const
|
|
637
|
-
function
|
|
638
|
-
return /* @__PURE__ */ o(
|
|
636
|
+
const ht = Oe(null);
|
|
637
|
+
function Ho({ value: e, children: t }) {
|
|
638
|
+
return /* @__PURE__ */ o(ht.Provider, { value: e, children: t });
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
640
|
+
function Ko() {
|
|
641
|
+
return $e(ht) ?? fe;
|
|
642
642
|
}
|
|
643
|
-
const
|
|
644
|
-
function
|
|
643
|
+
const Se = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
644
|
+
function me(e, t) {
|
|
645
645
|
const n = Object.entries(t ?? {}).filter(([, s]) => s !== void 0);
|
|
646
646
|
return { ...e, ...Object.fromEntries(n) };
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function O(e, t = {}) {
|
|
649
649
|
const n = Object.keys(e).map((r) => [
|
|
650
650
|
r,
|
|
651
|
-
|
|
652
|
-
]), s = Object.keys(t).filter((r) => !
|
|
651
|
+
me(e[r], Se(t, r) ? t[r] : void 0)
|
|
652
|
+
]), s = Object.keys(t).filter((r) => !Se(e, r)).sort().map((r) => [r, me({}, t[r])]);
|
|
653
653
|
return Object.fromEntries([...n, ...s]);
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function Vo(e) {
|
|
656
656
|
return Object.keys(e).filter((t) => !e[t].hidden).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
|
|
657
657
|
}
|
|
658
|
-
const
|
|
658
|
+
const kn = d.object({
|
|
659
659
|
/** Resolved through `t` at render. */
|
|
660
660
|
label: d.string(),
|
|
661
661
|
/** Sort position, ascending. The base spaces its values (10, 20, 30…) so a host can insert between two built-ins. */
|
|
@@ -663,56 +663,56 @@ const Rn = d.object({
|
|
|
663
663
|
/** How a host removes an entry. Stays in the resolved registry; `visibleEntries` filters it at read time. */
|
|
664
664
|
hidden: d.boolean().optional()
|
|
665
665
|
});
|
|
666
|
-
function
|
|
666
|
+
function qn(e) {
|
|
667
667
|
return d.record(d.string(), e);
|
|
668
668
|
}
|
|
669
|
-
const
|
|
669
|
+
const $ = qn(kn.strict()), Rn = d.object({
|
|
670
670
|
formatters: d.object({}).strict(),
|
|
671
|
-
itemTypes:
|
|
672
|
-
itemStatuses:
|
|
673
|
-
itemMeta:
|
|
674
|
-
filters:
|
|
675
|
-
moduleActions:
|
|
676
|
-
itemActions:
|
|
671
|
+
itemTypes: $,
|
|
672
|
+
itemStatuses: $,
|
|
673
|
+
itemMeta: $,
|
|
674
|
+
filters: $,
|
|
675
|
+
moduleActions: $,
|
|
676
|
+
itemActions: $,
|
|
677
677
|
navigation: d.object({}).strict()
|
|
678
678
|
});
|
|
679
|
-
function
|
|
680
|
-
const n = Object.keys(t).filter((r) => !
|
|
679
|
+
function Fn(e, t = {}) {
|
|
680
|
+
const n = Object.keys(t).filter((r) => !Se(e, r));
|
|
681
681
|
if (n.length > 0)
|
|
682
682
|
throw new Error(
|
|
683
683
|
`Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
|
|
684
684
|
);
|
|
685
685
|
const s = {
|
|
686
|
-
formatters:
|
|
687
|
-
itemTypes:
|
|
688
|
-
itemStatuses:
|
|
689
|
-
itemMeta:
|
|
690
|
-
filters:
|
|
691
|
-
moduleActions:
|
|
692
|
-
itemActions:
|
|
693
|
-
navigation:
|
|
686
|
+
formatters: me(e.formatters, t.formatters),
|
|
687
|
+
itemTypes: O(e.itemTypes, t.itemTypes),
|
|
688
|
+
itemStatuses: O(e.itemStatuses, t.itemStatuses),
|
|
689
|
+
itemMeta: O(e.itemMeta, t.itemMeta),
|
|
690
|
+
filters: O(e.filters, t.filters),
|
|
691
|
+
moduleActions: O(e.moduleActions, t.moduleActions),
|
|
692
|
+
itemActions: O(e.itemActions, t.itemActions),
|
|
693
|
+
navigation: me(e.navigation, t.navigation)
|
|
694
694
|
};
|
|
695
|
-
return
|
|
695
|
+
return Rn.parse(s), s;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
697
|
+
function Zo(e = {}) {
|
|
698
|
+
return Fn(fe, e);
|
|
699
699
|
}
|
|
700
|
-
const Pe = 100,
|
|
701
|
-
all:
|
|
702
|
-
course: (e) => [...
|
|
703
|
-
list: (e, t = {}) => [...
|
|
704
|
-
items: (e, t, n = {}) => [...
|
|
700
|
+
const Pe = 100, pt = 100, It = 100, zn = 4, he = 5 * 60 * 1e3, bt = 20, ge = { hasNextPage: !1, endCursor: null }, B = ["platform-modules"], ee = {
|
|
701
|
+
all: B,
|
|
702
|
+
course: (e) => [...B, e],
|
|
703
|
+
list: (e, t = {}) => [...B, e, "list", t],
|
|
704
|
+
items: (e, t, n = {}) => [...B, e, "module", t, "items", n]
|
|
705
705
|
};
|
|
706
|
-
function
|
|
707
|
-
return [...
|
|
706
|
+
function Un(e) {
|
|
707
|
+
return [...B, e, "list"];
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return [...
|
|
709
|
+
function Mt(e, t) {
|
|
710
|
+
return [...B, e, "module", t, "items"];
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function St(e) {
|
|
713
713
|
return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function yt(e) {
|
|
716
716
|
const {
|
|
717
717
|
courseId: t,
|
|
718
718
|
adapter: n,
|
|
@@ -728,7 +728,7 @@ function Tt(e) {
|
|
|
728
728
|
// `inlineItemsFirst` is deliberately NOT in the key. It is derived from the
|
|
729
729
|
// probe of this very list, so it cannot vary for a fixed (view, pageSize,
|
|
730
730
|
// includeItems) — including it would only add a segment that never differs.
|
|
731
|
-
queryKey:
|
|
731
|
+
queryKey: ee.list(t, { view: a, pageSize: s, includeItems: r }),
|
|
732
732
|
initialPageParam: null,
|
|
733
733
|
queryFn: ({ pageParam: l, signal: m }) => n.listModules({
|
|
734
734
|
courseId: t,
|
|
@@ -739,18 +739,18 @@ function Tt(e) {
|
|
|
739
739
|
inlineFirst: u,
|
|
740
740
|
signal: m
|
|
741
741
|
}),
|
|
742
|
-
getNextPageParam:
|
|
742
|
+
getNextPageParam: St,
|
|
743
743
|
enabled: g,
|
|
744
744
|
staleTime: c,
|
|
745
745
|
// A refetch of an infinite query re-walks every page it has loaded. Doing
|
|
746
|
-
// that because someone alt-tabbed is the Canvas
|
|
746
|
+
// that because someone alt-tabbed is the Canvas behavior we are replacing.
|
|
747
747
|
refetchOnWindowFocus: !1
|
|
748
748
|
};
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function _t(e) {
|
|
751
751
|
const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: i, staleTime: u, enabled: a, limit: c } = e;
|
|
752
752
|
return {
|
|
753
|
-
queryKey:
|
|
753
|
+
queryKey: ee.items(t, n, { view: i, pageSize: r }),
|
|
754
754
|
initialPageParam: null,
|
|
755
755
|
queryFn: ({ pageParam: g, signal: l }) => {
|
|
756
756
|
const m = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: g, pageSize: r, signal: l });
|
|
@@ -760,14 +760,14 @@ function wt(e) {
|
|
|
760
760
|
return m();
|
|
761
761
|
}) : m();
|
|
762
762
|
},
|
|
763
|
-
getNextPageParam:
|
|
763
|
+
getNextPageParam: St,
|
|
764
764
|
enabled: a,
|
|
765
765
|
staleTime: u,
|
|
766
766
|
refetchOnWindowFocus: !1
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
var
|
|
769
|
+
function On(e) {
|
|
770
|
+
var w;
|
|
771
771
|
const {
|
|
772
772
|
courseId: t,
|
|
773
773
|
adapter: n,
|
|
@@ -776,10 +776,10 @@ function Bn(e) {
|
|
|
776
776
|
inlineItemsFirst: i,
|
|
777
777
|
inlineFirst: u,
|
|
778
778
|
view: a,
|
|
779
|
-
staleTime: c =
|
|
779
|
+
staleTime: c = he,
|
|
780
780
|
enabled: g = !0
|
|
781
|
-
} = e, l =
|
|
782
|
-
|
|
781
|
+
} = e, l = _e(
|
|
782
|
+
yt({
|
|
783
783
|
courseId: t,
|
|
784
784
|
adapter: n,
|
|
785
785
|
pageSize: s,
|
|
@@ -790,11 +790,11 @@ function Bn(e) {
|
|
|
790
790
|
staleTime: c,
|
|
791
791
|
enabled: g
|
|
792
792
|
})
|
|
793
|
-
), m = (
|
|
793
|
+
), m = (w = l.data) == null ? void 0 : w.pages, S = v(() => (m ?? []).flatMap((x) => x.modules), [m]), p = m && m.length > 0 ? m[m.length - 1].pageInfo : ge, f = l.fetchNextPage, h = A(() => {
|
|
794
794
|
f();
|
|
795
795
|
}, [f]);
|
|
796
796
|
return {
|
|
797
|
-
modules:
|
|
797
|
+
modules: S,
|
|
798
798
|
pageInfo: p,
|
|
799
799
|
hasNextPage: p.hasNextPage,
|
|
800
800
|
fetchNextPage: h,
|
|
@@ -804,19 +804,19 @@ function Bn(e) {
|
|
|
804
804
|
error: l.error
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function Xo(e) {
|
|
808
808
|
var h;
|
|
809
809
|
const {
|
|
810
810
|
courseId: t,
|
|
811
811
|
moduleId: n,
|
|
812
812
|
adapter: s,
|
|
813
|
-
pageSize: r =
|
|
813
|
+
pageSize: r = pt,
|
|
814
814
|
view: i,
|
|
815
815
|
enabled: u = !0,
|
|
816
|
-
staleTime: a =
|
|
816
|
+
staleTime: a = he,
|
|
817
817
|
limit: c
|
|
818
|
-
} = e, g =
|
|
819
|
-
|
|
818
|
+
} = e, g = _e(
|
|
819
|
+
_t({
|
|
820
820
|
courseId: t,
|
|
821
821
|
moduleId: n,
|
|
822
822
|
adapter: s,
|
|
@@ -826,20 +826,20 @@ function Jo(e) {
|
|
|
826
826
|
enabled: u,
|
|
827
827
|
limit: c
|
|
828
828
|
})
|
|
829
|
-
), l = (h = g.data) == null ? void 0 : h.pages, m =
|
|
829
|
+
), l = (h = g.data) == null ? void 0 : h.pages, m = v(() => (l ?? []).flatMap((w) => w.items), [l]), S = l && l.length > 0 ? l[l.length - 1].pageInfo : ge, p = g.fetchNextPage, f = A(() => {
|
|
830
830
|
p();
|
|
831
831
|
}, [p]);
|
|
832
832
|
return {
|
|
833
833
|
items: m,
|
|
834
|
-
pageInfo:
|
|
835
|
-
hasNextPage:
|
|
834
|
+
pageInfo: S,
|
|
835
|
+
hasNextPage: S.hasNextPage,
|
|
836
836
|
fetchNextPage: f,
|
|
837
837
|
isLoading: g.isLoading,
|
|
838
838
|
isFetchingNextPage: g.isFetchingNextPage,
|
|
839
839
|
error: g.error
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function $n(e, t, n = Te) {
|
|
843
843
|
if (e.pageInfo.hasNextPage) return "onDemand";
|
|
844
844
|
let s = 0, r = 0;
|
|
845
845
|
for (const i of e.modules) {
|
|
@@ -848,19 +848,19 @@ function Gn(e, t, n = we) {
|
|
|
848
848
|
}
|
|
849
849
|
return s > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
var
|
|
851
|
+
function Bn(e) {
|
|
852
|
+
var S;
|
|
853
853
|
const {
|
|
854
854
|
courseId: t,
|
|
855
855
|
adapter: n,
|
|
856
856
|
mode: s = "auto",
|
|
857
|
-
inlineThreshold: r =
|
|
858
|
-
nodeBudget: i = n.inlineNodeBudget ??
|
|
857
|
+
inlineThreshold: r = It,
|
|
858
|
+
nodeBudget: i = n.inlineNodeBudget ?? Te,
|
|
859
859
|
pageSize: u = Pe,
|
|
860
860
|
view: a,
|
|
861
|
-
staleTime: c =
|
|
862
|
-
} = e, g = s === "auto", l =
|
|
863
|
-
|
|
861
|
+
staleTime: c = he
|
|
862
|
+
} = e, g = s === "auto", l = _e(
|
|
863
|
+
yt({
|
|
864
864
|
courseId: t,
|
|
865
865
|
adapter: n,
|
|
866
866
|
pageSize: u,
|
|
@@ -886,87 +886,87 @@ function jn(e) {
|
|
|
886
886
|
error: l.error,
|
|
887
887
|
inlineShape: null
|
|
888
888
|
};
|
|
889
|
-
const m = (
|
|
889
|
+
const m = (S = l.data) == null ? void 0 : S.pages[0];
|
|
890
890
|
return m ? {
|
|
891
|
-
resolvedMode:
|
|
891
|
+
resolvedMode: $n(m, r, i),
|
|
892
892
|
isResolving: !1,
|
|
893
893
|
probed: !0,
|
|
894
894
|
error: null,
|
|
895
|
-
inlineShape:
|
|
895
|
+
inlineShape: Gn(m)
|
|
896
896
|
} : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Gn(e) {
|
|
899
899
|
let t = 1;
|
|
900
900
|
for (const n of e.modules)
|
|
901
901
|
n.itemCount > t && (t = n.itemCount);
|
|
902
902
|
return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
|
|
903
903
|
}
|
|
904
|
-
const ve = "\0",
|
|
905
|
-
function
|
|
906
|
-
const s =
|
|
907
|
-
|
|
904
|
+
const ve = "\0", jn = /* @__PURE__ */ new Map();
|
|
905
|
+
function Yn(e, t, n = bt) {
|
|
906
|
+
const s = je(), r = q(/* @__PURE__ */ new Map()), [i, u] = V(jn), a = e.join(ve), c = v(() => a === "" ? [] : a.split(ve), [a]);
|
|
907
|
+
ce(() => {
|
|
908
908
|
const l = r.current, m = () => {
|
|
909
909
|
u((f) => {
|
|
910
910
|
const h = /* @__PURE__ */ new Map();
|
|
911
|
-
let
|
|
912
|
-
for (const [
|
|
913
|
-
const
|
|
914
|
-
h.set(
|
|
911
|
+
let w = f.size !== l.size;
|
|
912
|
+
for (const [x, L] of l) {
|
|
913
|
+
const C = L.getCurrentResult();
|
|
914
|
+
h.set(x, C), !w && f.get(x) !== C && (w = !0);
|
|
915
915
|
}
|
|
916
|
-
return
|
|
916
|
+
return w ? h : f;
|
|
917
917
|
});
|
|
918
|
-
},
|
|
918
|
+
}, S = new Set(c);
|
|
919
919
|
for (const f of c) {
|
|
920
920
|
if (l.has(f)) continue;
|
|
921
|
-
const h = new
|
|
921
|
+
const h = new kt(
|
|
922
922
|
s,
|
|
923
923
|
t(f, !0)
|
|
924
924
|
);
|
|
925
925
|
l.set(f, h), h.subscribe(m);
|
|
926
926
|
}
|
|
927
927
|
for (const [f, h] of l)
|
|
928
|
-
h.setOptions(t(f,
|
|
928
|
+
h.setOptions(t(f, S.has(f)));
|
|
929
929
|
for (const f of c) {
|
|
930
930
|
const h = l.get(f);
|
|
931
931
|
h && (l.delete(f), l.set(f, h));
|
|
932
932
|
}
|
|
933
|
-
let p = l.size -
|
|
933
|
+
let p = l.size - S.size;
|
|
934
934
|
if (p > n)
|
|
935
935
|
for (const [f, h] of l) {
|
|
936
936
|
if (p <= n) break;
|
|
937
|
-
|
|
937
|
+
S.has(f) || (h.destroy(), l.delete(f), p -= 1);
|
|
938
938
|
}
|
|
939
939
|
m();
|
|
940
|
-
}, [s, t, c, n]),
|
|
940
|
+
}, [s, t, c, n]), ce(() => {
|
|
941
941
|
const l = r.current;
|
|
942
942
|
return () => {
|
|
943
943
|
for (const m of l.values()) m.destroy();
|
|
944
944
|
l.clear();
|
|
945
945
|
};
|
|
946
946
|
}, []);
|
|
947
|
-
const g =
|
|
947
|
+
const g = A((l) => {
|
|
948
948
|
var m;
|
|
949
949
|
(m = r.current.get(l)) == null || m.fetchNextPage();
|
|
950
950
|
}, []);
|
|
951
951
|
return { results: i, fetchNextPage: g };
|
|
952
952
|
}
|
|
953
|
-
const
|
|
953
|
+
const Qn = [], Wn = () => {
|
|
954
954
|
};
|
|
955
|
-
function
|
|
956
|
-
var
|
|
955
|
+
function Jo(e) {
|
|
956
|
+
var z, ie;
|
|
957
957
|
const {
|
|
958
958
|
courseId: t,
|
|
959
959
|
adapter: n,
|
|
960
960
|
view: s,
|
|
961
961
|
itemsMode: r = "auto",
|
|
962
|
-
inlineThreshold: i =
|
|
962
|
+
inlineThreshold: i = It,
|
|
963
963
|
pageSize: u = Pe,
|
|
964
|
-
itemPageSize: a =
|
|
965
|
-
itemConcurrency: c =
|
|
966
|
-
retainCollapsedLimit: g =
|
|
967
|
-
staleTime: l =
|
|
964
|
+
itemPageSize: a = pt,
|
|
965
|
+
itemConcurrency: c = zn,
|
|
966
|
+
retainCollapsedLimit: g = bt,
|
|
967
|
+
staleTime: l = he,
|
|
968
968
|
initialExpandedModuleIds: m
|
|
969
|
-
} = e,
|
|
969
|
+
} = e, S = je(), p = Bn({
|
|
970
970
|
courseId: t,
|
|
971
971
|
adapter: n,
|
|
972
972
|
mode: r,
|
|
@@ -974,7 +974,7 @@ function ei(e) {
|
|
|
974
974
|
pageSize: u,
|
|
975
975
|
view: s,
|
|
976
976
|
staleTime: l
|
|
977
|
-
}), f = p.resolvedMode, h =
|
|
977
|
+
}), f = p.resolvedMode, h = On({
|
|
978
978
|
courseId: t,
|
|
979
979
|
adapter: n,
|
|
980
980
|
pageSize: u,
|
|
@@ -984,90 +984,90 @@ function ei(e) {
|
|
|
984
984
|
// Measured by the probe, not assumed. Canvas charges GraphQL complexity on
|
|
985
985
|
// the requested shape, so asking for the ceiling rejects the query outright
|
|
986
986
|
// even on a tiny course. @see UseItemsModeResult.inlineShape
|
|
987
|
-
inlineItemsFirst: (
|
|
987
|
+
inlineItemsFirst: (z = p.inlineShape) == null ? void 0 : z.maxItemCount,
|
|
988
988
|
// Both axes, not just one: the budget is charged on the product, so asking
|
|
989
989
|
// for 100 modules when page 1 held 6 is what forces `inlineItemsFirst` down.
|
|
990
|
-
inlineFirst: (
|
|
990
|
+
inlineFirst: (ie = p.inlineShape) == null ? void 0 : ie.moduleCount,
|
|
991
991
|
enabled: f !== null
|
|
992
|
-
}), [
|
|
992
|
+
}), [w, x] = V(
|
|
993
993
|
() => m ?? []
|
|
994
|
-
),
|
|
995
|
-
const
|
|
996
|
-
for (const
|
|
997
|
-
return
|
|
998
|
-
}, [h.modules]),
|
|
999
|
-
() =>
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
994
|
+
), L = v(() => {
|
|
995
|
+
const y = /* @__PURE__ */ new Map();
|
|
996
|
+
for (const b of h.modules) y.set(b.id, b);
|
|
997
|
+
return y;
|
|
998
|
+
}, [h.modules]), C = v(
|
|
999
|
+
() => w.filter((y) => {
|
|
1000
|
+
const b = L.get(y);
|
|
1001
|
+
return b !== void 0 && b.items === void 0;
|
|
1002
1002
|
}),
|
|
1003
|
-
[
|
|
1004
|
-
),
|
|
1005
|
-
(
|
|
1003
|
+
[w, L]
|
|
1004
|
+
), ne = v(() => new Set(C), [C]), se = v(() => qt(c), [c]), E = A(
|
|
1005
|
+
(y, b) => _t({
|
|
1006
1006
|
courseId: t,
|
|
1007
|
-
moduleId:
|
|
1007
|
+
moduleId: y,
|
|
1008
1008
|
adapter: n,
|
|
1009
1009
|
pageSize: a,
|
|
1010
1010
|
view: s,
|
|
1011
1011
|
staleTime: l,
|
|
1012
|
-
enabled:
|
|
1013
|
-
limit:
|
|
1012
|
+
enabled: b,
|
|
1013
|
+
limit: se
|
|
1014
1014
|
}),
|
|
1015
|
-
[t, n, a, s, l,
|
|
1016
|
-
),
|
|
1017
|
-
(
|
|
1018
|
-
let
|
|
1019
|
-
return
|
|
1015
|
+
[t, n, a, s, l, se]
|
|
1016
|
+
), G = Yn(C, E, g), j = G.fetchNextPage, R = q(/* @__PURE__ */ new Map()), Y = A(
|
|
1017
|
+
(y) => {
|
|
1018
|
+
let b = R.current.get(y);
|
|
1019
|
+
return b || (b = () => j(y), R.current.set(y, b)), b;
|
|
1020
1020
|
},
|
|
1021
|
-
[
|
|
1022
|
-
),
|
|
1023
|
-
|
|
1024
|
-
(
|
|
1021
|
+
[j]
|
|
1022
|
+
), D = A((y) => {
|
|
1023
|
+
x(
|
|
1024
|
+
(b) => b.includes(y) ? b : [...b, y]
|
|
1025
1025
|
);
|
|
1026
|
-
}, []),
|
|
1027
|
-
(
|
|
1028
|
-
|
|
1026
|
+
}, []), F = A(
|
|
1027
|
+
(y) => {
|
|
1028
|
+
x((b) => b.filter((I) => I !== y)), S.cancelQueries({ queryKey: Mt(t, y) });
|
|
1029
1029
|
},
|
|
1030
|
-
[
|
|
1031
|
-
),
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1034
|
-
(
|
|
1035
|
-
|
|
1030
|
+
[S, t]
|
|
1031
|
+
), Q = q(w);
|
|
1032
|
+
Q.current = w;
|
|
1033
|
+
const re = A(
|
|
1034
|
+
(y) => {
|
|
1035
|
+
Q.current.includes(y) ? F(y) : D(y);
|
|
1036
1036
|
},
|
|
1037
|
-
[
|
|
1038
|
-
),
|
|
1039
|
-
(
|
|
1037
|
+
[F, D]
|
|
1038
|
+
), k = G.results, oe = q(/* @__PURE__ */ new Map()), W = A(
|
|
1039
|
+
(y) => {
|
|
1040
1040
|
var xe;
|
|
1041
|
-
const
|
|
1042
|
-
if (
|
|
1043
|
-
return
|
|
1044
|
-
const
|
|
1045
|
-
if ((
|
|
1046
|
-
return
|
|
1047
|
-
items:
|
|
1048
|
-
pageInfo:
|
|
1041
|
+
const b = L.get(y), I = k.get(y), H = ne.has(y), K = oe.current.get(y);
|
|
1042
|
+
if (K && K.items === (b == null ? void 0 : b.items) && K.result === I && K.active === H)
|
|
1043
|
+
return K.value;
|
|
1044
|
+
const we = (le) => (oe.current.set(y, { items: b == null ? void 0 : b.items, result: I, active: H, value: le }), le);
|
|
1045
|
+
if ((b == null ? void 0 : b.items) !== void 0)
|
|
1046
|
+
return we({
|
|
1047
|
+
items: b.items,
|
|
1048
|
+
pageInfo: ge,
|
|
1049
1049
|
hasNextPage: !1,
|
|
1050
|
-
fetchNextPage:
|
|
1050
|
+
fetchNextPage: Wn,
|
|
1051
1051
|
isLoading: !1,
|
|
1052
1052
|
isFetchingNextPage: !1,
|
|
1053
1053
|
error: null,
|
|
1054
1054
|
source: "inline"
|
|
1055
1055
|
});
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1058
|
-
items:
|
|
1056
|
+
const U = (xe = I == null ? void 0 : I.data) == null ? void 0 : xe.pages, Dt = U ? U.flatMap((le) => le.items) : Qn, Ee = U && U.length > 0 ? U[U.length - 1].pageInfo : ge;
|
|
1057
|
+
return we({
|
|
1058
|
+
items: Dt,
|
|
1059
1059
|
pageInfo: Ee,
|
|
1060
1060
|
hasNextPage: Ee.hasNextPage,
|
|
1061
|
-
fetchNextPage:
|
|
1061
|
+
fetchNextPage: Y(y),
|
|
1062
1062
|
// Between the click and the observer being wired up there is one commit
|
|
1063
1063
|
// with no result yet; report that as loading rather than as "empty".
|
|
1064
|
-
isLoading:
|
|
1065
|
-
isFetchingNextPage: (
|
|
1066
|
-
error: (
|
|
1064
|
+
isLoading: I ? I.isLoading : H,
|
|
1065
|
+
isFetchingNextPage: (I == null ? void 0 : I.isFetchingNextPage) ?? !1,
|
|
1066
|
+
error: (I == null ? void 0 : I.error) ?? null,
|
|
1067
1067
|
source: "onDemand"
|
|
1068
1068
|
});
|
|
1069
1069
|
},
|
|
1070
|
-
[
|
|
1070
|
+
[L, k, Y, ne]
|
|
1071
1071
|
);
|
|
1072
1072
|
return {
|
|
1073
1073
|
modules: h.modules,
|
|
@@ -1078,119 +1078,118 @@ function ei(e) {
|
|
|
1078
1078
|
isFetchingNextPage: h.isFetchingNextPage,
|
|
1079
1079
|
error: h.error ?? p.error,
|
|
1080
1080
|
itemsMode: f,
|
|
1081
|
-
getItems:
|
|
1082
|
-
expandModule:
|
|
1083
|
-
collapseModule:
|
|
1084
|
-
toggleModule:
|
|
1085
|
-
expandedModuleIds:
|
|
1081
|
+
getItems: W,
|
|
1082
|
+
expandModule: D,
|
|
1083
|
+
collapseModule: F,
|
|
1084
|
+
toggleModule: re,
|
|
1085
|
+
expandedModuleIds: w
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const r = s ?
|
|
1088
|
+
function ei(e, t, n, s) {
|
|
1089
|
+
const r = s ? ee.items(t, n, s) : Mt(t, n);
|
|
1090
1090
|
return e.invalidateQueries({ queryKey: r });
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const s = n ?
|
|
1092
|
+
function ti(e, t, n) {
|
|
1093
|
+
const s = n ? ee.list(t, n) : Un(t);
|
|
1094
1094
|
return e.invalidateQueries({ queryKey: s });
|
|
1095
1095
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return e.invalidateQueries({ queryKey:
|
|
1098
|
-
}
|
|
1099
|
-
const
|
|
1100
|
-
pageTitle:
|
|
1101
|
-
modulesLoadedAnnouncement:
|
|
1102
|
-
moduleSearchLabel:
|
|
1103
|
-
searchPlaceholder:
|
|
1104
|
-
expandCollapseTrigger:
|
|
1105
|
-
expandAll:
|
|
1106
|
-
collapseAll:
|
|
1107
|
-
searchScopeHint:
|
|
1108
|
-
modulesLoadErrorAlert:
|
|
1109
|
-
modulesLoadingSpinnerLabel:
|
|
1110
|
-
noModulesEmptyState:
|
|
1111
|
-
filteredEmptyState:
|
|
1112
|
-
clearFilters:
|
|
1113
|
-
loadMoreModulesLoading:
|
|
1114
|
-
loadMoreModules:
|
|
1115
|
-
allModulesLoaded:
|
|
1116
|
-
filterGroupLabel:
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
function Pt(e, t, n) {
|
|
1096
|
+
function ni(e, t) {
|
|
1097
|
+
return e.invalidateQueries({ queryKey: ee.course(t) });
|
|
1098
|
+
}
|
|
1099
|
+
const Hn = "Course modules", Kn = { one: "%{count} module loaded", other: "%{count} modules loaded" }, Vn = "Search by name", Zn = "Search…", Xn = "Expand / collapse", Jn = "Expand all", es = "Collapse all", ts = "Search matches module names only — items of collapsed modules are not loaded.", ns = "Modules failed to load: %{message}", ss = "Loading modules", rs = "This course has no modules.", os = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, is = "Clear filters", ls = "Loading more modules…", as = "Load more modules (%{count} loaded)", us = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, cs = "Filter", ds = "All", ms = "In progress", gs = "Complete", fs = "Due this week", hs = "Missing", ps = "Locked until prerequisites are met", Is = "%{name} progress", bs = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, Ms = "Items failed to load: %{message}", Ss = "Loading items", ys = "Loading…", _s = "No items.", Ts = "Loading more items…", Ps = "Load more items (%{loaded} of %{count} loaded)", ws = "(unpublished)", Es = "Collapse %{name}", xs = "Expand %{name}", Cs = "Not started", Ls = "In progress", As = "All items complete", vs = "All items graded", Ns = "Missing", Ds = "Locked", ks = "Not started", qs = "In progress", Rs = "Submitted", Fs = "Graded", zs = "Missing", Us = "Locked", Os = "Assignment", $s = "Quiz", Bs = "Discussion", Gs = "Page", js = "File", Ys = "External URL", Qs = "External tool", Ws = "Text header", Hs = "View the item", Ks = "Submit the assignment", Vs = "Contribute to the page", Zs = "Mark as done", Xs = "Score at least the minimum", Js = "Score at least %{count}", er = "Score at least the minimum percentage", tr = "Score at least %{count}%", nr = "Complete the requirement", sr = "today, %{time}", rr = "yesterday, %{time}", or = "tomorrow, %{time}", ir = "%{date}, %{time}", lr = "Due %{when}", ar = "Will unlock on %{when}", ur = { one: "%{count} pt", other: "%{count} pts" }, cr = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, dr = "%{count} min", mr = "Unpublished", gr = "Untitled item", fr = "opens in a new window", hr = {
|
|
1100
|
+
pageTitle: Hn,
|
|
1101
|
+
modulesLoadedAnnouncement: Kn,
|
|
1102
|
+
moduleSearchLabel: Vn,
|
|
1103
|
+
searchPlaceholder: Zn,
|
|
1104
|
+
expandCollapseTrigger: Xn,
|
|
1105
|
+
expandAll: Jn,
|
|
1106
|
+
collapseAll: es,
|
|
1107
|
+
searchScopeHint: ts,
|
|
1108
|
+
modulesLoadErrorAlert: ns,
|
|
1109
|
+
modulesLoadingSpinnerLabel: ss,
|
|
1110
|
+
noModulesEmptyState: rs,
|
|
1111
|
+
filteredEmptyState: os,
|
|
1112
|
+
clearFilters: is,
|
|
1113
|
+
loadMoreModulesLoading: ls,
|
|
1114
|
+
loadMoreModules: as,
|
|
1115
|
+
allModulesLoaded: us,
|
|
1116
|
+
filterGroupLabel: cs,
|
|
1117
|
+
filterAll: ds,
|
|
1118
|
+
filterInProgress: ms,
|
|
1119
|
+
filterComplete: gs,
|
|
1120
|
+
filterDueThisWeek: fs,
|
|
1121
|
+
filterMissing: hs,
|
|
1122
|
+
lockedByline: ps,
|
|
1123
|
+
moduleProgressScreenReaderLabel: Is,
|
|
1124
|
+
itemsLoadedAnnouncement: bs,
|
|
1125
|
+
itemsLoadErrorAlert: Ms,
|
|
1126
|
+
itemsLoadingSpinnerLabel: Ss,
|
|
1127
|
+
itemsLoadingText: ys,
|
|
1128
|
+
noItemsEmptyState: _s,
|
|
1129
|
+
loadMoreItemsLoading: Ts,
|
|
1130
|
+
loadMoreItems: Ps,
|
|
1131
|
+
moduleUnpublishedBadge: ws,
|
|
1132
|
+
collapseModule: Es,
|
|
1133
|
+
expandModule: xs,
|
|
1134
|
+
moduleStatusNotStarted: Cs,
|
|
1135
|
+
moduleStatusInProgress: Ls,
|
|
1136
|
+
moduleStatusAllSubmitted: As,
|
|
1137
|
+
moduleStatusAllGraded: vs,
|
|
1138
|
+
moduleStatusMissing: Ns,
|
|
1139
|
+
moduleStatusLocked: Ds,
|
|
1140
|
+
itemStatusNotStarted: ks,
|
|
1141
|
+
itemStatusInProgress: qs,
|
|
1142
|
+
itemStatusSubmitted: Rs,
|
|
1143
|
+
itemStatusGraded: Fs,
|
|
1144
|
+
itemStatusMissing: zs,
|
|
1145
|
+
itemStatusLocked: Us,
|
|
1146
|
+
itemTypeAssignment: Os,
|
|
1147
|
+
itemTypeQuiz: $s,
|
|
1148
|
+
itemTypeDiscussion: Bs,
|
|
1149
|
+
itemTypePage: Gs,
|
|
1150
|
+
itemTypeFile: js,
|
|
1151
|
+
itemTypeExternalUrl: Ys,
|
|
1152
|
+
itemTypeExternalTool: Qs,
|
|
1153
|
+
itemTypeSubHeader: Ws,
|
|
1154
|
+
requirementMustView: Hs,
|
|
1155
|
+
requirementMustSubmit: Ks,
|
|
1156
|
+
requirementMustContribute: Vs,
|
|
1157
|
+
requirementMustMarkDone: Zs,
|
|
1158
|
+
requirementMinScoreUnknown: Xs,
|
|
1159
|
+
requirementMinScore: Js,
|
|
1160
|
+
requirementMinPercentageUnknown: er,
|
|
1161
|
+
requirementMinPercentage: tr,
|
|
1162
|
+
requirementUnknown: nr,
|
|
1163
|
+
dateTimeToday: sr,
|
|
1164
|
+
dateTimeYesterday: rr,
|
|
1165
|
+
dateTimeTomorrow: or,
|
|
1166
|
+
dateTimeWithDate: ir,
|
|
1167
|
+
dueByline: lr,
|
|
1168
|
+
unlockByline: ar,
|
|
1169
|
+
pointsAbbreviated: ur,
|
|
1170
|
+
progressSummary: cr,
|
|
1171
|
+
durationMinutes: dr,
|
|
1172
|
+
itemUnpublishedLabel: mr,
|
|
1173
|
+
itemUntitled: gr,
|
|
1174
|
+
opensInNewWindow: fr
|
|
1175
|
+
}, pr = /%\{(\w+)\}/g, Ir = hr, te = "en-US", br = /* @__PURE__ */ new Map(), Mr = /* @__PURE__ */ new Map();
|
|
1176
|
+
function Tt(e, t, n) {
|
|
1178
1177
|
const s = e.get(t);
|
|
1179
1178
|
if (s) return s;
|
|
1180
1179
|
const r = n();
|
|
1181
1180
|
return e.set(t, r), r;
|
|
1182
1181
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return n ? e.replace(
|
|
1182
|
+
function Sr(e, t, n) {
|
|
1183
|
+
return n ? e.replace(pr, (s, r) => {
|
|
1185
1184
|
if (!Object.prototype.hasOwnProperty.call(n, r)) return s;
|
|
1186
1185
|
const i = n[r];
|
|
1187
|
-
return typeof i == "number" && Number.isFinite(i) ?
|
|
1186
|
+
return typeof i == "number" && Number.isFinite(i) ? Tt(Mr, t, () => new Intl.NumberFormat(t)).format(i) : String(i);
|
|
1188
1187
|
}) : e;
|
|
1189
1188
|
}
|
|
1190
|
-
function
|
|
1189
|
+
function yr(e, t, n) {
|
|
1191
1190
|
const s = n == null ? void 0 : n.count;
|
|
1192
1191
|
if (typeof s == "number" && Number.isFinite(s)) {
|
|
1193
|
-
const r =
|
|
1192
|
+
const r = Tt(br, t, () => new Intl.PluralRules(t)).select(s), i = e[r];
|
|
1194
1193
|
if (typeof i == "string") return i;
|
|
1195
1194
|
}
|
|
1196
1195
|
return typeof e.other == "string" ? e.other : void 0;
|
|
@@ -1198,40 +1197,40 @@ function wr(e, t, n) {
|
|
|
1198
1197
|
function Ne(e, t, n) {
|
|
1199
1198
|
if (typeof e == "string") return e;
|
|
1200
1199
|
if (e !== null && typeof e == "object")
|
|
1201
|
-
return
|
|
1200
|
+
return yr(e, t, n);
|
|
1202
1201
|
}
|
|
1203
|
-
function
|
|
1202
|
+
function _r(e, t, n, s) {
|
|
1204
1203
|
const r = Ne(e == null ? void 0 : e[t], n, s);
|
|
1205
1204
|
if (typeof r == "string") return r;
|
|
1206
|
-
const i = Ne(
|
|
1205
|
+
const i = Ne(Ir[t], n, s);
|
|
1207
1206
|
return typeof i == "string" ? i : t;
|
|
1208
1207
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return (n, s) =>
|
|
1208
|
+
function Pt(e, t = te) {
|
|
1209
|
+
return (n, s) => Sr(_r(e, n, t, s), t, s);
|
|
1211
1210
|
}
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1211
|
+
const Tr = Pt(), Pr = { t: Tr, locale: te }, wt = Oe(null);
|
|
1212
|
+
function si({
|
|
1214
1213
|
translations: e,
|
|
1215
1214
|
locale: t,
|
|
1216
1215
|
children: n
|
|
1217
1216
|
}) {
|
|
1218
|
-
const s =
|
|
1219
|
-
const r = t ??
|
|
1220
|
-
return { t:
|
|
1217
|
+
const s = v(() => {
|
|
1218
|
+
const r = t ?? te;
|
|
1219
|
+
return { t: Pt(e, r), locale: r };
|
|
1221
1220
|
}, [e, t]);
|
|
1222
|
-
return /* @__PURE__ */ o(
|
|
1221
|
+
return /* @__PURE__ */ o(wt.Provider, { value: s, children: n });
|
|
1223
1222
|
}
|
|
1224
|
-
function
|
|
1225
|
-
return
|
|
1223
|
+
function N() {
|
|
1224
|
+
return $e(wt) ?? Pr;
|
|
1226
1225
|
}
|
|
1227
|
-
const
|
|
1228
|
-
function
|
|
1226
|
+
const wr = 864e5, De = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
|
|
1227
|
+
function Er(e) {
|
|
1229
1228
|
const t = ke.get(e);
|
|
1230
1229
|
if (t) return t;
|
|
1231
1230
|
const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
|
|
1232
1231
|
return ke.set(e, n), n;
|
|
1233
1232
|
}
|
|
1234
|
-
function
|
|
1233
|
+
function xr(e) {
|
|
1235
1234
|
const t = De.get(e);
|
|
1236
1235
|
if (t) return t;
|
|
1237
1236
|
const n = {
|
|
@@ -1241,30 +1240,30 @@ function Ar(e) {
|
|
|
1241
1240
|
};
|
|
1242
1241
|
return De.set(e, n), n;
|
|
1243
1242
|
}
|
|
1244
|
-
function
|
|
1243
|
+
function Et(e, t) {
|
|
1245
1244
|
const n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), s = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
|
|
1246
|
-
return Math.round((n - s) /
|
|
1245
|
+
return Math.round((n - s) / wr);
|
|
1247
1246
|
}
|
|
1248
|
-
function
|
|
1247
|
+
function xt(e, t, n, s = te) {
|
|
1249
1248
|
const r = new Date(t);
|
|
1250
1249
|
if (Number.isNaN(r.getTime())) return t;
|
|
1251
|
-
const i =
|
|
1250
|
+
const i = xr(s), u = i.time.format(r), a = Et(r, n);
|
|
1252
1251
|
if (a === 0) return e("dateTimeToday", { time: u });
|
|
1253
1252
|
if (a === -1) return e("dateTimeYesterday", { time: u });
|
|
1254
1253
|
if (a === 1) return e("dateTimeTomorrow", { time: u });
|
|
1255
1254
|
const c = r.getFullYear() === n.getFullYear() ? i.day.format(r) : i.dayYear.format(r);
|
|
1256
1255
|
return e("dateTimeWithDate", { date: c, time: u });
|
|
1257
1256
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return e("dueByline", { when:
|
|
1257
|
+
function Ct(e, t, n, s) {
|
|
1258
|
+
return e("dueByline", { when: xt(e, t, n, s) });
|
|
1260
1259
|
}
|
|
1261
1260
|
function qe(e, t, n, s) {
|
|
1262
|
-
return e("unlockByline", { when:
|
|
1261
|
+
return e("unlockByline", { when: xt(e, t, n, s) });
|
|
1263
1262
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return !Number.isInteger(e) || e < 1 ? null :
|
|
1263
|
+
function Cr(e, t = te) {
|
|
1264
|
+
return !Number.isInteger(e) || e < 1 ? null : Er(t).format(e);
|
|
1266
1265
|
}
|
|
1267
|
-
function
|
|
1266
|
+
function Lr(e, t) {
|
|
1268
1267
|
switch (t) {
|
|
1269
1268
|
case "assignment":
|
|
1270
1269
|
return e("itemTypeAssignment");
|
|
@@ -1284,10 +1283,10 @@ function Nr(e, t) {
|
|
|
1284
1283
|
return e("itemTypeSubHeader");
|
|
1285
1284
|
}
|
|
1286
1285
|
}
|
|
1287
|
-
function
|
|
1286
|
+
function Ar(e, t) {
|
|
1288
1287
|
return t == null ? null : e("pointsAbbreviated", { count: t });
|
|
1289
1288
|
}
|
|
1290
|
-
function
|
|
1289
|
+
function vr(e, t) {
|
|
1291
1290
|
switch (t.type) {
|
|
1292
1291
|
case "must_view":
|
|
1293
1292
|
return e("requirementMustView");
|
|
@@ -1305,17 +1304,17 @@ function kr(e, t) {
|
|
|
1305
1304
|
return e("requirementUnknown");
|
|
1306
1305
|
}
|
|
1307
1306
|
}
|
|
1308
|
-
function
|
|
1307
|
+
function Nr(e, t, n, s) {
|
|
1309
1308
|
return e("progressSummary", { percent: t, met: n, count: s });
|
|
1310
1309
|
}
|
|
1311
|
-
const
|
|
1310
|
+
const Dr = [
|
|
1312
1311
|
"all",
|
|
1313
1312
|
"in_progress",
|
|
1314
1313
|
"complete",
|
|
1315
1314
|
"due_this_week",
|
|
1316
1315
|
"missing"
|
|
1317
1316
|
];
|
|
1318
|
-
function
|
|
1317
|
+
function kr(e, t) {
|
|
1319
1318
|
switch (t) {
|
|
1320
1319
|
case "all":
|
|
1321
1320
|
return e("filterAll");
|
|
@@ -1329,8 +1328,8 @@ function Fr(e, t) {
|
|
|
1329
1328
|
return e("filterMissing");
|
|
1330
1329
|
}
|
|
1331
1330
|
}
|
|
1332
|
-
const
|
|
1333
|
-
function
|
|
1331
|
+
const qr = 7;
|
|
1332
|
+
function Rr(e, t, n) {
|
|
1334
1333
|
if (t === "all") return !0;
|
|
1335
1334
|
const s = e.progress;
|
|
1336
1335
|
if (!s) return !1;
|
|
@@ -1345,65 +1344,65 @@ function Re(e, t, n) {
|
|
|
1345
1344
|
if (!s.latestDueAt) return !1;
|
|
1346
1345
|
const r = new Date(s.latestDueAt);
|
|
1347
1346
|
if (Number.isNaN(r.getTime())) return !1;
|
|
1348
|
-
const i =
|
|
1349
|
-
return i >= 0 && i <=
|
|
1347
|
+
const i = Et(r, n);
|
|
1348
|
+
return i >= 0 && i <= qr;
|
|
1350
1349
|
}
|
|
1351
1350
|
default:
|
|
1352
1351
|
return !0;
|
|
1353
1352
|
}
|
|
1354
1353
|
}
|
|
1355
|
-
function
|
|
1354
|
+
function Fr(e, t, n) {
|
|
1356
1355
|
const s = t.trim().toLocaleLowerCase(n);
|
|
1357
1356
|
return s === "" ? !0 : e.name.toLocaleLowerCase(n).includes(s);
|
|
1358
1357
|
}
|
|
1359
|
-
function
|
|
1360
|
-
const { t:
|
|
1361
|
-
return /* @__PURE__ */ _
|
|
1362
|
-
/* @__PURE__ */ o(
|
|
1358
|
+
function zr({ value: e, onChange: t }) {
|
|
1359
|
+
const { t: n } = N(), s = Be();
|
|
1360
|
+
return /* @__PURE__ */ T(_, { as: "div", margin: "medium 0 0 0", children: [
|
|
1361
|
+
/* @__PURE__ */ o(_, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ o(M, { size: "medium", weight: "bold", id: s, children: n("filterGroupLabel") }) }),
|
|
1363
1362
|
/* @__PURE__ */ o(
|
|
1364
|
-
|
|
1363
|
+
P,
|
|
1365
1364
|
{
|
|
1366
|
-
gap: "
|
|
1365
|
+
gap: "space4",
|
|
1367
1366
|
wrap: "wrap",
|
|
1368
1367
|
as: "div",
|
|
1369
1368
|
role: "group",
|
|
1370
|
-
"aria-labelledby":
|
|
1369
|
+
"aria-labelledby": s,
|
|
1371
1370
|
"data-testid": "filter-chips",
|
|
1372
|
-
children:
|
|
1373
|
-
const
|
|
1374
|
-
return /* @__PURE__ */ o(
|
|
1375
|
-
|
|
1371
|
+
children: Dr.map((r) => {
|
|
1372
|
+
const i = r === e;
|
|
1373
|
+
return /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
|
|
1374
|
+
Z,
|
|
1376
1375
|
{
|
|
1377
|
-
size: "
|
|
1378
|
-
color:
|
|
1379
|
-
"aria-pressed":
|
|
1380
|
-
onClick: () => t(
|
|
1381
|
-
"data-testid": `filter-chip-${
|
|
1382
|
-
themeOverride: { borderRadius: "
|
|
1383
|
-
children:
|
|
1376
|
+
size: "medium",
|
|
1377
|
+
color: i ? "primary" : "secondary",
|
|
1378
|
+
"aria-pressed": i,
|
|
1379
|
+
onClick: () => t(r),
|
|
1380
|
+
"data-testid": `filter-chip-${r}`,
|
|
1381
|
+
themeOverride: { borderRadius: "0.5rem" },
|
|
1382
|
+
children: kr(n, r)
|
|
1384
1383
|
}
|
|
1385
|
-
) },
|
|
1384
|
+
) }, r);
|
|
1386
1385
|
})
|
|
1387
1386
|
}
|
|
1388
1387
|
)
|
|
1389
1388
|
] });
|
|
1390
1389
|
}
|
|
1391
|
-
const
|
|
1390
|
+
const Ur = {
|
|
1392
1391
|
not_started: {},
|
|
1393
|
-
in_progress: { color: "info", icon: /* @__PURE__ */ o(
|
|
1394
|
-
all_submitted: { color: "success", icon: /* @__PURE__ */ o(
|
|
1395
|
-
all_graded: { color: "success", icon: /* @__PURE__ */ o(
|
|
1396
|
-
missing: { color: "danger", icon: /* @__PURE__ */ o(
|
|
1397
|
-
locked: { icon: /* @__PURE__ */ o(
|
|
1398
|
-
},
|
|
1392
|
+
in_progress: { color: "info", icon: /* @__PURE__ */ o(Ze, {}) },
|
|
1393
|
+
all_submitted: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
|
|
1394
|
+
all_graded: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
|
|
1395
|
+
missing: { color: "danger", icon: /* @__PURE__ */ o(Ve, {}) },
|
|
1396
|
+
locked: { icon: /* @__PURE__ */ o(Ke, {}) }
|
|
1397
|
+
}, Or = {
|
|
1399
1398
|
not_started: {},
|
|
1400
|
-
in_progress: { color: "info", icon: /* @__PURE__ */ o(
|
|
1401
|
-
submitted: { color: "success", icon: /* @__PURE__ */ o(
|
|
1402
|
-
graded: { color: "success", icon: /* @__PURE__ */ o(
|
|
1403
|
-
missing: { color: "danger", icon: /* @__PURE__ */ o(
|
|
1404
|
-
locked: { icon: /* @__PURE__ */ o(
|
|
1399
|
+
in_progress: { color: "info", icon: /* @__PURE__ */ o(Ze, {}) },
|
|
1400
|
+
submitted: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
|
|
1401
|
+
graded: { color: "success", icon: /* @__PURE__ */ o(de, {}) },
|
|
1402
|
+
missing: { color: "danger", icon: /* @__PURE__ */ o(Ve, {}) },
|
|
1403
|
+
locked: { icon: /* @__PURE__ */ o(Ke, {}) }
|
|
1405
1404
|
};
|
|
1406
|
-
function
|
|
1405
|
+
function $r(e, t) {
|
|
1407
1406
|
switch (t) {
|
|
1408
1407
|
case "not_started":
|
|
1409
1408
|
return e("moduleStatusNotStarted");
|
|
@@ -1419,7 +1418,7 @@ function Br(e, t) {
|
|
|
1419
1418
|
return e("moduleStatusLocked");
|
|
1420
1419
|
}
|
|
1421
1420
|
}
|
|
1422
|
-
function
|
|
1421
|
+
function Br(e, t) {
|
|
1423
1422
|
switch (t) {
|
|
1424
1423
|
case "not_started":
|
|
1425
1424
|
return e("itemStatusNotStarted");
|
|
@@ -1435,51 +1434,51 @@ function Gr(e, t) {
|
|
|
1435
1434
|
return e("itemStatusLocked");
|
|
1436
1435
|
}
|
|
1437
1436
|
}
|
|
1438
|
-
function
|
|
1439
|
-
return /* @__PURE__ */ o(
|
|
1437
|
+
function Lt(e, t, n) {
|
|
1438
|
+
return /* @__PURE__ */ o(Zt, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
|
|
1440
1439
|
}
|
|
1441
|
-
function
|
|
1442
|
-
const { t } =
|
|
1443
|
-
return
|
|
1444
|
-
|
|
1445
|
-
|
|
1440
|
+
function Gr({ status: e }) {
|
|
1441
|
+
const { t } = N();
|
|
1442
|
+
return Lt(
|
|
1443
|
+
Ur[e],
|
|
1444
|
+
$r(t, e),
|
|
1446
1445
|
"module-status-pill"
|
|
1447
1446
|
);
|
|
1448
1447
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const { t } =
|
|
1451
|
-
return
|
|
1452
|
-
|
|
1453
|
-
|
|
1448
|
+
function jr({ status: e }) {
|
|
1449
|
+
const { t } = N();
|
|
1450
|
+
return Lt(
|
|
1451
|
+
Or[e],
|
|
1452
|
+
Br(t, e),
|
|
1454
1453
|
"item-status-pill"
|
|
1455
1454
|
);
|
|
1456
1455
|
}
|
|
1457
|
-
const
|
|
1458
|
-
assignment: /* @__PURE__ */ o(
|
|
1459
|
-
quiz: /* @__PURE__ */ o(
|
|
1460
|
-
discussion: /* @__PURE__ */ o(
|
|
1461
|
-
page: /* @__PURE__ */ o(
|
|
1462
|
-
file: /* @__PURE__ */ o(
|
|
1463
|
-
external_url: /* @__PURE__ */ o(
|
|
1464
|
-
external_tool: /* @__PURE__ */ o(
|
|
1465
|
-
sub_header: /* @__PURE__ */ o(
|
|
1466
|
-
}, Qr = 1.75,
|
|
1456
|
+
const Yr = {
|
|
1457
|
+
assignment: /* @__PURE__ */ o(Yt, {}),
|
|
1458
|
+
quiz: /* @__PURE__ */ o(jt, {}),
|
|
1459
|
+
discussion: /* @__PURE__ */ o(Gt, {}),
|
|
1460
|
+
page: /* @__PURE__ */ o(Bt, {}),
|
|
1461
|
+
file: /* @__PURE__ */ o($t, {}),
|
|
1462
|
+
external_url: /* @__PURE__ */ o(Ot, {}),
|
|
1463
|
+
external_tool: /* @__PURE__ */ o(Ut, {}),
|
|
1464
|
+
sub_header: /* @__PURE__ */ o(zt, {})
|
|
1465
|
+
}, Qr = 1.75, Wr = {
|
|
1467
1466
|
contentVisibility: "auto",
|
|
1468
1467
|
containIntrinsicSize: "auto 3.5rem"
|
|
1469
1468
|
};
|
|
1470
|
-
function
|
|
1469
|
+
function Hr({ item: e, today: t, navigation: n }) {
|
|
1471
1470
|
var p;
|
|
1472
|
-
const { t: s, locale: r } =
|
|
1471
|
+
const { t: s, locale: r } = N(), i = e.title || s("itemUntitled");
|
|
1473
1472
|
if (e.type === "sub_header")
|
|
1474
1473
|
return /* @__PURE__ */ o(
|
|
1475
|
-
|
|
1474
|
+
_,
|
|
1476
1475
|
{
|
|
1477
1476
|
as: "div",
|
|
1478
1477
|
padding: "x-small small",
|
|
1479
1478
|
margin: "x-small 0 0 0",
|
|
1480
1479
|
"data-testid": `module-item-${e.id}`,
|
|
1481
1480
|
children: /* @__PURE__ */ o(
|
|
1482
|
-
|
|
1481
|
+
M,
|
|
1483
1482
|
{
|
|
1484
1483
|
size: "small",
|
|
1485
1484
|
weight: "bold",
|
|
@@ -1492,13 +1491,13 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1492
1491
|
)
|
|
1493
1492
|
}
|
|
1494
1493
|
);
|
|
1495
|
-
const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, a = e.status === "locked", c = n == null ? void 0 : n.onItemClick, g = c ? (f) => c(e, f) : void 0, l = [
|
|
1496
|
-
e.dueAt && l.push(
|
|
1497
|
-
const m =
|
|
1498
|
-
m && l.push(m), e.completionRequirement && l.push(
|
|
1499
|
-
const
|
|
1500
|
-
return
|
|
1501
|
-
|
|
1494
|
+
const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, a = e.status === "locked", c = n == null ? void 0 : n.onItemClick, g = c ? (f) => c(e, f) : void 0, l = [Lr(s, e.type)];
|
|
1495
|
+
e.dueAt && l.push(Ct(s, e.dueAt, t, r));
|
|
1496
|
+
const m = Ar(s, e.pointsPossible);
|
|
1497
|
+
m && l.push(m), e.completionRequirement && l.push(vr(s, e.completionRequirement));
|
|
1498
|
+
const S = an(e);
|
|
1499
|
+
return S !== null && l.push(s("durationMinutes", { count: S })), e.published || l.push(s("itemUnpublishedLabel")), /* @__PURE__ */ o("div", { style: { marginLeft: `${e.indent * Qr}rem`, ...Wr }, children: /* @__PURE__ */ o(
|
|
1500
|
+
_,
|
|
1502
1501
|
{
|
|
1503
1502
|
as: "div",
|
|
1504
1503
|
background: "secondary",
|
|
@@ -1506,10 +1505,10 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1506
1505
|
padding: "x-small small",
|
|
1507
1506
|
margin: "x-small 0 0 0",
|
|
1508
1507
|
"data-testid": `module-item-${e.id}`,
|
|
1509
|
-
children: /* @__PURE__ */
|
|
1510
|
-
e.indent > 0 ? /* @__PURE__ */ o(
|
|
1511
|
-
/* @__PURE__ */ o(
|
|
1512
|
-
|
|
1508
|
+
children: /* @__PURE__ */ T(P, { alignItems: "center", gap: "small", children: [
|
|
1509
|
+
e.indent > 0 ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { color: "secondary", children: /* @__PURE__ */ o(Ft, {}) }) }) : null,
|
|
1510
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
|
|
1511
|
+
_,
|
|
1513
1512
|
{
|
|
1514
1513
|
as: "div",
|
|
1515
1514
|
background: "primary",
|
|
@@ -1519,12 +1518,12 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1519
1518
|
width: "2.25rem",
|
|
1520
1519
|
height: "2.25rem",
|
|
1521
1520
|
textAlign: "center",
|
|
1522
|
-
children: /* @__PURE__ */ o(
|
|
1521
|
+
children: /* @__PURE__ */ o(M, { color: "secondary", children: Yr[e.type] })
|
|
1523
1522
|
}
|
|
1524
1523
|
) }),
|
|
1525
|
-
/* @__PURE__ */
|
|
1526
|
-
/* @__PURE__ */ o(
|
|
1527
|
-
|
|
1524
|
+
/* @__PURE__ */ T(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1525
|
+
/* @__PURE__ */ o(_, { as: "div", children: a || !u ? /* @__PURE__ */ o(
|
|
1526
|
+
M,
|
|
1528
1527
|
{
|
|
1529
1528
|
weight: "bold",
|
|
1530
1529
|
size: "small",
|
|
@@ -1533,8 +1532,8 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1533
1532
|
"data-locked": a ? "true" : void 0,
|
|
1534
1533
|
children: i
|
|
1535
1534
|
}
|
|
1536
|
-
) : /* @__PURE__ */
|
|
1537
|
-
|
|
1535
|
+
) : /* @__PURE__ */ T(
|
|
1536
|
+
Vt,
|
|
1538
1537
|
{
|
|
1539
1538
|
href: u,
|
|
1540
1539
|
onClick: g,
|
|
@@ -1543,57 +1542,57 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1543
1542
|
target: e.newTab ? "_blank" : void 0,
|
|
1544
1543
|
rel: e.newTab ? "noopener noreferrer" : void 0,
|
|
1545
1544
|
children: [
|
|
1546
|
-
/* @__PURE__ */ o(
|
|
1547
|
-
e.newTab ? /* @__PURE__ */ o(
|
|
1545
|
+
/* @__PURE__ */ o(M, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: i }),
|
|
1546
|
+
e.newTab ? /* @__PURE__ */ o(Kt, { children: ` ${s("opensInNewWindow")}` }) : null
|
|
1548
1547
|
]
|
|
1549
1548
|
}
|
|
1550
1549
|
) }),
|
|
1551
|
-
/* @__PURE__ */ o(
|
|
1550
|
+
/* @__PURE__ */ o(_, { as: "div", children: /* @__PURE__ */ o(M, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: l.map((f, h) => /* @__PURE__ */ T("span", { children: [
|
|
1552
1551
|
h > 0 ? /* @__PURE__ */ o("span", { "aria-hidden": "true", children: " | " }) : null,
|
|
1553
1552
|
/* @__PURE__ */ o("span", { children: f })
|
|
1554
1553
|
] }, f)) }) })
|
|
1555
1554
|
] }),
|
|
1556
|
-
e.status ? /* @__PURE__ */ o(
|
|
1555
|
+
e.status ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(jr, { status: e.status }) }) : null
|
|
1557
1556
|
] })
|
|
1558
1557
|
}
|
|
1559
1558
|
) });
|
|
1560
1559
|
}
|
|
1561
|
-
const
|
|
1562
|
-
function
|
|
1560
|
+
const Kr = Ge(Hr), Re = "3rem";
|
|
1561
|
+
function Vr({
|
|
1563
1562
|
label: e,
|
|
1564
1563
|
dimmed: t = !1
|
|
1565
1564
|
}) {
|
|
1566
1565
|
return e === null ? null : /* @__PURE__ */ o(
|
|
1567
|
-
|
|
1566
|
+
_,
|
|
1568
1567
|
{
|
|
1569
1568
|
as: "div",
|
|
1570
1569
|
display: "inline-block",
|
|
1571
1570
|
borderWidth: "small",
|
|
1572
1571
|
borderRadius: "large",
|
|
1573
1572
|
borderColor: t ? "primary" : "secondary",
|
|
1574
|
-
minWidth:
|
|
1575
|
-
height:
|
|
1573
|
+
minWidth: Re,
|
|
1574
|
+
height: Re,
|
|
1576
1575
|
padding: "0 xx-small",
|
|
1577
1576
|
"data-testid": "module-number",
|
|
1578
|
-
children: /* @__PURE__ */ o(
|
|
1577
|
+
children: /* @__PURE__ */ o(P, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ o(M, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
|
|
1579
1578
|
}
|
|
1580
1579
|
);
|
|
1581
1580
|
}
|
|
1582
|
-
function
|
|
1581
|
+
function Zr({ module: e, today: t }) {
|
|
1583
1582
|
var a, c;
|
|
1584
|
-
const { t: n, locale: s } =
|
|
1583
|
+
const { t: n, locale: s } = N(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", i = e.unlockAt;
|
|
1585
1584
|
if (r && i)
|
|
1586
|
-
return /* @__PURE__ */ o(
|
|
1585
|
+
return /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) });
|
|
1587
1586
|
if (r)
|
|
1588
|
-
return /* @__PURE__ */ o(
|
|
1587
|
+
return /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
|
|
1589
1588
|
const u = (c = e.progress) == null ? void 0 : c.latestDueAt;
|
|
1590
|
-
return u ? /* @__PURE__ */ o(
|
|
1589
|
+
return u ? /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: Ct(n, u, t, s) }) : !e.progress && i ? /* @__PURE__ */ o(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: qe(n, i, t, s) }) : null;
|
|
1591
1590
|
}
|
|
1592
|
-
function
|
|
1593
|
-
const { t } =
|
|
1594
|
-
return !n || n.requirementCount <= 0 ? null : /* @__PURE__ */
|
|
1595
|
-
/* @__PURE__ */ o(
|
|
1596
|
-
|
|
1591
|
+
function Xr({ module: e }) {
|
|
1592
|
+
const { t } = N(), n = e.progress;
|
|
1593
|
+
return !n || n.requirementCount <= 0 ? null : /* @__PURE__ */ T(P, { alignItems: "center", gap: "small", margin: "small 0 0 0", "data-testid": "module-progress", children: [
|
|
1594
|
+
/* @__PURE__ */ o(P.Item, { size: "22rem", shouldShrink: !0, children: /* @__PURE__ */ o(
|
|
1595
|
+
Ht,
|
|
1597
1596
|
{
|
|
1598
1597
|
size: "x-small",
|
|
1599
1598
|
meterColor: n.percentComplete >= 100 ? "success" : "brand",
|
|
@@ -1603,7 +1602,7 @@ function Jr({ module: e }) {
|
|
|
1603
1602
|
screenReaderLabel: t("moduleProgressScreenReaderLabel", { name: e.name })
|
|
1604
1603
|
}
|
|
1605
1604
|
) }),
|
|
1606
|
-
/* @__PURE__ */ o(
|
|
1605
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: Nr(
|
|
1607
1606
|
t,
|
|
1608
1607
|
n.percentComplete,
|
|
1609
1608
|
n.requirementsMet,
|
|
@@ -1611,39 +1610,39 @@ function Jr({ module: e }) {
|
|
|
1611
1610
|
) }) })
|
|
1612
1611
|
] });
|
|
1613
1612
|
}
|
|
1614
|
-
const
|
|
1615
|
-
function
|
|
1613
|
+
const Fe = (e) => `platform-modules-panel-${e}`;
|
|
1614
|
+
function Jr({
|
|
1616
1615
|
module: e,
|
|
1617
1616
|
state: t,
|
|
1618
1617
|
today: n,
|
|
1619
1618
|
navigation: s,
|
|
1620
1619
|
showDiagnostics: r
|
|
1621
1620
|
}) {
|
|
1622
|
-
const { t: i } =
|
|
1623
|
-
return
|
|
1624
|
-
!c || a === 0 || u.current !== a && (u.current = a,
|
|
1621
|
+
const { t: i } = N(), u = q(null), a = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
|
|
1622
|
+
return ce(() => {
|
|
1623
|
+
!c || a === 0 || u.current !== a && (u.current = a, Ye(
|
|
1625
1624
|
i("itemsLoadedAnnouncement", {
|
|
1626
1625
|
loaded: a,
|
|
1627
1626
|
count: e.itemCount,
|
|
1628
1627
|
name: e.name
|
|
1629
1628
|
})
|
|
1630
1629
|
));
|
|
1631
|
-
}, [c, a, e.itemCount, e.name, i]), t.error ? /* @__PURE__ */ o(
|
|
1632
|
-
|
|
1630
|
+
}, [c, a, e.itemCount, e.name, i]), t.error ? /* @__PURE__ */ o(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ o(
|
|
1631
|
+
We,
|
|
1633
1632
|
{
|
|
1634
1633
|
variant: "error",
|
|
1635
1634
|
margin: "0",
|
|
1636
|
-
liveRegion:
|
|
1635
|
+
liveRegion: Qe,
|
|
1637
1636
|
liveRegionPoliteness: "assertive",
|
|
1638
1637
|
"data-testid": "items-error",
|
|
1639
1638
|
children: i("itemsLoadErrorAlert", { message: t.error.message })
|
|
1640
1639
|
}
|
|
1641
|
-
) }) : t.isLoading ? /* @__PURE__ */ _
|
|
1642
|
-
/* @__PURE__ */ o(
|
|
1640
|
+
) }) : t.isLoading ? /* @__PURE__ */ T(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
|
|
1641
|
+
/* @__PURE__ */ o(Je, { size: "x-small", renderTitle: i("itemsLoadingSpinnerLabel") }),
|
|
1643
1642
|
" ",
|
|
1644
|
-
/* @__PURE__ */ o(
|
|
1645
|
-
] }) : /* @__PURE__ */ _
|
|
1646
|
-
r ? /* @__PURE__ */
|
|
1643
|
+
/* @__PURE__ */ o(M, { size: "small", color: "secondary", children: i("itemsLoadingText") })
|
|
1644
|
+
] }) : /* @__PURE__ */ T(_, { as: "div", margin: "small 0 0 0", children: [
|
|
1645
|
+
r ? /* @__PURE__ */ T(M, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
|
|
1647
1646
|
"items source: ",
|
|
1648
1647
|
t.source,
|
|
1649
1648
|
" · loaded ",
|
|
@@ -1651,9 +1650,9 @@ function eo({
|
|
|
1651
1650
|
" of ",
|
|
1652
1651
|
e.itemCount
|
|
1653
1652
|
] }) : null,
|
|
1654
|
-
t.items.length === 0 ? /* @__PURE__ */ o(
|
|
1655
|
-
t.hasNextPage ? /* @__PURE__ */ o(
|
|
1656
|
-
|
|
1653
|
+
t.items.length === 0 ? /* @__PURE__ */ o(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ o(M, { size: "small", color: "secondary", children: i("noItemsEmptyState") }) }) : /* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((g) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(Kr, { item: g, today: n, navigation: s }) }, g.id)) }),
|
|
1654
|
+
t.hasNextPage ? /* @__PURE__ */ o(_, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ o(
|
|
1655
|
+
Z,
|
|
1657
1656
|
{
|
|
1658
1657
|
size: "small",
|
|
1659
1658
|
onClick: t.fetchNextPage,
|
|
@@ -1667,7 +1666,7 @@ function eo({
|
|
|
1667
1666
|
) }) : null
|
|
1668
1667
|
] });
|
|
1669
1668
|
}
|
|
1670
|
-
function
|
|
1669
|
+
function eo({
|
|
1671
1670
|
module: e,
|
|
1672
1671
|
expanded: t,
|
|
1673
1672
|
onToggle: n,
|
|
@@ -1679,9 +1678,9 @@ function to({
|
|
|
1679
1678
|
moduleLabel: c
|
|
1680
1679
|
}) {
|
|
1681
1680
|
var p;
|
|
1682
|
-
const { t: g, locale: l } =
|
|
1683
|
-
return /* @__PURE__ */
|
|
1684
|
-
|
|
1681
|
+
const { t: g, locale: l } = N(), m = ((p = e.progress) == null ? void 0 : p.status) === "locked", S = c === void 0 ? Cr(e.position, l) : c;
|
|
1682
|
+
return /* @__PURE__ */ T(
|
|
1683
|
+
_,
|
|
1685
1684
|
{
|
|
1686
1685
|
as: "div",
|
|
1687
1686
|
background: "primary",
|
|
@@ -1692,45 +1691,45 @@ function to({
|
|
|
1692
1691
|
margin: "0 0 small 0",
|
|
1693
1692
|
"data-testid": `module-card-${e.id}`,
|
|
1694
1693
|
children: [
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
|
|
1697
|
-
/* @__PURE__ */
|
|
1698
|
-
/* @__PURE__ */ _
|
|
1694
|
+
/* @__PURE__ */ T(P, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
|
|
1695
|
+
S !== null ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(Vr, { label: S, dimmed: m }) }) : null,
|
|
1696
|
+
/* @__PURE__ */ T(P.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1697
|
+
/* @__PURE__ */ T(_, { as: "div", children: [
|
|
1699
1698
|
/* @__PURE__ */ o(
|
|
1700
|
-
|
|
1699
|
+
He,
|
|
1701
1700
|
{
|
|
1702
1701
|
level: a,
|
|
1703
1702
|
themeOverride: { h2FontSize: "1.375rem", h3FontSize: "1.375rem" },
|
|
1704
1703
|
"data-testid": "module-name",
|
|
1705
|
-
children: /* @__PURE__ */ o(
|
|
1704
|
+
children: /* @__PURE__ */ o(M, { size: "large", weight: "bold", color: m ? "secondary" : "primary", children: e.name })
|
|
1706
1705
|
}
|
|
1707
1706
|
),
|
|
1708
|
-
e.published ? null : /* @__PURE__ */
|
|
1707
|
+
e.published ? null : /* @__PURE__ */ T(M, { size: "x-small", color: "secondary", children: [
|
|
1709
1708
|
" ",
|
|
1710
1709
|
g("moduleUnpublishedBadge")
|
|
1711
1710
|
] })
|
|
1712
1711
|
] }),
|
|
1713
|
-
/* @__PURE__ */ o(
|
|
1714
|
-
/* @__PURE__ */ o(
|
|
1712
|
+
/* @__PURE__ */ o(_, { as: "div", children: /* @__PURE__ */ o(Zr, { module: e, today: r }) }),
|
|
1713
|
+
/* @__PURE__ */ o(Xr, { module: e })
|
|
1715
1714
|
] }),
|
|
1716
|
-
e.progress ? /* @__PURE__ */ o(
|
|
1717
|
-
/* @__PURE__ */ o(
|
|
1718
|
-
|
|
1715
|
+
e.progress ? /* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(Gr, { status: e.progress.status }) }) : null,
|
|
1716
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(
|
|
1717
|
+
Rt,
|
|
1719
1718
|
{
|
|
1720
1719
|
size: "small",
|
|
1721
1720
|
withBorder: !0,
|
|
1722
1721
|
withBackground: !1,
|
|
1723
1722
|
screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
|
|
1724
1723
|
"aria-expanded": t,
|
|
1725
|
-
"aria-controls":
|
|
1724
|
+
"aria-controls": Fe(e.id),
|
|
1726
1725
|
onClick: () => n(e.id),
|
|
1727
1726
|
"data-testid": `toggle-module-${e.id}`,
|
|
1728
|
-
children: t ? /* @__PURE__ */ o(
|
|
1727
|
+
children: t ? /* @__PURE__ */ o(Qt, {}) : /* @__PURE__ */ o(Xe, {})
|
|
1729
1728
|
}
|
|
1730
1729
|
) })
|
|
1731
1730
|
] }),
|
|
1732
|
-
/* @__PURE__ */ o("div", { id:
|
|
1733
|
-
|
|
1731
|
+
/* @__PURE__ */ o("div", { id: Fe(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ o(
|
|
1732
|
+
Jr,
|
|
1734
1733
|
{
|
|
1735
1734
|
module: e,
|
|
1736
1735
|
state: s,
|
|
@@ -1743,15 +1742,15 @@ function to({
|
|
|
1743
1742
|
}
|
|
1744
1743
|
);
|
|
1745
1744
|
}
|
|
1746
|
-
const
|
|
1747
|
-
function
|
|
1745
|
+
const to = Ge(eo);
|
|
1746
|
+
function no({
|
|
1748
1747
|
counts: e,
|
|
1749
1748
|
itemsMode: t,
|
|
1750
1749
|
loadedModules: n
|
|
1751
1750
|
}) {
|
|
1752
1751
|
const s = e.listModules + e.listModuleItems;
|
|
1753
1752
|
return /* @__PURE__ */ o(
|
|
1754
|
-
|
|
1753
|
+
_,
|
|
1755
1754
|
{
|
|
1756
1755
|
as: "div",
|
|
1757
1756
|
background: "secondary",
|
|
@@ -1760,25 +1759,25 @@ function so({
|
|
|
1760
1759
|
padding: "x-small small",
|
|
1761
1760
|
margin: "0 0 small 0",
|
|
1762
1761
|
"data-testid": "dev-diagnostics",
|
|
1763
|
-
children: /* @__PURE__ */
|
|
1764
|
-
/* @__PURE__ */ o(
|
|
1765
|
-
/* @__PURE__ */ o(
|
|
1762
|
+
children: /* @__PURE__ */ T(P, { gap: "medium", wrap: "wrap", children: [
|
|
1763
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ o(M, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
|
|
1764
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "request-count-list-modules", children: [
|
|
1766
1765
|
"listModules: ",
|
|
1767
1766
|
e.listModules
|
|
1768
1767
|
] }) }),
|
|
1769
|
-
/* @__PURE__ */ o(
|
|
1768
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
|
|
1770
1769
|
"listModuleItems: ",
|
|
1771
1770
|
e.listModuleItems
|
|
1772
1771
|
] }) }),
|
|
1773
|
-
/* @__PURE__ */ o(
|
|
1772
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
|
|
1774
1773
|
"total: ",
|
|
1775
1774
|
s
|
|
1776
1775
|
] }) }),
|
|
1777
|
-
/* @__PURE__ */ o(
|
|
1776
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "resolved-items-mode", children: [
|
|
1778
1777
|
"itemsMode: ",
|
|
1779
1778
|
t ?? "probing…"
|
|
1780
1779
|
] }) }),
|
|
1781
|
-
/* @__PURE__ */ o(
|
|
1780
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(M, { size: "x-small", "data-testid": "modules-loaded-count", children: [
|
|
1782
1781
|
"modules loaded: ",
|
|
1783
1782
|
n
|
|
1784
1783
|
] }) })
|
|
@@ -1786,7 +1785,7 @@ function so({
|
|
|
1786
1785
|
}
|
|
1787
1786
|
);
|
|
1788
1787
|
}
|
|
1789
|
-
function
|
|
1788
|
+
function ri({
|
|
1790
1789
|
data: e,
|
|
1791
1790
|
courseName: t,
|
|
1792
1791
|
courseContext: n,
|
|
@@ -1801,106 +1800,97 @@ function oi({
|
|
|
1801
1800
|
const {
|
|
1802
1801
|
modules: l,
|
|
1803
1802
|
hasNextPage: m,
|
|
1804
|
-
fetchNextPage:
|
|
1803
|
+
fetchNextPage: S,
|
|
1805
1804
|
isFetchingNextPage: p,
|
|
1806
1805
|
isLoading: f,
|
|
1807
1806
|
error: h,
|
|
1808
|
-
itemsMode:
|
|
1809
|
-
expandedModuleIds:
|
|
1810
|
-
toggleModule:
|
|
1811
|
-
expandModule:
|
|
1812
|
-
collapseModule:
|
|
1813
|
-
getItems:
|
|
1814
|
-
} = e, { t: E, locale:
|
|
1815
|
-
|
|
1816
|
-
var
|
|
1817
|
-
!
|
|
1807
|
+
itemsMode: w,
|
|
1808
|
+
expandedModuleIds: x,
|
|
1809
|
+
toggleModule: L,
|
|
1810
|
+
expandModule: C,
|
|
1811
|
+
collapseModule: ne,
|
|
1812
|
+
getItems: se
|
|
1813
|
+
} = e, { t: E, locale: G } = N(), j = t ?? E("pageTitle"), [R, Y] = V(""), [D, F] = V(u), Q = q(null), re = Be(), k = q(!1), [oe] = V(() => /* @__PURE__ */ new Date()), W = s ?? oe;
|
|
1814
|
+
ce(() => {
|
|
1815
|
+
var I;
|
|
1816
|
+
!k.current || p || (k.current = !1, Ye(E("modulesLoadedAnnouncement", { count: l.length })), (I = Q.current) == null || I.focus());
|
|
1818
1817
|
}, [p, l.length, E]);
|
|
1819
|
-
const
|
|
1818
|
+
const z = v(
|
|
1820
1819
|
() => l.filter(
|
|
1821
|
-
(
|
|
1820
|
+
(I) => Fr(I, R, G) && Rr(I, D, W)
|
|
1822
1821
|
),
|
|
1823
|
-
[l,
|
|
1824
|
-
),
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
}, [l, q, O, F]), S = () => {
|
|
1834
|
-
for (const w of G) A(w.id);
|
|
1835
|
-
}, I = () => {
|
|
1836
|
-
for (const w of C) se(w);
|
|
1837
|
-
}, x = l.length > 0 && G.length === 0 && !f && !h;
|
|
1838
|
-
return /* @__PURE__ */ _(y, { as: c, display: "block", "data-testid": "modules-list", children: [
|
|
1839
|
-
n ? /* @__PURE__ */ _(y, { as: "div", children: [
|
|
1840
|
-
/* @__PURE__ */ o(b, { size: "small", color: "brand", children: n }),
|
|
1841
|
-
/* @__PURE__ */ _(b, { size: "small", color: "secondary", children: [
|
|
1822
|
+
[l, R, D, W, G]
|
|
1823
|
+
), ie = () => {
|
|
1824
|
+
for (const I of z) C(I.id);
|
|
1825
|
+
}, y = () => {
|
|
1826
|
+
for (const I of x) ne(I);
|
|
1827
|
+
}, b = l.length > 0 && z.length === 0 && !f && !h;
|
|
1828
|
+
return /* @__PURE__ */ T(_, { as: c, display: "block", "data-testid": "modules-list", children: [
|
|
1829
|
+
n ? /* @__PURE__ */ T(_, { as: "div", children: [
|
|
1830
|
+
/* @__PURE__ */ o(M, { size: "small", color: "brand", children: n }),
|
|
1831
|
+
/* @__PURE__ */ T(M, { size: "small", color: "secondary", children: [
|
|
1842
1832
|
" ",
|
|
1843
1833
|
"/",
|
|
1844
1834
|
" "
|
|
1845
1835
|
] }),
|
|
1846
|
-
/* @__PURE__ */ o(
|
|
1836
|
+
/* @__PURE__ */ o(M, { size: "small", color: "secondary", children: j })
|
|
1847
1837
|
] }) : null,
|
|
1848
|
-
/* @__PURE__ */ o(
|
|
1838
|
+
/* @__PURE__ */ o(He, { level: g, margin: "x-small 0 medium 0", children: j }),
|
|
1849
1839
|
r ? /* @__PURE__ */ o(
|
|
1850
|
-
|
|
1840
|
+
no,
|
|
1851
1841
|
{
|
|
1852
1842
|
counts: r,
|
|
1853
|
-
itemsMode:
|
|
1843
|
+
itemsMode: w,
|
|
1854
1844
|
loadedModules: l.length
|
|
1855
1845
|
}
|
|
1856
1846
|
) : null,
|
|
1857
|
-
/* @__PURE__ */
|
|
1858
|
-
/* @__PURE__ */ o(
|
|
1859
|
-
|
|
1847
|
+
/* @__PURE__ */ T(P, { gap: "small", wrap: "wrap", alignItems: "end", children: [
|
|
1848
|
+
/* @__PURE__ */ o(P.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ o(
|
|
1849
|
+
Xt,
|
|
1860
1850
|
{
|
|
1861
1851
|
renderLabel: E("moduleSearchLabel"),
|
|
1862
1852
|
placeholder: E("searchPlaceholder"),
|
|
1863
|
-
"aria-describedby":
|
|
1864
|
-
value:
|
|
1865
|
-
onChange: (
|
|
1866
|
-
renderBeforeInput: /* @__PURE__ */ o(
|
|
1853
|
+
"aria-describedby": re,
|
|
1854
|
+
value: R,
|
|
1855
|
+
onChange: (I, H) => Y(H),
|
|
1856
|
+
renderBeforeInput: /* @__PURE__ */ o(Wt, { inline: !1 }),
|
|
1867
1857
|
"data-testid": "modules-search"
|
|
1868
1858
|
}
|
|
1869
1859
|
) }),
|
|
1870
|
-
/* @__PURE__ */ o(
|
|
1871
|
-
/* @__PURE__ */ o(
|
|
1872
|
-
|
|
1860
|
+
/* @__PURE__ */ o(P.Item, { shouldGrow: !0 }),
|
|
1861
|
+
/* @__PURE__ */ o(P.Item, { children: /* @__PURE__ */ T(
|
|
1862
|
+
be,
|
|
1873
1863
|
{
|
|
1874
1864
|
placement: "bottom end",
|
|
1875
|
-
trigger: /* @__PURE__ */ o(
|
|
1865
|
+
trigger: /* @__PURE__ */ o(Z, { renderIcon: /* @__PURE__ */ o(Xe, {}), "data-testid": "expand-collapse-trigger", children: E("expandCollapseTrigger") }),
|
|
1876
1866
|
children: [
|
|
1877
|
-
/* @__PURE__ */ o(
|
|
1878
|
-
/* @__PURE__ */ o(
|
|
1867
|
+
/* @__PURE__ */ o(be.Item, { onSelect: ie, "data-testid": "expand-all", children: E("expandAll") }),
|
|
1868
|
+
/* @__PURE__ */ o(be.Item, { onSelect: y, "data-testid": "collapse-all", children: E("collapseAll") })
|
|
1879
1869
|
]
|
|
1880
1870
|
}
|
|
1881
1871
|
) })
|
|
1882
1872
|
] }),
|
|
1883
|
-
/* @__PURE__ */ o(
|
|
1884
|
-
/* @__PURE__ */ o(
|
|
1885
|
-
/* @__PURE__ */ _
|
|
1873
|
+
/* @__PURE__ */ o(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ o(M, { size: "x-small", color: "secondary", id: re, children: E("searchScopeHint") }) }),
|
|
1874
|
+
/* @__PURE__ */ o(zr, { value: D, onChange: F }),
|
|
1875
|
+
/* @__PURE__ */ T(_, { as: "div", margin: "medium 0 0 0", children: [
|
|
1886
1876
|
h ? (
|
|
1887
1877
|
// `liveRegion` is what makes this announce; without it InstUI's Alert
|
|
1888
1878
|
// sets no role and no aria-live. See the same fix in ModuleCard.
|
|
1889
1879
|
/* @__PURE__ */ o(
|
|
1890
|
-
|
|
1880
|
+
We,
|
|
1891
1881
|
{
|
|
1892
1882
|
variant: "error",
|
|
1893
1883
|
margin: "0 0 small 0",
|
|
1894
|
-
liveRegion:
|
|
1884
|
+
liveRegion: Qe,
|
|
1895
1885
|
liveRegionPoliteness: "assertive",
|
|
1896
1886
|
"data-testid": "modules-error",
|
|
1897
1887
|
children: E("modulesLoadErrorAlert", { message: h.message })
|
|
1898
1888
|
}
|
|
1899
1889
|
)
|
|
1900
1890
|
) : null,
|
|
1901
|
-
f ? /* @__PURE__ */ o(
|
|
1891
|
+
f ? /* @__PURE__ */ o(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ o(Je, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
|
|
1902
1892
|
!f && !h && l.length === 0 ? /* @__PURE__ */ o(
|
|
1903
|
-
|
|
1893
|
+
_,
|
|
1904
1894
|
{
|
|
1905
1895
|
as: "div",
|
|
1906
1896
|
background: "secondary",
|
|
@@ -1908,11 +1898,11 @@ function oi({
|
|
|
1908
1898
|
padding: "large",
|
|
1909
1899
|
textAlign: "center",
|
|
1910
1900
|
"data-testid": "modules-empty",
|
|
1911
|
-
children: /* @__PURE__ */ o(
|
|
1901
|
+
children: /* @__PURE__ */ o(M, { color: "secondary", children: E("noModulesEmptyState") })
|
|
1912
1902
|
}
|
|
1913
1903
|
) : null,
|
|
1914
|
-
|
|
1915
|
-
|
|
1904
|
+
b ? /* @__PURE__ */ T(
|
|
1905
|
+
_,
|
|
1916
1906
|
{
|
|
1917
1907
|
as: "div",
|
|
1918
1908
|
background: "secondary",
|
|
@@ -1921,13 +1911,13 @@ function oi({
|
|
|
1921
1911
|
textAlign: "center",
|
|
1922
1912
|
"data-testid": "modules-filtered-empty",
|
|
1923
1913
|
children: [
|
|
1924
|
-
/* @__PURE__ */ o(
|
|
1914
|
+
/* @__PURE__ */ o(_, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ o(M, { color: "secondary", children: E("filteredEmptyState", { count: l.length }) }) }),
|
|
1925
1915
|
/* @__PURE__ */ o(
|
|
1926
|
-
|
|
1916
|
+
Z,
|
|
1927
1917
|
{
|
|
1928
1918
|
size: "small",
|
|
1929
1919
|
onClick: () => {
|
|
1930
|
-
|
|
1920
|
+
F("all"), Y(""), k.current = !0;
|
|
1931
1921
|
},
|
|
1932
1922
|
children: E("clearFilters")
|
|
1933
1923
|
}
|
|
@@ -1935,39 +1925,39 @@ function oi({
|
|
|
1935
1925
|
]
|
|
1936
1926
|
}
|
|
1937
1927
|
) : null,
|
|
1938
|
-
/* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children:
|
|
1939
|
-
|
|
1928
|
+
/* @__PURE__ */ o("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: z.map((I) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(
|
|
1929
|
+
to,
|
|
1940
1930
|
{
|
|
1941
|
-
module:
|
|
1942
|
-
expanded:
|
|
1943
|
-
onToggle:
|
|
1944
|
-
itemsState:
|
|
1945
|
-
today:
|
|
1931
|
+
module: I,
|
|
1932
|
+
expanded: x.includes(I.id),
|
|
1933
|
+
onToggle: L,
|
|
1934
|
+
itemsState: se(I.id),
|
|
1935
|
+
today: W,
|
|
1946
1936
|
showDiagnostics: i,
|
|
1947
1937
|
navigation: a,
|
|
1948
1938
|
headingLevel: g === "h1" ? "h2" : "h3"
|
|
1949
1939
|
}
|
|
1950
|
-
) },
|
|
1940
|
+
) }, I.id)) })
|
|
1951
1941
|
] }),
|
|
1952
|
-
m ? /* @__PURE__ */ o(
|
|
1953
|
-
|
|
1942
|
+
m ? /* @__PURE__ */ o(_, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
|
|
1943
|
+
Z,
|
|
1954
1944
|
{
|
|
1955
1945
|
color: "primary",
|
|
1956
1946
|
onClick: () => {
|
|
1957
|
-
|
|
1947
|
+
k.current = !0, S();
|
|
1958
1948
|
},
|
|
1959
1949
|
interaction: p ? "disabled" : "enabled",
|
|
1960
1950
|
"data-testid": "load-more-modules",
|
|
1961
1951
|
children: p ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: l.length })
|
|
1962
1952
|
}
|
|
1963
|
-
) }) : l.length > 0 ? /* @__PURE__ */ o(
|
|
1964
|
-
|
|
1953
|
+
) }) : l.length > 0 ? /* @__PURE__ */ o(_, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ o(
|
|
1954
|
+
M,
|
|
1965
1955
|
{
|
|
1966
1956
|
size: "x-small",
|
|
1967
1957
|
color: "secondary",
|
|
1968
1958
|
"data-testid": "modules-all-loaded",
|
|
1969
|
-
elementRef: (
|
|
1970
|
-
|
|
1959
|
+
elementRef: (I) => {
|
|
1960
|
+
Q.current = I;
|
|
1971
1961
|
},
|
|
1972
1962
|
tabIndex: -1,
|
|
1973
1963
|
children: E("allModulesLoaded", { count: l.length })
|
|
@@ -1975,7 +1965,7 @@ function oi({
|
|
|
1975
1965
|
) }) : null
|
|
1976
1966
|
] });
|
|
1977
1967
|
}
|
|
1978
|
-
const
|
|
1968
|
+
const X = [
|
|
1979
1969
|
"assignment",
|
|
1980
1970
|
"quiz",
|
|
1981
1971
|
"discussion",
|
|
@@ -1984,24 +1974,24 @@ const J = [
|
|
|
1984
1974
|
"external_url",
|
|
1985
1975
|
"external_tool",
|
|
1986
1976
|
"sub_header"
|
|
1987
|
-
],
|
|
1977
|
+
], ye = [
|
|
1988
1978
|
"not_started",
|
|
1989
1979
|
"in_progress",
|
|
1990
1980
|
"all_submitted",
|
|
1991
1981
|
"all_graded",
|
|
1992
1982
|
"missing",
|
|
1993
1983
|
"locked"
|
|
1994
|
-
],
|
|
1984
|
+
], ze = [
|
|
1995
1985
|
"must_view",
|
|
1996
1986
|
"must_submit",
|
|
1997
1987
|
"must_contribute",
|
|
1998
1988
|
"must_mark_done",
|
|
1999
1989
|
"min_score",
|
|
2000
1990
|
"min_percentage"
|
|
2001
|
-
],
|
|
2002
|
-
const n =
|
|
1991
|
+
], so = ["assignment", "quiz", "discussion"], ro = ["external_url", "external_tool"], oo = ["assignment", "quiz", "discussion"], io = Date.UTC(2025, 0, 6), lo = 864e5, pe = "1", At = (e) => new Date(io + e * lo).toISOString(), ao = (e, t) => {
|
|
1992
|
+
const n = ze[Math.floor(t / 3) % ze.length];
|
|
2003
1993
|
return n === "min_score" ? { itemId: e, type: n, minScore: 10 } : n === "min_percentage" ? { itemId: e, type: n, minPercentage: 80 } : { itemId: e, type: n };
|
|
2004
|
-
},
|
|
1994
|
+
}, vt = (e, t) => t % 3 === 0 && e !== "sub_header", Nt = (e) => ye[(e - 1) % ye.length], uo = (e, t) => !oo.includes(e) || e === "discussion" && Math.floor(t / X.length) % 2 === 1 ? null : 5 + t % 4 * 5, co = (e, t, n, s) => {
|
|
2005
1995
|
const r = n ? "in_progress" : "not_started";
|
|
2006
1996
|
switch (e) {
|
|
2007
1997
|
case "locked":
|
|
@@ -2017,8 +2007,8 @@ const J = [
|
|
|
2017
2007
|
case "in_progress":
|
|
2018
2008
|
return t ? s % 3 === 0 ? "submitted" : s % 3 === 1 ? "in_progress" : "not_started" : s % 2 === 0 ? r : "not_started";
|
|
2019
2009
|
}
|
|
2020
|
-
},
|
|
2021
|
-
const u = String(e), a = String(e * 1e3 + t + 1), c =
|
|
2010
|
+
}, mo = (e) => e.status === "submitted" || e.status === "graded" || e.status === "in_progress" && e.pointsPossible == null, go = (e, t, n, s, r, i) => {
|
|
2011
|
+
const u = String(e), a = String(e * 1e3 + t + 1), c = X[n % X.length], g = c === "sub_header", l = so.includes(c) && (n % 4 === 0 || s === "missing"), m = vt(c, n) ? ao(a, n) : null;
|
|
2022
2012
|
return {
|
|
2023
2013
|
id: a,
|
|
2024
2014
|
moduleId: u,
|
|
@@ -2026,50 +2016,50 @@ const J = [
|
|
|
2026
2016
|
type: c,
|
|
2027
2017
|
position: t + 1,
|
|
2028
2018
|
indent: t % 5 === 4 ? 1 : 0,
|
|
2029
|
-
// 1 in 7 unpublished, so a teacher view always has something to
|
|
2019
|
+
// 1 in 7 unpublished, so a teacher view always has something to gray out.
|
|
2030
2020
|
// Same rule as the module: a student's page contains no unpublished items,
|
|
2031
|
-
// so only a teacher fixture
|
|
2021
|
+
// so only a teacher fixture grays any out.
|
|
2032
2022
|
published: i === "teacher" ? n % 7 !== 0 : !0,
|
|
2033
|
-
url: g ? null : `/courses/${
|
|
2034
|
-
newTab:
|
|
2023
|
+
url: g ? null : `/courses/${pe}/modules/items/${a}`,
|
|
2024
|
+
newTab: ro.includes(c) && n % 2 === 0,
|
|
2035
2025
|
completionRequirement: m,
|
|
2036
|
-
dueAt: l ?
|
|
2026
|
+
dueAt: l ? At(n % 90) : null,
|
|
2037
2027
|
status: s,
|
|
2038
2028
|
pointsPossible: r,
|
|
2039
2029
|
// Canvas Career only, so it rides in `extensions`. Sparse on purpose: a
|
|
2040
2030
|
// handful per fixture proves the escape hatch survives a round trip, and
|
|
2041
2031
|
// every other item must carry no `extensions` key at all.
|
|
2042
|
-
extensions:
|
|
2032
|
+
extensions: rt(
|
|
2043
2033
|
void 0,
|
|
2044
2034
|
n % 37 === 0 ? 5 + n % 4 * 10 : null
|
|
2045
2035
|
)
|
|
2046
2036
|
};
|
|
2047
|
-
},
|
|
2048
|
-
const r =
|
|
2037
|
+
}, fo = (e, t, n, s) => {
|
|
2038
|
+
const r = Nt(e), i = [];
|
|
2049
2039
|
let u = 0;
|
|
2050
2040
|
for (let a = 0; a < t; a += 1) {
|
|
2051
|
-
const c = n + a, g =
|
|
2052
|
-
i.push(
|
|
2041
|
+
const c = n + a, g = X[c % X.length], l = uo(g, c), m = l !== null, S = m ? u++ : a, p = co(r, m, vt(g, c), S);
|
|
2042
|
+
i.push(go(e, a, c, p, l, s));
|
|
2053
2043
|
}
|
|
2054
2044
|
return i;
|
|
2055
|
-
},
|
|
2056
|
-
const s =
|
|
2045
|
+
}, ho = (e, t, n) => {
|
|
2046
|
+
const s = Nt(e);
|
|
2057
2047
|
return s === "locked" || s === "not_started" ? s : t.length === 0 ? "not_started" : !t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 ? "in_progress" : s;
|
|
2058
|
-
},
|
|
2048
|
+
}, po = (e) => {
|
|
2059
2049
|
const t = e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort();
|
|
2060
2050
|
return t.length > 0 ? t[t.length - 1] : null;
|
|
2061
|
-
},
|
|
2062
|
-
const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(
|
|
2051
|
+
}, Io = (e, t, n) => {
|
|
2052
|
+
const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, i = Math.min(s.filter(mo).length, r), u = t.filter((c) => c.status === "missing").length;
|
|
2063
2053
|
return {
|
|
2064
|
-
status:
|
|
2054
|
+
status: ho(e, t, u),
|
|
2065
2055
|
requirementsMet: i,
|
|
2066
2056
|
requirementCount: r,
|
|
2067
2057
|
// Derived from the clamped pair, so the bar and the fraction always agree.
|
|
2068
2058
|
percentComplete: r > 0 ? Math.round(i / r * 100) : 0,
|
|
2069
|
-
latestDueAt:
|
|
2059
|
+
latestDueAt: po(t),
|
|
2070
2060
|
missingCount: u
|
|
2071
2061
|
};
|
|
2072
|
-
},
|
|
2062
|
+
}, bo = (e, t, n) => {
|
|
2073
2063
|
const s = e % 2 === 0 ? null : 1;
|
|
2074
2064
|
return {
|
|
2075
2065
|
id: String(e),
|
|
@@ -2078,17 +2068,17 @@ const J = [
|
|
|
2078
2068
|
// A student sees only published modules; publish state varies for a teacher.
|
|
2079
2069
|
published: n === "teacher" ? e % 4 !== 0 : !0,
|
|
2080
2070
|
itemCount: t.length,
|
|
2081
|
-
unlockAt: e % 5 === 0 ?
|
|
2071
|
+
unlockAt: e % 5 === 0 ? At(e) : null,
|
|
2082
2072
|
prerequisiteModuleIds: e > 1 && e % 3 === 0 ? [String(e - 1)] : [],
|
|
2083
2073
|
requirementCount: s,
|
|
2084
2074
|
requireSequentialProgress: e % 6 === 0,
|
|
2085
2075
|
completionRequirements: t.flatMap(
|
|
2086
2076
|
(r) => r.completionRequirement ? [r.completionRequirement] : []
|
|
2087
2077
|
),
|
|
2088
|
-
progress:
|
|
2078
|
+
progress: Io(e, t, s)
|
|
2089
2079
|
};
|
|
2090
2080
|
};
|
|
2091
|
-
function
|
|
2081
|
+
function Mo(e) {
|
|
2092
2082
|
return {
|
|
2093
2083
|
courseId: e.courseId,
|
|
2094
2084
|
modules: e.modules.map(({ progress: t, ...n }) => n),
|
|
@@ -2100,40 +2090,40 @@ function So(e) {
|
|
|
2100
2090
|
)
|
|
2101
2091
|
};
|
|
2102
2092
|
}
|
|
2103
|
-
function
|
|
2104
|
-
const n = t.view ?? "student", s = t.courseId ??
|
|
2093
|
+
function Ie(e, t = {}) {
|
|
2094
|
+
const n = t.view ?? "student", s = t.courseId ?? pe, r = [], i = {};
|
|
2105
2095
|
let u = 0;
|
|
2106
2096
|
e.forEach((c, g) => {
|
|
2107
|
-
const l = g + 1, m =
|
|
2108
|
-
u += c, r.push(
|
|
2097
|
+
const l = g + 1, m = fo(l, c, u, n);
|
|
2098
|
+
u += c, r.push(bo(l, m, n)), i[String(l)] = m;
|
|
2109
2099
|
});
|
|
2110
2100
|
const a = { courseId: s, modules: r, itemsByModuleId: i };
|
|
2111
|
-
return n === "teacher" ?
|
|
2101
|
+
return n === "teacher" ? Mo(a) : a;
|
|
2102
|
+
}
|
|
2103
|
+
const ue = (e) => `/courses/${pe}/modules/items/${e}`, So = ye.length, yo = 8, _o = 120, To = 25, Po = 250, Ue = 8;
|
|
2104
|
+
function oi() {
|
|
2105
|
+
return Ie(Array.from({ length: So }, () => yo));
|
|
2112
2106
|
}
|
|
2113
|
-
const ce = (e) => `/courses/${Ie}/modules/items/${e}`, yo = _e.length, _o = 8, To = 120, wo = 25, Po = 250, $e = 8;
|
|
2114
2107
|
function ii() {
|
|
2115
|
-
return
|
|
2108
|
+
return Ie(Array.from({ length: _o }, () => To));
|
|
2116
2109
|
}
|
|
2117
2110
|
function li() {
|
|
2118
|
-
return
|
|
2119
|
-
|
|
2120
|
-
function ai() {
|
|
2121
|
-
return be([
|
|
2122
|
-
$e,
|
|
2111
|
+
return Ie([
|
|
2112
|
+
Ue,
|
|
2123
2113
|
Po,
|
|
2124
|
-
|
|
2114
|
+
Ue
|
|
2125
2115
|
]);
|
|
2126
2116
|
}
|
|
2127
|
-
function
|
|
2128
|
-
return
|
|
2117
|
+
function ai() {
|
|
2118
|
+
return Ie([]);
|
|
2129
2119
|
}
|
|
2130
|
-
function
|
|
2120
|
+
function ui() {
|
|
2131
2121
|
const t = [
|
|
2132
|
-
{ title: "Reading: limits from the left and the right", type: "page", url:
|
|
2122
|
+
{ title: "Reading: limits from the left and the right", type: "page", url: ue(1) },
|
|
2133
2123
|
{
|
|
2134
2124
|
title: "Desmos: interactive limit explorer",
|
|
2135
2125
|
type: "external_url",
|
|
2136
|
-
url:
|
|
2126
|
+
url: ue(2),
|
|
2137
2127
|
newTab: !0
|
|
2138
2128
|
},
|
|
2139
2129
|
{ title: "Practice", type: "sub_header", url: null },
|
|
@@ -2141,9 +2131,9 @@ function ci() {
|
|
|
2141
2131
|
{
|
|
2142
2132
|
title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
|
|
2143
2133
|
type: "assignment",
|
|
2144
|
-
url:
|
|
2134
|
+
url: ue(5)
|
|
2145
2135
|
},
|
|
2146
|
-
{ title: "Unit test", type: "quiz", url:
|
|
2136
|
+
{ title: "Unit test", type: "quiz", url: ue(6), status: "locked" }
|
|
2147
2137
|
].map((n, s) => ({
|
|
2148
2138
|
id: String(s + 1),
|
|
2149
2139
|
moduleId: "1",
|
|
@@ -2155,7 +2145,7 @@ function ci() {
|
|
|
2155
2145
|
...n
|
|
2156
2146
|
}));
|
|
2157
2147
|
return {
|
|
2158
|
-
courseId:
|
|
2148
|
+
courseId: pe,
|
|
2159
2149
|
modules: [
|
|
2160
2150
|
{
|
|
2161
2151
|
id: "1",
|
|
@@ -2171,74 +2161,74 @@ function ci() {
|
|
|
2171
2161
|
};
|
|
2172
2162
|
}
|
|
2173
2163
|
export {
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2164
|
+
et as CompletionRequirementSchema,
|
|
2165
|
+
nn as CompletionRequirementTypeSchema,
|
|
2166
|
+
It as DEFAULT_INLINE_THRESHOLD,
|
|
2167
|
+
zn as DEFAULT_ITEM_CONCURRENCY,
|
|
2168
|
+
pt as DEFAULT_ITEM_PAGE_SIZE,
|
|
2169
|
+
te as DEFAULT_LOCALE,
|
|
2180
2170
|
Pe as DEFAULT_PAGE_SIZE,
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2171
|
+
bt as DEFAULT_RETAIN_COLLAPSED_LIMIT,
|
|
2172
|
+
he as DEFAULT_STALE_TIME_MS,
|
|
2173
|
+
st as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
|
|
2174
|
+
pe as FIXTURE_COURSE_ID,
|
|
2175
|
+
zr as FilterChips,
|
|
2176
|
+
Nn as GET_MODULES,
|
|
2177
|
+
Dn as GET_MODULE_ITEMS,
|
|
2178
|
+
Me as INLINE_ITEM_LIMIT,
|
|
2179
|
+
Te as INLINE_QUERY_NODE_BUDGET,
|
|
2180
|
+
un as InMemoryCourseMismatchError,
|
|
2181
|
+
Dr as MODULES_FILTER_IDS,
|
|
2182
|
+
to as ModuleCard,
|
|
2183
|
+
Kr as ModuleItemRow,
|
|
2184
|
+
tt as ModuleItemSchema,
|
|
2185
|
+
jr as ModuleItemStatusPill,
|
|
2186
|
+
en as ModuleItemStatusSchema,
|
|
2187
|
+
Jt as ModuleItemTypeSchema,
|
|
2188
|
+
ln as ModuleItemsPageSchema,
|
|
2189
|
+
Vr as ModuleNumberBadge,
|
|
2190
|
+
sn as ModuleProgressSchema,
|
|
2191
|
+
rn as ModuleSchema,
|
|
2192
|
+
Gr as ModuleStatusPill,
|
|
2193
|
+
tn as ModuleStatusSchema,
|
|
2194
|
+
Ho as ModulesConfigProvider,
|
|
2195
|
+
Rn as ModulesConfigSchema,
|
|
2196
|
+
si as ModulesI18nProvider,
|
|
2197
|
+
ri as ModulesList,
|
|
2198
|
+
on as ModulesPageSchema,
|
|
2199
|
+
nt as PageInfoSchema,
|
|
2200
|
+
ot as PartialCanvasResponseError,
|
|
2201
|
+
kn as RegistryEntrySchema,
|
|
2202
|
+
fe as baseModulesConfig,
|
|
2203
|
+
Ie as buildFixture,
|
|
2204
|
+
ai as courseEmpty,
|
|
2205
|
+
li as courseFatModule,
|
|
2206
|
+
ui as courseItemLinks,
|
|
2207
|
+
ii as courseLarge,
|
|
2208
|
+
oi as courseSmall,
|
|
2209
|
+
Wo as createCanvasGraphqlAdapter,
|
|
2220
2210
|
Qo as createInMemoryAdapter,
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2211
|
+
Pt as createTranslate,
|
|
2212
|
+
Tr as defaultTranslate,
|
|
2213
|
+
kr as filterLabel,
|
|
2214
|
+
an as getEstimatedDurationMinutes,
|
|
2215
|
+
ni as invalidateCourse,
|
|
2216
|
+
ei as invalidateModuleItems,
|
|
2217
|
+
ti as invalidateModuleList,
|
|
2218
|
+
O as mergeRegistry,
|
|
2219
|
+
Br as moduleItemStatusLabel,
|
|
2220
|
+
Mt as moduleItemsPrefix,
|
|
2221
|
+
$r as moduleStatusLabel,
|
|
2222
|
+
ee as modulesKeys,
|
|
2223
|
+
Un as modulesListPrefix,
|
|
2224
|
+
Zo as partialModulesConfig,
|
|
2225
|
+
qn as registrySchema,
|
|
2226
|
+
Fn as resolveModulesConfig,
|
|
2227
|
+
Xo as useModuleItems,
|
|
2228
|
+
On as useModules,
|
|
2229
|
+
Ko as useModulesConfig,
|
|
2230
|
+
N as useModulesI18n,
|
|
2231
|
+
Jo as useModulesPageData,
|
|
2232
|
+
Vo as visibleEntries,
|
|
2233
|
+
rt as withEstimatedDurationMinutes
|
|
2244
2234
|
};
|