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