@instructure/platform-modules 0.2.0 → 0.4.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 +5 -5
- package/dist/adapters/canvasGraphql/index.d.ts +7 -33
- package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/normalize.d.ts +45 -187
- package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/queries.d.ts +8 -36
- package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
- package/dist/adapters/inMemory.d.ts +4 -28
- package/dist/adapters/inMemory.d.ts.map +1 -1
- package/dist/adapters/limits.d.ts +17 -74
- package/dist/adapters/limits.d.ts.map +1 -1
- package/dist/adapters/types.d.ts +10 -40
- 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 -44
- package/dist/cache/keys.d.ts.map +1 -1
- package/dist/components/FilterChips.d.ts +5 -9
- package/dist/components/FilterChips.d.ts.map +1 -1
- package/dist/components/ModuleCard.d.ts +10 -25
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleCard.stories.d.ts +15 -0
- package/dist/components/ModuleCard.stories.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +1 -1
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModuleNumberBadge.d.ts.map +1 -1
- package/dist/components/ModulesList.d.ts +2 -23
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +28 -87
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/StatusPill.d.ts +0 -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 +28 -45
- package/dist/components/labels.d.ts.map +1 -1
- package/dist/config/context.d.ts +0 -1
- package/dist/config/context.d.ts.map +1 -1
- package/dist/config/registry.d.ts +5 -13
- package/dist/config/registry.d.ts.map +1 -1
- package/dist/config/types.d.ts +0 -3
- package/dist/config/types.d.ts.map +1 -1
- package/dist/fixtures/generate.d.ts +6 -17
- 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 +7 -32
- package/dist/fixtures/scenarios.d.ts.map +1 -1
- package/dist/hooks/constants.d.ts +5 -22
- package/dist/hooks/constants.d.ts.map +1 -1
- package/dist/hooks/queryOptions.d.ts +3 -24
- package/dist/hooks/queryOptions.d.ts.map +1 -1
- package/dist/hooks/useItemsMode.d.ts +3 -52
- package/dist/hooks/useItemsMode.d.ts.map +1 -1
- package/dist/hooks/useModuleItemQueries.d.ts +1 -39
- package/dist/hooks/useModuleItemQueries.d.ts.map +1 -1
- package/dist/hooks/useModuleItems.d.ts +1 -1
- package/dist/hooks/useModules.d.ts +1 -1
- package/dist/hooks/useModulesPageData.d.ts +3 -29
- package/dist/hooks/useModulesPageData.d.ts.map +1 -1
- package/dist/i18n.d.ts +14 -21
- package/dist/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +3 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1208 -1071
- package/dist/types/domain.d.ts +25 -80
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/types/enums.d.ts +10 -41
- package/dist/types/enums.d.ts.map +1 -1
- package/dist/types/extensions.d.ts +0 -21
- package/dist/types/extensions.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/navigation.d.ts +1 -1
- package/dist/types/schemas.d.ts +5 -26
- package/dist/types/schemas.d.ts.map +1 -1
- package/locales/en.json +7 -8
- package/package.json +22 -19
package/dist/index.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
import { gql as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { useInfiniteQuery as
|
|
6
|
-
import
|
|
7
|
-
import { Button as
|
|
1
|
+
import { z as m } from "zod";
|
|
2
|
+
import { gql as oe } from "graphql-tag";
|
|
3
|
+
import { jsx as i, jsxs as _ } from "react/jsx-runtime";
|
|
4
|
+
import { createContext as Ye, useContext as Qe, useMemo as v, useCallback as k, useRef as O, useState as te, useEffect as he, useId as He, memo as Ke } from "react";
|
|
5
|
+
import { useInfiniteQuery as xe, useQueryClient as Ze, InfiniteQueryObserver as Bt } from "@tanstack/react-query";
|
|
6
|
+
import Gt from "p-limit";
|
|
7
|
+
import { Button as ne, IconButton as jt } from "@instructure/ui-buttons";
|
|
8
8
|
import { Flex as T } from "@instructure/ui-flex";
|
|
9
|
-
import { Text as
|
|
9
|
+
import { Text as M } from "@instructure/ui-text";
|
|
10
10
|
import { View as y } from "@instructure/ui-view";
|
|
11
|
-
import { politeAnnounce as
|
|
12
|
-
import { Alert as
|
|
13
|
-
import { Heading as
|
|
14
|
-
import { IconLockLine as
|
|
15
|
-
import { ProgressBar as
|
|
16
|
-
import { Spinner as
|
|
17
|
-
import { ScreenReaderContent as
|
|
18
|
-
import { Link as
|
|
19
|
-
import { Pill as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
11
|
+
import { politeAnnounce as Ve, getLiveRegion as Xe } from "@instructure/platform-instui-bindings";
|
|
12
|
+
import { Alert as Je } from "@instructure/ui-alerts";
|
|
13
|
+
import { Heading as et } from "@instructure/ui-heading";
|
|
14
|
+
import { IconLockLine as tt, IconWarningLine as nt, IconCheckLine as se, IconClockLine as st, IconArrowNestLine as Wt, IconEmptyLine as Yt, IconLtiLine as Qt, IconLinkLine as Ht, IconAttachMediaLine as Kt, IconDocumentLine as Zt, IconDiscussionLine as Vt, IconQuizLine as Xt, IconAssignmentLine as Jt, IconArrowOpenUpLine as en, IconArrowOpenDownLine as rt, IconSearchLine as tn } from "@instructure/ui-icons";
|
|
15
|
+
import { ProgressBar as nn } from "@instructure/ui-progress/v11_7";
|
|
16
|
+
import { Spinner as ot } from "@instructure/ui-spinner";
|
|
17
|
+
import { ScreenReaderContent as sn } from "@instructure/ui-a11y-content";
|
|
18
|
+
import { Link as rn } from "@instructure/ui-link";
|
|
19
|
+
import { Pill as on } from "@instructure/ui-pill";
|
|
20
|
+
import { WithBreakpoints as ln } from "@instructure/platform-with-breakpoints";
|
|
21
|
+
import { Menu as Te } from "@instructure/ui-menu";
|
|
22
|
+
import { TextInput as an } from "@instructure/ui-text-input";
|
|
23
|
+
const un = m.enum([
|
|
23
24
|
"assignment",
|
|
24
25
|
"quiz",
|
|
25
26
|
"discussion",
|
|
@@ -28,7 +29,16 @@ const tn = d.enum([
|
|
|
28
29
|
"external_url",
|
|
29
30
|
"external_tool",
|
|
30
31
|
"sub_header"
|
|
31
|
-
]),
|
|
32
|
+
]), cn = m.enum([
|
|
33
|
+
"not_started",
|
|
34
|
+
"in_progress",
|
|
35
|
+
"complete",
|
|
36
|
+
"submitted",
|
|
37
|
+
"graded",
|
|
38
|
+
"excused",
|
|
39
|
+
"missing",
|
|
40
|
+
"locked"
|
|
41
|
+
]), dn = m.enum(["not_started", "in_progress", "all_submitted", "all_graded", "missing", "locked"]), mn = m.enum([
|
|
32
42
|
"must_view",
|
|
33
43
|
"must_mark_done",
|
|
34
44
|
"must_contribute",
|
|
@@ -36,128 +46,131 @@ const tn = d.enum([
|
|
|
36
46
|
"min_score",
|
|
37
47
|
"min_percentage",
|
|
38
48
|
"unknown"
|
|
39
|
-
]),
|
|
40
|
-
status:
|
|
41
|
-
requirementsMet:
|
|
42
|
-
requirementCount:
|
|
43
|
-
percentComplete:
|
|
44
|
-
latestDueAt:
|
|
45
|
-
missingCount:
|
|
46
|
-
}),
|
|
47
|
-
itemId:
|
|
48
|
-
type:
|
|
49
|
-
minScore:
|
|
50
|
-
minPercentage:
|
|
51
|
-
}),
|
|
52
|
-
id:
|
|
53
|
-
moduleId:
|
|
54
|
-
title:
|
|
55
|
-
type:
|
|
56
|
-
position:
|
|
57
|
-
indent:
|
|
58
|
-
published:
|
|
59
|
-
url:
|
|
60
|
-
newTab:
|
|
61
|
-
completionRequirement:
|
|
62
|
-
dueAt:
|
|
63
|
-
status:
|
|
64
|
-
pointsPossible:
|
|
65
|
-
extensions:
|
|
66
|
-
}),
|
|
67
|
-
id:
|
|
68
|
-
name:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
49
|
+
]), gn = m.object({
|
|
50
|
+
status: dn,
|
|
51
|
+
requirementsMet: m.number(),
|
|
52
|
+
requirementCount: m.number(),
|
|
53
|
+
percentComplete: m.number().min(0).max(100),
|
|
54
|
+
latestDueAt: m.string().nullish(),
|
|
55
|
+
missingCount: m.number()
|
|
56
|
+
}), it = m.object({
|
|
57
|
+
itemId: m.string(),
|
|
58
|
+
type: mn,
|
|
59
|
+
minScore: m.number().nullish(),
|
|
60
|
+
minPercentage: m.number().nullish()
|
|
61
|
+
}), lt = m.object({
|
|
62
|
+
id: m.string(),
|
|
63
|
+
moduleId: m.string(),
|
|
64
|
+
title: m.string(),
|
|
65
|
+
type: un,
|
|
66
|
+
position: m.number(),
|
|
67
|
+
indent: m.number(),
|
|
68
|
+
published: m.boolean(),
|
|
69
|
+
url: m.string().nullish(),
|
|
70
|
+
newTab: m.boolean().nullish(),
|
|
71
|
+
completionRequirement: it.nullish(),
|
|
72
|
+
dueAt: m.string().nullish(),
|
|
73
|
+
status: cn.optional(),
|
|
74
|
+
pointsPossible: m.number().nullish(),
|
|
75
|
+
extensions: m.record(m.unknown()).optional()
|
|
76
|
+
}), pn = m.object({
|
|
77
|
+
id: m.string(),
|
|
78
|
+
name: m.string()
|
|
79
|
+
}), fn = m.object({
|
|
80
|
+
id: m.string(),
|
|
81
|
+
name: m.string(),
|
|
82
|
+
position: m.number(),
|
|
83
|
+
published: m.boolean(),
|
|
84
|
+
itemCount: m.number(),
|
|
85
|
+
items: m.array(lt).optional(),
|
|
86
|
+
unlockAt: m.string().nullish(),
|
|
87
|
+
prerequisiteModules: m.array(pn),
|
|
88
|
+
requirementCount: m.number().nullish(),
|
|
89
|
+
requireSequentialProgress: m.boolean(),
|
|
90
|
+
completionRequirements: m.array(it).optional(),
|
|
91
|
+
progress: gn.optional(),
|
|
92
|
+
extensions: m.record(m.unknown()).optional()
|
|
93
|
+
}), at = m.object({
|
|
94
|
+
hasNextPage: m.boolean(),
|
|
95
|
+
endCursor: m.string().nullable()
|
|
83
96
|
}).refine((e) => !e.hasNextPage || e.endCursor !== null, {
|
|
84
97
|
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.',
|
|
85
98
|
path: ["endCursor"]
|
|
86
|
-
}),
|
|
87
|
-
modules:
|
|
88
|
-
pageInfo:
|
|
89
|
-
}),
|
|
90
|
-
items:
|
|
91
|
-
pageInfo:
|
|
92
|
-
}),
|
|
93
|
-
function
|
|
99
|
+
}), hn = m.object({
|
|
100
|
+
modules: m.array(fn),
|
|
101
|
+
pageInfo: at
|
|
102
|
+
}), bn = m.object({
|
|
103
|
+
items: m.array(lt),
|
|
104
|
+
pageInfo: at
|
|
105
|
+
}), ut = "career.estimatedDurationMinutes";
|
|
106
|
+
function In(e) {
|
|
94
107
|
var n;
|
|
95
|
-
const t = (n = e.extensions) == null ? void 0 : n[
|
|
108
|
+
const t = (n = e.extensions) == null ? void 0 : n[ut];
|
|
96
109
|
return typeof t != "number" || !Number.isFinite(t) || t <= 0 ? null : t;
|
|
97
110
|
}
|
|
98
|
-
function
|
|
99
|
-
return t == null ? e : { ...e, [
|
|
111
|
+
function ct(e, t) {
|
|
112
|
+
return t == null ? e : { ...e, [ut]: t };
|
|
100
113
|
}
|
|
101
|
-
const
|
|
102
|
-
class
|
|
114
|
+
const we = 100, Le = 2e3;
|
|
115
|
+
class Mn extends Error {
|
|
103
116
|
constructor(t, n) {
|
|
104
117
|
super(
|
|
105
118
|
`This in-memory adapter was built for course ${t} but was asked for course ${n}. A fixture serves exactly one course.`
|
|
106
119
|
), this.name = "InMemoryCourseMismatchError", this.expected = t, this.received = n;
|
|
107
120
|
}
|
|
108
121
|
}
|
|
109
|
-
const
|
|
122
|
+
const Sn = (e) => `offset:${e}`, yn = (e) => {
|
|
110
123
|
if (!e) return 0;
|
|
111
124
|
const t = Number.parseInt(e.replace("offset:", ""), 10);
|
|
112
125
|
return Number.isFinite(t) && t >= 0 ? t : 0;
|
|
113
|
-
},
|
|
126
|
+
}, ve = (e) => {
|
|
114
127
|
if (e != null && e.aborted)
|
|
115
128
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
116
129
|
};
|
|
117
|
-
function
|
|
118
|
-
const s =
|
|
130
|
+
function ke(e, t, n) {
|
|
131
|
+
const s = yn(t), r = e.slice(s, s + n), o = s + r.length, l = o < e.length;
|
|
119
132
|
return {
|
|
120
133
|
slice: r,
|
|
121
|
-
pageInfo: { hasNextPage:
|
|
134
|
+
pageInfo: { hasNextPage: l, endCursor: l ? Sn(o) : null }
|
|
122
135
|
};
|
|
123
136
|
}
|
|
124
|
-
function
|
|
137
|
+
function Si(e, t = {}) {
|
|
125
138
|
const n = (r) => e.itemsByModuleId[r] ?? [], s = (r) => {
|
|
126
139
|
if (r !== e.courseId)
|
|
127
|
-
throw new
|
|
140
|
+
throw new Mn(e.courseId, r);
|
|
128
141
|
};
|
|
129
142
|
return {
|
|
130
143
|
async listModules({
|
|
131
144
|
courseId: r,
|
|
132
|
-
cursor:
|
|
133
|
-
pageSize:
|
|
134
|
-
includeItems:
|
|
145
|
+
cursor: o,
|
|
146
|
+
pageSize: l,
|
|
147
|
+
includeItems: u,
|
|
135
148
|
inlineItemsFirst: c,
|
|
136
149
|
signal: g
|
|
137
150
|
}) {
|
|
138
|
-
var
|
|
139
|
-
|
|
140
|
-
const { slice:
|
|
141
|
-
return { modules:
|
|
142
|
-
const
|
|
143
|
-
return { ...
|
|
144
|
-
}), pageInfo:
|
|
151
|
+
var p;
|
|
152
|
+
ve(g), s(r), (p = t.onRequest) == null || p.call(t, "listModules", { operation: "listModules", courseId: r });
|
|
153
|
+
const { slice: a, pageInfo: d } = ke(e.modules, o, l), h = Math.min(c ?? we, we);
|
|
154
|
+
return { modules: a.map((f) => {
|
|
155
|
+
const w = n(f.id), L = u && w.length <= h;
|
|
156
|
+
return { ...f, itemCount: w.length, items: L ? w : void 0 };
|
|
157
|
+
}), pageInfo: d };
|
|
145
158
|
},
|
|
146
159
|
async listModuleItems({
|
|
147
160
|
courseId: r,
|
|
148
|
-
moduleId:
|
|
149
|
-
cursor:
|
|
150
|
-
pageSize:
|
|
161
|
+
moduleId: o,
|
|
162
|
+
cursor: l,
|
|
163
|
+
pageSize: u,
|
|
151
164
|
signal: c
|
|
152
165
|
}) {
|
|
153
|
-
var
|
|
154
|
-
|
|
155
|
-
const { slice: g, pageInfo:
|
|
156
|
-
return { items: g, pageInfo:
|
|
166
|
+
var d;
|
|
167
|
+
ve(c), s(r), (d = t.onRequest) == null || d.call(t, "listModuleItems", { operation: "listModuleItems", courseId: r, moduleId: o });
|
|
168
|
+
const { slice: g, pageInfo: a } = ke(n(o), l, u);
|
|
169
|
+
return { items: g, pageInfo: a };
|
|
157
170
|
}
|
|
158
171
|
};
|
|
159
172
|
}
|
|
160
|
-
class
|
|
173
|
+
class dt extends Error {
|
|
161
174
|
constructor(t, n, s) {
|
|
162
175
|
const r = t === "module" ? "module" : "module item";
|
|
163
176
|
super(
|
|
@@ -165,11 +178,11 @@ class lt extends Error {
|
|
|
165
178
|
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = s;
|
|
166
179
|
}
|
|
167
180
|
}
|
|
168
|
-
function
|
|
181
|
+
function mt(e, t, n) {
|
|
169
182
|
if (e != null) return e;
|
|
170
|
-
throw new
|
|
183
|
+
throw new dt(t, n, "published");
|
|
171
184
|
}
|
|
172
|
-
function
|
|
185
|
+
function _n(e, t) {
|
|
173
186
|
if (e.onUnsupportedItem) {
|
|
174
187
|
e.onUnsupportedItem(t);
|
|
175
188
|
return;
|
|
@@ -178,7 +191,7 @@ function fn(e, t) {
|
|
|
178
191
|
`[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
|
|
179
192
|
);
|
|
180
193
|
}
|
|
181
|
-
const
|
|
194
|
+
const Tn = {
|
|
182
195
|
Assignment: "assignment",
|
|
183
196
|
Quiz: "quiz",
|
|
184
197
|
Discussion: "discussion",
|
|
@@ -190,27 +203,24 @@ const hn = {
|
|
|
190
203
|
ModuleExternalTool: "external_tool",
|
|
191
204
|
ExternalTool: "external_tool",
|
|
192
205
|
SubHeader: "sub_header",
|
|
193
|
-
// `
|
|
194
|
-
// inherits `ModuleItemInterface` and is assignment-shaped down to
|
|
195
|
-
// `pointsPossible`, `dueAt` and `submissionsConnection`. It was being dropped
|
|
196
|
-
// for no better reason than not being listed.
|
|
206
|
+
// Inherits `ModuleItemInterface` from `Types::AssignmentType`.
|
|
197
207
|
PeerReviewSubAssignment: "assignment"
|
|
198
208
|
};
|
|
199
|
-
function
|
|
209
|
+
function wn(e) {
|
|
200
210
|
const t = e == null ? void 0 : e.__typename;
|
|
201
211
|
if (!t) return null;
|
|
202
|
-
const n =
|
|
212
|
+
const n = Tn[t];
|
|
203
213
|
return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
|
|
204
214
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
215
|
+
const Pn = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
|
|
216
|
+
function En(e) {
|
|
207
217
|
if (!e) return null;
|
|
208
|
-
const t =
|
|
218
|
+
const t = Pn.exec(e);
|
|
209
219
|
if (!t) return null;
|
|
210
|
-
const [, n, s, r,
|
|
211
|
-
return Math.round(
|
|
220
|
+
const [, n, s, r, o, l] = t, u = Number(n ?? 0) * 7 * 24 * 60 + Number(s ?? 0) * 24 * 60 + Number(r ?? 0) * 60 + Number(o ?? 0) + Number(l ?? 0) / 60;
|
|
221
|
+
return Math.round(u);
|
|
212
222
|
}
|
|
213
|
-
const
|
|
223
|
+
const Cn = /* @__PURE__ */ new Set([
|
|
214
224
|
"must_view",
|
|
215
225
|
"must_mark_done",
|
|
216
226
|
"must_contribute",
|
|
@@ -218,37 +228,37 @@ const Mn = /* @__PURE__ */ new Set([
|
|
|
218
228
|
"min_score",
|
|
219
229
|
"min_percentage"
|
|
220
230
|
]);
|
|
221
|
-
function
|
|
222
|
-
return
|
|
231
|
+
function xn(e) {
|
|
232
|
+
return Cn.has(e) ? e : "unknown";
|
|
223
233
|
}
|
|
224
|
-
function
|
|
234
|
+
function Ln(e) {
|
|
225
235
|
return {
|
|
226
236
|
itemId: String(e.id),
|
|
227
|
-
type:
|
|
237
|
+
type: xn(e.type),
|
|
228
238
|
minScore: e.minScore ?? null,
|
|
229
239
|
minPercentage: e.minPercentage ?? null
|
|
230
240
|
};
|
|
231
241
|
}
|
|
232
|
-
function
|
|
242
|
+
function gt(e) {
|
|
233
243
|
return {
|
|
234
244
|
hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
|
|
235
245
|
endCursor: (e == null ? void 0 : e.endCursor) ?? null
|
|
236
246
|
};
|
|
237
247
|
}
|
|
238
|
-
const
|
|
239
|
-
function
|
|
248
|
+
const An = /* @__PURE__ */ new Set(["graded"]), vn = /* @__PURE__ */ new Set(["submitted", "pending_review"]), kn = /* @__PURE__ */ new Set(["graded"]);
|
|
249
|
+
function pt(e) {
|
|
240
250
|
var t;
|
|
241
251
|
for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
|
|
242
252
|
if (n) return n;
|
|
243
253
|
return null;
|
|
244
254
|
}
|
|
245
|
-
function
|
|
255
|
+
function ft(e, t) {
|
|
246
256
|
if (!e) return;
|
|
247
257
|
const n = new Map(t.map((r) => [r.itemId, r.type])), s = /* @__PURE__ */ new Set();
|
|
248
258
|
for (const r of e.requirementsMet ?? []) {
|
|
249
259
|
if (!r) continue;
|
|
250
|
-
const
|
|
251
|
-
n.get(
|
|
260
|
+
const o = String(r.id);
|
|
261
|
+
n.get(o) === r.type && s.add(o);
|
|
252
262
|
}
|
|
253
263
|
return {
|
|
254
264
|
locked: e.locked === !0 || e.workflowState === "locked",
|
|
@@ -258,131 +268,134 @@ function dt(e, t) {
|
|
|
258
268
|
requirementsMetItemIds: s
|
|
259
269
|
};
|
|
260
270
|
}
|
|
261
|
-
function
|
|
271
|
+
function Nn(e, t, n, s = !0) {
|
|
262
272
|
if (n.locked) return "locked";
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
if (
|
|
266
|
-
if (
|
|
273
|
+
const r = pt(e);
|
|
274
|
+
if (r) {
|
|
275
|
+
if (r.gradingStatus === "excused") return "excused";
|
|
276
|
+
if (r.missing === !0) return "missing";
|
|
277
|
+
if (An.has(r.state ?? "") || kn.has(r.gradingStatus ?? ""))
|
|
267
278
|
return "graded";
|
|
268
|
-
if (
|
|
279
|
+
if (r.submittedAt != null || vn.has(r.state ?? ""))
|
|
269
280
|
return "submitted";
|
|
270
|
-
if ((
|
|
281
|
+
if ((r.attempt ?? 0) > 0) return "in_progress";
|
|
271
282
|
}
|
|
272
|
-
return n.requirementsMetItemIds.has(t) ? "in_progress" : "not_started";
|
|
283
|
+
return n.requirementsMetItemIds.has(t) ? s ? "complete" : "in_progress" : "not_started";
|
|
273
284
|
}
|
|
274
|
-
const
|
|
275
|
-
function
|
|
285
|
+
const Dn = (e) => e.pointsPossible != null;
|
|
286
|
+
function qn(e, t, n, s) {
|
|
276
287
|
if (e.locked) return "locked";
|
|
277
288
|
if (t > 0 && !e.completed) return "missing";
|
|
278
289
|
if (e.completed) {
|
|
279
|
-
const r = (s ?? []).filter(
|
|
280
|
-
return r.length > 0 && r.every((
|
|
290
|
+
const r = (s ?? []).filter((l) => Dn(l) && l.status !== "excused");
|
|
291
|
+
return r.length > 0 && r.every((l) => l.status === "graded") ? "all_graded" : "all_submitted";
|
|
281
292
|
}
|
|
282
293
|
return e.started || n > 0 ? "in_progress" : "not_started";
|
|
283
294
|
}
|
|
284
|
-
function
|
|
285
|
-
var
|
|
295
|
+
function Rn(e, t, n, s) {
|
|
296
|
+
var u, c;
|
|
286
297
|
if (!n) return;
|
|
287
|
-
const r = e.requirementCount ?? t.length,
|
|
298
|
+
const r = e.requirementCount ?? t.length, o = Math.min(n.requirementsMetItemIds.size, r), l = ((u = e.submissionStatistics) == null ? void 0 : u.missingAssignmentCount) ?? 0;
|
|
288
299
|
return {
|
|
289
|
-
status:
|
|
290
|
-
requirementsMet:
|
|
300
|
+
status: qn(n, l, o, s),
|
|
301
|
+
requirementsMet: o,
|
|
291
302
|
requirementCount: r,
|
|
292
|
-
percentComplete: r > 0 ? Math.round(
|
|
303
|
+
percentComplete: r > 0 ? Math.round(o / r * 100) : 0,
|
|
293
304
|
latestDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.latestDueAt) ?? null,
|
|
294
|
-
missingCount:
|
|
305
|
+
missingCount: l
|
|
295
306
|
};
|
|
296
307
|
}
|
|
297
|
-
function
|
|
298
|
-
var c, g,
|
|
299
|
-
const
|
|
300
|
-
if (!
|
|
301
|
-
return
|
|
302
|
-
const
|
|
308
|
+
function Fn(e, t, n, s = {}, r) {
|
|
309
|
+
var c, g, a;
|
|
310
|
+
const o = String(e._id), l = wn(e.content);
|
|
311
|
+
if (!l)
|
|
312
|
+
return _n(s, { id: o, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
|
|
313
|
+
const u = pt(e.content);
|
|
303
314
|
return {
|
|
304
|
-
id:
|
|
315
|
+
id: o,
|
|
305
316
|
moduleId: t,
|
|
306
317
|
title: e.title ?? "",
|
|
307
|
-
type:
|
|
318
|
+
type: l,
|
|
308
319
|
position: e.position ?? 0,
|
|
309
320
|
indent: e.indent ?? 0,
|
|
310
|
-
published:
|
|
321
|
+
published: mt(e.published, "moduleItem", o),
|
|
311
322
|
url: e.url ?? null,
|
|
312
323
|
newTab: e.newTab ?? !1,
|
|
313
|
-
completionRequirement: n.get(
|
|
314
|
-
dueAt: (
|
|
315
|
-
status: r ?
|
|
316
|
-
pointsPossible: ((
|
|
324
|
+
completionRequirement: n.get(o) ?? null,
|
|
325
|
+
dueAt: (u == null ? void 0 : u.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
|
|
326
|
+
status: r ? Nn(e.content, o, r, s.submissionsIncluded ?? !0) : void 0,
|
|
327
|
+
pointsPossible: ((a = e.content) == null ? void 0 : a.pointsPossible) ?? null,
|
|
317
328
|
// Career-only, so it rides in `extensions` rather than widening the shared
|
|
318
329
|
// model. Absent entirely for a Canvas LMS item, which is every item here.
|
|
319
|
-
extensions:
|
|
330
|
+
extensions: ct(
|
|
320
331
|
void 0,
|
|
321
|
-
|
|
332
|
+
En(e.estimatedDuration)
|
|
322
333
|
)
|
|
323
334
|
};
|
|
324
335
|
}
|
|
325
|
-
function
|
|
326
|
-
const
|
|
327
|
-
for (const
|
|
328
|
-
if (!
|
|
329
|
-
const
|
|
330
|
-
|
|
336
|
+
function ht(e, t, n, s, r) {
|
|
337
|
+
const o = [];
|
|
338
|
+
for (const l of e ?? []) {
|
|
339
|
+
if (!l) continue;
|
|
340
|
+
const u = Fn(
|
|
341
|
+
l,
|
|
331
342
|
t,
|
|
332
343
|
n,
|
|
333
344
|
s,
|
|
334
345
|
r
|
|
335
346
|
);
|
|
336
|
-
|
|
347
|
+
u && o.push(u);
|
|
337
348
|
}
|
|
338
|
-
return
|
|
349
|
+
return o;
|
|
339
350
|
}
|
|
340
|
-
function
|
|
351
|
+
function bt(e) {
|
|
341
352
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
342
353
|
for (const s of e ?? []) {
|
|
343
354
|
if (!s) continue;
|
|
344
|
-
const r =
|
|
355
|
+
const r = Ln(s);
|
|
345
356
|
t.push(r), n.set(r.itemId, r);
|
|
346
357
|
}
|
|
347
358
|
return { list: t, byItemId: n };
|
|
348
359
|
}
|
|
349
|
-
function
|
|
360
|
+
function On(e, t = {}) {
|
|
350
361
|
var g;
|
|
351
362
|
const n = String(e._id);
|
|
352
363
|
if (e.moduleItemsTotalCount == null)
|
|
353
|
-
throw new
|
|
354
|
-
const { list: s, byItemId: r } =
|
|
364
|
+
throw new dt("module", n, "moduleItemsTotalCount");
|
|
365
|
+
const { list: s, byItemId: r } = bt(e.completionRequirements), o = e.moduleItemsConnection, l = o != null && !((g = o.pageInfo) != null && g.hasNextPage), u = ft(e.progression, s), c = l ? ht(o.nodes, n, r, t, u) : void 0;
|
|
355
366
|
return {
|
|
356
367
|
id: n,
|
|
357
368
|
name: e.name ?? "",
|
|
358
369
|
position: e.position ?? 0,
|
|
359
|
-
published:
|
|
370
|
+
published: mt(e.published, "module", n),
|
|
360
371
|
itemCount: e.moduleItemsTotalCount,
|
|
361
372
|
items: c,
|
|
362
373
|
unlockAt: e.unlockAt ?? null,
|
|
363
|
-
|
|
374
|
+
prerequisiteModules: (e.prerequisites ?? []).filter(
|
|
375
|
+
(a) => a != null
|
|
376
|
+
).map((a) => ({ id: String(a.id), name: a.name ?? "" })),
|
|
364
377
|
requirementCount: e.requirementCount ?? null,
|
|
365
378
|
requireSequentialProgress: e.requireSequentialProgress ?? !1,
|
|
366
379
|
completionRequirements: s,
|
|
367
380
|
// Derived after the items so `all_graded` can see them when they are inline.
|
|
368
|
-
progress:
|
|
381
|
+
progress: Rn(e, s, u, c)
|
|
369
382
|
};
|
|
370
383
|
}
|
|
371
|
-
function
|
|
384
|
+
function Un(e, t = {}) {
|
|
372
385
|
var r;
|
|
373
386
|
const n = (r = e == null ? void 0 : e.legacyNode) == null ? void 0 : r.modulesConnection, s = [];
|
|
374
|
-
for (const
|
|
375
|
-
|
|
376
|
-
return { modules: s, pageInfo:
|
|
387
|
+
for (const o of (n == null ? void 0 : n.nodes) ?? [])
|
|
388
|
+
o && s.push(On(o, t));
|
|
389
|
+
return { modules: s, pageInfo: gt(n == null ? void 0 : n.pageInfo) };
|
|
377
390
|
}
|
|
378
|
-
function
|
|
379
|
-
const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId:
|
|
391
|
+
function zn(e, t, n = {}) {
|
|
392
|
+
const s = e == null ? void 0 : e.legacyNode, { list: r, byItemId: o } = bt(s == null ? void 0 : s.completionRequirements), l = s == null ? void 0 : s.moduleItemsConnection, u = ft(s == null ? void 0 : s.progression, r);
|
|
380
393
|
return {
|
|
381
|
-
items:
|
|
382
|
-
pageInfo:
|
|
394
|
+
items: ht(l == null ? void 0 : l.nodes, t, o, n, u),
|
|
395
|
+
pageInfo: gt(l == null ? void 0 : l.pageInfo)
|
|
383
396
|
};
|
|
384
397
|
}
|
|
385
|
-
const
|
|
398
|
+
const $n = oe`
|
|
386
399
|
fragment PlatformModulesSubmissionFields on Submission {
|
|
387
400
|
_id
|
|
388
401
|
state
|
|
@@ -392,7 +405,7 @@ const Dn = ee`
|
|
|
392
405
|
missing
|
|
393
406
|
cachedDueDate
|
|
394
407
|
}
|
|
395
|
-
`,
|
|
408
|
+
`, It = oe`
|
|
396
409
|
fragment PlatformModulesItemFields on ModuleItem {
|
|
397
410
|
_id
|
|
398
411
|
title
|
|
@@ -439,8 +452,8 @@ const Dn = ee`
|
|
|
439
452
|
}
|
|
440
453
|
}
|
|
441
454
|
}
|
|
442
|
-
${
|
|
443
|
-
`,
|
|
455
|
+
${$n}
|
|
456
|
+
`, Mt = oe`
|
|
444
457
|
fragment PlatformModulesProgressionFields on ModuleProgression {
|
|
445
458
|
workflowState
|
|
446
459
|
completed
|
|
@@ -453,7 +466,7 @@ const Dn = ee`
|
|
|
453
466
|
minPercentage
|
|
454
467
|
}
|
|
455
468
|
}
|
|
456
|
-
`,
|
|
469
|
+
`, Bn = oe`
|
|
457
470
|
query PlatformModulesGetModules(
|
|
458
471
|
$courseId: ID!
|
|
459
472
|
$first: Int!
|
|
@@ -477,6 +490,7 @@ const Dn = ee`
|
|
|
477
490
|
requireSequentialProgress
|
|
478
491
|
prerequisites {
|
|
479
492
|
id
|
|
493
|
+
name
|
|
480
494
|
}
|
|
481
495
|
completionRequirements {
|
|
482
496
|
id
|
|
@@ -509,9 +523,9 @@ const Dn = ee`
|
|
|
509
523
|
}
|
|
510
524
|
}
|
|
511
525
|
}
|
|
512
|
-
${
|
|
513
|
-
${
|
|
514
|
-
`,
|
|
526
|
+
${It}
|
|
527
|
+
${Mt}
|
|
528
|
+
`, Gn = oe`
|
|
515
529
|
query PlatformModulesGetModuleItems(
|
|
516
530
|
$moduleId: ID!
|
|
517
531
|
$first: Int!
|
|
@@ -542,85 +556,83 @@ const Dn = ee`
|
|
|
542
556
|
}
|
|
543
557
|
}
|
|
544
558
|
}
|
|
545
|
-
${
|
|
546
|
-
${
|
|
559
|
+
${It}
|
|
560
|
+
${Mt}
|
|
547
561
|
`;
|
|
548
|
-
function
|
|
562
|
+
function St() {
|
|
549
563
|
return new DOMException("The operation was aborted.", "AbortError");
|
|
550
564
|
}
|
|
551
|
-
function
|
|
552
|
-
if (e != null && e.aborted) throw
|
|
565
|
+
function pe(e) {
|
|
566
|
+
if (e != null && e.aborted) throw St();
|
|
553
567
|
}
|
|
554
|
-
function
|
|
568
|
+
function Ne(e, t) {
|
|
555
569
|
return t ? new Promise((n, s) => {
|
|
556
|
-
const r = () => s(
|
|
570
|
+
const r = () => s(St());
|
|
557
571
|
t.addEventListener("abort", r, { once: !0 }), e.then(n, s).finally(() => t.removeEventListener("abort", r));
|
|
558
572
|
}) : e;
|
|
559
573
|
}
|
|
560
|
-
function
|
|
574
|
+
function yi({
|
|
561
575
|
executeQuery: e,
|
|
562
|
-
inlineItemLimit: t =
|
|
563
|
-
nodeBudget: n =
|
|
576
|
+
inlineItemLimit: t = we,
|
|
577
|
+
nodeBudget: n = Le,
|
|
564
578
|
onUnsupportedItem: s,
|
|
565
579
|
studentId: r,
|
|
566
|
-
validate:
|
|
580
|
+
validate: o = !0
|
|
567
581
|
}) {
|
|
568
|
-
const u = { onUnsupportedItem: s
|
|
582
|
+
const l = r != null, u = { onUnsupportedItem: s, submissionsIncluded: l };
|
|
569
583
|
return {
|
|
570
|
-
// Declared so `resolveItemsMode` bounds the query by *this* transport's
|
|
571
|
-
// limit rather than assuming one. @see ModulesDataAdapter.inlineNodeBudget
|
|
572
584
|
inlineNodeBudget: n,
|
|
573
585
|
async listModules({
|
|
574
586
|
courseId: c,
|
|
575
587
|
cursor: g,
|
|
576
|
-
pageSize:
|
|
577
|
-
includeItems:
|
|
578
|
-
inlineItemsFirst:
|
|
579
|
-
inlineFirst:
|
|
580
|
-
signal:
|
|
588
|
+
pageSize: a,
|
|
589
|
+
includeItems: d,
|
|
590
|
+
inlineItemsFirst: h,
|
|
591
|
+
inlineFirst: I,
|
|
592
|
+
signal: p
|
|
581
593
|
}) {
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
e(
|
|
594
|
+
pe(p);
|
|
595
|
+
const f = d ? Math.min(I ?? a, a) : a, w = Math.min(h ?? t, t), L = Math.max(1, Math.min(w, Math.floor(n / f))), A = await Ne(
|
|
596
|
+
e(Bn, {
|
|
585
597
|
courseId: c,
|
|
586
|
-
first:
|
|
598
|
+
first: f,
|
|
587
599
|
// Pass through what the caller was given; never derive an offset.
|
|
588
600
|
after: g ?? null,
|
|
589
|
-
includeItems:
|
|
590
|
-
itemsFirst:
|
|
591
|
-
includeSubmissions:
|
|
601
|
+
includeItems: d,
|
|
602
|
+
itemsFirst: L,
|
|
603
|
+
includeSubmissions: l,
|
|
592
604
|
studentId: r ?? null
|
|
593
605
|
}),
|
|
594
|
-
|
|
606
|
+
p
|
|
595
607
|
);
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
return
|
|
608
|
+
pe(p);
|
|
609
|
+
const P = Un(A, u);
|
|
610
|
+
return o ? hn.parse(P) : P;
|
|
599
611
|
},
|
|
600
612
|
async listModuleItems({
|
|
601
613
|
moduleId: c,
|
|
602
614
|
cursor: g,
|
|
603
|
-
pageSize:
|
|
604
|
-
signal:
|
|
615
|
+
pageSize: a,
|
|
616
|
+
signal: d
|
|
605
617
|
}) {
|
|
606
|
-
|
|
607
|
-
const
|
|
608
|
-
e(
|
|
618
|
+
pe(d);
|
|
619
|
+
const h = await Ne(
|
|
620
|
+
e(Gn, {
|
|
609
621
|
moduleId: c,
|
|
610
|
-
first:
|
|
622
|
+
first: a,
|
|
611
623
|
after: g ?? null,
|
|
612
|
-
includeSubmissions:
|
|
624
|
+
includeSubmissions: l,
|
|
613
625
|
studentId: r ?? null
|
|
614
626
|
}),
|
|
615
|
-
|
|
627
|
+
d
|
|
616
628
|
);
|
|
617
|
-
|
|
618
|
-
const
|
|
619
|
-
return
|
|
629
|
+
pe(d);
|
|
630
|
+
const I = zn(h, c, u);
|
|
631
|
+
return o ? bn.parse(I) : I;
|
|
620
632
|
}
|
|
621
633
|
};
|
|
622
634
|
}
|
|
623
|
-
const
|
|
635
|
+
const Me = {
|
|
624
636
|
formatters: {},
|
|
625
637
|
itemTypes: {},
|
|
626
638
|
itemStatuses: {},
|
|
@@ -630,242 +642,240 @@ const he = {
|
|
|
630
642
|
itemActions: {},
|
|
631
643
|
navigation: {}
|
|
632
644
|
};
|
|
633
|
-
Object.freeze(
|
|
634
|
-
for (const e of Object.values(
|
|
645
|
+
Object.freeze(Me);
|
|
646
|
+
for (const e of Object.values(Me))
|
|
635
647
|
Object.freeze(e);
|
|
636
|
-
const
|
|
637
|
-
function
|
|
638
|
-
return /* @__PURE__ */
|
|
648
|
+
const yt = Ye(null);
|
|
649
|
+
function _i({ value: e, children: t }) {
|
|
650
|
+
return /* @__PURE__ */ i(yt.Provider, { value: e, children: t });
|
|
639
651
|
}
|
|
640
|
-
function
|
|
641
|
-
return
|
|
652
|
+
function Ti() {
|
|
653
|
+
return Qe(yt) ?? Me;
|
|
642
654
|
}
|
|
643
|
-
const
|
|
644
|
-
function
|
|
655
|
+
const Pe = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
656
|
+
function be(e, t) {
|
|
645
657
|
const n = Object.entries(t ?? {}).filter(([, s]) => s !== void 0);
|
|
646
658
|
return { ...e, ...Object.fromEntries(n) };
|
|
647
659
|
}
|
|
648
|
-
function
|
|
660
|
+
function W(e, t = {}) {
|
|
649
661
|
const n = Object.keys(e).map((r) => [
|
|
650
662
|
r,
|
|
651
|
-
|
|
652
|
-
]), s = Object.keys(t).filter((r) => !
|
|
663
|
+
be(e[r], Pe(t, r) ? t[r] : void 0)
|
|
664
|
+
]), s = Object.keys(t).filter((r) => !Pe(e, r)).sort().map((r) => [r, be({}, t[r])]);
|
|
653
665
|
return Object.fromEntries([...n, ...s]);
|
|
654
666
|
}
|
|
655
|
-
function
|
|
667
|
+
function wi(e) {
|
|
656
668
|
return Object.keys(e).filter((t) => !e[t].hidden).map((t) => ({ ...e[t], key: t })).sort((t, n) => t.order - n.order);
|
|
657
669
|
}
|
|
658
|
-
const
|
|
670
|
+
const jn = m.object({
|
|
659
671
|
/** Resolved through `t` at render. */
|
|
660
|
-
label:
|
|
672
|
+
label: m.string(),
|
|
661
673
|
/** Sort position, ascending. The base spaces its values (10, 20, 30…) so a host can insert between two built-ins. */
|
|
662
|
-
order:
|
|
674
|
+
order: m.number(),
|
|
663
675
|
/** How a host removes an entry. Stays in the resolved registry; `visibleEntries` filters it at read time. */
|
|
664
|
-
hidden:
|
|
676
|
+
hidden: m.boolean().optional()
|
|
665
677
|
});
|
|
666
|
-
function
|
|
667
|
-
return
|
|
668
|
-
}
|
|
669
|
-
const
|
|
670
|
-
formatters:
|
|
671
|
-
itemTypes:
|
|
672
|
-
itemStatuses:
|
|
673
|
-
itemMeta:
|
|
674
|
-
filters:
|
|
675
|
-
moduleActions:
|
|
676
|
-
itemActions:
|
|
677
|
-
navigation:
|
|
678
|
+
function Wn(e) {
|
|
679
|
+
return m.record(m.string(), e);
|
|
680
|
+
}
|
|
681
|
+
const Y = Wn(jn.strict()), Yn = m.object({
|
|
682
|
+
formatters: m.object({}).strict(),
|
|
683
|
+
itemTypes: Y,
|
|
684
|
+
itemStatuses: Y,
|
|
685
|
+
itemMeta: Y,
|
|
686
|
+
filters: Y,
|
|
687
|
+
moduleActions: Y,
|
|
688
|
+
itemActions: Y,
|
|
689
|
+
navigation: m.object({}).strict()
|
|
678
690
|
});
|
|
679
|
-
function
|
|
680
|
-
const n = Object.keys(t).filter((r) => !
|
|
691
|
+
function Qn(e, t = {}) {
|
|
692
|
+
const n = Object.keys(t).filter((r) => !Pe(e, r));
|
|
681
693
|
if (n.length > 0)
|
|
682
694
|
throw new Error(
|
|
683
695
|
`Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
|
|
684
696
|
);
|
|
685
697
|
const s = {
|
|
686
|
-
formatters:
|
|
687
|
-
itemTypes:
|
|
688
|
-
itemStatuses:
|
|
689
|
-
itemMeta:
|
|
690
|
-
filters:
|
|
691
|
-
moduleActions:
|
|
692
|
-
itemActions:
|
|
693
|
-
navigation:
|
|
698
|
+
formatters: be(e.formatters, t.formatters),
|
|
699
|
+
itemTypes: W(e.itemTypes, t.itemTypes),
|
|
700
|
+
itemStatuses: W(e.itemStatuses, t.itemStatuses),
|
|
701
|
+
itemMeta: W(e.itemMeta, t.itemMeta),
|
|
702
|
+
filters: W(e.filters, t.filters),
|
|
703
|
+
moduleActions: W(e.moduleActions, t.moduleActions),
|
|
704
|
+
itemActions: W(e.itemActions, t.itemActions),
|
|
705
|
+
navigation: be(e.navigation, t.navigation)
|
|
694
706
|
};
|
|
695
|
-
return
|
|
707
|
+
return Yn.parse(s), s;
|
|
696
708
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
709
|
+
function Pi(e = {}) {
|
|
710
|
+
return Qn(Me, e);
|
|
699
711
|
}
|
|
700
|
-
const
|
|
712
|
+
const Ae = 100, _t = 100, Tt = 100, Hn = 4, Se = 5 * 60 * 1e3, wt = 20, Ie = { hasNextPage: !1, endCursor: null }, Q = ["platform-modules"], ie = {
|
|
701
713
|
all: Q,
|
|
702
714
|
course: (e) => [...Q, e],
|
|
703
715
|
list: (e, t = {}) => [...Q, e, "list", t],
|
|
704
716
|
items: (e, t, n = {}) => [...Q, e, "module", t, "items", n]
|
|
705
717
|
};
|
|
706
|
-
function
|
|
718
|
+
function Kn(e) {
|
|
707
719
|
return [...Q, e, "list"];
|
|
708
720
|
}
|
|
709
|
-
function
|
|
721
|
+
function Pt(e, t) {
|
|
710
722
|
return [...Q, e, "module", t, "items"];
|
|
711
723
|
}
|
|
712
|
-
function
|
|
724
|
+
function Et(e) {
|
|
713
725
|
return e.pageInfo.hasNextPage ? e.pageInfo.endCursor : null;
|
|
714
726
|
}
|
|
715
|
-
function
|
|
727
|
+
function Ct(e) {
|
|
716
728
|
const {
|
|
717
729
|
courseId: t,
|
|
718
730
|
adapter: n,
|
|
719
731
|
pageSize: s,
|
|
720
732
|
includeItems: r,
|
|
721
|
-
inlineItemsFirst:
|
|
722
|
-
inlineFirst:
|
|
723
|
-
view:
|
|
733
|
+
inlineItemsFirst: o,
|
|
734
|
+
inlineFirst: l,
|
|
735
|
+
view: u,
|
|
724
736
|
staleTime: c,
|
|
725
737
|
enabled: g
|
|
726
738
|
} = e;
|
|
727
739
|
return {
|
|
728
|
-
// `inlineItemsFirst` is deliberately
|
|
729
|
-
//
|
|
730
|
-
|
|
731
|
-
queryKey: te.list(t, { view: a, pageSize: s, includeItems: r }),
|
|
740
|
+
// `inlineItemsFirst` is deliberately not in the key: it is derived from the probe of this
|
|
741
|
+
// very list, so it cannot vary for a fixed (view, pageSize, includeItems).
|
|
742
|
+
queryKey: ie.list(t, { view: u, pageSize: s, includeItems: r }),
|
|
732
743
|
initialPageParam: null,
|
|
733
|
-
queryFn: ({ pageParam:
|
|
744
|
+
queryFn: ({ pageParam: a, signal: d }) => n.listModules({
|
|
734
745
|
courseId: t,
|
|
735
|
-
cursor:
|
|
746
|
+
cursor: a,
|
|
736
747
|
pageSize: s,
|
|
737
748
|
includeItems: r,
|
|
738
|
-
inlineItemsFirst:
|
|
739
|
-
inlineFirst:
|
|
740
|
-
signal:
|
|
749
|
+
inlineItemsFirst: o,
|
|
750
|
+
inlineFirst: l,
|
|
751
|
+
signal: d
|
|
741
752
|
}),
|
|
742
|
-
getNextPageParam:
|
|
753
|
+
getNextPageParam: Et,
|
|
743
754
|
enabled: g,
|
|
744
755
|
staleTime: c,
|
|
745
|
-
// A refetch
|
|
746
|
-
// that because someone alt-tabbed is the Canvas behaviour we are replacing.
|
|
756
|
+
// A refetch re-walks every page loaded. Doing that on alt-tab is the behavior we replace.
|
|
747
757
|
refetchOnWindowFocus: !1
|
|
748
758
|
};
|
|
749
759
|
}
|
|
750
|
-
function
|
|
751
|
-
const { courseId: t, moduleId: n, adapter: s, pageSize: r, view:
|
|
760
|
+
function xt(e) {
|
|
761
|
+
const { courseId: t, moduleId: n, adapter: s, pageSize: r, view: o, staleTime: l, enabled: u, limit: c } = e;
|
|
752
762
|
return {
|
|
753
|
-
queryKey:
|
|
763
|
+
queryKey: ie.items(t, n, { view: o, pageSize: r }),
|
|
754
764
|
initialPageParam: null,
|
|
755
|
-
queryFn: ({ pageParam: g, signal:
|
|
756
|
-
const
|
|
765
|
+
queryFn: ({ pageParam: g, signal: a }) => {
|
|
766
|
+
const d = () => s.listModuleItems({ courseId: t, moduleId: n, cursor: g, pageSize: r, signal: a });
|
|
757
767
|
return c ? c(() => {
|
|
758
|
-
if (
|
|
768
|
+
if (a.aborted)
|
|
759
769
|
throw new DOMException("The operation was aborted.", "AbortError");
|
|
760
|
-
return
|
|
761
|
-
}) :
|
|
770
|
+
return d();
|
|
771
|
+
}) : d();
|
|
762
772
|
},
|
|
763
|
-
getNextPageParam:
|
|
764
|
-
enabled:
|
|
765
|
-
staleTime:
|
|
773
|
+
getNextPageParam: Et,
|
|
774
|
+
enabled: u,
|
|
775
|
+
staleTime: l,
|
|
766
776
|
refetchOnWindowFocus: !1
|
|
767
777
|
};
|
|
768
778
|
}
|
|
769
|
-
function
|
|
770
|
-
var
|
|
779
|
+
function Zn(e) {
|
|
780
|
+
var w;
|
|
771
781
|
const {
|
|
772
782
|
courseId: t,
|
|
773
783
|
adapter: n,
|
|
774
|
-
pageSize: s =
|
|
784
|
+
pageSize: s = Ae,
|
|
775
785
|
includeItems: r = !1,
|
|
776
|
-
inlineItemsFirst:
|
|
777
|
-
inlineFirst:
|
|
778
|
-
view:
|
|
779
|
-
staleTime: c =
|
|
786
|
+
inlineItemsFirst: o,
|
|
787
|
+
inlineFirst: l,
|
|
788
|
+
view: u,
|
|
789
|
+
staleTime: c = Se,
|
|
780
790
|
enabled: g = !0
|
|
781
|
-
} = e,
|
|
782
|
-
|
|
791
|
+
} = e, a = xe(
|
|
792
|
+
Ct({
|
|
783
793
|
courseId: t,
|
|
784
794
|
adapter: n,
|
|
785
795
|
pageSize: s,
|
|
786
796
|
includeItems: r,
|
|
787
|
-
inlineItemsFirst:
|
|
788
|
-
inlineFirst:
|
|
789
|
-
view:
|
|
797
|
+
inlineItemsFirst: o,
|
|
798
|
+
inlineFirst: l,
|
|
799
|
+
view: u,
|
|
790
800
|
staleTime: c,
|
|
791
801
|
enabled: g
|
|
792
802
|
})
|
|
793
|
-
),
|
|
794
|
-
|
|
795
|
-
}, [
|
|
803
|
+
), d = (w = a.data) == null ? void 0 : w.pages, h = v(() => (d ?? []).flatMap((L) => L.modules), [d]), I = d && d.length > 0 ? d[d.length - 1].pageInfo : Ie, p = a.fetchNextPage, f = k(() => {
|
|
804
|
+
p();
|
|
805
|
+
}, [p]);
|
|
796
806
|
return {
|
|
797
|
-
modules:
|
|
798
|
-
pageInfo:
|
|
799
|
-
hasNextPage:
|
|
800
|
-
fetchNextPage:
|
|
801
|
-
isLoading:
|
|
802
|
-
isFetchingNextPage:
|
|
803
|
-
isPending:
|
|
804
|
-
error:
|
|
807
|
+
modules: h,
|
|
808
|
+
pageInfo: I,
|
|
809
|
+
hasNextPage: I.hasNextPage,
|
|
810
|
+
fetchNextPage: f,
|
|
811
|
+
isLoading: a.isLoading,
|
|
812
|
+
isFetchingNextPage: a.isFetchingNextPage,
|
|
813
|
+
isPending: a.isPending,
|
|
814
|
+
error: a.error
|
|
805
815
|
};
|
|
806
816
|
}
|
|
807
|
-
function
|
|
808
|
-
var
|
|
817
|
+
function Ei(e) {
|
|
818
|
+
var f;
|
|
809
819
|
const {
|
|
810
820
|
courseId: t,
|
|
811
821
|
moduleId: n,
|
|
812
822
|
adapter: s,
|
|
813
|
-
pageSize: r =
|
|
814
|
-
view:
|
|
815
|
-
enabled:
|
|
816
|
-
staleTime:
|
|
823
|
+
pageSize: r = _t,
|
|
824
|
+
view: o,
|
|
825
|
+
enabled: l = !0,
|
|
826
|
+
staleTime: u = Se,
|
|
817
827
|
limit: c
|
|
818
|
-
} = e, g =
|
|
819
|
-
|
|
828
|
+
} = e, g = xe(
|
|
829
|
+
xt({
|
|
820
830
|
courseId: t,
|
|
821
831
|
moduleId: n,
|
|
822
832
|
adapter: s,
|
|
823
833
|
pageSize: r,
|
|
824
|
-
view:
|
|
825
|
-
staleTime:
|
|
826
|
-
enabled:
|
|
834
|
+
view: o,
|
|
835
|
+
staleTime: u,
|
|
836
|
+
enabled: l,
|
|
827
837
|
limit: c
|
|
828
838
|
})
|
|
829
|
-
),
|
|
830
|
-
|
|
831
|
-
}, [
|
|
839
|
+
), a = (f = g.data) == null ? void 0 : f.pages, d = v(() => (a ?? []).flatMap((w) => w.items), [a]), h = a && a.length > 0 ? a[a.length - 1].pageInfo : Ie, I = g.fetchNextPage, p = k(() => {
|
|
840
|
+
I();
|
|
841
|
+
}, [I]);
|
|
832
842
|
return {
|
|
833
|
-
items:
|
|
834
|
-
pageInfo:
|
|
835
|
-
hasNextPage:
|
|
836
|
-
fetchNextPage:
|
|
843
|
+
items: d,
|
|
844
|
+
pageInfo: h,
|
|
845
|
+
hasNextPage: h.hasNextPage,
|
|
846
|
+
fetchNextPage: p,
|
|
837
847
|
isLoading: g.isLoading,
|
|
838
848
|
isFetchingNextPage: g.isFetchingNextPage,
|
|
839
849
|
error: g.error
|
|
840
850
|
};
|
|
841
851
|
}
|
|
842
|
-
function
|
|
852
|
+
function Vn(e, t, n = Le) {
|
|
843
853
|
if (e.pageInfo.hasNextPage) return "onDemand";
|
|
844
854
|
let s = 0, r = 0;
|
|
845
|
-
for (const
|
|
846
|
-
if (
|
|
847
|
-
s +=
|
|
855
|
+
for (const o of e.modules) {
|
|
856
|
+
if (o.itemCount > t) return "onDemand";
|
|
857
|
+
s += o.itemCount, o.itemCount > r && (r = o.itemCount);
|
|
848
858
|
}
|
|
849
859
|
return s > t * 2 ? "onDemand" : Math.max(e.modules.length, 1) * Math.max(r, 1) <= n ? "inline" : "onDemand";
|
|
850
860
|
}
|
|
851
|
-
function
|
|
852
|
-
var
|
|
861
|
+
function Xn(e) {
|
|
862
|
+
var h;
|
|
853
863
|
const {
|
|
854
864
|
courseId: t,
|
|
855
865
|
adapter: n,
|
|
856
866
|
mode: s = "auto",
|
|
857
|
-
inlineThreshold: r =
|
|
858
|
-
nodeBudget:
|
|
859
|
-
pageSize:
|
|
860
|
-
view:
|
|
861
|
-
staleTime: c =
|
|
862
|
-
} = e, g = s === "auto",
|
|
863
|
-
|
|
867
|
+
inlineThreshold: r = Tt,
|
|
868
|
+
nodeBudget: o = n.inlineNodeBudget ?? Le,
|
|
869
|
+
pageSize: l = Ae,
|
|
870
|
+
view: u,
|
|
871
|
+
staleTime: c = Se
|
|
872
|
+
} = e, g = s === "auto", a = xe(
|
|
873
|
+
Ct({
|
|
864
874
|
courseId: t,
|
|
865
875
|
adapter: n,
|
|
866
|
-
pageSize:
|
|
876
|
+
pageSize: l,
|
|
867
877
|
includeItems: !1,
|
|
868
|
-
view:
|
|
878
|
+
view: u,
|
|
869
879
|
staleTime: c,
|
|
870
880
|
enabled: g
|
|
871
881
|
})
|
|
@@ -878,393 +888,437 @@ function jn(e) {
|
|
|
878
888
|
error: null,
|
|
879
889
|
inlineShape: null
|
|
880
890
|
};
|
|
881
|
-
if (
|
|
891
|
+
if (a.error)
|
|
882
892
|
return {
|
|
883
893
|
resolvedMode: "onDemand",
|
|
884
894
|
isResolving: !1,
|
|
885
895
|
probed: !0,
|
|
886
|
-
error:
|
|
896
|
+
error: a.error,
|
|
887
897
|
inlineShape: null
|
|
888
898
|
};
|
|
889
|
-
const
|
|
890
|
-
return
|
|
891
|
-
resolvedMode:
|
|
899
|
+
const d = (h = a.data) == null ? void 0 : h.pages[0];
|
|
900
|
+
return d ? {
|
|
901
|
+
resolvedMode: Vn(d, r, o),
|
|
892
902
|
isResolving: !1,
|
|
893
903
|
probed: !0,
|
|
894
904
|
error: null,
|
|
895
|
-
inlineShape:
|
|
905
|
+
inlineShape: Jn(d)
|
|
896
906
|
} : { resolvedMode: null, isResolving: !0, probed: !0, error: null, inlineShape: null };
|
|
897
907
|
}
|
|
898
|
-
function
|
|
908
|
+
function Jn(e) {
|
|
899
909
|
let t = 1;
|
|
900
910
|
for (const n of e.modules)
|
|
901
911
|
n.itemCount > t && (t = n.itemCount);
|
|
902
912
|
return { moduleCount: Math.max(e.modules.length, 1), maxItemCount: t };
|
|
903
913
|
}
|
|
904
|
-
const
|
|
905
|
-
function
|
|
906
|
-
const s =
|
|
907
|
-
|
|
908
|
-
const
|
|
909
|
-
|
|
910
|
-
const
|
|
911
|
-
let
|
|
912
|
-
for (const [
|
|
913
|
-
const
|
|
914
|
-
|
|
914
|
+
const De = "\0", es = /* @__PURE__ */ new Map();
|
|
915
|
+
function ts(e, t, n = wt) {
|
|
916
|
+
const s = Ze(), r = O(/* @__PURE__ */ new Map()), [o, l] = te(es), u = e.join(De), c = v(() => u === "" ? [] : u.split(De), [u]);
|
|
917
|
+
he(() => {
|
|
918
|
+
const a = r.current, d = () => {
|
|
919
|
+
l((p) => {
|
|
920
|
+
const f = /* @__PURE__ */ new Map();
|
|
921
|
+
let w = p.size !== a.size;
|
|
922
|
+
for (const [L, A] of a) {
|
|
923
|
+
const P = A.getCurrentResult();
|
|
924
|
+
f.set(L, P), !w && p.get(L) !== P && (w = !0);
|
|
915
925
|
}
|
|
916
|
-
return
|
|
926
|
+
return w ? f : p;
|
|
917
927
|
});
|
|
918
|
-
},
|
|
919
|
-
for (const
|
|
920
|
-
if (
|
|
921
|
-
const
|
|
928
|
+
}, h = new Set(c);
|
|
929
|
+
for (const p of c) {
|
|
930
|
+
if (a.has(p)) continue;
|
|
931
|
+
const f = new Bt(
|
|
922
932
|
s,
|
|
923
|
-
t(
|
|
933
|
+
t(p, !0)
|
|
924
934
|
);
|
|
925
|
-
|
|
935
|
+
a.set(p, f), f.subscribe(d);
|
|
926
936
|
}
|
|
927
|
-
for (const [
|
|
928
|
-
|
|
929
|
-
for (const
|
|
930
|
-
const
|
|
931
|
-
|
|
937
|
+
for (const [p, f] of a)
|
|
938
|
+
f.setOptions(t(p, h.has(p)));
|
|
939
|
+
for (const p of c) {
|
|
940
|
+
const f = a.get(p);
|
|
941
|
+
f && (a.delete(p), a.set(p, f));
|
|
932
942
|
}
|
|
933
|
-
let
|
|
934
|
-
if (
|
|
935
|
-
for (const [
|
|
936
|
-
if (
|
|
937
|
-
|
|
943
|
+
let I = a.size - h.size;
|
|
944
|
+
if (I > n)
|
|
945
|
+
for (const [p, f] of a) {
|
|
946
|
+
if (I <= n) break;
|
|
947
|
+
h.has(p) || (f.destroy(), a.delete(p), I -= 1);
|
|
938
948
|
}
|
|
939
|
-
|
|
940
|
-
}, [s, t, c, n]),
|
|
941
|
-
const
|
|
949
|
+
d();
|
|
950
|
+
}, [s, t, c, n]), he(() => {
|
|
951
|
+
const a = r.current;
|
|
942
952
|
return () => {
|
|
943
|
-
for (const
|
|
944
|
-
|
|
953
|
+
for (const d of a.values()) d.destroy();
|
|
954
|
+
a.clear();
|
|
945
955
|
};
|
|
946
956
|
}, []);
|
|
947
|
-
const g =
|
|
948
|
-
var
|
|
949
|
-
(
|
|
957
|
+
const g = k((a) => {
|
|
958
|
+
var d;
|
|
959
|
+
(d = r.current.get(a)) == null || d.fetchNextPage();
|
|
950
960
|
}, []);
|
|
951
|
-
return { results:
|
|
961
|
+
return { results: o, fetchNextPage: g };
|
|
952
962
|
}
|
|
953
|
-
const
|
|
963
|
+
const ns = [], ss = () => {
|
|
954
964
|
};
|
|
955
|
-
function
|
|
956
|
-
var
|
|
965
|
+
function Ci(e) {
|
|
966
|
+
var J, $;
|
|
957
967
|
const {
|
|
958
968
|
courseId: t,
|
|
959
969
|
adapter: n,
|
|
960
970
|
view: s,
|
|
961
971
|
itemsMode: r = "auto",
|
|
962
|
-
inlineThreshold:
|
|
963
|
-
pageSize:
|
|
964
|
-
itemPageSize:
|
|
965
|
-
itemConcurrency: c =
|
|
966
|
-
retainCollapsedLimit: g =
|
|
967
|
-
staleTime:
|
|
968
|
-
initialExpandedModuleIds:
|
|
969
|
-
} = e,
|
|
972
|
+
inlineThreshold: o = Tt,
|
|
973
|
+
pageSize: l = Ae,
|
|
974
|
+
itemPageSize: u = _t,
|
|
975
|
+
itemConcurrency: c = Hn,
|
|
976
|
+
retainCollapsedLimit: g = wt,
|
|
977
|
+
staleTime: a = Se,
|
|
978
|
+
initialExpandedModuleIds: d
|
|
979
|
+
} = e, h = Ze(), I = Xn({
|
|
970
980
|
courseId: t,
|
|
971
981
|
adapter: n,
|
|
972
982
|
mode: r,
|
|
973
|
-
inlineThreshold:
|
|
974
|
-
pageSize:
|
|
983
|
+
inlineThreshold: o,
|
|
984
|
+
pageSize: l,
|
|
975
985
|
view: s,
|
|
976
|
-
staleTime:
|
|
977
|
-
}),
|
|
986
|
+
staleTime: a
|
|
987
|
+
}), p = I.resolvedMode, f = Zn({
|
|
978
988
|
courseId: t,
|
|
979
989
|
adapter: n,
|
|
980
|
-
pageSize:
|
|
990
|
+
pageSize: l,
|
|
981
991
|
view: s,
|
|
982
|
-
staleTime:
|
|
983
|
-
includeItems:
|
|
984
|
-
// Measured
|
|
985
|
-
// the
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
}), [P, C] = Z(
|
|
993
|
-
() => m ?? []
|
|
994
|
-
), v = N(() => {
|
|
992
|
+
staleTime: a,
|
|
993
|
+
includeItems: p === "inline",
|
|
994
|
+
// Measured, not assumed: Canvas charges complexity on the requested shape, so asking
|
|
995
|
+
// for the ceiling is rejected even on a tiny course. @see UseItemsModeResult.inlineShape
|
|
996
|
+
inlineItemsFirst: (J = I.inlineShape) == null ? void 0 : J.maxItemCount,
|
|
997
|
+
inlineFirst: ($ = I.inlineShape) == null ? void 0 : $.moduleCount,
|
|
998
|
+
enabled: p !== null
|
|
999
|
+
}), [w, L] = te(
|
|
1000
|
+
() => d ?? []
|
|
1001
|
+
), A = v(() => {
|
|
995
1002
|
const S = /* @__PURE__ */ new Map();
|
|
996
|
-
for (const
|
|
1003
|
+
for (const b of f.modules) S.set(b.id, b);
|
|
997
1004
|
return S;
|
|
998
|
-
}, [
|
|
999
|
-
() =>
|
|
1000
|
-
const
|
|
1001
|
-
return
|
|
1005
|
+
}, [f.modules]), P = v(
|
|
1006
|
+
() => w.filter((S) => {
|
|
1007
|
+
const b = A.get(S);
|
|
1008
|
+
return b !== void 0 && b.items === void 0;
|
|
1002
1009
|
}),
|
|
1003
|
-
[
|
|
1004
|
-
),
|
|
1005
|
-
(S,
|
|
1010
|
+
[w, A]
|
|
1011
|
+
), ae = v(() => new Set(P), [P]), ue = v(() => Gt(c), [c]), U = k(
|
|
1012
|
+
(S, b) => xt({
|
|
1006
1013
|
courseId: t,
|
|
1007
1014
|
moduleId: S,
|
|
1008
1015
|
adapter: n,
|
|
1009
|
-
pageSize:
|
|
1016
|
+
pageSize: u,
|
|
1010
1017
|
view: s,
|
|
1011
|
-
staleTime:
|
|
1012
|
-
enabled:
|
|
1013
|
-
limit:
|
|
1018
|
+
staleTime: a,
|
|
1019
|
+
enabled: b,
|
|
1020
|
+
limit: ue
|
|
1014
1021
|
}),
|
|
1015
|
-
[t, n,
|
|
1016
|
-
),
|
|
1022
|
+
[t, n, u, s, a, ue]
|
|
1023
|
+
), z = ts(P, U, g), R = z.fetchNextPage, ce = O(/* @__PURE__ */ new Map()), K = k(
|
|
1017
1024
|
(S) => {
|
|
1018
|
-
let
|
|
1019
|
-
return
|
|
1025
|
+
let b = ce.current.get(S);
|
|
1026
|
+
return b || (b = () => R(S), ce.current.set(S, b)), b;
|
|
1020
1027
|
},
|
|
1021
|
-
[
|
|
1022
|
-
),
|
|
1023
|
-
|
|
1024
|
-
(
|
|
1028
|
+
[R]
|
|
1029
|
+
), Z = k((S) => {
|
|
1030
|
+
L(
|
|
1031
|
+
(b) => b.includes(S) ? b : [...b, S]
|
|
1025
1032
|
);
|
|
1026
|
-
}, []),
|
|
1033
|
+
}, []), V = k(
|
|
1027
1034
|
(S) => {
|
|
1028
|
-
|
|
1035
|
+
L((b) => b.filter((C) => C !== S)), h.cancelQueries({ queryKey: Pt(t, S) });
|
|
1029
1036
|
},
|
|
1030
|
-
[
|
|
1031
|
-
),
|
|
1032
|
-
|
|
1033
|
-
const
|
|
1037
|
+
[h, t]
|
|
1038
|
+
), de = O(w);
|
|
1039
|
+
de.current = w;
|
|
1040
|
+
const _e = k(
|
|
1034
1041
|
(S) => {
|
|
1035
|
-
|
|
1042
|
+
de.current.includes(S) ? V(S) : Z(S);
|
|
1036
1043
|
},
|
|
1037
|
-
[
|
|
1038
|
-
),
|
|
1044
|
+
[V, Z]
|
|
1045
|
+
), E = z.results, X = O(/* @__PURE__ */ new Map()), me = k(
|
|
1039
1046
|
(S) => {
|
|
1040
|
-
var
|
|
1041
|
-
const
|
|
1042
|
-
if (
|
|
1043
|
-
return
|
|
1044
|
-
const
|
|
1045
|
-
if ((
|
|
1046
|
-
return
|
|
1047
|
-
items:
|
|
1048
|
-
pageInfo:
|
|
1047
|
+
var ge;
|
|
1048
|
+
const b = A.get(S), C = E.get(S), B = ae.has(S), D = X.current.get(S);
|
|
1049
|
+
if (D && D.items === (b == null ? void 0 : b.items) && D.result === C && D.active === B)
|
|
1050
|
+
return D.value;
|
|
1051
|
+
const F = (j) => (X.current.set(S, { items: b == null ? void 0 : b.items, result: C, active: B, value: j }), j);
|
|
1052
|
+
if ((b == null ? void 0 : b.items) !== void 0)
|
|
1053
|
+
return F({
|
|
1054
|
+
items: b.items,
|
|
1055
|
+
pageInfo: Ie,
|
|
1049
1056
|
hasNextPage: !1,
|
|
1050
|
-
fetchNextPage:
|
|
1057
|
+
fetchNextPage: ss,
|
|
1051
1058
|
isLoading: !1,
|
|
1052
1059
|
isFetchingNextPage: !1,
|
|
1053
1060
|
error: null,
|
|
1054
1061
|
source: "inline"
|
|
1055
1062
|
});
|
|
1056
|
-
const
|
|
1057
|
-
return
|
|
1058
|
-
items:
|
|
1059
|
-
pageInfo:
|
|
1060
|
-
hasNextPage:
|
|
1063
|
+
const q = (ge = C == null ? void 0 : C.data) == null ? void 0 : ge.pages, ee = q ? q.flatMap((j) => j.items) : ns, G = q && q.length > 0 ? q[q.length - 1].pageInfo : Ie;
|
|
1064
|
+
return F({
|
|
1065
|
+
items: ee,
|
|
1066
|
+
pageInfo: G,
|
|
1067
|
+
hasNextPage: G.hasNextPage,
|
|
1061
1068
|
fetchNextPage: K(S),
|
|
1062
|
-
//
|
|
1063
|
-
//
|
|
1064
|
-
isLoading:
|
|
1065
|
-
isFetchingNextPage: (
|
|
1066
|
-
error: (
|
|
1069
|
+
// One commit passes between the click and the observer existing; that is loading,
|
|
1070
|
+
// not empty.
|
|
1071
|
+
isLoading: C ? C.isLoading : B,
|
|
1072
|
+
isFetchingNextPage: (C == null ? void 0 : C.isFetchingNextPage) ?? !1,
|
|
1073
|
+
error: (C == null ? void 0 : C.error) ?? null,
|
|
1067
1074
|
source: "onDemand"
|
|
1068
1075
|
});
|
|
1069
1076
|
},
|
|
1070
|
-
[
|
|
1077
|
+
[A, E, K, ae]
|
|
1071
1078
|
);
|
|
1072
1079
|
return {
|
|
1073
|
-
modules:
|
|
1074
|
-
pageInfo:
|
|
1075
|
-
hasNextPage:
|
|
1076
|
-
fetchNextPage:
|
|
1077
|
-
isLoading:
|
|
1078
|
-
isFetchingNextPage:
|
|
1079
|
-
error:
|
|
1080
|
-
itemsMode:
|
|
1081
|
-
getItems:
|
|
1082
|
-
expandModule:
|
|
1083
|
-
collapseModule:
|
|
1084
|
-
toggleModule:
|
|
1085
|
-
expandedModuleIds:
|
|
1080
|
+
modules: f.modules,
|
|
1081
|
+
pageInfo: f.pageInfo,
|
|
1082
|
+
hasNextPage: f.hasNextPage,
|
|
1083
|
+
fetchNextPage: f.fetchNextPage,
|
|
1084
|
+
isLoading: I.isResolving || f.isPending,
|
|
1085
|
+
isFetchingNextPage: f.isFetchingNextPage,
|
|
1086
|
+
error: f.error ?? I.error,
|
|
1087
|
+
itemsMode: p,
|
|
1088
|
+
getItems: me,
|
|
1089
|
+
expandModule: Z,
|
|
1090
|
+
collapseModule: V,
|
|
1091
|
+
toggleModule: _e,
|
|
1092
|
+
expandedModuleIds: w
|
|
1086
1093
|
};
|
|
1087
1094
|
}
|
|
1088
|
-
function
|
|
1089
|
-
const r = s ?
|
|
1095
|
+
function xi(e, t, n, s) {
|
|
1096
|
+
const r = s ? ie.items(t, n, s) : Pt(t, n);
|
|
1090
1097
|
return e.invalidateQueries({ queryKey: r });
|
|
1091
1098
|
}
|
|
1092
|
-
function
|
|
1093
|
-
const s = n ?
|
|
1099
|
+
function Li(e, t, n) {
|
|
1100
|
+
const s = n ? ie.list(t, n) : Kn(t);
|
|
1094
1101
|
return e.invalidateQueries({ queryKey: s });
|
|
1095
1102
|
}
|
|
1096
|
-
function
|
|
1097
|
-
return e.invalidateQueries({ queryKey:
|
|
1098
|
-
}
|
|
1099
|
-
const
|
|
1100
|
-
pageTitle:
|
|
1101
|
-
modulesLoadedAnnouncement:
|
|
1102
|
-
moduleSearchLabel:
|
|
1103
|
-
searchPlaceholder:
|
|
1104
|
-
expandCollapseTrigger:
|
|
1105
|
-
expandAll:
|
|
1106
|
-
collapseAll:
|
|
1107
|
-
searchScopeHint:
|
|
1108
|
-
modulesLoadErrorAlert:
|
|
1109
|
-
modulesLoadingSpinnerLabel:
|
|
1110
|
-
noModulesEmptyState:
|
|
1111
|
-
filteredEmptyState:
|
|
1112
|
-
clearFilters:
|
|
1113
|
-
loadMoreModulesLoading:
|
|
1114
|
-
loadMoreModules:
|
|
1115
|
-
allModulesLoaded:
|
|
1116
|
-
filterGroupLabel:
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
itemStatusSubmitted:
|
|
1144
|
-
itemStatusGraded:
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
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) {
|
|
1178
1188
|
const s = e.get(t);
|
|
1179
1189
|
if (s) return s;
|
|
1180
1190
|
const r = n();
|
|
1181
1191
|
return e.set(t, r), r;
|
|
1182
1192
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return n ? e.replace(
|
|
1193
|
+
function Dr(e, t, n) {
|
|
1194
|
+
return n ? e.replace(Ar, (s, r) => {
|
|
1185
1195
|
if (!Object.prototype.hasOwnProperty.call(n, r)) return s;
|
|
1186
|
-
const
|
|
1187
|
-
return typeof
|
|
1196
|
+
const o = n[r];
|
|
1197
|
+
return typeof o == "number" && Number.isFinite(o) ? Lt(Nr, t, () => new Intl.NumberFormat(t)).format(o) : String(o);
|
|
1188
1198
|
}) : e;
|
|
1189
1199
|
}
|
|
1190
|
-
function
|
|
1200
|
+
function qr(e, t, n) {
|
|
1191
1201
|
const s = n == null ? void 0 : n.count;
|
|
1192
1202
|
if (typeof s == "number" && Number.isFinite(s)) {
|
|
1193
|
-
const r =
|
|
1194
|
-
if (typeof
|
|
1203
|
+
const r = Lt(kr, t, () => new Intl.PluralRules(t)).select(s), o = e[r];
|
|
1204
|
+
if (typeof o == "string") return o;
|
|
1195
1205
|
}
|
|
1196
1206
|
return typeof e.other == "string" ? e.other : void 0;
|
|
1197
1207
|
}
|
|
1198
|
-
function
|
|
1208
|
+
function qe(e, t, n) {
|
|
1199
1209
|
if (typeof e == "string") return e;
|
|
1200
1210
|
if (e !== null && typeof e == "object")
|
|
1201
|
-
return
|
|
1211
|
+
return qr(e, t, n);
|
|
1202
1212
|
}
|
|
1203
|
-
function
|
|
1204
|
-
const r =
|
|
1213
|
+
function Rr(e, t, n, s) {
|
|
1214
|
+
const r = qe(e == null ? void 0 : e[t], n, s);
|
|
1205
1215
|
if (typeof r == "string") return r;
|
|
1206
|
-
const
|
|
1207
|
-
return typeof
|
|
1216
|
+
const o = qe(vr[t], n, s);
|
|
1217
|
+
return typeof o == "string" ? o : t;
|
|
1208
1218
|
}
|
|
1209
|
-
function
|
|
1210
|
-
return (n, s) =>
|
|
1219
|
+
function At(e, t = H) {
|
|
1220
|
+
return (n, s) => Dr(Rr(e, n, t, s), t, s);
|
|
1211
1221
|
}
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1222
|
+
const Fr = At(), Or = { t: Fr, locale: H }, vt = Ye(null);
|
|
1223
|
+
function vi({
|
|
1214
1224
|
translations: e,
|
|
1215
1225
|
locale: t,
|
|
1216
|
-
|
|
1226
|
+
timezone: n,
|
|
1227
|
+
children: s
|
|
1217
1228
|
}) {
|
|
1218
|
-
const
|
|
1219
|
-
const
|
|
1220
|
-
return { t:
|
|
1221
|
-
}, [e, t]);
|
|
1222
|
-
return /* @__PURE__ */
|
|
1223
|
-
}
|
|
1224
|
-
function
|
|
1225
|
-
return
|
|
1226
|
-
}
|
|
1227
|
-
const
|
|
1228
|
-
function
|
|
1229
|
-
const t =
|
|
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);
|
|
1230
1241
|
if (t) return t;
|
|
1231
1242
|
const n = new Intl.NumberFormat(e, { minimumIntegerDigits: 2, useGrouping: !1 });
|
|
1232
|
-
return
|
|
1243
|
+
return Fe.set(e, n), n;
|
|
1233
1244
|
}
|
|
1234
|
-
function
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
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);
|
|
1241
1293
|
};
|
|
1242
|
-
return
|
|
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);
|
|
1243
1298
|
}
|
|
1244
|
-
function
|
|
1245
|
-
|
|
1246
|
-
return Math.round((n - s) / Cr);
|
|
1299
|
+
function Nt(e, t, n) {
|
|
1300
|
+
return Math.round((Ee(e, t) - Ee(e, n)) / Ur);
|
|
1247
1301
|
}
|
|
1248
|
-
function
|
|
1249
|
-
const
|
|
1250
|
-
if (Number.isNaN(
|
|
1251
|
-
const
|
|
1252
|
-
if (a === 0) return e("dateTimeToday", { time:
|
|
1253
|
-
if (a === -1) return e("dateTimeYesterday", { time:
|
|
1254
|
-
if (a === 1) return e("dateTimeTomorrow", { time:
|
|
1255
|
-
const
|
|
1256
|
-
return e("dateTimeWithDate", { date:
|
|
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 });
|
|
1257
1311
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return e("dueByline", { when:
|
|
1312
|
+
function qt(e, t, n, s = {}) {
|
|
1313
|
+
return e("dueByline", { when: Dt(e, t, n, s) });
|
|
1260
1314
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return e("unlockByline", { when:
|
|
1315
|
+
function ze(e, t, n, s = {}) {
|
|
1316
|
+
return e("unlockByline", { when: Dt(e, t, n, s) });
|
|
1263
1317
|
}
|
|
1264
|
-
function
|
|
1265
|
-
return !Number.isInteger(e) || e < 1 ? null :
|
|
1318
|
+
function jr(e, t = H) {
|
|
1319
|
+
return !Number.isInteger(e) || e < 1 ? null : $r(t).format(e);
|
|
1266
1320
|
}
|
|
1267
|
-
function
|
|
1321
|
+
function Wr(e, t) {
|
|
1268
1322
|
switch (t) {
|
|
1269
1323
|
case "assignment":
|
|
1270
1324
|
return e("itemTypeAssignment");
|
|
@@ -1284,10 +1338,10 @@ function Nr(e, t) {
|
|
|
1284
1338
|
return e("itemTypeSubHeader");
|
|
1285
1339
|
}
|
|
1286
1340
|
}
|
|
1287
|
-
function
|
|
1341
|
+
function Yr(e, t) {
|
|
1288
1342
|
return t == null ? null : e("pointsAbbreviated", { count: t });
|
|
1289
1343
|
}
|
|
1290
|
-
function
|
|
1344
|
+
function Qr(e, t) {
|
|
1291
1345
|
switch (t.type) {
|
|
1292
1346
|
case "must_view":
|
|
1293
1347
|
return e("requirementMustView");
|
|
@@ -1305,17 +1359,20 @@ function kr(e, t) {
|
|
|
1305
1359
|
return e("requirementUnknown");
|
|
1306
1360
|
}
|
|
1307
1361
|
}
|
|
1308
|
-
function
|
|
1362
|
+
function Hr(e, t, n, s) {
|
|
1309
1363
|
return e("progressSummary", { percent: t, met: n, count: s });
|
|
1310
1364
|
}
|
|
1311
|
-
|
|
1365
|
+
function Kr(e, t, n, s) {
|
|
1366
|
+
return e("progressScreenReaderValue", { percent: t, met: n, count: s });
|
|
1367
|
+
}
|
|
1368
|
+
const Zr = [
|
|
1312
1369
|
"all",
|
|
1313
1370
|
"in_progress",
|
|
1314
1371
|
"complete",
|
|
1315
1372
|
"due_this_week",
|
|
1316
1373
|
"missing"
|
|
1317
1374
|
];
|
|
1318
|
-
function
|
|
1375
|
+
function Vr(e, t) {
|
|
1319
1376
|
switch (t) {
|
|
1320
1377
|
case "all":
|
|
1321
1378
|
return e("filterAll");
|
|
@@ -1329,81 +1386,83 @@ function Fr(e, t) {
|
|
|
1329
1386
|
return e("filterMissing");
|
|
1330
1387
|
}
|
|
1331
1388
|
}
|
|
1332
|
-
const
|
|
1333
|
-
function
|
|
1389
|
+
const Xr = 7;
|
|
1390
|
+
function Jr(e, t, n, s) {
|
|
1334
1391
|
if (t === "all") return !0;
|
|
1335
|
-
const
|
|
1336
|
-
if (!
|
|
1392
|
+
const r = e.progress;
|
|
1393
|
+
if (!r) return !1;
|
|
1337
1394
|
switch (t) {
|
|
1338
1395
|
case "in_progress":
|
|
1339
|
-
return
|
|
1396
|
+
return r.status === "in_progress";
|
|
1340
1397
|
case "complete":
|
|
1341
|
-
return
|
|
1398
|
+
return r.status === "all_submitted" || r.status === "all_graded";
|
|
1342
1399
|
case "missing":
|
|
1343
|
-
return
|
|
1400
|
+
return r.missingCount > 0;
|
|
1344
1401
|
case "due_this_week": {
|
|
1345
|
-
if (!
|
|
1346
|
-
const
|
|
1347
|
-
if (Number.isNaN(
|
|
1348
|
-
const
|
|
1349
|
-
return
|
|
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;
|
|
1350
1407
|
}
|
|
1351
1408
|
default:
|
|
1352
1409
|
return !0;
|
|
1353
1410
|
}
|
|
1354
1411
|
}
|
|
1355
|
-
function
|
|
1412
|
+
function eo(e, t, n) {
|
|
1356
1413
|
const s = t.trim().toLocaleLowerCase(n);
|
|
1357
1414
|
return s === "" ? !0 : e.name.toLocaleLowerCase(n).includes(s);
|
|
1358
1415
|
}
|
|
1359
|
-
function
|
|
1360
|
-
const { t:
|
|
1416
|
+
function to({ value: e, onChange: t }) {
|
|
1417
|
+
const { t: n } = N(), s = He();
|
|
1361
1418
|
return /* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
|
|
1362
|
-
/* @__PURE__ */
|
|
1363
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ i(y, { as: "div", margin: "0 0 x-small 0", children: /* @__PURE__ */ i(M, { size: "medium", weight: "bold", id: s, children: n("filterGroupLabel") }) }),
|
|
1420
|
+
/* @__PURE__ */ i(
|
|
1364
1421
|
T,
|
|
1365
1422
|
{
|
|
1366
|
-
gap: "
|
|
1423
|
+
gap: "space4",
|
|
1367
1424
|
wrap: "wrap",
|
|
1368
1425
|
as: "div",
|
|
1369
1426
|
role: "group",
|
|
1370
|
-
"aria-labelledby":
|
|
1427
|
+
"aria-labelledby": s,
|
|
1371
1428
|
"data-testid": "filter-chips",
|
|
1372
|
-
children:
|
|
1373
|
-
const
|
|
1374
|
-
return /* @__PURE__ */
|
|
1375
|
-
|
|
1429
|
+
children: Zr.map((r) => {
|
|
1430
|
+
const o = r === e;
|
|
1431
|
+
return /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
|
|
1432
|
+
ne,
|
|
1376
1433
|
{
|
|
1377
|
-
size: "
|
|
1378
|
-
color:
|
|
1379
|
-
"aria-pressed":
|
|
1380
|
-
onClick: () => t(
|
|
1381
|
-
"data-testid": `filter-chip-${
|
|
1382
|
-
themeOverride: { borderRadius: "
|
|
1383
|
-
children:
|
|
1434
|
+
size: "medium",
|
|
1435
|
+
color: o ? "primary" : "secondary",
|
|
1436
|
+
"aria-pressed": o,
|
|
1437
|
+
onClick: () => t(r),
|
|
1438
|
+
"data-testid": `filter-chip-${r}`,
|
|
1439
|
+
themeOverride: { borderRadius: "0.5rem" },
|
|
1440
|
+
children: Vr(n, r)
|
|
1384
1441
|
}
|
|
1385
|
-
) },
|
|
1442
|
+
) }, r);
|
|
1386
1443
|
})
|
|
1387
1444
|
}
|
|
1388
1445
|
)
|
|
1389
1446
|
] });
|
|
1390
1447
|
}
|
|
1391
|
-
const
|
|
1448
|
+
const no = {
|
|
1392
1449
|
not_started: {},
|
|
1393
|
-
in_progress: { color: "info", icon: /* @__PURE__ */
|
|
1394
|
-
all_submitted: { color: "success", icon: /* @__PURE__ */
|
|
1395
|
-
all_graded: { color: "success", icon: /* @__PURE__ */
|
|
1396
|
-
missing: { color: "danger", icon: /* @__PURE__ */
|
|
1397
|
-
locked: { icon: /* @__PURE__ */
|
|
1398
|
-
},
|
|
1450
|
+
in_progress: { color: "info", icon: /* @__PURE__ */ i(st, {}) },
|
|
1451
|
+
all_submitted: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
|
|
1452
|
+
all_graded: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
|
|
1453
|
+
missing: { color: "danger", icon: /* @__PURE__ */ i(nt, {}) },
|
|
1454
|
+
locked: { icon: /* @__PURE__ */ i(tt, {}) }
|
|
1455
|
+
}, so = {
|
|
1399
1456
|
not_started: {},
|
|
1400
|
-
in_progress: { color: "info", icon: /* @__PURE__ */
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1457
|
+
in_progress: { color: "info", icon: /* @__PURE__ */ i(st, {}) },
|
|
1458
|
+
complete: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
|
|
1459
|
+
submitted: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
|
|
1460
|
+
graded: { color: "success", icon: /* @__PURE__ */ i(se, {}) },
|
|
1461
|
+
excused: {},
|
|
1462
|
+
missing: { color: "danger", icon: /* @__PURE__ */ i(nt, {}) },
|
|
1463
|
+
locked: { icon: /* @__PURE__ */ i(tt, {}) }
|
|
1405
1464
|
};
|
|
1406
|
-
function
|
|
1465
|
+
function ro(e, t) {
|
|
1407
1466
|
switch (t) {
|
|
1408
1467
|
case "not_started":
|
|
1409
1468
|
return e("moduleStatusNotStarted");
|
|
@@ -1419,67 +1478,71 @@ function Br(e, t) {
|
|
|
1419
1478
|
return e("moduleStatusLocked");
|
|
1420
1479
|
}
|
|
1421
1480
|
}
|
|
1422
|
-
function
|
|
1481
|
+
function oo(e, t) {
|
|
1423
1482
|
switch (t) {
|
|
1424
1483
|
case "not_started":
|
|
1425
1484
|
return e("itemStatusNotStarted");
|
|
1426
1485
|
case "in_progress":
|
|
1427
1486
|
return e("itemStatusInProgress");
|
|
1487
|
+
case "complete":
|
|
1488
|
+
return e("itemStatusComplete");
|
|
1428
1489
|
case "submitted":
|
|
1429
1490
|
return e("itemStatusSubmitted");
|
|
1430
1491
|
case "graded":
|
|
1431
1492
|
return e("itemStatusGraded");
|
|
1493
|
+
case "excused":
|
|
1494
|
+
return e("itemStatusExcused");
|
|
1432
1495
|
case "missing":
|
|
1433
1496
|
return e("itemStatusMissing");
|
|
1434
1497
|
case "locked":
|
|
1435
1498
|
return e("itemStatusLocked");
|
|
1436
1499
|
}
|
|
1437
1500
|
}
|
|
1438
|
-
function
|
|
1439
|
-
return /* @__PURE__ */
|
|
1501
|
+
function Rt(e, t, n) {
|
|
1502
|
+
return /* @__PURE__ */ i(on, { color: e.color, renderIcon: e.icon, "data-testid": n, children: t });
|
|
1440
1503
|
}
|
|
1441
|
-
function
|
|
1442
|
-
const { t } =
|
|
1443
|
-
return
|
|
1444
|
-
|
|
1445
|
-
|
|
1504
|
+
function io({ status: e }) {
|
|
1505
|
+
const { t } = N();
|
|
1506
|
+
return Rt(
|
|
1507
|
+
no[e],
|
|
1508
|
+
ro(t, e),
|
|
1446
1509
|
"module-status-pill"
|
|
1447
1510
|
);
|
|
1448
1511
|
}
|
|
1449
|
-
function
|
|
1450
|
-
const { t } =
|
|
1451
|
-
return
|
|
1452
|
-
|
|
1453
|
-
|
|
1512
|
+
function lo({ status: e }) {
|
|
1513
|
+
const { t } = N();
|
|
1514
|
+
return Rt(
|
|
1515
|
+
so[e],
|
|
1516
|
+
oo(t, e),
|
|
1454
1517
|
"item-status-pill"
|
|
1455
1518
|
);
|
|
1456
1519
|
}
|
|
1457
|
-
const
|
|
1458
|
-
assignment: /* @__PURE__ */
|
|
1459
|
-
quiz: /* @__PURE__ */
|
|
1460
|
-
discussion: /* @__PURE__ */
|
|
1461
|
-
page: /* @__PURE__ */
|
|
1462
|
-
file: /* @__PURE__ */
|
|
1463
|
-
external_url: /* @__PURE__ */
|
|
1464
|
-
external_tool: /* @__PURE__ */
|
|
1465
|
-
sub_header: /* @__PURE__ */
|
|
1466
|
-
},
|
|
1520
|
+
const ao = {
|
|
1521
|
+
assignment: /* @__PURE__ */ i(Jt, {}),
|
|
1522
|
+
quiz: /* @__PURE__ */ i(Xt, {}),
|
|
1523
|
+
discussion: /* @__PURE__ */ i(Vt, {}),
|
|
1524
|
+
page: /* @__PURE__ */ i(Zt, {}),
|
|
1525
|
+
file: /* @__PURE__ */ i(Kt, {}),
|
|
1526
|
+
external_url: /* @__PURE__ */ i(Ht, {}),
|
|
1527
|
+
external_tool: /* @__PURE__ */ i(Qt, {}),
|
|
1528
|
+
sub_header: /* @__PURE__ */ i(Yt, {})
|
|
1529
|
+
}, uo = 1.75, co = {
|
|
1467
1530
|
contentVisibility: "auto",
|
|
1468
1531
|
containIntrinsicSize: "auto 3.5rem"
|
|
1469
1532
|
};
|
|
1470
|
-
function
|
|
1533
|
+
function mo({ item: e, today: t, navigation: n }) {
|
|
1471
1534
|
var p;
|
|
1472
|
-
const { t: s, locale: r } =
|
|
1535
|
+
const { t: s, locale: r, timezone: o } = N(), l = e.title || s("itemUntitled");
|
|
1473
1536
|
if (e.type === "sub_header")
|
|
1474
|
-
return /* @__PURE__ */
|
|
1537
|
+
return /* @__PURE__ */ i(
|
|
1475
1538
|
y,
|
|
1476
1539
|
{
|
|
1477
1540
|
as: "div",
|
|
1478
1541
|
padding: "x-small small",
|
|
1479
1542
|
margin: "x-small 0 0 0",
|
|
1480
1543
|
"data-testid": `module-item-${e.id}`,
|
|
1481
|
-
children: /* @__PURE__ */
|
|
1482
|
-
|
|
1544
|
+
children: /* @__PURE__ */ i(
|
|
1545
|
+
M,
|
|
1483
1546
|
{
|
|
1484
1547
|
size: "small",
|
|
1485
1548
|
weight: "bold",
|
|
@@ -1487,17 +1550,17 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1487
1550
|
letterSpacing: "expanded",
|
|
1488
1551
|
"data-testid": "module-item-title",
|
|
1489
1552
|
"data-sub-header": "true",
|
|
1490
|
-
children:
|
|
1553
|
+
children: l
|
|
1491
1554
|
}
|
|
1492
1555
|
)
|
|
1493
1556
|
}
|
|
1494
1557
|
);
|
|
1495
|
-
const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null,
|
|
1496
|
-
e.dueAt &&
|
|
1497
|
-
const
|
|
1498
|
-
|
|
1499
|
-
const
|
|
1500
|
-
return
|
|
1558
|
+
const u = ((p = n == null ? void 0 : n.getItemHref) == null ? void 0 : p.call(n, e)) ?? e.url ?? null, c = e.status === "locked", g = n == null ? void 0 : n.onItemClick, a = g ? (f) => g(e, f) : void 0, d = [Wr(s, e.type)];
|
|
1559
|
+
e.dueAt && d.push(qt(s, e.dueAt, t, { locale: r, timezone: o }));
|
|
1560
|
+
const h = Yr(s, e.pointsPossible);
|
|
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(
|
|
1501
1564
|
y,
|
|
1502
1565
|
{
|
|
1503
1566
|
as: "div",
|
|
@@ -1507,8 +1570,8 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1507
1570
|
margin: "x-small 0 0 0",
|
|
1508
1571
|
"data-testid": `module-item-${e.id}`,
|
|
1509
1572
|
children: /* @__PURE__ */ _(T, { alignItems: "center", gap: "small", children: [
|
|
1510
|
-
e.indent > 0 ? /* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1573
|
+
e.indent > 0 ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(M, { color: "secondary", children: /* @__PURE__ */ i(Wt, {}) }) }) : null,
|
|
1574
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
|
|
1512
1575
|
y,
|
|
1513
1576
|
{
|
|
1514
1577
|
as: "div",
|
|
@@ -1519,51 +1582,51 @@ function Kr({ item: e, today: t, navigation: n }) {
|
|
|
1519
1582
|
width: "2.25rem",
|
|
1520
1583
|
height: "2.25rem",
|
|
1521
1584
|
textAlign: "center",
|
|
1522
|
-
children: /* @__PURE__ */
|
|
1585
|
+
children: /* @__PURE__ */ i(M, { color: "secondary", children: ao[e.type] })
|
|
1523
1586
|
}
|
|
1524
1587
|
) }),
|
|
1525
1588
|
/* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1526
|
-
/* @__PURE__ */
|
|
1527
|
-
|
|
1589
|
+
/* @__PURE__ */ i(y, { as: "div", children: c || !u ? /* @__PURE__ */ i(
|
|
1590
|
+
M,
|
|
1528
1591
|
{
|
|
1529
1592
|
weight: "bold",
|
|
1530
1593
|
size: "small",
|
|
1531
|
-
color:
|
|
1594
|
+
color: c ? "secondary" : "primary",
|
|
1532
1595
|
"data-testid": "module-item-title",
|
|
1533
|
-
"data-locked":
|
|
1534
|
-
children:
|
|
1596
|
+
"data-locked": c ? "true" : void 0,
|
|
1597
|
+
children: l
|
|
1535
1598
|
}
|
|
1536
1599
|
) : /* @__PURE__ */ _(
|
|
1537
|
-
|
|
1600
|
+
rn,
|
|
1538
1601
|
{
|
|
1539
1602
|
href: u,
|
|
1540
|
-
onClick:
|
|
1603
|
+
onClick: a,
|
|
1541
1604
|
forceButtonRole: !1,
|
|
1542
1605
|
isWithinText: !1,
|
|
1543
1606
|
target: e.newTab ? "_blank" : void 0,
|
|
1544
1607
|
rel: e.newTab ? "noopener noreferrer" : void 0,
|
|
1545
1608
|
children: [
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
e.newTab ? /* @__PURE__ */
|
|
1609
|
+
/* @__PURE__ */ i(M, { weight: "bold", size: "small", color: "primary", "data-testid": "module-item-title", children: l }),
|
|
1610
|
+
e.newTab ? /* @__PURE__ */ i(sn, { children: ` ${s("opensInNewWindow")}` }) : null
|
|
1548
1611
|
]
|
|
1549
1612
|
}
|
|
1550
1613
|
) }),
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
|
|
1553
|
-
/* @__PURE__ */
|
|
1614
|
+
/* @__PURE__ */ i(y, { as: "div", children: /* @__PURE__ */ i(M, { size: "x-small", color: "secondary", "data-testid": "module-item-meta", children: d.map((f, w) => /* @__PURE__ */ _("span", { children: [
|
|
1615
|
+
w > 0 ? /* @__PURE__ */ i("span", { "aria-hidden": "true", children: " | " }) : null,
|
|
1616
|
+
/* @__PURE__ */ i("span", { children: f })
|
|
1554
1617
|
] }, f)) }) })
|
|
1555
1618
|
] }),
|
|
1556
|
-
e.status ? /* @__PURE__ */
|
|
1619
|
+
e.status ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(lo, { status: e.status }) }) : null
|
|
1557
1620
|
] })
|
|
1558
1621
|
}
|
|
1559
1622
|
) });
|
|
1560
1623
|
}
|
|
1561
|
-
const
|
|
1562
|
-
function
|
|
1624
|
+
const go = Ke(mo), $e = "3rem";
|
|
1625
|
+
function po({
|
|
1563
1626
|
label: e,
|
|
1564
1627
|
dimmed: t = !1
|
|
1565
1628
|
}) {
|
|
1566
|
-
return e === null ? null : /* @__PURE__ */
|
|
1629
|
+
return e === null ? null : /* @__PURE__ */ i(
|
|
1567
1630
|
y,
|
|
1568
1631
|
{
|
|
1569
1632
|
as: "div",
|
|
@@ -1571,79 +1634,112 @@ function Zr({
|
|
|
1571
1634
|
borderWidth: "small",
|
|
1572
1635
|
borderRadius: "large",
|
|
1573
1636
|
borderColor: t ? "primary" : "secondary",
|
|
1574
|
-
minWidth:
|
|
1575
|
-
height:
|
|
1637
|
+
minWidth: $e,
|
|
1638
|
+
height: $e,
|
|
1576
1639
|
padding: "0 xx-small",
|
|
1577
1640
|
"data-testid": "module-number",
|
|
1578
|
-
children: /* @__PURE__ */
|
|
1641
|
+
children: /* @__PURE__ */ i(T, { height: "100%", alignItems: "center", justifyItems: "center", children: /* @__PURE__ */ i(M, { weight: "bold", size: "medium", color: t ? "secondary" : "primary", children: e }) })
|
|
1579
1642
|
}
|
|
1580
1643
|
);
|
|
1581
1644
|
}
|
|
1582
|
-
function
|
|
1583
|
-
var
|
|
1584
|
-
const { t: n, locale: s } =
|
|
1585
|
-
if (
|
|
1586
|
-
return /* @__PURE__ */
|
|
1587
|
-
if (
|
|
1588
|
-
return /* @__PURE__ */
|
|
1589
|
-
const u = (
|
|
1590
|
-
return u ? /* @__PURE__ */
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
return
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1645
|
+
function fo({ module: e, today: t }) {
|
|
1646
|
+
var c, g;
|
|
1647
|
+
const { t: n, locale: s, timezone: r } = N(), o = ((c = e.progress) == null ? void 0 : c.status) === "locked", l = e.unlockAt;
|
|
1648
|
+
if (o && l)
|
|
1649
|
+
return /* @__PURE__ */ i(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: ze(n, l, t, { locale: s, timezone: r }) });
|
|
1650
|
+
if (o)
|
|
1651
|
+
return /* @__PURE__ */ i(M, { size: "small", color: "secondary", "data-testid": "module-byline", children: n("lockedByline") });
|
|
1652
|
+
const u = (g = e.progress) == null ? void 0 : g.latestDueAt;
|
|
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;
|
|
1657
|
+
return {
|
|
1658
|
+
meterColorBrand: ((s = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : s.grey125125) ?? ho,
|
|
1659
|
+
borderRadius: String(((r = t.borders) == null ? void 0 : r.radiusLarge) ?? Io),
|
|
1660
|
+
borderColor: ((l = (o = t.colors) == null ? void 0 : o.contrasts) == null ? void 0 : l.grey1424) ?? bo,
|
|
1661
|
+
trackBottomBorderColor: "transparent"
|
|
1662
|
+
};
|
|
1663
|
+
}, So = "66.667%", yo = "8rem";
|
|
1664
|
+
function _o({
|
|
1665
|
+
module: e,
|
|
1666
|
+
breakpoints: t
|
|
1667
|
+
}) {
|
|
1668
|
+
const { t: n } = N(), s = e.progress;
|
|
1669
|
+
if (!s || s.status === "locked" || s.requirementCount <= 0) return null;
|
|
1670
|
+
const r = t.mobileOnly, o = Object.keys(t).length === 0 || t.desktop === !0;
|
|
1671
|
+
return /* @__PURE__ */ _(
|
|
1672
|
+
T,
|
|
1673
|
+
{
|
|
1674
|
+
width: o ? So : "100%",
|
|
1675
|
+
direction: r ? "column" : "row",
|
|
1676
|
+
alignItems: r ? "stretch" : "center",
|
|
1677
|
+
wrap: "wrap",
|
|
1678
|
+
gap: "x-small",
|
|
1679
|
+
margin: "small 0 0 0",
|
|
1680
|
+
"data-testid": "module-progress",
|
|
1681
|
+
children: [
|
|
1682
|
+
/* @__PURE__ */ i(T.Item, { size: r ? void 0 : yo, shouldGrow: !0, children: /* @__PURE__ */ i(
|
|
1683
|
+
nn,
|
|
1684
|
+
{
|
|
1685
|
+
size: "x-small",
|
|
1686
|
+
meterColor: "brand",
|
|
1687
|
+
valueNow: s.requirementsMet,
|
|
1688
|
+
valueMax: s.requirementCount,
|
|
1689
|
+
shouldAnimate: !1,
|
|
1690
|
+
screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
|
|
1691
|
+
formatScreenReaderValue: () => Kr(
|
|
1692
|
+
n,
|
|
1693
|
+
s.percentComplete,
|
|
1694
|
+
s.requirementsMet,
|
|
1695
|
+
s.requirementCount
|
|
1696
|
+
),
|
|
1697
|
+
themeOverride: Mo
|
|
1698
|
+
}
|
|
1699
|
+
) }),
|
|
1700
|
+
/* @__PURE__ */ i(T.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: Hr(
|
|
1701
|
+
n,
|
|
1702
|
+
s.percentComplete,
|
|
1703
|
+
s.requirementsMet,
|
|
1704
|
+
s.requirementCount
|
|
1705
|
+
) }) })
|
|
1706
|
+
]
|
|
1707
|
+
}
|
|
1708
|
+
);
|
|
1613
1709
|
}
|
|
1614
|
-
const
|
|
1615
|
-
function
|
|
1710
|
+
const Be = (e) => `platform-modules-panel-${e}`;
|
|
1711
|
+
function To({
|
|
1616
1712
|
module: e,
|
|
1617
1713
|
state: t,
|
|
1618
1714
|
today: n,
|
|
1619
1715
|
navigation: s,
|
|
1620
1716
|
showDiagnostics: r
|
|
1621
1717
|
}) {
|
|
1622
|
-
const { t:
|
|
1623
|
-
return
|
|
1624
|
-
!c ||
|
|
1625
|
-
|
|
1626
|
-
loaded:
|
|
1718
|
+
const { t: o } = N(), l = O(null), u = t.items.length, c = !t.isLoading && !t.isFetchingNextPage;
|
|
1719
|
+
return he(() => {
|
|
1720
|
+
!c || u === 0 || l.current !== u && (l.current = u, Ve(
|
|
1721
|
+
o("itemsLoadedAnnouncement", {
|
|
1722
|
+
loaded: u,
|
|
1627
1723
|
count: e.itemCount,
|
|
1628
1724
|
name: e.name
|
|
1629
1725
|
})
|
|
1630
1726
|
));
|
|
1631
|
-
}, [c,
|
|
1632
|
-
|
|
1727
|
+
}, [c, u, e.itemCount, e.name, o]), t.error ? /* @__PURE__ */ i(y, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
1728
|
+
Je,
|
|
1633
1729
|
{
|
|
1634
1730
|
variant: "error",
|
|
1635
1731
|
margin: "0",
|
|
1636
|
-
liveRegion:
|
|
1732
|
+
liveRegion: Xe,
|
|
1637
1733
|
liveRegionPoliteness: "assertive",
|
|
1638
1734
|
"data-testid": "items-error",
|
|
1639
|
-
children:
|
|
1735
|
+
children: o("itemsLoadErrorAlert", { message: t.error.message })
|
|
1640
1736
|
}
|
|
1641
1737
|
) }) : t.isLoading ? /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
|
|
1642
|
-
/* @__PURE__ */
|
|
1738
|
+
/* @__PURE__ */ i(ot, { size: "x-small", renderTitle: o("itemsLoadingSpinnerLabel") }),
|
|
1643
1739
|
" ",
|
|
1644
|
-
/* @__PURE__ */
|
|
1740
|
+
/* @__PURE__ */ i(M, { size: "small", color: "secondary", children: o("itemsLoadingText") })
|
|
1645
1741
|
] }) : /* @__PURE__ */ _(y, { as: "div", margin: "small 0 0 0", children: [
|
|
1646
|
-
r ? /* @__PURE__ */ _(
|
|
1742
|
+
r ? /* @__PURE__ */ _(M, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
|
|
1647
1743
|
"items source: ",
|
|
1648
1744
|
t.source,
|
|
1649
1745
|
" · loaded ",
|
|
@@ -1651,15 +1747,15 @@ function eo({
|
|
|
1651
1747
|
" of ",
|
|
1652
1748
|
e.itemCount
|
|
1653
1749
|
] }) : null,
|
|
1654
|
-
t.items.length === 0 ? /* @__PURE__ */
|
|
1655
|
-
t.hasNextPage ? /* @__PURE__ */
|
|
1656
|
-
|
|
1750
|
+
t.items.length === 0 ? /* @__PURE__ */ i(y, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ i(M, { size: "small", color: "secondary", children: o("noItemsEmptyState") }) }) : /* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "items-list", children: t.items.map((g) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(go, { item: g, today: n, navigation: s }) }, g.id)) }),
|
|
1751
|
+
t.hasNextPage ? /* @__PURE__ */ i(y, { as: "div", margin: "small 0 0 0", textAlign: "center", children: /* @__PURE__ */ i(
|
|
1752
|
+
ne,
|
|
1657
1753
|
{
|
|
1658
1754
|
size: "small",
|
|
1659
1755
|
onClick: t.fetchNextPage,
|
|
1660
1756
|
interaction: t.isFetchingNextPage ? "disabled" : "enabled",
|
|
1661
1757
|
"data-testid": "load-more-items",
|
|
1662
|
-
children: t.isFetchingNextPage ?
|
|
1758
|
+
children: t.isFetchingNextPage ? o("loadMoreItemsLoading") : o("loadMoreItems", {
|
|
1663
1759
|
loaded: t.items.length,
|
|
1664
1760
|
count: e.itemCount
|
|
1665
1761
|
})
|
|
@@ -1667,19 +1763,20 @@ function eo({
|
|
|
1667
1763
|
) }) : null
|
|
1668
1764
|
] });
|
|
1669
1765
|
}
|
|
1670
|
-
function
|
|
1766
|
+
function wo({
|
|
1671
1767
|
module: e,
|
|
1672
1768
|
expanded: t,
|
|
1673
1769
|
onToggle: n,
|
|
1674
1770
|
itemsState: s,
|
|
1675
1771
|
today: r,
|
|
1676
|
-
navigation:
|
|
1677
|
-
showDiagnostics:
|
|
1678
|
-
headingLevel:
|
|
1679
|
-
moduleLabel: c
|
|
1772
|
+
navigation: o,
|
|
1773
|
+
showDiagnostics: l = !1,
|
|
1774
|
+
headingLevel: u = "h3",
|
|
1775
|
+
moduleLabel: c,
|
|
1776
|
+
breakpoints: g = {}
|
|
1680
1777
|
}) {
|
|
1681
1778
|
var p;
|
|
1682
|
-
const { t:
|
|
1779
|
+
const { t: a, locale: d } = N(), h = ((p = e.progress) == null ? void 0 : p.status) === "locked", I = c === void 0 ? jr(e.position, d) : c;
|
|
1683
1780
|
return /* @__PURE__ */ _(
|
|
1684
1781
|
y,
|
|
1685
1782
|
{
|
|
@@ -1693,64 +1790,64 @@ function to({
|
|
|
1693
1790
|
"data-testid": `module-card-${e.id}`,
|
|
1694
1791
|
children: [
|
|
1695
1792
|
/* @__PURE__ */ _(T, { alignItems: "start", gap: "small", "data-testid": "module-header", children: [
|
|
1696
|
-
|
|
1793
|
+
I !== null ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(po, { label: I, dimmed: h }) }) : null,
|
|
1697
1794
|
/* @__PURE__ */ _(T.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1698
1795
|
/* @__PURE__ */ _(y, { as: "div", children: [
|
|
1699
|
-
/* @__PURE__ */
|
|
1700
|
-
|
|
1796
|
+
/* @__PURE__ */ i(
|
|
1797
|
+
et,
|
|
1701
1798
|
{
|
|
1702
|
-
level:
|
|
1799
|
+
level: u,
|
|
1703
1800
|
themeOverride: { h2FontSize: "1.375rem", h3FontSize: "1.375rem" },
|
|
1704
1801
|
"data-testid": "module-name",
|
|
1705
|
-
children: /* @__PURE__ */
|
|
1802
|
+
children: /* @__PURE__ */ i(M, { size: "large", weight: "bold", color: h ? "secondary" : "primary", children: e.name })
|
|
1706
1803
|
}
|
|
1707
1804
|
),
|
|
1708
|
-
e.published ? null : /* @__PURE__ */ _(
|
|
1805
|
+
e.published ? null : /* @__PURE__ */ _(M, { size: "x-small", color: "secondary", children: [
|
|
1709
1806
|
" ",
|
|
1710
|
-
|
|
1807
|
+
a("moduleUnpublishedBadge")
|
|
1711
1808
|
] })
|
|
1712
1809
|
] }),
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ i(y, { as: "div", children: /* @__PURE__ */ i(fo, { module: e, today: r }) }),
|
|
1811
|
+
/* @__PURE__ */ i(_o, { module: e, breakpoints: g })
|
|
1715
1812
|
] }),
|
|
1716
|
-
e.progress ? /* @__PURE__ */
|
|
1717
|
-
/* @__PURE__ */
|
|
1718
|
-
|
|
1813
|
+
e.progress ? /* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(io, { status: e.progress.status }) }) : null,
|
|
1814
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(
|
|
1815
|
+
jt,
|
|
1719
1816
|
{
|
|
1720
1817
|
size: "small",
|
|
1721
1818
|
withBorder: !0,
|
|
1722
1819
|
withBackground: !1,
|
|
1723
|
-
screenReaderLabel: t ?
|
|
1820
|
+
screenReaderLabel: t ? a("collapseModule", { name: e.name }) : a("expandModule", { name: e.name }),
|
|
1724
1821
|
"aria-expanded": t,
|
|
1725
|
-
"aria-controls":
|
|
1822
|
+
"aria-controls": Be(e.id),
|
|
1726
1823
|
onClick: () => n(e.id),
|
|
1727
1824
|
"data-testid": `toggle-module-${e.id}`,
|
|
1728
|
-
children: t ? /* @__PURE__ */
|
|
1825
|
+
children: t ? /* @__PURE__ */ i(en, {}) : /* @__PURE__ */ i(rt, {})
|
|
1729
1826
|
}
|
|
1730
1827
|
) })
|
|
1731
1828
|
] }),
|
|
1732
|
-
/* @__PURE__ */
|
|
1733
|
-
|
|
1829
|
+
/* @__PURE__ */ i("div", { id: Be(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ i(
|
|
1830
|
+
To,
|
|
1734
1831
|
{
|
|
1735
1832
|
module: e,
|
|
1736
1833
|
state: s,
|
|
1737
1834
|
today: r,
|
|
1738
|
-
navigation:
|
|
1739
|
-
showDiagnostics:
|
|
1835
|
+
navigation: o,
|
|
1836
|
+
showDiagnostics: l
|
|
1740
1837
|
}
|
|
1741
1838
|
) : null })
|
|
1742
1839
|
]
|
|
1743
1840
|
}
|
|
1744
1841
|
);
|
|
1745
1842
|
}
|
|
1746
|
-
const
|
|
1747
|
-
function
|
|
1843
|
+
const Po = Ke(wo);
|
|
1844
|
+
function Eo({
|
|
1748
1845
|
counts: e,
|
|
1749
1846
|
itemsMode: t,
|
|
1750
1847
|
loadedModules: n
|
|
1751
1848
|
}) {
|
|
1752
1849
|
const s = e.listModules + e.listModuleItems;
|
|
1753
|
-
return /* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ i(
|
|
1754
1851
|
y,
|
|
1755
1852
|
{
|
|
1756
1853
|
as: "div",
|
|
@@ -1761,24 +1858,24 @@ function so({
|
|
|
1761
1858
|
margin: "0 0 small 0",
|
|
1762
1859
|
"data-testid": "dev-diagnostics",
|
|
1763
1860
|
children: /* @__PURE__ */ _(T, { gap: "medium", wrap: "wrap", children: [
|
|
1764
|
-
/* @__PURE__ */
|
|
1765
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ i(M, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
|
|
1862
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "request-count-list-modules", children: [
|
|
1766
1863
|
"listModules: ",
|
|
1767
1864
|
e.listModules
|
|
1768
1865
|
] }) }),
|
|
1769
|
-
/* @__PURE__ */
|
|
1866
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
|
|
1770
1867
|
"listModuleItems: ",
|
|
1771
1868
|
e.listModuleItems
|
|
1772
1869
|
] }) }),
|
|
1773
|
-
/* @__PURE__ */
|
|
1870
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
|
|
1774
1871
|
"total: ",
|
|
1775
1872
|
s
|
|
1776
1873
|
] }) }),
|
|
1777
|
-
/* @__PURE__ */
|
|
1874
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "resolved-items-mode", children: [
|
|
1778
1875
|
"itemsMode: ",
|
|
1779
1876
|
t ?? "probing…"
|
|
1780
1877
|
] }) }),
|
|
1781
|
-
/* @__PURE__ */
|
|
1878
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(M, { size: "x-small", "data-testid": "modules-loaded-count", children: [
|
|
1782
1879
|
"modules loaded: ",
|
|
1783
1880
|
n
|
|
1784
1881
|
] }) })
|
|
@@ -1786,120 +1883,115 @@ function so({
|
|
|
1786
1883
|
}
|
|
1787
1884
|
);
|
|
1788
1885
|
}
|
|
1789
|
-
function
|
|
1886
|
+
function Co({
|
|
1790
1887
|
data: e,
|
|
1791
1888
|
courseName: t,
|
|
1792
1889
|
courseContext: n,
|
|
1793
1890
|
today: s,
|
|
1794
1891
|
requestCounts: r,
|
|
1795
|
-
showDiagnostics:
|
|
1796
|
-
initialFilter:
|
|
1797
|
-
navigation:
|
|
1892
|
+
showDiagnostics: o = r !== void 0,
|
|
1893
|
+
initialFilter: l = "all",
|
|
1894
|
+
navigation: u,
|
|
1798
1895
|
as: c = "div",
|
|
1799
|
-
headingLevel: g = "h2"
|
|
1896
|
+
headingLevel: g = "h2",
|
|
1897
|
+
breakpoints: a = {}
|
|
1800
1898
|
}) {
|
|
1801
|
-
const {
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
()
|
|
1821
|
-
|
|
1899
|
+
const { miniTablet: d, tablet: h, desktop: I, desktopNavOpen: p, desktopOnly: f, mobileOnly: w, ICEDesktop: L } = a, A = v(
|
|
1900
|
+
() => ({ miniTablet: d, tablet: h, desktop: I, desktopNavOpen: p, desktopOnly: f, mobileOnly: w, ICEDesktop: L }),
|
|
1901
|
+
[d, h, I, p, f, w, L]
|
|
1902
|
+
), {
|
|
1903
|
+
modules: P,
|
|
1904
|
+
hasNextPage: ae,
|
|
1905
|
+
fetchNextPage: ue,
|
|
1906
|
+
isFetchingNextPage: U,
|
|
1907
|
+
isLoading: z,
|
|
1908
|
+
error: R,
|
|
1909
|
+
itemsMode: ce,
|
|
1910
|
+
expandedModuleIds: K,
|
|
1911
|
+
toggleModule: Z,
|
|
1912
|
+
expandModule: V,
|
|
1913
|
+
collapseModule: de,
|
|
1914
|
+
getItems: _e
|
|
1915
|
+
} = e, { t: E, locale: X, timezone: me } = N(), J = t ?? E("pageTitle"), [$, S] = te(""), [b, C] = te(l), B = O(null), D = He(), F = O(!1), [q] = te(() => /* @__PURE__ */ new Date()), ee = s ?? q;
|
|
1916
|
+
he(() => {
|
|
1917
|
+
var x;
|
|
1918
|
+
!F.current || U || (F.current = !1, Ve(E("modulesLoadedAnnouncement", { count: P.length })), (x = B.current) == null || x.focus());
|
|
1919
|
+
}, [U, P.length, E]);
|
|
1920
|
+
const G = v(
|
|
1921
|
+
() => P.filter(
|
|
1922
|
+
(x) => eo(x, $, X) && Jr(x, b, ee, me)
|
|
1822
1923
|
),
|
|
1823
|
-
[
|
|
1824
|
-
),
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
complete: L("complete"),
|
|
1830
|
-
due_this_week: L("due_this_week"),
|
|
1831
|
-
missing: L("missing")
|
|
1832
|
-
};
|
|
1833
|
-
}, [l, q, O, F]), S = () => {
|
|
1834
|
-
for (const w of G) A(w.id);
|
|
1835
|
-
}, I = () => {
|
|
1836
|
-
for (const w of C) se(w);
|
|
1837
|
-
}, x = l.length > 0 && G.length === 0 && !f && !h;
|
|
1924
|
+
[P, $, b, ee, X, me]
|
|
1925
|
+
), ge = () => {
|
|
1926
|
+
for (const x of G) V(x.id);
|
|
1927
|
+
}, j = () => {
|
|
1928
|
+
for (const x of K) de(x);
|
|
1929
|
+
}, zt = P.length > 0 && G.length === 0 && !z && !R;
|
|
1838
1930
|
return /* @__PURE__ */ _(y, { as: c, display: "block", "data-testid": "modules-list", children: [
|
|
1839
1931
|
n ? /* @__PURE__ */ _(y, { as: "div", children: [
|
|
1840
|
-
/* @__PURE__ */
|
|
1841
|
-
/* @__PURE__ */ _(
|
|
1932
|
+
/* @__PURE__ */ i(M, { size: "small", color: "brand", children: n }),
|
|
1933
|
+
/* @__PURE__ */ _(M, { size: "small", color: "secondary", children: [
|
|
1842
1934
|
" ",
|
|
1843
1935
|
"/",
|
|
1844
1936
|
" "
|
|
1845
1937
|
] }),
|
|
1846
|
-
/* @__PURE__ */
|
|
1938
|
+
/* @__PURE__ */ i(M, { size: "small", color: "secondary", children: J })
|
|
1847
1939
|
] }) : null,
|
|
1848
|
-
/* @__PURE__ */
|
|
1849
|
-
r ? /* @__PURE__ */
|
|
1850
|
-
|
|
1940
|
+
/* @__PURE__ */ i(et, { level: g, margin: "x-small 0 medium 0", children: J }),
|
|
1941
|
+
r ? /* @__PURE__ */ i(
|
|
1942
|
+
Eo,
|
|
1851
1943
|
{
|
|
1852
1944
|
counts: r,
|
|
1853
|
-
itemsMode:
|
|
1854
|
-
loadedModules:
|
|
1945
|
+
itemsMode: ce,
|
|
1946
|
+
loadedModules: P.length
|
|
1855
1947
|
}
|
|
1856
1948
|
) : null,
|
|
1857
1949
|
/* @__PURE__ */ _(T, { gap: "small", wrap: "wrap", alignItems: "end", children: [
|
|
1858
|
-
/* @__PURE__ */
|
|
1859
|
-
|
|
1950
|
+
/* @__PURE__ */ i(T.Item, { size: "24rem", shouldShrink: !0, children: /* @__PURE__ */ i(
|
|
1951
|
+
an,
|
|
1860
1952
|
{
|
|
1861
1953
|
renderLabel: E("moduleSearchLabel"),
|
|
1862
1954
|
placeholder: E("searchPlaceholder"),
|
|
1863
|
-
"aria-describedby":
|
|
1864
|
-
value:
|
|
1865
|
-
onChange: (
|
|
1866
|
-
renderBeforeInput: /* @__PURE__ */
|
|
1955
|
+
"aria-describedby": D,
|
|
1956
|
+
value: $,
|
|
1957
|
+
onChange: (x, $t) => S($t),
|
|
1958
|
+
renderBeforeInput: /* @__PURE__ */ i(tn, { inline: !1 }),
|
|
1867
1959
|
"data-testid": "modules-search"
|
|
1868
1960
|
}
|
|
1869
1961
|
) }),
|
|
1870
|
-
/* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
|
|
1962
|
+
/* @__PURE__ */ i(T.Item, { shouldGrow: !0 }),
|
|
1963
|
+
/* @__PURE__ */ i(T.Item, { children: /* @__PURE__ */ _(
|
|
1964
|
+
Te,
|
|
1873
1965
|
{
|
|
1874
1966
|
placement: "bottom end",
|
|
1875
|
-
trigger: /* @__PURE__ */
|
|
1967
|
+
trigger: /* @__PURE__ */ i(ne, { renderIcon: /* @__PURE__ */ i(rt, {}), "data-testid": "expand-collapse-trigger", children: E("expandCollapseTrigger") }),
|
|
1876
1968
|
children: [
|
|
1877
|
-
/* @__PURE__ */
|
|
1878
|
-
/* @__PURE__ */
|
|
1969
|
+
/* @__PURE__ */ i(Te.Item, { onSelect: ge, "data-testid": "expand-all", children: E("expandAll") }),
|
|
1970
|
+
/* @__PURE__ */ i(Te.Item, { onSelect: j, "data-testid": "collapse-all", children: E("collapseAll") })
|
|
1879
1971
|
]
|
|
1880
1972
|
}
|
|
1881
1973
|
) })
|
|
1882
1974
|
] }),
|
|
1883
|
-
/* @__PURE__ */
|
|
1884
|
-
/* @__PURE__ */
|
|
1975
|
+
/* @__PURE__ */ i(y, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ i(M, { size: "x-small", color: "secondary", id: D, children: E("searchScopeHint") }) }),
|
|
1976
|
+
/* @__PURE__ */ i(to, { value: b, onChange: C }),
|
|
1885
1977
|
/* @__PURE__ */ _(y, { as: "div", margin: "medium 0 0 0", children: [
|
|
1886
|
-
|
|
1978
|
+
R ? (
|
|
1887
1979
|
// `liveRegion` is what makes this announce; without it InstUI's Alert
|
|
1888
1980
|
// sets no role and no aria-live. See the same fix in ModuleCard.
|
|
1889
|
-
/* @__PURE__ */
|
|
1890
|
-
|
|
1981
|
+
/* @__PURE__ */ i(
|
|
1982
|
+
Je,
|
|
1891
1983
|
{
|
|
1892
1984
|
variant: "error",
|
|
1893
1985
|
margin: "0 0 small 0",
|
|
1894
|
-
liveRegion:
|
|
1986
|
+
liveRegion: Xe,
|
|
1895
1987
|
liveRegionPoliteness: "assertive",
|
|
1896
1988
|
"data-testid": "modules-error",
|
|
1897
|
-
children: E("modulesLoadErrorAlert", { message:
|
|
1989
|
+
children: E("modulesLoadErrorAlert", { message: R.message })
|
|
1898
1990
|
}
|
|
1899
1991
|
)
|
|
1900
1992
|
) : null,
|
|
1901
|
-
|
|
1902
|
-
!
|
|
1993
|
+
z ? /* @__PURE__ */ i(y, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ i(ot, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
|
|
1994
|
+
!z && !R && P.length === 0 ? /* @__PURE__ */ i(
|
|
1903
1995
|
y,
|
|
1904
1996
|
{
|
|
1905
1997
|
as: "div",
|
|
@@ -1908,10 +2000,10 @@ function oi({
|
|
|
1908
2000
|
padding: "large",
|
|
1909
2001
|
textAlign: "center",
|
|
1910
2002
|
"data-testid": "modules-empty",
|
|
1911
|
-
children: /* @__PURE__ */
|
|
2003
|
+
children: /* @__PURE__ */ i(M, { color: "secondary", children: E("noModulesEmptyState") })
|
|
1912
2004
|
}
|
|
1913
2005
|
) : null,
|
|
1914
|
-
|
|
2006
|
+
zt ? /* @__PURE__ */ _(
|
|
1915
2007
|
y,
|
|
1916
2008
|
{
|
|
1917
2009
|
as: "div",
|
|
@@ -1921,13 +2013,13 @@ function oi({
|
|
|
1921
2013
|
textAlign: "center",
|
|
1922
2014
|
"data-testid": "modules-filtered-empty",
|
|
1923
2015
|
children: [
|
|
1924
|
-
/* @__PURE__ */
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
|
|
2016
|
+
/* @__PURE__ */ i(y, { as: "div", margin: "0 0 small 0", children: /* @__PURE__ */ i(M, { color: "secondary", children: E("filteredEmptyState", { count: P.length }) }) }),
|
|
2017
|
+
/* @__PURE__ */ i(
|
|
2018
|
+
ne,
|
|
1927
2019
|
{
|
|
1928
2020
|
size: "small",
|
|
1929
2021
|
onClick: () => {
|
|
1930
|
-
|
|
2022
|
+
C("all"), S(""), F.current = !0;
|
|
1931
2023
|
},
|
|
1932
2024
|
children: E("clearFilters")
|
|
1933
2025
|
}
|
|
@@ -1935,47 +2027,50 @@ function oi({
|
|
|
1935
2027
|
]
|
|
1936
2028
|
}
|
|
1937
2029
|
) : null,
|
|
1938
|
-
/* @__PURE__ */
|
|
1939
|
-
|
|
2030
|
+
/* @__PURE__ */ i("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, "data-testid": "modules-stack", children: G.map((x) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
2031
|
+
Po,
|
|
1940
2032
|
{
|
|
1941
|
-
module:
|
|
1942
|
-
expanded:
|
|
1943
|
-
onToggle:
|
|
1944
|
-
itemsState:
|
|
1945
|
-
today:
|
|
1946
|
-
showDiagnostics:
|
|
1947
|
-
navigation:
|
|
1948
|
-
headingLevel: g === "h1" ? "h2" : "h3"
|
|
2033
|
+
module: x,
|
|
2034
|
+
expanded: K.includes(x.id),
|
|
2035
|
+
onToggle: Z,
|
|
2036
|
+
itemsState: _e(x.id),
|
|
2037
|
+
today: ee,
|
|
2038
|
+
showDiagnostics: o,
|
|
2039
|
+
navigation: u,
|
|
2040
|
+
headingLevel: g === "h1" ? "h2" : "h3",
|
|
2041
|
+
breakpoints: A
|
|
1949
2042
|
}
|
|
1950
|
-
) },
|
|
2043
|
+
) }, x.id)) })
|
|
1951
2044
|
] }),
|
|
1952
|
-
|
|
1953
|
-
|
|
2045
|
+
ae ? /* @__PURE__ */ i(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2046
|
+
ne,
|
|
1954
2047
|
{
|
|
1955
2048
|
color: "primary",
|
|
1956
2049
|
onClick: () => {
|
|
1957
|
-
|
|
2050
|
+
F.current = !0, ue();
|
|
1958
2051
|
},
|
|
1959
|
-
interaction:
|
|
2052
|
+
interaction: U ? "disabled" : "enabled",
|
|
1960
2053
|
"data-testid": "load-more-modules",
|
|
1961
|
-
children:
|
|
2054
|
+
children: U ? E("loadMoreModulesLoading") : E("loadMoreModules", { count: P.length })
|
|
1962
2055
|
}
|
|
1963
|
-
) }) :
|
|
1964
|
-
|
|
2056
|
+
) }) : P.length > 0 ? /* @__PURE__ */ i(y, { as: "div", textAlign: "center", margin: "small 0 0 0", children: /* @__PURE__ */ i(
|
|
2057
|
+
M,
|
|
1965
2058
|
{
|
|
1966
2059
|
size: "x-small",
|
|
1967
2060
|
color: "secondary",
|
|
1968
2061
|
"data-testid": "modules-all-loaded",
|
|
1969
|
-
elementRef: (
|
|
1970
|
-
|
|
2062
|
+
elementRef: (x) => {
|
|
2063
|
+
B.current = x;
|
|
1971
2064
|
},
|
|
1972
2065
|
tabIndex: -1,
|
|
1973
|
-
children: E("allModulesLoaded", { count:
|
|
2066
|
+
children: E("allModulesLoaded", { count: P.length })
|
|
1974
2067
|
}
|
|
1975
2068
|
) }) : null
|
|
1976
2069
|
] });
|
|
1977
2070
|
}
|
|
1978
|
-
const
|
|
2071
|
+
const ki = ln(
|
|
2072
|
+
Co
|
|
2073
|
+
), re = [
|
|
1979
2074
|
"assignment",
|
|
1980
2075
|
"quiz",
|
|
1981
2076
|
"discussion",
|
|
@@ -1984,25 +2079,25 @@ const J = [
|
|
|
1984
2079
|
"external_url",
|
|
1985
2080
|
"external_tool",
|
|
1986
2081
|
"sub_header"
|
|
1987
|
-
],
|
|
2082
|
+
], Ce = [
|
|
1988
2083
|
"not_started",
|
|
1989
2084
|
"in_progress",
|
|
1990
2085
|
"all_submitted",
|
|
1991
2086
|
"all_graded",
|
|
1992
2087
|
"missing",
|
|
1993
2088
|
"locked"
|
|
1994
|
-
],
|
|
2089
|
+
], Ge = [
|
|
1995
2090
|
"must_view",
|
|
1996
2091
|
"must_submit",
|
|
1997
2092
|
"must_contribute",
|
|
1998
2093
|
"must_mark_done",
|
|
1999
2094
|
"min_score",
|
|
2000
2095
|
"min_percentage"
|
|
2001
|
-
],
|
|
2002
|
-
const n =
|
|
2096
|
+
], xo = (e) => e.pointsPossible != null && e.status !== "excused", Lo = ["assignment", "quiz", "discussion"], Ao = ["external_url", "external_tool"], vo = ["assignment", "quiz", "discussion"], ko = Date.UTC(2025, 0, 6), No = 864e5, le = "1", Ft = (e) => new Date(ko + e * No).toISOString(), Do = (e, t) => {
|
|
2097
|
+
const n = Ge[Math.floor(t / 3) % Ge.length];
|
|
2003
2098
|
return n === "min_score" ? { itemId: e, type: n, minScore: 10 } : n === "min_percentage" ? { itemId: e, type: n, minPercentage: 80 } : { itemId: e, type: n };
|
|
2004
|
-
},
|
|
2005
|
-
const r = n ? "
|
|
2099
|
+
}, Ot = (e, t) => t % 3 === 0 && e !== "sub_header", Ut = (e) => Ce[(e - 1) % Ce.length], qo = (e, t) => !vo.includes(e) || e === "discussion" && Math.floor(t / re.length) % 2 === 1 ? null : 5 + t % 4 * 5, Ro = (e, t, n, s) => {
|
|
2100
|
+
const r = n ? "complete" : "not_started";
|
|
2006
2101
|
switch (e) {
|
|
2007
2102
|
case "locked":
|
|
2008
2103
|
return "locked";
|
|
@@ -2011,65 +2106,70 @@ const J = [
|
|
|
2011
2106
|
case "all_submitted":
|
|
2012
2107
|
return t ? "submitted" : r;
|
|
2013
2108
|
case "all_graded":
|
|
2014
|
-
return t ? "graded" : r;
|
|
2109
|
+
return t ? s === 0 ? "excused" : "graded" : r;
|
|
2015
2110
|
case "missing":
|
|
2016
2111
|
return n ? t ? "missing" : "not_started" : t ? s % 2 === 0 ? "missing" : "graded" : "not_started";
|
|
2017
2112
|
case "in_progress":
|
|
2018
2113
|
return t ? s % 3 === 0 ? "submitted" : s % 3 === 1 ? "in_progress" : "not_started" : s % 2 === 0 ? r : "not_started";
|
|
2019
2114
|
}
|
|
2020
|
-
},
|
|
2021
|
-
|
|
2115
|
+
}, Fo = /* @__PURE__ */ new Set([
|
|
2116
|
+
"submitted",
|
|
2117
|
+
"graded",
|
|
2118
|
+
"excused",
|
|
2119
|
+
"complete"
|
|
2120
|
+
]), Oo = (e) => e.status !== void 0 && Fo.has(e.status), Uo = (e, t, n, s, r, o) => {
|
|
2121
|
+
const l = String(e), u = String(e * 1e3 + t + 1), c = re[n % re.length], g = c === "sub_header", a = Lo.includes(c) && (n % 4 === 0 || s === "missing"), d = Ot(c, n) ? Do(u, n) : null;
|
|
2022
2122
|
return {
|
|
2023
|
-
id:
|
|
2024
|
-
moduleId:
|
|
2123
|
+
id: u,
|
|
2124
|
+
moduleId: l,
|
|
2025
2125
|
title: `${c} ${t + 1}`,
|
|
2026
2126
|
type: c,
|
|
2027
2127
|
position: t + 1,
|
|
2028
2128
|
indent: t % 5 === 4 ? 1 : 0,
|
|
2029
|
-
// 1 in 7 unpublished, so a teacher view always has something to
|
|
2129
|
+
// 1 in 7 unpublished, so a teacher view always has something to gray out.
|
|
2030
2130
|
// Same rule as the module: a student's page contains no unpublished items,
|
|
2031
|
-
// so only a teacher fixture
|
|
2032
|
-
published:
|
|
2033
|
-
url: g ? null : `/courses/${
|
|
2034
|
-
newTab:
|
|
2035
|
-
completionRequirement:
|
|
2036
|
-
dueAt:
|
|
2131
|
+
// so only a teacher fixture grays any out.
|
|
2132
|
+
published: o === "teacher" ? n % 7 !== 0 : !0,
|
|
2133
|
+
url: g ? null : `/courses/${le}/modules/items/${u}`,
|
|
2134
|
+
newTab: Ao.includes(c) && n % 2 === 0,
|
|
2135
|
+
completionRequirement: d,
|
|
2136
|
+
dueAt: a ? Ft(n % 90) : null,
|
|
2037
2137
|
status: s,
|
|
2038
2138
|
pointsPossible: r,
|
|
2039
2139
|
// Canvas Career only, so it rides in `extensions`. Sparse on purpose: a
|
|
2040
2140
|
// handful per fixture proves the escape hatch survives a round trip, and
|
|
2041
2141
|
// every other item must carry no `extensions` key at all.
|
|
2042
|
-
extensions:
|
|
2142
|
+
extensions: ct(
|
|
2043
2143
|
void 0,
|
|
2044
2144
|
n % 37 === 0 ? 5 + n % 4 * 10 : null
|
|
2045
2145
|
)
|
|
2046
2146
|
};
|
|
2047
|
-
},
|
|
2048
|
-
const r =
|
|
2049
|
-
let
|
|
2050
|
-
for (let
|
|
2051
|
-
const c = n +
|
|
2052
|
-
|
|
2147
|
+
}, zo = (e, t, n, s) => {
|
|
2148
|
+
const r = Ut(e), o = [];
|
|
2149
|
+
let l = 0;
|
|
2150
|
+
for (let u = 0; u < t; u += 1) {
|
|
2151
|
+
const c = n + u, g = re[c % re.length], a = qo(g, c), d = a !== null, h = d ? l++ : u, I = Ro(r, d, Ot(g, c), h);
|
|
2152
|
+
o.push(Uo(e, u, c, I, a, s));
|
|
2053
2153
|
}
|
|
2054
|
-
return
|
|
2055
|
-
},
|
|
2056
|
-
const s =
|
|
2057
|
-
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;
|
|
2058
|
-
},
|
|
2154
|
+
return o;
|
|
2155
|
+
}, $o = (e, t, n) => {
|
|
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) => {
|
|
2059
2159
|
const t = e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort();
|
|
2060
2160
|
return t.length > 0 ? t[t.length - 1] : null;
|
|
2061
|
-
},
|
|
2062
|
-
const s = t.filter((c) => c.completionRequirement), r = n ?? s.length,
|
|
2161
|
+
}, Go = (e, t, n) => {
|
|
2162
|
+
const s = t.filter((c) => c.completionRequirement), r = n ?? s.length, o = Math.min(s.filter(Oo).length, r), l = t.filter((c) => c.status === "missing").length;
|
|
2063
2163
|
return {
|
|
2064
|
-
status:
|
|
2065
|
-
requirementsMet:
|
|
2164
|
+
status: $o(e, t, l),
|
|
2165
|
+
requirementsMet: o,
|
|
2066
2166
|
requirementCount: r,
|
|
2067
2167
|
// Derived from the clamped pair, so the bar and the fraction always agree.
|
|
2068
|
-
percentComplete: r > 0 ? Math.round(
|
|
2069
|
-
latestDueAt:
|
|
2070
|
-
missingCount:
|
|
2168
|
+
percentComplete: r > 0 ? Math.round(o / r * 100) : 0,
|
|
2169
|
+
latestDueAt: Bo(t),
|
|
2170
|
+
missingCount: l
|
|
2071
2171
|
};
|
|
2072
|
-
},
|
|
2172
|
+
}, jo = (e, t, n) => {
|
|
2073
2173
|
const s = e % 2 === 0 ? null : 1;
|
|
2074
2174
|
return {
|
|
2075
2175
|
id: String(e),
|
|
@@ -2078,17 +2178,17 @@ const J = [
|
|
|
2078
2178
|
// A student sees only published modules; publish state varies for a teacher.
|
|
2079
2179
|
published: n === "teacher" ? e % 4 !== 0 : !0,
|
|
2080
2180
|
itemCount: t.length,
|
|
2081
|
-
unlockAt: e % 5 === 0 ?
|
|
2082
|
-
|
|
2181
|
+
unlockAt: e % 5 === 0 ? Ft(e) : null,
|
|
2182
|
+
prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
|
|
2083
2183
|
requirementCount: s,
|
|
2084
2184
|
requireSequentialProgress: e % 6 === 0,
|
|
2085
2185
|
completionRequirements: t.flatMap(
|
|
2086
2186
|
(r) => r.completionRequirement ? [r.completionRequirement] : []
|
|
2087
2187
|
),
|
|
2088
|
-
progress:
|
|
2188
|
+
progress: Go(e, t, s)
|
|
2089
2189
|
};
|
|
2090
2190
|
};
|
|
2091
|
-
function
|
|
2191
|
+
function Wo(e) {
|
|
2092
2192
|
return {
|
|
2093
2193
|
courseId: e.courseId,
|
|
2094
2194
|
modules: e.modules.map(({ progress: t, ...n }) => n),
|
|
@@ -2100,40 +2200,75 @@ function So(e) {
|
|
|
2100
2200
|
)
|
|
2101
2201
|
};
|
|
2102
2202
|
}
|
|
2103
|
-
function
|
|
2104
|
-
const n = t.view ?? "student", s = t.courseId ??
|
|
2105
|
-
let
|
|
2203
|
+
function ye(e, t = {}) {
|
|
2204
|
+
const n = t.view ?? "student", s = t.courseId ?? le, r = [], o = {};
|
|
2205
|
+
let l = 0;
|
|
2106
2206
|
e.forEach((c, g) => {
|
|
2107
|
-
const
|
|
2108
|
-
|
|
2207
|
+
const a = g + 1, d = zo(a, c, l, n);
|
|
2208
|
+
l += c, r.push(jo(a, d, n)), o[String(a)] = d;
|
|
2109
2209
|
});
|
|
2110
|
-
const
|
|
2111
|
-
return n === "teacher" ?
|
|
2210
|
+
const u = { courseId: s, modules: r, itemsByModuleId: o };
|
|
2211
|
+
return n === "teacher" ? Wo(u) : u;
|
|
2112
2212
|
}
|
|
2113
|
-
const
|
|
2114
|
-
function
|
|
2115
|
-
return
|
|
2213
|
+
const fe = (e) => `/courses/${le}/modules/items/${e}`, je = "2099-08-31T06:59:00Z", Yo = "2020-01-06T07:00:00Z", Qo = Ce.length, Ho = 8, Ko = 120, Zo = 25, Vo = 250, We = 8;
|
|
2214
|
+
function Ni() {
|
|
2215
|
+
return ye(Array.from({ length: Qo }, () => Ho));
|
|
2116
2216
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2217
|
+
function Di() {
|
|
2218
|
+
return ye(Array.from({ length: Ko }, () => Zo));
|
|
2119
2219
|
}
|
|
2120
|
-
function
|
|
2121
|
-
return
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2220
|
+
function qi() {
|
|
2221
|
+
return ye([
|
|
2222
|
+
We,
|
|
2223
|
+
Vo,
|
|
2224
|
+
We
|
|
2125
2225
|
]);
|
|
2126
2226
|
}
|
|
2127
|
-
function
|
|
2128
|
-
|
|
2227
|
+
function Ri() {
|
|
2228
|
+
const e = (r, o, l) => ({
|
|
2229
|
+
id: String(r),
|
|
2230
|
+
name: o,
|
|
2231
|
+
position: r,
|
|
2232
|
+
published: !0,
|
|
2233
|
+
itemCount: 0,
|
|
2234
|
+
prerequisiteModules: [],
|
|
2235
|
+
requireSequentialProgress: !1,
|
|
2236
|
+
progress: {
|
|
2237
|
+
status: "locked",
|
|
2238
|
+
requirementsMet: 0,
|
|
2239
|
+
requirementCount: 0,
|
|
2240
|
+
percentComplete: 0,
|
|
2241
|
+
missingCount: 0
|
|
2242
|
+
},
|
|
2243
|
+
...l
|
|
2244
|
+
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, s = [
|
|
2245
|
+
e(1, "Locked by a future date", { unlockAt: je }),
|
|
2246
|
+
e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
|
|
2247
|
+
e(3, "Locked by several prerequisites", {
|
|
2248
|
+
prerequisiteModules: [t, n]
|
|
2249
|
+
}),
|
|
2250
|
+
e(4, "Locked by a date and a prerequisite", {
|
|
2251
|
+
unlockAt: je,
|
|
2252
|
+
prerequisiteModules: [t]
|
|
2253
|
+
}),
|
|
2254
|
+
e(5, "Locked, and the unlock date has passed", { unlockAt: Yo })
|
|
2255
|
+
];
|
|
2256
|
+
return {
|
|
2257
|
+
courseId: le,
|
|
2258
|
+
modules: s,
|
|
2259
|
+
itemsByModuleId: Object.fromEntries(s.map((r) => [r.id, []]))
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
function Fi() {
|
|
2263
|
+
return ye([]);
|
|
2129
2264
|
}
|
|
2130
|
-
function
|
|
2265
|
+
function Oi() {
|
|
2131
2266
|
const t = [
|
|
2132
|
-
{ title: "Reading: limits from the left and the right", type: "page", url:
|
|
2267
|
+
{ title: "Reading: limits from the left and the right", type: "page", url: fe(1) },
|
|
2133
2268
|
{
|
|
2134
2269
|
title: "Desmos: interactive limit explorer",
|
|
2135
2270
|
type: "external_url",
|
|
2136
|
-
url:
|
|
2271
|
+
url: fe(2),
|
|
2137
2272
|
newTab: !0
|
|
2138
2273
|
},
|
|
2139
2274
|
{ title: "Practice", type: "sub_header", url: null },
|
|
@@ -2141,9 +2276,9 @@ function ci() {
|
|
|
2141
2276
|
{
|
|
2142
2277
|
title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
|
|
2143
2278
|
type: "assignment",
|
|
2144
|
-
url:
|
|
2279
|
+
url: fe(5)
|
|
2145
2280
|
},
|
|
2146
|
-
{ title: "Unit test", type: "quiz", url:
|
|
2281
|
+
{ title: "Unit test", type: "quiz", url: fe(6), status: "locked" }
|
|
2147
2282
|
].map((n, s) => ({
|
|
2148
2283
|
id: String(s + 1),
|
|
2149
2284
|
moduleId: "1",
|
|
@@ -2155,7 +2290,7 @@ function ci() {
|
|
|
2155
2290
|
...n
|
|
2156
2291
|
}));
|
|
2157
2292
|
return {
|
|
2158
|
-
courseId:
|
|
2293
|
+
courseId: le,
|
|
2159
2294
|
modules: [
|
|
2160
2295
|
{
|
|
2161
2296
|
id: "1",
|
|
@@ -2163,7 +2298,7 @@ function ci() {
|
|
|
2163
2298
|
position: 1,
|
|
2164
2299
|
published: !0,
|
|
2165
2300
|
itemCount: t.length,
|
|
2166
|
-
|
|
2301
|
+
prerequisiteModules: [],
|
|
2167
2302
|
requireSequentialProgress: !1
|
|
2168
2303
|
}
|
|
2169
2304
|
],
|
|
@@ -2171,74 +2306,76 @@ function ci() {
|
|
|
2171
2306
|
};
|
|
2172
2307
|
}
|
|
2173
2308
|
export {
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2309
|
+
it as CompletionRequirementSchema,
|
|
2310
|
+
mn as CompletionRequirementTypeSchema,
|
|
2311
|
+
Tt as DEFAULT_INLINE_THRESHOLD,
|
|
2312
|
+
Hn as DEFAULT_ITEM_CONCURRENCY,
|
|
2313
|
+
_t as DEFAULT_ITEM_PAGE_SIZE,
|
|
2314
|
+
H as DEFAULT_LOCALE,
|
|
2315
|
+
Ae as DEFAULT_PAGE_SIZE,
|
|
2316
|
+
wt as DEFAULT_RETAIN_COLLAPSED_LIMIT,
|
|
2317
|
+
Se as DEFAULT_STALE_TIME_MS,
|
|
2318
|
+
ut as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
|
|
2319
|
+
le as FIXTURE_COURSE_ID,
|
|
2320
|
+
to as FilterChips,
|
|
2321
|
+
Bn as GET_MODULES,
|
|
2322
|
+
Gn as GET_MODULE_ITEMS,
|
|
2323
|
+
we as INLINE_ITEM_LIMIT,
|
|
2324
|
+
Le as INLINE_QUERY_NODE_BUDGET,
|
|
2325
|
+
Mn as InMemoryCourseMismatchError,
|
|
2326
|
+
Zr as MODULES_FILTER_IDS,
|
|
2327
|
+
Po as ModuleCard,
|
|
2328
|
+
go as ModuleItemRow,
|
|
2329
|
+
lt as ModuleItemSchema,
|
|
2330
|
+
lo as ModuleItemStatusPill,
|
|
2331
|
+
cn as ModuleItemStatusSchema,
|
|
2332
|
+
un as ModuleItemTypeSchema,
|
|
2333
|
+
bn as ModuleItemsPageSchema,
|
|
2334
|
+
po as ModuleNumberBadge,
|
|
2335
|
+
gn as ModuleProgressSchema,
|
|
2336
|
+
fn as ModuleSchema,
|
|
2337
|
+
io as ModuleStatusPill,
|
|
2338
|
+
dn as ModuleStatusSchema,
|
|
2339
|
+
_i as ModulesConfigProvider,
|
|
2340
|
+
Yn as ModulesConfigSchema,
|
|
2341
|
+
vi as ModulesI18nProvider,
|
|
2342
|
+
ki as ModulesList,
|
|
2343
|
+
hn as ModulesPageSchema,
|
|
2344
|
+
at as PageInfoSchema,
|
|
2345
|
+
dt as PartialCanvasResponseError,
|
|
2346
|
+
pn as PrerequisiteModuleSchema,
|
|
2347
|
+
jn as RegistryEntrySchema,
|
|
2348
|
+
Me as baseModulesConfig,
|
|
2349
|
+
ye as buildFixture,
|
|
2350
|
+
Fi as courseEmpty,
|
|
2351
|
+
qi as courseFatModule,
|
|
2352
|
+
Oi as courseItemLinks,
|
|
2353
|
+
Di as courseLarge,
|
|
2354
|
+
Ri as courseLockReasons,
|
|
2355
|
+
Ni as courseSmall,
|
|
2356
|
+
yi as createCanvasGraphqlAdapter,
|
|
2357
|
+
Si as createInMemoryAdapter,
|
|
2358
|
+
At as createTranslate,
|
|
2359
|
+
Fr as defaultTranslate,
|
|
2360
|
+
Vr as filterLabel,
|
|
2361
|
+
In as getEstimatedDurationMinutes,
|
|
2362
|
+
Ai as invalidateCourse,
|
|
2363
|
+
xi as invalidateModuleItems,
|
|
2364
|
+
Li as invalidateModuleList,
|
|
2365
|
+
W as mergeRegistry,
|
|
2366
|
+
oo as moduleItemStatusLabel,
|
|
2367
|
+
Pt as moduleItemsPrefix,
|
|
2368
|
+
ro as moduleStatusLabel,
|
|
2369
|
+
ie as modulesKeys,
|
|
2370
|
+
Kn as modulesListPrefix,
|
|
2371
|
+
Pi as partialModulesConfig,
|
|
2372
|
+
Wn as registrySchema,
|
|
2373
|
+
Qn as resolveModulesConfig,
|
|
2374
|
+
Ei as useModuleItems,
|
|
2375
|
+
Zn as useModules,
|
|
2376
|
+
Ti as useModulesConfig,
|
|
2377
|
+
N as useModulesI18n,
|
|
2378
|
+
Ci as useModulesPageData,
|
|
2379
|
+
wi as visibleEntries,
|
|
2380
|
+
ct as withEstimatedDurationMinutes
|
|
2244
2381
|
};
|