@instructure/platform-modules 1.4.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 +1 -2
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleCard.stories.d.ts +2 -0
- package/dist/components/ModuleCard.stories.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +1 -2
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModulesList.d.ts +0 -2
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +2 -1
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/StatusPill.d.ts +2 -0
- package/dist/components/StatusPill.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/labels.d.ts +4 -0
- package/dist/components/labels.d.ts.map +1 -1
- package/dist/components/useTitleLinkVariant.d.ts +2 -0
- package/dist/components/useTitleLinkVariant.d.ts.map +1 -0
- package/dist/config/filters.d.ts +1 -1
- package/dist/config/filters.d.ts.map +1 -1
- package/dist/config/schemas.d.ts.map +1 -1
- package/dist/config/types.d.ts +5 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1435 -1337
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/locales/en.json +2 -0
- package/package.json +1 -1
- package/dist/types/navigation.d.ts +0 -7
- package/dist/types/navigation.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { z as m } from "zod";
|
|
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
|
|
11
|
-
import { View as
|
|
12
|
-
import {
|
|
13
|
-
import { Alert as
|
|
14
|
-
import { Heading as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { isValid as
|
|
22
|
-
import { Pill as
|
|
23
|
-
import { WithBreakpoints as
|
|
24
|
-
const
|
|
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
|
+
import { View as C } from "@instructure/ui-view/v11_7";
|
|
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
25
|
target: m.enum(["module", "item"]),
|
|
26
26
|
field: m.string(),
|
|
27
27
|
op: m.enum(["eq", "contains"]),
|
|
28
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 Lo = m.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 Lo = m.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 Lo = m.enum([
|
|
|
56
56
|
"min_score",
|
|
57
57
|
"min_percentage",
|
|
58
58
|
"unknown"
|
|
59
|
-
]),
|
|
60
|
-
status:
|
|
59
|
+
]), Yo = m.object({
|
|
60
|
+
status: Go.optional(),
|
|
61
61
|
requirementsMet: m.number(),
|
|
62
62
|
requirementCount: m.number(),
|
|
63
63
|
percentComplete: m.number().min(0).max(100),
|
|
64
64
|
nextDueAt: m.string().nullish(),
|
|
65
65
|
missingCount: m.number(),
|
|
66
66
|
incompleteCount: m.number()
|
|
67
|
-
}),
|
|
67
|
+
}), _n = m.object({
|
|
68
68
|
itemId: m.string(),
|
|
69
|
-
type:
|
|
69
|
+
type: jo,
|
|
70
70
|
minScore: m.number().nullish(),
|
|
71
71
|
minPercentage: m.number().nullish()
|
|
72
|
-
}),
|
|
72
|
+
}), Tn = m.object({
|
|
73
73
|
id: m.string(),
|
|
74
74
|
moduleId: m.string(),
|
|
75
75
|
title: m.string(),
|
|
76
|
-
type:
|
|
76
|
+
type: $o,
|
|
77
77
|
position: m.number(),
|
|
78
78
|
indent: m.number(),
|
|
79
79
|
published: m.boolean(),
|
|
80
80
|
url: m.string().nullish(),
|
|
81
81
|
newTab: m.boolean().nullish(),
|
|
82
|
-
completionRequirement:
|
|
82
|
+
completionRequirement: _n.nullish(),
|
|
83
83
|
dueAt: m.string().nullish(),
|
|
84
|
-
status:
|
|
84
|
+
status: Bo.optional(),
|
|
85
85
|
pointsPossible: m.number().nullish(),
|
|
86
86
|
extensions: m.record(m.unknown()).optional()
|
|
87
|
-
}),
|
|
87
|
+
}), Ho = m.object({
|
|
88
88
|
id: m.string(),
|
|
89
89
|
name: m.string()
|
|
90
|
-
}),
|
|
90
|
+
}), Ko = m.object({
|
|
91
91
|
id: m.string(),
|
|
92
92
|
name: m.string(),
|
|
93
93
|
position: m.number(),
|
|
94
94
|
published: m.boolean(),
|
|
95
95
|
itemCount: m.number(),
|
|
96
|
-
items: m.array(
|
|
96
|
+
items: m.array(Tn).optional(),
|
|
97
97
|
unlockAt: m.string().nullish(),
|
|
98
|
-
prerequisiteModules: m.array(
|
|
98
|
+
prerequisiteModules: m.array(Ho),
|
|
99
99
|
requirementCount: m.number().nullish(),
|
|
100
100
|
requireSequentialProgress: m.boolean(),
|
|
101
|
-
completionRequirements: m.array(
|
|
102
|
-
progress:
|
|
101
|
+
completionRequirements: m.array(_n).optional(),
|
|
102
|
+
progress: Yo.optional(),
|
|
103
103
|
collapsed: m.boolean().nullish(),
|
|
104
104
|
extensions: m.record(m.unknown()).optional()
|
|
105
|
-
}),
|
|
105
|
+
}), En = m.object({
|
|
106
106
|
hasNextPage: m.boolean(),
|
|
107
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: m.array(
|
|
113
|
-
pageInfo:
|
|
114
|
-
}),
|
|
115
|
-
items: m.array(
|
|
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:
|
|
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 jo = /* @__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
|
-
pageSize:
|
|
207
|
+
pageSize: l,
|
|
190
208
|
includeItems: a,
|
|
191
209
|
filter: d,
|
|
192
|
-
inlineItemsFirst:
|
|
193
|
-
signal:
|
|
210
|
+
inlineItemsFirst: c,
|
|
211
|
+
signal: u
|
|
194
212
|
}) {
|
|
195
|
-
var
|
|
196
|
-
|
|
197
|
-
const p = d ? e.modules.filter(
|
|
198
|
-
return { modules:
|
|
199
|
-
const
|
|
200
|
-
return { ...
|
|
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
|
-
cursor:
|
|
224
|
+
cursor: l,
|
|
207
225
|
pageSize: a,
|
|
208
226
|
signal: d
|
|
209
227
|
}) {
|
|
210
228
|
var p;
|
|
211
|
-
|
|
212
|
-
const { slice:
|
|
213
|
-
return { items:
|
|
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 yn 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 Ho(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 Ko = {
|
|
|
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
|
-
const [, n, o, s, r,
|
|
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,42 +287,42 @@ const Xo = /* @__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 ?? []) {
|
|
300
318
|
if (!r) continue;
|
|
301
|
-
const
|
|
302
|
-
n.get(
|
|
319
|
+
const l = String(r.id);
|
|
320
|
+
n.get(l) === r.type && o.add(l);
|
|
303
321
|
}
|
|
304
322
|
for (const r of e.incompleteRequirements ?? []) {
|
|
305
323
|
if (!r) continue;
|
|
306
|
-
const
|
|
307
|
-
n.get(
|
|
324
|
+
const l = String(r.id);
|
|
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 Tn(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 os = {
|
|
|
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,58 +354,58 @@ const rs = {
|
|
|
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
|
|
361
|
+
function bs(e, t, n) {
|
|
344
362
|
var a, d;
|
|
345
363
|
if (!n) return;
|
|
346
|
-
const o = e.requirementCount ?? t.length, s = Math.min(n.requirementsMetItemIds.size, o), r = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0,
|
|
347
|
-
(
|
|
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(
|
|
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
372
|
nextDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.nextDueAt) ?? null,
|
|
355
373
|
missingCount: r,
|
|
356
|
-
incompleteCount:
|
|
374
|
+
incompleteCount: l
|
|
357
375
|
};
|
|
358
376
|
}
|
|
359
|
-
function
|
|
360
|
-
var
|
|
361
|
-
const r = String(e._id),
|
|
362
|
-
if (!
|
|
363
|
-
return
|
|
364
|
-
const a =
|
|
377
|
+
function ys(e, t, n, o = {}, s) {
|
|
378
|
+
var c, u, p;
|
|
379
|
+
const r = String(e._id), l = is(e.content);
|
|
380
|
+
if (!l)
|
|
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,
|
|
368
386
|
title: e.title ?? "",
|
|
369
|
-
type:
|
|
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
393
|
completionRequirement: d,
|
|
376
|
-
dueAt: (a == null ? void 0 : a.cachedDueDate) ?? ((
|
|
377
|
-
status: s ?
|
|
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,
|
|
378
396
|
pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
|
|
379
|
-
extensions:
|
|
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
|
-
for (const
|
|
388
|
-
if (!
|
|
389
|
-
const a =
|
|
390
|
-
|
|
405
|
+
for (const l of e ?? []) {
|
|
406
|
+
if (!l) continue;
|
|
407
|
+
const a = ys(
|
|
408
|
+
l,
|
|
391
409
|
t,
|
|
392
410
|
n,
|
|
393
411
|
o,
|
|
@@ -397,26 +415,26 @@ function En(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
|
|
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
439
|
items: d,
|
|
422
440
|
unlockAt: e.unlockAt ?? null,
|
|
@@ -426,30 +444,30 @@ function cs(e, t = {}) {
|
|
|
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:
|
|
675
|
+
capabilities: l = ws
|
|
658
676
|
}) {
|
|
659
677
|
const a = s != null, d = { onUnsupportedItem: o };
|
|
660
678
|
return {
|
|
661
679
|
inlineNodeBudget: n,
|
|
662
|
-
capabilities:
|
|
680
|
+
capabilities: l,
|
|
663
681
|
async listModules({
|
|
664
|
-
courseId:
|
|
665
|
-
cursor:
|
|
682
|
+
courseId: c,
|
|
683
|
+
cursor: u,
|
|
666
684
|
pageSize: p,
|
|
667
|
-
includeItems:
|
|
668
|
-
filter:
|
|
669
|
-
inlineItemsFirst:
|
|
670
|
-
inlineFirst:
|
|
671
|
-
signal:
|
|
685
|
+
includeItems: g,
|
|
686
|
+
filter: b,
|
|
687
|
+
inlineItemsFirst: f,
|
|
688
|
+
inlineFirst: y,
|
|
689
|
+
signal: P
|
|
672
690
|
}) {
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
e(
|
|
676
|
-
courseId:
|
|
677
|
-
first:
|
|
678
|
-
after:
|
|
679
|
-
includeItems:
|
|
680
|
-
itemsFirst:
|
|
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, {
|
|
694
|
+
courseId: c,
|
|
695
|
+
first: E,
|
|
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
|
-
moduleId:
|
|
693
|
-
cursor:
|
|
710
|
+
moduleId: c,
|
|
711
|
+
cursor: u,
|
|
694
712
|
pageSize: p,
|
|
695
|
-
signal:
|
|
713
|
+
signal: g
|
|
696
714
|
}) {
|
|
697
|
-
|
|
698
|
-
const
|
|
699
|
-
e(
|
|
700
|
-
moduleId:
|
|
715
|
+
He(g);
|
|
716
|
+
const b = await qt(
|
|
717
|
+
e(Cs, {
|
|
718
|
+
moduleId: c,
|
|
701
719
|
first: p,
|
|
702
|
-
after:
|
|
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
755
|
const Qe = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
738
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
763
|
Ve(e[s], Qe(t, s) ? t[s] : void 0)
|
|
746
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
|
-
function
|
|
767
|
+
function Me(e, t) {
|
|
750
768
|
if (!(!Qe(e, t) || e[t].hidden))
|
|
751
769
|
return e[t];
|
|
752
770
|
}
|
|
753
|
-
function
|
|
754
|
-
return Object.keys(e).filter((t) =>
|
|
771
|
+
function et(e) {
|
|
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,159 +783,161 @@ function Ms({
|
|
|
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
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
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) {
|
|
879
899
|
const o = e.get(t);
|
|
880
900
|
if (o) return o;
|
|
881
901
|
const s = n();
|
|
882
902
|
return e.set(t, s), s;
|
|
883
903
|
}
|
|
884
|
-
function
|
|
885
|
-
return n ? e.replace(
|
|
904
|
+
function wi(e, t, n) {
|
|
905
|
+
return n ? e.replace(_i, (o, s) => {
|
|
886
906
|
if (!Object.prototype.hasOwnProperty.call(n, s)) return o;
|
|
887
907
|
const r = n[s];
|
|
888
|
-
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);
|
|
889
909
|
}) : e;
|
|
890
910
|
}
|
|
891
|
-
function
|
|
911
|
+
function vi(e, t, n) {
|
|
892
912
|
const o = n == null ? void 0 : n.count;
|
|
893
913
|
if (typeof o == "number" && Number.isFinite(o)) {
|
|
894
|
-
const s =
|
|
914
|
+
const s = On(Ei, t, () => new Intl.PluralRules(t)).select(o), r = e[s];
|
|
895
915
|
if (typeof r == "string") return r;
|
|
896
916
|
}
|
|
897
917
|
return typeof e.other == "string" ? e.other : void 0;
|
|
898
918
|
}
|
|
899
|
-
function
|
|
919
|
+
function zt(e, t, n) {
|
|
900
920
|
if (typeof e == "string") return e;
|
|
901
921
|
if (e !== null && typeof e == "object")
|
|
902
|
-
return
|
|
922
|
+
return vi(e, t, n);
|
|
903
923
|
}
|
|
904
|
-
const
|
|
905
|
-
function
|
|
906
|
-
|
|
924
|
+
const $t = /* @__PURE__ */ new Set();
|
|
925
|
+
function Pi(e) {
|
|
926
|
+
$t.has(e) || ($t.add(e), console.warn(
|
|
907
927
|
`[platform-modules] no translation for "${e}"; it will render as itself. Add it to the catalog passed to ModulesI18nProvider.`
|
|
908
928
|
));
|
|
909
929
|
}
|
|
910
|
-
function
|
|
911
|
-
const r =
|
|
930
|
+
function Ai(e, t, n, o, s) {
|
|
931
|
+
const r = zt(e == null ? void 0 : e[t], n, s);
|
|
912
932
|
if (typeof r == "string") return r;
|
|
913
|
-
const
|
|
914
|
-
return typeof
|
|
933
|
+
const l = zt(Ti[t], n, s);
|
|
934
|
+
return typeof l == "string" ? l : (o && Pi(t), t);
|
|
915
935
|
}
|
|
916
|
-
function
|
|
917
|
-
return (o, s) =>
|
|
936
|
+
function qn(e, t = Se, n = !1) {
|
|
937
|
+
return (o, s) => wi(Ai(e, o, t, n, s), t, s);
|
|
918
938
|
}
|
|
919
|
-
const
|
|
920
|
-
function
|
|
939
|
+
const xi = qn(), Li = { t: xi, locale: Se }, Fn = yt(null);
|
|
940
|
+
function pc({
|
|
921
941
|
translations: e,
|
|
922
942
|
locale: t,
|
|
923
943
|
timezone: n,
|
|
@@ -925,26 +945,26 @@ function Za({
|
|
|
925
945
|
children: s
|
|
926
946
|
}) {
|
|
927
947
|
const r = N(() => {
|
|
928
|
-
const
|
|
948
|
+
const l = t ?? Se;
|
|
929
949
|
return {
|
|
930
|
-
t:
|
|
931
|
-
locale:
|
|
950
|
+
t: qn(e, l, o),
|
|
951
|
+
locale: l,
|
|
932
952
|
timezone: n
|
|
933
953
|
};
|
|
934
954
|
}, [e, t, n, o]);
|
|
935
|
-
return /* @__PURE__ */
|
|
955
|
+
return /* @__PURE__ */ i(Fn.Provider, { value: r, children: s });
|
|
936
956
|
}
|
|
937
|
-
function
|
|
938
|
-
return
|
|
957
|
+
function H() {
|
|
958
|
+
return Mt(Fn) ?? Li;
|
|
939
959
|
}
|
|
940
|
-
const
|
|
941
|
-
function
|
|
942
|
-
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);
|
|
943
963
|
if (t) return t;
|
|
944
964
|
const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
|
|
945
|
-
return
|
|
965
|
+
return Gt.set(e, n), n;
|
|
946
966
|
}
|
|
947
|
-
function
|
|
967
|
+
function jt(e, t) {
|
|
948
968
|
return {
|
|
949
969
|
time: new Intl.DateTimeFormat(e, {
|
|
950
970
|
hour: "numeric",
|
|
@@ -959,7 +979,7 @@ function Ft(e, t) {
|
|
|
959
979
|
timeZone: t
|
|
960
980
|
}),
|
|
961
981
|
zone: t ? new Intl.DateTimeFormat(e, { timeZone: t, timeZoneName: "short" }) : void 0,
|
|
962
|
-
civilDay: new Intl.DateTimeFormat(
|
|
982
|
+
civilDay: new Intl.DateTimeFormat(ki, {
|
|
963
983
|
year: "numeric",
|
|
964
984
|
month: "numeric",
|
|
965
985
|
day: "numeric",
|
|
@@ -967,57 +987,65 @@ function Ft(e, t) {
|
|
|
967
987
|
})
|
|
968
988
|
};
|
|
969
989
|
}
|
|
970
|
-
function
|
|
971
|
-
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);
|
|
972
992
|
if (s) return s;
|
|
973
993
|
let r;
|
|
974
994
|
try {
|
|
975
|
-
r =
|
|
995
|
+
r = jt(e, n);
|
|
976
996
|
} catch {
|
|
977
997
|
console.warn(
|
|
978
998
|
`[platform-modules] Unusable timezone ${JSON.stringify(n)}; rendering dates in the viewer's own clock instead.`
|
|
979
|
-
), r =
|
|
999
|
+
), r = jt(e, void 0);
|
|
980
1000
|
}
|
|
981
|
-
return
|
|
1001
|
+
return Bt.set(o, r), r;
|
|
982
1002
|
}
|
|
983
|
-
function
|
|
984
|
-
return new Date(
|
|
1003
|
+
function Yt(e, t) {
|
|
1004
|
+
return new Date(gt(e, t)).getUTCFullYear();
|
|
985
1005
|
}
|
|
986
|
-
function
|
|
1006
|
+
function Ni(e, t) {
|
|
987
1007
|
var o;
|
|
988
1008
|
const n = (o = e.zone) == null ? void 0 : o.formatToParts(t).find((s) => s.type === "timeZoneName");
|
|
989
1009
|
return (n == null ? void 0 : n.value) ?? null;
|
|
990
1010
|
}
|
|
991
|
-
function
|
|
1011
|
+
function gt(e, t) {
|
|
992
1012
|
const n = e.civilDay.formatToParts(t), o = (s) => {
|
|
993
1013
|
var r;
|
|
994
|
-
return Number((r = n.find((
|
|
1014
|
+
return Number((r = n.find((l) => l.type === s)) == null ? void 0 : r.value);
|
|
995
1015
|
};
|
|
996
1016
|
return Date.UTC(o("year"), o("month") - 1, o("day"));
|
|
997
1017
|
}
|
|
998
|
-
function
|
|
999
|
-
return
|
|
1018
|
+
function Oi(e, t, n) {
|
|
1019
|
+
return $n(Un(Se, n), e, t);
|
|
1000
1020
|
}
|
|
1001
|
-
|
|
1002
|
-
|
|
1021
|
+
const zn = 7;
|
|
1022
|
+
function Ct(e, t, n) {
|
|
1023
|
+
if (!e) return !1;
|
|
1024
|
+
const o = new Date(e);
|
|
1025
|
+
if (Number.isNaN(o.getTime())) return !1;
|
|
1026
|
+
const s = Oi(o, t, n);
|
|
1027
|
+
return s >= 0 && s < zn;
|
|
1003
1028
|
}
|
|
1004
|
-
function
|
|
1029
|
+
function $n(e, t, n) {
|
|
1030
|
+
return Math.round((gt(e, t) - gt(e, n)) / Ri);
|
|
1031
|
+
}
|
|
1032
|
+
function qi(e, t, n, { locale: o = Se, timezone: s } = {}) {
|
|
1005
1033
|
const r = new Date(t);
|
|
1006
1034
|
if (Number.isNaN(r.getTime())) return t;
|
|
1007
|
-
const
|
|
1008
|
-
if (
|
|
1009
|
-
if (
|
|
1010
|
-
if (
|
|
1011
|
-
const
|
|
1012
|
-
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 });
|
|
1013
1041
|
}
|
|
1014
|
-
function
|
|
1015
|
-
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);
|
|
1016
1044
|
}
|
|
1017
|
-
function
|
|
1045
|
+
function Ui(e, t) {
|
|
1018
1046
|
return t == null ? null : e("pointsAbbreviated", { count: t });
|
|
1019
1047
|
}
|
|
1020
|
-
function
|
|
1048
|
+
function zi(e, t) {
|
|
1021
1049
|
switch (t.type) {
|
|
1022
1050
|
case "must_view":
|
|
1023
1051
|
return e("requirementMustView");
|
|
@@ -1035,13 +1063,13 @@ function Pi(e, t) {
|
|
|
1035
1063
|
return e("requirementUnknown");
|
|
1036
1064
|
}
|
|
1037
1065
|
}
|
|
1038
|
-
function
|
|
1066
|
+
function $i(e, t, n, o) {
|
|
1039
1067
|
return e("progressSummary", { percent: t, met: n, count: o });
|
|
1040
1068
|
}
|
|
1041
|
-
function
|
|
1069
|
+
function Bi(e, t, n, o) {
|
|
1042
1070
|
return e("progressScreenReaderValue", { percent: t, met: n, count: o });
|
|
1043
1071
|
}
|
|
1044
|
-
const
|
|
1072
|
+
const re = "all", gc = zn, Gi = {
|
|
1045
1073
|
all: {
|
|
1046
1074
|
label: "filterAll",
|
|
1047
1075
|
order: 10,
|
|
@@ -1070,13 +1098,8 @@ const X = "all", xi = 7, Li = {
|
|
|
1070
1098
|
label: "filterDueThisWeek",
|
|
1071
1099
|
order: 40,
|
|
1072
1100
|
predicate: (e, { today: t, timezone: n }) => {
|
|
1073
|
-
var
|
|
1074
|
-
|
|
1075
|
-
if (!o) return !1;
|
|
1076
|
-
const s = new Date(o);
|
|
1077
|
-
if (Number.isNaN(s.getTime())) return !1;
|
|
1078
|
-
const r = Ti(s, t, n);
|
|
1079
|
-
return r >= 0 && r < xi;
|
|
1101
|
+
var o;
|
|
1102
|
+
return Ct((o = e.progress) == null ? void 0 : o.nextDueAt, t, n);
|
|
1080
1103
|
}
|
|
1081
1104
|
},
|
|
1082
1105
|
missing: {
|
|
@@ -1088,24 +1111,24 @@ const X = "all", xi = 7, Li = {
|
|
|
1088
1111
|
}
|
|
1089
1112
|
}
|
|
1090
1113
|
};
|
|
1091
|
-
function
|
|
1114
|
+
function wt(e) {
|
|
1092
1115
|
if (!(!e || e.clientOnly))
|
|
1093
1116
|
return e.query;
|
|
1094
1117
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return e !== void 0 &&
|
|
1097
|
-
}
|
|
1098
|
-
const
|
|
1099
|
-
moduleLabel: (e, t, { locale: n }) =>
|
|
1100
|
-
dateTime: (e, t, { t: n, locale: o, timezone: s }) =>
|
|
1101
|
-
points: (e, { t }) =>
|
|
1102
|
-
progress: (e, t, n, { t: o }) =>
|
|
1103
|
-
},
|
|
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 = {
|
|
1104
1127
|
type: {
|
|
1105
1128
|
label: "metaFieldTypeLabel",
|
|
1106
1129
|
order: 10,
|
|
1107
1130
|
render: ({ item: e, t, config: n }) => {
|
|
1108
|
-
const o =
|
|
1131
|
+
const o = Me(n.itemTypes, e.type);
|
|
1109
1132
|
return o ? t(o.label) : null;
|
|
1110
1133
|
}
|
|
1111
1134
|
},
|
|
@@ -1122,13 +1145,13 @@ const Ri = {
|
|
|
1122
1145
|
requirement: {
|
|
1123
1146
|
label: "metaFieldRequirementLabel",
|
|
1124
1147
|
order: 40,
|
|
1125
|
-
render: ({ item: e, t }) => e.completionRequirement ?
|
|
1148
|
+
render: ({ item: e, t }) => e.completionRequirement ? zi(t, e.completionRequirement) : null
|
|
1126
1149
|
},
|
|
1127
1150
|
estimatedDuration: {
|
|
1128
1151
|
label: "metaFieldDurationLabel",
|
|
1129
1152
|
order: 50,
|
|
1130
1153
|
render: ({ item: e, t }) => {
|
|
1131
|
-
const n =
|
|
1154
|
+
const n = Vo(e);
|
|
1132
1155
|
return n === null ? null : t("durationMinutes", { count: n });
|
|
1133
1156
|
}
|
|
1134
1157
|
},
|
|
@@ -1137,135 +1160,139 @@ const Ri = {
|
|
|
1137
1160
|
order: 60,
|
|
1138
1161
|
render: ({ item: e, t }) => e.published ? null : t("itemUnpublishedLabel")
|
|
1139
1162
|
}
|
|
1140
|
-
},
|
|
1163
|
+
}, ae = { size: "md", color: "mutedColor" }, Ki = {
|
|
1141
1164
|
assignment: {
|
|
1142
1165
|
label: "itemTypeAssignment",
|
|
1143
1166
|
order: 10,
|
|
1144
|
-
icon: /* @__PURE__ */
|
|
1167
|
+
icon: /* @__PURE__ */ i(_o, { ...ae })
|
|
1145
1168
|
},
|
|
1146
|
-
quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */
|
|
1169
|
+
quiz: { label: "itemTypeQuiz", order: 20, icon: /* @__PURE__ */ i(So, { ...ae }) },
|
|
1147
1170
|
discussion: {
|
|
1148
1171
|
label: "itemTypeDiscussion",
|
|
1149
1172
|
order: 30,
|
|
1150
|
-
icon: /* @__PURE__ */
|
|
1173
|
+
icon: /* @__PURE__ */ i(Mo, { ...ae })
|
|
1151
1174
|
},
|
|
1152
|
-
page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */
|
|
1153
|
-
file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */
|
|
1175
|
+
page: { label: "itemTypePage", order: 40, icon: /* @__PURE__ */ i(yo, { ...ae }) },
|
|
1176
|
+
file: { label: "itemTypeFile", order: 50, icon: /* @__PURE__ */ i(bo, { ...ae }) },
|
|
1154
1177
|
external_url: {
|
|
1155
1178
|
label: "itemTypeExternalUrl",
|
|
1156
1179
|
order: 60,
|
|
1157
|
-
icon: /* @__PURE__ */
|
|
1180
|
+
icon: /* @__PURE__ */ i(Io, { ...ae })
|
|
1158
1181
|
},
|
|
1159
1182
|
external_tool: {
|
|
1160
1183
|
label: "itemTypeExternalTool",
|
|
1161
1184
|
order: 70,
|
|
1162
|
-
icon: /* @__PURE__ */
|
|
1185
|
+
icon: /* @__PURE__ */ i(ho, { ...ae })
|
|
1163
1186
|
},
|
|
1164
1187
|
sub_header: { label: "itemTypeSubHeader", order: 80, icon: null }
|
|
1165
|
-
},
|
|
1166
|
-
formatters:
|
|
1167
|
-
itemTypes:
|
|
1188
|
+
}, tt = {
|
|
1189
|
+
formatters: ji,
|
|
1190
|
+
itemTypes: Ki,
|
|
1168
1191
|
itemStatuses: {},
|
|
1169
|
-
itemMeta:
|
|
1170
|
-
filters:
|
|
1192
|
+
itemMeta: Hi,
|
|
1193
|
+
filters: Gi,
|
|
1171
1194
|
moduleActions: {},
|
|
1172
1195
|
itemActions: {},
|
|
1173
1196
|
navigation: {}
|
|
1174
1197
|
};
|
|
1175
|
-
Object.freeze(
|
|
1176
|
-
for (const e of Object.values(
|
|
1198
|
+
Object.freeze(tt);
|
|
1199
|
+
for (const e of Object.values(tt)) {
|
|
1177
1200
|
Object.freeze(e);
|
|
1178
1201
|
for (const t of Object.values(e)) Object.freeze(t);
|
|
1179
1202
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return
|
|
1182
|
-
const o =
|
|
1183
|
-
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);
|
|
1184
1207
|
}).map((n) => n.key);
|
|
1185
1208
|
}
|
|
1186
|
-
function
|
|
1209
|
+
function Ht(e) {
|
|
1187
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.`;
|
|
1188
1211
|
}
|
|
1189
|
-
function
|
|
1190
|
-
const n =
|
|
1212
|
+
function Qi(e, t) {
|
|
1213
|
+
const n = Wi(e, t);
|
|
1191
1214
|
if (n.length === 0) return e;
|
|
1192
1215
|
if (process.env.NODE_ENV !== "production")
|
|
1193
|
-
throw new Error(
|
|
1194
|
-
console.warn(
|
|
1216
|
+
throw new Error(Ht(n));
|
|
1217
|
+
console.warn(Ht(n));
|
|
1195
1218
|
const o = Object.fromEntries(n.map((s) => [s, { ...e[s], hidden: !0 }]));
|
|
1196
1219
|
return { ...e, ...o };
|
|
1197
1220
|
}
|
|
1198
|
-
const
|
|
1199
|
-
function
|
|
1200
|
-
return /* @__PURE__ */
|
|
1221
|
+
const Bn = yt(null);
|
|
1222
|
+
function fc({ value: e, children: t }) {
|
|
1223
|
+
return /* @__PURE__ */ i(Bn.Provider, { value: e, children: t });
|
|
1201
1224
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return
|
|
1225
|
+
function _e() {
|
|
1226
|
+
return Mt(Bn) ?? tt;
|
|
1204
1227
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return
|
|
1228
|
+
function hc(e) {
|
|
1229
|
+
return Me(_e().itemMeta, e) !== void 0;
|
|
1207
1230
|
}
|
|
1208
|
-
const
|
|
1231
|
+
const qe = m.object({
|
|
1209
1232
|
label: m.string(),
|
|
1210
1233
|
order: m.number(),
|
|
1211
1234
|
hidden: m.boolean().optional()
|
|
1212
1235
|
});
|
|
1213
|
-
function
|
|
1236
|
+
function be(e) {
|
|
1214
1237
|
return m.record(m.string(), e);
|
|
1215
1238
|
}
|
|
1216
|
-
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) => {
|
|
1217
1240
|
var t;
|
|
1218
1241
|
return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
1219
|
-
},
|
|
1220
|
-
icon: m.custom(
|
|
1221
|
-
renderIcon: m.custom(
|
|
1242
|
+
}, Xi = qe.extend({
|
|
1243
|
+
icon: m.custom(Gn, { message: "icon must be a ReactNode" }),
|
|
1244
|
+
renderIcon: m.custom(Zi, {
|
|
1222
1245
|
message: "renderIcon must be a function of the item, not a React component"
|
|
1223
1246
|
})
|
|
1224
|
-
}).strict(),
|
|
1247
|
+
}).strict(), jn = (e) => {
|
|
1225
1248
|
var t;
|
|
1226
1249
|
return typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
1227
|
-
},
|
|
1228
|
-
onSelect: m.custom(
|
|
1250
|
+
}, Kt = (e) => e == null || jn(e), Wt = qe.extend({
|
|
1251
|
+
onSelect: m.custom(jn, {
|
|
1229
1252
|
message: "onSelect must be a function taking an ActionContext"
|
|
1230
1253
|
}),
|
|
1231
|
-
visible: m.custom(
|
|
1254
|
+
visible: m.custom(Kt, {
|
|
1232
1255
|
message: "visible must be a function taking an ActionContext, not a React component"
|
|
1233
1256
|
}),
|
|
1234
|
-
renderModal: m.custom(
|
|
1257
|
+
renderModal: m.custom(Kt, {
|
|
1235
1258
|
message: "renderModal must be a function taking an ActionContext, not a React component"
|
|
1236
1259
|
})
|
|
1237
1260
|
}).strict();
|
|
1238
|
-
function
|
|
1261
|
+
function Ke() {
|
|
1239
1262
|
return m.custom((e) => typeof e == "function", {
|
|
1240
1263
|
message: "Expected a function"
|
|
1241
1264
|
});
|
|
1242
1265
|
}
|
|
1243
|
-
const
|
|
1266
|
+
const Ji = qe.extend({
|
|
1244
1267
|
render: m.custom((e) => typeof e == "function", {
|
|
1245
1268
|
message: "render must be a function taking a MetaFieldContext"
|
|
1246
1269
|
})
|
|
1247
|
-
}).strict(),
|
|
1270
|
+
}).strict(), el = qe.extend({
|
|
1248
1271
|
predicate: m.custom((e) => typeof e == "function", {
|
|
1249
1272
|
message: "predicate must be a function of the module and a FilterContext"
|
|
1250
1273
|
}),
|
|
1251
|
-
query:
|
|
1274
|
+
query: Uo.optional(),
|
|
1252
1275
|
clientOnly: m.boolean().optional()
|
|
1253
|
-
}).strict(),
|
|
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({
|
|
1254
1281
|
formatters: m.object({
|
|
1255
|
-
moduleLabel:
|
|
1256
|
-
dateTime:
|
|
1257
|
-
points:
|
|
1258
|
-
progress:
|
|
1282
|
+
moduleLabel: Ke(),
|
|
1283
|
+
dateTime: Ke(),
|
|
1284
|
+
points: Ke(),
|
|
1285
|
+
progress: Ke()
|
|
1259
1286
|
}).strict(),
|
|
1260
|
-
itemTypes:
|
|
1261
|
-
itemStatuses:
|
|
1262
|
-
itemMeta:
|
|
1263
|
-
filters:
|
|
1264
|
-
moduleActions:
|
|
1265
|
-
itemActions:
|
|
1266
|
-
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
|
|
1267
1294
|
});
|
|
1268
|
-
function
|
|
1295
|
+
function ol(e, t = {}) {
|
|
1269
1296
|
const n = Object.keys(t).filter((s) => !Qe(e, s));
|
|
1270
1297
|
if (n.length > 0)
|
|
1271
1298
|
throw new Error(
|
|
@@ -1273,132 +1300,132 @@ function ji(e, t = {}) {
|
|
|
1273
1300
|
);
|
|
1274
1301
|
const o = {
|
|
1275
1302
|
formatters: Ve(e.formatters, t.formatters),
|
|
1276
|
-
itemTypes:
|
|
1277
|
-
itemStatuses:
|
|
1278
|
-
itemMeta:
|
|
1279
|
-
filters:
|
|
1280
|
-
moduleActions:
|
|
1281
|
-
itemActions:
|
|
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),
|
|
1282
1309
|
navigation: Ve(e.navigation, t.navigation)
|
|
1283
1310
|
};
|
|
1284
|
-
return
|
|
1311
|
+
return nl.parse(o), o;
|
|
1285
1312
|
}
|
|
1286
|
-
function
|
|
1287
|
-
return
|
|
1313
|
+
function Ic(e = {}) {
|
|
1314
|
+
return ol(tt, e);
|
|
1288
1315
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const t =
|
|
1316
|
+
function bc(e) {
|
|
1317
|
+
const t = St();
|
|
1291
1318
|
return U(
|
|
1292
|
-
(n, o) =>
|
|
1319
|
+
(n, o) => xs({ queryClient: t, courseId: e, module: n, item: o }),
|
|
1293
1320
|
[t, e]
|
|
1294
1321
|
);
|
|
1295
1322
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const { formatters: e } =
|
|
1323
|
+
function Fe() {
|
|
1324
|
+
const { formatters: e } = _e(), { t, locale: n, timezone: o } = H();
|
|
1298
1325
|
return N(() => {
|
|
1299
|
-
const s = { t, locale: n, timezone: o }, r = (
|
|
1326
|
+
const s = { t, locale: n, timezone: o }, r = (l, a) => e.dateTime(l, a, s);
|
|
1300
1327
|
return {
|
|
1301
|
-
moduleLabel: (
|
|
1302
|
-
dueByline: (
|
|
1303
|
-
unlockByline: (
|
|
1304
|
-
unlockedByline: (
|
|
1305
|
-
points: (
|
|
1306
|
-
progress: (
|
|
1328
|
+
moduleLabel: (l, a) => e.moduleLabel(l, a, s) || null,
|
|
1329
|
+
dueByline: (l, a) => t("dueByline", { when: r(l, a) }),
|
|
1330
|
+
unlockByline: (l, a) => t("unlockByline", { when: r(l, a) }),
|
|
1331
|
+
unlockedByline: (l, a) => t("unlockedByline", { when: r(l, a) }),
|
|
1332
|
+
points: (l) => e.points(l, s),
|
|
1333
|
+
progress: (l, a, d) => e.progress(l, a, d, s)
|
|
1307
1334
|
};
|
|
1308
1335
|
}, [e, t, n, o]);
|
|
1309
1336
|
}
|
|
1310
|
-
const
|
|
1311
|
-
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) {
|
|
1312
1339
|
return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
|
|
1313
1340
|
}
|
|
1314
|
-
function
|
|
1341
|
+
function Qn(e) {
|
|
1315
1342
|
const {
|
|
1316
1343
|
courseId: t,
|
|
1317
1344
|
adapter: n,
|
|
1318
1345
|
pageSize: o,
|
|
1319
1346
|
includeItems: s,
|
|
1320
1347
|
filter: r,
|
|
1321
|
-
inlineItemsFirst:
|
|
1348
|
+
inlineItemsFirst: l,
|
|
1322
1349
|
inlineFirst: a,
|
|
1323
1350
|
view: d,
|
|
1324
|
-
staleTime:
|
|
1325
|
-
enabled:
|
|
1351
|
+
staleTime: c,
|
|
1352
|
+
enabled: u
|
|
1326
1353
|
} = e;
|
|
1327
1354
|
return {
|
|
1328
1355
|
// `inlineItemsFirst` is deliberately out of the key: it is derived from this very list.
|
|
1329
|
-
queryKey:
|
|
1356
|
+
queryKey: Oe.list(t, { view: d, pageSize: o, includeItems: s, filter: r }),
|
|
1330
1357
|
initialPageParam: null,
|
|
1331
|
-
queryFn: ({ pageParam: p, signal:
|
|
1358
|
+
queryFn: ({ pageParam: p, signal: g }) => n.listModules({
|
|
1332
1359
|
courseId: t,
|
|
1333
1360
|
cursor: p,
|
|
1334
1361
|
pageSize: o,
|
|
1335
1362
|
includeItems: s,
|
|
1336
1363
|
filter: r,
|
|
1337
|
-
inlineItemsFirst:
|
|
1364
|
+
inlineItemsFirst: l,
|
|
1338
1365
|
inlineFirst: a,
|
|
1339
|
-
signal:
|
|
1366
|
+
signal: g
|
|
1340
1367
|
}),
|
|
1341
|
-
getNextPageParam:
|
|
1342
|
-
enabled:
|
|
1343
|
-
staleTime:
|
|
1368
|
+
getNextPageParam: Wn,
|
|
1369
|
+
enabled: u,
|
|
1370
|
+
staleTime: c,
|
|
1344
1371
|
refetchOnWindowFocus: !1
|
|
1345
1372
|
};
|
|
1346
1373
|
}
|
|
1347
|
-
function
|
|
1348
|
-
const { courseId: t, moduleId: n, adapter: o, pageSize: s, view: r, staleTime:
|
|
1374
|
+
function Vn(e) {
|
|
1375
|
+
const { courseId: t, moduleId: n, adapter: o, pageSize: s, view: r, staleTime: l, enabled: a, limit: d } = e;
|
|
1349
1376
|
return {
|
|
1350
|
-
queryKey:
|
|
1377
|
+
queryKey: Oe.items(t, n, { view: r, pageSize: s }),
|
|
1351
1378
|
initialPageParam: null,
|
|
1352
|
-
queryFn: ({ pageParam:
|
|
1353
|
-
const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor:
|
|
1379
|
+
queryFn: ({ pageParam: c, signal: u }) => {
|
|
1380
|
+
const p = () => o.listModuleItems({ courseId: t, moduleId: n, cursor: c, pageSize: s, signal: u });
|
|
1354
1381
|
return d ? d(() => {
|
|
1355
|
-
if (
|
|
1382
|
+
if (u.aborted)
|
|
1356
1383
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
1357
1384
|
return p();
|
|
1358
1385
|
}) : p();
|
|
1359
1386
|
},
|
|
1360
|
-
getNextPageParam:
|
|
1387
|
+
getNextPageParam: Wn,
|
|
1361
1388
|
enabled: a,
|
|
1362
|
-
staleTime:
|
|
1389
|
+
staleTime: l,
|
|
1363
1390
|
refetchOnWindowFocus: !1
|
|
1364
1391
|
};
|
|
1365
1392
|
}
|
|
1366
|
-
function
|
|
1367
|
-
var
|
|
1393
|
+
function rl(e) {
|
|
1394
|
+
var E;
|
|
1368
1395
|
const {
|
|
1369
1396
|
courseId: t,
|
|
1370
1397
|
adapter: n,
|
|
1371
|
-
pageSize: o =
|
|
1398
|
+
pageSize: o = vt,
|
|
1372
1399
|
includeItems: s = !1,
|
|
1373
1400
|
filter: r,
|
|
1374
|
-
inlineItemsFirst:
|
|
1401
|
+
inlineItemsFirst: l,
|
|
1375
1402
|
inlineFirst: a,
|
|
1376
1403
|
view: d,
|
|
1377
|
-
staleTime:
|
|
1378
|
-
enabled:
|
|
1379
|
-
} = e, p =
|
|
1380
|
-
|
|
1404
|
+
staleTime: c = nt,
|
|
1405
|
+
enabled: u = !0
|
|
1406
|
+
} = e, p = _t({
|
|
1407
|
+
...Qn({
|
|
1381
1408
|
courseId: t,
|
|
1382
1409
|
adapter: n,
|
|
1383
1410
|
pageSize: o,
|
|
1384
1411
|
includeItems: s,
|
|
1385
1412
|
filter: r,
|
|
1386
|
-
inlineItemsFirst:
|
|
1413
|
+
inlineItemsFirst: l,
|
|
1387
1414
|
inlineFirst: a,
|
|
1388
1415
|
view: d,
|
|
1389
|
-
staleTime:
|
|
1390
|
-
enabled:
|
|
1416
|
+
staleTime: c,
|
|
1417
|
+
enabled: u
|
|
1391
1418
|
}),
|
|
1392
1419
|
// `useItemsMode` shares `modulesQueryOptions`, and `inlineFirst` is out of that key.
|
|
1393
|
-
placeholderData:
|
|
1394
|
-
}),
|
|
1395
|
-
|
|
1396
|
-
}, [
|
|
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]);
|
|
1397
1424
|
return {
|
|
1398
|
-
modules:
|
|
1399
|
-
pageInfo:
|
|
1400
|
-
hasNextPage:
|
|
1401
|
-
fetchNextPage:
|
|
1425
|
+
modules: b,
|
|
1426
|
+
pageInfo: f,
|
|
1427
|
+
hasNextPage: f.hasNextPage,
|
|
1428
|
+
fetchNextPage: P,
|
|
1402
1429
|
isLoading: p.isLoading,
|
|
1403
1430
|
isFetchingNextPage: p.isFetchingNextPage,
|
|
1404
1431
|
isPending: p.isPending,
|
|
@@ -1406,42 +1433,42 @@ function Wi(e) {
|
|
|
1406
1433
|
error: p.error
|
|
1407
1434
|
};
|
|
1408
1435
|
}
|
|
1409
|
-
function
|
|
1410
|
-
var
|
|
1436
|
+
function yc(e) {
|
|
1437
|
+
var y;
|
|
1411
1438
|
const {
|
|
1412
1439
|
courseId: t,
|
|
1413
1440
|
moduleId: n,
|
|
1414
1441
|
adapter: o,
|
|
1415
|
-
pageSize: s =
|
|
1442
|
+
pageSize: s = Yn,
|
|
1416
1443
|
view: r,
|
|
1417
|
-
enabled:
|
|
1418
|
-
staleTime: a =
|
|
1444
|
+
enabled: l = !0,
|
|
1445
|
+
staleTime: a = nt,
|
|
1419
1446
|
limit: d
|
|
1420
|
-
} = e,
|
|
1421
|
-
|
|
1447
|
+
} = e, c = _t(
|
|
1448
|
+
Vn({
|
|
1422
1449
|
courseId: t,
|
|
1423
1450
|
moduleId: n,
|
|
1424
1451
|
adapter: o,
|
|
1425
1452
|
pageSize: s,
|
|
1426
1453
|
view: r,
|
|
1427
1454
|
staleTime: a,
|
|
1428
|
-
enabled:
|
|
1455
|
+
enabled: l,
|
|
1429
1456
|
limit: d
|
|
1430
1457
|
})
|
|
1431
|
-
),
|
|
1432
|
-
|
|
1433
|
-
}, [
|
|
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]);
|
|
1434
1461
|
return {
|
|
1435
1462
|
items: p,
|
|
1436
|
-
pageInfo:
|
|
1437
|
-
hasNextPage:
|
|
1438
|
-
fetchNextPage:
|
|
1439
|
-
isLoading:
|
|
1440
|
-
isFetchingNextPage:
|
|
1441
|
-
error:
|
|
1463
|
+
pageInfo: g,
|
|
1464
|
+
hasNextPage: g.hasNextPage,
|
|
1465
|
+
fetchNextPage: f,
|
|
1466
|
+
isLoading: c.isLoading,
|
|
1467
|
+
isFetchingNextPage: c.isFetchingNextPage,
|
|
1468
|
+
error: c.error
|
|
1442
1469
|
};
|
|
1443
1470
|
}
|
|
1444
|
-
function
|
|
1471
|
+
function il(e, t, n = Et) {
|
|
1445
1472
|
if (e.pageInfo.hasNextPage) return "onDemand";
|
|
1446
1473
|
let o = 0, s = 0;
|
|
1447
1474
|
for (const r of e.modules) {
|
|
@@ -1450,31 +1477,31 @@ function Hi(e, t, n = Mt) {
|
|
|
1450
1477
|
}
|
|
1451
1478
|
return o > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(s, 1) <= n ? "inline" : "onDemand";
|
|
1452
1479
|
}
|
|
1453
|
-
function
|
|
1454
|
-
var
|
|
1480
|
+
function ll(e) {
|
|
1481
|
+
var b;
|
|
1455
1482
|
const {
|
|
1456
1483
|
courseId: t,
|
|
1457
1484
|
adapter: n,
|
|
1458
1485
|
mode: o = "auto",
|
|
1459
|
-
inlineThreshold: s =
|
|
1460
|
-
nodeBudget: r = n.inlineNodeBudget ??
|
|
1461
|
-
pageSize:
|
|
1486
|
+
inlineThreshold: s = Hn,
|
|
1487
|
+
nodeBudget: r = n.inlineNodeBudget ?? Et,
|
|
1488
|
+
pageSize: l = vt,
|
|
1462
1489
|
filter: a,
|
|
1463
1490
|
view: d,
|
|
1464
|
-
staleTime:
|
|
1465
|
-
} = e,
|
|
1466
|
-
|
|
1491
|
+
staleTime: c = nt
|
|
1492
|
+
} = e, u = o === "auto", p = _t(
|
|
1493
|
+
Qn({
|
|
1467
1494
|
courseId: t,
|
|
1468
1495
|
adapter: n,
|
|
1469
|
-
pageSize:
|
|
1496
|
+
pageSize: l,
|
|
1470
1497
|
includeItems: !1,
|
|
1471
1498
|
filter: a,
|
|
1472
1499
|
view: d,
|
|
1473
|
-
staleTime:
|
|
1474
|
-
enabled:
|
|
1500
|
+
staleTime: c,
|
|
1501
|
+
enabled: u
|
|
1475
1502
|
})
|
|
1476
1503
|
);
|
|
1477
|
-
if (!
|
|
1504
|
+
if (!u)
|
|
1478
1505
|
return {
|
|
1479
1506
|
resolvedMode: o,
|
|
1480
1507
|
isResolving: !1,
|
|
@@ -1490,278 +1517,278 @@ function Ki(e) {
|
|
|
1490
1517
|
error: p.error,
|
|
1491
1518
|
inlineShape: null
|
|
1492
1519
|
};
|
|
1493
|
-
const
|
|
1494
|
-
return
|
|
1495
|
-
resolvedMode:
|
|
1520
|
+
const g = (b = p.data) == null ? void 0 : b.pages[0];
|
|
1521
|
+
return g ? {
|
|
1522
|
+
resolvedMode: il(g, s, r),
|
|
1496
1523
|
isResolving: !1,
|
|
1497
1524
|
probed: !0,
|
|
1498
1525
|
error: null,
|
|
1499
|
-
inlineShape:
|
|
1526
|
+
inlineShape: al(g)
|
|
1500
1527
|
} : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
|
|
1501
1528
|
}
|
|
1502
|
-
function
|
|
1529
|
+
function al(e) {
|
|
1503
1530
|
let t = 1;
|
|
1504
1531
|
for (const n of e.modules)
|
|
1505
1532
|
n.itemCount > t && (t = n.itemCount);
|
|
1506
1533
|
return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
|
|
1507
1534
|
}
|
|
1508
|
-
const
|
|
1509
|
-
function
|
|
1510
|
-
const o =
|
|
1511
|
-
|
|
1512
|
-
const
|
|
1513
|
-
|
|
1514
|
-
const
|
|
1515
|
-
let
|
|
1516
|
-
for (const [
|
|
1517
|
-
const
|
|
1518
|
-
|
|
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);
|
|
1519
1546
|
}
|
|
1520
|
-
return
|
|
1547
|
+
return P ? y : f;
|
|
1521
1548
|
});
|
|
1522
|
-
},
|
|
1523
|
-
for (const
|
|
1524
|
-
if (
|
|
1525
|
-
const
|
|
1549
|
+
}, g = new Set(d);
|
|
1550
|
+
for (const f of d) {
|
|
1551
|
+
if (u.has(f)) continue;
|
|
1552
|
+
const y = new Po(
|
|
1526
1553
|
o,
|
|
1527
|
-
t(
|
|
1554
|
+
t(f, !0)
|
|
1528
1555
|
);
|
|
1529
|
-
|
|
1556
|
+
u.set(f, y), y.subscribe(p);
|
|
1530
1557
|
}
|
|
1531
|
-
for (const [
|
|
1532
|
-
|
|
1533
|
-
for (const
|
|
1534
|
-
const
|
|
1535
|
-
|
|
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));
|
|
1536
1563
|
}
|
|
1537
|
-
let
|
|
1538
|
-
if (
|
|
1539
|
-
for (const [
|
|
1540
|
-
if (
|
|
1541
|
-
|
|
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);
|
|
1542
1569
|
}
|
|
1543
1570
|
p();
|
|
1544
|
-
}, [o, t, d, n]),
|
|
1545
|
-
const
|
|
1571
|
+
}, [o, t, d, n]), se(() => {
|
|
1572
|
+
const u = s.current;
|
|
1546
1573
|
return () => {
|
|
1547
|
-
for (const p of
|
|
1548
|
-
|
|
1574
|
+
for (const p of u.values()) p.destroy();
|
|
1575
|
+
u.clear();
|
|
1549
1576
|
};
|
|
1550
1577
|
}, []);
|
|
1551
|
-
const
|
|
1578
|
+
const c = U((u) => {
|
|
1552
1579
|
var p;
|
|
1553
|
-
(p = s.current.get(
|
|
1580
|
+
(p = s.current.get(u)) == null || p.fetchNextPage();
|
|
1554
1581
|
}, []);
|
|
1555
|
-
return { results: r, fetchNextPage:
|
|
1582
|
+
return { results: r, fetchNextPage: c };
|
|
1556
1583
|
}
|
|
1557
|
-
const
|
|
1584
|
+
const dl = [], ml = () => {
|
|
1558
1585
|
};
|
|
1559
|
-
function
|
|
1560
|
-
var
|
|
1586
|
+
function Mc(e) {
|
|
1587
|
+
var Pe, Ge;
|
|
1561
1588
|
const {
|
|
1562
1589
|
courseId: t,
|
|
1563
1590
|
adapter: n,
|
|
1564
1591
|
view: o,
|
|
1565
1592
|
itemsMode: s = "auto",
|
|
1566
|
-
inlineThreshold: r =
|
|
1567
|
-
pageSize:
|
|
1568
|
-
itemPageSize: a =
|
|
1569
|
-
itemConcurrency: d =
|
|
1570
|
-
retainCollapsedLimit:
|
|
1571
|
-
staleTime:
|
|
1593
|
+
inlineThreshold: r = Hn,
|
|
1594
|
+
pageSize: l = vt,
|
|
1595
|
+
itemPageSize: a = Yn,
|
|
1596
|
+
itemConcurrency: d = sl,
|
|
1597
|
+
retainCollapsedLimit: c = Kn,
|
|
1598
|
+
staleTime: u = nt,
|
|
1572
1599
|
initialExpandedModuleIds: p,
|
|
1573
|
-
initialFilter:
|
|
1574
|
-
} = e,
|
|
1575
|
-
() =>
|
|
1576
|
-
[
|
|
1577
|
-
),
|
|
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({
|
|
1578
1605
|
courseId: t,
|
|
1579
1606
|
adapter: n,
|
|
1580
1607
|
mode: s,
|
|
1581
1608
|
inlineThreshold: r,
|
|
1582
|
-
pageSize:
|
|
1583
|
-
filter:
|
|
1609
|
+
pageSize: l,
|
|
1610
|
+
filter: k,
|
|
1584
1611
|
view: o,
|
|
1585
|
-
staleTime:
|
|
1586
|
-
}),
|
|
1612
|
+
staleTime: u
|
|
1613
|
+
}), $ = q.resolvedMode, v = rl({
|
|
1587
1614
|
courseId: t,
|
|
1588
1615
|
adapter: n,
|
|
1589
|
-
pageSize:
|
|
1590
|
-
filter:
|
|
1616
|
+
pageSize: l,
|
|
1617
|
+
filter: k,
|
|
1591
1618
|
view: o,
|
|
1592
|
-
staleTime:
|
|
1593
|
-
includeItems:
|
|
1594
|
-
inlineItemsFirst: (
|
|
1619
|
+
staleTime: u,
|
|
1620
|
+
includeItems: $ === "inline",
|
|
1621
|
+
inlineItemsFirst: (Pe = q.inlineShape) == null ? void 0 : Pe.maxItemCount,
|
|
1595
1622
|
inlineFirst: (Ge = q.inlineShape) == null ? void 0 : Ge.moduleCount,
|
|
1596
|
-
enabled:
|
|
1597
|
-
}), [
|
|
1623
|
+
enabled: $ !== null
|
|
1624
|
+
}), [j, D] = oe(
|
|
1598
1625
|
() => p ?? []
|
|
1599
|
-
),
|
|
1600
|
-
|
|
1601
|
-
!
|
|
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) => {
|
|
1602
1629
|
const M = new Set(h), I = [...h];
|
|
1603
|
-
for (const R of
|
|
1630
|
+
for (const R of v.modules)
|
|
1604
1631
|
R.collapsed === !1 && !M.has(R.id) && I.push(R.id);
|
|
1605
1632
|
return I.length === h.length ? h : I;
|
|
1606
1633
|
});
|
|
1607
|
-
}, [
|
|
1608
|
-
const
|
|
1634
|
+
}, [v.modules, v.isPlaceholderData, F, B]);
|
|
1635
|
+
const K = N(() => {
|
|
1609
1636
|
const h = /* @__PURE__ */ new Map();
|
|
1610
|
-
for (const M of
|
|
1637
|
+
for (const M of v.modules) h.set(M.id, M);
|
|
1611
1638
|
return h;
|
|
1612
|
-
}, [
|
|
1613
|
-
() =>
|
|
1614
|
-
const M =
|
|
1639
|
+
}, [v.modules]), V = N(
|
|
1640
|
+
() => j.filter((h) => {
|
|
1641
|
+
const M = K.get(h);
|
|
1615
1642
|
return M !== void 0 && M.items === void 0;
|
|
1616
1643
|
}),
|
|
1617
|
-
[
|
|
1618
|
-
),
|
|
1619
|
-
(h, M) =>
|
|
1644
|
+
[j, K]
|
|
1645
|
+
), Z = N(() => new Set(V), [V]), W = N(() => Ao(d), [d]), w = U(
|
|
1646
|
+
(h, M) => Vn({
|
|
1620
1647
|
courseId: t,
|
|
1621
1648
|
moduleId: h,
|
|
1622
1649
|
adapter: n,
|
|
1623
1650
|
pageSize: a,
|
|
1624
1651
|
view: o,
|
|
1625
|
-
staleTime:
|
|
1652
|
+
staleTime: u,
|
|
1626
1653
|
enabled: M,
|
|
1627
|
-
limit:
|
|
1654
|
+
limit: W
|
|
1628
1655
|
}),
|
|
1629
|
-
[t, n, a, o,
|
|
1630
|
-
),
|
|
1656
|
+
[t, n, a, o, u, W]
|
|
1657
|
+
), Q = ul(V, w, c), ie = Q.fetchNextPage, ue = z(/* @__PURE__ */ new Map()), Ee = U(
|
|
1631
1658
|
(h) => {
|
|
1632
|
-
let M =
|
|
1633
|
-
return M || (M = () =>
|
|
1659
|
+
let M = ue.current.get(h);
|
|
1660
|
+
return M || (M = () => ie(h), ue.current.set(h, M)), M;
|
|
1634
1661
|
},
|
|
1635
|
-
[
|
|
1636
|
-
),
|
|
1637
|
-
|
|
1662
|
+
[ie]
|
|
1663
|
+
), L = U((h) => {
|
|
1664
|
+
Y.current = !0, D(
|
|
1638
1665
|
(M) => M.includes(h) ? M : [...M, h]
|
|
1639
1666
|
);
|
|
1640
|
-
}, []),
|
|
1667
|
+
}, []), X = U(
|
|
1641
1668
|
(h) => {
|
|
1642
|
-
|
|
1669
|
+
Y.current = !0, D((M) => M.filter((I) => I !== h)), b.cancelQueries({ queryKey: pt(t, h) });
|
|
1643
1670
|
},
|
|
1644
|
-
[
|
|
1645
|
-
),
|
|
1646
|
-
|
|
1671
|
+
[b, t]
|
|
1672
|
+
), Ce = U((h) => {
|
|
1673
|
+
Y.current = !0, D((M) => {
|
|
1647
1674
|
const I = new Set(M), R = h.filter((O) => !I.has(O));
|
|
1648
1675
|
return R.length === 0 ? M : [...M, ...R];
|
|
1649
1676
|
});
|
|
1650
1677
|
}, []), Ue = U(
|
|
1651
1678
|
(h) => {
|
|
1652
|
-
|
|
1679
|
+
Y.current = !0;
|
|
1653
1680
|
const M = new Set(h);
|
|
1654
|
-
|
|
1681
|
+
D((I) => {
|
|
1655
1682
|
const R = I.filter((O) => !M.has(O));
|
|
1656
1683
|
return R.length === I.length ? I : R;
|
|
1657
1684
|
});
|
|
1658
1685
|
for (const I of M)
|
|
1659
|
-
|
|
1686
|
+
b.cancelQueries({ queryKey: pt(t, I) });
|
|
1660
1687
|
},
|
|
1661
|
-
[
|
|
1662
|
-
),
|
|
1663
|
-
|
|
1664
|
-
const
|
|
1665
|
-
|
|
1666
|
-
for (const h of
|
|
1667
|
-
}, [
|
|
1668
|
-
|
|
1669
|
-
const
|
|
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(
|
|
1670
1697
|
(h) => {
|
|
1671
|
-
if (h ===
|
|
1672
|
-
if (
|
|
1673
|
-
|
|
1674
|
-
const I =
|
|
1675
|
-
for (const R of
|
|
1676
|
-
|
|
1677
|
-
} else
|
|
1678
|
-
|
|
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);
|
|
1679
1706
|
},
|
|
1680
|
-
[
|
|
1681
|
-
),
|
|
1707
|
+
[E, X]
|
|
1708
|
+
), me = U(
|
|
1682
1709
|
(h) => {
|
|
1683
|
-
|
|
1710
|
+
J.current.includes(h) ? X(h) : L(h);
|
|
1684
1711
|
},
|
|
1685
|
-
[
|
|
1686
|
-
), $e =
|
|
1712
|
+
[X, L]
|
|
1713
|
+
), $e = Q.results, Be = z(/* @__PURE__ */ new Map()), ve = U(
|
|
1687
1714
|
(h) => {
|
|
1688
|
-
var
|
|
1689
|
-
const M =
|
|
1715
|
+
var ge;
|
|
1716
|
+
const M = K.get(h), I = $e.get(h), R = Z.has(h), O = Be.current.get(h);
|
|
1690
1717
|
if (O && O.items === (M == null ? void 0 : M.items) && O.result === I && O.active === R)
|
|
1691
1718
|
return O.value;
|
|
1692
|
-
const
|
|
1719
|
+
const pe = (ne) => (Be.current.set(h, { items: M == null ? void 0 : M.items, result: I, active: R, value: ne }), ne);
|
|
1693
1720
|
if ((M == null ? void 0 : M.items) !== void 0)
|
|
1694
|
-
return
|
|
1721
|
+
return pe({
|
|
1695
1722
|
items: M.items,
|
|
1696
1723
|
pageInfo: Ze,
|
|
1697
1724
|
hasNextPage: !1,
|
|
1698
|
-
fetchNextPage:
|
|
1725
|
+
fetchNextPage: ml,
|
|
1699
1726
|
isLoading: !1,
|
|
1700
1727
|
isFetchingNextPage: !1,
|
|
1701
1728
|
error: null,
|
|
1702
1729
|
source: "inline"
|
|
1703
1730
|
});
|
|
1704
|
-
const
|
|
1705
|
-
return
|
|
1706
|
-
items:
|
|
1707
|
-
pageInfo:
|
|
1708
|
-
hasNextPage:
|
|
1709
|
-
fetchNextPage:
|
|
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),
|
|
1710
1737
|
isLoading: I ? I.isLoading : R,
|
|
1711
1738
|
isFetchingNextPage: (I == null ? void 0 : I.isFetchingNextPage) ?? !1,
|
|
1712
1739
|
error: (I == null ? void 0 : I.error) ?? null,
|
|
1713
1740
|
source: "onDemand"
|
|
1714
1741
|
});
|
|
1715
1742
|
},
|
|
1716
|
-
[
|
|
1743
|
+
[K, $e, Ee, Z]
|
|
1717
1744
|
);
|
|
1718
1745
|
return {
|
|
1719
|
-
modules:
|
|
1720
|
-
pageInfo:
|
|
1721
|
-
hasNextPage:
|
|
1722
|
-
fetchNextPage:
|
|
1723
|
-
isLoading: (q.isResolving ||
|
|
1724
|
-
isRefreshing:
|
|
1725
|
-
isFetchingNextPage:
|
|
1726
|
-
error:
|
|
1727
|
-
itemsMode:
|
|
1728
|
-
getItems:
|
|
1729
|
-
expandModule:
|
|
1730
|
-
collapseModule:
|
|
1731
|
-
expandModules:
|
|
1746
|
+
modules: v.modules,
|
|
1747
|
+
pageInfo: v.pageInfo,
|
|
1748
|
+
hasNextPage: v.hasNextPage,
|
|
1749
|
+
fetchNextPage: v.fetchNextPage,
|
|
1750
|
+
isLoading: (q.isResolving || v.isPending) && !v.isPlaceholderData,
|
|
1751
|
+
isRefreshing: v.isPlaceholderData,
|
|
1752
|
+
isFetchingNextPage: v.isFetchingNextPage,
|
|
1753
|
+
error: v.error ?? q.error,
|
|
1754
|
+
itemsMode: $,
|
|
1755
|
+
getItems: ve,
|
|
1756
|
+
expandModule: L,
|
|
1757
|
+
collapseModule: X,
|
|
1758
|
+
expandModules: Ce,
|
|
1732
1759
|
collapseModules: Ue,
|
|
1733
|
-
collapseAllModules:
|
|
1734
|
-
toggleModule:
|
|
1735
|
-
expandedModuleIds:
|
|
1736
|
-
filter:
|
|
1760
|
+
collapseAllModules: we,
|
|
1761
|
+
toggleModule: me,
|
|
1762
|
+
expandedModuleIds: j,
|
|
1763
|
+
filter: y,
|
|
1737
1764
|
setFilter: ze,
|
|
1738
|
-
filterEntry:
|
|
1739
|
-
filterPredicate:
|
|
1740
|
-
filterResultsArePartial:
|
|
1765
|
+
filterEntry: A,
|
|
1766
|
+
filterPredicate: ft(A) ? A == null ? void 0 : A.predicate : void 0,
|
|
1767
|
+
filterResultsArePartial: y !== re && ft(A) && v.hasNextPage
|
|
1741
1768
|
};
|
|
1742
1769
|
}
|
|
1743
|
-
function
|
|
1744
|
-
const { t: o } =
|
|
1745
|
-
return /* @__PURE__ */ C
|
|
1746
|
-
/* @__PURE__ */
|
|
1747
|
-
/* @__PURE__ */
|
|
1748
|
-
|
|
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") }) }),
|
|
1774
|
+
/* @__PURE__ */ i(
|
|
1775
|
+
S,
|
|
1749
1776
|
{
|
|
1750
1777
|
gap: "space4",
|
|
1751
1778
|
wrap: "wrap",
|
|
1752
1779
|
as: "div",
|
|
1753
1780
|
role: "group",
|
|
1754
|
-
"aria-labelledby":
|
|
1781
|
+
"aria-labelledby": l,
|
|
1755
1782
|
"data-testid": "filter-chips",
|
|
1756
1783
|
children: r.map((a) => {
|
|
1757
1784
|
const d = a.key === e;
|
|
1758
|
-
return /* @__PURE__ */
|
|
1759
|
-
|
|
1785
|
+
return /* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(
|
|
1786
|
+
ke,
|
|
1760
1787
|
{
|
|
1761
1788
|
size: "medium",
|
|
1762
1789
|
color: d ? "primary" : "secondary",
|
|
1763
1790
|
"aria-pressed": d,
|
|
1764
|
-
"aria-describedby": a.key !==
|
|
1791
|
+
"aria-describedby": a.key !== re && ft(a) ? n : void 0,
|
|
1765
1792
|
onClick: () => t(a.key),
|
|
1766
1793
|
"data-testid": `filter-chip-${a.key}`,
|
|
1767
1794
|
themeOverride: { borderRadius: "0.5rem" },
|
|
@@ -1773,12 +1800,12 @@ function el({ value: e, onChange: t, describedBy: n }) {
|
|
|
1773
1800
|
)
|
|
1774
1801
|
] });
|
|
1775
1802
|
}
|
|
1776
|
-
const
|
|
1803
|
+
const gl = 20, fl = 4.5, Vt = 7, hl = 5, Il = 20, Zn = "#000000", Xn = "#FFFFFF", Jn = {
|
|
1777
1804
|
primary: { semantic: "base", textKey: "baseTextColor", borderKey: "baseBorderColor" },
|
|
1778
1805
|
info: { semantic: "info", textKey: "infoTextColor", borderKey: "infoBorderColor" },
|
|
1779
1806
|
success: { semantic: "success", textKey: "successTextColor", borderKey: "successBorderColor" },
|
|
1780
1807
|
warning: { semantic: "warning", textKey: "warningTextColor", borderKey: "warningBorderColor" }
|
|
1781
|
-
},
|
|
1808
|
+
}, bl = {
|
|
1782
1809
|
card: {
|
|
1783
1810
|
primary: { fill: "#E8EAEC", stroke: "#8D959F", text: "#273540" },
|
|
1784
1811
|
info: { fill: "#D5E4F2", stroke: "#2B7ABC", text: "#23649A" },
|
|
@@ -1792,96 +1819,114 @@ const tl = 20, nl = 4.5, jt = 7, ol = 5, sl = 20, Gn = "#000000", jn = "#FFFFFF"
|
|
|
1792
1819
|
warning: { fill: "#EBD2C4", stroke: "#CF4A00", text: "#A13900" }
|
|
1793
1820
|
}
|
|
1794
1821
|
};
|
|
1795
|
-
function
|
|
1796
|
-
const n =
|
|
1797
|
-
|
|
1798
|
-
|
|
1822
|
+
function yl(e, t) {
|
|
1823
|
+
const n = ko(
|
|
1824
|
+
dt(e),
|
|
1825
|
+
dt(Do(t, gl))
|
|
1799
1826
|
);
|
|
1800
|
-
return
|
|
1827
|
+
return Sn(n);
|
|
1801
1828
|
}
|
|
1802
|
-
function
|
|
1803
|
-
const o =
|
|
1804
|
-
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)));
|
|
1805
1832
|
}
|
|
1806
|
-
function
|
|
1807
|
-
const o =
|
|
1808
|
-
if (
|
|
1809
|
-
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;
|
|
1810
1837
|
let r = t;
|
|
1811
|
-
for (let
|
|
1812
|
-
r = s(r,
|
|
1813
|
-
return
|
|
1838
|
+
for (let l = 0; l < Il && ce(e, r) < o; l++)
|
|
1839
|
+
r = s(r, hl);
|
|
1840
|
+
return Sn(r);
|
|
1814
1841
|
}
|
|
1815
|
-
function
|
|
1816
|
-
return
|
|
1842
|
+
function _l(e) {
|
|
1843
|
+
return ut(e) && dt(e).a === 1;
|
|
1817
1844
|
}
|
|
1818
|
-
function
|
|
1845
|
+
function Zt(e, t) {
|
|
1819
1846
|
var n;
|
|
1820
1847
|
return t === "card" ? (n = e == null ? void 0 : e.elevatedSurface) == null ? void 0 : n.base : e == null ? void 0 : e.muted;
|
|
1821
1848
|
}
|
|
1822
|
-
function
|
|
1823
|
-
var
|
|
1824
|
-
const s =
|
|
1849
|
+
function Xt(e, t, n, o) {
|
|
1850
|
+
var l, a, d, c;
|
|
1851
|
+
const s = bl[n][e], r = t;
|
|
1825
1852
|
try {
|
|
1826
|
-
const
|
|
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);
|
|
1827
1854
|
if (!p) return s;
|
|
1828
|
-
const { semantic:
|
|
1829
|
-
if (!
|
|
1830
|
-
const
|
|
1831
|
-
return { fill:
|
|
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) };
|
|
1832
1859
|
} catch {
|
|
1833
1860
|
return s;
|
|
1834
1861
|
}
|
|
1835
1862
|
}
|
|
1836
|
-
const
|
|
1837
|
-
function
|
|
1863
|
+
const Jt = /* @__PURE__ */ new WeakMap();
|
|
1864
|
+
function eo(e, t, n, o = {}) {
|
|
1838
1865
|
if (typeof t != "object" || t === null)
|
|
1839
|
-
return
|
|
1840
|
-
let s =
|
|
1841
|
-
s === void 0 && (s = /* @__PURE__ */ new Map(),
|
|
1842
|
-
const r = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`,
|
|
1843
|
-
if (
|
|
1844
|
-
const a =
|
|
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));
|
|
1869
|
+
const r = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, l = s.get(r);
|
|
1870
|
+
if (l !== void 0) return l;
|
|
1871
|
+
const a = Xt(e, t, n, o);
|
|
1845
1872
|
return s.set(r, a), a;
|
|
1846
1873
|
}
|
|
1847
|
-
function
|
|
1848
|
-
const { textKey: n, borderKey: o } =
|
|
1874
|
+
function We(e, t) {
|
|
1875
|
+
const { textKey: n, borderKey: o } = Jn[e];
|
|
1849
1876
|
return (s, r) => {
|
|
1850
|
-
const
|
|
1851
|
-
stroke:
|
|
1852
|
-
label:
|
|
1877
|
+
const l = s, { fill: a, stroke: d, text: c } = eo(e, r, t, {
|
|
1878
|
+
stroke: l == null ? void 0 : l[o],
|
|
1879
|
+
label: l == null ? void 0 : l[n]
|
|
1853
1880
|
});
|
|
1854
|
-
return { backgroundColor: a, [n]:
|
|
1881
|
+
return { backgroundColor: a, [n]: c, [o]: d };
|
|
1855
1882
|
};
|
|
1856
1883
|
}
|
|
1857
|
-
function
|
|
1884
|
+
function en(e) {
|
|
1858
1885
|
return {
|
|
1859
|
-
primary:
|
|
1860
|
-
info:
|
|
1861
|
-
success:
|
|
1862
|
-
warning:
|
|
1886
|
+
primary: We("primary", e),
|
|
1887
|
+
info: We("info", e),
|
|
1888
|
+
success: We("success", e),
|
|
1889
|
+
warning: We("warning", e)
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
const Tl = {
|
|
1893
|
+
card: en("card"),
|
|
1894
|
+
row: en("row")
|
|
1895
|
+
}, El = "#9242B4", Cl = "#9E58BD";
|
|
1896
|
+
function tn(e) {
|
|
1897
|
+
return (t, n) => {
|
|
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
|
|
1902
|
+
});
|
|
1903
|
+
return { backgroundColor: o, baseTextColor: r, baseBorderColor: s };
|
|
1863
1904
|
};
|
|
1864
1905
|
}
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1906
|
+
const to = {
|
|
1907
|
+
tone: "primary",
|
|
1908
|
+
icon: /* @__PURE__ */ i(To, { size: "sm" }),
|
|
1909
|
+
themes: {
|
|
1910
|
+
card: tn("card"),
|
|
1911
|
+
row: tn("row")
|
|
1912
|
+
}
|
|
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" }) }
|
|
1883
1928
|
};
|
|
1884
|
-
function
|
|
1929
|
+
function no(e, t, n, o) {
|
|
1885
1930
|
switch (t) {
|
|
1886
1931
|
case "not_started":
|
|
1887
1932
|
return e("moduleStatusNotStarted");
|
|
@@ -1902,7 +1947,7 @@ function Wn(e, t, n, o) {
|
|
|
1902
1947
|
return e("moduleStatusLocked");
|
|
1903
1948
|
}
|
|
1904
1949
|
}
|
|
1905
|
-
function
|
|
1950
|
+
function Pl(e, t) {
|
|
1906
1951
|
switch (t) {
|
|
1907
1952
|
case "not_started":
|
|
1908
1953
|
return e("itemStatusNotStarted");
|
|
@@ -1918,87 +1963,95 @@ function fl(e, t) {
|
|
|
1918
1963
|
return e("itemStatusLocked");
|
|
1919
1964
|
}
|
|
1920
1965
|
}
|
|
1921
|
-
function
|
|
1922
|
-
|
|
1923
|
-
|
|
1966
|
+
function ot(e, t, n, o) {
|
|
1967
|
+
var s;
|
|
1968
|
+
return /* @__PURE__ */ i(
|
|
1969
|
+
qo,
|
|
1924
1970
|
{
|
|
1925
1971
|
color: e.tone,
|
|
1926
1972
|
renderIcon: e.icon,
|
|
1927
|
-
themeOverride:
|
|
1973
|
+
themeOverride: ((s = e.themes) == null ? void 0 : s[o]) ?? Tl[o][e.tone],
|
|
1928
1974
|
"data-testid": n,
|
|
1929
1975
|
children: t
|
|
1930
1976
|
}
|
|
1931
1977
|
);
|
|
1932
1978
|
}
|
|
1933
|
-
function
|
|
1979
|
+
function Al({
|
|
1934
1980
|
status: e,
|
|
1935
1981
|
missingCount: t,
|
|
1936
1982
|
incompleteCount: n
|
|
1937
1983
|
}) {
|
|
1938
|
-
const { t: o } =
|
|
1939
|
-
return
|
|
1940
|
-
|
|
1941
|
-
|
|
1984
|
+
const { t: o } = H();
|
|
1985
|
+
return ot(
|
|
1986
|
+
wl[e],
|
|
1987
|
+
no(o, e, t, n),
|
|
1942
1988
|
"module-status-pill",
|
|
1943
1989
|
"card"
|
|
1944
1990
|
);
|
|
1945
1991
|
}
|
|
1946
|
-
function
|
|
1947
|
-
const { t } =
|
|
1948
|
-
return
|
|
1949
|
-
|
|
1950
|
-
|
|
1992
|
+
function xl({ status: e }) {
|
|
1993
|
+
const { t } = H();
|
|
1994
|
+
return ot(
|
|
1995
|
+
vl[e],
|
|
1996
|
+
Pl(t, e),
|
|
1951
1997
|
"item-status-pill",
|
|
1952
1998
|
"row"
|
|
1953
1999
|
);
|
|
1954
2000
|
}
|
|
1955
|
-
|
|
2001
|
+
function Ll() {
|
|
2002
|
+
const { t: e } = H();
|
|
2003
|
+
return ot(to, e("moduleStatusDueSoon"), "module-due-soon-pill", "card");
|
|
2004
|
+
}
|
|
2005
|
+
function Rl() {
|
|
2006
|
+
const { t: e } = H();
|
|
2007
|
+
return ot(to, e("itemStatusDueSoon"), "item-due-soon-pill", "row");
|
|
2008
|
+
}
|
|
2009
|
+
function oo() {
|
|
2010
|
+
const e = Mn();
|
|
2011
|
+
return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
|
|
2012
|
+
}
|
|
2013
|
+
const so = 2.75, it = `${so}rem`, kl = { lineHeight: 0, display: "block" }, Dl = {
|
|
1956
2014
|
display: "inline-block",
|
|
1957
2015
|
paddingLeft: "0.5rem",
|
|
1958
2016
|
marginLeft: "0.5rem"
|
|
1959
|
-
},
|
|
1960
|
-
function
|
|
1961
|
-
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;
|
|
1962
2020
|
}
|
|
1963
|
-
const
|
|
2021
|
+
const ql = {
|
|
1964
2022
|
contentVisibility: "auto",
|
|
1965
2023
|
containIntrinsicSize: "auto 4.25rem"
|
|
1966
|
-
},
|
|
1967
|
-
function
|
|
1968
|
-
const e = fn();
|
|
1969
|
-
return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
|
|
1970
|
-
}
|
|
1971
|
-
function Vn(e, t) {
|
|
2024
|
+
}, Fl = "0.5rem";
|
|
2025
|
+
function io(e, t) {
|
|
1972
2026
|
var o, s;
|
|
1973
|
-
const n =
|
|
2027
|
+
const n = Mn();
|
|
1974
2028
|
return ("colors" in n ? (s = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : s[e] : void 0) ?? t;
|
|
1975
2029
|
}
|
|
1976
|
-
function
|
|
1977
|
-
const e =
|
|
2030
|
+
function lo() {
|
|
2031
|
+
const e = io("grey1424", Nl);
|
|
1978
2032
|
return N(
|
|
1979
|
-
() => ({ ...
|
|
2033
|
+
() => ({ ...Dl, borderLeft: `1px solid ${e}` }),
|
|
1980
2034
|
[e]
|
|
1981
2035
|
);
|
|
1982
2036
|
}
|
|
1983
|
-
function
|
|
2037
|
+
function Ul({
|
|
1984
2038
|
item: e,
|
|
1985
2039
|
today: t,
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
attachedBelow: s
|
|
2040
|
+
attachedAbove: n,
|
|
2041
|
+
attachedBelow: o
|
|
1989
2042
|
}) {
|
|
1990
|
-
var
|
|
1991
|
-
const { t:
|
|
2043
|
+
var W;
|
|
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");
|
|
1992
2045
|
if (e.type === "sub_header")
|
|
1993
|
-
return /* @__PURE__ */
|
|
1994
|
-
|
|
2046
|
+
return /* @__PURE__ */ i(
|
|
2047
|
+
C,
|
|
1995
2048
|
{
|
|
1996
2049
|
as: "div",
|
|
1997
2050
|
padding: "x-small small",
|
|
1998
2051
|
margin: "x-small 0 0 0",
|
|
1999
2052
|
"data-testid": `module-item-${e.id}`,
|
|
2000
|
-
children: /* @__PURE__ */
|
|
2001
|
-
|
|
2053
|
+
children: /* @__PURE__ */ i(
|
|
2054
|
+
x,
|
|
2002
2055
|
{
|
|
2003
2056
|
size: "small",
|
|
2004
2057
|
weight: "bold",
|
|
@@ -2006,102 +2059,125 @@ function El({
|
|
|
2006
2059
|
letterSpacing: "expanded",
|
|
2007
2060
|
"data-testid": "module-item-title",
|
|
2008
2061
|
"data-sub-header": "true",
|
|
2009
|
-
children:
|
|
2062
|
+
children: P
|
|
2010
2063
|
}
|
|
2011
2064
|
)
|
|
2012
2065
|
}
|
|
2013
2066
|
);
|
|
2014
|
-
const
|
|
2015
|
-
|
|
2016
|
-
|
|
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(
|
|
2084
|
+
C,
|
|
2017
2085
|
{
|
|
2018
2086
|
as: "div",
|
|
2019
2087
|
background: "secondary",
|
|
2020
|
-
borderRadius: `${
|
|
2088
|
+
borderRadius: `${V} ${V} ${Z} ${Z}`,
|
|
2021
2089
|
padding: "small",
|
|
2090
|
+
cursor: k ? "pointer" : void 0,
|
|
2091
|
+
onClick: k ? j : void 0,
|
|
2022
2092
|
"data-testid": `module-item-${e.id}`,
|
|
2023
|
-
children: /* @__PURE__ */
|
|
2024
|
-
/* @__PURE__ */
|
|
2025
|
-
e.indent > 0 ? /* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2027
|
-
|
|
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(
|
|
2097
|
+
C,
|
|
2028
2098
|
{
|
|
2029
2099
|
as: "div",
|
|
2030
2100
|
background: "primary",
|
|
2031
2101
|
borderWidth: "small",
|
|
2032
2102
|
borderRadius: "large",
|
|
2033
|
-
width:
|
|
2034
|
-
height:
|
|
2035
|
-
children: /* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2037
|
-
|
|
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
|
|
2038
2108
|
] }) })
|
|
2039
2109
|
}
|
|
2040
2110
|
) })
|
|
2041
2111
|
] }) }),
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
2044
|
-
|
|
2045
|
-
{
|
|
2046
|
-
weight: "bold",
|
|
2047
|
-
size: "medium",
|
|
2048
|
-
lineHeight: "condensed",
|
|
2049
|
-
color: w ? "secondary" : "primary",
|
|
2050
|
-
"data-testid": "module-item-title",
|
|
2051
|
-
"data-locked": w ? "true" : void 0,
|
|
2052
|
-
children: g
|
|
2053
|
-
}
|
|
2054
|
-
) : /* @__PURE__ */ C(
|
|
2055
|
-
_o,
|
|
2112
|
+
/* @__PURE__ */ T(S.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
2113
|
+
/* @__PURE__ */ i(C, { as: "div", children: k ? /* @__PURE__ */ T(
|
|
2114
|
+
bn,
|
|
2056
2115
|
{
|
|
2057
|
-
href:
|
|
2058
|
-
|
|
2116
|
+
href: k,
|
|
2117
|
+
elementRef: (w) => {
|
|
2118
|
+
p.current = w;
|
|
2119
|
+
},
|
|
2120
|
+
onClick: v,
|
|
2059
2121
|
forceButtonRole: !1,
|
|
2060
2122
|
variant: d,
|
|
2061
2123
|
target: e.newTab ? "_blank" : void 0,
|
|
2062
2124
|
rel: e.newTab ? "noopener noreferrer" : void 0,
|
|
2063
2125
|
children: [
|
|
2064
|
-
/* @__PURE__ */
|
|
2065
|
-
|
|
2126
|
+
/* @__PURE__ */ i(
|
|
2127
|
+
x,
|
|
2066
2128
|
{
|
|
2067
2129
|
weight: "bold",
|
|
2068
2130
|
size: "medium",
|
|
2069
2131
|
lineHeight: "condensed",
|
|
2070
2132
|
color: "primary",
|
|
2071
2133
|
"data-testid": "module-item-title",
|
|
2072
|
-
children:
|
|
2134
|
+
children: P
|
|
2073
2135
|
}
|
|
2074
2136
|
),
|
|
2075
|
-
e.newTab ? /* @__PURE__ */
|
|
2137
|
+
e.newTab ? /* @__PURE__ */ i(ct, { children: ` ${s("opensInNewWindow")}` }) : null
|
|
2076
2138
|
]
|
|
2077
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
|
+
}
|
|
2078
2151
|
) }),
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
|
|
2081
|
-
/* @__PURE__ */
|
|
2082
|
-
] },
|
|
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)) }) })
|
|
2083
2156
|
] }),
|
|
2084
|
-
e.status ? /* @__PURE__ */
|
|
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
|
|
2160
|
+
] }) }) : null
|
|
2085
2161
|
] }) })
|
|
2086
2162
|
}
|
|
2087
2163
|
) });
|
|
2088
2164
|
}
|
|
2089
|
-
const
|
|
2090
|
-
function
|
|
2091
|
-
const { t } =
|
|
2092
|
-
if (e.length === 1) return /* @__PURE__ */
|
|
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] }) });
|
|
2093
2169
|
const n = t("lockedByPrerequisitesByline", {
|
|
2094
2170
|
count: e.length,
|
|
2095
|
-
prerequisites:
|
|
2096
|
-
}), [o, ...s] = n.split(
|
|
2097
|
-
return /* @__PURE__ */
|
|
2171
|
+
prerequisites: nn
|
|
2172
|
+
}), [o, ...s] = n.split(nn), r = s.length > 0 ? s.join("") : null;
|
|
2173
|
+
return /* @__PURE__ */ T(Dt, { children: [
|
|
2098
2174
|
r === null ? null : o,
|
|
2099
|
-
/* @__PURE__ */
|
|
2175
|
+
/* @__PURE__ */ i(yn, { renderTip: e.join(", "), children: /* @__PURE__ */ i(
|
|
2100
2176
|
"span",
|
|
2101
2177
|
{
|
|
2102
2178
|
tabIndex: 0,
|
|
2103
|
-
style:
|
|
2104
|
-
onClick: (
|
|
2179
|
+
style: $l,
|
|
2180
|
+
onClick: (l) => l.stopPropagation(),
|
|
2105
2181
|
"data-testid": "module-byline-prerequisites",
|
|
2106
2182
|
children: r === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
|
|
2107
2183
|
}
|
|
@@ -2109,38 +2185,38 @@ function Pl({ names: e }) {
|
|
|
2109
2185
|
r
|
|
2110
2186
|
] });
|
|
2111
2187
|
}
|
|
2112
|
-
function
|
|
2113
|
-
var
|
|
2114
|
-
const n =
|
|
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;
|
|
2115
2191
|
let d = null;
|
|
2116
2192
|
r !== null && a && (s || !e.progress) ? d = n.unlockByline(r, t) : r !== null && !a && !e.progress && (d = n.unlockedByline(r, t));
|
|
2117
|
-
const
|
|
2118
|
-
return d === null && !
|
|
2193
|
+
const c = s && l.length > 0;
|
|
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: [
|
|
2119
2195
|
d,
|
|
2120
|
-
d !== null &&
|
|
2121
|
-
|
|
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
|
|
2122
2198
|
] }) });
|
|
2123
2199
|
}
|
|
2124
|
-
const
|
|
2125
|
-
var n, o, s, r,
|
|
2200
|
+
const jl = "#273540", Yl = "#D7DADE", Hl = "0.5rem", Kl = (e, t) => {
|
|
2201
|
+
var n, o, s, r, l;
|
|
2126
2202
|
return {
|
|
2127
|
-
meterColorBrand: ((o = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : o.grey125125) ??
|
|
2128
|
-
borderRadius: String(((s = t.borders) == null ? void 0 : s.radiusLarge) ??
|
|
2129
|
-
borderColor: ((
|
|
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,
|
|
2130
2206
|
trackBottomBorderColor: "transparent"
|
|
2131
2207
|
};
|
|
2132
|
-
},
|
|
2133
|
-
function
|
|
2208
|
+
}, Wl = "66.667%", Ql = "8rem", Vl = 2;
|
|
2209
|
+
function Zl({
|
|
2134
2210
|
module: e,
|
|
2135
2211
|
breakpoints: t
|
|
2136
2212
|
}) {
|
|
2137
|
-
const { t: n } =
|
|
2213
|
+
const { t: n } = H(), o = Fe(), s = e.progress;
|
|
2138
2214
|
if (!s || s.status === "locked" || s.requirementCount <= 0) return null;
|
|
2139
|
-
const r = t.mobileOnly,
|
|
2140
|
-
return /* @__PURE__ */
|
|
2141
|
-
|
|
2215
|
+
const r = t.mobileOnly, l = Object.keys(t).length === 0 || t.desktop === !0;
|
|
2216
|
+
return /* @__PURE__ */ T(
|
|
2217
|
+
S,
|
|
2142
2218
|
{
|
|
2143
|
-
width:
|
|
2219
|
+
width: l ? Wl : "100%",
|
|
2144
2220
|
direction: r ? "column" : "row",
|
|
2145
2221
|
alignItems: r ? "stretch" : "center",
|
|
2146
2222
|
wrap: "wrap",
|
|
@@ -2148,8 +2224,8 @@ function Ol({
|
|
|
2148
2224
|
margin: "small 0 0 0",
|
|
2149
2225
|
"data-testid": "module-progress",
|
|
2150
2226
|
children: [
|
|
2151
|
-
/* @__PURE__ */
|
|
2152
|
-
|
|
2227
|
+
/* @__PURE__ */ i(S.Item, { size: r ? void 0 : Ql, shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
2228
|
+
Ro,
|
|
2153
2229
|
{
|
|
2154
2230
|
size: "x-small",
|
|
2155
2231
|
meterColor: "brand",
|
|
@@ -2157,16 +2233,16 @@ function Ol({
|
|
|
2157
2233
|
valueMax: s.requirementCount,
|
|
2158
2234
|
shouldAnimate: !1,
|
|
2159
2235
|
screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
|
|
2160
|
-
formatScreenReaderValue: () =>
|
|
2236
|
+
formatScreenReaderValue: () => Bi(
|
|
2161
2237
|
n,
|
|
2162
2238
|
s.percentComplete,
|
|
2163
2239
|
s.requirementsMet,
|
|
2164
2240
|
s.requirementCount
|
|
2165
2241
|
),
|
|
2166
|
-
themeOverride:
|
|
2242
|
+
themeOverride: Kl
|
|
2167
2243
|
}
|
|
2168
2244
|
) }),
|
|
2169
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ i(S.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ i(x, { size: "small", color: "secondary", children: o.progress(
|
|
2170
2246
|
s.percentComplete,
|
|
2171
2247
|
s.requirementsMet,
|
|
2172
2248
|
s.requirementCount
|
|
@@ -2175,45 +2251,44 @@ function Ol({
|
|
|
2175
2251
|
}
|
|
2176
2252
|
);
|
|
2177
2253
|
}
|
|
2178
|
-
const
|
|
2179
|
-
function
|
|
2254
|
+
const on = (e) => `platform-modules-panel-${e}`;
|
|
2255
|
+
function It(e) {
|
|
2180
2256
|
return e !== void 0 && e.type !== "sub_header";
|
|
2181
2257
|
}
|
|
2182
|
-
function
|
|
2183
|
-
return
|
|
2258
|
+
function sn(e) {
|
|
2259
|
+
return It(e) && e.indent > 0;
|
|
2184
2260
|
}
|
|
2185
|
-
function
|
|
2261
|
+
function Xl({
|
|
2186
2262
|
module: e,
|
|
2187
2263
|
state: t,
|
|
2188
2264
|
today: n,
|
|
2189
|
-
|
|
2190
|
-
showDiagnostics: s
|
|
2265
|
+
showDiagnostics: o
|
|
2191
2266
|
}) {
|
|
2192
|
-
const { t:
|
|
2193
|
-
return
|
|
2194
|
-
!d || a === 0 ||
|
|
2195
|
-
|
|
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(
|
|
2270
|
+
s("itemsLoadedAnnouncement", {
|
|
2196
2271
|
loaded: a,
|
|
2197
2272
|
count: e.itemCount,
|
|
2198
2273
|
name: e.name
|
|
2199
2274
|
})
|
|
2200
2275
|
));
|
|
2201
|
-
}, [d, a, e.itemCount, e.name,
|
|
2202
|
-
|
|
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,
|
|
2203
2278
|
{
|
|
2204
2279
|
variant: "error",
|
|
2205
2280
|
margin: "0",
|
|
2206
|
-
liveRegion:
|
|
2281
|
+
liveRegion: fn,
|
|
2207
2282
|
liveRegionPoliteness: "assertive",
|
|
2208
2283
|
"data-testid": "items-error",
|
|
2209
|
-
children:
|
|
2284
|
+
children: s("itemsLoadErrorAlert", { message: t.error.message })
|
|
2210
2285
|
}
|
|
2211
|
-
) }) : t.isLoading ? /* @__PURE__ */ C
|
|
2212
|
-
/* @__PURE__ */
|
|
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") }),
|
|
2213
2288
|
" ",
|
|
2214
|
-
/* @__PURE__ */
|
|
2215
|
-
] }) : /* @__PURE__ */ C
|
|
2216
|
-
|
|
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: [
|
|
2217
2292
|
"items source: ",
|
|
2218
2293
|
t.source,
|
|
2219
2294
|
" · loaded ",
|
|
@@ -2221,24 +2296,25 @@ function ql({
|
|
|
2221
2296
|
" of ",
|
|
2222
2297
|
e.itemCount
|
|
2223
2298
|
] }) : null,
|
|
2224
|
-
t.items.length === 0 ? /* @__PURE__ */
|
|
2225
|
-
|
|
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,
|
|
2226
2301
|
{
|
|
2227
|
-
item:
|
|
2302
|
+
item: c,
|
|
2228
2303
|
today: n,
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
attachedBelow: ft(u) && Zt(t.items[c + 1])
|
|
2304
|
+
attachedAbove: sn(c) && It(t.items[u - 1]),
|
|
2305
|
+
attachedBelow: It(c) && sn(t.items[u + 1])
|
|
2232
2306
|
}
|
|
2233
|
-
) },
|
|
2234
|
-
t.hasNextPage ? /* @__PURE__ */
|
|
2235
|
-
|
|
2307
|
+
) }, c.id)) }),
|
|
2308
|
+
t.hasNextPage ? /* @__PURE__ */ i(C, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ i(
|
|
2309
|
+
ke,
|
|
2236
2310
|
{
|
|
2237
2311
|
size: "small",
|
|
2238
|
-
onClick:
|
|
2312
|
+
onClick: () => {
|
|
2313
|
+
r("load-more-items"), t.fetchNextPage();
|
|
2314
|
+
},
|
|
2239
2315
|
interaction: t.isFetchingNextPage ? "disabled" : "enabled",
|
|
2240
2316
|
"data-testid": "load-more-items",
|
|
2241
|
-
children: t.isFetchingNextPage ?
|
|
2317
|
+
children: t.isFetchingNextPage ? s("loadMoreItemsLoading") : s("loadMoreItems", {
|
|
2242
2318
|
loaded: t.items.length,
|
|
2243
2319
|
count: e.itemCount
|
|
2244
2320
|
})
|
|
@@ -2246,32 +2322,43 @@ function ql({
|
|
|
2246
2322
|
) }) : null
|
|
2247
2323
|
] });
|
|
2248
2324
|
}
|
|
2249
|
-
function
|
|
2325
|
+
function Jl({
|
|
2250
2326
|
module: e,
|
|
2251
2327
|
expanded: t,
|
|
2252
2328
|
onToggle: n,
|
|
2253
2329
|
itemsState: o,
|
|
2254
2330
|
today: s,
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
breakpoints: u = {}
|
|
2331
|
+
showDiagnostics: r = !1,
|
|
2332
|
+
headingLevel: l = "h3",
|
|
2333
|
+
moduleLabel: a,
|
|
2334
|
+
breakpoints: d = {}
|
|
2260
2335
|
}) {
|
|
2261
|
-
var
|
|
2262
|
-
const { t: c } =
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
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,
|
|
2339
|
+
{
|
|
2340
|
+
level: l,
|
|
2341
|
+
variant: "titleCardRegular",
|
|
2342
|
+
color: y ? "secondary" : "primary",
|
|
2343
|
+
"aria-label": k,
|
|
2344
|
+
"data-testid": "module-name",
|
|
2345
|
+
children: /* @__PURE__ */ i(Lo, { linesAllowed: Vl, children: k })
|
|
2346
|
+
}
|
|
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,
|
|
2267
2354
|
{
|
|
2268
2355
|
status: e.progress.status,
|
|
2269
2356
|
missingCount: e.progress.missingCount,
|
|
2270
2357
|
incompleteCount: e.progress.incompleteCount
|
|
2271
2358
|
}
|
|
2272
|
-
) : null;
|
|
2273
|
-
return /* @__PURE__ */
|
|
2274
|
-
|
|
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(
|
|
2361
|
+
C,
|
|
2275
2362
|
{
|
|
2276
2363
|
as: "div",
|
|
2277
2364
|
background: "primary",
|
|
@@ -2282,73 +2369,80 @@ function Fl({
|
|
|
2282
2369
|
margin: "0 0 small 0",
|
|
2283
2370
|
"data-testid": `module-card-${e.id}`,
|
|
2284
2371
|
children: [
|
|
2285
|
-
/* @__PURE__ */
|
|
2286
|
-
|
|
2372
|
+
/* @__PURE__ */ i(C, { as: "div", cursor: "pointer", children: /* @__PURE__ */ T(
|
|
2373
|
+
S,
|
|
2287
2374
|
{
|
|
2288
2375
|
alignItems: "start",
|
|
2289
2376
|
gap: "mediumSmall",
|
|
2290
|
-
onClick:
|
|
2377
|
+
onClick: D,
|
|
2291
2378
|
"data-testid": "module-header",
|
|
2292
2379
|
children: [
|
|
2293
|
-
/* @__PURE__ */
|
|
2294
|
-
/* @__PURE__ */ C
|
|
2295
|
-
/* @__PURE__ */
|
|
2296
|
-
|
|
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,
|
|
2297
2384
|
{
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2385
|
+
href: P,
|
|
2386
|
+
display: "inline-block",
|
|
2387
|
+
forceButtonRole: !1,
|
|
2388
|
+
variant: f,
|
|
2389
|
+
"aria-label": k,
|
|
2390
|
+
onClick: (w) => w.stopPropagation(),
|
|
2391
|
+
children: $
|
|
2303
2392
|
}
|
|
2304
|
-
),
|
|
2305
|
-
e.published ? null : /* @__PURE__ */
|
|
2393
|
+
) : $ }),
|
|
2394
|
+
e.published ? null : /* @__PURE__ */ T(x, { size: "x-small", color: "secondary", children: [
|
|
2306
2395
|
" ",
|
|
2307
2396
|
c("moduleUnpublishedBadge")
|
|
2308
2397
|
] })
|
|
2309
2398
|
] }),
|
|
2310
|
-
/* @__PURE__ */
|
|
2311
|
-
|
|
2312
|
-
|
|
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
|
|
2403
|
+
] }) }) : null,
|
|
2404
|
+
/* @__PURE__ */ i(Zl, { module: e, breakpoints: d })
|
|
2313
2405
|
] }),
|
|
2314
|
-
/* @__PURE__ */
|
|
2315
|
-
!
|
|
2316
|
-
|
|
2317
|
-
|
|
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
|
|
2410
|
+
] }) }) : null,
|
|
2411
|
+
/* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ i(
|
|
2412
|
+
xo,
|
|
2318
2413
|
{
|
|
2319
2414
|
size: "medium",
|
|
2320
2415
|
withBorder: !0,
|
|
2321
2416
|
withBackground: !1,
|
|
2322
2417
|
screenReaderLabel: t ? c("collapseModule", { name: e.name }) : c("expandModule", { name: e.name }),
|
|
2323
2418
|
"aria-expanded": t,
|
|
2324
|
-
"aria-controls":
|
|
2325
|
-
onClick: (
|
|
2326
|
-
|
|
2419
|
+
"aria-controls": on(e.id),
|
|
2420
|
+
onClick: (w) => {
|
|
2421
|
+
w.stopPropagation(), j();
|
|
2327
2422
|
},
|
|
2328
2423
|
"data-testid": `toggle-module-${e.id}`,
|
|
2329
|
-
children: t ? /* @__PURE__ */
|
|
2424
|
+
children: t ? /* @__PURE__ */ i(Co, {}) : /* @__PURE__ */ i(wo, {})
|
|
2330
2425
|
}
|
|
2331
2426
|
) })
|
|
2332
2427
|
] }) })
|
|
2333
2428
|
]
|
|
2334
2429
|
}
|
|
2335
2430
|
) }),
|
|
2336
|
-
/* @__PURE__ */
|
|
2337
|
-
|
|
2431
|
+
/* @__PURE__ */ i("div", { id: on(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
|
|
2432
|
+
Xl,
|
|
2338
2433
|
{
|
|
2339
2434
|
module: e,
|
|
2340
2435
|
state: o,
|
|
2341
2436
|
today: s,
|
|
2342
|
-
|
|
2343
|
-
showDiagnostics: i
|
|
2437
|
+
showDiagnostics: r
|
|
2344
2438
|
}
|
|
2345
2439
|
) : null })
|
|
2346
2440
|
]
|
|
2347
2441
|
}
|
|
2348
2442
|
);
|
|
2349
2443
|
}
|
|
2350
|
-
const
|
|
2351
|
-
function
|
|
2444
|
+
const ea = cn(Jl);
|
|
2445
|
+
function ta(e) {
|
|
2352
2446
|
switch (e) {
|
|
2353
2447
|
case "complete":
|
|
2354
2448
|
return "complete";
|
|
@@ -2364,11 +2458,11 @@ function zl(e) {
|
|
|
2364
2458
|
return "inProgress";
|
|
2365
2459
|
}
|
|
2366
2460
|
}
|
|
2367
|
-
function
|
|
2368
|
-
var
|
|
2461
|
+
function na(e) {
|
|
2462
|
+
var l, a, d;
|
|
2369
2463
|
let t = 0, n = 0, o = 0;
|
|
2370
|
-
for (const
|
|
2371
|
-
((
|
|
2464
|
+
for (const c of e)
|
|
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;
|
|
2372
2466
|
const s = e.length, r = s === 0 ? 0 : t === s ? 100 : Math.floor(t / s * 100);
|
|
2373
2467
|
return {
|
|
2374
2468
|
totalModules: s,
|
|
@@ -2378,30 +2472,30 @@ function $l(e) {
|
|
|
2378
2472
|
percent: r
|
|
2379
2473
|
};
|
|
2380
2474
|
}
|
|
2381
|
-
const
|
|
2382
|
-
function
|
|
2475
|
+
const oa = "1.75rem", sa = "4px", ra = "4px", ia = "6.5rem";
|
|
2476
|
+
function la({
|
|
2383
2477
|
module: e,
|
|
2384
2478
|
onClick: t
|
|
2385
2479
|
}) {
|
|
2386
|
-
var
|
|
2387
|
-
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", {
|
|
2388
2482
|
name: r,
|
|
2389
|
-
status:
|
|
2483
|
+
status: no(
|
|
2390
2484
|
n,
|
|
2391
|
-
|
|
2485
|
+
l,
|
|
2392
2486
|
((p = e.progress) == null ? void 0 : p.missingCount) ?? 0,
|
|
2393
|
-
((
|
|
2487
|
+
((g = e.progress) == null ? void 0 : g.incompleteCount) ?? 0
|
|
2394
2488
|
)
|
|
2395
|
-
}),
|
|
2396
|
-
return /* @__PURE__ */
|
|
2397
|
-
|
|
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(
|
|
2491
|
+
C,
|
|
2398
2492
|
{
|
|
2399
2493
|
as: "button",
|
|
2400
2494
|
type: "button",
|
|
2401
2495
|
display: "block",
|
|
2402
2496
|
width: "100%",
|
|
2403
|
-
height:
|
|
2404
|
-
borderRadius:
|
|
2497
|
+
height: oa,
|
|
2498
|
+
borderRadius: sa,
|
|
2405
2499
|
borderWidth: a === "complete" ? "none" : "small",
|
|
2406
2500
|
borderColor: "secondary",
|
|
2407
2501
|
background: a === "locked" ? "secondary" : "primary",
|
|
@@ -2412,44 +2506,44 @@ function Wl({
|
|
|
2412
2506
|
onClick: t ? () => t(e.id) : void 0,
|
|
2413
2507
|
"data-testid": `modules-progress-segment-${e.id}`,
|
|
2414
2508
|
children: [
|
|
2415
|
-
|
|
2416
|
-
|
|
2509
|
+
c > 0 ? /* @__PURE__ */ i(
|
|
2510
|
+
C,
|
|
2417
2511
|
{
|
|
2418
2512
|
as: "div",
|
|
2419
2513
|
position: "absolute",
|
|
2420
2514
|
insetInlineStart: "0",
|
|
2421
2515
|
insetInlineEnd: "0",
|
|
2422
2516
|
insetBlockEnd: "0",
|
|
2423
|
-
height: `${
|
|
2517
|
+
height: `${c}%`,
|
|
2424
2518
|
background: "brand"
|
|
2425
2519
|
}
|
|
2426
2520
|
) : null,
|
|
2427
|
-
/* @__PURE__ */
|
|
2521
|
+
/* @__PURE__ */ i(ct, { children: d })
|
|
2428
2522
|
]
|
|
2429
2523
|
}
|
|
2430
2524
|
) }) });
|
|
2431
2525
|
}
|
|
2432
|
-
function
|
|
2526
|
+
function aa({
|
|
2433
2527
|
modules: e,
|
|
2434
2528
|
onModuleClick: t
|
|
2435
2529
|
}) {
|
|
2436
|
-
const { t: n } =
|
|
2530
|
+
const { t: n } = H(), o = N(() => na(e), [e]);
|
|
2437
2531
|
if (!e.some((a) => a.progress !== void 0) || o.totalModules === 0) return null;
|
|
2438
2532
|
const r = n("moduleProgressOverviewSummary", {
|
|
2439
2533
|
count: o.totalModules,
|
|
2440
2534
|
completedModules: o.completedModules,
|
|
2441
2535
|
totalModules: o.totalModules
|
|
2442
|
-
}),
|
|
2536
|
+
}), l = o.totalItems > 0 ? n("moduleProgressOverviewDetail", {
|
|
2443
2537
|
itemsSummary: n("moduleProgressOverviewItemsSummary", {
|
|
2444
2538
|
count: o.totalItems,
|
|
2445
2539
|
completedItems: o.completedItems,
|
|
2446
2540
|
totalItems: o.totalItems
|
|
2447
2541
|
})
|
|
2448
2542
|
}) : null;
|
|
2449
|
-
return /* @__PURE__ */ C
|
|
2450
|
-
/* @__PURE__ */
|
|
2451
|
-
/* @__PURE__ */
|
|
2452
|
-
|
|
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: [
|
|
2545
|
+
/* @__PURE__ */ i(C, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ i(
|
|
2546
|
+
x,
|
|
2453
2547
|
{
|
|
2454
2548
|
size: "large",
|
|
2455
2549
|
weight: "bold",
|
|
@@ -2458,29 +2552,29 @@ function Hl({
|
|
|
2458
2552
|
children: n("moduleProgressOverviewPercentLabel", { percent: o.percent })
|
|
2459
2553
|
}
|
|
2460
2554
|
) }),
|
|
2461
|
-
/* @__PURE__ */
|
|
2555
|
+
/* @__PURE__ */ i(x, { size: "medium", "data-testid": "modules-progress-overview-summary", children: l ? `${r} ${l}` : r })
|
|
2462
2556
|
] }) }),
|
|
2463
|
-
/* @__PURE__ */
|
|
2464
|
-
|
|
2557
|
+
/* @__PURE__ */ i(
|
|
2558
|
+
S,
|
|
2465
2559
|
{
|
|
2466
2560
|
margin: "xx-small 0 0 0",
|
|
2467
|
-
gap:
|
|
2561
|
+
gap: ra,
|
|
2468
2562
|
role: "group",
|
|
2469
2563
|
"aria-label": n("moduleProgressOverviewGroupLabel"),
|
|
2470
2564
|
"data-testid": "modules-progress-overview-segments",
|
|
2471
|
-
children: e.map((a) => /* @__PURE__ */
|
|
2565
|
+
children: e.map((a) => /* @__PURE__ */ i(la, { module: a, onClick: t }, a.id))
|
|
2472
2566
|
}
|
|
2473
2567
|
)
|
|
2474
2568
|
] });
|
|
2475
2569
|
}
|
|
2476
|
-
function
|
|
2570
|
+
function ca({
|
|
2477
2571
|
counts: e,
|
|
2478
2572
|
itemsMode: t,
|
|
2479
2573
|
loadedModules: n
|
|
2480
2574
|
}) {
|
|
2481
2575
|
const o = e.listModules + e.listModuleItems;
|
|
2482
|
-
return /* @__PURE__ */
|
|
2483
|
-
|
|
2576
|
+
return /* @__PURE__ */ i(
|
|
2577
|
+
C,
|
|
2484
2578
|
{
|
|
2485
2579
|
as: "div",
|
|
2486
2580
|
background: "secondary",
|
|
@@ -2489,25 +2583,25 @@ function Kl({
|
|
|
2489
2583
|
padding: "x-small small",
|
|
2490
2584
|
margin: "0 0 small 0",
|
|
2491
2585
|
"data-testid": "dev-diagnostics",
|
|
2492
|
-
children: /* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */
|
|
2494
|
-
/* @__PURE__ */
|
|
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: [
|
|
2495
2589
|
"listModules: ",
|
|
2496
2590
|
e.listModules
|
|
2497
2591
|
] }) }),
|
|
2498
|
-
/* @__PURE__ */
|
|
2592
|
+
/* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
|
|
2499
2593
|
"listModuleItems: ",
|
|
2500
2594
|
e.listModuleItems
|
|
2501
2595
|
] }) }),
|
|
2502
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
|
|
2503
2597
|
"total: ",
|
|
2504
2598
|
o
|
|
2505
2599
|
] }) }),
|
|
2506
|
-
/* @__PURE__ */
|
|
2600
|
+
/* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "resolved-items-mode", children: [
|
|
2507
2601
|
"itemsMode: ",
|
|
2508
2602
|
t ?? "probing…"
|
|
2509
2603
|
] }) }),
|
|
2510
|
-
/* @__PURE__ */
|
|
2604
|
+
/* @__PURE__ */ i(S.Item, { children: /* @__PURE__ */ T(x, { size: "x-small", "data-testid": "modules-loaded-count", children: [
|
|
2511
2605
|
"modules loaded: ",
|
|
2512
2606
|
n
|
|
2513
2607
|
] }) })
|
|
@@ -2515,190 +2609,191 @@ function Kl({
|
|
|
2515
2609
|
}
|
|
2516
2610
|
);
|
|
2517
2611
|
}
|
|
2518
|
-
const
|
|
2519
|
-
function
|
|
2612
|
+
const ua = 200;
|
|
2613
|
+
function da({
|
|
2520
2614
|
data: e,
|
|
2521
2615
|
courseName: t,
|
|
2522
2616
|
courseContext: n,
|
|
2523
2617
|
today: o,
|
|
2524
2618
|
requestCounts: s,
|
|
2525
2619
|
showDiagnostics: r = s !== void 0,
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
breakpoints: u = {}
|
|
2620
|
+
as: l = "div",
|
|
2621
|
+
headingLevel: a = "h2",
|
|
2622
|
+
breakpoints: d = {}
|
|
2530
2623
|
}) {
|
|
2531
|
-
const { miniTablet: c, tablet:
|
|
2532
|
-
() => ({ miniTablet: c, tablet:
|
|
2533
|
-
[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]
|
|
2534
2627
|
), {
|
|
2535
|
-
modules:
|
|
2628
|
+
modules: E,
|
|
2536
2629
|
hasNextPage: A,
|
|
2537
|
-
fetchNextPage:
|
|
2538
|
-
isFetchingNextPage:
|
|
2539
|
-
isLoading:
|
|
2540
|
-
isRefreshing:
|
|
2541
|
-
error:
|
|
2542
|
-
itemsMode:
|
|
2630
|
+
fetchNextPage: k,
|
|
2631
|
+
isFetchingNextPage: q,
|
|
2632
|
+
isLoading: $,
|
|
2633
|
+
isRefreshing: v,
|
|
2634
|
+
error: j,
|
|
2635
|
+
itemsMode: D,
|
|
2543
2636
|
expandedModuleIds: F,
|
|
2544
|
-
expandModule:
|
|
2545
|
-
collapseModule:
|
|
2546
|
-
toggleModule:
|
|
2547
|
-
expandModules:
|
|
2548
|
-
collapseModules:
|
|
2549
|
-
getItems:
|
|
2550
|
-
filter:
|
|
2551
|
-
setFilter:
|
|
2552
|
-
filterEntry:
|
|
2553
|
-
filterPredicate:
|
|
2554
|
-
filterResultsArePartial:
|
|
2555
|
-
} = e, { t:
|
|
2556
|
-
var
|
|
2557
|
-
(
|
|
2558
|
-
}, []), [Be] =
|
|
2559
|
-
|
|
2560
|
-
!A && !
|
|
2561
|
-
}, [A,
|
|
2562
|
-
var
|
|
2563
|
-
!
|
|
2564
|
-
}, [
|
|
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,
|
|
2647
|
+
filterResultsArePartial: Ee
|
|
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]);
|
|
2565
2658
|
const h = N(
|
|
2566
|
-
() =>
|
|
2567
|
-
(
|
|
2659
|
+
() => E.filter(
|
|
2660
|
+
(_) => ue === void 0 || ue(_, { today: ve, timezone: X })
|
|
2568
2661
|
),
|
|
2569
|
-
[
|
|
2570
|
-
), M =
|
|
2662
|
+
[E, ue, ve, X]
|
|
2663
|
+
), M = z({
|
|
2571
2664
|
rows: h,
|
|
2572
2665
|
expanded: F,
|
|
2573
2666
|
items: /* @__PURE__ */ new Map()
|
|
2574
|
-
}), [I, R] =
|
|
2575
|
-
|
|
2667
|
+
}), [I, R] = oe(null);
|
|
2668
|
+
v ? I === null && R(M.current) : (M.current = {
|
|
2576
2669
|
rows: h,
|
|
2577
2670
|
expanded: F,
|
|
2578
|
-
items: new Map(F.map((
|
|
2671
|
+
items: new Map(F.map((_) => [_, W(_)]))
|
|
2579
2672
|
}, I !== null && R(null));
|
|
2580
|
-
const O = (I == null ? void 0 : I.rows) ?? h,
|
|
2581
|
-
() => O.filter((
|
|
2582
|
-
[O,
|
|
2583
|
-
),
|
|
2584
|
-
|
|
2585
|
-
if (
|
|
2586
|
-
if (
|
|
2587
|
-
|
|
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 }));
|
|
2588
2681
|
return;
|
|
2589
2682
|
}
|
|
2590
|
-
|
|
2683
|
+
xe === 0 && fe.current && (fe.current = !1, ne(!1), Ie(L("expandAllItemsLoaded")));
|
|
2591
2684
|
}
|
|
2592
|
-
}, [
|
|
2593
|
-
const
|
|
2594
|
-
if (
|
|
2595
|
-
|
|
2596
|
-
|
|
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 }));
|
|
2597
2691
|
return;
|
|
2598
2692
|
}
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
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(_);
|
|
2608
2703
|
return;
|
|
2609
2704
|
}
|
|
2610
|
-
const Ye =
|
|
2705
|
+
const Ye = G.expanded.includes(_);
|
|
2611
2706
|
R({
|
|
2612
|
-
...
|
|
2613
|
-
expanded: Ye ?
|
|
2614
|
-
}), Ye ?
|
|
2707
|
+
...G,
|
|
2708
|
+
expanded: Ye ? G.expanded.filter((fo) => fo !== _) : [...G.expanded, _]
|
|
2709
|
+
}), Ye ? B(_) : Y(_);
|
|
2615
2710
|
},
|
|
2616
|
-
[
|
|
2617
|
-
), [
|
|
2618
|
-
|
|
2619
|
-
if (!
|
|
2620
|
-
|
|
2711
|
+
[K, B, Y]
|
|
2712
|
+
), [po, xt] = oe(!1);
|
|
2713
|
+
se(() => {
|
|
2714
|
+
if (!v) {
|
|
2715
|
+
xt(!1);
|
|
2621
2716
|
return;
|
|
2622
2717
|
}
|
|
2623
|
-
const
|
|
2624
|
-
return () => clearTimeout(
|
|
2625
|
-
}, [
|
|
2626
|
-
const
|
|
2627
|
-
return /* @__PURE__ */ C
|
|
2628
|
-
n ? /* @__PURE__ */ C
|
|
2629
|
-
/* @__PURE__ */
|
|
2630
|
-
/* @__PURE__ */
|
|
2718
|
+
const _ = setTimeout(() => xt(!0), ua);
|
|
2719
|
+
return () => clearTimeout(_);
|
|
2720
|
+
}, [v]);
|
|
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: [
|
|
2631
2726
|
" ",
|
|
2632
2727
|
"/",
|
|
2633
2728
|
" "
|
|
2634
2729
|
] }),
|
|
2635
|
-
/* @__PURE__ */
|
|
2730
|
+
/* @__PURE__ */ i(x, { size: "small", color: "secondary", children: Ue })
|
|
2636
2731
|
] }) : null,
|
|
2637
|
-
/* @__PURE__ */
|
|
2638
|
-
|
|
2639
|
-
r && s ? /* @__PURE__ */
|
|
2640
|
-
|
|
2732
|
+
/* @__PURE__ */ i(In, { level: a, margin: "x-small 0 medium 0", children: Ue }),
|
|
2733
|
+
Pe ? /* @__PURE__ */ i(aa, { modules: Pe, onModuleClick: $e }) : null,
|
|
2734
|
+
r && s ? /* @__PURE__ */ i(
|
|
2735
|
+
ca,
|
|
2641
2736
|
{
|
|
2642
2737
|
counts: s,
|
|
2643
|
-
itemsMode:
|
|
2644
|
-
loadedModules:
|
|
2738
|
+
itemsMode: D,
|
|
2739
|
+
loadedModules: E.length
|
|
2645
2740
|
}
|
|
2646
2741
|
) : null,
|
|
2647
|
-
/* @__PURE__ */
|
|
2648
|
-
|
|
2742
|
+
/* @__PURE__ */ i(S, { justifyItems: "end", "data-testid": "modules-controls", children: /* @__PURE__ */ i(S.Item, { shouldGrow: ze, children: /* @__PURE__ */ i(
|
|
2743
|
+
ke,
|
|
2649
2744
|
{
|
|
2650
2745
|
display: ze ? "block" : "inline-block",
|
|
2651
|
-
onClick:
|
|
2746
|
+
onClick: uo,
|
|
2652
2747
|
interaction: O.length === 0 ? "disabled" : "enabled",
|
|
2653
|
-
renderIcon: je > 0 ? /* @__PURE__ */
|
|
2654
|
-
"aria-describedby": je > 0 ?
|
|
2748
|
+
renderIcon: je > 0 ? /* @__PURE__ */ i(at, { size: "x-small", renderTitle: L("itemsLoadingSpinnerLabel") }) : void 0,
|
|
2749
|
+
"aria-describedby": je > 0 ? ee : void 0,
|
|
2655
2750
|
"data-testid": "expand-collapse-all",
|
|
2656
|
-
children:
|
|
2751
|
+
children: L(Ae ? "collapseAllModules" : "expandAllModules")
|
|
2657
2752
|
}
|
|
2658
2753
|
) }) }),
|
|
2659
|
-
je > 0 ? /* @__PURE__ */
|
|
2660
|
-
|
|
2754
|
+
je > 0 ? /* @__PURE__ */ i(C, { as: "div", margin: "xx-small 0 0 0", textAlign: "end", children: /* @__PURE__ */ i(
|
|
2755
|
+
x,
|
|
2661
2756
|
{
|
|
2662
2757
|
size: "x-small",
|
|
2663
2758
|
color: "secondary",
|
|
2664
|
-
id:
|
|
2759
|
+
id: ee,
|
|
2665
2760
|
"data-testid": "expand-all-loading-hint",
|
|
2666
|
-
children:
|
|
2761
|
+
children: L("expandAllLoadingItems", { count: je })
|
|
2667
2762
|
}
|
|
2668
2763
|
) }) : null,
|
|
2669
|
-
/* @__PURE__ */
|
|
2670
|
-
|
|
2764
|
+
/* @__PURE__ */ i(
|
|
2765
|
+
pl,
|
|
2671
2766
|
{
|
|
2672
|
-
value:
|
|
2673
|
-
onChange:
|
|
2674
|
-
describedBy:
|
|
2767
|
+
value: w,
|
|
2768
|
+
onChange: Q,
|
|
2769
|
+
describedBy: Ee ? de : void 0
|
|
2675
2770
|
}
|
|
2676
2771
|
),
|
|
2677
|
-
|
|
2678
|
-
|
|
2772
|
+
Ee ? /* @__PURE__ */ i(C, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ i(
|
|
2773
|
+
x,
|
|
2679
2774
|
{
|
|
2680
2775
|
size: "x-small",
|
|
2681
2776
|
color: "secondary",
|
|
2682
|
-
id:
|
|
2777
|
+
id: de,
|
|
2683
2778
|
"data-testid": "filter-partial-hint",
|
|
2684
|
-
children:
|
|
2779
|
+
children: L("filterScopeHint")
|
|
2685
2780
|
}
|
|
2686
2781
|
) }) : null,
|
|
2687
|
-
/* @__PURE__ */ C
|
|
2688
|
-
|
|
2689
|
-
|
|
2782
|
+
/* @__PURE__ */ T(C, { as: "div", margin: "medium 0 0 0", children: [
|
|
2783
|
+
j ? /* @__PURE__ */ i(
|
|
2784
|
+
hn,
|
|
2690
2785
|
{
|
|
2691
2786
|
variant: "error",
|
|
2692
2787
|
margin: "0 0 small 0",
|
|
2693
|
-
liveRegion:
|
|
2788
|
+
liveRegion: fn,
|
|
2694
2789
|
liveRegionPoliteness: "assertive",
|
|
2695
2790
|
"data-testid": "modules-error",
|
|
2696
|
-
children:
|
|
2791
|
+
children: L("modulesLoadErrorAlert", { message: j.message })
|
|
2697
2792
|
}
|
|
2698
2793
|
) : null,
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
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(
|
|
2796
|
+
C,
|
|
2702
2797
|
{
|
|
2703
2798
|
as: "div",
|
|
2704
2799
|
background: "secondary",
|
|
@@ -2706,11 +2801,11 @@ function Vl({
|
|
|
2706
2801
|
padding: "large",
|
|
2707
2802
|
textAlign: "center",
|
|
2708
2803
|
"data-testid": "modules-empty",
|
|
2709
|
-
children: /* @__PURE__ */
|
|
2804
|
+
children: /* @__PURE__ */ i(x, { color: "secondary", children: L("noModulesEmptyState") })
|
|
2710
2805
|
}
|
|
2711
2806
|
) : null,
|
|
2712
|
-
|
|
2713
|
-
|
|
2807
|
+
go ? /* @__PURE__ */ T(
|
|
2808
|
+
C,
|
|
2714
2809
|
{
|
|
2715
2810
|
as: "div",
|
|
2716
2811
|
background: "secondary",
|
|
@@ -2719,81 +2814,80 @@ function Vl({
|
|
|
2719
2814
|
textAlign: "center",
|
|
2720
2815
|
"data-testid": "modules-filtered-empty",
|
|
2721
2816
|
children: [
|
|
2722
|
-
/* @__PURE__ */
|
|
2723
|
-
/* @__PURE__ */
|
|
2724
|
-
|
|
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 }) }) }),
|
|
2818
|
+
/* @__PURE__ */ i(
|
|
2819
|
+
ke,
|
|
2725
2820
|
{
|
|
2726
2821
|
size: "small",
|
|
2727
2822
|
onClick: () => {
|
|
2728
|
-
|
|
2823
|
+
Q(re), me.current = !0;
|
|
2729
2824
|
},
|
|
2730
|
-
children:
|
|
2825
|
+
children: L("clearFilters")
|
|
2731
2826
|
}
|
|
2732
2827
|
)
|
|
2733
2828
|
]
|
|
2734
2829
|
}
|
|
2735
2830
|
) : null,
|
|
2736
|
-
/* @__PURE__ */
|
|
2831
|
+
/* @__PURE__ */ i(
|
|
2737
2832
|
"ul",
|
|
2738
2833
|
{
|
|
2739
|
-
style: { listStyle: "none", margin: 0, padding: 0, opacity:
|
|
2740
|
-
"aria-busy":
|
|
2834
|
+
style: { listStyle: "none", margin: 0, padding: 0, opacity: po ? 0.5 : 1 },
|
|
2835
|
+
"aria-busy": v,
|
|
2741
2836
|
"data-testid": "modules-stack",
|
|
2742
|
-
children: O.map((
|
|
2837
|
+
children: O.map((_) => /* @__PURE__ */ i(
|
|
2743
2838
|
"li",
|
|
2744
2839
|
{
|
|
2745
|
-
ref: (
|
|
2746
|
-
|
|
2840
|
+
ref: (G) => {
|
|
2841
|
+
G ? we.current.set(_.id, G) : we.current.delete(_.id);
|
|
2747
2842
|
},
|
|
2748
|
-
children: /* @__PURE__ */
|
|
2749
|
-
|
|
2843
|
+
children: /* @__PURE__ */ i(
|
|
2844
|
+
ea,
|
|
2750
2845
|
{
|
|
2751
|
-
module:
|
|
2752
|
-
expanded:
|
|
2753
|
-
onToggle:
|
|
2754
|
-
itemsState: (I == null ? void 0 : I.items.get(
|
|
2755
|
-
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,
|
|
2756
2851
|
showDiagnostics: r,
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
breakpoints: x
|
|
2852
|
+
headingLevel: a === "h1" ? "h2" : "h3",
|
|
2853
|
+
breakpoints: P
|
|
2760
2854
|
}
|
|
2761
2855
|
)
|
|
2762
2856
|
},
|
|
2763
|
-
|
|
2857
|
+
_.id
|
|
2764
2858
|
))
|
|
2765
2859
|
}
|
|
2766
2860
|
)
|
|
2767
2861
|
] }),
|
|
2768
|
-
A ? /* @__PURE__ */
|
|
2769
|
-
|
|
2862
|
+
A ? /* @__PURE__ */ i(C, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2863
|
+
ke,
|
|
2770
2864
|
{
|
|
2771
2865
|
color: "primary",
|
|
2772
2866
|
onClick: () => {
|
|
2773
|
-
|
|
2867
|
+
Ce("load-more-modules"), me.current = !0, k();
|
|
2774
2868
|
},
|
|
2775
|
-
interaction:
|
|
2869
|
+
interaction: q || v ? "disabled" : "enabled",
|
|
2776
2870
|
"data-testid": "load-more-modules",
|
|
2777
|
-
children:
|
|
2871
|
+
children: q ? L("loadMoreModulesLoading") : L("loadMoreModules", { count: E.length })
|
|
2778
2872
|
}
|
|
2779
|
-
) }) :
|
|
2780
|
-
|
|
2873
|
+
) }) : E.length > 0 ? /* @__PURE__ */ i(C, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2874
|
+
x,
|
|
2781
2875
|
{
|
|
2782
2876
|
size: "x-small",
|
|
2783
2877
|
color: "secondary",
|
|
2784
2878
|
"data-testid": "modules-all-loaded",
|
|
2785
|
-
elementRef: (
|
|
2786
|
-
|
|
2879
|
+
elementRef: (_) => {
|
|
2880
|
+
J.current = _;
|
|
2787
2881
|
},
|
|
2788
2882
|
tabIndex: -1,
|
|
2789
|
-
children:
|
|
2883
|
+
children: L("allModulesLoaded", { count: E.length })
|
|
2790
2884
|
}
|
|
2791
2885
|
) }) : null
|
|
2792
2886
|
] });
|
|
2793
2887
|
}
|
|
2794
|
-
const
|
|
2795
|
-
|
|
2796
|
-
),
|
|
2888
|
+
const Sc = Fo(
|
|
2889
|
+
da
|
|
2890
|
+
), De = [
|
|
2797
2891
|
"assignment",
|
|
2798
2892
|
"quiz",
|
|
2799
2893
|
"discussion",
|
|
@@ -2802,7 +2896,7 @@ const sc = vo(
|
|
|
2802
2896
|
"external_url",
|
|
2803
2897
|
"external_tool",
|
|
2804
2898
|
"sub_header"
|
|
2805
|
-
],
|
|
2899
|
+
], bt = [
|
|
2806
2900
|
"not_started",
|
|
2807
2901
|
"in_progress",
|
|
2808
2902
|
"complete",
|
|
@@ -2810,28 +2904,28 @@ const sc = vo(
|
|
|
2810
2904
|
"incomplete",
|
|
2811
2905
|
"missing_and_incomplete",
|
|
2812
2906
|
"locked"
|
|
2813
|
-
],
|
|
2907
|
+
], ao = [
|
|
2814
2908
|
"must_view",
|
|
2815
2909
|
"must_submit",
|
|
2816
2910
|
"must_contribute",
|
|
2817
2911
|
"must_mark_done",
|
|
2818
2912
|
"min_score",
|
|
2819
2913
|
"min_percentage"
|
|
2820
|
-
],
|
|
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 = [
|
|
2821
2915
|
"min_score",
|
|
2822
2916
|
"min_percentage"
|
|
2823
|
-
],
|
|
2917
|
+
], Ia = ao.filter(
|
|
2824
2918
|
(e) => !Xe.includes(e)
|
|
2825
|
-
),
|
|
2919
|
+
), ba = [
|
|
2826
2920
|
"in_progress",
|
|
2827
2921
|
"incomplete",
|
|
2828
2922
|
"missing_and_incomplete"
|
|
2829
|
-
],
|
|
2830
|
-
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];
|
|
2831
2925
|
return r === "min_score" ? { itemId: e, type: r, minScore: 10 } : r === "min_percentage" ? { itemId: e, type: r, minPercentage: 80 } : { itemId: e, type: r };
|
|
2832
|
-
},
|
|
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) => {
|
|
2833
2927
|
if (e === "locked") return "locked";
|
|
2834
|
-
if (
|
|
2928
|
+
if (_a(e, t, n, o)) return "missing";
|
|
2835
2929
|
if (!n) return;
|
|
2836
2930
|
const s = t && Xe.includes(n.type);
|
|
2837
2931
|
switch (e) {
|
|
@@ -2848,37 +2942,37 @@ const sc = vo(
|
|
|
2848
2942
|
default:
|
|
2849
2943
|
return e;
|
|
2850
2944
|
}
|
|
2851
|
-
},
|
|
2852
|
-
const d = String(e),
|
|
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");
|
|
2853
2947
|
return {
|
|
2854
2948
|
id: n,
|
|
2855
2949
|
moduleId: d,
|
|
2856
|
-
title: `${
|
|
2857
|
-
type:
|
|
2950
|
+
title: `${c} ${t + 1}`,
|
|
2951
|
+
type: c,
|
|
2858
2952
|
position: t + 1,
|
|
2859
2953
|
indent: t % 5 === 4 ? 1 : 0,
|
|
2860
2954
|
published: a === "teacher" ? o % 7 !== 0 : !0,
|
|
2861
|
-
url:
|
|
2862
|
-
newTab:
|
|
2863
|
-
completionRequirement:
|
|
2864
|
-
dueAt: p ?
|
|
2955
|
+
url: u ? null : `/courses/${Te}/modules/items/${n}`,
|
|
2956
|
+
newTab: pa.includes(c) && o % 2 === 0,
|
|
2957
|
+
completionRequirement: l,
|
|
2958
|
+
dueAt: p ? co(o % 90) : null,
|
|
2865
2959
|
status: s,
|
|
2866
2960
|
pointsPossible: r,
|
|
2867
|
-
extensions:
|
|
2961
|
+
extensions: Tt(
|
|
2868
2962
|
void 0,
|
|
2869
2963
|
o % 37 === 0 ? 5 + o % 4 * 10 : null
|
|
2870
2964
|
)
|
|
2871
2965
|
};
|
|
2872
|
-
},
|
|
2873
|
-
const s =
|
|
2966
|
+
}, wa = (e, t, n, o) => {
|
|
2967
|
+
const s = Pt(e), r = ba.includes(s), l = [];
|
|
2874
2968
|
let a = 0;
|
|
2875
2969
|
for (let d = 0; d < t; d += 1) {
|
|
2876
|
-
const
|
|
2877
|
-
|
|
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));
|
|
2878
2972
|
}
|
|
2879
|
-
return
|
|
2880
|
-
},
|
|
2881
|
-
const s =
|
|
2973
|
+
return l;
|
|
2974
|
+
}, va = (e, t, n, o) => {
|
|
2975
|
+
const s = Pt(e);
|
|
2882
2976
|
if (s === "locked" || s === "not_started") return s;
|
|
2883
2977
|
if (t.length === 0) return "not_started";
|
|
2884
2978
|
if (!t.some((r) => r.pointsPossible != null) || s === "missing" && n === 0 || s === "incomplete" && o === 0) return "in_progress";
|
|
@@ -2888,36 +2982,36 @@ const sc = vo(
|
|
|
2888
2982
|
if (o === 0) return "missing";
|
|
2889
2983
|
}
|
|
2890
2984
|
return s;
|
|
2891
|
-
},
|
|
2892
|
-
const o = t.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;
|
|
2893
2987
|
return {
|
|
2894
|
-
status:
|
|
2988
|
+
status: va(e, t, l, a),
|
|
2895
2989
|
requirementsMet: r,
|
|
2896
2990
|
requirementCount: s,
|
|
2897
2991
|
percentComplete: s > 0 ? Math.round(r / s * 100) : 0,
|
|
2898
|
-
nextDueAt:
|
|
2899
|
-
missingCount:
|
|
2992
|
+
nextDueAt: Pa(t),
|
|
2993
|
+
missingCount: l,
|
|
2900
2994
|
incompleteCount: a
|
|
2901
2995
|
};
|
|
2902
|
-
},
|
|
2903
|
-
const o =
|
|
2996
|
+
}, xa = (e, t, n) => {
|
|
2997
|
+
const o = Pt(e), s = e % 2 !== 0 && o !== "incomplete" && o !== "missing_and_incomplete" ? 1 : null;
|
|
2904
2998
|
return {
|
|
2905
2999
|
id: String(e),
|
|
2906
3000
|
name: `Module ${e}`,
|
|
2907
3001
|
position: e,
|
|
2908
3002
|
published: n === "teacher" ? e % 4 !== 0 : !0,
|
|
2909
3003
|
itemCount: t.length,
|
|
2910
|
-
unlockAt: e % 5 === 0 ?
|
|
3004
|
+
unlockAt: e % 5 === 0 ? co(e) : null,
|
|
2911
3005
|
prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
|
|
2912
3006
|
requirementCount: s,
|
|
2913
3007
|
requireSequentialProgress: e % 6 === 0,
|
|
2914
3008
|
completionRequirements: t.flatMap(
|
|
2915
3009
|
(r) => r.completionRequirement ? [r.completionRequirement] : []
|
|
2916
3010
|
),
|
|
2917
|
-
progress:
|
|
3011
|
+
progress: Aa(e, t, s)
|
|
2918
3012
|
};
|
|
2919
3013
|
};
|
|
2920
|
-
function
|
|
3014
|
+
function La(e) {
|
|
2921
3015
|
return {
|
|
2922
3016
|
courseId: e.courseId,
|
|
2923
3017
|
modules: e.modules.map(({ progress: t, ...n }) => n),
|
|
@@ -2929,32 +3023,32 @@ function ha(e) {
|
|
|
2929
3023
|
)
|
|
2930
3024
|
};
|
|
2931
3025
|
}
|
|
2932
|
-
function
|
|
2933
|
-
const n = t.view ?? "student", o = t.courseId ??
|
|
2934
|
-
let
|
|
2935
|
-
e.forEach((d,
|
|
2936
|
-
const
|
|
2937
|
-
|
|
3026
|
+
function st(e, t = {}) {
|
|
3027
|
+
const n = t.view ?? "student", o = t.courseId ?? Te, s = [], r = {};
|
|
3028
|
+
let l = 0;
|
|
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;
|
|
2938
3032
|
});
|
|
2939
3033
|
const a = { courseId: o, modules: s, itemsByModuleId: r };
|
|
2940
|
-
return n === "teacher" ?
|
|
3034
|
+
return n === "teacher" ? La(a) : a;
|
|
2941
3035
|
}
|
|
2942
|
-
const
|
|
2943
|
-
function
|
|
2944
|
-
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));
|
|
2945
3039
|
}
|
|
2946
|
-
function
|
|
2947
|
-
return
|
|
3040
|
+
function Tc() {
|
|
3041
|
+
return st(Array.from({ length: Na }, () => Oa));
|
|
2948
3042
|
}
|
|
2949
|
-
function
|
|
2950
|
-
return
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
3043
|
+
function Ec() {
|
|
3044
|
+
return st([
|
|
3045
|
+
ln,
|
|
3046
|
+
qa,
|
|
3047
|
+
ln
|
|
2954
3048
|
]);
|
|
2955
3049
|
}
|
|
2956
|
-
function
|
|
2957
|
-
const e = (s, r,
|
|
3050
|
+
function Cc() {
|
|
3051
|
+
const e = (s, r, l) => ({
|
|
2958
3052
|
id: String(s),
|
|
2959
3053
|
name: r,
|
|
2960
3054
|
position: s,
|
|
@@ -2970,29 +3064,29 @@ function ac() {
|
|
|
2970
3064
|
missingCount: 0,
|
|
2971
3065
|
incompleteCount: 0
|
|
2972
3066
|
},
|
|
2973
|
-
...
|
|
3067
|
+
...l
|
|
2974
3068
|
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, o = [
|
|
2975
|
-
e(1, "Locked by a future date", { unlockAt:
|
|
3069
|
+
e(1, "Locked by a future date", { unlockAt: rn }),
|
|
2976
3070
|
e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
|
|
2977
3071
|
e(3, "Locked by several prerequisites", {
|
|
2978
3072
|
prerequisiteModules: [t, n]
|
|
2979
3073
|
}),
|
|
2980
3074
|
e(4, "Locked by a date and a prerequisite", {
|
|
2981
|
-
unlockAt:
|
|
3075
|
+
unlockAt: rn,
|
|
2982
3076
|
prerequisiteModules: [t]
|
|
2983
3077
|
}),
|
|
2984
|
-
e(5, "Locked, and the unlock date has passed", { unlockAt:
|
|
3078
|
+
e(5, "Locked, and the unlock date has passed", { unlockAt: Ra })
|
|
2985
3079
|
];
|
|
2986
3080
|
return {
|
|
2987
|
-
courseId:
|
|
3081
|
+
courseId: Te,
|
|
2988
3082
|
modules: o,
|
|
2989
3083
|
itemsByModuleId: Object.fromEntries(o.map((s) => [s.id, []]))
|
|
2990
3084
|
};
|
|
2991
3085
|
}
|
|
2992
|
-
function
|
|
2993
|
-
return
|
|
3086
|
+
function wc() {
|
|
3087
|
+
return st([]);
|
|
2994
3088
|
}
|
|
2995
|
-
function
|
|
3089
|
+
function vc() {
|
|
2996
3090
|
const t = [
|
|
2997
3091
|
{
|
|
2998
3092
|
title: "Every fact: type, due date, points, requirement",
|
|
@@ -3021,7 +3115,7 @@ function uc() {
|
|
|
3021
3115
|
title: "Career item carrying an estimated duration",
|
|
3022
3116
|
type: "external_tool",
|
|
3023
3117
|
completionRequirement: { itemId: "5", type: "must_view" },
|
|
3024
|
-
extensions:
|
|
3118
|
+
extensions: Tt(void 0, 45)
|
|
3025
3119
|
},
|
|
3026
3120
|
{ title: "A file, ungradeable, so no points at all", type: "file" },
|
|
3027
3121
|
{ title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
|
|
@@ -3044,12 +3138,12 @@ function uc() {
|
|
|
3044
3138
|
indent: 0,
|
|
3045
3139
|
published: !0,
|
|
3046
3140
|
newTab: !1,
|
|
3047
|
-
url:
|
|
3141
|
+
url: Le(o + 1),
|
|
3048
3142
|
status: "not_started",
|
|
3049
3143
|
...n
|
|
3050
3144
|
}));
|
|
3051
3145
|
return {
|
|
3052
|
-
courseId:
|
|
3146
|
+
courseId: Te,
|
|
3053
3147
|
modules: [
|
|
3054
3148
|
{
|
|
3055
3149
|
id: "1",
|
|
@@ -3064,13 +3158,13 @@ function uc() {
|
|
|
3064
3158
|
itemsByModuleId: { 1: t }
|
|
3065
3159
|
};
|
|
3066
3160
|
}
|
|
3067
|
-
function
|
|
3161
|
+
function Pc() {
|
|
3068
3162
|
const t = [
|
|
3069
|
-
{ 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) },
|
|
3070
3164
|
{
|
|
3071
3165
|
title: "Desmos: interactive limit explorer",
|
|
3072
3166
|
type: "external_url",
|
|
3073
|
-
url:
|
|
3167
|
+
url: Le(2),
|
|
3074
3168
|
newTab: !0
|
|
3075
3169
|
},
|
|
3076
3170
|
{ title: "Practice", type: "sub_header", url: null },
|
|
@@ -3078,9 +3172,9 @@ function dc() {
|
|
|
3078
3172
|
{
|
|
3079
3173
|
title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
|
|
3080
3174
|
type: "assignment",
|
|
3081
|
-
url:
|
|
3175
|
+
url: Le(5)
|
|
3082
3176
|
},
|
|
3083
|
-
{ title: "Unit test", type: "quiz", url:
|
|
3177
|
+
{ title: "Unit test", type: "quiz", url: Le(6), status: "locked" }
|
|
3084
3178
|
].map((n, o) => ({
|
|
3085
3179
|
id: String(o + 1),
|
|
3086
3180
|
moduleId: "1",
|
|
@@ -3092,7 +3186,7 @@ function dc() {
|
|
|
3092
3186
|
...n
|
|
3093
3187
|
}));
|
|
3094
3188
|
return {
|
|
3095
|
-
courseId:
|
|
3189
|
+
courseId: Te,
|
|
3096
3190
|
modules: [
|
|
3097
3191
|
{
|
|
3098
3192
|
id: "1",
|
|
@@ -3108,97 +3202,101 @@ function dc() {
|
|
|
3108
3202
|
};
|
|
3109
3203
|
}
|
|
3110
3204
|
export {
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
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
|
-
|
|
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,
|
|
3213
|
+
Se as DEFAULT_LOCALE,
|
|
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,
|
|
3300
|
+
Me as visibleEntry,
|
|
3301
|
+
Tt as withEstimatedDurationMinutes
|
|
3204
3302
|
};
|