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