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