@instructure/platform-modules 1.1.0 → 1.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/dist/adapters/canvasGraphql/index.d.ts +4 -1
- package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/normalize.d.ts +10 -10
- package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleCard.stories.d.ts +10 -2
- package/dist/components/ModuleCard.stories.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +7 -1
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +5 -2
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/StatusPill.d.ts.map +1 -1
- package/dist/components/index.d.ts +1 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/labels.d.ts +1 -2
- package/dist/components/labels.d.ts.map +1 -1
- package/dist/components/storyThemes.d.ts +8 -0
- package/dist/components/storyThemes.d.ts.map +1 -0
- package/dist/config/filters.d.ts +1 -1
- package/dist/config/filters.d.ts.map +1 -1
- package/dist/config/useFormatters.d.ts +1 -0
- package/dist/config/useFormatters.d.ts.map +1 -1
- package/dist/fixtures/generate.d.ts.map +1 -1
- package/dist/fixtures/scenarios.d.ts.map +1 -1
- package/dist/hooks/useModulesPageData.d.ts +2 -0
- package/dist/hooks/useModulesPageData.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1219 -1202
- package/dist/types/domain.d.ts +3 -1
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/types/enums.d.ts +1 -3
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/locales/en.json +7 -8
- package/package.json +4 -2
- package/dist/components/ModuleNumberBadge.d.ts +0 -7
- package/dist/components/ModuleNumberBadge.d.ts.map +0 -1
- package/dist/components/lightThemeDecorator.d.ts +0 -3
- package/dist/components/lightThemeDecorator.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
import { gql as
|
|
3
|
-
import { jsx as i, jsxs as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { PlugInstUIIcon as
|
|
6
|
-
import { useInfiniteQuery as
|
|
7
|
-
import
|
|
8
|
-
import { Button as
|
|
9
|
-
import { Flex as
|
|
1
|
+
import { z as d } from "zod";
|
|
2
|
+
import { gql as Me } from "graphql-tag";
|
|
3
|
+
import { jsx as i, jsxs as S, Fragment as it } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as Pt, useContext as Ct, useMemo as N, isValidElement as wt, useCallback as F, useRef as $, useState as Le, useEffect as Ie, useId as vt, memo as Lt, Fragment as At } from "react";
|
|
5
|
+
import { PlugInstUIIcon as Pn, ExternalLinkInstUIIcon as Cn, FileInstUIIcon as wn, FileTextInstUIIcon as vn, MessagesSquareInstUIIcon as Ln, RocketInstUIIcon as An, FilePenLineInstUIIcon as Rn, LockInstUIIcon as Rt, TriangleAlertInstUIIcon as ge, CircleCheckInstUIIcon as xt, ClockFadingInstUIIcon as Nt, CornerDownRightInstUIIcon as xn, IconArrowOpenUpLine as Nn, IconArrowOpenDownLine as qt } from "@instructure/ui-icons";
|
|
6
|
+
import { useInfiniteQuery as Ke, useQueryClient as kt, InfiniteQueryObserver as qn } from "@tanstack/react-query";
|
|
7
|
+
import kn from "p-limit";
|
|
8
|
+
import { Button as he, IconButton as Dn } from "@instructure/ui-buttons/v11_7";
|
|
9
|
+
import { Flex as T } from "@instructure/ui-flex/v11_7";
|
|
10
10
|
import { Text as P } from "@instructure/ui-text/v11_7";
|
|
11
11
|
import { View as E } from "@instructure/ui-view/v11_7";
|
|
12
|
-
import { TruncateWithTooltip as
|
|
13
|
-
import { Alert as
|
|
14
|
-
import { Heading as
|
|
15
|
-
import { ProgressBar as
|
|
16
|
-
import { Spinner as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
12
|
+
import { TruncateWithTooltip as On, politeAnnounce as Dt, getLiveRegion as Ot } from "@instructure/platform-instui-bindings";
|
|
13
|
+
import { Alert as Ft } from "@instructure/ui-alerts/v11_7";
|
|
14
|
+
import { Heading as Ut } from "@instructure/ui-heading/v11_7";
|
|
15
|
+
import { ProgressBar as Fn } from "@instructure/ui-progress/v11_7";
|
|
16
|
+
import { Spinner as zt } from "@instructure/ui-spinner/v11_7";
|
|
17
|
+
import { Tooltip as Un } from "@instructure/ui-tooltip/v11_7";
|
|
18
|
+
import { useTheme as $t } from "@instructure/emotion";
|
|
19
|
+
import { ScreenReaderContent as lt } from "@instructure/ui-a11y-content";
|
|
20
|
+
import { Link as zn } from "@instructure/ui-link/v11_7";
|
|
21
|
+
import { Pill as $n } from "@instructure/ui-pill/v11_7";
|
|
22
|
+
import { WithBreakpoints as Bn } from "@instructure/platform-with-breakpoints";
|
|
22
23
|
import { Menu as $e } from "@instructure/ui-menu/v11_7";
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
value: c.union([c.string(), c.boolean()])
|
|
24
|
+
const jn = d.object({
|
|
25
|
+
target: d.enum(["module", "item"]),
|
|
26
|
+
field: d.string(),
|
|
27
|
+
op: d.enum(["eq", "contains"]),
|
|
28
|
+
value: d.union([d.string(), d.boolean()])
|
|
29
29
|
}).strict();
|
|
30
|
-
function
|
|
30
|
+
function Gn(e, t) {
|
|
31
31
|
const n = e == null ? void 0 : e[t.target];
|
|
32
32
|
return !n || !Object.prototype.hasOwnProperty.call(n, t.field) ? !1 : n[t.field].includes(t.op);
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const Yn = d.enum([
|
|
35
35
|
"assignment",
|
|
36
36
|
"quiz",
|
|
37
37
|
"discussion",
|
|
@@ -40,16 +40,7 @@ const qn = c.enum([
|
|
|
40
40
|
"external_url",
|
|
41
41
|
"external_tool",
|
|
42
42
|
"sub_header"
|
|
43
|
-
]),
|
|
44
|
-
"not_started",
|
|
45
|
-
"in_progress",
|
|
46
|
-
"complete",
|
|
47
|
-
"submitted",
|
|
48
|
-
"graded",
|
|
49
|
-
"excused",
|
|
50
|
-
"missing",
|
|
51
|
-
"locked"
|
|
52
|
-
]), On = c.enum([
|
|
43
|
+
]), Wn = d.enum(["not_started", "in_progress", "complete", "incomplete", "missing", "locked"]), Qn = d.enum([
|
|
53
44
|
"not_started",
|
|
54
45
|
"in_progress",
|
|
55
46
|
"complete",
|
|
@@ -57,7 +48,7 @@ const qn = c.enum([
|
|
|
57
48
|
"incomplete",
|
|
58
49
|
"missing_and_incomplete",
|
|
59
50
|
"locked"
|
|
60
|
-
]),
|
|
51
|
+
]), Hn = d.enum([
|
|
61
52
|
"must_view",
|
|
62
53
|
"must_mark_done",
|
|
63
54
|
"must_contribute",
|
|
@@ -65,96 +56,97 @@ const qn = c.enum([
|
|
|
65
56
|
"min_score",
|
|
66
57
|
"min_percentage",
|
|
67
58
|
"unknown"
|
|
68
|
-
]),
|
|
69
|
-
status:
|
|
70
|
-
requirementsMet:
|
|
71
|
-
requirementCount:
|
|
72
|
-
percentComplete:
|
|
73
|
-
|
|
74
|
-
missingCount:
|
|
75
|
-
incompleteCount:
|
|
76
|
-
}),
|
|
77
|
-
itemId:
|
|
78
|
-
type:
|
|
79
|
-
minScore:
|
|
80
|
-
minPercentage:
|
|
81
|
-
}),
|
|
82
|
-
id:
|
|
83
|
-
moduleId:
|
|
84
|
-
title:
|
|
85
|
-
type:
|
|
86
|
-
position:
|
|
87
|
-
indent:
|
|
88
|
-
published:
|
|
89
|
-
url:
|
|
90
|
-
newTab:
|
|
91
|
-
completionRequirement:
|
|
92
|
-
dueAt:
|
|
93
|
-
status:
|
|
94
|
-
pointsPossible:
|
|
95
|
-
extensions:
|
|
96
|
-
}),
|
|
97
|
-
id:
|
|
98
|
-
name:
|
|
99
|
-
}),
|
|
100
|
-
id:
|
|
101
|
-
name:
|
|
102
|
-
position:
|
|
103
|
-
published:
|
|
104
|
-
itemCount:
|
|
105
|
-
items:
|
|
106
|
-
unlockAt:
|
|
107
|
-
prerequisiteModules:
|
|
108
|
-
requirementCount:
|
|
109
|
-
requireSequentialProgress:
|
|
110
|
-
completionRequirements:
|
|
111
|
-
progress:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
59
|
+
]), Vn = d.object({
|
|
60
|
+
status: Qn.optional(),
|
|
61
|
+
requirementsMet: d.number(),
|
|
62
|
+
requirementCount: d.number(),
|
|
63
|
+
percentComplete: d.number().min(0).max(100),
|
|
64
|
+
nextDueAt: d.string().nullish(),
|
|
65
|
+
missingCount: d.number(),
|
|
66
|
+
incompleteCount: d.number()
|
|
67
|
+
}), Bt = d.object({
|
|
68
|
+
itemId: d.string(),
|
|
69
|
+
type: Hn,
|
|
70
|
+
minScore: d.number().nullish(),
|
|
71
|
+
minPercentage: d.number().nullish()
|
|
72
|
+
}), jt = d.object({
|
|
73
|
+
id: d.string(),
|
|
74
|
+
moduleId: d.string(),
|
|
75
|
+
title: d.string(),
|
|
76
|
+
type: Yn,
|
|
77
|
+
position: d.number(),
|
|
78
|
+
indent: d.number(),
|
|
79
|
+
published: d.boolean(),
|
|
80
|
+
url: d.string().nullish(),
|
|
81
|
+
newTab: d.boolean().nullish(),
|
|
82
|
+
completionRequirement: Bt.nullish(),
|
|
83
|
+
dueAt: d.string().nullish(),
|
|
84
|
+
status: Wn.optional(),
|
|
85
|
+
pointsPossible: d.number().nullish(),
|
|
86
|
+
extensions: d.record(d.unknown()).optional()
|
|
87
|
+
}), Kn = d.object({
|
|
88
|
+
id: d.string(),
|
|
89
|
+
name: d.string()
|
|
90
|
+
}), Zn = d.object({
|
|
91
|
+
id: d.string(),
|
|
92
|
+
name: d.string(),
|
|
93
|
+
position: d.number(),
|
|
94
|
+
published: d.boolean(),
|
|
95
|
+
itemCount: d.number(),
|
|
96
|
+
items: d.array(jt).optional(),
|
|
97
|
+
unlockAt: d.string().nullish(),
|
|
98
|
+
prerequisiteModules: d.array(Kn),
|
|
99
|
+
requirementCount: d.number().nullish(),
|
|
100
|
+
requireSequentialProgress: d.boolean(),
|
|
101
|
+
completionRequirements: d.array(Bt).optional(),
|
|
102
|
+
progress: Vn.optional(),
|
|
103
|
+
collapsed: d.boolean().nullish(),
|
|
104
|
+
extensions: d.record(d.unknown()).optional()
|
|
105
|
+
}), Gt = d.object({
|
|
106
|
+
hasNextPage: d.boolean(),
|
|
107
|
+
endCursor: d.string().nullable()
|
|
116
108
|
}).refine((e) => !e.hasNextPage || e.endCursor !== null, {
|
|
117
109
|
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.',
|
|
118
110
|
path: ["endCursor"]
|
|
119
|
-
}),
|
|
120
|
-
modules:
|
|
121
|
-
pageInfo:
|
|
122
|
-
}),
|
|
123
|
-
items:
|
|
124
|
-
pageInfo:
|
|
125
|
-
}),
|
|
126
|
-
function
|
|
111
|
+
}), Xn = d.object({
|
|
112
|
+
modules: d.array(Zn),
|
|
113
|
+
pageInfo: Gt
|
|
114
|
+
}), Jn = d.object({
|
|
115
|
+
items: d.array(jt),
|
|
116
|
+
pageInfo: Gt
|
|
117
|
+
}), Yt = "career.estimatedDurationMinutes";
|
|
118
|
+
function eo(e) {
|
|
127
119
|
var n;
|
|
128
|
-
const t = (n = e.extensions) == null ? void 0 : n[
|
|
120
|
+
const t = (n = e.extensions) == null ? void 0 : n[Yt];
|
|
129
121
|
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
|
|
130
122
|
}
|
|
131
|
-
function
|
|
132
|
-
return t == null ? e : { ...e, [
|
|
123
|
+
function Ze(e, t) {
|
|
124
|
+
return t == null ? e : { ...e, [Yt]: t };
|
|
133
125
|
}
|
|
134
|
-
const Ge = 100,
|
|
135
|
-
class
|
|
126
|
+
const Ge = 100, Xe = 2e3;
|
|
127
|
+
class to extends Error {
|
|
136
128
|
constructor(t, n) {
|
|
137
129
|
super(
|
|
138
130
|
`This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
|
|
139
131
|
), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
|
|
140
132
|
}
|
|
141
133
|
}
|
|
142
|
-
const
|
|
134
|
+
const no = (e) => `offset:${e}`, oo = (e) => {
|
|
143
135
|
if (!e) return 0;
|
|
144
136
|
const t = Number.parseInt(e.replace("offset:", ""), 10);
|
|
145
137
|
return Number.isFinite(t) && t >= 0 ? t : 0;
|
|
146
|
-
},
|
|
138
|
+
}, at = (e) => {
|
|
147
139
|
if (e != null && e.aborted)
|
|
148
140
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
149
141
|
};
|
|
150
|
-
function
|
|
151
|
-
const o =
|
|
142
|
+
function ut(e, t, n) {
|
|
143
|
+
const o = oo(t), r = e.slice(o, o + n), s = o + r.length, l = s < e.length;
|
|
152
144
|
return {
|
|
153
145
|
slice: r,
|
|
154
|
-
pageInfo: { hasNextPage: l, endCursor: l ?
|
|
146
|
+
pageInfo: { hasNextPage: l, endCursor: l ? no(s) : null }
|
|
155
147
|
};
|
|
156
148
|
}
|
|
157
|
-
const
|
|
149
|
+
const ro = /* @__PURE__ */ new Map([
|
|
158
150
|
["COMPLETED", (e) => {
|
|
159
151
|
var t;
|
|
160
152
|
return ((t = e.progress) == null ? void 0 : t.status) === "complete";
|
|
@@ -174,55 +166,55 @@ const Hn = /* @__PURE__ */ new Map([
|
|
|
174
166
|
return ((t = e.progress) == null ? void 0 : t.status) !== "complete" && ((n = e.progress) == null ? void 0 : n.status) !== "in_progress";
|
|
175
167
|
}
|
|
176
168
|
]
|
|
177
|
-
]),
|
|
178
|
-
function
|
|
169
|
+
]), so = { module: { completionStatus: ["eq"] } };
|
|
170
|
+
function io(e) {
|
|
179
171
|
if (e.target !== "module" || e.field !== "completionStatus" || e.op !== "eq")
|
|
180
172
|
throw new Error(
|
|
181
173
|
`in-memory adapter cannot compile ${e.target}.${e.field} ${e.op}`
|
|
182
174
|
);
|
|
183
|
-
const t = typeof e.value == "string" ?
|
|
175
|
+
const t = typeof e.value == "string" ? ro.get(e.value) : void 0;
|
|
184
176
|
if (!t) throw new Error(`unknown completionStatus "${String(e.value)}"`);
|
|
185
177
|
return t;
|
|
186
178
|
}
|
|
187
|
-
function
|
|
179
|
+
function xl(e, t = {}) {
|
|
188
180
|
const n = (r) => e.itemsByModuleId[r] ?? [], o = (r) => {
|
|
189
181
|
if (r !== e.courseId)
|
|
190
|
-
throw new
|
|
182
|
+
throw new to(e.courseId, r);
|
|
191
183
|
};
|
|
192
184
|
return {
|
|
193
|
-
capabilities:
|
|
185
|
+
capabilities: so,
|
|
194
186
|
async listModules({
|
|
195
187
|
courseId: r,
|
|
196
188
|
cursor: s,
|
|
197
189
|
pageSize: l,
|
|
198
190
|
includeItems: a,
|
|
199
|
-
filter:
|
|
200
|
-
inlineItemsFirst:
|
|
191
|
+
filter: m,
|
|
192
|
+
inlineItemsFirst: c,
|
|
201
193
|
signal: u
|
|
202
194
|
}) {
|
|
203
|
-
var
|
|
204
|
-
|
|
205
|
-
const p =
|
|
206
|
-
return { modules: f.map((
|
|
207
|
-
const
|
|
208
|
-
return { ...
|
|
209
|
-
}), pageInfo:
|
|
195
|
+
var _;
|
|
196
|
+
at(u), o(r), (_ = t.onRequest) == null || _.call(t, "listModules", { operation: "listModules", courseId: r });
|
|
197
|
+
const p = m ? e.modules.filter(io(m)) : e.modules, { slice: f, pageInfo: y } = ut(p, s, l), g = Math.min(c ?? Ge, Ge);
|
|
198
|
+
return { modules: f.map((C) => {
|
|
199
|
+
const b = n(C.id), w = a && b.length <= g;
|
|
200
|
+
return { ...C, itemCount: b.length, items: w ? b : void 0 };
|
|
201
|
+
}), pageInfo: y };
|
|
210
202
|
},
|
|
211
203
|
async listModuleItems({
|
|
212
204
|
courseId: r,
|
|
213
205
|
moduleId: s,
|
|
214
206
|
cursor: l,
|
|
215
207
|
pageSize: a,
|
|
216
|
-
signal:
|
|
208
|
+
signal: m
|
|
217
209
|
}) {
|
|
218
210
|
var p;
|
|
219
|
-
|
|
220
|
-
const { slice:
|
|
221
|
-
return { items:
|
|
211
|
+
at(m), o(r), (p = t.onRequest) == null || p.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: s });
|
|
212
|
+
const { slice: c, pageInfo: u } = ut(n(s), l, a);
|
|
213
|
+
return { items: c, pageInfo: u };
|
|
222
214
|
}
|
|
223
215
|
};
|
|
224
216
|
}
|
|
225
|
-
class
|
|
217
|
+
class Wt extends Error {
|
|
226
218
|
constructor(t, n, o) {
|
|
227
219
|
const r = t === "module" ? "module" : "module item";
|
|
228
220
|
super(
|
|
@@ -230,11 +222,11 @@ class zt extends Error {
|
|
|
230
222
|
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = o;
|
|
231
223
|
}
|
|
232
224
|
}
|
|
233
|
-
function
|
|
225
|
+
function Qt(e, t, n) {
|
|
234
226
|
if (e != null) return e;
|
|
235
|
-
throw new
|
|
227
|
+
throw new Wt(t, n, "published");
|
|
236
228
|
}
|
|
237
|
-
function
|
|
229
|
+
function lo(e, t) {
|
|
238
230
|
if (e.onUnsupportedItem) {
|
|
239
231
|
e.onUnsupportedItem(t);
|
|
240
232
|
return;
|
|
@@ -243,7 +235,7 @@ function Zn(e, t) {
|
|
|
243
235
|
`[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
|
|
244
236
|
);
|
|
245
237
|
}
|
|
246
|
-
const
|
|
238
|
+
const ao = {
|
|
247
239
|
Assignment: "assignment",
|
|
248
240
|
Quiz: "quiz",
|
|
249
241
|
Discussion: "discussion",
|
|
@@ -255,21 +247,21 @@ const Xn = {
|
|
|
255
247
|
SubHeader: "sub_header",
|
|
256
248
|
PeerReviewSubAssignment: "assignment"
|
|
257
249
|
};
|
|
258
|
-
function
|
|
250
|
+
function uo(e) {
|
|
259
251
|
const t = e == null ? void 0 : e.__typename;
|
|
260
252
|
if (!t) return null;
|
|
261
|
-
const n =
|
|
253
|
+
const n = ao[t];
|
|
262
254
|
return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
|
|
263
255
|
}
|
|
264
|
-
const
|
|
265
|
-
function
|
|
256
|
+
const co = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
|
|
257
|
+
function mo(e) {
|
|
266
258
|
if (!e) return null;
|
|
267
|
-
const t =
|
|
259
|
+
const t = co.exec(e);
|
|
268
260
|
if (!t) return null;
|
|
269
261
|
const [, n, o, r, s, l] = t, a = Number(n ?? 0) * 7 * 24 * 60 + Number(o ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(s ?? 0) + Number(l ?? 0) / 60;
|
|
270
262
|
return Math.round(a);
|
|
271
263
|
}
|
|
272
|
-
const
|
|
264
|
+
const po = /* @__PURE__ */ new Set([
|
|
273
265
|
"must_view",
|
|
274
266
|
"must_mark_done",
|
|
275
267
|
"must_contribute",
|
|
@@ -277,43 +269,42 @@ const no = /* @__PURE__ */ new Set([
|
|
|
277
269
|
"min_score",
|
|
278
270
|
"min_percentage"
|
|
279
271
|
]);
|
|
280
|
-
function
|
|
281
|
-
return
|
|
272
|
+
function fo(e) {
|
|
273
|
+
return po.has(e) ? e : "unknown";
|
|
282
274
|
}
|
|
283
|
-
function
|
|
275
|
+
function go(e) {
|
|
284
276
|
return {
|
|
285
277
|
itemId: String(e.id),
|
|
286
|
-
type:
|
|
278
|
+
type: fo(e.type),
|
|
287
279
|
minScore: e.minScore ?? null,
|
|
288
280
|
minPercentage: e.minPercentage ?? null
|
|
289
281
|
};
|
|
290
282
|
}
|
|
291
|
-
function
|
|
283
|
+
function Ht(e) {
|
|
292
284
|
return {
|
|
293
285
|
hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
|
|
294
286
|
endCursor: (e == null ? void 0 : e.endCursor) ?? null
|
|
295
287
|
};
|
|
296
288
|
}
|
|
297
|
-
const
|
|
298
|
-
function
|
|
289
|
+
const ho = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
|
|
290
|
+
function Io(e) {
|
|
299
291
|
var t;
|
|
300
292
|
for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
|
|
301
293
|
if (n) return n;
|
|
302
294
|
return null;
|
|
303
295
|
}
|
|
304
|
-
function
|
|
296
|
+
function Vt(e, t) {
|
|
305
297
|
if (!e) return;
|
|
306
|
-
const n = new Map(t.map((s) => [s.itemId, s.type])), o = /* @__PURE__ */ new Set();
|
|
298
|
+
const n = new Map(t.map((s) => [s.itemId, s.type])), o = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
|
|
307
299
|
for (const s of e.requirementsMet ?? []) {
|
|
308
300
|
if (!s) continue;
|
|
309
301
|
const l = String(s.id);
|
|
310
302
|
n.get(l) === s.type && o.add(l);
|
|
311
303
|
}
|
|
312
|
-
const r = /* @__PURE__ */ new Set();
|
|
313
304
|
for (const s of e.incompleteRequirements ?? []) {
|
|
314
|
-
if (!s
|
|
305
|
+
if (!s) continue;
|
|
315
306
|
const l = String(s.id);
|
|
316
|
-
n.get(l) === s.type && r.
|
|
307
|
+
n.get(l) === s.type && ho.has(s.type) && r.set(l, s.score ?? null);
|
|
317
308
|
}
|
|
318
309
|
return {
|
|
319
310
|
locked: e.locked === !0 || e.workflowState === "locked",
|
|
@@ -321,24 +312,22 @@ function Gt(e, t) {
|
|
|
321
312
|
completed: e.completed === !0 || e.workflowState === "completed",
|
|
322
313
|
started: e.started === !0 || e.workflowState === "started",
|
|
323
314
|
requirementsMetItemIds: o,
|
|
324
|
-
|
|
315
|
+
incompleteRequirementScores: r
|
|
325
316
|
};
|
|
326
317
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
}
|
|
339
|
-
return n.requirementsMetItemIds.has(t) ? o ? "complete" : "in_progress" : "not_started";
|
|
318
|
+
const bo = {
|
|
319
|
+
LOCKED: "locked",
|
|
320
|
+
MISSING: "missing",
|
|
321
|
+
INCOMPLETE: "incomplete",
|
|
322
|
+
COMPLETE: "complete",
|
|
323
|
+
IN_PROGRESS: "in_progress",
|
|
324
|
+
NOT_STARTED: "not_started"
|
|
325
|
+
};
|
|
326
|
+
function Mo(e) {
|
|
327
|
+
if (e != null)
|
|
328
|
+
return bo[e];
|
|
340
329
|
}
|
|
341
|
-
const
|
|
330
|
+
const yo = {
|
|
342
331
|
LOCKED: "locked",
|
|
343
332
|
MISSING: "missing",
|
|
344
333
|
MISSING_AND_INCOMPLETE: "missing_and_incomplete",
|
|
@@ -347,30 +336,32 @@ const uo = {
|
|
|
347
336
|
IN_PROGRESS: "in_progress",
|
|
348
337
|
NOT_STARTED: "not_started"
|
|
349
338
|
};
|
|
350
|
-
function
|
|
339
|
+
function So(e) {
|
|
351
340
|
if (e != null)
|
|
352
|
-
return
|
|
341
|
+
return yo[e];
|
|
353
342
|
}
|
|
354
|
-
function
|
|
355
|
-
var a,
|
|
343
|
+
function _o(e, t, n) {
|
|
344
|
+
var a, m;
|
|
356
345
|
if (!n) return;
|
|
357
|
-
const o = e.requirementCount ?? t.length, r = Math.min(n.requirementsMetItemIds.size, o), s = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, l = n.
|
|
346
|
+
const o = e.requirementCount ?? t.length, r = Math.min(n.requirementsMetItemIds.size, o), s = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, l = [...n.incompleteRequirementScores.values()].filter(
|
|
347
|
+
(c) => c != null
|
|
348
|
+
).length;
|
|
358
349
|
return {
|
|
359
|
-
status:
|
|
350
|
+
status: So(e.moduleStatus) ?? (n.locked ? "locked" : void 0),
|
|
360
351
|
requirementsMet: r,
|
|
361
352
|
requirementCount: o,
|
|
362
353
|
percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
|
|
363
|
-
|
|
354
|
+
nextDueAt: ((m = e.submissionStatistics) == null ? void 0 : m.nextDueAt) ?? null,
|
|
364
355
|
missingCount: s,
|
|
365
356
|
incompleteCount: l
|
|
366
357
|
};
|
|
367
358
|
}
|
|
368
|
-
function
|
|
369
|
-
var
|
|
370
|
-
const s = String(e._id), l =
|
|
359
|
+
function To(e, t, n, o = {}, r) {
|
|
360
|
+
var c, u, p;
|
|
361
|
+
const s = String(e._id), l = uo(e.content);
|
|
371
362
|
if (!l)
|
|
372
|
-
return
|
|
373
|
-
const a =
|
|
363
|
+
return lo(o, { id: s, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
|
|
364
|
+
const a = Io(e.content), m = n.get(s) ?? null;
|
|
374
365
|
return {
|
|
375
366
|
id: s,
|
|
376
367
|
moduleId: t,
|
|
@@ -378,24 +369,24 @@ function po(e, t, n, o = {}, r) {
|
|
|
378
369
|
type: l,
|
|
379
370
|
position: e.position ?? 0,
|
|
380
371
|
indent: e.indent ?? 0,
|
|
381
|
-
published:
|
|
372
|
+
published: Qt(e.published, "moduleItem", s),
|
|
382
373
|
url: e.url ?? null,
|
|
383
374
|
newTab: e.newTab ?? !1,
|
|
384
|
-
completionRequirement:
|
|
385
|
-
dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((
|
|
386
|
-
status: r ?
|
|
387
|
-
pointsPossible: ((
|
|
388
|
-
extensions:
|
|
375
|
+
completionRequirement: m,
|
|
376
|
+
dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((u = e.content) == null ? void 0 : u.dueAt) ?? null,
|
|
377
|
+
status: r ? Mo(e.moduleItemStatus) ?? (r.locked ? "locked" : void 0) : void 0,
|
|
378
|
+
pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
|
|
379
|
+
extensions: Ze(
|
|
389
380
|
void 0,
|
|
390
|
-
|
|
381
|
+
mo(e.estimatedDuration)
|
|
391
382
|
)
|
|
392
383
|
};
|
|
393
384
|
}
|
|
394
|
-
function
|
|
385
|
+
function Kt(e, t, n, o, r) {
|
|
395
386
|
const s = [];
|
|
396
387
|
for (const l of e ?? []) {
|
|
397
388
|
if (!l) continue;
|
|
398
|
-
const a =
|
|
389
|
+
const a = To(
|
|
399
390
|
l,
|
|
400
391
|
t,
|
|
401
392
|
n,
|
|
@@ -406,63 +397,59 @@ function Yt(e, t, n, o, r) {
|
|
|
406
397
|
}
|
|
407
398
|
return s;
|
|
408
399
|
}
|
|
409
|
-
function
|
|
400
|
+
function Zt(e) {
|
|
410
401
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
411
402
|
for (const o of e ?? []) {
|
|
412
403
|
if (!o) continue;
|
|
413
|
-
const r =
|
|
404
|
+
const r = go(o);
|
|
414
405
|
t.push(r), n.set(r.itemId, r);
|
|
415
406
|
}
|
|
416
407
|
return { list: t, byItemId: n };
|
|
417
408
|
}
|
|
418
|
-
function
|
|
419
|
-
var
|
|
409
|
+
function Eo(e, t = {}) {
|
|
410
|
+
var c, u;
|
|
420
411
|
const n = String(e._id);
|
|
421
412
|
if (e.moduleItemsTotalCount == null)
|
|
422
|
-
throw new
|
|
423
|
-
const { list: o, byItemId: r } =
|
|
413
|
+
throw new Wt("module", n, "moduleItemsTotalCount");
|
|
414
|
+
const { list: o, byItemId: r } = Zt(e.completionRequirements), s = e.moduleItemsConnection, l = s != null && !((c = s.pageInfo) != null && c.hasNextPage), a = Vt(e.progression, o), m = l ? Kt(s.nodes, n, r, t, a) : void 0;
|
|
424
415
|
return {
|
|
425
416
|
id: n,
|
|
426
417
|
name: e.name ?? "",
|
|
427
418
|
position: e.position ?? 0,
|
|
428
|
-
published:
|
|
419
|
+
published: Qt(e.published, "module", n),
|
|
429
420
|
itemCount: e.moduleItemsTotalCount,
|
|
430
|
-
items:
|
|
421
|
+
items: m,
|
|
431
422
|
unlockAt: e.unlockAt ?? null,
|
|
432
423
|
prerequisiteModules: (e.prerequisites ?? []).filter(
|
|
433
|
-
(
|
|
434
|
-
).map((
|
|
424
|
+
(p) => p != null
|
|
425
|
+
).map((p) => ({ id: String(p.id), name: p.name ?? "" })),
|
|
435
426
|
requirementCount: e.requirementCount ?? null,
|
|
436
427
|
requireSequentialProgress: e.requireSequentialProgress ?? !1,
|
|
437
428
|
completionRequirements: o,
|
|
438
|
-
progress:
|
|
429
|
+
progress: _o(e, o, a),
|
|
430
|
+
collapsed: ((u = e.progression) == null ? void 0 : u.collapsed) ?? null
|
|
439
431
|
};
|
|
440
432
|
}
|
|
441
|
-
function
|
|
433
|
+
function Po(e, t = {}) {
|
|
442
434
|
var r;
|
|
443
435
|
const n = (r = e == null ? void 0 : e.legacyNode) == null ? void 0 : r.modulesConnection, o = [];
|
|
444
436
|
for (const s of (n == null ? void 0 : n.nodes) ?? [])
|
|
445
|
-
s && o.push(
|
|
446
|
-
return { modules: o, pageInfo:
|
|
437
|
+
s && o.push(Eo(s, t));
|
|
438
|
+
return { modules: o, pageInfo: Ht(n == null ? void 0 : n.pageInfo) };
|
|
447
439
|
}
|
|
448
|
-
function
|
|
449
|
-
const o = e == null ? void 0 : e.legacyNode, { list: r, byItemId: s } =
|
|
440
|
+
function Co(e, t, n = {}) {
|
|
441
|
+
const o = e == null ? void 0 : e.legacyNode, { list: r, byItemId: s } = Zt(o == null ? void 0 : o.completionRequirements), l = o == null ? void 0 : o.moduleItemsConnection, a = Vt(o == null ? void 0 : o.progression, r);
|
|
450
442
|
return {
|
|
451
|
-
items:
|
|
452
|
-
pageInfo:
|
|
443
|
+
items: Kt(l == null ? void 0 : l.nodes, t, s, n, a),
|
|
444
|
+
pageInfo: Ht(l == null ? void 0 : l.pageInfo)
|
|
453
445
|
};
|
|
454
446
|
}
|
|
455
|
-
const
|
|
447
|
+
const wo = Me`
|
|
456
448
|
fragment PlatformModulesSubmissionFields on Submission {
|
|
457
449
|
_id
|
|
458
|
-
state
|
|
459
|
-
gradingStatus
|
|
460
|
-
submittedAt
|
|
461
|
-
attempt
|
|
462
|
-
missing
|
|
463
450
|
cachedDueDate
|
|
464
451
|
}
|
|
465
|
-
`,
|
|
452
|
+
`, Xt = Me`
|
|
466
453
|
fragment PlatformModulesItemFields on ModuleItem {
|
|
467
454
|
_id
|
|
468
455
|
title
|
|
@@ -472,6 +459,7 @@ const Io = fe`
|
|
|
472
459
|
indent
|
|
473
460
|
published
|
|
474
461
|
estimatedDuration
|
|
462
|
+
moduleItemStatus
|
|
475
463
|
content {
|
|
476
464
|
__typename
|
|
477
465
|
pointsPossible
|
|
@@ -509,8 +497,8 @@ const Io = fe`
|
|
|
509
497
|
}
|
|
510
498
|
}
|
|
511
499
|
}
|
|
512
|
-
${
|
|
513
|
-
`,
|
|
500
|
+
${wo}
|
|
501
|
+
`, Jt = Me`
|
|
514
502
|
fragment PlatformModulesProgressionFields on ModuleProgression {
|
|
515
503
|
workflowState
|
|
516
504
|
completed
|
|
@@ -530,7 +518,7 @@ const Io = fe`
|
|
|
530
518
|
score
|
|
531
519
|
}
|
|
532
520
|
}
|
|
533
|
-
`,
|
|
521
|
+
`, vo = Me`
|
|
534
522
|
query PlatformModulesGetModules(
|
|
535
523
|
$courseId: ID!
|
|
536
524
|
$first: Int!
|
|
@@ -565,10 +553,11 @@ const Io = fe`
|
|
|
565
553
|
minPercentage
|
|
566
554
|
}
|
|
567
555
|
progression {
|
|
556
|
+
collapsed
|
|
568
557
|
...PlatformModulesProgressionFields
|
|
569
558
|
}
|
|
570
559
|
submissionStatistics {
|
|
571
|
-
|
|
560
|
+
nextDueAt
|
|
572
561
|
missingAssignmentCount
|
|
573
562
|
}
|
|
574
563
|
moduleItemsConnection(first: $itemsFirst) @include(if: $includeItems) {
|
|
@@ -589,9 +578,9 @@ const Io = fe`
|
|
|
589
578
|
}
|
|
590
579
|
}
|
|
591
580
|
}
|
|
592
|
-
${
|
|
593
|
-
${
|
|
594
|
-
`,
|
|
581
|
+
${Xt}
|
|
582
|
+
${Jt}
|
|
583
|
+
`, Lo = Me`
|
|
595
584
|
query PlatformModulesGetModuleItems(
|
|
596
585
|
$moduleId: ID!
|
|
597
586
|
$first: Int!
|
|
@@ -622,93 +611,93 @@ const Io = fe`
|
|
|
622
611
|
}
|
|
623
612
|
}
|
|
624
613
|
}
|
|
625
|
-
${
|
|
626
|
-
${
|
|
614
|
+
${Xt}
|
|
615
|
+
${Jt}
|
|
627
616
|
`;
|
|
628
|
-
function
|
|
617
|
+
function en() {
|
|
629
618
|
return new DOMException("The operation was aborted.", "AbortError");
|
|
630
619
|
}
|
|
631
|
-
function
|
|
632
|
-
if (e != null && e.aborted) throw
|
|
620
|
+
function Ce(e) {
|
|
621
|
+
if (e != null && e.aborted) throw en();
|
|
633
622
|
}
|
|
634
|
-
function
|
|
623
|
+
function ct(e, t) {
|
|
635
624
|
return t ? new Promise((n, o) => {
|
|
636
|
-
const r = () => o(
|
|
625
|
+
const r = () => o(en());
|
|
637
626
|
t.addEventListener("abort", r, { once: !0 }), e.then(n, o).finally(() => t.removeEventListener("abort", r));
|
|
638
627
|
}) : e;
|
|
639
628
|
}
|
|
640
|
-
const
|
|
629
|
+
const dt = [
|
|
641
630
|
"COMPLETED",
|
|
642
631
|
"INCOMPLETE",
|
|
643
632
|
"IN_PROGRESS",
|
|
644
633
|
"NOT_STARTED"
|
|
645
|
-
],
|
|
634
|
+
], Ao = {
|
|
646
635
|
module: { completionStatus: ["eq"] }
|
|
647
636
|
};
|
|
648
|
-
function
|
|
637
|
+
function Ro(e) {
|
|
649
638
|
if (!e) return null;
|
|
650
639
|
if (e.target !== "module" || e.field !== "completionStatus" || e.op !== "eq")
|
|
651
640
|
throw new Error(
|
|
652
641
|
`Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". Only module.completionStatus eq is compiled here.`
|
|
653
642
|
);
|
|
654
643
|
const t = e.value;
|
|
655
|
-
if (!
|
|
644
|
+
if (!dt.includes(t))
|
|
656
645
|
throw new Error(
|
|
657
|
-
`"${e.value}" is not a ModuleCompletionStatus (${
|
|
646
|
+
`"${e.value}" is not a ModuleCompletionStatus (${dt.join(", ")}).`
|
|
658
647
|
);
|
|
659
648
|
return { completionStatus: t };
|
|
660
649
|
}
|
|
661
|
-
function
|
|
650
|
+
function Nl({
|
|
662
651
|
executeQuery: e,
|
|
663
652
|
inlineItemLimit: t = Ge,
|
|
664
|
-
nodeBudget: n =
|
|
653
|
+
nodeBudget: n = Xe,
|
|
665
654
|
onUnsupportedItem: o,
|
|
666
655
|
studentId: r,
|
|
667
656
|
validate: s = !0,
|
|
668
|
-
capabilities: l =
|
|
657
|
+
capabilities: l = Ao
|
|
669
658
|
}) {
|
|
670
|
-
const a = r != null,
|
|
659
|
+
const a = r != null, m = { onUnsupportedItem: o };
|
|
671
660
|
return {
|
|
672
661
|
inlineNodeBudget: n,
|
|
673
662
|
capabilities: l,
|
|
674
663
|
async listModules({
|
|
675
|
-
courseId:
|
|
664
|
+
courseId: c,
|
|
676
665
|
cursor: u,
|
|
677
666
|
pageSize: p,
|
|
678
667
|
includeItems: f,
|
|
679
|
-
filter:
|
|
680
|
-
inlineItemsFirst:
|
|
681
|
-
inlineFirst:
|
|
682
|
-
signal:
|
|
668
|
+
filter: y,
|
|
669
|
+
inlineItemsFirst: g,
|
|
670
|
+
inlineFirst: h,
|
|
671
|
+
signal: _
|
|
683
672
|
}) {
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
e(
|
|
687
|
-
courseId:
|
|
688
|
-
first:
|
|
673
|
+
Ce(_);
|
|
674
|
+
const C = f ? Math.min(h ?? p, p) : p, b = Math.min(g ?? t, t), w = Math.max(1, Math.min(b, Math.floor(n / C))), k = await ct(
|
|
675
|
+
e(vo, {
|
|
676
|
+
courseId: c,
|
|
677
|
+
first: C,
|
|
689
678
|
after: u ?? null,
|
|
690
679
|
includeItems: f,
|
|
691
|
-
itemsFirst:
|
|
680
|
+
itemsFirst: w,
|
|
692
681
|
includeSubmissions: a,
|
|
693
682
|
studentId: r ?? null,
|
|
694
|
-
filter:
|
|
683
|
+
filter: Ro(y)
|
|
695
684
|
}),
|
|
696
|
-
|
|
685
|
+
_
|
|
697
686
|
);
|
|
698
|
-
|
|
699
|
-
const
|
|
700
|
-
return s ?
|
|
687
|
+
Ce(_);
|
|
688
|
+
const q = Po(k, m);
|
|
689
|
+
return s ? Xn.parse(q) : q;
|
|
701
690
|
},
|
|
702
691
|
async listModuleItems({
|
|
703
|
-
moduleId:
|
|
692
|
+
moduleId: c,
|
|
704
693
|
cursor: u,
|
|
705
694
|
pageSize: p,
|
|
706
695
|
signal: f
|
|
707
696
|
}) {
|
|
708
|
-
|
|
709
|
-
const
|
|
710
|
-
e(
|
|
711
|
-
moduleId:
|
|
697
|
+
Ce(f);
|
|
698
|
+
const y = await ct(
|
|
699
|
+
e(Lo, {
|
|
700
|
+
moduleId: c,
|
|
712
701
|
first: p,
|
|
713
702
|
after: u ?? null,
|
|
714
703
|
includeSubmissions: a,
|
|
@@ -716,172 +705,171 @@ function El({
|
|
|
716
705
|
}),
|
|
717
706
|
f
|
|
718
707
|
);
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
return s ?
|
|
708
|
+
Ce(f);
|
|
709
|
+
const g = Co(y, c, m);
|
|
710
|
+
return s ? Jn.parse(g) : g;
|
|
722
711
|
}
|
|
723
712
|
};
|
|
724
713
|
}
|
|
725
|
-
const
|
|
726
|
-
pageTitle:
|
|
727
|
-
modulesLoadedAnnouncement:
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
moduleProgressScreenReaderLabel:
|
|
752
|
-
itemsLoadedAnnouncement:
|
|
753
|
-
itemsLoadErrorAlert:
|
|
754
|
-
itemsLoadingSpinnerLabel:
|
|
755
|
-
itemsLoadingText:
|
|
756
|
-
noItemsEmptyState:
|
|
757
|
-
loadMoreItemsLoading:
|
|
758
|
-
loadMoreItems:
|
|
759
|
-
moduleUnpublishedBadge:
|
|
760
|
-
collapseModule:
|
|
761
|
-
expandModule:
|
|
762
|
-
moduleStatusNotStarted:
|
|
763
|
-
moduleStatusInProgress:
|
|
764
|
-
moduleStatusComplete:
|
|
765
|
-
moduleStatusMissing:
|
|
766
|
-
moduleStatusIncomplete:
|
|
767
|
-
moduleStatusMissingAndIncomplete:
|
|
768
|
-
moduleStatusLocked:
|
|
769
|
-
itemStatusNotStarted:
|
|
770
|
-
itemStatusInProgress:
|
|
771
|
-
itemStatusComplete:
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
function Kt(e, t, n) {
|
|
714
|
+
const xo = "Course modules", No = { one: "%{count} module loaded", other: "%{count} modules loaded" }, qo = "Expand / collapse", ko = "Expand all", Do = "Collapse all", Oo = "This filter runs on the modules loaded so far — load more to filter the rest of the course.", Fo = "Modules failed to load: %{message}", Uo = "Loading modules", zo = "This course has no modules.", $o = { one: "The only loaded module does not match this filter.", other: "None of the %{count} loaded modules match this filter." }, Bo = "No modules match this filter.", jo = "Clear filters", Go = "Loading more modules…", Yo = "Load more modules (%{count} loaded)", Wo = { one: "The only module in this course is loaded.", other: "All %{count} modules in this course are loaded." }, Qo = "Filter", Ho = "All", Vo = "In progress", Ko = "Complete", Zo = "Due this week", Xo = "Missing", Jo = "Locked until %{name} is completed.", er = "Locked until %{prerequisites} are completed.", tr = "%{count} prerequisites", nr = "%{label}. %{name}", or = "%{name} progress", rr = { one: "%{loaded} of %{count} item loaded in %{name}", other: "%{loaded} of %{count} items loaded in %{name}" }, sr = "Items failed to load: %{message}", ir = "Loading items", lr = "Loading…", ar = "No items.", ur = "Loading more items…", cr = "Load more items (%{loaded} of %{count} loaded)", dr = "(unpublished)", mr = "Collapse %{name}", pr = "Expand %{name}", fr = "Not started", gr = "In progress", hr = "All completed", Ir = "%{count} Missing", br = "%{count} Incomplete", Mr = "%{missing} & %{incomplete}", yr = "Locked", Sr = "Not started", _r = "In progress", Tr = "Completed", Er = "Incomplete", Pr = "Missing", Cr = "Locked", wr = "Assignment", vr = "Quiz", Lr = "Discussion", Ar = "Page", Rr = "File", xr = "External URL", Nr = "External tool", qr = "Text header", kr = "Item type", Dr = "Due date", Or = "Points", Fr = "Requirement", Ur = "Estimated duration", zr = "Publish state", $r = "View the item", Br = "Submit the assignment", jr = "Contribute to the page", Gr = "Mark as done", Yr = "Score at least the minimum", Wr = "Score at least %{count}", Qr = "Score at least the minimum percentage", Hr = "Score at least %{count}%", Vr = "Complete the requirement", Kr = "today, %{time}", Zr = "yesterday, %{time}", Xr = "tomorrow, %{time}", Jr = "%{date}, %{time}", es = "%{time} (%{zone})", ts = "Due %{when}", ns = "Will unlock on %{when}", os = "Unlocked on %{when}", rs = { one: "%{count} pt", other: "%{count} pts" }, ss = { one: "%{percent}% | %{met} of %{count} requirement met", other: "%{percent}% | %{met} of %{count} requirements met" }, is = { one: "%{percent}% complete, %{met} of %{count} requirement met", other: "%{percent}% complete, %{met} of %{count} requirements met" }, ls = "%{count} min", as = "Unpublished", us = "Untitled item", cs = "opens in a new window", ds = {
|
|
715
|
+
pageTitle: xo,
|
|
716
|
+
modulesLoadedAnnouncement: No,
|
|
717
|
+
expandCollapseTrigger: qo,
|
|
718
|
+
expandAll: ko,
|
|
719
|
+
collapseAll: Do,
|
|
720
|
+
filterScopeHint: Oo,
|
|
721
|
+
modulesLoadErrorAlert: Fo,
|
|
722
|
+
modulesLoadingSpinnerLabel: Uo,
|
|
723
|
+
noModulesEmptyState: zo,
|
|
724
|
+
filteredEmptyState: $o,
|
|
725
|
+
noFilterMatches: Bo,
|
|
726
|
+
clearFilters: jo,
|
|
727
|
+
loadMoreModulesLoading: Go,
|
|
728
|
+
loadMoreModules: Yo,
|
|
729
|
+
allModulesLoaded: Wo,
|
|
730
|
+
filterGroupLabel: Qo,
|
|
731
|
+
filterAll: Ho,
|
|
732
|
+
filterInProgress: Vo,
|
|
733
|
+
filterComplete: Ko,
|
|
734
|
+
filterDueThisWeek: Zo,
|
|
735
|
+
filterMissing: Xo,
|
|
736
|
+
lockedByPrerequisiteByline: Jo,
|
|
737
|
+
lockedByPrerequisitesByline: er,
|
|
738
|
+
lockedByPrerequisitesCount: tr,
|
|
739
|
+
moduleNameWithLabel: nr,
|
|
740
|
+
moduleProgressScreenReaderLabel: or,
|
|
741
|
+
itemsLoadedAnnouncement: rr,
|
|
742
|
+
itemsLoadErrorAlert: sr,
|
|
743
|
+
itemsLoadingSpinnerLabel: ir,
|
|
744
|
+
itemsLoadingText: lr,
|
|
745
|
+
noItemsEmptyState: ar,
|
|
746
|
+
loadMoreItemsLoading: ur,
|
|
747
|
+
loadMoreItems: cr,
|
|
748
|
+
moduleUnpublishedBadge: dr,
|
|
749
|
+
collapseModule: mr,
|
|
750
|
+
expandModule: pr,
|
|
751
|
+
moduleStatusNotStarted: fr,
|
|
752
|
+
moduleStatusInProgress: gr,
|
|
753
|
+
moduleStatusComplete: hr,
|
|
754
|
+
moduleStatusMissing: Ir,
|
|
755
|
+
moduleStatusIncomplete: br,
|
|
756
|
+
moduleStatusMissingAndIncomplete: Mr,
|
|
757
|
+
moduleStatusLocked: yr,
|
|
758
|
+
itemStatusNotStarted: Sr,
|
|
759
|
+
itemStatusInProgress: _r,
|
|
760
|
+
itemStatusComplete: Tr,
|
|
761
|
+
itemStatusIncomplete: Er,
|
|
762
|
+
itemStatusMissing: Pr,
|
|
763
|
+
itemStatusLocked: Cr,
|
|
764
|
+
itemTypeAssignment: wr,
|
|
765
|
+
itemTypeQuiz: vr,
|
|
766
|
+
itemTypeDiscussion: Lr,
|
|
767
|
+
itemTypePage: Ar,
|
|
768
|
+
itemTypeFile: Rr,
|
|
769
|
+
itemTypeExternalUrl: xr,
|
|
770
|
+
itemTypeExternalTool: Nr,
|
|
771
|
+
itemTypeSubHeader: qr,
|
|
772
|
+
metaFieldTypeLabel: kr,
|
|
773
|
+
metaFieldDueAtLabel: Dr,
|
|
774
|
+
metaFieldPointsLabel: Or,
|
|
775
|
+
metaFieldRequirementLabel: Fr,
|
|
776
|
+
metaFieldDurationLabel: Ur,
|
|
777
|
+
metaFieldPublishStateLabel: zr,
|
|
778
|
+
requirementMustView: $r,
|
|
779
|
+
requirementMustSubmit: Br,
|
|
780
|
+
requirementMustContribute: jr,
|
|
781
|
+
requirementMustMarkDone: Gr,
|
|
782
|
+
requirementMinScoreUnknown: Yr,
|
|
783
|
+
requirementMinScore: Wr,
|
|
784
|
+
requirementMinPercentageUnknown: Qr,
|
|
785
|
+
requirementMinPercentage: Hr,
|
|
786
|
+
requirementUnknown: Vr,
|
|
787
|
+
dateTimeToday: Kr,
|
|
788
|
+
dateTimeYesterday: Zr,
|
|
789
|
+
dateTimeTomorrow: Xr,
|
|
790
|
+
dateTimeWithDate: Jr,
|
|
791
|
+
timeWithZone: es,
|
|
792
|
+
dueByline: ts,
|
|
793
|
+
unlockByline: ns,
|
|
794
|
+
unlockedByline: os,
|
|
795
|
+
pointsAbbreviated: rs,
|
|
796
|
+
progressSummary: ss,
|
|
797
|
+
progressScreenReaderValue: is,
|
|
798
|
+
durationMinutes: ls,
|
|
799
|
+
itemUnpublishedLabel: as,
|
|
800
|
+
itemUntitled: us,
|
|
801
|
+
opensInNewWindow: cs
|
|
802
|
+
}, ms = /%\{(\w+)\}/g, ps = ds, oe = "en-US", fs = /* @__PURE__ */ new Map(), gs = /* @__PURE__ */ new Map();
|
|
803
|
+
function tn(e, t, n) {
|
|
816
804
|
const o = e.get(t);
|
|
817
805
|
if (o) return o;
|
|
818
806
|
const r = n();
|
|
819
807
|
return e.set(t, r), r;
|
|
820
808
|
}
|
|
821
|
-
function
|
|
822
|
-
return n ? e.replace(
|
|
809
|
+
function hs(e, t, n) {
|
|
810
|
+
return n ? e.replace(ms, (o, r) => {
|
|
823
811
|
if (!Object.prototype.hasOwnProperty.call(n, r)) return o;
|
|
824
812
|
const s = n[r];
|
|
825
|
-
return typeof s == "number" && Number.isFinite(s) ?
|
|
813
|
+
return typeof s == "number" && Number.isFinite(s) ? tn(gs, t, () => new Intl.NumberFormat(t)).format(s) : String(s);
|
|
826
814
|
}) : e;
|
|
827
815
|
}
|
|
828
|
-
function
|
|
816
|
+
function Is(e, t, n) {
|
|
829
817
|
const o = n == null ? void 0 : n.count;
|
|
830
818
|
if (typeof o == "number" && Number.isFinite(o)) {
|
|
831
|
-
const r =
|
|
819
|
+
const r = tn(fs, t, () => new Intl.PluralRules(t)).select(o), s = e[r];
|
|
832
820
|
if (typeof s == "string") return s;
|
|
833
821
|
}
|
|
834
822
|
return typeof e.other == "string" ? e.other : void 0;
|
|
835
823
|
}
|
|
836
|
-
function
|
|
824
|
+
function mt(e, t, n) {
|
|
837
825
|
if (typeof e == "string") return e;
|
|
838
826
|
if (e !== null && typeof e == "object")
|
|
839
|
-
return
|
|
827
|
+
return Is(e, t, n);
|
|
840
828
|
}
|
|
841
|
-
const
|
|
842
|
-
function
|
|
843
|
-
|
|
829
|
+
const pt = /* @__PURE__ */ new Set();
|
|
830
|
+
function bs(e) {
|
|
831
|
+
pt.has(e) || (pt.add(e), console.warn(
|
|
844
832
|
`[platform-modules] no translation for "${e}"; it will render as itself. Add it to the catalog passed to ModulesI18nProvider.`
|
|
845
833
|
));
|
|
846
834
|
}
|
|
847
|
-
function
|
|
848
|
-
const s =
|
|
835
|
+
function Ms(e, t, n, o, r) {
|
|
836
|
+
const s = mt(e == null ? void 0 : e[t], n, r);
|
|
849
837
|
if (typeof s == "string") return s;
|
|
850
|
-
const l =
|
|
851
|
-
return typeof l == "string" ? l : (o &&
|
|
838
|
+
const l = mt(ps[t], n, r);
|
|
839
|
+
return typeof l == "string" ? l : (o && bs(t), t);
|
|
852
840
|
}
|
|
853
|
-
function
|
|
854
|
-
return (o, r) =>
|
|
841
|
+
function nn(e, t = oe, n = !1) {
|
|
842
|
+
return (o, r) => hs(Ms(e, o, t, n, r), t, r);
|
|
855
843
|
}
|
|
856
|
-
const
|
|
857
|
-
function
|
|
844
|
+
const ys = nn(), Ss = { t: ys, locale: oe }, on = Pt(null);
|
|
845
|
+
function ql({
|
|
858
846
|
translations: e,
|
|
859
847
|
locale: t,
|
|
860
848
|
timezone: n,
|
|
861
849
|
warnOnMissingKey: o,
|
|
862
850
|
children: r
|
|
863
851
|
}) {
|
|
864
|
-
const s =
|
|
865
|
-
const l = t ??
|
|
852
|
+
const s = N(() => {
|
|
853
|
+
const l = t ?? oe;
|
|
866
854
|
return {
|
|
867
|
-
t:
|
|
855
|
+
t: nn(e, l, o),
|
|
868
856
|
locale: l,
|
|
869
857
|
timezone: n
|
|
870
858
|
};
|
|
871
859
|
}, [e, t, n, o]);
|
|
872
|
-
return /* @__PURE__ */ i(
|
|
860
|
+
return /* @__PURE__ */ i(on.Provider, { value: s, children: r });
|
|
873
861
|
}
|
|
874
|
-
function
|
|
875
|
-
return
|
|
862
|
+
function B() {
|
|
863
|
+
return Ct(on) ?? Ss;
|
|
876
864
|
}
|
|
877
|
-
const
|
|
878
|
-
function
|
|
879
|
-
const t =
|
|
865
|
+
const _s = 864e5, Ts = "en-US", ft = /* @__PURE__ */ new Map(), gt = /* @__PURE__ */ new Map();
|
|
866
|
+
function Es(e) {
|
|
867
|
+
const t = gt.get(e);
|
|
880
868
|
if (t) return t;
|
|
881
869
|
const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
|
|
882
|
-
return
|
|
870
|
+
return gt.set(e, n), n;
|
|
883
871
|
}
|
|
884
|
-
function
|
|
872
|
+
function ht(e, t) {
|
|
885
873
|
return {
|
|
886
874
|
time: new Intl.DateTimeFormat(e, {
|
|
887
875
|
hour: "numeric",
|
|
@@ -896,7 +884,7 @@ function dt(e, t) {
|
|
|
896
884
|
timeZone: t
|
|
897
885
|
}),
|
|
898
886
|
zone: t ? new Intl.DateTimeFormat(e, { timeZone: t, timeZoneName: "short" }) : void 0,
|
|
899
|
-
civilDay: new Intl.DateTimeFormat(
|
|
887
|
+
civilDay: new Intl.DateTimeFormat(Ts, {
|
|
900
888
|
year: "numeric",
|
|
901
889
|
month: "numeric",
|
|
902
890
|
day: "numeric",
|
|
@@ -904,23 +892,23 @@ function dt(e, t) {
|
|
|
904
892
|
})
|
|
905
893
|
};
|
|
906
894
|
}
|
|
907
|
-
function
|
|
908
|
-
const n = t || void 0, o = `${e}|${n ?? ""}`, r =
|
|
895
|
+
function rn(e, t) {
|
|
896
|
+
const n = t || void 0, o = `${e}|${n ?? ""}`, r = ft.get(o);
|
|
909
897
|
if (r) return r;
|
|
910
898
|
let s;
|
|
911
899
|
try {
|
|
912
|
-
s =
|
|
900
|
+
s = ht(e, n);
|
|
913
901
|
} catch {
|
|
914
902
|
console.warn(
|
|
915
903
|
`[platform-modules] Unusable timezone ${JSON.stringify(n)}; rendering dates in the viewer's own clock instead.`
|
|
916
|
-
), s =
|
|
904
|
+
), s = ht(e, void 0);
|
|
917
905
|
}
|
|
918
|
-
return
|
|
906
|
+
return ft.set(o, s), s;
|
|
919
907
|
}
|
|
920
|
-
function
|
|
908
|
+
function It(e, t) {
|
|
921
909
|
return new Date(Ye(e, t)).getUTCFullYear();
|
|
922
910
|
}
|
|
923
|
-
function
|
|
911
|
+
function Ps(e, t) {
|
|
924
912
|
var o;
|
|
925
913
|
const n = (o = e.zone) == null ? void 0 : o.formatToParts(t).find((r) => r.type === "timeZoneName");
|
|
926
914
|
return (n == null ? void 0 : n.value) ?? null;
|
|
@@ -932,29 +920,29 @@ function Ye(e, t) {
|
|
|
932
920
|
};
|
|
933
921
|
return Date.UTC(o("year"), o("month") - 1, o("day"));
|
|
934
922
|
}
|
|
935
|
-
function
|
|
936
|
-
return
|
|
923
|
+
function Cs(e, t, n) {
|
|
924
|
+
return sn(rn(oe, n), e, t);
|
|
937
925
|
}
|
|
938
|
-
function
|
|
939
|
-
return Math.round((Ye(e, t) - Ye(e, n)) /
|
|
926
|
+
function sn(e, t, n) {
|
|
927
|
+
return Math.round((Ye(e, t) - Ye(e, n)) / _s);
|
|
940
928
|
}
|
|
941
|
-
function
|
|
929
|
+
function ws(e, t, n, { locale: o = oe, timezone: r } = {}) {
|
|
942
930
|
const s = new Date(t);
|
|
943
931
|
if (Number.isNaN(s.getTime())) return t;
|
|
944
|
-
const l =
|
|
945
|
-
if (u === 0) return e("dateTimeToday", { time:
|
|
946
|
-
if (u === -1) return e("dateTimeYesterday", { time:
|
|
947
|
-
if (u === 1) return e("dateTimeTomorrow", { time:
|
|
948
|
-
const f =
|
|
949
|
-
return e("dateTimeWithDate", { date: f, time:
|
|
932
|
+
const l = rn(o, r), a = Ps(l, s), m = l.time.format(s), c = a ? e("timeWithZone", { time: m, zone: a }) : m, u = sn(l, s, n);
|
|
933
|
+
if (u === 0) return e("dateTimeToday", { time: c });
|
|
934
|
+
if (u === -1) return e("dateTimeYesterday", { time: c });
|
|
935
|
+
if (u === 1) return e("dateTimeTomorrow", { time: c });
|
|
936
|
+
const f = It(l, s) === It(l, n) ? l.day.format(s) : l.dayYear.format(s);
|
|
937
|
+
return e("dateTimeWithDate", { date: f, time: c });
|
|
950
938
|
}
|
|
951
|
-
function
|
|
952
|
-
return !Number.isInteger(e) || e < 1 ? null :
|
|
939
|
+
function vs(e, t = oe) {
|
|
940
|
+
return !Number.isInteger(e) || e < 1 ? null : Es(t).format(e);
|
|
953
941
|
}
|
|
954
|
-
function
|
|
942
|
+
function Ls(e, t) {
|
|
955
943
|
return t == null ? null : e("pointsAbbreviated", { count: t });
|
|
956
944
|
}
|
|
957
|
-
function
|
|
945
|
+
function As(e, t) {
|
|
958
946
|
switch (t.type) {
|
|
959
947
|
case "must_view":
|
|
960
948
|
return e("requirementMustView");
|
|
@@ -972,17 +960,13 @@ function ys(e, t) {
|
|
|
972
960
|
return e("requirementUnknown");
|
|
973
961
|
}
|
|
974
962
|
}
|
|
975
|
-
function
|
|
963
|
+
function Rs(e, t, n, o) {
|
|
976
964
|
return e("progressSummary", { percent: t, met: n, count: o });
|
|
977
965
|
}
|
|
978
|
-
function
|
|
966
|
+
function xs(e, t, n, o) {
|
|
979
967
|
return e("progressScreenReaderValue", { percent: t, met: n, count: o });
|
|
980
968
|
}
|
|
981
|
-
|
|
982
|
-
const o = t.trim().toLocaleLowerCase(n);
|
|
983
|
-
return o === "" ? !0 : e.name.toLocaleLowerCase(n).includes(o);
|
|
984
|
-
}
|
|
985
|
-
const J = "all", Ps = 7, Cs = {
|
|
969
|
+
const V = "all", Ns = 7, qs = {
|
|
986
970
|
all: {
|
|
987
971
|
label: "filterAll",
|
|
988
972
|
order: 10,
|
|
@@ -1012,12 +996,12 @@ const J = "all", Ps = 7, Cs = {
|
|
|
1012
996
|
order: 40,
|
|
1013
997
|
predicate: (e, { today: t, timezone: n }) => {
|
|
1014
998
|
var l;
|
|
1015
|
-
const o = (l = e.progress) == null ? void 0 : l.
|
|
999
|
+
const o = (l = e.progress) == null ? void 0 : l.nextDueAt;
|
|
1016
1000
|
if (!o) return !1;
|
|
1017
1001
|
const r = new Date(o);
|
|
1018
1002
|
if (Number.isNaN(r.getTime())) return !1;
|
|
1019
|
-
const s =
|
|
1020
|
-
return s >= 0 && s
|
|
1003
|
+
const s = Cs(r, t, n);
|
|
1004
|
+
return s >= 0 && s < Ns;
|
|
1021
1005
|
}
|
|
1022
1006
|
},
|
|
1023
1007
|
missing: {
|
|
@@ -1029,43 +1013,43 @@ const J = "all", Ps = 7, Cs = {
|
|
|
1029
1013
|
}
|
|
1030
1014
|
}
|
|
1031
1015
|
};
|
|
1032
|
-
function
|
|
1016
|
+
function Je(e) {
|
|
1033
1017
|
if (!(!e || e.clientOnly))
|
|
1034
1018
|
return e.query;
|
|
1035
1019
|
}
|
|
1036
1020
|
function We(e) {
|
|
1037
|
-
return e !== void 0 &&
|
|
1038
|
-
}
|
|
1039
|
-
const
|
|
1040
|
-
moduleLabel: (e, t, { locale: n }) =>
|
|
1041
|
-
dateTime: (e, t, { t: n, locale: o, timezone: r }) =>
|
|
1042
|
-
points: (e, { t }) =>
|
|
1043
|
-
progress: (e, t, n, { t: o }) =>
|
|
1044
|
-
},
|
|
1021
|
+
return e !== void 0 && Je(e) === void 0;
|
|
1022
|
+
}
|
|
1023
|
+
const ks = {
|
|
1024
|
+
moduleLabel: (e, t, { locale: n }) => vs(e, n),
|
|
1025
|
+
dateTime: (e, t, { t: n, locale: o, timezone: r }) => ws(n, e, t, { locale: o, timezone: r }),
|
|
1026
|
+
points: (e, { t }) => Ls(t, e),
|
|
1027
|
+
progress: (e, t, n, { t: o }) => Rs(o, e, t, n)
|
|
1028
|
+
}, Ae = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
1045
1029
|
function Re(e, t) {
|
|
1046
1030
|
const n = Object.entries(t ?? {}).filter(([, o]) => o !== void 0);
|
|
1047
1031
|
return { ...e, ...Object.fromEntries(n) };
|
|
1048
1032
|
}
|
|
1049
|
-
function
|
|
1033
|
+
function ee(e, t = {}) {
|
|
1050
1034
|
const n = Object.keys(e).map((r) => [
|
|
1051
1035
|
r,
|
|
1052
|
-
Re(e[r],
|
|
1053
|
-
]), o = Object.keys(t).filter((r) => !
|
|
1036
|
+
Re(e[r], Ae(t, r) ? t[r] : void 0)
|
|
1037
|
+
]), o = Object.keys(t).filter((r) => !Ae(e, r)).sort().map((r) => [r, Re({}, t[r])]);
|
|
1054
1038
|
return Object.fromEntries([...n, ...o]);
|
|
1055
1039
|
}
|
|
1056
|
-
function
|
|
1057
|
-
if (!(!
|
|
1040
|
+
function ne(e, t) {
|
|
1041
|
+
if (!(!Ae(e, t) || e[t].hidden))
|
|
1058
1042
|
return e[t];
|
|
1059
1043
|
}
|
|
1060
|
-
function
|
|
1061
|
-
return Object.keys(e).filter((t) =>
|
|
1044
|
+
function et(e) {
|
|
1045
|
+
return Object.keys(e).filter((t) => ne(e, t) !== void 0).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
|
|
1062
1046
|
}
|
|
1063
|
-
const
|
|
1047
|
+
const Ds = "type", Os = {
|
|
1064
1048
|
type: {
|
|
1065
1049
|
label: "metaFieldTypeLabel",
|
|
1066
1050
|
order: 10,
|
|
1067
1051
|
render: ({ item: e, t, config: n }) => {
|
|
1068
|
-
const o =
|
|
1052
|
+
const o = ne(n.itemTypes, e.type);
|
|
1069
1053
|
return o ? t(o.label) : null;
|
|
1070
1054
|
}
|
|
1071
1055
|
},
|
|
@@ -1082,13 +1066,13 @@ const Ls = "type", vs = {
|
|
|
1082
1066
|
requirement: {
|
|
1083
1067
|
label: "metaFieldRequirementLabel",
|
|
1084
1068
|
order: 40,
|
|
1085
|
-
render: ({ item: e, t }) => e.completionRequirement ?
|
|
1069
|
+
render: ({ item: e, t }) => e.completionRequirement ? As(t, e.completionRequirement) : null
|
|
1086
1070
|
},
|
|
1087
1071
|
estimatedDuration: {
|
|
1088
1072
|
label: "metaFieldDurationLabel",
|
|
1089
1073
|
order: 50,
|
|
1090
1074
|
render: ({ item: e, t }) => {
|
|
1091
|
-
const n =
|
|
1075
|
+
const n = eo(e);
|
|
1092
1076
|
return n === null ? null : t("durationMinutes", { count: n });
|
|
1093
1077
|
}
|
|
1094
1078
|
},
|
|
@@ -1097,171 +1081,172 @@ const Ls = "type", vs = {
|
|
|
1097
1081
|
order: 60,
|
|
1098
1082
|
render: ({ item: e, t }) => e.published ? null : t("itemUnpublishedLabel")
|
|
1099
1083
|
}
|
|
1100
|
-
},
|
|
1084
|
+
}, H = { size: "md", color: "mutedColor" }, Fs = {
|
|
1101
1085
|
assignment: {
|
|
1102
1086
|
label: "itemTypeAssignment",
|
|
1103
1087
|
order: 10,
|
|
1104
|
-
icon: /* @__PURE__ */ i(
|
|
1088
|
+
icon: /* @__PURE__ */ i(Rn, { ...H })
|
|
1105
1089
|
},
|
|
1106
|
-
quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ i(
|
|
1090
|
+
quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ i(An, { ...H }) },
|
|
1107
1091
|
discussion: {
|
|
1108
1092
|
label: "itemTypeDiscussion",
|
|
1109
1093
|
order: 30,
|
|
1110
|
-
icon: /* @__PURE__ */ i(
|
|
1094
|
+
icon: /* @__PURE__ */ i(Ln, { ...H })
|
|
1111
1095
|
},
|
|
1112
|
-
page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ i(
|
|
1113
|
-
file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ i(
|
|
1096
|
+
page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ i(vn, { ...H }) },
|
|
1097
|
+
file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ i(wn, { ...H }) },
|
|
1114
1098
|
external_url: {
|
|
1115
1099
|
label: "itemTypeExternalUrl",
|
|
1116
1100
|
order: 60,
|
|
1117
|
-
icon: /* @__PURE__ */ i(
|
|
1101
|
+
icon: /* @__PURE__ */ i(Cn, { ...H })
|
|
1118
1102
|
},
|
|
1119
1103
|
external_tool: {
|
|
1120
1104
|
label: "itemTypeExternalTool",
|
|
1121
1105
|
order: 70,
|
|
1122
|
-
icon: /* @__PURE__ */ i(
|
|
1106
|
+
icon: /* @__PURE__ */ i(Pn, { ...H })
|
|
1123
1107
|
},
|
|
1124
1108
|
sub_header: { label: "itemTypeSubHeader", order: 80, icon: null }
|
|
1125
|
-
},
|
|
1126
|
-
formatters:
|
|
1127
|
-
itemTypes:
|
|
1109
|
+
}, qe = {
|
|
1110
|
+
formatters: ks,
|
|
1111
|
+
itemTypes: Fs,
|
|
1128
1112
|
itemStatuses: {},
|
|
1129
|
-
itemMeta:
|
|
1130
|
-
filters:
|
|
1113
|
+
itemMeta: Os,
|
|
1114
|
+
filters: qs,
|
|
1131
1115
|
moduleActions: {},
|
|
1132
1116
|
itemActions: {},
|
|
1133
1117
|
navigation: {}
|
|
1134
1118
|
};
|
|
1135
|
-
Object.freeze(
|
|
1136
|
-
for (const e of Object.values(
|
|
1119
|
+
Object.freeze(qe);
|
|
1120
|
+
for (const e of Object.values(qe)) {
|
|
1137
1121
|
Object.freeze(e);
|
|
1138
1122
|
for (const t of Object.values(e)) Object.freeze(t);
|
|
1139
1123
|
}
|
|
1140
|
-
function
|
|
1141
|
-
return
|
|
1142
|
-
const o =
|
|
1143
|
-
return o !== void 0 && !
|
|
1124
|
+
function Us(e, t) {
|
|
1125
|
+
return et(e).filter((n) => {
|
|
1126
|
+
const o = Je(n);
|
|
1127
|
+
return o !== void 0 && !Gn(t, o);
|
|
1144
1128
|
}).map((n) => n.key);
|
|
1145
1129
|
}
|
|
1146
|
-
function
|
|
1130
|
+
function bt(e) {
|
|
1147
1131
|
return `[platform-modules] the adapter cannot serve filter(s): ${e.join(", ")}. Add the field to the adapter's capabilities, or set clientOnly on the entry.`;
|
|
1148
1132
|
}
|
|
1149
|
-
function
|
|
1150
|
-
const n =
|
|
1133
|
+
function zs(e, t) {
|
|
1134
|
+
const n = Us(e, t);
|
|
1151
1135
|
if (n.length === 0) return e;
|
|
1152
1136
|
if (process.env.NODE_ENV !== "production")
|
|
1153
|
-
throw new Error(
|
|
1154
|
-
console.warn(
|
|
1137
|
+
throw new Error(bt(n));
|
|
1138
|
+
console.warn(bt(n));
|
|
1155
1139
|
const o = Object.fromEntries(n.map((r) => [r, { ...e[r], hidden: !0 }]));
|
|
1156
1140
|
return { ...e, ...o };
|
|
1157
1141
|
}
|
|
1158
|
-
const
|
|
1159
|
-
function
|
|
1160
|
-
return /* @__PURE__ */ i(
|
|
1142
|
+
const ln = Pt(null);
|
|
1143
|
+
function kl({ value: e, children: t }) {
|
|
1144
|
+
return /* @__PURE__ */ i(ln.Provider, { value: e, children: t });
|
|
1161
1145
|
}
|
|
1162
|
-
function
|
|
1163
|
-
return
|
|
1146
|
+
function ye() {
|
|
1147
|
+
return Ct(ln) ?? qe;
|
|
1164
1148
|
}
|
|
1165
|
-
function
|
|
1166
|
-
return
|
|
1149
|
+
function Dl(e) {
|
|
1150
|
+
return ne(ye().itemMeta, e) !== void 0;
|
|
1167
1151
|
}
|
|
1168
|
-
const
|
|
1169
|
-
label:
|
|
1170
|
-
order:
|
|
1171
|
-
hidden:
|
|
1152
|
+
const ke = d.object({
|
|
1153
|
+
label: d.string(),
|
|
1154
|
+
order: d.number(),
|
|
1155
|
+
hidden: d.boolean().optional()
|
|
1172
1156
|
});
|
|
1173
1157
|
function ve(e) {
|
|
1174
|
-
return
|
|
1158
|
+
return d.record(d.string(), e);
|
|
1175
1159
|
}
|
|
1176
|
-
const Be = ve(
|
|
1160
|
+
const Be = ve(ke.strict()), an = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || wt(e) || Array.isArray(e) && e.every(an), $s = (e) => {
|
|
1177
1161
|
var t;
|
|
1178
1162
|
return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
1179
|
-
},
|
|
1180
|
-
icon:
|
|
1181
|
-
renderIcon:
|
|
1163
|
+
}, Bs = ke.extend({
|
|
1164
|
+
icon: d.custom(an, { message: "icon must be a ReactNode" }),
|
|
1165
|
+
renderIcon: d.custom($s, {
|
|
1182
1166
|
message: "renderIcon must be a function of the item, not a React component"
|
|
1183
1167
|
})
|
|
1184
1168
|
}).strict();
|
|
1185
|
-
function
|
|
1186
|
-
return
|
|
1169
|
+
function we() {
|
|
1170
|
+
return d.custom((e) => typeof e == "function", {
|
|
1187
1171
|
message: "Expected a function"
|
|
1188
1172
|
});
|
|
1189
1173
|
}
|
|
1190
|
-
const
|
|
1191
|
-
render:
|
|
1174
|
+
const js = ke.extend({
|
|
1175
|
+
render: d.custom((e) => typeof e == "function", {
|
|
1192
1176
|
message: "render must be a function taking a MetaFieldContext"
|
|
1193
1177
|
})
|
|
1194
|
-
}).strict(),
|
|
1195
|
-
predicate:
|
|
1178
|
+
}).strict(), Gs = ke.extend({
|
|
1179
|
+
predicate: d.custom((e) => typeof e == "function", {
|
|
1196
1180
|
message: "predicate must be a function of the module and a FilterContext"
|
|
1197
1181
|
}),
|
|
1198
|
-
query:
|
|
1199
|
-
clientOnly:
|
|
1200
|
-
}).strict(),
|
|
1201
|
-
formatters:
|
|
1202
|
-
moduleLabel:
|
|
1203
|
-
dateTime:
|
|
1204
|
-
points:
|
|
1205
|
-
progress:
|
|
1182
|
+
query: jn.optional(),
|
|
1183
|
+
clientOnly: d.boolean().optional()
|
|
1184
|
+
}).strict(), Ys = d.object({
|
|
1185
|
+
formatters: d.object({
|
|
1186
|
+
moduleLabel: we(),
|
|
1187
|
+
dateTime: we(),
|
|
1188
|
+
points: we(),
|
|
1189
|
+
progress: we()
|
|
1206
1190
|
}).strict(),
|
|
1207
|
-
itemTypes: ve(
|
|
1191
|
+
itemTypes: ve(Bs),
|
|
1208
1192
|
itemStatuses: Be,
|
|
1209
|
-
itemMeta: ve(
|
|
1210
|
-
filters: ve(
|
|
1193
|
+
itemMeta: ve(js),
|
|
1194
|
+
filters: ve(Gs),
|
|
1211
1195
|
moduleActions: Be,
|
|
1212
1196
|
itemActions: Be,
|
|
1213
|
-
navigation:
|
|
1197
|
+
navigation: d.object({}).strict()
|
|
1214
1198
|
});
|
|
1215
|
-
function
|
|
1216
|
-
const n = Object.keys(t).filter((r) => !
|
|
1199
|
+
function Ws(e, t = {}) {
|
|
1200
|
+
const n = Object.keys(t).filter((r) => !Ae(e, r));
|
|
1217
1201
|
if (n.length > 0)
|
|
1218
1202
|
throw new Error(
|
|
1219
1203
|
`Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
|
|
1220
1204
|
);
|
|
1221
1205
|
const o = {
|
|
1222
1206
|
formatters: Re(e.formatters, t.formatters),
|
|
1223
|
-
itemTypes:
|
|
1224
|
-
itemStatuses:
|
|
1225
|
-
itemMeta:
|
|
1226
|
-
filters:
|
|
1227
|
-
moduleActions:
|
|
1228
|
-
itemActions:
|
|
1207
|
+
itemTypes: ee(e.itemTypes, t.itemTypes),
|
|
1208
|
+
itemStatuses: ee(e.itemStatuses, t.itemStatuses),
|
|
1209
|
+
itemMeta: ee(e.itemMeta, t.itemMeta),
|
|
1210
|
+
filters: ee(e.filters, t.filters),
|
|
1211
|
+
moduleActions: ee(e.moduleActions, t.moduleActions),
|
|
1212
|
+
itemActions: ee(e.itemActions, t.itemActions),
|
|
1229
1213
|
navigation: Re(e.navigation, t.navigation)
|
|
1230
1214
|
};
|
|
1231
|
-
return
|
|
1215
|
+
return Ys.parse(o), o;
|
|
1232
1216
|
}
|
|
1233
|
-
function
|
|
1234
|
-
return
|
|
1217
|
+
function Ol(e = {}) {
|
|
1218
|
+
return Ws(qe, e);
|
|
1235
1219
|
}
|
|
1236
|
-
function
|
|
1237
|
-
const { formatters: e } =
|
|
1238
|
-
return
|
|
1220
|
+
function De() {
|
|
1221
|
+
const { formatters: e } = ye(), { t, locale: n, timezone: o } = B();
|
|
1222
|
+
return N(() => {
|
|
1239
1223
|
const r = { t, locale: n, timezone: o }, s = (l, a) => e.dateTime(l, a, r);
|
|
1240
1224
|
return {
|
|
1241
1225
|
moduleLabel: (l, a) => e.moduleLabel(l, a, r) || null,
|
|
1242
1226
|
dueByline: (l, a) => t("dueByline", { when: s(l, a) }),
|
|
1243
1227
|
unlockByline: (l, a) => t("unlockByline", { when: s(l, a) }),
|
|
1228
|
+
unlockedByline: (l, a) => t("unlockedByline", { when: s(l, a) }),
|
|
1244
1229
|
points: (l) => e.points(l, r),
|
|
1245
|
-
progress: (l, a,
|
|
1230
|
+
progress: (l, a, m) => e.progress(l, a, m, r)
|
|
1246
1231
|
};
|
|
1247
1232
|
}, [e, t, n, o]);
|
|
1248
1233
|
}
|
|
1249
|
-
const
|
|
1250
|
-
all:
|
|
1251
|
-
course: (e) => [...
|
|
1252
|
-
list: (e, t = {}) => [...
|
|
1253
|
-
items: (e, t, n = {}) => [...
|
|
1234
|
+
const tt = 100, un = 100, cn = 100, Qs = 4, Oe = 5 * 60 * 1e3, dn = 20, xe = { hasNextPage: !1, endCursor: null }, te = ["platform-modules"], Se = {
|
|
1235
|
+
all: te,
|
|
1236
|
+
course: (e) => [...te, e],
|
|
1237
|
+
list: (e, t = {}) => [...te, e, "list", t],
|
|
1238
|
+
items: (e, t, n = {}) => [...te, e, "module", t, "items", n]
|
|
1254
1239
|
};
|
|
1255
|
-
function
|
|
1256
|
-
return [...
|
|
1240
|
+
function Hs(e) {
|
|
1241
|
+
return [...te, e, "list"];
|
|
1257
1242
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return [...
|
|
1243
|
+
function mn(e, t) {
|
|
1244
|
+
return [...te, e, "module", t, "items"];
|
|
1260
1245
|
}
|
|
1261
|
-
function
|
|
1246
|
+
function pn(e) {
|
|
1262
1247
|
return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
|
|
1263
1248
|
}
|
|
1264
|
-
function
|
|
1249
|
+
function fn(e) {
|
|
1265
1250
|
const {
|
|
1266
1251
|
courseId: t,
|
|
1267
1252
|
adapter: n,
|
|
@@ -1270,13 +1255,13 @@ function un(e) {
|
|
|
1270
1255
|
filter: s,
|
|
1271
1256
|
inlineItemsFirst: l,
|
|
1272
1257
|
inlineFirst: a,
|
|
1273
|
-
view:
|
|
1274
|
-
staleTime:
|
|
1258
|
+
view: m,
|
|
1259
|
+
staleTime: c,
|
|
1275
1260
|
enabled: u
|
|
1276
1261
|
} = e;
|
|
1277
1262
|
return {
|
|
1278
1263
|
// `inlineItemsFirst` is deliberately out of the key: it is derived from this very list.
|
|
1279
|
-
queryKey:
|
|
1264
|
+
queryKey: Se.list(t, { view: m, pageSize: o, includeItems: r, filter: s }),
|
|
1280
1265
|
initialPageParam: null,
|
|
1281
1266
|
queryFn: ({ pageParam: p, signal: f }) => n.listModules({
|
|
1282
1267
|
courseId: t,
|
|
@@ -1288,46 +1273,46 @@ function un(e) {
|
|
|
1288
1273
|
inlineFirst: a,
|
|
1289
1274
|
signal: f
|
|
1290
1275
|
}),
|
|
1291
|
-
getNextPageParam:
|
|
1276
|
+
getNextPageParam: pn,
|
|
1292
1277
|
enabled: u,
|
|
1293
|
-
staleTime:
|
|
1278
|
+
staleTime: c,
|
|
1294
1279
|
refetchOnWindowFocus: !1
|
|
1295
1280
|
};
|
|
1296
1281
|
}
|
|
1297
|
-
function
|
|
1298
|
-
const { courseId: t, moduleId: n, adapter: o, pageSize: r, view: s, staleTime: l, enabled: a, limit:
|
|
1282
|
+
function gn(e) {
|
|
1283
|
+
const { courseId: t, moduleId: n, adapter: o, pageSize: r, view: s, staleTime: l, enabled: a, limit: m } = e;
|
|
1299
1284
|
return {
|
|
1300
|
-
queryKey:
|
|
1285
|
+
queryKey: Se.items(t, n, { view: s, pageSize: r }),
|
|
1301
1286
|
initialPageParam: null,
|
|
1302
|
-
queryFn: ({ pageParam:
|
|
1303
|
-
const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor:
|
|
1304
|
-
return
|
|
1287
|
+
queryFn: ({ pageParam: c, signal: u }) => {
|
|
1288
|
+
const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor: c, pageSize: r, signal: u });
|
|
1289
|
+
return m ? m(() => {
|
|
1305
1290
|
if (u.aborted)
|
|
1306
1291
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
1307
1292
|
return p();
|
|
1308
1293
|
}) : p();
|
|
1309
1294
|
},
|
|
1310
|
-
getNextPageParam:
|
|
1295
|
+
getNextPageParam: pn,
|
|
1311
1296
|
enabled: a,
|
|
1312
1297
|
staleTime: l,
|
|
1313
1298
|
refetchOnWindowFocus: !1
|
|
1314
1299
|
};
|
|
1315
1300
|
}
|
|
1316
|
-
function
|
|
1317
|
-
var
|
|
1301
|
+
function Vs(e) {
|
|
1302
|
+
var C;
|
|
1318
1303
|
const {
|
|
1319
1304
|
courseId: t,
|
|
1320
1305
|
adapter: n,
|
|
1321
|
-
pageSize: o =
|
|
1306
|
+
pageSize: o = tt,
|
|
1322
1307
|
includeItems: r = !1,
|
|
1323
1308
|
filter: s,
|
|
1324
1309
|
inlineItemsFirst: l,
|
|
1325
1310
|
inlineFirst: a,
|
|
1326
|
-
view:
|
|
1327
|
-
staleTime:
|
|
1311
|
+
view: m,
|
|
1312
|
+
staleTime: c = Oe,
|
|
1328
1313
|
enabled: u = !0
|
|
1329
|
-
} = e, p =
|
|
1330
|
-
|
|
1314
|
+
} = e, p = Ke(
|
|
1315
|
+
fn({
|
|
1331
1316
|
courseId: t,
|
|
1332
1317
|
adapter: n,
|
|
1333
1318
|
pageSize: o,
|
|
@@ -1335,37 +1320,37 @@ function $s(e) {
|
|
|
1335
1320
|
filter: s,
|
|
1336
1321
|
inlineItemsFirst: l,
|
|
1337
1322
|
inlineFirst: a,
|
|
1338
|
-
view:
|
|
1339
|
-
staleTime:
|
|
1323
|
+
view: m,
|
|
1324
|
+
staleTime: c,
|
|
1340
1325
|
enabled: u
|
|
1341
1326
|
})
|
|
1342
|
-
), f = (
|
|
1343
|
-
|
|
1344
|
-
}, [
|
|
1327
|
+
), f = (C = p.data) == null ? void 0 : C.pages, y = N(() => (f ?? []).flatMap((b) => b.modules), [f]), g = f && f.length > 0 ? f[f.length - 1].pageInfo : xe, h = p.fetchNextPage, _ = F(() => {
|
|
1328
|
+
h();
|
|
1329
|
+
}, [h]);
|
|
1345
1330
|
return {
|
|
1346
|
-
modules:
|
|
1347
|
-
pageInfo:
|
|
1348
|
-
hasNextPage:
|
|
1349
|
-
fetchNextPage:
|
|
1331
|
+
modules: y,
|
|
1332
|
+
pageInfo: g,
|
|
1333
|
+
hasNextPage: g.hasNextPage,
|
|
1334
|
+
fetchNextPage: _,
|
|
1350
1335
|
isLoading: p.isLoading,
|
|
1351
1336
|
isFetchingNextPage: p.isFetchingNextPage,
|
|
1352
1337
|
isPending: p.isPending,
|
|
1353
1338
|
error: p.error
|
|
1354
1339
|
};
|
|
1355
1340
|
}
|
|
1356
|
-
function
|
|
1357
|
-
var
|
|
1341
|
+
function Fl(e) {
|
|
1342
|
+
var h;
|
|
1358
1343
|
const {
|
|
1359
1344
|
courseId: t,
|
|
1360
1345
|
moduleId: n,
|
|
1361
1346
|
adapter: o,
|
|
1362
|
-
pageSize: r =
|
|
1347
|
+
pageSize: r = un,
|
|
1363
1348
|
view: s,
|
|
1364
1349
|
enabled: l = !0,
|
|
1365
1350
|
staleTime: a = Oe,
|
|
1366
|
-
limit:
|
|
1367
|
-
} = e,
|
|
1368
|
-
|
|
1351
|
+
limit: m
|
|
1352
|
+
} = e, c = Ke(
|
|
1353
|
+
gn({
|
|
1369
1354
|
courseId: t,
|
|
1370
1355
|
moduleId: n,
|
|
1371
1356
|
adapter: o,
|
|
@@ -1373,22 +1358,22 @@ function vl(e) {
|
|
|
1373
1358
|
view: s,
|
|
1374
1359
|
staleTime: a,
|
|
1375
1360
|
enabled: l,
|
|
1376
|
-
limit:
|
|
1361
|
+
limit: m
|
|
1377
1362
|
})
|
|
1378
|
-
), u = (
|
|
1379
|
-
|
|
1380
|
-
}, [
|
|
1363
|
+
), u = (h = c.data) == null ? void 0 : h.pages, p = N(() => (u ?? []).flatMap((_) => _.items), [u]), f = u && u.length > 0 ? u[u.length - 1].pageInfo : xe, y = c.fetchNextPage, g = F(() => {
|
|
1364
|
+
y();
|
|
1365
|
+
}, [y]);
|
|
1381
1366
|
return {
|
|
1382
1367
|
items: p,
|
|
1383
1368
|
pageInfo: f,
|
|
1384
1369
|
hasNextPage: f.hasNextPage,
|
|
1385
|
-
fetchNextPage:
|
|
1386
|
-
isLoading:
|
|
1387
|
-
isFetchingNextPage:
|
|
1388
|
-
error:
|
|
1370
|
+
fetchNextPage: g,
|
|
1371
|
+
isLoading: c.isLoading,
|
|
1372
|
+
isFetchingNextPage: c.isFetchingNextPage,
|
|
1373
|
+
error: c.error
|
|
1389
1374
|
};
|
|
1390
1375
|
}
|
|
1391
|
-
function
|
|
1376
|
+
function Ks(e, t, n = Xe) {
|
|
1392
1377
|
if (e.pageInfo.hasNextPage) return "onDemand";
|
|
1393
1378
|
let o = 0, r = 0;
|
|
1394
1379
|
for (const s of e.modules) {
|
|
@@ -1397,27 +1382,27 @@ function Bs(e, t, n = Ze) {
|
|
|
1397
1382
|
}
|
|
1398
1383
|
return o > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
|
|
1399
1384
|
}
|
|
1400
|
-
function
|
|
1401
|
-
var
|
|
1385
|
+
function Zs(e) {
|
|
1386
|
+
var y;
|
|
1402
1387
|
const {
|
|
1403
1388
|
courseId: t,
|
|
1404
1389
|
adapter: n,
|
|
1405
1390
|
mode: o = "auto",
|
|
1406
|
-
inlineThreshold: r =
|
|
1407
|
-
nodeBudget: s = n.inlineNodeBudget ??
|
|
1408
|
-
pageSize: l =
|
|
1391
|
+
inlineThreshold: r = cn,
|
|
1392
|
+
nodeBudget: s = n.inlineNodeBudget ?? Xe,
|
|
1393
|
+
pageSize: l = tt,
|
|
1409
1394
|
filter: a,
|
|
1410
|
-
view:
|
|
1411
|
-
staleTime:
|
|
1412
|
-
} = e, u = o === "auto", p =
|
|
1413
|
-
|
|
1395
|
+
view: m,
|
|
1396
|
+
staleTime: c = Oe
|
|
1397
|
+
} = e, u = o === "auto", p = Ke(
|
|
1398
|
+
fn({
|
|
1414
1399
|
courseId: t,
|
|
1415
1400
|
adapter: n,
|
|
1416
1401
|
pageSize: l,
|
|
1417
1402
|
includeItems: !1,
|
|
1418
1403
|
filter: a,
|
|
1419
|
-
view:
|
|
1420
|
-
staleTime:
|
|
1404
|
+
view: m,
|
|
1405
|
+
staleTime: c,
|
|
1421
1406
|
enabled: u
|
|
1422
1407
|
})
|
|
1423
1408
|
);
|
|
@@ -1437,238 +1422,253 @@ function js(e) {
|
|
|
1437
1422
|
error: p.error,
|
|
1438
1423
|
inlineShape: null
|
|
1439
1424
|
};
|
|
1440
|
-
const f = (
|
|
1425
|
+
const f = (y = p.data) == null ? void 0 : y.pages[0];
|
|
1441
1426
|
return f ? {
|
|
1442
|
-
resolvedMode:
|
|
1427
|
+
resolvedMode: Ks(f, r, s),
|
|
1443
1428
|
isResolving: !1,
|
|
1444
1429
|
probed: !0,
|
|
1445
1430
|
error: null,
|
|
1446
|
-
inlineShape:
|
|
1431
|
+
inlineShape: Xs(f)
|
|
1447
1432
|
} : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
|
|
1448
1433
|
}
|
|
1449
|
-
function
|
|
1434
|
+
function Xs(e) {
|
|
1450
1435
|
let t = 1;
|
|
1451
1436
|
for (const n of e.modules)
|
|
1452
1437
|
n.itemCount > t && (t = n.itemCount);
|
|
1453
1438
|
return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
|
|
1454
1439
|
}
|
|
1455
|
-
const
|
|
1456
|
-
function
|
|
1457
|
-
const o =
|
|
1458
|
-
|
|
1440
|
+
const Mt = "\0", Js = /* @__PURE__ */ new Map();
|
|
1441
|
+
function ei(e, t, n = dn) {
|
|
1442
|
+
const o = kt(), r = $(/* @__PURE__ */ new Map()), [s, l] = Le(Js), a = e.join(Mt), m = N(() => a === "" ? [] : a.split(Mt), [a]);
|
|
1443
|
+
Ie(() => {
|
|
1459
1444
|
const u = r.current, p = () => {
|
|
1460
|
-
l((
|
|
1461
|
-
const
|
|
1462
|
-
let
|
|
1463
|
-
for (const [
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1445
|
+
l((g) => {
|
|
1446
|
+
const h = /* @__PURE__ */ new Map();
|
|
1447
|
+
let _ = g.size !== u.size;
|
|
1448
|
+
for (const [C, b] of u) {
|
|
1449
|
+
const w = b.getCurrentResult();
|
|
1450
|
+
h.set(C, w), !_ && g.get(C) !== w && (_ = !0);
|
|
1466
1451
|
}
|
|
1467
|
-
return
|
|
1452
|
+
return _ ? h : g;
|
|
1468
1453
|
});
|
|
1469
|
-
}, f = new Set(
|
|
1470
|
-
for (const
|
|
1471
|
-
if (u.has(
|
|
1472
|
-
const
|
|
1454
|
+
}, f = new Set(m);
|
|
1455
|
+
for (const g of m) {
|
|
1456
|
+
if (u.has(g)) continue;
|
|
1457
|
+
const h = new qn(
|
|
1473
1458
|
o,
|
|
1474
|
-
t(
|
|
1459
|
+
t(g, !0)
|
|
1475
1460
|
);
|
|
1476
|
-
u.set(
|
|
1461
|
+
u.set(g, h), h.subscribe(p);
|
|
1477
1462
|
}
|
|
1478
|
-
for (const [
|
|
1479
|
-
|
|
1480
|
-
for (const
|
|
1481
|
-
const
|
|
1482
|
-
|
|
1463
|
+
for (const [g, h] of u)
|
|
1464
|
+
h.setOptions(t(g, f.has(g)));
|
|
1465
|
+
for (const g of m) {
|
|
1466
|
+
const h = u.get(g);
|
|
1467
|
+
h && (u.delete(g), u.set(g, h));
|
|
1483
1468
|
}
|
|
1484
|
-
let
|
|
1485
|
-
if (
|
|
1486
|
-
for (const [
|
|
1487
|
-
if (
|
|
1488
|
-
f.has(
|
|
1469
|
+
let y = u.size - f.size;
|
|
1470
|
+
if (y > n)
|
|
1471
|
+
for (const [g, h] of u) {
|
|
1472
|
+
if (y <= n) break;
|
|
1473
|
+
f.has(g) || (h.destroy(), u.delete(g), y -= 1);
|
|
1489
1474
|
}
|
|
1490
1475
|
p();
|
|
1491
|
-
}, [o, t,
|
|
1476
|
+
}, [o, t, m, n]), Ie(() => {
|
|
1492
1477
|
const u = r.current;
|
|
1493
1478
|
return () => {
|
|
1494
1479
|
for (const p of u.values()) p.destroy();
|
|
1495
1480
|
u.clear();
|
|
1496
1481
|
};
|
|
1497
1482
|
}, []);
|
|
1498
|
-
const
|
|
1483
|
+
const c = F((u) => {
|
|
1499
1484
|
var p;
|
|
1500
1485
|
(p = r.current.get(u)) == null || p.fetchNextPage();
|
|
1501
1486
|
}, []);
|
|
1502
|
-
return { results: s, fetchNextPage:
|
|
1487
|
+
return { results: s, fetchNextPage: c };
|
|
1503
1488
|
}
|
|
1504
|
-
const
|
|
1489
|
+
const ti = [], ni = () => {
|
|
1505
1490
|
};
|
|
1506
|
-
function
|
|
1507
|
-
var
|
|
1491
|
+
function Ul(e) {
|
|
1492
|
+
var Ee, x;
|
|
1508
1493
|
const {
|
|
1509
1494
|
courseId: t,
|
|
1510
1495
|
adapter: n,
|
|
1511
1496
|
view: o,
|
|
1512
1497
|
itemsMode: r = "auto",
|
|
1513
|
-
inlineThreshold: s =
|
|
1514
|
-
pageSize: l =
|
|
1515
|
-
itemPageSize: a =
|
|
1516
|
-
itemConcurrency:
|
|
1517
|
-
retainCollapsedLimit:
|
|
1498
|
+
inlineThreshold: s = cn,
|
|
1499
|
+
pageSize: l = tt,
|
|
1500
|
+
itemPageSize: a = un,
|
|
1501
|
+
itemConcurrency: m = Qs,
|
|
1502
|
+
retainCollapsedLimit: c = dn,
|
|
1518
1503
|
staleTime: u = Oe,
|
|
1519
1504
|
initialExpandedModuleIds: p,
|
|
1520
|
-
initialFilter: f =
|
|
1521
|
-
} = e,
|
|
1522
|
-
() =>
|
|
1523
|
-
[
|
|
1524
|
-
),
|
|
1505
|
+
initialFilter: f = V
|
|
1506
|
+
} = e, y = kt(), g = ye(), [h, _] = Le(f), C = N(
|
|
1507
|
+
() => zs(g.filters, n.capabilities),
|
|
1508
|
+
[g.filters, n.capabilities]
|
|
1509
|
+
), b = ne(C, h), w = Je(b), k = Zs({
|
|
1525
1510
|
courseId: t,
|
|
1526
1511
|
adapter: n,
|
|
1527
1512
|
mode: r,
|
|
1528
1513
|
inlineThreshold: s,
|
|
1529
1514
|
pageSize: l,
|
|
1530
|
-
filter:
|
|
1515
|
+
filter: w,
|
|
1531
1516
|
view: o,
|
|
1532
1517
|
staleTime: u
|
|
1533
|
-
}),
|
|
1518
|
+
}), q = k.resolvedMode, A = Vs({
|
|
1534
1519
|
courseId: t,
|
|
1535
1520
|
adapter: n,
|
|
1536
1521
|
pageSize: l,
|
|
1537
|
-
filter:
|
|
1522
|
+
filter: w,
|
|
1538
1523
|
view: o,
|
|
1539
1524
|
staleTime: u,
|
|
1540
|
-
includeItems:
|
|
1541
|
-
inlineItemsFirst: (
|
|
1542
|
-
inlineFirst: (
|
|
1543
|
-
enabled:
|
|
1544
|
-
}), [
|
|
1525
|
+
includeItems: q === "inline",
|
|
1526
|
+
inlineItemsFirst: (Ee = k.inlineShape) == null ? void 0 : Ee.maxItemCount,
|
|
1527
|
+
inlineFirst: (x = k.inlineShape) == null ? void 0 : x.moduleCount,
|
|
1528
|
+
enabled: q !== null
|
|
1529
|
+
}), [D, j] = Le(
|
|
1545
1530
|
() => p ?? []
|
|
1546
|
-
),
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1531
|
+
), Q = p === void 0, O = $(!1), R = h !== V && b !== void 0;
|
|
1532
|
+
Ie(() => {
|
|
1533
|
+
!Q || O.current || R || j((I) => {
|
|
1534
|
+
const M = new Set(I), v = [...I];
|
|
1535
|
+
for (const W of A.modules)
|
|
1536
|
+
W.collapsed === !1 && !M.has(W.id) && v.push(W.id);
|
|
1537
|
+
return v.length === I.length ? I : v;
|
|
1538
|
+
});
|
|
1539
|
+
}, [A.modules, Q, R]);
|
|
1540
|
+
const G = N(() => {
|
|
1541
|
+
const I = /* @__PURE__ */ new Map();
|
|
1542
|
+
for (const M of A.modules) I.set(M.id, M);
|
|
1543
|
+
return I;
|
|
1544
|
+
}, [A.modules]), se = N(
|
|
1545
|
+
() => D.filter((I) => {
|
|
1546
|
+
const M = G.get(I);
|
|
1547
|
+
return M !== void 0 && M.items === void 0;
|
|
1554
1548
|
}),
|
|
1555
|
-
[
|
|
1556
|
-
),
|
|
1557
|
-
(
|
|
1549
|
+
[D, G]
|
|
1550
|
+
), ie = N(() => new Set(se), [se]), le = N(() => kn(m), [m]), Ue = F(
|
|
1551
|
+
(I, M) => gn({
|
|
1558
1552
|
courseId: t,
|
|
1559
|
-
moduleId:
|
|
1553
|
+
moduleId: I,
|
|
1560
1554
|
adapter: n,
|
|
1561
1555
|
pageSize: a,
|
|
1562
1556
|
view: o,
|
|
1563
1557
|
staleTime: u,
|
|
1564
|
-
enabled:
|
|
1565
|
-
limit:
|
|
1558
|
+
enabled: M,
|
|
1559
|
+
limit: le
|
|
1566
1560
|
}),
|
|
1567
|
-
[t, n, a, o, u,
|
|
1568
|
-
),
|
|
1569
|
-
(
|
|
1570
|
-
let
|
|
1571
|
-
return
|
|
1561
|
+
[t, n, a, o, u, le]
|
|
1562
|
+
), K = ei(se, Ue, c), ae = K.fetchNextPage, L = $(/* @__PURE__ */ new Map()), ue = F(
|
|
1563
|
+
(I) => {
|
|
1564
|
+
let M = L.current.get(I);
|
|
1565
|
+
return M || (M = () => ae(I), L.current.set(I, M)), M;
|
|
1572
1566
|
},
|
|
1573
|
-
[
|
|
1574
|
-
),
|
|
1575
|
-
|
|
1576
|
-
(
|
|
1567
|
+
[ae]
|
|
1568
|
+
), Z = F((I) => {
|
|
1569
|
+
O.current = !0, j(
|
|
1570
|
+
(M) => M.includes(I) ? M : [...M, I]
|
|
1577
1571
|
);
|
|
1578
|
-
}, []),
|
|
1579
|
-
(
|
|
1580
|
-
|
|
1572
|
+
}, []), U = F(
|
|
1573
|
+
(I) => {
|
|
1574
|
+
O.current = !0, j((M) => M.filter((v) => v !== I)), y.cancelQueries({ queryKey: mn(t, I) });
|
|
1581
1575
|
},
|
|
1582
|
-
[
|
|
1583
|
-
),
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1576
|
+
[y, t]
|
|
1577
|
+
), Y = $(D);
|
|
1578
|
+
Y.current = D;
|
|
1579
|
+
const X = F(() => {
|
|
1580
|
+
O.current = !0;
|
|
1581
|
+
for (const I of Y.current) U(I);
|
|
1582
|
+
}, [U]), ce = $(h);
|
|
1583
|
+
ce.current = h;
|
|
1584
|
+
const z = $(null), de = F(
|
|
1585
|
+
(I) => {
|
|
1586
|
+
if (I === ce.current) return;
|
|
1587
|
+
if (ce.current = I, I !== V && ne(C, I) !== void 0) {
|
|
1588
|
+
z.current === null && (z.current = Y.current);
|
|
1589
|
+
const v = O.current;
|
|
1590
|
+
for (const W of Y.current) U(W);
|
|
1591
|
+
O.current = v;
|
|
1592
|
+
} else z.current !== null && (j(z.current), Y.current = z.current, z.current = null);
|
|
1593
|
+
_(I);
|
|
1595
1594
|
},
|
|
1596
|
-
[
|
|
1597
|
-
),
|
|
1598
|
-
(
|
|
1599
|
-
|
|
1595
|
+
[C, U]
|
|
1596
|
+
), ze = F(
|
|
1597
|
+
(I) => {
|
|
1598
|
+
Y.current.includes(I) ? U(I) : Z(I);
|
|
1600
1599
|
},
|
|
1601
|
-
[
|
|
1602
|
-
),
|
|
1603
|
-
(
|
|
1604
|
-
var
|
|
1605
|
-
const
|
|
1606
|
-
if (
|
|
1607
|
-
return
|
|
1608
|
-
const
|
|
1609
|
-
if ((
|
|
1610
|
-
return
|
|
1611
|
-
items:
|
|
1612
|
-
pageInfo:
|
|
1600
|
+
[U, Z]
|
|
1601
|
+
), _e = K.results, me = $(/* @__PURE__ */ new Map()), Te = F(
|
|
1602
|
+
(I) => {
|
|
1603
|
+
var st;
|
|
1604
|
+
const M = G.get(I), v = _e.get(I), W = ie.has(I), pe = me.current.get(I);
|
|
1605
|
+
if (pe && pe.items === (M == null ? void 0 : M.items) && pe.result === v && pe.active === W)
|
|
1606
|
+
return pe.value;
|
|
1607
|
+
const ot = (Pe) => (me.current.set(I, { items: M == null ? void 0 : M.items, result: v, active: W, value: Pe }), Pe);
|
|
1608
|
+
if ((M == null ? void 0 : M.items) !== void 0)
|
|
1609
|
+
return ot({
|
|
1610
|
+
items: M.items,
|
|
1611
|
+
pageInfo: xe,
|
|
1613
1612
|
hasNextPage: !1,
|
|
1614
|
-
fetchNextPage:
|
|
1613
|
+
fetchNextPage: ni,
|
|
1615
1614
|
isLoading: !1,
|
|
1616
1615
|
isFetchingNextPage: !1,
|
|
1617
1616
|
error: null,
|
|
1618
1617
|
source: "inline"
|
|
1619
1618
|
});
|
|
1620
|
-
const
|
|
1621
|
-
return
|
|
1622
|
-
items:
|
|
1623
|
-
pageInfo:
|
|
1624
|
-
hasNextPage:
|
|
1625
|
-
fetchNextPage:
|
|
1626
|
-
isLoading: v ? v.isLoading :
|
|
1619
|
+
const J = (st = v == null ? void 0 : v.data) == null ? void 0 : st.pages, En = J ? J.flatMap((Pe) => Pe.items) : ti, rt = J && J.length > 0 ? J[J.length - 1].pageInfo : xe;
|
|
1620
|
+
return ot({
|
|
1621
|
+
items: En,
|
|
1622
|
+
pageInfo: rt,
|
|
1623
|
+
hasNextPage: rt.hasNextPage,
|
|
1624
|
+
fetchNextPage: ue(I),
|
|
1625
|
+
isLoading: v ? v.isLoading : W,
|
|
1627
1626
|
isFetchingNextPage: (v == null ? void 0 : v.isFetchingNextPage) ?? !1,
|
|
1628
1627
|
error: (v == null ? void 0 : v.error) ?? null,
|
|
1629
1628
|
source: "onDemand"
|
|
1630
1629
|
});
|
|
1631
1630
|
},
|
|
1632
|
-
[G,
|
|
1631
|
+
[G, _e, ue, ie]
|
|
1633
1632
|
);
|
|
1634
1633
|
return {
|
|
1635
|
-
modules:
|
|
1636
|
-
pageInfo:
|
|
1637
|
-
hasNextPage:
|
|
1638
|
-
fetchNextPage:
|
|
1639
|
-
isLoading:
|
|
1640
|
-
isFetchingNextPage:
|
|
1641
|
-
error:
|
|
1642
|
-
itemsMode:
|
|
1643
|
-
getItems:
|
|
1644
|
-
expandModule:
|
|
1645
|
-
collapseModule:
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1634
|
+
modules: A.modules,
|
|
1635
|
+
pageInfo: A.pageInfo,
|
|
1636
|
+
hasNextPage: A.hasNextPage,
|
|
1637
|
+
fetchNextPage: A.fetchNextPage,
|
|
1638
|
+
isLoading: k.isResolving || A.isPending,
|
|
1639
|
+
isFetchingNextPage: A.isFetchingNextPage,
|
|
1640
|
+
error: A.error ?? k.error,
|
|
1641
|
+
itemsMode: q,
|
|
1642
|
+
getItems: Te,
|
|
1643
|
+
expandModule: Z,
|
|
1644
|
+
collapseModule: U,
|
|
1645
|
+
collapseAllModules: X,
|
|
1646
|
+
toggleModule: ze,
|
|
1647
|
+
expandedModuleIds: D,
|
|
1648
|
+
filter: h,
|
|
1649
|
+
setFilter: de,
|
|
1650
|
+
filterEntry: b,
|
|
1651
|
+
filterPredicate: We(b) ? b == null ? void 0 : b.predicate : void 0,
|
|
1652
|
+
filterResultsArePartial: h !== V && We(b) && A.hasNextPage
|
|
1653
1653
|
};
|
|
1654
1654
|
}
|
|
1655
|
-
function
|
|
1656
|
-
const r = o ?
|
|
1655
|
+
function zl(e, t, n, o) {
|
|
1656
|
+
const r = o ? Se.items(t, n, o) : mn(t, n);
|
|
1657
1657
|
return e.invalidateQueries({ queryKey: r });
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1660
|
-
const o = n ?
|
|
1659
|
+
function $l(e, t, n) {
|
|
1660
|
+
const o = n ? Se.list(t, n) : Hs(t);
|
|
1661
1661
|
return e.invalidateQueries({ queryKey: o });
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return e.invalidateQueries({ queryKey:
|
|
1663
|
+
function Bl(e, t) {
|
|
1664
|
+
return e.invalidateQueries({ queryKey: Se.course(t) });
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1667
|
-
const { t: o } =
|
|
1668
|
-
return /* @__PURE__ */
|
|
1666
|
+
function oi({ value: e, onChange: t, describedBy: n }) {
|
|
1667
|
+
const { t: o } = B(), r = ye(), s = N(() => et(r.filters), [r.filters]), l = vt();
|
|
1668
|
+
return /* @__PURE__ */ S(E, { as: "div", margin: "medium 0 0 0", children: [
|
|
1669
1669
|
/* @__PURE__ */ i(E, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ i(P, { size: "medium", weight: "bold", id: l, children: o("filterGroupLabel") }) }),
|
|
1670
1670
|
/* @__PURE__ */ i(
|
|
1671
|
-
|
|
1671
|
+
T,
|
|
1672
1672
|
{
|
|
1673
1673
|
gap: "space4",
|
|
1674
1674
|
wrap: "wrap",
|
|
@@ -1677,14 +1677,14 @@ function Vs({ value: e, onChange: t, describedBy: n }) {
|
|
|
1677
1677
|
"aria-labelledby": l,
|
|
1678
1678
|
"data-testid": "filter-chips",
|
|
1679
1679
|
children: s.map((a) => {
|
|
1680
|
-
const
|
|
1681
|
-
return /* @__PURE__ */ i(
|
|
1682
|
-
|
|
1680
|
+
const m = a.key === e;
|
|
1681
|
+
return /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
|
|
1682
|
+
he,
|
|
1683
1683
|
{
|
|
1684
1684
|
size: "medium",
|
|
1685
|
-
color:
|
|
1686
|
-
"aria-pressed":
|
|
1687
|
-
"aria-describedby": a.key !==
|
|
1685
|
+
color: m ? "primary" : "secondary",
|
|
1686
|
+
"aria-pressed": m,
|
|
1687
|
+
"aria-describedby": a.key !== V && We(a) ? n : void 0,
|
|
1688
1688
|
onClick: () => t(a.key),
|
|
1689
1689
|
"data-testid": `filter-chip-${a.key}`,
|
|
1690
1690
|
themeOverride: { borderRadius: "0.5rem" },
|
|
@@ -1696,31 +1696,29 @@ function Vs({ value: e, onChange: t, describedBy: n }) {
|
|
|
1696
1696
|
)
|
|
1697
1697
|
] });
|
|
1698
1698
|
}
|
|
1699
|
-
const
|
|
1699
|
+
const ri = "#586874", si = "#D7DADE", hn = (e, t) => {
|
|
1700
1700
|
var n, o, r, s;
|
|
1701
1701
|
return {
|
|
1702
|
-
baseTextColor: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey5782) ??
|
|
1703
|
-
baseBorderColor: ((s = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : s.grey1424) ??
|
|
1702
|
+
baseTextColor: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey5782) ?? ri,
|
|
1703
|
+
baseBorderColor: ((s = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : s.grey1424) ?? si
|
|
1704
1704
|
};
|
|
1705
|
-
},
|
|
1705
|
+
}, ii = {
|
|
1706
1706
|
not_started: {},
|
|
1707
|
-
in_progress: { color: "info", icon: /* @__PURE__ */ i(
|
|
1708
|
-
complete: { color: "success", icon: /* @__PURE__ */ i(
|
|
1709
|
-
missing: { color: "error", icon: /* @__PURE__ */ i(
|
|
1710
|
-
incomplete: { color: "error", icon: /* @__PURE__ */ i(
|
|
1711
|
-
missing_and_incomplete: { color: "error", icon: /* @__PURE__ */ i(
|
|
1712
|
-
locked: { icon: /* @__PURE__ */ i(
|
|
1713
|
-
},
|
|
1707
|
+
in_progress: { color: "info", icon: /* @__PURE__ */ i(Nt, { size: "sm" }) },
|
|
1708
|
+
complete: { color: "success", icon: /* @__PURE__ */ i(xt, { size: "sm" }) },
|
|
1709
|
+
missing: { color: "error", icon: /* @__PURE__ */ i(ge, { size: "sm" }) },
|
|
1710
|
+
incomplete: { color: "error", icon: /* @__PURE__ */ i(ge, { size: "sm" }) },
|
|
1711
|
+
missing_and_incomplete: { color: "error", icon: /* @__PURE__ */ i(ge, { size: "sm" }) },
|
|
1712
|
+
locked: { icon: /* @__PURE__ */ i(Rt, { size: "sm" }), themeOverride: hn }
|
|
1713
|
+
}, li = {
|
|
1714
1714
|
not_started: {},
|
|
1715
|
-
in_progress: { color: "info", icon: /* @__PURE__ */ i(
|
|
1716
|
-
complete: { color: "success", icon: /* @__PURE__ */ i(
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
missing: { color: "error", icon: /* @__PURE__ */ i(we, {}) },
|
|
1721
|
-
locked: { icon: /* @__PURE__ */ i(Ct, {}), themeOverride: dn }
|
|
1715
|
+
in_progress: { color: "info", icon: /* @__PURE__ */ i(Nt, { size: "sm" }) },
|
|
1716
|
+
complete: { color: "success", icon: /* @__PURE__ */ i(xt, { size: "sm" }) },
|
|
1717
|
+
incomplete: { color: "error", icon: /* @__PURE__ */ i(ge, { size: "sm" }) },
|
|
1718
|
+
missing: { color: "error", icon: /* @__PURE__ */ i(ge, { size: "sm" }) },
|
|
1719
|
+
locked: { icon: /* @__PURE__ */ i(Rt, { size: "sm" }), themeOverride: hn }
|
|
1722
1720
|
};
|
|
1723
|
-
function
|
|
1721
|
+
function ai(e, t, n, o) {
|
|
1724
1722
|
switch (t) {
|
|
1725
1723
|
case "not_started":
|
|
1726
1724
|
return e("moduleStatusNotStarted");
|
|
@@ -1741,7 +1739,7 @@ function ei(e, t, n, o) {
|
|
|
1741
1739
|
return e("moduleStatusLocked");
|
|
1742
1740
|
}
|
|
1743
1741
|
}
|
|
1744
|
-
function
|
|
1742
|
+
function ui(e, t) {
|
|
1745
1743
|
switch (t) {
|
|
1746
1744
|
case "not_started":
|
|
1747
1745
|
return e("itemStatusNotStarted");
|
|
@@ -1749,21 +1747,17 @@ function ti(e, t) {
|
|
|
1749
1747
|
return e("itemStatusInProgress");
|
|
1750
1748
|
case "complete":
|
|
1751
1749
|
return e("itemStatusComplete");
|
|
1752
|
-
case "
|
|
1753
|
-
return e("
|
|
1754
|
-
case "graded":
|
|
1755
|
-
return e("itemStatusGraded");
|
|
1756
|
-
case "excused":
|
|
1757
|
-
return e("itemStatusExcused");
|
|
1750
|
+
case "incomplete":
|
|
1751
|
+
return e("itemStatusIncomplete");
|
|
1758
1752
|
case "missing":
|
|
1759
1753
|
return e("itemStatusMissing");
|
|
1760
1754
|
case "locked":
|
|
1761
1755
|
return e("itemStatusLocked");
|
|
1762
1756
|
}
|
|
1763
1757
|
}
|
|
1764
|
-
function
|
|
1758
|
+
function In(e, t, n) {
|
|
1765
1759
|
return /* @__PURE__ */ i(
|
|
1766
|
-
|
|
1760
|
+
$n,
|
|
1767
1761
|
{
|
|
1768
1762
|
color: e.color,
|
|
1769
1763
|
renderIcon: e.icon,
|
|
@@ -1773,53 +1767,63 @@ function mn(e, t, n) {
|
|
|
1773
1767
|
}
|
|
1774
1768
|
);
|
|
1775
1769
|
}
|
|
1776
|
-
function
|
|
1770
|
+
function ci({
|
|
1777
1771
|
status: e,
|
|
1778
1772
|
missingCount: t,
|
|
1779
1773
|
incompleteCount: n
|
|
1780
1774
|
}) {
|
|
1781
|
-
const { t: o } =
|
|
1782
|
-
return
|
|
1783
|
-
|
|
1784
|
-
|
|
1775
|
+
const { t: o } = B();
|
|
1776
|
+
return In(
|
|
1777
|
+
ii[e],
|
|
1778
|
+
ai(o, e, t, n),
|
|
1785
1779
|
"module-status-pill"
|
|
1786
1780
|
);
|
|
1787
1781
|
}
|
|
1788
|
-
function
|
|
1789
|
-
const { t } =
|
|
1790
|
-
return
|
|
1791
|
-
|
|
1792
|
-
|
|
1782
|
+
function di({ status: e }) {
|
|
1783
|
+
const { t } = B();
|
|
1784
|
+
return In(
|
|
1785
|
+
li[e],
|
|
1786
|
+
ui(t, e),
|
|
1793
1787
|
"item-status-pill"
|
|
1794
1788
|
);
|
|
1795
1789
|
}
|
|
1796
|
-
const
|
|
1790
|
+
const bn = 2.75, je = `${bn}rem`, mi = { lineHeight: 0, display: "block" }, pi = {
|
|
1797
1791
|
display: "inline-block",
|
|
1798
1792
|
paddingLeft: "0.5rem",
|
|
1799
1793
|
marginLeft: "0.5rem"
|
|
1800
|
-
},
|
|
1794
|
+
}, fi = "#D7DADE", gi = "#6A7883", Mn = { fontSize: 0 };
|
|
1801
1795
|
function Qe(e) {
|
|
1802
|
-
return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(Qe) :
|
|
1796
|
+
return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(Qe) : wt(e) && e.type === At ? Qe(e.props.children) : !1;
|
|
1803
1797
|
}
|
|
1804
|
-
const
|
|
1798
|
+
const hi = {
|
|
1805
1799
|
contentVisibility: "auto",
|
|
1806
|
-
containIntrinsicSize: "auto
|
|
1807
|
-
};
|
|
1808
|
-
function
|
|
1809
|
-
const e =
|
|
1800
|
+
containIntrinsicSize: "auto 4.25rem"
|
|
1801
|
+
}, Ii = "0.5rem";
|
|
1802
|
+
function bi() {
|
|
1803
|
+
const e = $t();
|
|
1810
1804
|
return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
|
|
1811
1805
|
}
|
|
1812
|
-
function
|
|
1813
|
-
var
|
|
1814
|
-
const
|
|
1815
|
-
return ("colors" in
|
|
1816
|
-
}
|
|
1817
|
-
function
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
() => ({ ...
|
|
1821
|
-
[
|
|
1822
|
-
)
|
|
1806
|
+
function yn(e, t) {
|
|
1807
|
+
var o, r;
|
|
1808
|
+
const n = $t();
|
|
1809
|
+
return ("colors" in n ? (r = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : r[e] : void 0) ?? t;
|
|
1810
|
+
}
|
|
1811
|
+
function Sn() {
|
|
1812
|
+
const e = yn("grey1424", fi);
|
|
1813
|
+
return N(
|
|
1814
|
+
() => ({ ...pi, borderLeft: `1px solid ${e}` }),
|
|
1815
|
+
[e]
|
|
1816
|
+
);
|
|
1817
|
+
}
|
|
1818
|
+
function Mi({
|
|
1819
|
+
item: e,
|
|
1820
|
+
today: t,
|
|
1821
|
+
navigation: n,
|
|
1822
|
+
attachedAbove: o,
|
|
1823
|
+
attachedBelow: r
|
|
1824
|
+
}) {
|
|
1825
|
+
var O;
|
|
1826
|
+
const { t: s, locale: l, timezone: a } = B(), m = bi(), c = yn("grey4570", gi), u = Sn(), p = De(), f = ye(), y = N(() => et(f.itemMeta), [f.itemMeta]), g = e.title || s("itemUntitled");
|
|
1823
1827
|
if (e.type === "sub_header")
|
|
1824
1828
|
return /* @__PURE__ */ i(
|
|
1825
1829
|
E,
|
|
@@ -1837,121 +1841,132 @@ function mi({ item: e, today: t, navigation: n }) {
|
|
|
1837
1841
|
letterSpacing: "expanded",
|
|
1838
1842
|
"data-testid": "module-item-title",
|
|
1839
1843
|
"data-sub-header": "true",
|
|
1840
|
-
children:
|
|
1844
|
+
children: g
|
|
1841
1845
|
}
|
|
1842
1846
|
)
|
|
1843
1847
|
}
|
|
1844
1848
|
);
|
|
1845
|
-
const
|
|
1846
|
-
return /* @__PURE__ */ i("div", { style: {
|
|
1849
|
+
const h = ((O = n == null ? void 0 : n.getItemHref) == null ? void 0 : O.call(n, e)) ?? e.url ?? null, _ = e.status === "locked", C = n == null ? void 0 : n.onItemClick, b = C ? (R) => C(e, R) : void 0, w = ne(f.itemTypes, e.type), k = w != null && w.renderIcon ? w.renderIcon({ item: e }) : w == null ? void 0 : w.icon, q = { item: e, t: s, today: t, locale: l, timezone: a, formatters: p, config: f }, A = y.map((R) => ({ key: R.key, node: R.render(q) })).filter((R) => !Qe(R.node)), D = A.some((R) => R.key === Ds), j = o ? "none" : "large", Q = r ? "none" : "large";
|
|
1850
|
+
return /* @__PURE__ */ i("div", { style: { ...hi, marginTop: o ? void 0 : Ii }, children: /* @__PURE__ */ i(
|
|
1847
1851
|
E,
|
|
1848
1852
|
{
|
|
1849
1853
|
as: "div",
|
|
1850
1854
|
background: "secondary",
|
|
1851
|
-
borderRadius:
|
|
1852
|
-
padding: "
|
|
1853
|
-
margin: "x-small 0 0 0",
|
|
1855
|
+
borderRadius: `${j} ${j} ${Q} ${Q}`,
|
|
1856
|
+
padding: "small",
|
|
1854
1857
|
"data-testid": `module-item-${e.id}`,
|
|
1855
|
-
children: /* @__PURE__ */
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
/* @__PURE__ */ i(
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1858
|
+
children: /* @__PURE__ */ i("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * bn}rem` }, children: /* @__PURE__ */ S(T, { alignItems: "center", gap: "mediumSmall", children: [
|
|
1859
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(T, { alignItems: "center", children: [
|
|
1860
|
+
e.indent > 0 ? /* @__PURE__ */ i(T.Item, { size: je, textAlign: "center", "data-testid": "item-nest-arrow", children: /* @__PURE__ */ i("span", { style: { color: c }, children: /* @__PURE__ */ i(xn, { size: "md", color: "inherit" }) }) }) : null,
|
|
1861
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
|
|
1862
|
+
E,
|
|
1863
|
+
{
|
|
1864
|
+
as: "div",
|
|
1865
|
+
background: "primary",
|
|
1866
|
+
borderWidth: "small",
|
|
1867
|
+
borderRadius: "large",
|
|
1868
|
+
width: je,
|
|
1869
|
+
height: je,
|
|
1870
|
+
children: /* @__PURE__ */ i(T, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ S(T.Item, { children: [
|
|
1871
|
+
/* @__PURE__ */ i("span", { style: mi, "data-testid": "item-type-icon", children: k }),
|
|
1872
|
+
w && !D ? /* @__PURE__ */ i(lt, { children: s(w.label) }) : null
|
|
1873
|
+
] }) })
|
|
1874
|
+
}
|
|
1875
|
+
) })
|
|
1876
|
+
] }) }),
|
|
1877
|
+
/* @__PURE__ */ S(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1878
|
+
/* @__PURE__ */ i(E, { as: "div", children: _ || !h ? /* @__PURE__ */ i(
|
|
1874
1879
|
P,
|
|
1875
1880
|
{
|
|
1876
1881
|
weight: "bold",
|
|
1877
|
-
size: "
|
|
1878
|
-
|
|
1882
|
+
size: "medium",
|
|
1883
|
+
lineHeight: "condensed",
|
|
1884
|
+
color: _ ? "secondary" : "primary",
|
|
1879
1885
|
"data-testid": "module-item-title",
|
|
1880
|
-
"data-locked":
|
|
1881
|
-
children:
|
|
1886
|
+
"data-locked": _ ? "true" : void 0,
|
|
1887
|
+
children: g
|
|
1882
1888
|
}
|
|
1883
|
-
) : /* @__PURE__ */
|
|
1884
|
-
|
|
1889
|
+
) : /* @__PURE__ */ S(
|
|
1890
|
+
zn,
|
|
1885
1891
|
{
|
|
1886
|
-
href:
|
|
1887
|
-
onClick:
|
|
1892
|
+
href: h,
|
|
1893
|
+
onClick: b,
|
|
1888
1894
|
forceButtonRole: !1,
|
|
1889
|
-
variant:
|
|
1895
|
+
variant: m,
|
|
1890
1896
|
target: e.newTab ? "_blank" : void 0,
|
|
1891
1897
|
rel: e.newTab ? "noopener noreferrer" : void 0,
|
|
1892
1898
|
children: [
|
|
1893
|
-
/* @__PURE__ */ i(
|
|
1894
|
-
|
|
1899
|
+
/* @__PURE__ */ i(
|
|
1900
|
+
P,
|
|
1901
|
+
{
|
|
1902
|
+
weight: "bold",
|
|
1903
|
+
size: "medium",
|
|
1904
|
+
lineHeight: "condensed",
|
|
1905
|
+
color: "primary",
|
|
1906
|
+
"data-testid": "module-item-title",
|
|
1907
|
+
children: g
|
|
1908
|
+
}
|
|
1909
|
+
),
|
|
1910
|
+
e.newTab ? /* @__PURE__ */ i(lt, { children: ` ${s("opensInNewWindow")}` }) : null
|
|
1895
1911
|
]
|
|
1896
1912
|
}
|
|
1897
1913
|
) }),
|
|
1898
|
-
/* @__PURE__ */ i(E, { as: "div", children: /* @__PURE__ */ i(P, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children:
|
|
1899
|
-
|
|
1900
|
-
/* @__PURE__ */ i("span", { style:
|
|
1901
|
-
] },
|
|
1914
|
+
/* @__PURE__ */ i(E, { as: "div", children: /* @__PURE__ */ i(P, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: A.map((R, G) => /* @__PURE__ */ S(At, { children: [
|
|
1915
|
+
G > 0 ? /* @__PURE__ */ i("span", { style: Mn, children: " " }) : null,
|
|
1916
|
+
/* @__PURE__ */ i("span", { style: G > 0 ? u : void 0, children: R.node })
|
|
1917
|
+
] }, R.key)) }) })
|
|
1902
1918
|
] }),
|
|
1903
|
-
e.status ? /* @__PURE__ */ i(
|
|
1904
|
-
] })
|
|
1919
|
+
e.status ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(di, { status: e.status }) }) : null
|
|
1920
|
+
] }) })
|
|
1905
1921
|
}
|
|
1906
1922
|
) });
|
|
1907
1923
|
}
|
|
1908
|
-
const
|
|
1909
|
-
function
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
minWidth: ht,
|
|
1922
|
-
height: ht,
|
|
1923
|
-
padding: "0 xx-small",
|
|
1924
|
-
"data-testid": "module-number",
|
|
1925
|
-
children: /* @__PURE__ */ i(M, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ i(P, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
|
|
1926
|
-
}
|
|
1927
|
-
);
|
|
1928
|
-
}
|
|
1929
|
-
function gi({ module: e, today: t }) {
|
|
1930
|
-
var a;
|
|
1931
|
-
const { t: n } = O(), o = ke(), r = ((a = e.progress) == null ? void 0 : a.status) === "locked", s = e.unlockAt;
|
|
1932
|
-
let l = null;
|
|
1933
|
-
return r && s ? l = o.unlockByline(s, t) : r ? l = n("lockedByline") : !e.progress && s && (l = o.unlockByline(s, t)), l === null ? null : /* @__PURE__ */ i(E, { as: "div", margin: "xxx-small 0 0 0", children: /* @__PURE__ */ i(P, { size: "small", color: "secondary", "data-testid": "module-byline", children: l }) });
|
|
1924
|
+
const yi = Lt(Mi), yt = "\0", Si = { textDecoration: "underline dotted", cursor: "help" };
|
|
1925
|
+
function _i({ names: e }) {
|
|
1926
|
+
const { t } = B();
|
|
1927
|
+
if (e.length === 1) return /* @__PURE__ */ i(it, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
|
|
1928
|
+
const n = t("lockedByPrerequisitesByline", {
|
|
1929
|
+
count: e.length,
|
|
1930
|
+
prerequisites: yt
|
|
1931
|
+
}), [o, ...r] = n.split(yt), s = r.length > 0 ? r.join("") : null;
|
|
1932
|
+
return /* @__PURE__ */ S(it, { children: [
|
|
1933
|
+
s === null ? null : o,
|
|
1934
|
+
/* @__PURE__ */ i(Un, { renderTip: e.join(", "), children: /* @__PURE__ */ i("span", { tabIndex: 0, style: Si, "data-testid": "module-byline-prerequisites", children: s === null ? n : t("lockedByPrerequisitesCount", { count: e.length }) }) }),
|
|
1935
|
+
s
|
|
1936
|
+
] });
|
|
1934
1937
|
}
|
|
1935
|
-
|
|
1938
|
+
function Ti({ module: e, today: t }) {
|
|
1939
|
+
var u;
|
|
1940
|
+
const n = De(), o = Sn(), r = ((u = e.progress) == null ? void 0 : u.status) === "locked", s = e.unlockAt ?? null, l = e.prerequisiteModules.map((p) => p.name.trim()).filter((p) => p !== ""), a = s !== null && new Date(s) > t;
|
|
1941
|
+
let m = null;
|
|
1942
|
+
s !== null && a && (r || !e.progress) ? m = n.unlockByline(s, t) : s !== null && !a && !e.progress && (m = n.unlockedByline(s, t));
|
|
1943
|
+
const c = r && l.length > 0;
|
|
1944
|
+
return m === null && !c ? null : /* @__PURE__ */ i(E, { as: "div", margin: "xxx-small 0 0 0", children: /* @__PURE__ */ S(P, { size: "small", color: "secondary", "data-testid": "module-byline", children: [
|
|
1945
|
+
m,
|
|
1946
|
+
m !== null && c ? /* @__PURE__ */ i("span", { style: Mn, children: " " }) : null,
|
|
1947
|
+
c ? /* @__PURE__ */ i("span", { style: m !== null ? o : void 0, children: /* @__PURE__ */ i(_i, { names: l }) }) : null
|
|
1948
|
+
] }) });
|
|
1949
|
+
}
|
|
1950
|
+
const Ei = "#273540", Pi = "#D7DADE", Ci = "0.5rem", wi = (e, t) => {
|
|
1936
1951
|
var n, o, r, s, l;
|
|
1937
1952
|
return {
|
|
1938
|
-
meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ??
|
|
1939
|
-
borderRadius: String(((r = t.borders) == null ? void 0 : r.radiusLarge) ??
|
|
1940
|
-
borderColor: ((l = (s = t.colors) == null ? void 0 : s.contrasts) == null ? void 0 : l.grey1424) ??
|
|
1953
|
+
meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ?? Ei,
|
|
1954
|
+
borderRadius: String(((r = t.borders) == null ? void 0 : r.radiusLarge) ?? Ci),
|
|
1955
|
+
borderColor: ((l = (s = t.colors) == null ? void 0 : s.contrasts) == null ? void 0 : l.grey1424) ?? Pi,
|
|
1941
1956
|
trackBottomBorderColor: "transparent"
|
|
1942
1957
|
};
|
|
1943
|
-
},
|
|
1944
|
-
function
|
|
1958
|
+
}, vi = "66.667%", Li = "8rem", Ai = 2;
|
|
1959
|
+
function Ri({
|
|
1945
1960
|
module: e,
|
|
1946
1961
|
breakpoints: t
|
|
1947
1962
|
}) {
|
|
1948
|
-
const { t: n } =
|
|
1963
|
+
const { t: n } = B(), o = De(), r = e.progress;
|
|
1949
1964
|
if (!r || r.status === "locked" || r.requirementCount <= 0) return null;
|
|
1950
1965
|
const s = t.mobileOnly, l = Object.keys(t).length === 0 || t.desktop === !0;
|
|
1951
|
-
return /* @__PURE__ */
|
|
1952
|
-
|
|
1966
|
+
return /* @__PURE__ */ S(
|
|
1967
|
+
T,
|
|
1953
1968
|
{
|
|
1954
|
-
width: l ?
|
|
1969
|
+
width: l ? vi : "100%",
|
|
1955
1970
|
direction: s ? "column" : "row",
|
|
1956
1971
|
alignItems: s ? "stretch" : "center",
|
|
1957
1972
|
wrap: "wrap",
|
|
@@ -1959,8 +1974,8 @@ function Ti({
|
|
|
1959
1974
|
margin: "small 0 0 0",
|
|
1960
1975
|
"data-testid": "module-progress",
|
|
1961
1976
|
children: [
|
|
1962
|
-
/* @__PURE__ */ i(
|
|
1963
|
-
|
|
1977
|
+
/* @__PURE__ */ i(T.Item, { size: s ? void 0 : Li, shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
1978
|
+
Fn,
|
|
1964
1979
|
{
|
|
1965
1980
|
size: "x-small",
|
|
1966
1981
|
meterColor: "brand",
|
|
@@ -1968,16 +1983,16 @@ function Ti({
|
|
|
1968
1983
|
valueMax: r.requirementCount,
|
|
1969
1984
|
shouldAnimate: !1,
|
|
1970
1985
|
screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
|
|
1971
|
-
formatScreenReaderValue: () =>
|
|
1986
|
+
formatScreenReaderValue: () => xs(
|
|
1972
1987
|
n,
|
|
1973
1988
|
r.percentComplete,
|
|
1974
1989
|
r.requirementsMet,
|
|
1975
1990
|
r.requirementCount
|
|
1976
1991
|
),
|
|
1977
|
-
themeOverride:
|
|
1992
|
+
themeOverride: wi
|
|
1978
1993
|
}
|
|
1979
1994
|
) }),
|
|
1980
|
-
/* @__PURE__ */ i(
|
|
1995
|
+
/* @__PURE__ */ i(T.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ i(P, { size: "small", color: "secondary", children: o.progress(
|
|
1981
1996
|
r.percentComplete,
|
|
1982
1997
|
r.requirementsMet,
|
|
1983
1998
|
r.requirementCount
|
|
@@ -1986,39 +2001,45 @@ function Ti({
|
|
|
1986
2001
|
}
|
|
1987
2002
|
);
|
|
1988
2003
|
}
|
|
1989
|
-
const
|
|
1990
|
-
function
|
|
2004
|
+
const St = (e) => `platform-modules-panel-${e}`;
|
|
2005
|
+
function He(e) {
|
|
2006
|
+
return e !== void 0 && e.type !== "sub_header";
|
|
2007
|
+
}
|
|
2008
|
+
function _t(e) {
|
|
2009
|
+
return He(e) && e.indent > 0;
|
|
2010
|
+
}
|
|
2011
|
+
function xi({
|
|
1991
2012
|
module: e,
|
|
1992
2013
|
state: t,
|
|
1993
2014
|
today: n,
|
|
1994
2015
|
navigation: o,
|
|
1995
2016
|
showDiagnostics: r
|
|
1996
2017
|
}) {
|
|
1997
|
-
const { t: s } =
|
|
1998
|
-
return
|
|
1999
|
-
!
|
|
2018
|
+
const { t: s } = B(), l = $(null), a = t.items.length, m = !t.isLoading && !t.isFetchingNextPage;
|
|
2019
|
+
return Ie(() => {
|
|
2020
|
+
!m || a === 0 || l.current !== a && (l.current = a, Dt(
|
|
2000
2021
|
s("itemsLoadedAnnouncement", {
|
|
2001
2022
|
loaded: a,
|
|
2002
2023
|
count: e.itemCount,
|
|
2003
2024
|
name: e.name
|
|
2004
2025
|
})
|
|
2005
2026
|
));
|
|
2006
|
-
}, [
|
|
2007
|
-
|
|
2027
|
+
}, [m, a, e.itemCount, e.name, s]), t.error ? /* @__PURE__ */ i(E, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2028
|
+
Ft,
|
|
2008
2029
|
{
|
|
2009
2030
|
variant: "error",
|
|
2010
2031
|
margin: "0",
|
|
2011
|
-
liveRegion:
|
|
2032
|
+
liveRegion: Ot,
|
|
2012
2033
|
liveRegionPoliteness: "assertive",
|
|
2013
2034
|
"data-testid": "items-error",
|
|
2014
2035
|
children: s("itemsLoadErrorAlert", { message: t.error.message })
|
|
2015
2036
|
}
|
|
2016
|
-
) }) : t.isLoading ? /* @__PURE__ */
|
|
2017
|
-
/* @__PURE__ */ i(
|
|
2037
|
+
) }) : t.isLoading ? /* @__PURE__ */ S(E, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
|
|
2038
|
+
/* @__PURE__ */ i(zt, { size: "x-small", renderTitle: s("itemsLoadingSpinnerLabel") }),
|
|
2018
2039
|
" ",
|
|
2019
2040
|
/* @__PURE__ */ i(P, { size: "small", color: "secondary", children: s("itemsLoadingText") })
|
|
2020
|
-
] }) : /* @__PURE__ */
|
|
2021
|
-
r ? /* @__PURE__ */
|
|
2041
|
+
] }) : /* @__PURE__ */ S(E, { as: "div", margin: "small 0 0 0", children: [
|
|
2042
|
+
r ? /* @__PURE__ */ S(P, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
|
|
2022
2043
|
"items source: ",
|
|
2023
2044
|
t.source,
|
|
2024
2045
|
" · loaded ",
|
|
@@ -2026,9 +2047,18 @@ function Ei({
|
|
|
2026
2047
|
" of ",
|
|
2027
2048
|
e.itemCount
|
|
2028
2049
|
] }) : null,
|
|
2029
|
-
t.items.length === 0 ? /* @__PURE__ */ i(E, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ i(P, { size: "small", color: "secondary", children: s("noItemsEmptyState") }) }) : /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((
|
|
2050
|
+
t.items.length === 0 ? /* @__PURE__ */ i(E, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ i(P, { size: "small", color: "secondary", children: s("noItemsEmptyState") }) }) : /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((c, u) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
2051
|
+
yi,
|
|
2052
|
+
{
|
|
2053
|
+
item: c,
|
|
2054
|
+
today: n,
|
|
2055
|
+
navigation: o,
|
|
2056
|
+
attachedAbove: _t(c) && He(t.items[u - 1]),
|
|
2057
|
+
attachedBelow: He(c) && _t(t.items[u + 1])
|
|
2058
|
+
}
|
|
2059
|
+
) }, c.id)) }),
|
|
2030
2060
|
t.hasNextPage ? /* @__PURE__ */ i(E, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ i(
|
|
2031
|
-
|
|
2061
|
+
he,
|
|
2032
2062
|
{
|
|
2033
2063
|
size: "small",
|
|
2034
2064
|
onClick: t.fetchNextPage,
|
|
@@ -2042,7 +2072,7 @@ function Ei({
|
|
|
2042
2072
|
) }) : null
|
|
2043
2073
|
] });
|
|
2044
2074
|
}
|
|
2045
|
-
function
|
|
2075
|
+
function Ni({
|
|
2046
2076
|
module: e,
|
|
2047
2077
|
expanded: t,
|
|
2048
2078
|
onToggle: n,
|
|
@@ -2051,12 +2081,19 @@ function Pi({
|
|
|
2051
2081
|
navigation: s,
|
|
2052
2082
|
showDiagnostics: l = !1,
|
|
2053
2083
|
headingLevel: a = "h3",
|
|
2054
|
-
moduleLabel:
|
|
2055
|
-
breakpoints:
|
|
2084
|
+
moduleLabel: m,
|
|
2085
|
+
breakpoints: c = {}
|
|
2056
2086
|
}) {
|
|
2057
|
-
var
|
|
2058
|
-
const { t: u } =
|
|
2059
|
-
|
|
2087
|
+
var C, b;
|
|
2088
|
+
const { t: u } = B(), p = De(), f = ((C = e.progress) == null ? void 0 : C.status) === "locked", y = m === void 0 ? p.moduleLabel(e.position, e) : m, g = (y == null ? void 0 : y.trim()) || null, h = c.mobileOnly === !0, _ = (b = e.progress) != null && b.status ? /* @__PURE__ */ i(
|
|
2089
|
+
ci,
|
|
2090
|
+
{
|
|
2091
|
+
status: e.progress.status,
|
|
2092
|
+
missingCount: e.progress.missingCount,
|
|
2093
|
+
incompleteCount: e.progress.incompleteCount
|
|
2094
|
+
}
|
|
2095
|
+
) : null;
|
|
2096
|
+
return /* @__PURE__ */ S(
|
|
2060
2097
|
E,
|
|
2061
2098
|
{
|
|
2062
2099
|
as: "div",
|
|
@@ -2068,55 +2105,48 @@ function Pi({
|
|
|
2068
2105
|
margin: "0 0 small 0",
|
|
2069
2106
|
"data-testid": `module-card-${e.id}`,
|
|
2070
2107
|
children: [
|
|
2071
|
-
/* @__PURE__ */ T
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
/* @__PURE__ */ T(E, { as: "div", children: [
|
|
2108
|
+
/* @__PURE__ */ S(T, { alignItems: "start", gap: "mediumSmall", "data-testid": "module-header", children: [
|
|
2109
|
+
/* @__PURE__ */ S(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
2110
|
+
/* @__PURE__ */ S(E, { as: "div", children: [
|
|
2075
2111
|
/* @__PURE__ */ i(
|
|
2076
|
-
|
|
2112
|
+
Ut,
|
|
2077
2113
|
{
|
|
2078
2114
|
level: a,
|
|
2079
2115
|
variant: "titleCardRegular",
|
|
2080
2116
|
color: f ? "secondary" : "primary",
|
|
2081
2117
|
"data-testid": "module-name",
|
|
2082
|
-
children: /* @__PURE__ */ i(
|
|
2118
|
+
children: /* @__PURE__ */ i(On, { linesAllowed: Ai, children: g ? u("moduleNameWithLabel", { label: g, name: e.name }) : e.name })
|
|
2083
2119
|
}
|
|
2084
2120
|
),
|
|
2085
|
-
e.published ? null : /* @__PURE__ */
|
|
2121
|
+
e.published ? null : /* @__PURE__ */ S(P, { size: "x-small", color: "secondary", children: [
|
|
2086
2122
|
" ",
|
|
2087
2123
|
u("moduleUnpublishedBadge")
|
|
2088
2124
|
] })
|
|
2089
2125
|
] }),
|
|
2090
|
-
/* @__PURE__ */ i(
|
|
2091
|
-
/* @__PURE__ */ i(
|
|
2126
|
+
/* @__PURE__ */ i(Ti, { module: e, today: r }),
|
|
2127
|
+
h && _ ? /* @__PURE__ */ i(E, { as: "div", margin: "x-small 0 0 0", children: _ }) : null,
|
|
2128
|
+
/* @__PURE__ */ i(Ri, { module: e, breakpoints: c })
|
|
2092
2129
|
] }),
|
|
2093
|
-
/* @__PURE__ */ i(
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
status: e.progress.status,
|
|
2098
|
-
missingCount: e.progress.missingCount,
|
|
2099
|
-
incompleteCount: e.progress.incompleteCount
|
|
2100
|
-
}
|
|
2101
|
-
) }) : null,
|
|
2102
|
-
/* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ i(
|
|
2103
|
-
Cn,
|
|
2130
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(T, { alignItems: "center", gap: "mediumSmall", children: [
|
|
2131
|
+
!h && _ ? /* @__PURE__ */ i(T.Item, { children: _ }) : null,
|
|
2132
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
|
|
2133
|
+
Dn,
|
|
2104
2134
|
{
|
|
2105
2135
|
size: "medium",
|
|
2106
2136
|
withBorder: !0,
|
|
2107
2137
|
withBackground: !1,
|
|
2108
2138
|
screenReaderLabel: t ? u("collapseModule", { name: e.name }) : u("expandModule", { name: e.name }),
|
|
2109
2139
|
"aria-expanded": t,
|
|
2110
|
-
"aria-controls":
|
|
2140
|
+
"aria-controls": St(e.id),
|
|
2111
2141
|
onClick: () => n(e.id),
|
|
2112
2142
|
"data-testid": `toggle-module-${e.id}`,
|
|
2113
|
-
children: t ? /* @__PURE__ */ i(
|
|
2143
|
+
children: t ? /* @__PURE__ */ i(Nn, {}) : /* @__PURE__ */ i(qt, {})
|
|
2114
2144
|
}
|
|
2115
2145
|
) })
|
|
2116
2146
|
] }) })
|
|
2117
2147
|
] }),
|
|
2118
|
-
/* @__PURE__ */ i("div", { id:
|
|
2119
|
-
|
|
2148
|
+
/* @__PURE__ */ i("div", { id: St(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
|
|
2149
|
+
xi,
|
|
2120
2150
|
{
|
|
2121
2151
|
module: e,
|
|
2122
2152
|
state: o,
|
|
@@ -2129,8 +2159,8 @@ function Pi({
|
|
|
2129
2159
|
}
|
|
2130
2160
|
);
|
|
2131
2161
|
}
|
|
2132
|
-
const
|
|
2133
|
-
function
|
|
2162
|
+
const qi = Lt(Ni);
|
|
2163
|
+
function ki({
|
|
2134
2164
|
counts: e,
|
|
2135
2165
|
itemsMode: t,
|
|
2136
2166
|
loadedModules: n
|
|
@@ -2146,25 +2176,25 @@ function wi({
|
|
|
2146
2176
|
padding: "x-small small",
|
|
2147
2177
|
margin: "0 0 small 0",
|
|
2148
2178
|
"data-testid": "dev-diagnostics",
|
|
2149
|
-
children: /* @__PURE__ */ T
|
|
2150
|
-
/* @__PURE__ */ i(
|
|
2151
|
-
/* @__PURE__ */ i(
|
|
2179
|
+
children: /* @__PURE__ */ S(T, { gap: "medium", wrap: "wrap", children: [
|
|
2180
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(P, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
|
|
2181
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(P, { size: "x-small", "data-testid": "request-count-list-modules", children: [
|
|
2152
2182
|
"listModules: ",
|
|
2153
2183
|
e.listModules
|
|
2154
2184
|
] }) }),
|
|
2155
|
-
/* @__PURE__ */ i(
|
|
2185
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(P, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
|
|
2156
2186
|
"listModuleItems: ",
|
|
2157
2187
|
e.listModuleItems
|
|
2158
2188
|
] }) }),
|
|
2159
|
-
/* @__PURE__ */ i(
|
|
2189
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(P, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
|
|
2160
2190
|
"total: ",
|
|
2161
2191
|
o
|
|
2162
2192
|
] }) }),
|
|
2163
|
-
/* @__PURE__ */ i(
|
|
2193
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(P, { size: "x-small", "data-testid": "resolved-items-mode", children: [
|
|
2164
2194
|
"itemsMode: ",
|
|
2165
2195
|
t ?? "probing…"
|
|
2166
2196
|
] }) }),
|
|
2167
|
-
/* @__PURE__ */ i(
|
|
2197
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(P, { size: "x-small", "data-testid": "modules-loaded-count", children: [
|
|
2168
2198
|
"modules loaded: ",
|
|
2169
2199
|
n
|
|
2170
2200
|
] }) })
|
|
@@ -2172,7 +2202,7 @@ function wi({
|
|
|
2172
2202
|
}
|
|
2173
2203
|
);
|
|
2174
2204
|
}
|
|
2175
|
-
function
|
|
2205
|
+
function Di({
|
|
2176
2206
|
data: e,
|
|
2177
2207
|
courseName: t,
|
|
2178
2208
|
courseContext: n,
|
|
@@ -2181,123 +2211,105 @@ function Li({
|
|
|
2181
2211
|
showDiagnostics: s = r !== void 0,
|
|
2182
2212
|
navigation: l,
|
|
2183
2213
|
as: a = "div",
|
|
2184
|
-
headingLevel:
|
|
2185
|
-
breakpoints:
|
|
2214
|
+
headingLevel: m = "h2",
|
|
2215
|
+
breakpoints: c = {}
|
|
2186
2216
|
}) {
|
|
2187
|
-
const { miniTablet: u, tablet: p, desktop: f, desktopNavOpen:
|
|
2188
|
-
() => ({ miniTablet: u, tablet: p, desktop: f, desktopNavOpen:
|
|
2189
|
-
[u, p, f, g, h,
|
|
2217
|
+
const { miniTablet: u, tablet: p, desktop: f, desktopNavOpen: y, desktopOnly: g, mobileOnly: h, ICEDesktop: _ } = c, C = N(
|
|
2218
|
+
() => ({ miniTablet: u, tablet: p, desktop: f, desktopNavOpen: y, desktopOnly: g, mobileOnly: h, ICEDesktop: _ }),
|
|
2219
|
+
[u, p, f, y, g, h, _]
|
|
2190
2220
|
), {
|
|
2191
|
-
modules:
|
|
2192
|
-
hasNextPage:
|
|
2193
|
-
fetchNextPage:
|
|
2194
|
-
isFetchingNextPage:
|
|
2195
|
-
isLoading:
|
|
2196
|
-
error:
|
|
2197
|
-
itemsMode:
|
|
2198
|
-
expandedModuleIds:
|
|
2199
|
-
toggleModule:
|
|
2200
|
-
expandModule:
|
|
2201
|
-
|
|
2202
|
-
getItems:
|
|
2203
|
-
filter:
|
|
2204
|
-
setFilter:
|
|
2205
|
-
filterEntry:
|
|
2206
|
-
filterPredicate:
|
|
2207
|
-
filterResultsArePartial:
|
|
2208
|
-
} = e, { t:
|
|
2209
|
-
|
|
2210
|
-
var
|
|
2211
|
-
!
|
|
2212
|
-
}, [
|
|
2213
|
-
const
|
|
2214
|
-
() =>
|
|
2215
|
-
(
|
|
2221
|
+
modules: b,
|
|
2222
|
+
hasNextPage: w,
|
|
2223
|
+
fetchNextPage: k,
|
|
2224
|
+
isFetchingNextPage: q,
|
|
2225
|
+
isLoading: A,
|
|
2226
|
+
error: D,
|
|
2227
|
+
itemsMode: j,
|
|
2228
|
+
expandedModuleIds: Q,
|
|
2229
|
+
toggleModule: O,
|
|
2230
|
+
expandModule: R,
|
|
2231
|
+
collapseAllModules: G,
|
|
2232
|
+
getItems: se,
|
|
2233
|
+
filter: ie,
|
|
2234
|
+
setFilter: le,
|
|
2235
|
+
filterEntry: Ue,
|
|
2236
|
+
filterPredicate: K,
|
|
2237
|
+
filterResultsArePartial: ae
|
|
2238
|
+
} = e, { t: L, timezone: ue } = B(), Z = t ?? L("pageTitle"), U = $(null), Y = vt(), X = $(!1), [ce] = Le(() => /* @__PURE__ */ new Date()), z = o ?? ce;
|
|
2239
|
+
Ie(() => {
|
|
2240
|
+
var x;
|
|
2241
|
+
!X.current || q || (X.current = !1, Dt(L("modulesLoadedAnnouncement", { count: b.length })), (x = U.current) == null || x.focus());
|
|
2242
|
+
}, [q, b.length, L]);
|
|
2243
|
+
const de = N(
|
|
2244
|
+
() => b.filter(
|
|
2245
|
+
(x) => K === void 0 || K(x, { today: z, timezone: ue })
|
|
2216
2246
|
),
|
|
2217
|
-
[
|
|
2218
|
-
),
|
|
2219
|
-
for (const
|
|
2220
|
-
},
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
return /* @__PURE__ */ T(E, { as: a, display: "block", "data-testid": "modules-list", children: [
|
|
2224
|
-
n ? /* @__PURE__ */ T(E, { as: "div", children: [
|
|
2247
|
+
[b, K, z, ue]
|
|
2248
|
+
), ze = () => {
|
|
2249
|
+
for (const x of de) R(x.id);
|
|
2250
|
+
}, _e = G, me = Ue !== void 0 && ie !== V, Te = de.length === 0 && !A && !D, Ee = Te && me;
|
|
2251
|
+
return /* @__PURE__ */ S(E, { as: a, display: "block", "data-testid": "modules-list", children: [
|
|
2252
|
+
n ? /* @__PURE__ */ S(E, { as: "div", children: [
|
|
2225
2253
|
/* @__PURE__ */ i(P, { size: "small", color: "brand", children: n }),
|
|
2226
|
-
/* @__PURE__ */
|
|
2254
|
+
/* @__PURE__ */ S(P, { size: "small", color: "secondary", children: [
|
|
2227
2255
|
" ",
|
|
2228
2256
|
"/",
|
|
2229
2257
|
" "
|
|
2230
2258
|
] }),
|
|
2231
|
-
/* @__PURE__ */ i(P, { size: "small", color: "secondary", children:
|
|
2259
|
+
/* @__PURE__ */ i(P, { size: "small", color: "secondary", children: Z })
|
|
2232
2260
|
] }) : null,
|
|
2233
|
-
/* @__PURE__ */ i(
|
|
2261
|
+
/* @__PURE__ */ i(Ut, { level: m, margin: "x-small 0 medium 0", children: Z }),
|
|
2234
2262
|
r ? /* @__PURE__ */ i(
|
|
2235
|
-
|
|
2263
|
+
ki,
|
|
2236
2264
|
{
|
|
2237
2265
|
counts: r,
|
|
2238
|
-
itemsMode:
|
|
2239
|
-
loadedModules:
|
|
2266
|
+
itemsMode: j,
|
|
2267
|
+
loadedModules: b.length
|
|
2240
2268
|
}
|
|
2241
2269
|
) : null,
|
|
2242
|
-
/* @__PURE__ */ T
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
"
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
}
|
|
2254
|
-
) }),
|
|
2255
|
-
/* @__PURE__ */ i(M.Item, { shouldGrow: !0 }),
|
|
2256
|
-
/* @__PURE__ */ i(M.Item, { children: /* @__PURE__ */ T(
|
|
2257
|
-
$e,
|
|
2258
|
-
{
|
|
2259
|
-
placement: "bottom end",
|
|
2260
|
-
trigger: /* @__PURE__ */ i(de, { renderIcon: /* @__PURE__ */ i(Lt, {}), "data-testid": "expand-collapse-trigger", children: C("expandCollapseTrigger") }),
|
|
2261
|
-
children: [
|
|
2262
|
-
/* @__PURE__ */ i($e.Item, { onSelect: v, "data-testid": "expand-all", children: C("expandAll") }),
|
|
2263
|
-
/* @__PURE__ */ i($e.Item, { onSelect: ae, "data-testid": "collapse-all", children: C("collapseAll") })
|
|
2264
|
-
]
|
|
2265
|
-
}
|
|
2266
|
-
) })
|
|
2267
|
-
] }),
|
|
2268
|
-
/* @__PURE__ */ i(E, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ i(P, { size: "x-small", color: "secondary", id: le, children: C("searchScopeHint") }) }),
|
|
2270
|
+
/* @__PURE__ */ i(T, { justifyItems: "end", children: /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ S(
|
|
2271
|
+
$e,
|
|
2272
|
+
{
|
|
2273
|
+
placement: "bottom end",
|
|
2274
|
+
trigger: /* @__PURE__ */ i(he, { renderIcon: /* @__PURE__ */ i(qt, {}), "data-testid": "expand-collapse-trigger", children: L("expandCollapseTrigger") }),
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ i($e.Item, { onSelect: ze, "data-testid": "expand-all", children: L("expandAll") }),
|
|
2277
|
+
/* @__PURE__ */ i($e.Item, { onSelect: _e, "data-testid": "collapse-all", children: L("collapseAll") })
|
|
2278
|
+
]
|
|
2279
|
+
}
|
|
2280
|
+
) }) }),
|
|
2269
2281
|
/* @__PURE__ */ i(
|
|
2270
|
-
|
|
2282
|
+
oi,
|
|
2271
2283
|
{
|
|
2272
|
-
value:
|
|
2273
|
-
onChange:
|
|
2274
|
-
describedBy:
|
|
2284
|
+
value: ie,
|
|
2285
|
+
onChange: le,
|
|
2286
|
+
describedBy: ae ? Y : void 0
|
|
2275
2287
|
}
|
|
2276
2288
|
),
|
|
2277
|
-
|
|
2289
|
+
ae ? /* @__PURE__ */ i(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ i(
|
|
2278
2290
|
P,
|
|
2279
2291
|
{
|
|
2280
2292
|
size: "x-small",
|
|
2281
2293
|
color: "secondary",
|
|
2282
|
-
id:
|
|
2294
|
+
id: Y,
|
|
2283
2295
|
"data-testid": "filter-partial-hint",
|
|
2284
|
-
children:
|
|
2296
|
+
children: L("filterScopeHint")
|
|
2285
2297
|
}
|
|
2286
2298
|
) }) : null,
|
|
2287
|
-
/* @__PURE__ */
|
|
2288
|
-
|
|
2289
|
-
|
|
2299
|
+
/* @__PURE__ */ S(E, { as: "div", margin: "medium 0 0 0", children: [
|
|
2300
|
+
D ? /* @__PURE__ */ i(
|
|
2301
|
+
Ft,
|
|
2290
2302
|
{
|
|
2291
2303
|
variant: "error",
|
|
2292
2304
|
margin: "0 0 small 0",
|
|
2293
|
-
liveRegion:
|
|
2305
|
+
liveRegion: Ot,
|
|
2294
2306
|
liveRegionPoliteness: "assertive",
|
|
2295
2307
|
"data-testid": "modules-error",
|
|
2296
|
-
children:
|
|
2308
|
+
children: L("modulesLoadErrorAlert", { message: D.message })
|
|
2297
2309
|
}
|
|
2298
2310
|
) : null,
|
|
2299
|
-
|
|
2300
|
-
|
|
2311
|
+
A ? /* @__PURE__ */ i(E, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ i(zt, { renderTitle: L("modulesLoadingSpinnerLabel") }) }) : null,
|
|
2312
|
+
Te && !me ? /* @__PURE__ */ i(
|
|
2301
2313
|
E,
|
|
2302
2314
|
{
|
|
2303
2315
|
as: "div",
|
|
@@ -2306,10 +2318,10 @@ function Li({
|
|
|
2306
2318
|
padding: "large",
|
|
2307
2319
|
textAlign: "center",
|
|
2308
2320
|
"data-testid": "modules-empty",
|
|
2309
|
-
children: /* @__PURE__ */ i(P, { color: "secondary", children:
|
|
2321
|
+
children: /* @__PURE__ */ i(P, { color: "secondary", children: L("noModulesEmptyState") })
|
|
2310
2322
|
}
|
|
2311
2323
|
) : null,
|
|
2312
|
-
|
|
2324
|
+
Ee ? /* @__PURE__ */ S(
|
|
2313
2325
|
E,
|
|
2314
2326
|
{
|
|
2315
2327
|
as: "div",
|
|
@@ -2319,64 +2331,64 @@ function Li({
|
|
|
2319
2331
|
textAlign: "center",
|
|
2320
2332
|
"data-testid": "modules-filtered-empty",
|
|
2321
2333
|
children: [
|
|
2322
|
-
/* @__PURE__ */ i(E, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ i(P, { color: "secondary", children:
|
|
2334
|
+
/* @__PURE__ */ i(E, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ i(P, { color: "secondary", children: b.length === 0 ? L("noFilterMatches") : L("filteredEmptyState", { count: b.length }) }) }),
|
|
2323
2335
|
/* @__PURE__ */ i(
|
|
2324
|
-
|
|
2336
|
+
he,
|
|
2325
2337
|
{
|
|
2326
2338
|
size: "small",
|
|
2327
2339
|
onClick: () => {
|
|
2328
|
-
|
|
2340
|
+
le(V), X.current = !0;
|
|
2329
2341
|
},
|
|
2330
|
-
children:
|
|
2342
|
+
children: L("clearFilters")
|
|
2331
2343
|
}
|
|
2332
2344
|
)
|
|
2333
2345
|
]
|
|
2334
2346
|
}
|
|
2335
2347
|
) : null,
|
|
2336
|
-
/* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children:
|
|
2337
|
-
|
|
2348
|
+
/* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: de.map((x) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
2349
|
+
qi,
|
|
2338
2350
|
{
|
|
2339
|
-
module:
|
|
2340
|
-
expanded:
|
|
2341
|
-
onToggle:
|
|
2342
|
-
itemsState:
|
|
2343
|
-
today:
|
|
2351
|
+
module: x,
|
|
2352
|
+
expanded: Q.includes(x.id),
|
|
2353
|
+
onToggle: O,
|
|
2354
|
+
itemsState: se(x.id),
|
|
2355
|
+
today: z,
|
|
2344
2356
|
showDiagnostics: s,
|
|
2345
2357
|
navigation: l,
|
|
2346
|
-
headingLevel:
|
|
2347
|
-
breakpoints:
|
|
2358
|
+
headingLevel: m === "h1" ? "h2" : "h3",
|
|
2359
|
+
breakpoints: C
|
|
2348
2360
|
}
|
|
2349
|
-
) },
|
|
2361
|
+
) }, x.id)) })
|
|
2350
2362
|
] }),
|
|
2351
|
-
|
|
2352
|
-
|
|
2363
|
+
w ? /* @__PURE__ */ i(E, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2364
|
+
he,
|
|
2353
2365
|
{
|
|
2354
2366
|
color: "primary",
|
|
2355
2367
|
onClick: () => {
|
|
2356
|
-
|
|
2368
|
+
X.current = !0, k();
|
|
2357
2369
|
},
|
|
2358
|
-
interaction:
|
|
2370
|
+
interaction: q ? "disabled" : "enabled",
|
|
2359
2371
|
"data-testid": "load-more-modules",
|
|
2360
|
-
children:
|
|
2372
|
+
children: q ? L("loadMoreModulesLoading") : L("loadMoreModules", { count: b.length })
|
|
2361
2373
|
}
|
|
2362
|
-
) }) :
|
|
2374
|
+
) }) : b.length > 0 ? /* @__PURE__ */ i(E, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2363
2375
|
P,
|
|
2364
2376
|
{
|
|
2365
2377
|
size: "x-small",
|
|
2366
2378
|
color: "secondary",
|
|
2367
2379
|
"data-testid": "modules-all-loaded",
|
|
2368
|
-
elementRef: (
|
|
2369
|
-
|
|
2380
|
+
elementRef: (x) => {
|
|
2381
|
+
U.current = x;
|
|
2370
2382
|
},
|
|
2371
2383
|
tabIndex: -1,
|
|
2372
|
-
children:
|
|
2384
|
+
children: L("allModulesLoaded", { count: b.length })
|
|
2373
2385
|
}
|
|
2374
2386
|
) }) : null
|
|
2375
2387
|
] });
|
|
2376
2388
|
}
|
|
2377
|
-
const
|
|
2378
|
-
|
|
2379
|
-
),
|
|
2389
|
+
const jl = Bn(
|
|
2390
|
+
Di
|
|
2391
|
+
), be = [
|
|
2380
2392
|
"assignment",
|
|
2381
2393
|
"quiz",
|
|
2382
2394
|
"discussion",
|
|
@@ -2385,7 +2397,7 @@ const Nl = xn(
|
|
|
2385
2397
|
"external_url",
|
|
2386
2398
|
"external_tool",
|
|
2387
2399
|
"sub_header"
|
|
2388
|
-
],
|
|
2400
|
+
], Ve = [
|
|
2389
2401
|
"not_started",
|
|
2390
2402
|
"in_progress",
|
|
2391
2403
|
"complete",
|
|
@@ -2393,73 +2405,75 @@ const Nl = xn(
|
|
|
2393
2405
|
"incomplete",
|
|
2394
2406
|
"missing_and_incomplete",
|
|
2395
2407
|
"locked"
|
|
2396
|
-
],
|
|
2408
|
+
], _n = [
|
|
2397
2409
|
"must_view",
|
|
2398
2410
|
"must_submit",
|
|
2399
2411
|
"must_contribute",
|
|
2400
2412
|
"must_mark_done",
|
|
2401
2413
|
"min_score",
|
|
2402
2414
|
"min_percentage"
|
|
2403
|
-
],
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2415
|
+
], Oi = ["assignment", "quiz", "discussion"], Fi = ["external_url", "external_tool"], Ui = ["assignment", "quiz", "discussion"], zi = Date.UTC(2025, 0, 6), $i = 864e5, re = "1", Tn = (e) => new Date(zi + e * $i).toISOString(), Ne = [
|
|
2416
|
+
"min_score",
|
|
2417
|
+
"min_percentage"
|
|
2418
|
+
], Bi = _n.filter(
|
|
2419
|
+
(e) => !Ne.includes(e)
|
|
2420
|
+
), ji = [
|
|
2421
|
+
"in_progress",
|
|
2422
|
+
"incomplete",
|
|
2423
|
+
"missing_and_incomplete"
|
|
2424
|
+
], Gi = (e, t, n, o) => {
|
|
2425
|
+
const r = n ? _n : Bi, s = n && o ? Ne[t % Ne.length] : r[Math.floor(t / 3) % r.length];
|
|
2426
|
+
return s === "min_score" ? { itemId: e, type: s, minScore: 10 } : s === "min_percentage" ? { itemId: e, type: s, minPercentage: 80 } : { itemId: e, type: s };
|
|
2427
|
+
}, Yi = (e, t, n, o) => e === "sub_header" ? !1 : n && o || t % 3 === 0, nt = (e) => Ve[(e - 1) % Ve.length], Wi = (e, t) => !Ui.includes(e) || e === "discussion" && Math.floor(t / be.length) % 2 === 1 ? null : 5 + t % 4 * 5, Qi = (e, t, n, o) => t ? e === "missing" ? n != null || o % 2 === 0 : e === "missing_and_incomplete" ? o % 2 === 1 : !1 : !1, Hi = (e, t, n, o) => {
|
|
2428
|
+
if (e === "locked") return "locked";
|
|
2429
|
+
if (Qi(e, t, n, o)) return "missing";
|
|
2430
|
+
if (!n) return;
|
|
2431
|
+
const r = t && Ne.includes(n.type);
|
|
2408
2432
|
switch (e) {
|
|
2409
|
-
case "locked":
|
|
2410
|
-
return "locked";
|
|
2411
2433
|
case "not_started":
|
|
2434
|
+
case "missing":
|
|
2412
2435
|
return "not_started";
|
|
2413
2436
|
case "complete":
|
|
2414
|
-
return
|
|
2415
|
-
case "missing":
|
|
2416
|
-
return n ? t ? "missing" : "not_started" : t ? o % 2 === 0 ? "missing" : "graded" : "not_started";
|
|
2437
|
+
return "complete";
|
|
2417
2438
|
case "incomplete":
|
|
2418
|
-
return n ? t ? "graded" : r : t ? o % 2 === 0 ? "graded" : "submitted" : "not_started";
|
|
2419
2439
|
case "missing_and_incomplete":
|
|
2420
|
-
return
|
|
2440
|
+
return r && o % 2 === 0 ? "incomplete" : "complete";
|
|
2421
2441
|
case "in_progress":
|
|
2422
|
-
return
|
|
2442
|
+
return r ? o % 3 === 0 ? "complete" : o % 3 === 1 ? "in_progress" : "not_started" : o % 2 === 0 ? "complete" : "not_started";
|
|
2443
|
+
default:
|
|
2444
|
+
return e;
|
|
2423
2445
|
}
|
|
2424
|
-
},
|
|
2425
|
-
"
|
|
2426
|
-
"graded",
|
|
2427
|
-
"excused",
|
|
2428
|
-
"complete"
|
|
2429
|
-
]), Ui = (e) => e.status !== void 0 && Fi.has(e.status), zi = (e) => {
|
|
2430
|
-
var t, n;
|
|
2431
|
-
return ((t = e.completionRequirement) == null ? void 0 : t.type) === "min_score" || ((n = e.completionRequirement) == null ? void 0 : n.type) === "min_percentage";
|
|
2432
|
-
}, $i = (e, t, n, o, r, s, l, a) => {
|
|
2433
|
-
const d = String(e), m = pe[o % pe.length], u = m === "sub_header", p = vi.includes(m) && (o % 4 === 0 || r === "missing");
|
|
2446
|
+
}, Vi = (e) => e.status === "complete", Ki = (e, t, n, o, r, s, l, a) => {
|
|
2447
|
+
const m = String(e), c = be[o % be.length], u = c === "sub_header", p = Oi.includes(c) && (o % 4 === 0 || r === "missing");
|
|
2434
2448
|
return {
|
|
2435
2449
|
id: n,
|
|
2436
|
-
moduleId:
|
|
2437
|
-
title: `${
|
|
2438
|
-
type:
|
|
2450
|
+
moduleId: m,
|
|
2451
|
+
title: `${c} ${t + 1}`,
|
|
2452
|
+
type: c,
|
|
2439
2453
|
position: t + 1,
|
|
2440
2454
|
indent: t % 5 === 4 ? 1 : 0,
|
|
2441
2455
|
published: a === "teacher" ? o % 7 !== 0 : !0,
|
|
2442
|
-
url: u ? null : `/courses/${
|
|
2443
|
-
newTab:
|
|
2456
|
+
url: u ? null : `/courses/${re}/modules/items/${n}`,
|
|
2457
|
+
newTab: Fi.includes(c) && o % 2 === 0,
|
|
2444
2458
|
completionRequirement: l,
|
|
2445
|
-
dueAt: p ?
|
|
2459
|
+
dueAt: p ? Tn(o % 90) : null,
|
|
2446
2460
|
status: r,
|
|
2447
2461
|
pointsPossible: s,
|
|
2448
|
-
extensions:
|
|
2462
|
+
extensions: Ze(
|
|
2449
2463
|
void 0,
|
|
2450
2464
|
o % 37 === 0 ? 5 + o % 4 * 10 : null
|
|
2451
2465
|
)
|
|
2452
2466
|
};
|
|
2453
|
-
},
|
|
2454
|
-
const r =
|
|
2455
|
-
let
|
|
2456
|
-
for (let
|
|
2457
|
-
const
|
|
2458
|
-
|
|
2467
|
+
}, Zi = (e, t, n, o) => {
|
|
2468
|
+
const r = nt(e), s = ji.includes(r), l = [];
|
|
2469
|
+
let a = 0;
|
|
2470
|
+
for (let m = 0; m < t; m += 1) {
|
|
2471
|
+
const c = n + m, u = be[c % be.length], p = Wi(u, c), f = p !== null, y = f ? a++ : m, g = String(e * 1e3 + m + 1), h = Yi(u, c, f, s) ? Gi(g, c, f, s) : null, _ = Hi(r, f, h, y);
|
|
2472
|
+
l.push(Ki(e, m, g, c, _, p, h, o));
|
|
2459
2473
|
}
|
|
2460
|
-
return
|
|
2461
|
-
},
|
|
2462
|
-
const r =
|
|
2474
|
+
return l;
|
|
2475
|
+
}, Xi = (e, t, n, o) => {
|
|
2476
|
+
const r = nt(e);
|
|
2463
2477
|
if (r === "locked" || r === "not_started") return r;
|
|
2464
2478
|
if (t.length === 0) return "not_started";
|
|
2465
2479
|
if (!t.some((s) => s.pointsPossible != null) || r === "missing" && n === 0 || r === "incomplete" && o === 0) return "in_progress";
|
|
@@ -2469,39 +2483,36 @@ const Nl = xn(
|
|
|
2469
2483
|
if (o === 0) return "missing";
|
|
2470
2484
|
}
|
|
2471
2485
|
return r;
|
|
2472
|
-
},
|
|
2473
|
-
const
|
|
2474
|
-
return t.length > 0 ? t[t.length - 1] : null;
|
|
2475
|
-
}, Yi = (e, t, n) => {
|
|
2476
|
-
const o = Fe(e), r = o === "incomplete" || o === "missing_and_incomplete" ? t.filter((g) => g.status === "graded" && zi(g)) : [], s = new Set(r.map((g) => g.id)), l = t.filter((g) => g.completionRequirement), a = n ?? l.length, d = l.filter((g) => !s.has(g.id)), m = Math.min(d.filter(Ui).length, a), u = t.filter((g) => g.status === "missing").length, p = s.size;
|
|
2486
|
+
}, Ji = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, el = (e, t, n) => {
|
|
2487
|
+
const o = t.filter((c) => c.completionRequirement), r = n ?? o.length, s = Math.min(o.filter(Vi).length, r), l = t.filter((c) => c.status === "missing").length, a = t.filter((c) => c.status === "incomplete").length;
|
|
2477
2488
|
return {
|
|
2478
|
-
status:
|
|
2479
|
-
requirementsMet:
|
|
2480
|
-
requirementCount:
|
|
2481
|
-
percentComplete:
|
|
2482
|
-
|
|
2483
|
-
missingCount:
|
|
2484
|
-
incompleteCount:
|
|
2489
|
+
status: Xi(e, t, l, a),
|
|
2490
|
+
requirementsMet: s,
|
|
2491
|
+
requirementCount: r,
|
|
2492
|
+
percentComplete: r > 0 ? Math.round(s / r * 100) : 0,
|
|
2493
|
+
nextDueAt: Ji(t),
|
|
2494
|
+
missingCount: l,
|
|
2495
|
+
incompleteCount: a
|
|
2485
2496
|
};
|
|
2486
|
-
},
|
|
2487
|
-
const o =
|
|
2497
|
+
}, tl = (e, t, n) => {
|
|
2498
|
+
const o = nt(e), r = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
|
|
2488
2499
|
return {
|
|
2489
2500
|
id: String(e),
|
|
2490
2501
|
name: `Module ${e}`,
|
|
2491
2502
|
position: e,
|
|
2492
2503
|
published: n === "teacher" ? e % 4 !== 0 : !0,
|
|
2493
2504
|
itemCount: t.length,
|
|
2494
|
-
unlockAt: e % 5 === 0 ?
|
|
2505
|
+
unlockAt: e % 5 === 0 ? Tn(e) : null,
|
|
2495
2506
|
prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
|
|
2496
2507
|
requirementCount: r,
|
|
2497
2508
|
requireSequentialProgress: e % 6 === 0,
|
|
2498
2509
|
completionRequirements: t.flatMap(
|
|
2499
2510
|
(s) => s.completionRequirement ? [s.completionRequirement] : []
|
|
2500
2511
|
),
|
|
2501
|
-
progress:
|
|
2512
|
+
progress: el(e, t, r)
|
|
2502
2513
|
};
|
|
2503
2514
|
};
|
|
2504
|
-
function
|
|
2515
|
+
function nl(e) {
|
|
2505
2516
|
return {
|
|
2506
2517
|
courseId: e.courseId,
|
|
2507
2518
|
modules: e.modules.map(({ progress: t, ...n }) => n),
|
|
@@ -2513,31 +2524,31 @@ function Qi(e) {
|
|
|
2513
2524
|
)
|
|
2514
2525
|
};
|
|
2515
2526
|
}
|
|
2516
|
-
function
|
|
2517
|
-
const n = t.view ?? "student", o = t.courseId ??
|
|
2527
|
+
function Fe(e, t = {}) {
|
|
2528
|
+
const n = t.view ?? "student", o = t.courseId ?? re, r = [], s = {};
|
|
2518
2529
|
let l = 0;
|
|
2519
|
-
e.forEach((
|
|
2520
|
-
const u =
|
|
2521
|
-
l +=
|
|
2530
|
+
e.forEach((m, c) => {
|
|
2531
|
+
const u = c + 1, p = Zi(u, m, l, n);
|
|
2532
|
+
l += m, r.push(tl(u, p, n)), s[String(u)] = p;
|
|
2522
2533
|
});
|
|
2523
2534
|
const a = { courseId: o, modules: r, itemsByModuleId: s };
|
|
2524
|
-
return n === "teacher" ?
|
|
2535
|
+
return n === "teacher" ? nl(a) : a;
|
|
2525
2536
|
}
|
|
2526
|
-
const
|
|
2527
|
-
function
|
|
2528
|
-
return
|
|
2537
|
+
const fe = (e) => `/courses/${re}/modules/items/${e}`, Tt = "2099-08-31T06:59:00Z", ol = "2020-01-06T07:00:00Z", rl = Ve.length, sl = 8, il = 120, ll = 25, al = 250, Et = 8;
|
|
2538
|
+
function Gl() {
|
|
2539
|
+
return Fe(Array.from({ length: rl }, () => sl));
|
|
2529
2540
|
}
|
|
2530
|
-
function
|
|
2531
|
-
return
|
|
2541
|
+
function Yl() {
|
|
2542
|
+
return Fe(Array.from({ length: il }, () => ll));
|
|
2532
2543
|
}
|
|
2533
|
-
function
|
|
2534
|
-
return
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2544
|
+
function Wl() {
|
|
2545
|
+
return Fe([
|
|
2546
|
+
Et,
|
|
2547
|
+
al,
|
|
2548
|
+
Et
|
|
2538
2549
|
]);
|
|
2539
2550
|
}
|
|
2540
|
-
function
|
|
2551
|
+
function Ql() {
|
|
2541
2552
|
const e = (r, s, l) => ({
|
|
2542
2553
|
id: String(r),
|
|
2543
2554
|
name: s,
|
|
@@ -2556,27 +2567,27 @@ function Fl() {
|
|
|
2556
2567
|
},
|
|
2557
2568
|
...l
|
|
2558
2569
|
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, o = [
|
|
2559
|
-
e(1, "Locked by a future date", { unlockAt:
|
|
2570
|
+
e(1, "Locked by a future date", { unlockAt: Tt }),
|
|
2560
2571
|
e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
|
|
2561
2572
|
e(3, "Locked by several prerequisites", {
|
|
2562
2573
|
prerequisiteModules: [t, n]
|
|
2563
2574
|
}),
|
|
2564
2575
|
e(4, "Locked by a date and a prerequisite", {
|
|
2565
|
-
unlockAt:
|
|
2576
|
+
unlockAt: Tt,
|
|
2566
2577
|
prerequisiteModules: [t]
|
|
2567
2578
|
}),
|
|
2568
|
-
e(5, "Locked, and the unlock date has passed", { unlockAt:
|
|
2579
|
+
e(5, "Locked, and the unlock date has passed", { unlockAt: ol })
|
|
2569
2580
|
];
|
|
2570
2581
|
return {
|
|
2571
|
-
courseId:
|
|
2582
|
+
courseId: re,
|
|
2572
2583
|
modules: o,
|
|
2573
2584
|
itemsByModuleId: Object.fromEntries(o.map((r) => [r.id, []]))
|
|
2574
2585
|
};
|
|
2575
2586
|
}
|
|
2576
|
-
function
|
|
2577
|
-
return
|
|
2587
|
+
function Hl() {
|
|
2588
|
+
return Fe([]);
|
|
2578
2589
|
}
|
|
2579
|
-
function
|
|
2590
|
+
function Vl() {
|
|
2580
2591
|
const t = [
|
|
2581
2592
|
{
|
|
2582
2593
|
title: "Every fact: type, due date, points, requirement",
|
|
@@ -2605,7 +2616,7 @@ function zl() {
|
|
|
2605
2616
|
title: "Career item carrying an estimated duration",
|
|
2606
2617
|
type: "external_tool",
|
|
2607
2618
|
completionRequirement: { itemId: "5", type: "must_view" },
|
|
2608
|
-
extensions:
|
|
2619
|
+
extensions: Ze(void 0, 45)
|
|
2609
2620
|
},
|
|
2610
2621
|
{ title: "A file, ungradeable, so no points at all", type: "file" },
|
|
2611
2622
|
{ title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
|
|
@@ -2613,7 +2624,14 @@ function zl() {
|
|
|
2613
2624
|
title: "A sub-header, which renders no tile and no meta line",
|
|
2614
2625
|
type: "sub_header",
|
|
2615
2626
|
url: null
|
|
2616
|
-
}
|
|
2627
|
+
},
|
|
2628
|
+
{ title: "A parent, with children indented under it", type: "page" },
|
|
2629
|
+
{ title: "Indented one level", type: "assignment", indent: 1 },
|
|
2630
|
+
{ title: "Indented one level, the second child", type: "page", indent: 1 },
|
|
2631
|
+
{ title: "Indented two levels", type: "file", indent: 2 },
|
|
2632
|
+
{ title: "Indented three levels", type: "quiz", indent: 3 },
|
|
2633
|
+
{ title: "Indented four levels", type: "discussion", indent: 4 },
|
|
2634
|
+
{ title: "Indented five levels, the deepest Canvas allows", type: "page", indent: 5 }
|
|
2617
2635
|
].map((n, o) => ({
|
|
2618
2636
|
id: String(o + 1),
|
|
2619
2637
|
moduleId: "1",
|
|
@@ -2621,12 +2639,12 @@ function zl() {
|
|
|
2621
2639
|
indent: 0,
|
|
2622
2640
|
published: !0,
|
|
2623
2641
|
newTab: !1,
|
|
2624
|
-
url:
|
|
2642
|
+
url: fe(o + 1),
|
|
2625
2643
|
status: "not_started",
|
|
2626
2644
|
...n
|
|
2627
2645
|
}));
|
|
2628
2646
|
return {
|
|
2629
|
-
courseId:
|
|
2647
|
+
courseId: re,
|
|
2630
2648
|
modules: [
|
|
2631
2649
|
{
|
|
2632
2650
|
id: "1",
|
|
@@ -2641,13 +2659,13 @@ function zl() {
|
|
|
2641
2659
|
itemsByModuleId: { 1: t }
|
|
2642
2660
|
};
|
|
2643
2661
|
}
|
|
2644
|
-
function
|
|
2662
|
+
function Kl() {
|
|
2645
2663
|
const t = [
|
|
2646
|
-
{ title: "Reading: limits from the left and the right", type: "page", url:
|
|
2664
|
+
{ title: "Reading: limits from the left and the right", type: "page", url: fe(1) },
|
|
2647
2665
|
{
|
|
2648
2666
|
title: "Desmos: interactive limit explorer",
|
|
2649
2667
|
type: "external_url",
|
|
2650
|
-
url:
|
|
2668
|
+
url: fe(2),
|
|
2651
2669
|
newTab: !0
|
|
2652
2670
|
},
|
|
2653
2671
|
{ title: "Practice", type: "sub_header", url: null },
|
|
@@ -2655,9 +2673,9 @@ function $l() {
|
|
|
2655
2673
|
{
|
|
2656
2674
|
title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
|
|
2657
2675
|
type: "assignment",
|
|
2658
|
-
url:
|
|
2676
|
+
url: fe(5)
|
|
2659
2677
|
},
|
|
2660
|
-
{ title: "Unit test", type: "quiz", url:
|
|
2678
|
+
{ title: "Unit test", type: "quiz", url: fe(6), status: "locked" }
|
|
2661
2679
|
].map((n, o) => ({
|
|
2662
2680
|
id: String(o + 1),
|
|
2663
2681
|
moduleId: "1",
|
|
@@ -2669,7 +2687,7 @@ function $l() {
|
|
|
2669
2687
|
...n
|
|
2670
2688
|
}));
|
|
2671
2689
|
return {
|
|
2672
|
-
courseId:
|
|
2690
|
+
courseId: re,
|
|
2673
2691
|
modules: [
|
|
2674
2692
|
{
|
|
2675
2693
|
id: "1",
|
|
@@ -2685,92 +2703,91 @@ function $l() {
|
|
|
2685
2703
|
};
|
|
2686
2704
|
}
|
|
2687
2705
|
export {
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2706
|
+
V as ALL_FILTER,
|
|
2707
|
+
Bt as CompletionRequirementSchema,
|
|
2708
|
+
Hn as CompletionRequirementTypeSchema,
|
|
2709
|
+
cn as DEFAULT_INLINE_THRESHOLD,
|
|
2710
|
+
Qs as DEFAULT_ITEM_CONCURRENCY,
|
|
2711
|
+
un as DEFAULT_ITEM_PAGE_SIZE,
|
|
2712
|
+
oe as DEFAULT_LOCALE,
|
|
2713
|
+
tt as DEFAULT_PAGE_SIZE,
|
|
2714
|
+
dn as DEFAULT_RETAIN_COLLAPSED_LIMIT,
|
|
2697
2715
|
Oe as DEFAULT_STALE_TIME_MS,
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2716
|
+
Ns as DUE_THIS_WEEK_DAYS,
|
|
2717
|
+
Yt as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
|
|
2718
|
+
re as FIXTURE_COURSE_ID,
|
|
2719
|
+
oi as FilterChips,
|
|
2720
|
+
jn as FilterClauseSchema,
|
|
2721
|
+
Gs as FilterEntrySchema,
|
|
2722
|
+
vo as GET_MODULES,
|
|
2723
|
+
Lo as GET_MODULE_ITEMS,
|
|
2706
2724
|
Ge as INLINE_ITEM_LIMIT,
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
Rl as invalidateModuleList,
|
|
2725
|
+
Xe as INLINE_QUERY_NODE_BUDGET,
|
|
2726
|
+
to as InMemoryCourseMismatchError,
|
|
2727
|
+
Bs as ItemTypeEntrySchema,
|
|
2728
|
+
js as MetaFieldEntrySchema,
|
|
2729
|
+
qi as ModuleCard,
|
|
2730
|
+
yi as ModuleItemRow,
|
|
2731
|
+
jt as ModuleItemSchema,
|
|
2732
|
+
di as ModuleItemStatusPill,
|
|
2733
|
+
Wn as ModuleItemStatusSchema,
|
|
2734
|
+
Yn as ModuleItemTypeSchema,
|
|
2735
|
+
Jn as ModuleItemsPageSchema,
|
|
2736
|
+
Vn as ModuleProgressSchema,
|
|
2737
|
+
Zn as ModuleSchema,
|
|
2738
|
+
ci as ModuleStatusPill,
|
|
2739
|
+
Qn as ModuleStatusSchema,
|
|
2740
|
+
kl as ModulesConfigProvider,
|
|
2741
|
+
Ys as ModulesConfigSchema,
|
|
2742
|
+
ql as ModulesI18nProvider,
|
|
2743
|
+
jl as ModulesList,
|
|
2744
|
+
Xn as ModulesPageSchema,
|
|
2745
|
+
Gt as PageInfoSchema,
|
|
2746
|
+
Wt as PartialCanvasResponseError,
|
|
2747
|
+
Kn as PrerequisiteModuleSchema,
|
|
2748
|
+
ke as RegistryEntrySchema,
|
|
2749
|
+
Ds as TYPE_FIELD,
|
|
2750
|
+
qs as baseFilters,
|
|
2751
|
+
qe as baseModulesConfig,
|
|
2752
|
+
Fe as buildFixture,
|
|
2753
|
+
Hl as courseEmpty,
|
|
2754
|
+
Wl as courseFatModule,
|
|
2755
|
+
Kl as courseItemLinks,
|
|
2756
|
+
Vl as courseItemRowVariants,
|
|
2757
|
+
Yl as courseLarge,
|
|
2758
|
+
Ql as courseLockReasons,
|
|
2759
|
+
Gl as courseSmall,
|
|
2760
|
+
Nl as createCanvasGraphqlAdapter,
|
|
2761
|
+
xl as createInMemoryAdapter,
|
|
2762
|
+
nn as createTranslate,
|
|
2763
|
+
ks as defaultFormatters,
|
|
2764
|
+
ys as defaultTranslate,
|
|
2765
|
+
Je as filterClauseOf,
|
|
2766
|
+
eo as getEstimatedDurationMinutes,
|
|
2767
|
+
zs as hideUnservableFilters,
|
|
2768
|
+
Bl as invalidateCourse,
|
|
2769
|
+
zl as invalidateModuleItems,
|
|
2770
|
+
$l as invalidateModuleList,
|
|
2754
2771
|
We as isPredicateServed,
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2772
|
+
ee as mergeRegistry,
|
|
2773
|
+
ui as moduleItemStatusLabel,
|
|
2774
|
+
mn as moduleItemsPrefix,
|
|
2775
|
+
ai as moduleStatusLabel,
|
|
2776
|
+
Se as modulesKeys,
|
|
2777
|
+
Hs as modulesListPrefix,
|
|
2778
|
+
Ol as partialModulesConfig,
|
|
2762
2779
|
ve as registrySchema,
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2780
|
+
Ws as resolveModulesConfig,
|
|
2781
|
+
Gn as servesClause,
|
|
2782
|
+
Us as unservableFilters,
|
|
2783
|
+
Dl as useFieldVisible,
|
|
2784
|
+
De as useFormatters,
|
|
2785
|
+
Fl as useModuleItems,
|
|
2786
|
+
Vs as useModules,
|
|
2787
|
+
ye as useModulesConfig,
|
|
2788
|
+
B as useModulesI18n,
|
|
2789
|
+
Ul as useModulesPageData,
|
|
2790
|
+
et as visibleEntries,
|
|
2791
|
+
ne as visibleEntry,
|
|
2792
|
+
Ze as withEstimatedDurationMinutes
|
|
2776
2793
|
};
|