@instructure/platform-modules 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/canvasGraphql/index.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/normalize.d.ts +5 -0
- package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/queries.d.ts +5 -0
- package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
- package/dist/adapters/inMemory.d.ts.map +1 -1
- package/dist/adapters/types.d.ts +6 -0
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/cache/keys.d.ts +3 -0
- package/dist/cache/keys.d.ts.map +1 -1
- package/dist/chunks/ModulesProgressBar-BFKPmBau.js +2727 -0
- package/dist/components/HighlightedText.d.ts +13 -0
- package/dist/components/HighlightedText.d.ts.map +1 -0
- package/dist/components/ModuleCard.d.ts +1 -0
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +1 -0
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModulesList.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +5 -0
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/ModulesProgressBar.d.ts +3 -2
- package/dist/components/ModulesProgressBar.d.ts.map +1 -1
- package/dist/edit.js +9 -9
- package/dist/hooks/constants.d.ts +2 -0
- package/dist/hooks/constants.d.ts.map +1 -1
- package/dist/hooks/queryOptions.d.ts +2 -0
- package/dist/hooks/queryOptions.d.ts.map +1 -1
- package/dist/hooks/useItemsMode.d.ts +1 -0
- package/dist/hooks/useItemsMode.d.ts.map +1 -1
- package/dist/hooks/useModules.d.ts +1 -0
- package/dist/hooks/useModules.d.ts.map +1 -1
- package/dist/hooks/useModulesPageData.d.ts +11 -0
- package/dist/hooks/useModulesPageData.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1212 -1104
- package/dist/types/domain.d.ts +5 -0
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/types/filterClause.d.ts +1 -0
- package/dist/types/filterClause.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/schemas.d.ts +2 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/locales/en.json +6 -0
- package/package.json +1 -1
- package/dist/chunks/ModulesProgressBar-B1oRo549.js +0 -2548
package/dist/index.js
CHANGED
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import {
|
|
3
|
-
import { canvasFetch as
|
|
4
|
-
import { z as
|
|
5
|
-
import { gql as
|
|
6
|
-
import { jsx as s, jsxs as
|
|
7
|
-
import { Pill as
|
|
8
|
-
import { useQueryClient as
|
|
9
|
-
import { useCallback as
|
|
10
|
-
import { SimpleSelect as
|
|
1
|
+
import { w as ot, I as kn, M as On, a as Dn, b as qn, i as Ct, c as zn, v as lt, h as Nn, o as Ve, m as oe, d as xn, e as $n, g as Fn, f as Un, j as Bn, u as F, k as ke, D as Gn, l as ve, n as Hn, p as at, q as ut, r as Wn, L as Yn, H as jn, s as Qn, t as Kn, x as Vn, y as Zn, z as Ht, A as Xn, B as Wt, C as Yt, E as Jn, F as ei, G as ti, J as ni, K as ii, N as ri, O as si, P as oi, Q as li, R as ai, S as ui, T as di, U as ci, V as we } from "./chunks/ModulesProgressBar-BFKPmBau.js";
|
|
2
|
+
import { ab as Co, W as vo, X as wo, ar as Lo, as as Ao, at as Ro, aI as ko, au as Oo, av as Do, aw as qo, ax as zo, ae as No, a7 as xo, Y as $o, ag as Fo, aa as Uo, aD as Bo, aj as Go, ak as Ho, _ as Wo, aF as Yo, $ as jo, a0 as Qo, a1 as Ko, a2 as Vo, a4 as Zo, a9 as Xo, a3 as Jo, a5 as el, a6 as tl, al as nl, an as il, ac as rl, aH as sl, ad as ol, aJ as ll, af as al, a8 as ul, ah as dl, az as cl, ai as ml, aE as gl, aA as pl, aG as fl, aB as hl, aC as Il, am as Ml, Z as _l, ao as El, ap as Sl, ay as Tl, aq as yl } from "./chunks/ModulesProgressBar-BFKPmBau.js";
|
|
3
|
+
import { canvasFetch as vt } from "@instructure/platform-canvas-fetch";
|
|
4
|
+
import { z as wt } from "zod";
|
|
5
|
+
import { gql as ne } from "graphql-tag";
|
|
6
|
+
import { jsx as s, jsxs as g, Fragment as j } from "react/jsx-runtime";
|
|
7
|
+
import { Pill as mi } from "@instructure/ui-pill/v11_7";
|
|
8
|
+
import { useQueryClient as gi, QueryClient as pi, QueryClientProvider as fi } from "@tanstack/react-query";
|
|
9
|
+
import { useCallback as x, useMemo as W, useId as hi, memo as Ii, useRef as L, useEffect as $, useState as Y, useLayoutEffect as Mi } from "react";
|
|
10
|
+
import { SimpleSelect as Lt } from "@instructure/ui-simple-select/v11_7";
|
|
11
11
|
import { Text as b } from "@instructure/ui-text/v11_7";
|
|
12
|
-
import { IconArrowOpenUpLine as
|
|
13
|
-
import { politeAnnounce as
|
|
14
|
-
import { InstUISettingsProvider as
|
|
15
|
-
import { Alert as
|
|
16
|
-
import { ScreenReaderContent as
|
|
17
|
-
import { IconButton as
|
|
18
|
-
import { Flex as
|
|
19
|
-
import { Heading as
|
|
20
|
-
import { Link as
|
|
21
|
-
import { List as
|
|
22
|
-
import { Pagination as
|
|
23
|
-
import { ProgressBar as
|
|
24
|
-
import { Spinner as
|
|
25
|
-
import { Tooltip as
|
|
12
|
+
import { IconArrowOpenUpLine as _i, IconArrowOpenDownLine as Ei, IconClockLine as jt, IconAiColoredSolid as Si, IconAiSolid as Ti, XInstUIIcon as yi, SearchInstUIIcon as bi } from "@instructure/ui-icons";
|
|
13
|
+
import { politeAnnounce as O, getLiveRegion as Ae, TruncateWithTooltip as Pi } from "@instructure/platform-instui-bindings";
|
|
14
|
+
import { InstUISettingsProvider as Ci } from "@instructure/emotion";
|
|
15
|
+
import { Alert as te } from "@instructure/ui-alerts/v11_7";
|
|
16
|
+
import { ScreenReaderContent as vi } from "@instructure/ui-a11y-content";
|
|
17
|
+
import { IconButton as Qt, CloseButton as wi, Button as N } from "@instructure/ui-buttons/v11_7";
|
|
18
|
+
import { Flex as I } from "@instructure/ui-flex/v11_7";
|
|
19
|
+
import { Heading as Ie } from "@instructure/ui-heading/v11_7";
|
|
20
|
+
import { Link as Li } from "@instructure/ui-link/v11_7";
|
|
21
|
+
import { List as Je, ListItem as et } from "@instructure/ui-list/v11_7";
|
|
22
|
+
import { Pagination as Kt } from "@instructure/ui-pagination/v11_7";
|
|
23
|
+
import { ProgressBar as Ai } from "@instructure/ui-progress/v11_7";
|
|
24
|
+
import { Spinner as dt } from "@instructure/ui-spinner/v11_7";
|
|
25
|
+
import { Tooltip as Ri } from "@instructure/ui-tooltip/v11_7";
|
|
26
26
|
import { View as _ } from "@instructure/ui-view/v11_7";
|
|
27
|
-
import { WithBreakpoints as
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
|
|
27
|
+
import { WithBreakpoints as ki } from "@instructure/platform-with-breakpoints";
|
|
28
|
+
import { TextInput as Oi } from "@instructure/ui-text-input/v11_7";
|
|
29
|
+
import { Modal as Di, ModalHeader as qi, ModalBody as zi, ModalFooter as Ni } from "@instructure/ui-modal/v11_7";
|
|
30
|
+
import { CheckboxGroup as At, Checkbox as Ze } from "@instructure/ui-checkbox/v11_7";
|
|
31
|
+
import { RadioInputGroup as xi, RadioInput as Rt } from "@instructure/ui-radio-input/v11_7";
|
|
32
|
+
import { TextArea as $i } from "@instructure/ui-text-area/v11_7";
|
|
33
|
+
function Vt(e) {
|
|
33
34
|
return e === "module" ? "module" : "module item";
|
|
34
35
|
}
|
|
35
|
-
class
|
|
36
|
-
constructor(t, n,
|
|
36
|
+
class Zt extends Error {
|
|
37
|
+
constructor(t, n, i) {
|
|
37
38
|
super(
|
|
38
|
-
`Canvas returned ${
|
|
39
|
-
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field =
|
|
39
|
+
`Canvas returned ${Vt(t)} ${n} without a usable ${i}. This is a partial response; refusing to guess a value for it.`
|
|
40
|
+
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = i;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function Xt(e, t, n) {
|
|
43
44
|
if (e != null) return e;
|
|
44
|
-
throw new
|
|
45
|
+
throw new Zt(t, n, "published");
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
+
function Fi(e, t) {
|
|
47
48
|
if (e.onUnsupportedItem) {
|
|
48
49
|
e.onUnsupportedItem(t);
|
|
49
50
|
return;
|
|
@@ -52,16 +53,16 @@ function Ti(e, t) {
|
|
|
52
53
|
`[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
|
|
53
54
|
);
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function Jt(e, t) {
|
|
56
57
|
if (e.onUnsupportedStatus) {
|
|
57
58
|
e.onUnsupportedStatus(t);
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
console.warn(
|
|
61
|
-
`[platform-modules] ${
|
|
62
|
+
`[platform-modules] ${Vt(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
|
|
62
63
|
);
|
|
63
64
|
}
|
|
64
|
-
const
|
|
65
|
+
const Ui = /* @__PURE__ */ new Map([
|
|
65
66
|
["Assignment", "assignment"],
|
|
66
67
|
["Quiz", "quiz"],
|
|
67
68
|
["Discussion", "discussion"],
|
|
@@ -73,21 +74,21 @@ const bi = /* @__PURE__ */ new Map([
|
|
|
73
74
|
["SubHeader", "sub_header"],
|
|
74
75
|
["PeerReviewSubAssignment", "assignment"]
|
|
75
76
|
]);
|
|
76
|
-
function
|
|
77
|
+
function Bi(e) {
|
|
77
78
|
const t = e == null ? void 0 : e.__typename;
|
|
78
79
|
if (!t) return null;
|
|
79
|
-
const n =
|
|
80
|
+
const n = Ui.get(t);
|
|
80
81
|
return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
|
|
81
82
|
}
|
|
82
|
-
const
|
|
83
|
-
function
|
|
83
|
+
const Gi = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
|
|
84
|
+
function en(e) {
|
|
84
85
|
if (!e) return null;
|
|
85
|
-
const t =
|
|
86
|
+
const t = Gi.exec(e);
|
|
86
87
|
if (!t) return null;
|
|
87
|
-
const [, n,
|
|
88
|
-
return Math.round(
|
|
88
|
+
const [, n, i, o, r, a] = t, l = Number(n ?? 0) * 7 * 24 * 60 + Number(i ?? 0) * 24 * 60 + Number(o ?? 0) * 60 + Number(r ?? 0) + Number(a ?? 0) / 60;
|
|
89
|
+
return Math.round(l);
|
|
89
90
|
}
|
|
90
|
-
const
|
|
91
|
+
const Hi = /* @__PURE__ */ new Set([
|
|
91
92
|
"must_view",
|
|
92
93
|
"must_mark_done",
|
|
93
94
|
"must_contribute",
|
|
@@ -95,18 +96,18 @@ const vi = /* @__PURE__ */ new Set([
|
|
|
95
96
|
"min_score",
|
|
96
97
|
"min_percentage"
|
|
97
98
|
]);
|
|
98
|
-
function
|
|
99
|
-
return
|
|
99
|
+
function Wi(e) {
|
|
100
|
+
return Hi.has(e) ? e : "unknown";
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
+
function Yi(e) {
|
|
102
103
|
return {
|
|
103
104
|
itemId: String(e.id),
|
|
104
|
-
type:
|
|
105
|
+
type: Wi(e.type),
|
|
105
106
|
minScore: e.minScore ?? null,
|
|
106
107
|
minPercentage: e.minPercentage ?? null
|
|
107
108
|
};
|
|
108
109
|
}
|
|
109
|
-
function
|
|
110
|
+
function tn(e) {
|
|
110
111
|
return {
|
|
111
112
|
hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
|
|
112
113
|
endCursor: (e == null ? void 0 : e.endCursor) ?? null,
|
|
@@ -116,36 +117,36 @@ function Gt(e) {
|
|
|
116
117
|
totalNrOfPages: (e == null ? void 0 : e.totalNrOfPages) ?? null
|
|
117
118
|
};
|
|
118
119
|
}
|
|
119
|
-
const
|
|
120
|
-
function
|
|
120
|
+
const ji = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
|
|
121
|
+
function Qi(e) {
|
|
121
122
|
var t;
|
|
122
123
|
for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
|
|
123
124
|
if (n) return n;
|
|
124
125
|
return null;
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function nn(e, t) {
|
|
127
128
|
if (!e) return;
|
|
128
|
-
const n = new Map(t.map((
|
|
129
|
-
for (const
|
|
130
|
-
if (!
|
|
131
|
-
const
|
|
132
|
-
n.get(
|
|
129
|
+
const n = new Map(t.map((r) => [r.itemId, r.type])), i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
130
|
+
for (const r of e.requirementsMet ?? []) {
|
|
131
|
+
if (!r) continue;
|
|
132
|
+
const a = String(r.id);
|
|
133
|
+
n.get(a) === r.type && i.add(a);
|
|
133
134
|
}
|
|
134
|
-
for (const
|
|
135
|
-
if (!
|
|
136
|
-
const
|
|
137
|
-
n.get(
|
|
135
|
+
for (const r of e.incompleteRequirements ?? []) {
|
|
136
|
+
if (!r) continue;
|
|
137
|
+
const a = String(r.id);
|
|
138
|
+
n.get(a) === r.type && ji.has(r.type) && o.set(a, r.score ?? null);
|
|
138
139
|
}
|
|
139
140
|
return {
|
|
140
141
|
locked: e.locked === !0 || e.workflowState === "locked",
|
|
141
142
|
workflowState: e.workflowState ?? null,
|
|
142
143
|
completed: e.completed === !0 || e.workflowState === "completed",
|
|
143
144
|
started: e.started === !0 || e.workflowState === "started",
|
|
144
|
-
requirementsMetItemIds:
|
|
145
|
+
requirementsMetItemIds: i,
|
|
145
146
|
incompleteRequirementScores: o
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
|
-
const
|
|
149
|
+
const Ki = /* @__PURE__ */ new Map([
|
|
149
150
|
["LOCKED", "locked"],
|
|
150
151
|
["MISSING", "missing"],
|
|
151
152
|
["INCOMPLETE", "incomplete"],
|
|
@@ -153,16 +154,16 @@ const ki = /* @__PURE__ */ new Map([
|
|
|
153
154
|
["IN_PROGRESS", "in_progress"],
|
|
154
155
|
["NOT_STARTED", "not_started"]
|
|
155
156
|
]);
|
|
156
|
-
function
|
|
157
|
+
function Vi(e, t, n) {
|
|
157
158
|
if (e == null) return;
|
|
158
|
-
const
|
|
159
|
-
return
|
|
159
|
+
const i = Ki.get(e);
|
|
160
|
+
return i || Jt(n, {
|
|
160
161
|
subject: "moduleItem",
|
|
161
162
|
id: String(t),
|
|
162
163
|
value: e
|
|
163
|
-
}),
|
|
164
|
+
}), i;
|
|
164
165
|
}
|
|
165
|
-
const
|
|
166
|
+
const Zi = /* @__PURE__ */ new Map([
|
|
166
167
|
["LOCKED", "locked"],
|
|
167
168
|
["MISSING", "missing"],
|
|
168
169
|
["MISSING_AND_INCOMPLETE", "missing_and_incomplete"],
|
|
@@ -171,123 +172,129 @@ const qi = /* @__PURE__ */ new Map([
|
|
|
171
172
|
["IN_PROGRESS", "in_progress"],
|
|
172
173
|
["NOT_STARTED", "not_started"]
|
|
173
174
|
]);
|
|
174
|
-
function
|
|
175
|
+
function Xi(e, t, n) {
|
|
175
176
|
if (e == null) return;
|
|
176
|
-
const
|
|
177
|
-
return
|
|
177
|
+
const i = Zi.get(e);
|
|
178
|
+
return i || Jt(n, { subject: "module", id: String(t), value: e }), i;
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
-
var
|
|
180
|
+
function Ji(e, t, n, i = {}) {
|
|
181
|
+
var u, c;
|
|
181
182
|
if (!n) return;
|
|
182
|
-
const o = e.requirementCount ?? t.length,
|
|
183
|
-
(
|
|
183
|
+
const o = e.requirementCount ?? t.length, r = Math.min(n.requirementsMetItemIds.size, o), a = ((u = e.submissionStatistics) == null ? void 0 : u.missingAssignmentCount) ?? 0, l = [...n.incompleteRequirementScores.values()].filter(
|
|
184
|
+
(p) => p != null
|
|
184
185
|
).length;
|
|
185
186
|
return {
|
|
186
|
-
status:
|
|
187
|
-
requirementsMet:
|
|
187
|
+
status: Xi(e.moduleStatus, e._id, i) ?? (n.locked ? "locked" : void 0),
|
|
188
|
+
requirementsMet: r,
|
|
188
189
|
requirementCount: o,
|
|
189
|
-
percentComplete: o > 0 ? Math.round(
|
|
190
|
-
nextDueAt: ((
|
|
191
|
-
missingCount:
|
|
192
|
-
incompleteCount:
|
|
190
|
+
percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
|
|
191
|
+
nextDueAt: ((c = e.submissionStatistics) == null ? void 0 : c.nextDueAt) ?? null,
|
|
192
|
+
missingCount: a,
|
|
193
|
+
incompleteCount: l
|
|
193
194
|
};
|
|
194
195
|
}
|
|
195
|
-
function
|
|
196
|
-
var
|
|
197
|
-
const
|
|
198
|
-
if (!
|
|
199
|
-
return
|
|
200
|
-
const
|
|
196
|
+
function er(e, t, n, i = {}, o) {
|
|
197
|
+
var c, p, m;
|
|
198
|
+
const r = String(e._id), a = Bi(e.content);
|
|
199
|
+
if (!a)
|
|
200
|
+
return Fi(i, { id: r, typename: ((c = e.content) == null ? void 0 : c.__typename) ?? null }), null;
|
|
201
|
+
const l = Qi(e.content), u = n.get(r) ?? null;
|
|
201
202
|
return {
|
|
202
|
-
id:
|
|
203
|
+
id: r,
|
|
203
204
|
moduleId: t,
|
|
204
205
|
title: e.title ?? "",
|
|
205
|
-
type:
|
|
206
|
+
type: a,
|
|
206
207
|
position: e.position ?? 0,
|
|
207
208
|
itemNumber: e.itemNumber ?? void 0,
|
|
208
209
|
indent: e.indent ?? 0,
|
|
209
|
-
published:
|
|
210
|
+
published: Xt(e.published, "moduleItem", r),
|
|
210
211
|
url: e.url ?? null,
|
|
211
212
|
newTab: e.newTab ?? !1,
|
|
212
|
-
completionRequirement:
|
|
213
|
-
dueAt: (
|
|
214
|
-
status: o ?
|
|
215
|
-
pointsPossible: ((
|
|
216
|
-
extensions:
|
|
213
|
+
completionRequirement: u,
|
|
214
|
+
dueAt: (l == null ? void 0 : l.cachedDueDate) ?? ((p = e.content) == null ? void 0 : p.dueAt) ?? null,
|
|
215
|
+
status: o ? Vi(e.moduleItemStatus, r, i) ?? (o.locked ? "locked" : void 0) : void 0,
|
|
216
|
+
pointsPossible: ((m = e.content) == null ? void 0 : m.pointsPossible) ?? null,
|
|
217
|
+
extensions: ot(
|
|
217
218
|
void 0,
|
|
218
|
-
|
|
219
|
+
en(e.estimatedDuration)
|
|
219
220
|
)
|
|
220
221
|
};
|
|
221
222
|
}
|
|
222
|
-
function
|
|
223
|
-
const
|
|
224
|
-
for (const
|
|
225
|
-
if (!
|
|
226
|
-
const
|
|
227
|
-
|
|
223
|
+
function rn(e, t, n, i, o) {
|
|
224
|
+
const r = [];
|
|
225
|
+
for (const a of e ?? []) {
|
|
226
|
+
if (!a) continue;
|
|
227
|
+
const l = er(
|
|
228
|
+
a,
|
|
228
229
|
t,
|
|
229
230
|
n,
|
|
230
|
-
|
|
231
|
+
i,
|
|
231
232
|
o
|
|
232
233
|
);
|
|
233
|
-
|
|
234
|
+
l && r.push(l);
|
|
234
235
|
}
|
|
235
|
-
return
|
|
236
|
+
return r;
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function sn(e) {
|
|
238
239
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
239
|
-
for (const
|
|
240
|
-
if (!
|
|
241
|
-
const o =
|
|
240
|
+
for (const i of e ?? []) {
|
|
241
|
+
if (!i) continue;
|
|
242
|
+
const o = Yi(i);
|
|
242
243
|
t.push(o), n.set(o.itemId, o);
|
|
243
244
|
}
|
|
244
245
|
return { list: t, byItemId: n };
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
-
var
|
|
247
|
+
function tr(e, t = {}) {
|
|
248
|
+
var c, p;
|
|
248
249
|
const n = String(e._id);
|
|
249
250
|
if (e.moduleItemsTotalCount == null)
|
|
250
|
-
throw new
|
|
251
|
-
const { list:
|
|
251
|
+
throw new Zt("module", n, "moduleItemsTotalCount");
|
|
252
|
+
const { list: i, byItemId: o } = sn(e.completionRequirements), r = e.moduleItemsConnection, a = r != null && !((c = r.pageInfo) != null && c.hasNextPage), l = nn(e.progression, i), u = a ? rn(r.nodes, n, o, t, l) : void 0;
|
|
252
253
|
return {
|
|
253
254
|
id: n,
|
|
254
255
|
name: e.name ?? "",
|
|
255
256
|
position: e.position ?? 0,
|
|
256
|
-
published:
|
|
257
|
+
published: Xt(e.published, "module", n),
|
|
257
258
|
itemCount: e.moduleItemsTotalCount,
|
|
258
|
-
items:
|
|
259
|
-
estimatedDurationMinutes:
|
|
259
|
+
items: u,
|
|
260
|
+
estimatedDurationMinutes: en(e.estimatedDuration) || void 0,
|
|
260
261
|
unlockAt: e.unlockAt ?? null,
|
|
261
262
|
prerequisiteModules: (e.prerequisites ?? []).filter(
|
|
262
|
-
(
|
|
263
|
-
).map((
|
|
263
|
+
(m) => m != null
|
|
264
|
+
).map((m) => ({ id: String(m.id), name: m.name ?? "" })),
|
|
264
265
|
requirementCount: e.requirementCount ?? null,
|
|
265
266
|
requireSequentialProgress: e.requireSequentialProgress ?? !1,
|
|
266
|
-
completionRequirements:
|
|
267
|
-
progress:
|
|
268
|
-
collapsed: ((
|
|
267
|
+
completionRequirements: i,
|
|
268
|
+
progress: Ji(e, i, l, t),
|
|
269
|
+
collapsed: ((p = e.progression) == null ? void 0 : p.collapsed) ?? null,
|
|
270
|
+
...e.searchMatch ? {
|
|
271
|
+
searchMatch: {
|
|
272
|
+
nameMatched: e.searchMatch.nameMatched,
|
|
273
|
+
matchingItemCount: e.searchMatch.matchingItemCount
|
|
274
|
+
}
|
|
275
|
+
} : {}
|
|
269
276
|
};
|
|
270
277
|
}
|
|
271
|
-
function
|
|
278
|
+
function nr(e, t = {}) {
|
|
272
279
|
var o;
|
|
273
|
-
const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection,
|
|
274
|
-
for (const
|
|
275
|
-
|
|
276
|
-
return { modules:
|
|
280
|
+
const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection, i = [];
|
|
281
|
+
for (const r of (n == null ? void 0 : n.nodes) ?? [])
|
|
282
|
+
r && i.push(tr(r, t));
|
|
283
|
+
return { modules: i, pageInfo: tn(n == null ? void 0 : n.pageInfo) };
|
|
277
284
|
}
|
|
278
|
-
function
|
|
279
|
-
const
|
|
285
|
+
function ir(e, t, n = {}) {
|
|
286
|
+
const i = e == null ? void 0 : e.legacyNode, { list: o, byItemId: r } = sn(i == null ? void 0 : i.completionRequirements), a = i == null ? void 0 : i.moduleItemsConnection, l = nn(i == null ? void 0 : i.progression, o);
|
|
280
287
|
return {
|
|
281
|
-
items:
|
|
282
|
-
pageInfo:
|
|
288
|
+
items: rn(a == null ? void 0 : a.nodes, t, r, n, l),
|
|
289
|
+
pageInfo: tn(a == null ? void 0 : a.pageInfo)
|
|
283
290
|
};
|
|
284
291
|
}
|
|
285
|
-
const
|
|
292
|
+
const rr = ne`
|
|
286
293
|
fragment PlatformModulesSubmissionFields on Submission {
|
|
287
294
|
_id
|
|
288
295
|
cachedDueDate
|
|
289
296
|
}
|
|
290
|
-
`,
|
|
297
|
+
`, on = ne`
|
|
291
298
|
fragment PlatformModulesItemFields on ModuleItem {
|
|
292
299
|
_id
|
|
293
300
|
title
|
|
@@ -336,8 +343,8 @@ const Fi = J`
|
|
|
336
343
|
}
|
|
337
344
|
}
|
|
338
345
|
}
|
|
339
|
-
${
|
|
340
|
-
`,
|
|
346
|
+
${rr}
|
|
347
|
+
`, ln = ne`
|
|
341
348
|
fragment PlatformModulesProgressionFields on ModuleProgression {
|
|
342
349
|
workflowState
|
|
343
350
|
completed
|
|
@@ -357,7 +364,7 @@ const Fi = J`
|
|
|
357
364
|
score
|
|
358
365
|
}
|
|
359
366
|
}
|
|
360
|
-
`,
|
|
367
|
+
`, an = ne`
|
|
361
368
|
fragment PlatformModulesModuleFields on Module {
|
|
362
369
|
_id
|
|
363
370
|
name
|
|
@@ -387,9 +394,13 @@ const Fi = J`
|
|
|
387
394
|
nextDueAt
|
|
388
395
|
missingAssignmentCount
|
|
389
396
|
}
|
|
397
|
+
searchMatch {
|
|
398
|
+
nameMatched
|
|
399
|
+
matchingItemCount
|
|
400
|
+
}
|
|
390
401
|
}
|
|
391
|
-
${
|
|
392
|
-
`,
|
|
402
|
+
${ln}
|
|
403
|
+
`, sr = ne`
|
|
393
404
|
query PlatformModulesGetModules(
|
|
394
405
|
$courseId: ID!
|
|
395
406
|
$first: Int
|
|
@@ -417,8 +428,8 @@ const Fi = J`
|
|
|
417
428
|
}
|
|
418
429
|
}
|
|
419
430
|
}
|
|
420
|
-
${
|
|
421
|
-
`,
|
|
431
|
+
${an}
|
|
432
|
+
`, or = ne`
|
|
422
433
|
query PlatformModulesGetModulesWithItems(
|
|
423
434
|
$courseId: ID!
|
|
424
435
|
$first: Int
|
|
@@ -458,9 +469,9 @@ const Fi = J`
|
|
|
458
469
|
}
|
|
459
470
|
}
|
|
460
471
|
}
|
|
461
|
-
${
|
|
462
|
-
${
|
|
463
|
-
`,
|
|
472
|
+
${an}
|
|
473
|
+
${on}
|
|
474
|
+
`, lr = ne`
|
|
464
475
|
query PlatformModulesGetModuleItems(
|
|
465
476
|
$moduleId: ID!
|
|
466
477
|
$first: Int
|
|
@@ -470,6 +481,7 @@ const Fi = J`
|
|
|
470
481
|
$includeSubmissions: Boolean!
|
|
471
482
|
$includeEstimatedDuration: Boolean!
|
|
472
483
|
$studentId: ID
|
|
484
|
+
$itemsFilter: ModuleItemFilter
|
|
473
485
|
) {
|
|
474
486
|
legacyNode(_id: $moduleId, type: Module) {
|
|
475
487
|
... on Module {
|
|
@@ -482,7 +494,13 @@ const Fi = J`
|
|
|
482
494
|
progression {
|
|
483
495
|
...PlatformModulesProgressionFields
|
|
484
496
|
}
|
|
485
|
-
moduleItemsConnection(
|
|
497
|
+
moduleItemsConnection(
|
|
498
|
+
first: $first
|
|
499
|
+
after: $after
|
|
500
|
+
before: $before
|
|
501
|
+
last: $last
|
|
502
|
+
filter: $itemsFilter
|
|
503
|
+
) {
|
|
486
504
|
nodes {
|
|
487
505
|
...PlatformModulesItemFields
|
|
488
506
|
}
|
|
@@ -498,27 +516,27 @@ const Fi = J`
|
|
|
498
516
|
}
|
|
499
517
|
}
|
|
500
518
|
}
|
|
501
|
-
${
|
|
502
|
-
${
|
|
519
|
+
${on}
|
|
520
|
+
${ln}
|
|
503
521
|
`;
|
|
504
|
-
function
|
|
522
|
+
function un() {
|
|
505
523
|
return new DOMException("The operation was aborted.", "AbortError");
|
|
506
524
|
}
|
|
507
|
-
function
|
|
508
|
-
if (e != null && e.aborted) throw
|
|
525
|
+
function Le(e) {
|
|
526
|
+
if (e != null && e.aborted) throw un();
|
|
509
527
|
}
|
|
510
|
-
function
|
|
511
|
-
return t ? new Promise((n,
|
|
512
|
-
const o = () =>
|
|
513
|
-
t.addEventListener("abort", o, { once: !0 }), e.then(n,
|
|
528
|
+
function kt(e, t) {
|
|
529
|
+
return t ? new Promise((n, i) => {
|
|
530
|
+
const o = () => i(un());
|
|
531
|
+
t.addEventListener("abort", o, { once: !0 }), e.then(n, i).finally(() => t.removeEventListener("abort", o));
|
|
514
532
|
}) : e;
|
|
515
533
|
}
|
|
516
|
-
const
|
|
534
|
+
const Ot = [
|
|
517
535
|
"COMPLETED",
|
|
518
536
|
"INCOMPLETE",
|
|
519
537
|
"IN_PROGRESS",
|
|
520
538
|
"NOT_STARTED"
|
|
521
|
-
],
|
|
539
|
+
], Dt = /* @__PURE__ */ new Map([
|
|
522
540
|
["locked", ["LOCKED"]],
|
|
523
541
|
["missing", ["MISSING"]],
|
|
524
542
|
["missing_and_incomplete", ["MISSING_AND_INCOMPLETE"]],
|
|
@@ -526,24 +544,32 @@ const yt = [
|
|
|
526
544
|
["complete", ["COMPLETE"]],
|
|
527
545
|
["in_progress", ["IN_PROGRESS"]],
|
|
528
546
|
["not_started", ["NOT_STARTED"]]
|
|
529
|
-
]),
|
|
530
|
-
module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] }
|
|
547
|
+
]), ar = {
|
|
548
|
+
module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] },
|
|
549
|
+
search: !0
|
|
531
550
|
};
|
|
532
|
-
function
|
|
551
|
+
function ur(e, t, n) {
|
|
552
|
+
const i = cr(e, t);
|
|
553
|
+
return n ? { ...i, searchTerm: n } : i;
|
|
554
|
+
}
|
|
555
|
+
function dr(e) {
|
|
556
|
+
return e ? { searchTerm: e } : null;
|
|
557
|
+
}
|
|
558
|
+
function cr(e, t) {
|
|
533
559
|
if (!e) return null;
|
|
534
560
|
if (e.target === "module" && e.field === "completionStatus" && e.op === "eq") {
|
|
535
561
|
const n = e.value;
|
|
536
|
-
if (!
|
|
562
|
+
if (!Ot.includes(n))
|
|
537
563
|
throw new Error(
|
|
538
|
-
`"${e.value}" is not a ModuleCompletionStatus (${
|
|
564
|
+
`"${e.value}" is not a ModuleCompletionStatus (${Ot.join(", ")}).`
|
|
539
565
|
);
|
|
540
566
|
return { completionStatus: n };
|
|
541
567
|
}
|
|
542
568
|
if (e.target === "module" && e.field === "moduleStatus" && e.op === "eq") {
|
|
543
|
-
const n = typeof e.value == "string" ?
|
|
569
|
+
const n = typeof e.value == "string" ? Dt.get(e.value) : void 0;
|
|
544
570
|
if (!n)
|
|
545
571
|
throw new Error(
|
|
546
|
-
`"${String(e.value)}" is not a ModuleStatus (${[...
|
|
572
|
+
`"${String(e.value)}" is not a ModuleStatus (${[...Dt.keys()].join(", ")}).`
|
|
547
573
|
);
|
|
548
574
|
return { moduleStatus: n };
|
|
549
575
|
}
|
|
@@ -556,331 +582,334 @@ function Yi(e, t) {
|
|
|
556
582
|
`Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". It compiles module.completionStatus eq, module.moduleStatus eq and module.dueWithinDays within.`
|
|
557
583
|
);
|
|
558
584
|
}
|
|
559
|
-
function
|
|
585
|
+
function Xe(e, t, n) {
|
|
560
586
|
return e.kind === "before" ? { first: null, after: null, before: e.cursor, last: n } : e.kind === "last" ? { first: null, after: null, before: null, last: e.count } : { first: t, after: e.kind === "after" ? e.cursor : null, before: null, last: null };
|
|
561
587
|
}
|
|
562
|
-
function
|
|
588
|
+
function co({
|
|
563
589
|
executeQuery: e,
|
|
564
|
-
inlineItemLimit: t =
|
|
565
|
-
nodeBudget: n =
|
|
566
|
-
onUnsupportedItem:
|
|
590
|
+
inlineItemLimit: t = qn,
|
|
591
|
+
nodeBudget: n = kn,
|
|
592
|
+
onUnsupportedItem: i,
|
|
567
593
|
onUnsupportedStatus: o,
|
|
568
|
-
studentId:
|
|
569
|
-
validate:
|
|
570
|
-
capabilities:
|
|
571
|
-
includeEstimatedDuration:
|
|
594
|
+
studentId: r,
|
|
595
|
+
validate: a = !0,
|
|
596
|
+
capabilities: l = ar,
|
|
597
|
+
includeEstimatedDuration: u = !1
|
|
572
598
|
}) {
|
|
573
|
-
const
|
|
599
|
+
const c = r != null, p = { onUnsupportedItem: i, onUnsupportedStatus: o };
|
|
574
600
|
return {
|
|
575
601
|
inlineNodeBudget: n,
|
|
576
|
-
capabilities:
|
|
602
|
+
capabilities: l,
|
|
577
603
|
async listModules({
|
|
578
|
-
courseId:
|
|
604
|
+
courseId: m,
|
|
579
605
|
page: h = { kind: "first" },
|
|
580
|
-
pageSize:
|
|
581
|
-
includeItems:
|
|
582
|
-
filter:
|
|
583
|
-
dueRange:
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
606
|
+
pageSize: S,
|
|
607
|
+
includeItems: M,
|
|
608
|
+
filter: T,
|
|
609
|
+
dueRange: D,
|
|
610
|
+
search: A,
|
|
611
|
+
inlineItemsFirst: U,
|
|
612
|
+
inlineFirst: y,
|
|
613
|
+
signal: P
|
|
587
614
|
}) {
|
|
588
|
-
|
|
589
|
-
const
|
|
590
|
-
let
|
|
591
|
-
if (
|
|
592
|
-
const
|
|
593
|
-
|
|
594
|
-
|
|
615
|
+
Le(P);
|
|
616
|
+
const Q = ur(T, D, A);
|
|
617
|
+
let B;
|
|
618
|
+
if (M) {
|
|
619
|
+
const q = Math.min(y ?? S, S), G = Math.min(U ?? t, t), K = Math.max(1, Math.min(G, Math.floor(n / q)));
|
|
620
|
+
B = e(
|
|
621
|
+
or,
|
|
595
622
|
{
|
|
596
|
-
courseId:
|
|
597
|
-
...
|
|
598
|
-
itemsFirst:
|
|
599
|
-
includeSubmissions:
|
|
600
|
-
includeEstimatedDuration:
|
|
601
|
-
studentId:
|
|
602
|
-
filter:
|
|
623
|
+
courseId: m,
|
|
624
|
+
...Xe(h, q, S),
|
|
625
|
+
itemsFirst: K,
|
|
626
|
+
includeSubmissions: c,
|
|
627
|
+
includeEstimatedDuration: u,
|
|
628
|
+
studentId: r ?? null,
|
|
629
|
+
filter: Q
|
|
603
630
|
}
|
|
604
631
|
);
|
|
605
632
|
} else
|
|
606
|
-
|
|
607
|
-
courseId:
|
|
608
|
-
...
|
|
609
|
-
includeEstimatedDuration:
|
|
610
|
-
filter:
|
|
633
|
+
B = e(sr, {
|
|
634
|
+
courseId: m,
|
|
635
|
+
...Xe(h, S, S),
|
|
636
|
+
includeEstimatedDuration: u,
|
|
637
|
+
filter: Q
|
|
611
638
|
});
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
const
|
|
615
|
-
return
|
|
639
|
+
const C = await kt(B, P);
|
|
640
|
+
Le(P);
|
|
641
|
+
const R = nr(C, p);
|
|
642
|
+
return a ? Dn.parse(R) : R;
|
|
616
643
|
},
|
|
617
644
|
async listModuleItems({
|
|
618
|
-
moduleId:
|
|
645
|
+
moduleId: m,
|
|
619
646
|
page: h = { kind: "first" },
|
|
620
|
-
pageSize:
|
|
621
|
-
|
|
647
|
+
pageSize: S,
|
|
648
|
+
search: M,
|
|
649
|
+
signal: T
|
|
622
650
|
}) {
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
e(
|
|
626
|
-
moduleId:
|
|
627
|
-
...
|
|
628
|
-
includeSubmissions:
|
|
629
|
-
includeEstimatedDuration:
|
|
630
|
-
studentId:
|
|
651
|
+
Le(T);
|
|
652
|
+
const D = await kt(
|
|
653
|
+
e(lr, {
|
|
654
|
+
moduleId: m,
|
|
655
|
+
...Xe(h, S, S),
|
|
656
|
+
includeSubmissions: c,
|
|
657
|
+
includeEstimatedDuration: u,
|
|
658
|
+
studentId: r ?? null,
|
|
659
|
+
itemsFilter: dr(M)
|
|
631
660
|
}),
|
|
632
|
-
|
|
661
|
+
T
|
|
633
662
|
);
|
|
634
|
-
|
|
635
|
-
const
|
|
636
|
-
return
|
|
663
|
+
Le(T);
|
|
664
|
+
const A = ir(D, m, p);
|
|
665
|
+
return a ? On.parse(A) : A;
|
|
637
666
|
},
|
|
638
667
|
async setModuleCollapsed({
|
|
639
|
-
courseId:
|
|
668
|
+
courseId: m,
|
|
640
669
|
moduleId: h,
|
|
641
|
-
collapsed:
|
|
642
|
-
signal:
|
|
670
|
+
collapsed: S,
|
|
671
|
+
signal: M
|
|
643
672
|
}) {
|
|
644
|
-
await
|
|
673
|
+
await vt(
|
|
645
674
|
{
|
|
646
|
-
path: `/courses/${
|
|
675
|
+
path: `/courses/${m}/modules/${h}/collapse`,
|
|
647
676
|
method: "POST",
|
|
648
|
-
body: { collapse:
|
|
649
|
-
signal:
|
|
677
|
+
body: { collapse: S },
|
|
678
|
+
signal: M
|
|
650
679
|
},
|
|
651
|
-
|
|
680
|
+
wt.unknown()
|
|
652
681
|
);
|
|
653
682
|
},
|
|
654
683
|
async setAllModulesCollapsed({
|
|
655
|
-
courseId:
|
|
684
|
+
courseId: m,
|
|
656
685
|
collapsed: h,
|
|
657
|
-
signal:
|
|
686
|
+
signal: S
|
|
658
687
|
}) {
|
|
659
|
-
await
|
|
688
|
+
await vt(
|
|
660
689
|
{
|
|
661
|
-
path: `/courses/${
|
|
690
|
+
path: `/courses/${m}/collapse_all_modules`,
|
|
662
691
|
method: "POST",
|
|
663
692
|
params: { collapse: h ? 1 : 0 },
|
|
664
|
-
signal:
|
|
693
|
+
signal: S
|
|
665
694
|
},
|
|
666
|
-
|
|
695
|
+
wt.unknown()
|
|
667
696
|
);
|
|
668
697
|
}
|
|
669
698
|
};
|
|
670
699
|
}
|
|
671
|
-
const
|
|
672
|
-
function
|
|
700
|
+
const mo = 1e3;
|
|
701
|
+
function mr({
|
|
673
702
|
queryClient: e,
|
|
674
703
|
courseId: t,
|
|
675
704
|
module: n,
|
|
676
|
-
item:
|
|
705
|
+
item: i
|
|
677
706
|
}) {
|
|
678
707
|
return {
|
|
679
708
|
module: n,
|
|
680
|
-
item:
|
|
709
|
+
item: i,
|
|
681
710
|
invalidateModuleItems: async (o) => {
|
|
682
711
|
await Promise.all([
|
|
683
|
-
|
|
684
|
-
|
|
712
|
+
zn(e, t, o),
|
|
713
|
+
Ct(e, t)
|
|
685
714
|
]);
|
|
686
715
|
},
|
|
687
|
-
invalidateModuleList: () =>
|
|
716
|
+
invalidateModuleList: () => Ct(e, t)
|
|
688
717
|
};
|
|
689
718
|
}
|
|
690
|
-
function
|
|
691
|
-
return
|
|
719
|
+
function go(e, t) {
|
|
720
|
+
return lt(e).filter(
|
|
692
721
|
(n) => n.visible == null || n.visible(t) === !0
|
|
693
722
|
);
|
|
694
723
|
}
|
|
695
|
-
function
|
|
696
|
-
const n = Object.keys(t).filter((o) => !
|
|
724
|
+
function dn(e, t = {}) {
|
|
725
|
+
const n = Object.keys(t).filter((o) => !Nn(e, o));
|
|
697
726
|
if (n.length > 0)
|
|
698
727
|
throw new Error(
|
|
699
728
|
`Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
|
|
700
729
|
);
|
|
701
|
-
const
|
|
702
|
-
formatters:
|
|
703
|
-
itemTypes:
|
|
704
|
-
itemStatuses:
|
|
705
|
-
itemMeta:
|
|
706
|
-
filters:
|
|
707
|
-
moduleActions:
|
|
708
|
-
itemActions:
|
|
709
|
-
navigation:
|
|
710
|
-
permissions:
|
|
730
|
+
const i = {
|
|
731
|
+
formatters: Ve(e.formatters, t.formatters),
|
|
732
|
+
itemTypes: oe(e.itemTypes, t.itemTypes),
|
|
733
|
+
itemStatuses: oe(e.itemStatuses, t.itemStatuses),
|
|
734
|
+
itemMeta: oe(e.itemMeta, t.itemMeta),
|
|
735
|
+
filters: oe(e.filters, t.filters),
|
|
736
|
+
moduleActions: oe(e.moduleActions, t.moduleActions),
|
|
737
|
+
itemActions: oe(e.itemActions, t.itemActions),
|
|
738
|
+
navigation: Ve(e.navigation, t.navigation),
|
|
739
|
+
permissions: Ve(e.permissions, t.permissions),
|
|
711
740
|
notify: t.notify ?? e.notify
|
|
712
741
|
};
|
|
713
|
-
return
|
|
742
|
+
return xn.parse(i), i;
|
|
714
743
|
}
|
|
715
|
-
const
|
|
744
|
+
const gr = "organizeNewPlacement", pr = {
|
|
716
745
|
label: "metaFieldNewPlacementLabel",
|
|
717
746
|
order: 5,
|
|
718
|
-
render: ({ item: e, t }) =>
|
|
719
|
-
},
|
|
720
|
-
itemMeta: { [
|
|
721
|
-
filters:
|
|
747
|
+
render: ({ item: e, t }) => Un(e) ? /* @__PURE__ */ s(mi, { color: "success", children: t("organizeNewItemPill") }) : null
|
|
748
|
+
}, fr = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), hr = (e) => dn(e, {
|
|
749
|
+
itemMeta: { [gr]: pr },
|
|
750
|
+
filters: fr(e.filters),
|
|
722
751
|
formatters: {
|
|
723
|
-
moduleLabel: (t, n, { t:
|
|
724
|
-
if (
|
|
725
|
-
const o =
|
|
726
|
-
return o === 0 ? null :
|
|
752
|
+
moduleLabel: (t, n, { t: i }) => {
|
|
753
|
+
if ($n(n)) return i("organizeNewModuleLabel");
|
|
754
|
+
const o = Fn(n);
|
|
755
|
+
return o === 0 ? null : i("organizeItemsAddedLabel", { count: o });
|
|
727
756
|
}
|
|
728
757
|
}
|
|
729
758
|
});
|
|
730
|
-
function
|
|
731
|
-
return
|
|
759
|
+
function po(e = {}) {
|
|
760
|
+
return dn(Bn, e);
|
|
732
761
|
}
|
|
733
|
-
function
|
|
734
|
-
const t =
|
|
735
|
-
return
|
|
736
|
-
(n,
|
|
762
|
+
function fo(e) {
|
|
763
|
+
const t = gi();
|
|
764
|
+
return x(
|
|
765
|
+
(n, i) => mr({ queryClient: t, courseId: e, module: n, item: i }),
|
|
737
766
|
[t, e]
|
|
738
767
|
);
|
|
739
768
|
}
|
|
740
|
-
const
|
|
741
|
-
not_started:
|
|
742
|
-
in_progress:
|
|
743
|
-
complete:
|
|
744
|
-
missing:
|
|
745
|
-
due_this_week:
|
|
746
|
-
},
|
|
769
|
+
const Ir = {
|
|
770
|
+
not_started: ve.not_started,
|
|
771
|
+
in_progress: ve.in_progress,
|
|
772
|
+
complete: ve.complete,
|
|
773
|
+
missing: ve.missing,
|
|
774
|
+
due_this_week: Gn
|
|
775
|
+
}, Mr = {
|
|
747
776
|
primary: "secondary",
|
|
748
777
|
info: "brand",
|
|
749
778
|
success: "success",
|
|
750
779
|
warning: "warning"
|
|
751
780
|
};
|
|
752
|
-
function
|
|
781
|
+
function _r({
|
|
753
782
|
value: e,
|
|
754
783
|
onChange: t,
|
|
755
784
|
interaction: n = "enabled"
|
|
756
785
|
}) {
|
|
757
|
-
const { t:
|
|
758
|
-
return
|
|
759
|
-
|
|
786
|
+
const { t: i } = F(), o = ke(), r = W(() => lt(o.filters), [o.filters]), a = hi();
|
|
787
|
+
return r.length === 0 ? null : /* @__PURE__ */ s(
|
|
788
|
+
Lt,
|
|
760
789
|
{
|
|
761
|
-
renderLabel:
|
|
790
|
+
renderLabel: i("filterGroupLabel"),
|
|
762
791
|
value: e,
|
|
763
|
-
onChange: (
|
|
764
|
-
|
|
792
|
+
onChange: (l, u) => {
|
|
793
|
+
u.value !== void 0 && t(String(u.value));
|
|
765
794
|
},
|
|
766
795
|
interaction: n,
|
|
767
796
|
"data-testid": "filter-select",
|
|
768
|
-
children:
|
|
769
|
-
const
|
|
797
|
+
children: r.map((l) => {
|
|
798
|
+
const u = Ir[l.key];
|
|
770
799
|
return /* @__PURE__ */ s(
|
|
771
|
-
|
|
800
|
+
Lt.Option,
|
|
772
801
|
{
|
|
773
|
-
id: `${
|
|
774
|
-
value:
|
|
775
|
-
renderBeforeLabel:
|
|
776
|
-
"data-testid": `filter-option-${
|
|
777
|
-
children:
|
|
802
|
+
id: `${a}-${l.key}`,
|
|
803
|
+
value: l.key,
|
|
804
|
+
renderBeforeLabel: u ? /* @__PURE__ */ s(b, { color: Mr[u.tone], children: u.icon }) : void 0,
|
|
805
|
+
"data-testid": `filter-option-${l.key}`,
|
|
806
|
+
children: i(l.label)
|
|
778
807
|
},
|
|
779
|
-
|
|
808
|
+
l.key
|
|
780
809
|
);
|
|
781
810
|
})
|
|
782
811
|
}
|
|
783
812
|
);
|
|
784
813
|
}
|
|
785
|
-
const
|
|
786
|
-
function
|
|
787
|
-
const { t } =
|
|
788
|
-
if (e.length === 1) return /* @__PURE__ */ s(
|
|
814
|
+
const qt = "\0", Er = { textDecoration: "underline dotted", cursor: "help" }, cn = { ...Hn, marginInlineEnd: "0.375rem" };
|
|
815
|
+
function Sr({ names: e }) {
|
|
816
|
+
const { t } = F();
|
|
817
|
+
if (e.length === 1) return /* @__PURE__ */ s(j, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
|
|
789
818
|
const n = t("lockedByPrerequisitesByline", {
|
|
790
819
|
count: e.length,
|
|
791
|
-
prerequisites:
|
|
792
|
-
}), [
|
|
793
|
-
return /* @__PURE__ */
|
|
794
|
-
|
|
795
|
-
/* @__PURE__ */ s(
|
|
820
|
+
prerequisites: qt
|
|
821
|
+
}), [i, ...o] = n.split(qt), r = o.length > 0 ? o.join("") : null;
|
|
822
|
+
return /* @__PURE__ */ g(j, { children: [
|
|
823
|
+
r === null ? null : i,
|
|
824
|
+
/* @__PURE__ */ s(Ri, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
|
|
796
825
|
"span",
|
|
797
826
|
{
|
|
798
827
|
tabIndex: 0,
|
|
799
|
-
style:
|
|
800
|
-
onClick: (
|
|
828
|
+
style: Er,
|
|
829
|
+
onClick: (a) => a.stopPropagation(),
|
|
801
830
|
"data-testid": "module-byline-prerequisites",
|
|
802
|
-
children:
|
|
831
|
+
children: r === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
|
|
803
832
|
}
|
|
804
833
|
) }),
|
|
805
|
-
|
|
834
|
+
r
|
|
806
835
|
] });
|
|
807
836
|
}
|
|
808
|
-
function
|
|
809
|
-
var
|
|
810
|
-
const n =
|
|
811
|
-
let
|
|
812
|
-
|
|
813
|
-
const
|
|
814
|
-
let
|
|
815
|
-
if (
|
|
816
|
-
const h = e.estimatedDurationMinutes ??
|
|
817
|
-
|
|
837
|
+
function Tr({ module: e, today: t }) {
|
|
838
|
+
var m;
|
|
839
|
+
const n = ut(), i = Ht(), o = ((m = e.progress) == null ? void 0 : m.status) === "locked", r = e.unlockAt ?? null, a = e.prerequisiteModules.map((h) => h.name.trim()).filter((h) => h !== ""), l = r !== null && new Date(r) > t;
|
|
840
|
+
let u = null;
|
|
841
|
+
r !== null && l && (o || !e.progress) ? u = n.unlockByline(r, t) : r !== null && !l && !e.progress && (u = n.unlockedByline(r, t));
|
|
842
|
+
const c = o && a.length > 0;
|
|
843
|
+
let p = null;
|
|
844
|
+
if (u === null && !c && !o) {
|
|
845
|
+
const h = e.estimatedDurationMinutes ?? Xn(e.items);
|
|
846
|
+
p = h === null ? null : n.estimatedDurationByline(h);
|
|
818
847
|
}
|
|
819
|
-
return
|
|
820
|
-
/* @__PURE__ */ s("span", { style:
|
|
821
|
-
|
|
822
|
-
] }) : /* @__PURE__ */
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
848
|
+
return u === null && !c && p === null ? null : /* @__PURE__ */ s(_, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: Wt, children: /* @__PURE__ */ s(b, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: p !== null ? /* @__PURE__ */ g(j, { children: [
|
|
849
|
+
/* @__PURE__ */ s("span", { style: cn, children: /* @__PURE__ */ s(jt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
|
|
850
|
+
p
|
|
851
|
+
] }) : /* @__PURE__ */ g(j, { children: [
|
|
852
|
+
u,
|
|
853
|
+
u !== null && c ? /* @__PURE__ */ s("span", { style: Yt, children: " " }) : null,
|
|
854
|
+
c ? /* @__PURE__ */ s("span", { style: u !== null ? i : void 0, children: /* @__PURE__ */ s(Sr, { names: a }) }) : null
|
|
826
855
|
] }) }) }) });
|
|
827
856
|
}
|
|
828
|
-
const
|
|
829
|
-
var n,
|
|
857
|
+
const yr = "#273540", br = "#D7DADE", Pr = "0.25rem", Cr = (e, t) => {
|
|
858
|
+
var n, i, o, r, a;
|
|
830
859
|
return {
|
|
831
|
-
meterColorBrand: ((
|
|
832
|
-
borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ??
|
|
833
|
-
borderColor: ((
|
|
860
|
+
meterColorBrand: ((i = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : i.grey125125) ?? yr,
|
|
861
|
+
borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? Pr),
|
|
862
|
+
borderColor: ((a = (r = t.colors) == null ? void 0 : r.contrasts) == null ? void 0 : a.grey1424) ?? br,
|
|
834
863
|
trackBottomBorderColor: "transparent"
|
|
835
864
|
};
|
|
836
|
-
},
|
|
837
|
-
function
|
|
865
|
+
}, vr = "66.667%", wr = "80px", Lr = 2, Ar = { components: { TruncateText: { fontFamily: "inherit" } } };
|
|
866
|
+
function Rr({
|
|
838
867
|
module: e,
|
|
839
868
|
breakpoints: t
|
|
840
869
|
}) {
|
|
841
|
-
const { t: n } =
|
|
842
|
-
if (!
|
|
843
|
-
const
|
|
844
|
-
return /* @__PURE__ */
|
|
845
|
-
|
|
870
|
+
const { t: n } = F(), i = ut(), o = Ht(), r = e.progress;
|
|
871
|
+
if (!r || r.status === "locked" || r.requirementCount <= 0) return null;
|
|
872
|
+
const a = Object.keys(t).length === 0 || t.desktop === !0, l = ei(e.items);
|
|
873
|
+
return /* @__PURE__ */ g(
|
|
874
|
+
I,
|
|
846
875
|
{
|
|
847
|
-
width:
|
|
876
|
+
width: a ? vr : "100%",
|
|
848
877
|
alignItems: "center",
|
|
849
878
|
gap: "x-small",
|
|
850
879
|
margin: "x-small 0 0 0",
|
|
851
880
|
"data-testid": "module-progress",
|
|
852
881
|
children: [
|
|
853
|
-
/* @__PURE__ */ s(
|
|
854
|
-
|
|
882
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(_, { as: "div", width: wr, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
|
|
883
|
+
Ai,
|
|
855
884
|
{
|
|
856
885
|
size: "x-small",
|
|
857
886
|
meterColor: "brand",
|
|
858
|
-
valueNow:
|
|
859
|
-
valueMax:
|
|
887
|
+
valueNow: r.requirementsMet,
|
|
888
|
+
valueMax: r.requirementCount,
|
|
860
889
|
shouldAnimate: !1,
|
|
861
890
|
screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
|
|
862
891
|
formatScreenReaderValue: () => {
|
|
863
|
-
const
|
|
892
|
+
const u = ti(
|
|
864
893
|
n,
|
|
865
|
-
|
|
866
|
-
|
|
894
|
+
r.requirementsMet,
|
|
895
|
+
r.requirementCount
|
|
867
896
|
);
|
|
868
|
-
return
|
|
897
|
+
return l === null ? u : `${u}, ${i.remainingDurationByline(l)}`;
|
|
869
898
|
},
|
|
870
|
-
themeOverride:
|
|
899
|
+
themeOverride: Cr
|
|
871
900
|
}
|
|
872
901
|
) }) }),
|
|
873
|
-
/* @__PURE__ */ s(
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
902
|
+
/* @__PURE__ */ s(I.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: Wt, children: /* @__PURE__ */ g(b, { variant: "contentSmall", color: "secondary", children: [
|
|
903
|
+
i.progress(
|
|
904
|
+
r.percentComplete,
|
|
905
|
+
r.requirementsMet,
|
|
906
|
+
r.requirementCount
|
|
878
907
|
),
|
|
879
|
-
|
|
880
|
-
/* @__PURE__ */ s("span", { style:
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */ s("span", { style:
|
|
883
|
-
|
|
908
|
+
l !== null ? /* @__PURE__ */ g(j, { children: [
|
|
909
|
+
/* @__PURE__ */ s("span", { style: Yt, children: " " }),
|
|
910
|
+
/* @__PURE__ */ g("span", { style: o, children: [
|
|
911
|
+
/* @__PURE__ */ s("span", { style: cn, children: /* @__PURE__ */ s(jt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
|
|
912
|
+
i.remainingDurationByline(l)
|
|
884
913
|
] })
|
|
885
914
|
] }) : null
|
|
886
915
|
] }) }) })
|
|
@@ -888,35 +917,36 @@ function mr({
|
|
|
888
917
|
}
|
|
889
918
|
);
|
|
890
919
|
}
|
|
891
|
-
const
|
|
892
|
-
function
|
|
920
|
+
const zt = (e) => `platform-modules-panel-${e}`;
|
|
921
|
+
function tt(e) {
|
|
893
922
|
return e !== void 0 && e.type !== "sub_header";
|
|
894
923
|
}
|
|
895
|
-
function
|
|
896
|
-
return
|
|
924
|
+
function Nt(e) {
|
|
925
|
+
return tt(e) && e.indent > 0;
|
|
897
926
|
}
|
|
898
|
-
function
|
|
927
|
+
function kr(e, t) {
|
|
899
928
|
let n = t;
|
|
900
|
-
return e.map((
|
|
901
|
-
if (
|
|
902
|
-
return n =
|
|
929
|
+
return e.map((i) => {
|
|
930
|
+
if (i.type !== "sub_header")
|
|
931
|
+
return n = i.itemNumber ?? n + 1, n;
|
|
903
932
|
});
|
|
904
933
|
}
|
|
905
|
-
function
|
|
934
|
+
function Or({
|
|
906
935
|
module: e,
|
|
907
936
|
state: t,
|
|
908
937
|
today: n,
|
|
909
|
-
showDiagnostics:
|
|
938
|
+
showDiagnostics: i,
|
|
910
939
|
stackPill: o,
|
|
911
|
-
moduleLabel:
|
|
940
|
+
moduleLabel: r,
|
|
941
|
+
searchTerm: a
|
|
912
942
|
}) {
|
|
913
|
-
const { t: l } =
|
|
914
|
-
|
|
915
|
-
if (!
|
|
916
|
-
const
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
loaded:
|
|
943
|
+
const { t: l } = F(), u = at(), c = L(null), p = kr(t.items, t.itemOffset), m = t.items.length, h = !t.isLoading && !t.isRefreshing;
|
|
944
|
+
$(() => {
|
|
945
|
+
if (!h || m === 0 || c.current === t.page) return;
|
|
946
|
+
const M = c.current === null;
|
|
947
|
+
c.current = t.page, O(
|
|
948
|
+
M ? l("itemsLoadedAnnouncement", {
|
|
949
|
+
loaded: m,
|
|
920
950
|
count: e.itemCount,
|
|
921
951
|
name: e.name
|
|
922
952
|
}) : l("itemsPageChangedAnnouncement", {
|
|
@@ -925,26 +955,26 @@ function pr({
|
|
|
925
955
|
name: e.name
|
|
926
956
|
})
|
|
927
957
|
);
|
|
928
|
-
}, [
|
|
929
|
-
const
|
|
930
|
-
u("paginate-items"),
|
|
958
|
+
}, [h, m, t.page, t.pageCount, e.itemCount, e.name, l]);
|
|
959
|
+
const S = (M) => {
|
|
960
|
+
u("paginate-items"), M === 1 ? t.goToFirstPage() : M === t.page - 1 ? t.goToPreviousPage() : M === t.page + 1 ? t.goToNextPage() : M === t.pageCount && t.goToLastPage();
|
|
931
961
|
};
|
|
932
962
|
return t.error ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
|
|
933
|
-
|
|
963
|
+
te,
|
|
934
964
|
{
|
|
935
965
|
variant: "error",
|
|
936
966
|
margin: "0",
|
|
937
|
-
liveRegion:
|
|
967
|
+
liveRegion: Ae,
|
|
938
968
|
liveRegionPoliteness: "assertive",
|
|
939
969
|
"data-testid": "items-error",
|
|
940
970
|
children: l("itemsLoadErrorAlert", { message: t.error.message })
|
|
941
971
|
}
|
|
942
|
-
) }) : t.isLoading ? /* @__PURE__ */
|
|
943
|
-
/* @__PURE__ */ s(
|
|
972
|
+
) }) : t.isLoading ? /* @__PURE__ */ g(_, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
|
|
973
|
+
/* @__PURE__ */ s(dt, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
|
|
944
974
|
" ",
|
|
945
975
|
/* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("itemsLoadingText") })
|
|
946
|
-
] }) : /* @__PURE__ */
|
|
947
|
-
|
|
976
|
+
] }) : /* @__PURE__ */ g(_, { as: "div", margin: "small 0 0 0", children: [
|
|
977
|
+
i ? /* @__PURE__ */ g(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
|
|
948
978
|
"items source: ",
|
|
949
979
|
t.source,
|
|
950
980
|
" · page ",
|
|
@@ -952,89 +982,98 @@ function pr({
|
|
|
952
982
|
" of ",
|
|
953
983
|
t.pageCount
|
|
954
984
|
] }) : null,
|
|
955
|
-
t.items.length === 0 ? /* @__PURE__ */ s(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(
|
|
956
|
-
|
|
985
|
+
t.items.length === 0 ? /* @__PURE__ */ s(_, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Je, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((M, T) => /* @__PURE__ */ s(et, { children: /* @__PURE__ */ s(
|
|
986
|
+
ni,
|
|
957
987
|
{
|
|
958
|
-
item:
|
|
988
|
+
item: M,
|
|
959
989
|
today: n,
|
|
960
|
-
attachedAbove:
|
|
961
|
-
attachedBelow:
|
|
990
|
+
attachedAbove: Nt(M) && tt(t.items[T - 1]),
|
|
991
|
+
attachedBelow: tt(M) && Nt(t.items[T + 1]),
|
|
962
992
|
stackPill: o,
|
|
963
|
-
moduleLabel:
|
|
964
|
-
itemNumber:
|
|
993
|
+
moduleLabel: r,
|
|
994
|
+
itemNumber: p[T],
|
|
995
|
+
searchTerm: a
|
|
965
996
|
}
|
|
966
|
-
) },
|
|
997
|
+
) }, M.id)) }),
|
|
967
998
|
t.pageCount > 1 ? /* @__PURE__ */ s(
|
|
968
|
-
|
|
999
|
+
Kt,
|
|
969
1000
|
{
|
|
970
1001
|
as: "nav",
|
|
971
1002
|
variant: "compact",
|
|
972
1003
|
withFirstAndLastButton: !0,
|
|
973
1004
|
margin: "small 0 0 0",
|
|
974
|
-
label: /* @__PURE__ */ s(
|
|
1005
|
+
label: /* @__PURE__ */ s(vi, { children: l("itemsPaginationLabel", { name: e.name }) }),
|
|
975
1006
|
labelFirst: l("paginationFirstPage"),
|
|
976
1007
|
labelPrev: l("paginationPreviousPage"),
|
|
977
1008
|
labelNext: l("paginationNextPage"),
|
|
978
1009
|
labelLast: l("paginationLastPage"),
|
|
979
|
-
screenReaderLabelPageButton: (
|
|
1010
|
+
screenReaderLabelPageButton: (M) => l("paginationPageLabel", { page: M }),
|
|
980
1011
|
ellipsis: l("paginationEllipsis"),
|
|
981
1012
|
totalPageNumber: t.pageCount,
|
|
982
1013
|
currentPage: t.page,
|
|
983
1014
|
disabled: t.isRefreshing,
|
|
984
|
-
onPageChange:
|
|
1015
|
+
onPageChange: S,
|
|
985
1016
|
"data-testid": "items-pagination"
|
|
986
1017
|
}
|
|
987
1018
|
) : null
|
|
988
1019
|
] });
|
|
989
1020
|
}
|
|
990
|
-
function
|
|
1021
|
+
function Dr({
|
|
991
1022
|
module: e,
|
|
992
1023
|
expanded: t,
|
|
993
1024
|
onToggle: n,
|
|
994
|
-
itemsState:
|
|
1025
|
+
itemsState: i,
|
|
995
1026
|
today: o,
|
|
996
|
-
showDiagnostics:
|
|
997
|
-
headingLevel:
|
|
998
|
-
moduleLabel:
|
|
999
|
-
breakpoints:
|
|
1000
|
-
toggleRef:
|
|
1027
|
+
showDiagnostics: r = !1,
|
|
1028
|
+
headingLevel: a = "h3",
|
|
1029
|
+
moduleLabel: l,
|
|
1030
|
+
breakpoints: u = {},
|
|
1031
|
+
toggleRef: c,
|
|
1032
|
+
searchTerm: p
|
|
1001
1033
|
}) {
|
|
1002
|
-
var
|
|
1003
|
-
const { t:
|
|
1004
|
-
|
|
1034
|
+
var V, ue, de, ce, _e;
|
|
1035
|
+
const { t: m, timezone: h } = F(), S = at(), M = ut(), { navigation: T } = ke(), D = Wn(), A = ((V = e.progress) == null ? void 0 : V.status) === "locked", U = A ? null : ((ue = T.getModuleHref) == null ? void 0 : ue.call(T, e)) ?? null, y = l === void 0 ? M.moduleLabel(e.position, e) : l, P = (y == null ? void 0 : y.trim()) || null, Q = P ? m("moduleNameWithLabel", { label: P, name: e.name }) : e.name, B = p ? P ? /* @__PURE__ */ s(
|
|
1036
|
+
Yn,
|
|
1037
|
+
{
|
|
1038
|
+
render: (z) => m("moduleNameWithLabel", { label: P, name: z }),
|
|
1039
|
+
name: e.name,
|
|
1040
|
+
term: p
|
|
1041
|
+
}
|
|
1042
|
+
) : /* @__PURE__ */ s(jn, { text: e.name, term: p }) : Q, R = /* @__PURE__ */ s(
|
|
1043
|
+
Ie,
|
|
1005
1044
|
{
|
|
1006
|
-
level:
|
|
1045
|
+
level: a,
|
|
1007
1046
|
variant: "titleCardMini",
|
|
1008
|
-
color:
|
|
1009
|
-
"aria-label":
|
|
1047
|
+
color: A ? "secondary" : "primary",
|
|
1048
|
+
"aria-label": Q,
|
|
1010
1049
|
"data-testid": "module-name",
|
|
1011
|
-
children: /* @__PURE__ */ s(
|
|
1050
|
+
children: /* @__PURE__ */ s(Ci, { themeOverride: Ar, children: /* @__PURE__ */ s(Pi, { linesAllowed: Lr, children: B }) })
|
|
1012
1051
|
}
|
|
1013
|
-
),
|
|
1014
|
-
|
|
1052
|
+
), q = U ? /* @__PURE__ */ s(
|
|
1053
|
+
Li,
|
|
1015
1054
|
{
|
|
1016
|
-
href:
|
|
1055
|
+
href: U,
|
|
1017
1056
|
display: "inline-block",
|
|
1018
1057
|
forceButtonRole: !1,
|
|
1019
|
-
variant:
|
|
1020
|
-
"aria-label":
|
|
1021
|
-
onClick: (
|
|
1022
|
-
children:
|
|
1058
|
+
variant: D,
|
|
1059
|
+
"aria-label": Q,
|
|
1060
|
+
onClick: (z) => z.stopPropagation(),
|
|
1061
|
+
children: R
|
|
1023
1062
|
}
|
|
1024
|
-
) :
|
|
1025
|
-
|
|
1026
|
-
},
|
|
1027
|
-
var
|
|
1028
|
-
(
|
|
1029
|
-
},
|
|
1030
|
-
|
|
1063
|
+
) : R, G = (((de = e.completionRequirements) == null ? void 0 : de.length) ?? 0) > 0 ? /* @__PURE__ */ s(Qn, {}) : null, K = u.mobileOnly === !0, Z = () => {
|
|
1064
|
+
S(t ? "module-collapse" : "module-expand"), n(e.id);
|
|
1065
|
+
}, ie = () => {
|
|
1066
|
+
var z;
|
|
1067
|
+
(z = window.getSelection()) != null && z.toString().trim() || Z();
|
|
1068
|
+
}, w = (ce = e.progress) != null && ce.status ? /* @__PURE__ */ s(
|
|
1069
|
+
Kn,
|
|
1031
1070
|
{
|
|
1032
1071
|
status: e.progress.status,
|
|
1033
1072
|
missingCount: e.progress.missingCount,
|
|
1034
1073
|
incompleteCount: e.progress.incompleteCount
|
|
1035
1074
|
}
|
|
1036
|
-
) : null,
|
|
1037
|
-
return /* @__PURE__ */
|
|
1075
|
+
) : null, X = ((_e = e.progress) == null ? void 0 : _e.status) !== void 0 && e.progress.status !== "complete" && !A && Vn(e.progress.nextDueAt, o, h) ? /* @__PURE__ */ s(Jn, {}) : null;
|
|
1076
|
+
return /* @__PURE__ */ g(
|
|
1038
1077
|
_,
|
|
1039
1078
|
{
|
|
1040
1079
|
as: "div",
|
|
@@ -1046,106 +1085,107 @@ function fr({
|
|
|
1046
1085
|
margin: "0 0 small 0",
|
|
1047
1086
|
"data-testid": `module-card-${e.id}`,
|
|
1048
1087
|
children: [
|
|
1049
|
-
/* @__PURE__ */ s(_, { as: "div", cursor: "pointer", children: /* @__PURE__ */
|
|
1050
|
-
|
|
1088
|
+
/* @__PURE__ */ s(_, { as: "div", cursor: "pointer", children: /* @__PURE__ */ g(
|
|
1089
|
+
I,
|
|
1051
1090
|
{
|
|
1052
1091
|
alignItems: "start",
|
|
1053
1092
|
gap: "mediumSmall",
|
|
1054
|
-
onClick:
|
|
1093
|
+
onClick: ie,
|
|
1055
1094
|
"data-testid": "module-header",
|
|
1056
1095
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1059
|
-
/* @__PURE__ */ s(_, { as: "div", children:
|
|
1060
|
-
/* @__PURE__ */ s(
|
|
1061
|
-
/* @__PURE__ */ s(
|
|
1062
|
-
] }) :
|
|
1063
|
-
e.published ? null : /* @__PURE__ */
|
|
1096
|
+
/* @__PURE__ */ g(I.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1097
|
+
/* @__PURE__ */ g(_, { as: "div", children: [
|
|
1098
|
+
/* @__PURE__ */ s(_, { as: "div", children: G ? /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", wrap: "wrap", children: [
|
|
1099
|
+
/* @__PURE__ */ s(I.Item, { shouldShrink: !0, children: q }),
|
|
1100
|
+
/* @__PURE__ */ s(I.Item, { children: G })
|
|
1101
|
+
] }) : q }),
|
|
1102
|
+
e.published ? null : /* @__PURE__ */ g(b, { size: "x-small", color: "secondary", children: [
|
|
1064
1103
|
" ",
|
|
1065
|
-
|
|
1104
|
+
m("moduleUnpublishedBadge")
|
|
1066
1105
|
] })
|
|
1067
1106
|
] }),
|
|
1068
|
-
/* @__PURE__ */ s(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1107
|
+
/* @__PURE__ */ s(Tr, { module: e, today: o }),
|
|
1108
|
+
K && (w || X) ? /* @__PURE__ */ s(_, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ g(I, { gap: "x-small", wrap: "wrap", children: [
|
|
1109
|
+
X ? /* @__PURE__ */ s(I.Item, { children: X }) : null,
|
|
1110
|
+
w ? /* @__PURE__ */ s(I.Item, { children: w }) : null
|
|
1072
1111
|
] }) }) : null,
|
|
1073
|
-
/* @__PURE__ */ s(
|
|
1112
|
+
/* @__PURE__ */ s(Rr, { module: e, breakpoints: u })
|
|
1074
1113
|
] }),
|
|
1075
|
-
/* @__PURE__ */ s(
|
|
1076
|
-
!
|
|
1077
|
-
|
|
1078
|
-
|
|
1114
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "mediumSmall", children: [
|
|
1115
|
+
!K && (X || w) ? /* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", children: [
|
|
1116
|
+
X ? /* @__PURE__ */ s(I.Item, { children: X }) : null,
|
|
1117
|
+
w ? /* @__PURE__ */ s(I.Item, { children: w }) : null
|
|
1079
1118
|
] }) }) : null,
|
|
1080
|
-
/* @__PURE__ */ s(
|
|
1081
|
-
|
|
1119
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(
|
|
1120
|
+
Qt,
|
|
1082
1121
|
{
|
|
1083
|
-
elementRef: (
|
|
1122
|
+
elementRef: (z) => c == null ? void 0 : c(e.id, z),
|
|
1084
1123
|
size: "medium",
|
|
1085
1124
|
withBorder: !0,
|
|
1086
1125
|
withBackground: !1,
|
|
1087
|
-
screenReaderLabel: t ?
|
|
1126
|
+
screenReaderLabel: t ? m("collapseModule", { name: e.name }) : m("expandModule", { name: e.name }),
|
|
1088
1127
|
"aria-expanded": t,
|
|
1089
|
-
"aria-controls":
|
|
1090
|
-
onClick: (
|
|
1091
|
-
|
|
1128
|
+
"aria-controls": zt(e.id),
|
|
1129
|
+
onClick: (z) => {
|
|
1130
|
+
z.stopPropagation(), Z();
|
|
1092
1131
|
},
|
|
1093
1132
|
"data-testid": `toggle-module-${e.id}`,
|
|
1094
|
-
children: t ? /* @__PURE__ */ s(
|
|
1133
|
+
children: t ? /* @__PURE__ */ s(_i, {}) : /* @__PURE__ */ s(Ei, {})
|
|
1095
1134
|
}
|
|
1096
1135
|
) })
|
|
1097
1136
|
] }) })
|
|
1098
1137
|
]
|
|
1099
1138
|
}
|
|
1100
1139
|
) }),
|
|
1101
|
-
/* @__PURE__ */ s("div", { id:
|
|
1102
|
-
|
|
1140
|
+
/* @__PURE__ */ s("div", { id: zt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
|
|
1141
|
+
Or,
|
|
1103
1142
|
{
|
|
1104
1143
|
module: e,
|
|
1105
|
-
state:
|
|
1144
|
+
state: i,
|
|
1106
1145
|
today: o,
|
|
1107
|
-
showDiagnostics:
|
|
1108
|
-
stackPill:
|
|
1109
|
-
moduleLabel:
|
|
1146
|
+
showDiagnostics: r,
|
|
1147
|
+
stackPill: K,
|
|
1148
|
+
moduleLabel: Zn(e) ? null : P,
|
|
1149
|
+
searchTerm: p
|
|
1110
1150
|
}
|
|
1111
1151
|
) : null })
|
|
1112
1152
|
]
|
|
1113
1153
|
}
|
|
1114
1154
|
);
|
|
1115
1155
|
}
|
|
1116
|
-
const
|
|
1156
|
+
const qr = Ii(Dr), ho = ["place_new", "reorganize_all"], mn = ["assignment", "discussion", "quiz", "page", "file"], nt = 1e3, zr = () => ({
|
|
1117
1157
|
mode: "place_new",
|
|
1118
|
-
contentTypes: [...
|
|
1158
|
+
contentTypes: [...mn],
|
|
1119
1159
|
setPrerequisites: !0,
|
|
1120
1160
|
setRequirements: !0,
|
|
1121
1161
|
direction: ""
|
|
1122
1162
|
});
|
|
1123
|
-
function
|
|
1163
|
+
function Nr(e, t) {
|
|
1124
1164
|
return e(t === "assignment" ? "itemTypeAssignment" : t === "discussion" ? "itemTypeDiscussion" : t === "quiz" ? "itemTypeQuiz" : t === "page" ? "itemTypePage" : "itemTypeFile");
|
|
1125
1165
|
}
|
|
1126
|
-
const
|
|
1127
|
-
...e.setPrerequisites ? [
|
|
1128
|
-
...e.setRequirements ? [
|
|
1166
|
+
const it = "prerequisites", rt = "requirements", xr = (e) => [
|
|
1167
|
+
...e.setPrerequisites ? [it] : [],
|
|
1168
|
+
...e.setRequirements ? [rt] : []
|
|
1129
1169
|
];
|
|
1130
|
-
function
|
|
1170
|
+
function $r({
|
|
1131
1171
|
input: e,
|
|
1132
1172
|
errors: t,
|
|
1133
1173
|
onChange: n,
|
|
1134
|
-
disabled:
|
|
1174
|
+
disabled: i = !1
|
|
1135
1175
|
}) {
|
|
1136
|
-
const { t: o } =
|
|
1137
|
-
return /* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
|
|
1176
|
+
const { t: o } = F();
|
|
1177
|
+
return /* @__PURE__ */ g(_, { as: "div", "data-testid": "organize-form", children: [
|
|
1178
|
+
/* @__PURE__ */ g(
|
|
1179
|
+
xi,
|
|
1140
1180
|
{
|
|
1141
1181
|
name: "organize-mode",
|
|
1142
1182
|
value: e.mode,
|
|
1143
|
-
onChange: (
|
|
1183
|
+
onChange: (r, a) => n({ mode: a }),
|
|
1144
1184
|
description: o("organizeModeLegend"),
|
|
1145
|
-
disabled:
|
|
1185
|
+
disabled: i,
|
|
1146
1186
|
children: [
|
|
1147
1187
|
/* @__PURE__ */ s(
|
|
1148
|
-
|
|
1188
|
+
Rt,
|
|
1149
1189
|
{
|
|
1150
1190
|
value: "place_new",
|
|
1151
1191
|
label: o("organizeModePlaceNew"),
|
|
@@ -1153,7 +1193,7 @@ function Er({
|
|
|
1153
1193
|
}
|
|
1154
1194
|
),
|
|
1155
1195
|
/* @__PURE__ */ s(
|
|
1156
|
-
|
|
1196
|
+
Rt,
|
|
1157
1197
|
{
|
|
1158
1198
|
value: "reorganize_all",
|
|
1159
1199
|
label: o("organizeModeReorganizeAll"),
|
|
@@ -1163,400 +1203,400 @@ function Er({
|
|
|
1163
1203
|
]
|
|
1164
1204
|
}
|
|
1165
1205
|
),
|
|
1166
|
-
e.mode === "reorganize_all" ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
|
|
1206
|
+
e.mode === "reorganize_all" ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(te, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
|
|
1167
1207
|
/* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ s(
|
|
1168
|
-
|
|
1208
|
+
At,
|
|
1169
1209
|
{
|
|
1170
1210
|
name: "organize-content-types",
|
|
1171
1211
|
value: [...e.contentTypes],
|
|
1172
|
-
onChange: (
|
|
1212
|
+
onChange: (r) => n({ contentTypes: r }),
|
|
1173
1213
|
description: o("organizeContentTypesLegend"),
|
|
1174
1214
|
messages: t.contentTypes ? [{ type: "newError", text: o("organizeErrorPickAContentType") }] : void 0,
|
|
1175
1215
|
layout: "columns",
|
|
1176
|
-
children:
|
|
1177
|
-
|
|
1216
|
+
children: mn.map((r) => /* @__PURE__ */ s(
|
|
1217
|
+
Ze,
|
|
1178
1218
|
{
|
|
1179
|
-
value:
|
|
1180
|
-
label:
|
|
1181
|
-
disabled:
|
|
1182
|
-
"data-testid": `organize-content-type-${
|
|
1219
|
+
value: r,
|
|
1220
|
+
label: Nr(o, r),
|
|
1221
|
+
disabled: i,
|
|
1222
|
+
"data-testid": `organize-content-type-${r}`
|
|
1183
1223
|
},
|
|
1184
|
-
|
|
1224
|
+
r
|
|
1185
1225
|
))
|
|
1186
1226
|
}
|
|
1187
1227
|
) }),
|
|
1188
|
-
/* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */
|
|
1189
|
-
|
|
1228
|
+
/* @__PURE__ */ s(_, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ g(
|
|
1229
|
+
At,
|
|
1190
1230
|
{
|
|
1191
1231
|
name: "organize-progression",
|
|
1192
|
-
value:
|
|
1193
|
-
onChange: (
|
|
1194
|
-
setPrerequisites:
|
|
1195
|
-
setRequirements:
|
|
1232
|
+
value: xr(e),
|
|
1233
|
+
onChange: (r) => n({
|
|
1234
|
+
setPrerequisites: r.includes(it),
|
|
1235
|
+
setRequirements: r.includes(rt)
|
|
1196
1236
|
}),
|
|
1197
1237
|
description: o("organizeProgressionLegend"),
|
|
1198
1238
|
children: [
|
|
1199
1239
|
/* @__PURE__ */ s(
|
|
1200
|
-
|
|
1240
|
+
Ze,
|
|
1201
1241
|
{
|
|
1202
|
-
value:
|
|
1242
|
+
value: it,
|
|
1203
1243
|
label: o("organizeSetPrerequisites"),
|
|
1204
|
-
disabled:
|
|
1244
|
+
disabled: i,
|
|
1205
1245
|
"data-testid": "organize-set-prerequisites"
|
|
1206
1246
|
}
|
|
1207
1247
|
),
|
|
1208
1248
|
/* @__PURE__ */ s(
|
|
1209
|
-
|
|
1249
|
+
Ze,
|
|
1210
1250
|
{
|
|
1211
|
-
value:
|
|
1251
|
+
value: rt,
|
|
1212
1252
|
label: o("organizeSetRequirements"),
|
|
1213
|
-
disabled:
|
|
1253
|
+
disabled: i,
|
|
1214
1254
|
"data-testid": "organize-set-requirements"
|
|
1215
1255
|
}
|
|
1216
1256
|
)
|
|
1217
1257
|
]
|
|
1218
1258
|
}
|
|
1219
1259
|
) }),
|
|
1220
|
-
/* @__PURE__ */
|
|
1260
|
+
/* @__PURE__ */ g(_, { as: "div", margin: "medium 0 0 0", children: [
|
|
1221
1261
|
/* @__PURE__ */ s(
|
|
1222
|
-
|
|
1262
|
+
$i,
|
|
1223
1263
|
{
|
|
1224
1264
|
label: o("organizeDirectionLabel"),
|
|
1225
1265
|
placeholder: o("organizeDirectionPlaceholder"),
|
|
1226
1266
|
value: e.direction,
|
|
1227
|
-
onChange: (
|
|
1228
|
-
disabled:
|
|
1267
|
+
onChange: (r) => n({ direction: r.target.value.slice(0, nt) }),
|
|
1268
|
+
disabled: i,
|
|
1229
1269
|
height: "6rem",
|
|
1230
1270
|
"data-testid": "organize-direction"
|
|
1231
1271
|
}
|
|
1232
1272
|
),
|
|
1233
1273
|
/* @__PURE__ */ s(_, { as: "div", textAlign: "end", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s(b, { size: "x-small", color: "secondary", "data-testid": "organize-direction-count", children: o("organizeDirectionCount", {
|
|
1234
1274
|
used: e.direction.length,
|
|
1235
|
-
max:
|
|
1275
|
+
max: nt
|
|
1236
1276
|
}) }) })
|
|
1237
1277
|
] })
|
|
1238
1278
|
] });
|
|
1239
1279
|
}
|
|
1240
|
-
const
|
|
1241
|
-
function
|
|
1280
|
+
const gn = "organize-preview", pn = (e) => `proposed-module-${e + 1}`, Fr = (e) => `${e.contentType}-${e.contentId}`;
|
|
1281
|
+
function Ur(e, t) {
|
|
1242
1282
|
const n = e.completionRequirement;
|
|
1243
1283
|
if (n)
|
|
1244
1284
|
return { itemId: t, type: n.type, minScore: n.minScore ?? null };
|
|
1245
1285
|
}
|
|
1246
|
-
function
|
|
1247
|
-
const
|
|
1286
|
+
function Br(e, t, n) {
|
|
1287
|
+
const i = Fr(e);
|
|
1248
1288
|
return {
|
|
1249
|
-
id:
|
|
1289
|
+
id: i,
|
|
1250
1290
|
moduleId: t,
|
|
1251
1291
|
title: e.title,
|
|
1252
1292
|
type: e.contentType,
|
|
1253
1293
|
position: n + 1,
|
|
1254
1294
|
indent: 0,
|
|
1255
1295
|
published: !0,
|
|
1256
|
-
completionRequirement:
|
|
1257
|
-
extensions: { [
|
|
1296
|
+
completionRequirement: Ur(e, i) ?? null,
|
|
1297
|
+
extensions: { [oi]: e.isNew }
|
|
1258
1298
|
};
|
|
1259
1299
|
}
|
|
1260
|
-
function
|
|
1300
|
+
function Gr(e) {
|
|
1261
1301
|
const t = /* @__PURE__ */ new Map();
|
|
1262
|
-
return e.forEach((n,
|
|
1302
|
+
return e.forEach((n, i) => {
|
|
1263
1303
|
t.set(
|
|
1264
1304
|
n.position,
|
|
1265
|
-
t.has(n.position) ? null : { id:
|
|
1305
|
+
t.has(n.position) ? null : { id: pn(i), name: n.name }
|
|
1266
1306
|
);
|
|
1267
1307
|
}), t;
|
|
1268
1308
|
}
|
|
1269
|
-
function
|
|
1270
|
-
return e.prerequisitePositions.flatMap((
|
|
1271
|
-
const o = n.get(
|
|
1309
|
+
function Hr(e, t, n) {
|
|
1310
|
+
return e.prerequisitePositions.flatMap((i) => {
|
|
1311
|
+
const o = n.get(i);
|
|
1272
1312
|
return !o || o.id === t ? [] : [o];
|
|
1273
1313
|
});
|
|
1274
1314
|
}
|
|
1275
|
-
function
|
|
1276
|
-
const t =
|
|
1277
|
-
for (const [o,
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1280
|
-
id:
|
|
1281
|
-
name:
|
|
1282
|
-
position:
|
|
1315
|
+
function Wr(e) {
|
|
1316
|
+
const t = Gr(e.modules), n = [], i = {};
|
|
1317
|
+
for (const [o, r] of e.modules.entries()) {
|
|
1318
|
+
const a = pn(o), l = r.items.map((u, c) => Br(u, a, c));
|
|
1319
|
+
i[a] = l, n.push({
|
|
1320
|
+
id: a,
|
|
1321
|
+
name: r.name,
|
|
1322
|
+
position: r.position,
|
|
1283
1323
|
published: !0,
|
|
1284
|
-
itemCount:
|
|
1285
|
-
items:
|
|
1286
|
-
prerequisiteModules:
|
|
1287
|
-
requirementCount:
|
|
1324
|
+
itemCount: l.length,
|
|
1325
|
+
items: l,
|
|
1326
|
+
prerequisiteModules: Hr(r, a, t),
|
|
1327
|
+
requirementCount: r.requirementType === "one" ? 1 : null,
|
|
1288
1328
|
requireSequentialProgress: !1,
|
|
1289
|
-
completionRequirements:
|
|
1290
|
-
(
|
|
1329
|
+
completionRequirements: l.flatMap(
|
|
1330
|
+
(u) => u.completionRequirement ? [u.completionRequirement] : []
|
|
1291
1331
|
),
|
|
1292
1332
|
extensions: {
|
|
1293
|
-
[
|
|
1294
|
-
[
|
|
1295
|
-
[
|
|
1333
|
+
[si]: r.isNew,
|
|
1334
|
+
[ri]: r.items.filter((u) => u.isNew).length,
|
|
1335
|
+
[ii]: !0
|
|
1296
1336
|
}
|
|
1297
1337
|
});
|
|
1298
1338
|
}
|
|
1299
|
-
return { courseId:
|
|
1339
|
+
return { courseId: gn, modules: n, itemsByModuleId: i };
|
|
1300
1340
|
}
|
|
1301
|
-
const
|
|
1341
|
+
const Yr = {
|
|
1302
1342
|
itemsLoadedAnnouncement: ""
|
|
1303
1343
|
};
|
|
1304
|
-
function
|
|
1305
|
-
const { t } =
|
|
1306
|
-
courseId:
|
|
1307
|
-
adapter:
|
|
1344
|
+
function jr({ proposal: e }) {
|
|
1345
|
+
const { t } = F(), n = W(() => Wr(e), [e]), i = W(() => ui(n), [n]), o = W(() => n.modules.map((a) => a.id), [n]), r = di({
|
|
1346
|
+
courseId: gn,
|
|
1347
|
+
adapter: i,
|
|
1308
1348
|
itemsMode: "inline",
|
|
1309
1349
|
initialExpandedModuleIds: o
|
|
1310
1350
|
});
|
|
1311
|
-
return /* @__PURE__ */
|
|
1312
|
-
/* @__PURE__ */ s(
|
|
1313
|
-
/* @__PURE__ */ s(
|
|
1351
|
+
return /* @__PURE__ */ g(j, { children: [
|
|
1352
|
+
/* @__PURE__ */ s(Ie, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
|
|
1353
|
+
/* @__PURE__ */ s(os, { data: r, headingLevel: "h3" })
|
|
1314
1354
|
] });
|
|
1315
1355
|
}
|
|
1316
|
-
function
|
|
1317
|
-
const { t } =
|
|
1318
|
-
() => new
|
|
1356
|
+
function Qr({ proposal: e }) {
|
|
1357
|
+
const { t } = F(), n = ke(), i = W(() => hr(n), [n]), [o] = Y(
|
|
1358
|
+
() => new pi({ defaultOptions: { queries: { retry: !1 } } })
|
|
1319
1359
|
);
|
|
1320
|
-
return /* @__PURE__ */
|
|
1321
|
-
e.unplacedItems.length > 0 ? /* @__PURE__ */
|
|
1360
|
+
return /* @__PURE__ */ g(_, { as: "div", "data-testid": "organize-proposal-preview", children: [
|
|
1361
|
+
e.unplacedItems.length > 0 ? /* @__PURE__ */ g(te, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
|
|
1322
1362
|
/* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
|
|
1323
1363
|
/* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { children: t("organizeUnplacedExplanation") }) }),
|
|
1324
|
-
/* @__PURE__ */ s(
|
|
1364
|
+
/* @__PURE__ */ s(Je, { margin: "x-small 0 0 0", children: e.unplacedItems.map((r) => /* @__PURE__ */ s(et, { children: r.title }, `${r.contentType}-${r.contentId}`)) })
|
|
1325
1365
|
] }) : null,
|
|
1326
|
-
e.warnings.length > 0 ? /* @__PURE__ */
|
|
1366
|
+
e.warnings.length > 0 ? /* @__PURE__ */ g(te, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
|
|
1327
1367
|
/* @__PURE__ */ s(_, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
|
|
1328
|
-
/* @__PURE__ */ s(
|
|
1368
|
+
/* @__PURE__ */ s(Je, { margin: "x-small 0 0 0", children: e.warnings.map((r) => /* @__PURE__ */ s(et, { children: r }, r)) })
|
|
1329
1369
|
] }) : null,
|
|
1330
|
-
/* @__PURE__ */ s(
|
|
1370
|
+
/* @__PURE__ */ s(fi, { client: o, children: /* @__PURE__ */ s(li, { translations: Yr, children: /* @__PURE__ */ s(ai, { value: i, children: /* @__PURE__ */ s(jr, { proposal: e }) }) }) })
|
|
1331
1371
|
] });
|
|
1332
1372
|
}
|
|
1333
|
-
function
|
|
1373
|
+
function xt(e) {
|
|
1334
1374
|
const t = {};
|
|
1335
|
-
return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length >
|
|
1375
|
+
return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > nt && (t.direction = "too_long"), t;
|
|
1336
1376
|
}
|
|
1337
|
-
const
|
|
1377
|
+
const $t = (e) => Object.keys(e).length > 0, Kr = 1e4, Vr = (e) => e instanceof DOMException && e.name === "AbortError", Zr = (e) => e instanceof Error ? e : new Error(String(e)), Xr = { loading: "read", applying: "write" }, Ft = (e) => {
|
|
1338
1378
|
(e == null ? void 0 : e.kind) === "read" && e.controller.abort();
|
|
1339
1379
|
};
|
|
1340
|
-
function
|
|
1380
|
+
function Jr({
|
|
1341
1381
|
actions: e,
|
|
1342
1382
|
onApplied: t
|
|
1343
1383
|
}) {
|
|
1344
|
-
const [n,
|
|
1345
|
-
|
|
1346
|
-
|
|
1384
|
+
const [n, i] = Y("form"), [o, r] = Y(zr), [a, l] = Y(null), [u, c] = Y(null), [p, m] = Y(!1), h = L(null), S = L(0), M = L(!0);
|
|
1385
|
+
$(() => (M.current = !0, () => {
|
|
1386
|
+
M.current = !1, Ft(h.current), h.current = null;
|
|
1347
1387
|
}), []);
|
|
1348
|
-
const
|
|
1349
|
-
|
|
1350
|
-
}, []),
|
|
1351
|
-
|
|
1352
|
-
}, []),
|
|
1353
|
-
(
|
|
1354
|
-
|
|
1355
|
-
const
|
|
1356
|
-
h.current = { kind:
|
|
1357
|
-
const
|
|
1358
|
-
|
|
1359
|
-
|
|
1388
|
+
const T = W(() => xt(o), [o]), D = !$t(T), A = x(() => {
|
|
1389
|
+
Ft(h.current), h.current = null, S.current += 1, m(!1);
|
|
1390
|
+
}, []), U = x((C) => {
|
|
1391
|
+
r((R) => ({ ...R, ...C }));
|
|
1392
|
+
}, []), y = x(
|
|
1393
|
+
(C, R, q) => {
|
|
1394
|
+
A();
|
|
1395
|
+
const G = new AbortController(), K = S.current;
|
|
1396
|
+
h.current = { kind: Xr[C], controller: G }, c(null), i(C);
|
|
1397
|
+
const Z = () => M.current && S.current === K;
|
|
1398
|
+
q({ signal: G.signal, current: Z }).catch((ie) => {
|
|
1399
|
+
G.signal.aborted || Vr(ie) || !Z() || (c(Zr(ie)), i(R));
|
|
1360
1400
|
});
|
|
1361
1401
|
},
|
|
1362
|
-
[
|
|
1363
|
-
),
|
|
1364
|
-
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1402
|
+
[A]
|
|
1403
|
+
), P = x(() => {
|
|
1404
|
+
$t(xt(o)) || y("loading", "error", async ({ signal: C, current: R }) => {
|
|
1405
|
+
const q = await e.organize(o, C);
|
|
1406
|
+
C.aborted || !R() || (l(q), i("preview"));
|
|
1367
1407
|
});
|
|
1368
|
-
}, [e, o,
|
|
1369
|
-
|
|
1370
|
-
await e.apply(
|
|
1408
|
+
}, [e, o, y]), Q = x(() => {
|
|
1409
|
+
a !== null && y("applying", "preview", async ({ signal: C }) => {
|
|
1410
|
+
await e.apply(a, o, C), t == null || t();
|
|
1371
1411
|
});
|
|
1372
|
-
}, [e, o, t,
|
|
1373
|
-
|
|
1374
|
-
}, [
|
|
1375
|
-
return
|
|
1412
|
+
}, [e, o, t, a, y]), B = x(() => {
|
|
1413
|
+
A(), l(null), c(null), i("form");
|
|
1414
|
+
}, [A]);
|
|
1415
|
+
return $(() => {
|
|
1376
1416
|
if (n !== "loading" && n !== "applying") return;
|
|
1377
|
-
const
|
|
1378
|
-
return () => clearTimeout(
|
|
1417
|
+
const C = setTimeout(() => m(!0), Kr);
|
|
1418
|
+
return () => clearTimeout(C);
|
|
1379
1419
|
}, [n]), {
|
|
1380
1420
|
status: n,
|
|
1381
1421
|
input: o,
|
|
1382
|
-
setInput:
|
|
1383
|
-
errors:
|
|
1384
|
-
canSubmit:
|
|
1385
|
-
proposal:
|
|
1386
|
-
error:
|
|
1387
|
-
takingLong:
|
|
1388
|
-
submit:
|
|
1389
|
-
regenerate:
|
|
1390
|
-
apply:
|
|
1391
|
-
cancel:
|
|
1422
|
+
setInput: U,
|
|
1423
|
+
errors: T,
|
|
1424
|
+
canSubmit: D,
|
|
1425
|
+
proposal: a,
|
|
1426
|
+
error: u,
|
|
1427
|
+
takingLong: p && (n === "loading" || n === "applying"),
|
|
1428
|
+
submit: P,
|
|
1429
|
+
regenerate: P,
|
|
1430
|
+
apply: Q,
|
|
1431
|
+
cancel: B
|
|
1392
1432
|
};
|
|
1393
1433
|
}
|
|
1394
|
-
function
|
|
1395
|
-
const { t: n } =
|
|
1396
|
-
return /* @__PURE__ */
|
|
1397
|
-
/* @__PURE__ */ s(
|
|
1434
|
+
function Ut({ label: e, takingLong: t }) {
|
|
1435
|
+
const { t: n } = F();
|
|
1436
|
+
return /* @__PURE__ */ g(_, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
|
|
1437
|
+
/* @__PURE__ */ s(dt, { renderTitle: e }),
|
|
1398
1438
|
/* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { color: "secondary", children: e }) }),
|
|
1399
1439
|
t ? /* @__PURE__ */ s(_, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", "data-testid": "organize-taking-long", children: n("organizeStillWorking") }) }) : null
|
|
1400
1440
|
] });
|
|
1401
1441
|
}
|
|
1402
|
-
function
|
|
1442
|
+
function es({
|
|
1403
1443
|
actions: e,
|
|
1404
1444
|
open: t,
|
|
1405
1445
|
onDismiss: n,
|
|
1406
|
-
onApplied:
|
|
1446
|
+
onApplied: i,
|
|
1407
1447
|
aiDisclosure: o
|
|
1408
1448
|
}) {
|
|
1409
|
-
const { t:
|
|
1410
|
-
|
|
1411
|
-
|
|
1449
|
+
const { t: r } = F(), a = L(!0);
|
|
1450
|
+
$(() => (a.current = !0, () => {
|
|
1451
|
+
a.current = !1;
|
|
1412
1452
|
}), []);
|
|
1413
|
-
const
|
|
1453
|
+
const l = Jr({
|
|
1414
1454
|
actions: e,
|
|
1415
1455
|
onApplied: () => {
|
|
1416
|
-
|
|
1456
|
+
O(r("organizeAppliedAnnouncement")), i == null || i(), a.current && n();
|
|
1417
1457
|
}
|
|
1418
|
-
}), { status:
|
|
1419
|
-
return
|
|
1420
|
-
t && (
|
|
1421
|
-
}, [t,
|
|
1422
|
-
|
|
1423
|
-
}, [
|
|
1424
|
-
|
|
1458
|
+
}), { status: u, proposal: c, error: p, takingLong: m } = l;
|
|
1459
|
+
return $(() => {
|
|
1460
|
+
t && (u === "loading" && O(r("organizeLoadingLabel")), u === "applying" && O(r("organizeApplyingLabel")), u === "preview" && p === null && O(r("organizeProposalReadyAnnouncement")));
|
|
1461
|
+
}, [t, u, p, r]), $(() => {
|
|
1462
|
+
m && O(r("organizeStillWorking"));
|
|
1463
|
+
}, [m, r]), /* @__PURE__ */ g(
|
|
1464
|
+
Di,
|
|
1425
1465
|
{
|
|
1426
1466
|
open: t,
|
|
1427
1467
|
onDismiss: n,
|
|
1428
1468
|
size: "large",
|
|
1429
|
-
label:
|
|
1469
|
+
label: r("organizeModalLabel"),
|
|
1430
1470
|
shouldCloseOnDocumentClick: !1,
|
|
1431
1471
|
children: [
|
|
1432
|
-
/* @__PURE__ */
|
|
1472
|
+
/* @__PURE__ */ g(qi, { children: [
|
|
1433
1473
|
/* @__PURE__ */ s(
|
|
1434
|
-
|
|
1474
|
+
wi,
|
|
1435
1475
|
{
|
|
1436
1476
|
placement: "end",
|
|
1437
1477
|
offset: "small",
|
|
1438
1478
|
onClick: n,
|
|
1439
|
-
screenReaderLabel:
|
|
1479
|
+
screenReaderLabel: r("organizeCloseModal"),
|
|
1440
1480
|
"data-testid": "organize-close-modal"
|
|
1441
1481
|
}
|
|
1442
1482
|
),
|
|
1443
|
-
/* @__PURE__ */
|
|
1444
|
-
/* @__PURE__ */ s(
|
|
1445
|
-
o ? /* @__PURE__ */ s(
|
|
1483
|
+
/* @__PURE__ */ g(I, { alignItems: "center", gap: "small", children: [
|
|
1484
|
+
/* @__PURE__ */ s(I.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(Ie, { level: "h2", "data-testid": "organize-modal-title", children: r("organizeModalLabel") }) }),
|
|
1485
|
+
o ? /* @__PURE__ */ s(I.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
|
|
1446
1486
|
] })
|
|
1447
1487
|
] }),
|
|
1448
|
-
/* @__PURE__ */
|
|
1449
|
-
|
|
1450
|
-
|
|
1488
|
+
/* @__PURE__ */ g(zi, { children: [
|
|
1489
|
+
u === "form" ? /* @__PURE__ */ s(
|
|
1490
|
+
$r,
|
|
1451
1491
|
{
|
|
1452
|
-
input:
|
|
1453
|
-
errors:
|
|
1454
|
-
onChange:
|
|
1492
|
+
input: l.input,
|
|
1493
|
+
errors: l.errors,
|
|
1494
|
+
onChange: l.setInput
|
|
1455
1495
|
}
|
|
1456
1496
|
) : null,
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1497
|
+
u === "loading" ? /* @__PURE__ */ s(Ut, { label: r("organizeLoadingLabel"), takingLong: m }) : null,
|
|
1498
|
+
u === "applying" ? /* @__PURE__ */ s(Ut, { label: r("organizeApplyingLabel"), takingLong: m }) : null,
|
|
1499
|
+
u === "preview" && c ? /* @__PURE__ */ g(j, { children: [
|
|
1500
|
+
p ? /* @__PURE__ */ s(
|
|
1501
|
+
te,
|
|
1462
1502
|
{
|
|
1463
1503
|
variant: "error",
|
|
1464
1504
|
margin: "0 0 small 0",
|
|
1465
|
-
liveRegion:
|
|
1505
|
+
liveRegion: Ae,
|
|
1466
1506
|
liveRegionPoliteness: "assertive",
|
|
1467
1507
|
"data-testid": "organize-apply-error",
|
|
1468
|
-
children:
|
|
1508
|
+
children: r("organizeApplyFailed", { message: p.message })
|
|
1469
1509
|
}
|
|
1470
1510
|
) : null,
|
|
1471
|
-
/* @__PURE__ */ s(
|
|
1511
|
+
/* @__PURE__ */ s(Qr, { proposal: c })
|
|
1472
1512
|
] }) : null,
|
|
1473
|
-
|
|
1474
|
-
|
|
1513
|
+
u === "error" ? /* @__PURE__ */ s(
|
|
1514
|
+
te,
|
|
1475
1515
|
{
|
|
1476
1516
|
variant: "error",
|
|
1477
1517
|
margin: "0",
|
|
1478
|
-
liveRegion:
|
|
1518
|
+
liveRegion: Ae,
|
|
1479
1519
|
liveRegionPoliteness: "assertive",
|
|
1480
1520
|
"data-testid": "organize-error",
|
|
1481
|
-
children:
|
|
1521
|
+
children: r("organizeFailed", { message: (p == null ? void 0 : p.message) ?? "" })
|
|
1482
1522
|
}
|
|
1483
1523
|
) : null
|
|
1484
1524
|
] }),
|
|
1485
|
-
/* @__PURE__ */
|
|
1486
|
-
|
|
1487
|
-
/* @__PURE__ */ s(
|
|
1525
|
+
/* @__PURE__ */ g(Ni, { children: [
|
|
1526
|
+
u === "form" ? /* @__PURE__ */ g(j, { children: [
|
|
1527
|
+
/* @__PURE__ */ s(N, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: r("organizeCancel") }),
|
|
1488
1528
|
/* @__PURE__ */ s(
|
|
1489
|
-
|
|
1529
|
+
N,
|
|
1490
1530
|
{
|
|
1491
1531
|
color: "ai-primary",
|
|
1492
|
-
onClick:
|
|
1493
|
-
interaction:
|
|
1532
|
+
onClick: l.submit,
|
|
1533
|
+
interaction: l.canSubmit ? "enabled" : "disabled",
|
|
1494
1534
|
"data-testid": "organize-submit",
|
|
1495
|
-
children:
|
|
1535
|
+
children: r("organizeSubmit")
|
|
1496
1536
|
}
|
|
1497
1537
|
)
|
|
1498
1538
|
] }) : null,
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
/* @__PURE__ */ s(
|
|
1539
|
+
u === "loading" ? /* @__PURE__ */ s(N, { onClick: l.cancel, "data-testid": "organize-cancel-loading", children: r("organizeCancel") }) : null,
|
|
1540
|
+
u === "preview" ? /* @__PURE__ */ g(j, { children: [
|
|
1541
|
+
/* @__PURE__ */ s(N, { onClick: l.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: r("organizeStartOver") }),
|
|
1502
1542
|
/* @__PURE__ */ s(
|
|
1503
|
-
|
|
1543
|
+
N,
|
|
1504
1544
|
{
|
|
1505
|
-
onClick:
|
|
1545
|
+
onClick: l.regenerate,
|
|
1506
1546
|
margin: "0 x-small 0 0",
|
|
1507
1547
|
"data-testid": "organize-regenerate",
|
|
1508
|
-
children:
|
|
1548
|
+
children: r("organizeRegenerate")
|
|
1509
1549
|
}
|
|
1510
1550
|
),
|
|
1511
|
-
/* @__PURE__ */ s(
|
|
1551
|
+
/* @__PURE__ */ s(N, { color: "primary", onClick: l.apply, "data-testid": "organize-apply", children: r("organizeApply") })
|
|
1512
1552
|
] }) : null,
|
|
1513
|
-
|
|
1514
|
-
/* @__PURE__ */ s(
|
|
1515
|
-
/* @__PURE__ */ s(
|
|
1553
|
+
u === "error" ? /* @__PURE__ */ g(j, { children: [
|
|
1554
|
+
/* @__PURE__ */ s(N, { onClick: l.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: r("organizeStartOver") }),
|
|
1555
|
+
/* @__PURE__ */ s(N, { color: "primary", onClick: l.submit, "data-testid": "organize-retry", children: r("organizeTryAgain") })
|
|
1516
1556
|
] }) : null,
|
|
1517
|
-
|
|
1557
|
+
u === "applying" ? /* @__PURE__ */ s(N, { interaction: "disabled", "data-testid": "organize-applying", children: r("organizeApply") }) : null
|
|
1518
1558
|
] })
|
|
1519
1559
|
]
|
|
1520
1560
|
}
|
|
1521
1561
|
);
|
|
1522
1562
|
}
|
|
1523
|
-
function
|
|
1563
|
+
function ts({
|
|
1524
1564
|
actions: e,
|
|
1525
1565
|
onApplied: t,
|
|
1526
1566
|
aiDisclosure: n,
|
|
1527
|
-
display:
|
|
1567
|
+
display: i = "inline-block"
|
|
1528
1568
|
}) {
|
|
1529
|
-
const { t: o } =
|
|
1530
|
-
return /* @__PURE__ */
|
|
1569
|
+
const { t: o } = F(), [r, a] = Y(!1);
|
|
1570
|
+
return /* @__PURE__ */ g(j, { children: [
|
|
1531
1571
|
/* @__PURE__ */ s(
|
|
1532
|
-
|
|
1572
|
+
N,
|
|
1533
1573
|
{
|
|
1534
1574
|
color: "ai-primary",
|
|
1535
|
-
display:
|
|
1536
|
-
onClick: () =>
|
|
1537
|
-
renderIcon:
|
|
1575
|
+
display: i,
|
|
1576
|
+
onClick: () => a(!0),
|
|
1577
|
+
renderIcon: r ? /* @__PURE__ */ s(Si, {}) : /* @__PURE__ */ s(Ti, {}),
|
|
1538
1578
|
"data-testid": "organize-modules-trigger",
|
|
1539
1579
|
children: o("organizeModulesTrigger")
|
|
1540
1580
|
}
|
|
1541
1581
|
),
|
|
1542
|
-
|
|
1543
|
-
|
|
1582
|
+
r ? /* @__PURE__ */ s(
|
|
1583
|
+
es,
|
|
1544
1584
|
{
|
|
1545
1585
|
actions: e,
|
|
1546
1586
|
open: !0,
|
|
1547
|
-
onDismiss: () =>
|
|
1587
|
+
onDismiss: () => a(!1),
|
|
1548
1588
|
onApplied: t,
|
|
1549
1589
|
aiDisclosure: n
|
|
1550
1590
|
}
|
|
1551
1591
|
) : null
|
|
1552
1592
|
] });
|
|
1553
1593
|
}
|
|
1554
|
-
function
|
|
1594
|
+
function ns({
|
|
1555
1595
|
counts: e,
|
|
1556
1596
|
itemsMode: t,
|
|
1557
1597
|
loadedModules: n
|
|
1558
1598
|
}) {
|
|
1559
|
-
const
|
|
1599
|
+
const i = e.listModules + e.listModuleItems;
|
|
1560
1600
|
return /* @__PURE__ */ s(
|
|
1561
1601
|
_,
|
|
1562
1602
|
{
|
|
@@ -1567,25 +1607,25 @@ function Nr({
|
|
|
1567
1607
|
padding: "x-small small",
|
|
1568
1608
|
margin: "0 0 small 0",
|
|
1569
1609
|
"data-testid": "dev-diagnostics",
|
|
1570
|
-
children: /* @__PURE__ */
|
|
1571
|
-
/* @__PURE__ */ s(
|
|
1572
|
-
/* @__PURE__ */ s(
|
|
1610
|
+
children: /* @__PURE__ */ g(I, { gap: "medium", wrap: "wrap", children: [
|
|
1611
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ s(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
|
|
1612
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
|
|
1573
1613
|
"listModules: ",
|
|
1574
1614
|
e.listModules
|
|
1575
1615
|
] }) }),
|
|
1576
|
-
/* @__PURE__ */ s(
|
|
1616
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
|
|
1577
1617
|
"listModuleItems: ",
|
|
1578
1618
|
e.listModuleItems
|
|
1579
1619
|
] }) }),
|
|
1580
|
-
/* @__PURE__ */ s(
|
|
1620
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
|
|
1581
1621
|
"total: ",
|
|
1582
|
-
|
|
1622
|
+
i
|
|
1583
1623
|
] }) }),
|
|
1584
|
-
/* @__PURE__ */ s(
|
|
1624
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
|
|
1585
1625
|
"itemsMode: ",
|
|
1586
1626
|
t ?? "probing…"
|
|
1587
1627
|
] }) }),
|
|
1588
|
-
/* @__PURE__ */ s(
|
|
1628
|
+
/* @__PURE__ */ s(I.Item, { children: /* @__PURE__ */ g(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
|
|
1589
1629
|
"modules loaded: ",
|
|
1590
1630
|
n
|
|
1591
1631
|
] }) })
|
|
@@ -1593,172 +1633,208 @@ function Nr({
|
|
|
1593
1633
|
}
|
|
1594
1634
|
);
|
|
1595
1635
|
}
|
|
1596
|
-
const
|
|
1597
|
-
function
|
|
1636
|
+
const is = 200, rs = "22rem";
|
|
1637
|
+
function ss({
|
|
1598
1638
|
data: e,
|
|
1599
1639
|
today: t,
|
|
1600
1640
|
requestCounts: n,
|
|
1601
|
-
showDiagnostics:
|
|
1641
|
+
showDiagnostics: i = n !== void 0,
|
|
1602
1642
|
as: o = "div",
|
|
1603
|
-
headingLevel:
|
|
1604
|
-
organizationActions:
|
|
1605
|
-
onOrganizationApplied:
|
|
1606
|
-
organizationAiDisclosure:
|
|
1607
|
-
breakpoints:
|
|
1643
|
+
headingLevel: r = "h2",
|
|
1644
|
+
organizationActions: a,
|
|
1645
|
+
onOrganizationApplied: l,
|
|
1646
|
+
organizationAiDisclosure: u,
|
|
1647
|
+
breakpoints: c = {}
|
|
1608
1648
|
}) {
|
|
1609
|
-
const { miniTablet:
|
|
1610
|
-
() => ({ miniTablet:
|
|
1611
|
-
[
|
|
1649
|
+
const { miniTablet: p, tablet: m, desktop: h, desktopNavOpen: S, desktopOnly: M, mobileOnly: T, ICEDesktop: D } = c, A = W(
|
|
1650
|
+
() => ({ miniTablet: p, tablet: m, desktop: h, desktopNavOpen: S, desktopOnly: M, mobileOnly: T, ICEDesktop: D }),
|
|
1651
|
+
[p, m, h, S, M, T, D]
|
|
1612
1652
|
), {
|
|
1613
|
-
modules:
|
|
1614
|
-
page:
|
|
1615
|
-
pageCount:
|
|
1616
|
-
pageSize:
|
|
1617
|
-
pageInfo:
|
|
1618
|
-
hasNextPage:
|
|
1619
|
-
hasPreviousPage:
|
|
1620
|
-
goToFirstPage:
|
|
1621
|
-
goToPreviousPage:
|
|
1622
|
-
goToNextPage:
|
|
1623
|
-
goToLastPage:
|
|
1624
|
-
isLoading:
|
|
1625
|
-
isRefreshing:
|
|
1626
|
-
error:
|
|
1627
|
-
itemsMode:
|
|
1628
|
-
expandedModuleIds:
|
|
1629
|
-
expandModule:
|
|
1630
|
-
collapseModule:
|
|
1631
|
-
toggleModule:
|
|
1632
|
-
expandModules:
|
|
1633
|
-
collapseModules:
|
|
1634
|
-
expandAllModules:
|
|
1635
|
-
collapseAllModules:
|
|
1636
|
-
isPersistingCollapsed:
|
|
1637
|
-
getItems:
|
|
1638
|
-
filter:
|
|
1639
|
-
setFilter:
|
|
1640
|
-
filterEntry:
|
|
1641
|
-
filterPredicate:
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
},
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1653
|
+
modules: U,
|
|
1654
|
+
page: y,
|
|
1655
|
+
pageCount: P,
|
|
1656
|
+
pageSize: Q,
|
|
1657
|
+
pageInfo: B,
|
|
1658
|
+
hasNextPage: C,
|
|
1659
|
+
hasPreviousPage: R,
|
|
1660
|
+
goToFirstPage: q,
|
|
1661
|
+
goToPreviousPage: G,
|
|
1662
|
+
goToNextPage: K,
|
|
1663
|
+
goToLastPage: Z,
|
|
1664
|
+
isLoading: ie,
|
|
1665
|
+
isRefreshing: w,
|
|
1666
|
+
error: ae,
|
|
1667
|
+
itemsMode: X,
|
|
1668
|
+
expandedModuleIds: V,
|
|
1669
|
+
expandModule: ue,
|
|
1670
|
+
collapseModule: de,
|
|
1671
|
+
toggleModule: ce,
|
|
1672
|
+
expandModules: _e,
|
|
1673
|
+
collapseModules: z,
|
|
1674
|
+
expandAllModules: In,
|
|
1675
|
+
collapseAllModules: Mn,
|
|
1676
|
+
isPersistingCollapsed: _n,
|
|
1677
|
+
getItems: De,
|
|
1678
|
+
filter: Ee,
|
|
1679
|
+
setFilter: mt,
|
|
1680
|
+
filterEntry: En,
|
|
1681
|
+
filterPredicate: qe,
|
|
1682
|
+
search: me,
|
|
1683
|
+
searchEnabled: Sn,
|
|
1684
|
+
searchInput: gt,
|
|
1685
|
+
setSearchInput: Tn,
|
|
1686
|
+
clearSearch: pt
|
|
1687
|
+
} = e, { t: E, timezone: ft } = F(), Se = at(), { filters: ht } = ke(), yn = W(() => lt(ht).length > 0, [ht]), It = L(null), ze = L(/* @__PURE__ */ new Map()), Ne = L(/* @__PURE__ */ new Map()), H = T === !0, Mt = L(null), re = L(null), Te = L(null), bn = x((d) => {
|
|
1688
|
+
var f, k;
|
|
1689
|
+
(f = ze.current.get(d)) == null || f.scrollIntoView({ behavior: "smooth", block: "start" }), (k = Ne.current.get(d)) == null || k.focus({ preventScroll: !0 });
|
|
1690
|
+
}, []), Pn = x((d, f) => {
|
|
1691
|
+
f ? Ne.current.set(d, f) : Ne.current.delete(d);
|
|
1692
|
+
}, []), [Cn] = Y(() => /* @__PURE__ */ new Date()), xe = t ?? Cn;
|
|
1693
|
+
Mi(() => {
|
|
1694
|
+
if (re.current !== "keepFocus" || !Te.current) return;
|
|
1695
|
+
const { control: d, fallback: f, scrollY: k } = Te.current;
|
|
1696
|
+
Te.current = null, d == null || d.focus({ preventScroll: !0 }), document.activeElement !== d && (f == null || f.focus({ preventScroll: !0 })), window.scrollTo({ top: k });
|
|
1697
|
+
}, [y]), $(() => {
|
|
1698
|
+
var f;
|
|
1699
|
+
if (re.current === null || w) return;
|
|
1700
|
+
const d = re.current === "focusList";
|
|
1701
|
+
re.current = null, O(E("pageChangedAnnouncement", { page: y, pageCount: P })), d && ((f = It.current) == null || f.focus({ preventScroll: !0 }));
|
|
1702
|
+
}, [w, y, P, E]);
|
|
1703
|
+
const $e = x(
|
|
1704
|
+
(d = null, f = null) => {
|
|
1705
|
+
const k = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
1706
|
+
re.current = "keepFocus", Te.current = {
|
|
1707
|
+
control: d ?? k,
|
|
1708
|
+
fallback: f,
|
|
1709
|
+
scrollY: window.scrollY
|
|
1710
|
+
};
|
|
1711
|
+
},
|
|
1712
|
+
[]
|
|
1713
|
+
), Fe = x(
|
|
1714
|
+
(d, f = null, k = null) => {
|
|
1715
|
+
$e(f, k), Se("paginate-modules"), d === 1 ? q() : d === y - 1 ? G() : d === y + 1 ? K() : d === P && Z();
|
|
1657
1716
|
},
|
|
1658
|
-
[
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1717
|
+
[
|
|
1718
|
+
y,
|
|
1719
|
+
P,
|
|
1720
|
+
q,
|
|
1721
|
+
G,
|
|
1722
|
+
K,
|
|
1723
|
+
Z,
|
|
1724
|
+
Se,
|
|
1725
|
+
$e
|
|
1726
|
+
]
|
|
1727
|
+
), Ue = W(
|
|
1728
|
+
() => U.filter(
|
|
1729
|
+
(d) => qe === void 0 || qe(d, { today: xe, timezone: ft })
|
|
1662
1730
|
),
|
|
1663
|
-
[
|
|
1664
|
-
),
|
|
1665
|
-
rows:
|
|
1666
|
-
expanded:
|
|
1731
|
+
[U, qe, xe, ft]
|
|
1732
|
+
), _t = L({
|
|
1733
|
+
rows: Ue,
|
|
1734
|
+
expanded: V,
|
|
1667
1735
|
items: /* @__PURE__ */ new Map()
|
|
1668
|
-
}), [
|
|
1669
|
-
|
|
1670
|
-
rows:
|
|
1671
|
-
expanded:
|
|
1672
|
-
items: new Map(
|
|
1673
|
-
},
|
|
1674
|
-
const
|
|
1675
|
-
() =>
|
|
1676
|
-
[
|
|
1677
|
-
),
|
|
1678
|
-
|
|
1679
|
-
if (
|
|
1680
|
-
if (
|
|
1681
|
-
|
|
1736
|
+
}), [v, ge] = Y(null);
|
|
1737
|
+
w ? v === null && ge(_t.current) : (_t.current = {
|
|
1738
|
+
rows: Ue,
|
|
1739
|
+
expanded: V,
|
|
1740
|
+
items: new Map(V.map((d) => [d, De(d)]))
|
|
1741
|
+
}, v !== null && ge(null));
|
|
1742
|
+
const J = (v == null ? void 0 : v.rows) ?? Ue, Be = (v == null ? void 0 : v.expanded) ?? V, Et = W(() => new Set(Be), [Be]), pe = W(
|
|
1743
|
+
() => J.filter((d) => Et.has(d.id)).map((d) => d.id),
|
|
1744
|
+
[J, Et]
|
|
1745
|
+
), St = pe.length > 0, [Ge, He] = Y(!1), ye = pe.filter((d) => De(d).isLoading).length, se = L(!1);
|
|
1746
|
+
$(() => {
|
|
1747
|
+
if (Ge) {
|
|
1748
|
+
if (ye > 0 && !se.current) {
|
|
1749
|
+
se.current = !0, O(E("expandAllLoadingItems", { count: ye }));
|
|
1682
1750
|
return;
|
|
1683
1751
|
}
|
|
1684
|
-
|
|
1752
|
+
ye === 0 && (se.current && V.length > 0 && O(E("expandAllItemsLoaded")), se.current = !1, He(!1));
|
|
1685
1753
|
}
|
|
1686
|
-
}, [
|
|
1687
|
-
const
|
|
1688
|
-
|
|
1689
|
-
var
|
|
1690
|
-
|
|
1691
|
-
}, [
|
|
1692
|
-
const
|
|
1693
|
-
if (
|
|
1694
|
-
|
|
1695
|
-
const
|
|
1696
|
-
|
|
1754
|
+
}, [Ge, ye, V.length, E]);
|
|
1755
|
+
const We = Ge || _n, Ye = L(null), je = L(!1);
|
|
1756
|
+
$(() => {
|
|
1757
|
+
var d;
|
|
1758
|
+
We || !je.current || (je.current = !1, (d = Ye.current) == null || d.focus());
|
|
1759
|
+
}, [We]);
|
|
1760
|
+
const vn = () => {
|
|
1761
|
+
if (je.current = document.activeElement === Ye.current, St) {
|
|
1762
|
+
Se("collapse-all");
|
|
1763
|
+
const f = new Set(pe);
|
|
1764
|
+
He(!1), se.current = !1, Ee === we && me === void 0 ? Mn() : z(pe), v !== null && ge({ ...v, expanded: v.expanded.filter((k) => !f.has(k)) }), O(E("modulesCollapsedAnnouncement", { count: pe.length }));
|
|
1697
1765
|
return;
|
|
1698
1766
|
}
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1702
|
-
},
|
|
1703
|
-
|
|
1704
|
-
const
|
|
1705
|
-
(
|
|
1706
|
-
const
|
|
1707
|
-
if (
|
|
1708
|
-
|
|
1767
|
+
Se("expand-all");
|
|
1768
|
+
const d = J.map((f) => f.id);
|
|
1769
|
+
He(!0), se.current = !1, Ee === we && me === void 0 ? In() : _e(d), v !== null && ge({ ...v, expanded: d }), O(E("modulesExpandedAnnouncement", { count: d.length }));
|
|
1770
|
+
}, Tt = L(v);
|
|
1771
|
+
Tt.current = v;
|
|
1772
|
+
const wn = x(
|
|
1773
|
+
(d) => {
|
|
1774
|
+
const f = Tt.current;
|
|
1775
|
+
if (f === null) {
|
|
1776
|
+
ce(d);
|
|
1709
1777
|
return;
|
|
1710
1778
|
}
|
|
1711
|
-
const
|
|
1712
|
-
|
|
1713
|
-
...
|
|
1714
|
-
expanded:
|
|
1715
|
-
}),
|
|
1779
|
+
const k = f.expanded.includes(d);
|
|
1780
|
+
ge({
|
|
1781
|
+
...f,
|
|
1782
|
+
expanded: k ? f.expanded.filter((Rn) => Rn !== d) : [...f.expanded, d]
|
|
1783
|
+
}), k ? de(d) : ue(d);
|
|
1716
1784
|
},
|
|
1717
|
-
[
|
|
1718
|
-
), [
|
|
1719
|
-
|
|
1720
|
-
if (!
|
|
1721
|
-
|
|
1785
|
+
[ce, de, ue]
|
|
1786
|
+
), [Ln, yt] = Y(!1);
|
|
1787
|
+
$(() => {
|
|
1788
|
+
if (!w) {
|
|
1789
|
+
yt(!1);
|
|
1722
1790
|
return;
|
|
1723
1791
|
}
|
|
1724
|
-
const
|
|
1725
|
-
return () => clearTimeout(
|
|
1726
|
-
}, [
|
|
1727
|
-
const
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
}, [
|
|
1731
|
-
const
|
|
1732
|
-
|
|
1792
|
+
const d = setTimeout(() => yt(!0), is);
|
|
1793
|
+
return () => clearTimeout(d);
|
|
1794
|
+
}, [w]);
|
|
1795
|
+
const bt = me !== void 0, be = En !== void 0 && Ee !== we || bt, Pe = ie || w && J.length === 0, fe = J.length === 0 && !Pe && !ae, Ce = fe && be, Qe = r === "h1" ? "h2" : "h3";
|
|
1796
|
+
$(() => {
|
|
1797
|
+
Ce && O(E("filteredEmptyStateTitle"));
|
|
1798
|
+
}, [Ce, E]);
|
|
1799
|
+
const ee = bt && B.totalCount !== null && !Pe && !w && !ae && !fe ? E("searchResultsHint", { count: B.totalCount, term: me }) : null, Ke = L(null);
|
|
1800
|
+
$(() => {
|
|
1801
|
+
if (ee === null) {
|
|
1802
|
+
Ke.current = null;
|
|
1803
|
+
return;
|
|
1804
|
+
}
|
|
1805
|
+
Ke.current !== ee && (Ke.current = ee, O(ee));
|
|
1806
|
+
}, [ee]);
|
|
1807
|
+
const Pt = P > 1 || C || R, An = P > 1 && !Pe && !fe && !Ce;
|
|
1808
|
+
return /* @__PURE__ */ g(_, { as: o, display: "block", "data-testid": "modules-list", children: [
|
|
1733
1809
|
/* @__PURE__ */ s(
|
|
1734
|
-
|
|
1810
|
+
ci,
|
|
1735
1811
|
{
|
|
1736
|
-
modules:
|
|
1737
|
-
hasMoreModules:
|
|
1738
|
-
continuesBefore:
|
|
1739
|
-
continuesAfter:
|
|
1740
|
-
onModuleClick:
|
|
1741
|
-
pagination:
|
|
1742
|
-
rangeStart: (
|
|
1743
|
-
totalCount:
|
|
1744
|
-
hasPreviousPage:
|
|
1745
|
-
hasNextPage:
|
|
1746
|
-
onPreviousPage: () =>
|
|
1747
|
-
onNextPage: () =>
|
|
1748
|
-
disabled:
|
|
1812
|
+
modules: U,
|
|
1813
|
+
hasMoreModules: Pt || be,
|
|
1814
|
+
continuesBefore: R,
|
|
1815
|
+
continuesAfter: C,
|
|
1816
|
+
onModuleClick: bn,
|
|
1817
|
+
pagination: Pt ? {
|
|
1818
|
+
rangeStart: (y - 1) * Q + 1,
|
|
1819
|
+
totalCount: B.totalCount,
|
|
1820
|
+
hasPreviousPage: R,
|
|
1821
|
+
hasNextPage: C,
|
|
1822
|
+
onPreviousPage: (d, f) => Fe(y - 1, d, f),
|
|
1823
|
+
onNextPage: (d, f) => Fe(y + 1, d, f),
|
|
1824
|
+
disabled: w
|
|
1749
1825
|
} : void 0
|
|
1750
1826
|
}
|
|
1751
1827
|
),
|
|
1752
|
-
|
|
1753
|
-
|
|
1828
|
+
i && n ? /* @__PURE__ */ s(
|
|
1829
|
+
ns,
|
|
1754
1830
|
{
|
|
1755
1831
|
counts: n,
|
|
1756
|
-
itemsMode:
|
|
1757
|
-
loadedModules:
|
|
1832
|
+
itemsMode: X,
|
|
1833
|
+
loadedModules: U.length
|
|
1758
1834
|
}
|
|
1759
1835
|
) : null,
|
|
1760
|
-
/* @__PURE__ */
|
|
1761
|
-
|
|
1836
|
+
/* @__PURE__ */ g(
|
|
1837
|
+
I,
|
|
1762
1838
|
{
|
|
1763
1839
|
justifyItems: "end",
|
|
1764
1840
|
alignItems: "end",
|
|
@@ -1767,53 +1843,85 @@ function $r({
|
|
|
1767
1843
|
margin: "medium 0 0 0",
|
|
1768
1844
|
"data-testid": "modules-controls",
|
|
1769
1845
|
children: [
|
|
1770
|
-
|
|
1771
|
-
|
|
1846
|
+
Sn ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, margin: H ? void 0 : "0 auto 0 0", children: /* @__PURE__ */ s(
|
|
1847
|
+
Oi,
|
|
1772
1848
|
{
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1849
|
+
renderLabel: E("searchLabel"),
|
|
1850
|
+
width: H ? void 0 : rs,
|
|
1851
|
+
value: gt,
|
|
1852
|
+
onChange: (d, f) => Tn(f),
|
|
1853
|
+
inputRef: (d) => {
|
|
1854
|
+
Mt.current = d;
|
|
1855
|
+
},
|
|
1856
|
+
renderBeforeInput: /* @__PURE__ */ s(bi, { size: "sm" }),
|
|
1857
|
+
renderAfterInput: gt === "" ? void 0 : /* @__PURE__ */ s(
|
|
1858
|
+
Qt,
|
|
1859
|
+
{
|
|
1860
|
+
size: "small",
|
|
1861
|
+
withBackground: !1,
|
|
1862
|
+
withBorder: !1,
|
|
1863
|
+
screenReaderLabel: E("clearSearch"),
|
|
1864
|
+
onClick: () => {
|
|
1865
|
+
var d;
|
|
1866
|
+
pt(), (d = Mt.current) == null || d.focus();
|
|
1867
|
+
},
|
|
1868
|
+
"data-testid": "modules-search-clear",
|
|
1869
|
+
children: /* @__PURE__ */ s(yi, { size: "sm" })
|
|
1870
|
+
}
|
|
1871
|
+
),
|
|
1872
|
+
"data-testid": "modules-search"
|
|
1873
|
+
}
|
|
1874
|
+
) }) : null,
|
|
1875
|
+
a ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
|
|
1876
|
+
ts,
|
|
1877
|
+
{
|
|
1878
|
+
actions: a,
|
|
1879
|
+
onApplied: l,
|
|
1880
|
+
aiDisclosure: u,
|
|
1881
|
+
display: H ? "block" : "inline-block"
|
|
1777
1882
|
}
|
|
1778
1883
|
) }) : null,
|
|
1779
|
-
|
|
1780
|
-
|
|
1884
|
+
yn ? /* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
|
|
1885
|
+
_r,
|
|
1781
1886
|
{
|
|
1782
|
-
value:
|
|
1783
|
-
onChange:
|
|
1784
|
-
|
|
1887
|
+
value: Ee,
|
|
1888
|
+
onChange: (d) => {
|
|
1889
|
+
y !== 1 && $e(), mt(d);
|
|
1890
|
+
},
|
|
1891
|
+
interaction: fe && !be ? "disabled" : "enabled"
|
|
1785
1892
|
}
|
|
1786
1893
|
) }) : null,
|
|
1787
|
-
/* @__PURE__ */ s(
|
|
1788
|
-
|
|
1894
|
+
/* @__PURE__ */ s(I.Item, { shouldGrow: H, children: /* @__PURE__ */ s(
|
|
1895
|
+
N,
|
|
1789
1896
|
{
|
|
1790
|
-
elementRef: (
|
|
1791
|
-
|
|
1897
|
+
elementRef: (d) => {
|
|
1898
|
+
Ye.current = d;
|
|
1792
1899
|
},
|
|
1793
|
-
display:
|
|
1794
|
-
onClick:
|
|
1795
|
-
interaction:
|
|
1900
|
+
display: H ? "block" : "inline-block",
|
|
1901
|
+
onClick: vn,
|
|
1902
|
+
interaction: J.length === 0 || We ? "disabled" : "enabled",
|
|
1796
1903
|
"data-testid": "expand-collapse-all",
|
|
1797
|
-
children: E(
|
|
1904
|
+
children: E(St ? "collapseAllModules" : "expandAllModules")
|
|
1798
1905
|
}
|
|
1799
1906
|
) })
|
|
1800
1907
|
]
|
|
1801
1908
|
}
|
|
1802
1909
|
),
|
|
1803
|
-
/* @__PURE__ */
|
|
1804
|
-
|
|
1805
|
-
|
|
1910
|
+
ee !== null ? /* @__PURE__ */ s(_, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { as: "div", size: "small", color: "secondary", "data-testid": "modules-search-hint", children: ee }) }) : null,
|
|
1911
|
+
/* @__PURE__ */ g(_, { as: "div", margin: "medium 0 0 0", children: [
|
|
1912
|
+
ae ? /* @__PURE__ */ s(
|
|
1913
|
+
te,
|
|
1806
1914
|
{
|
|
1807
1915
|
variant: "error",
|
|
1808
1916
|
margin: "0 0 small 0",
|
|
1809
|
-
liveRegion:
|
|
1917
|
+
liveRegion: Ae,
|
|
1810
1918
|
liveRegionPoliteness: "assertive",
|
|
1811
1919
|
"data-testid": "modules-error",
|
|
1812
|
-
children: E("modulesLoadErrorAlert", { message:
|
|
1920
|
+
children: E("modulesLoadErrorAlert", { message: ae.message })
|
|
1813
1921
|
}
|
|
1814
1922
|
) : null,
|
|
1815
|
-
|
|
1816
|
-
|
|
1923
|
+
Pe ? /* @__PURE__ */ s(_, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(dt, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
|
|
1924
|
+
fe && !be ? /* @__PURE__ */ g(
|
|
1817
1925
|
_,
|
|
1818
1926
|
{
|
|
1819
1927
|
as: "div",
|
|
@@ -1825,12 +1933,12 @@ function $r({
|
|
|
1825
1933
|
textAlign: "center",
|
|
1826
1934
|
"data-testid": "modules-empty",
|
|
1827
1935
|
children: [
|
|
1828
|
-
/* @__PURE__ */ s(
|
|
1936
|
+
/* @__PURE__ */ s(Ie, { level: Qe, variant: "titleCardLarge", margin: "0 0 x-small 0", children: E("noModulesEmptyStateTitle") }),
|
|
1829
1937
|
/* @__PURE__ */ s(b, { color: "secondary", children: E("noModulesEmptyStateDescription") })
|
|
1830
1938
|
]
|
|
1831
1939
|
}
|
|
1832
1940
|
) : null,
|
|
1833
|
-
|
|
1941
|
+
Ce ? /* @__PURE__ */ g(
|
|
1834
1942
|
_,
|
|
1835
1943
|
{
|
|
1836
1944
|
as: "div",
|
|
@@ -1838,27 +1946,27 @@ function $r({
|
|
|
1838
1946
|
borderRadius: "card.lg",
|
|
1839
1947
|
borderWidth: "small",
|
|
1840
1948
|
shadow: "resting",
|
|
1841
|
-
padding:
|
|
1949
|
+
padding: H ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
|
|
1842
1950
|
textAlign: "center",
|
|
1843
1951
|
"data-testid": "modules-filtered-empty",
|
|
1844
1952
|
children: [
|
|
1845
1953
|
/* @__PURE__ */ s(
|
|
1846
|
-
|
|
1954
|
+
Ie,
|
|
1847
1955
|
{
|
|
1848
|
-
level:
|
|
1849
|
-
variant:
|
|
1956
|
+
level: Qe,
|
|
1957
|
+
variant: H ? "titleCardMini" : "titleCardLarge",
|
|
1850
1958
|
margin: "0 0 general.spaceXs 0",
|
|
1851
1959
|
children: E("filteredEmptyStateTitle")
|
|
1852
1960
|
}
|
|
1853
1961
|
),
|
|
1854
|
-
/* @__PURE__ */ s(b, { as: "div", color: "secondary", size:
|
|
1962
|
+
/* @__PURE__ */ s(b, { as: "div", color: "secondary", size: H ? "small" : void 0, children: E("filteredEmptyStateDescription") }),
|
|
1855
1963
|
/* @__PURE__ */ s(
|
|
1856
|
-
|
|
1964
|
+
N,
|
|
1857
1965
|
{
|
|
1858
1966
|
color: "primary",
|
|
1859
1967
|
margin: "general.spaceLg 0 0 0",
|
|
1860
1968
|
onClick: () => {
|
|
1861
|
-
|
|
1969
|
+
mt(we), pt(), re.current = "focusList";
|
|
1862
1970
|
},
|
|
1863
1971
|
"data-testid": "clear-filters",
|
|
1864
1972
|
children: E("clearFilters")
|
|
@@ -1870,39 +1978,40 @@ function $r({
|
|
|
1870
1978
|
/* @__PURE__ */ s(
|
|
1871
1979
|
"ul",
|
|
1872
1980
|
{
|
|
1873
|
-
ref:
|
|
1874
|
-
style: { listStyle: "none", margin: 0, padding: 0, opacity:
|
|
1875
|
-
"aria-busy":
|
|
1981
|
+
ref: It,
|
|
1982
|
+
style: { listStyle: "none", margin: 0, padding: 0, opacity: Ln ? 0.5 : 1 },
|
|
1983
|
+
"aria-busy": w,
|
|
1876
1984
|
tabIndex: -1,
|
|
1877
1985
|
"data-testid": "modules-stack",
|
|
1878
|
-
children:
|
|
1986
|
+
children: J.map((d) => /* @__PURE__ */ s(
|
|
1879
1987
|
"li",
|
|
1880
1988
|
{
|
|
1881
|
-
ref: (
|
|
1882
|
-
|
|
1989
|
+
ref: (f) => {
|
|
1990
|
+
f ? ze.current.set(d.id, f) : ze.current.delete(d.id);
|
|
1883
1991
|
},
|
|
1884
1992
|
children: /* @__PURE__ */ s(
|
|
1885
|
-
|
|
1993
|
+
qr,
|
|
1886
1994
|
{
|
|
1887
|
-
module:
|
|
1888
|
-
expanded:
|
|
1889
|
-
onToggle:
|
|
1890
|
-
itemsState: (
|
|
1891
|
-
today:
|
|
1892
|
-
showDiagnostics:
|
|
1893
|
-
headingLevel:
|
|
1894
|
-
breakpoints:
|
|
1895
|
-
toggleRef:
|
|
1995
|
+
module: d,
|
|
1996
|
+
expanded: Be.includes(d.id),
|
|
1997
|
+
onToggle: wn,
|
|
1998
|
+
itemsState: (v == null ? void 0 : v.items.get(d.id)) ?? De(d.id),
|
|
1999
|
+
today: xe,
|
|
2000
|
+
showDiagnostics: i,
|
|
2001
|
+
headingLevel: Qe,
|
|
2002
|
+
breakpoints: A,
|
|
2003
|
+
toggleRef: Pn,
|
|
2004
|
+
searchTerm: me
|
|
1896
2005
|
}
|
|
1897
2006
|
)
|
|
1898
2007
|
},
|
|
1899
|
-
|
|
2008
|
+
d.id
|
|
1900
2009
|
))
|
|
1901
2010
|
}
|
|
1902
2011
|
)
|
|
1903
2012
|
] }),
|
|
1904
|
-
|
|
1905
|
-
|
|
2013
|
+
An ? /* @__PURE__ */ s(
|
|
2014
|
+
Kt,
|
|
1906
2015
|
{
|
|
1907
2016
|
as: "nav",
|
|
1908
2017
|
variant: "compact",
|
|
@@ -1912,21 +2021,20 @@ function $r({
|
|
|
1912
2021
|
labelPrev: E("paginationPreviousPage"),
|
|
1913
2022
|
labelNext: E("paginationNextPage"),
|
|
1914
2023
|
labelLast: E("paginationLastPage"),
|
|
1915
|
-
screenReaderLabelPageButton: (
|
|
2024
|
+
screenReaderLabelPageButton: (d) => E("paginationPageLabel", { page: d }),
|
|
1916
2025
|
ellipsis: E("paginationEllipsis"),
|
|
1917
|
-
totalPageNumber:
|
|
1918
|
-
currentPage:
|
|
1919
|
-
disabled:
|
|
1920
|
-
onPageChange: (
|
|
2026
|
+
totalPageNumber: P,
|
|
2027
|
+
currentPage: y,
|
|
2028
|
+
disabled: w,
|
|
2029
|
+
onPageChange: (d) => Fe(d),
|
|
1921
2030
|
"data-testid": "modules-pagination"
|
|
1922
|
-
}
|
|
1923
|
-
S
|
|
2031
|
+
}
|
|
1924
2032
|
) : null
|
|
1925
2033
|
] });
|
|
1926
2034
|
}
|
|
1927
|
-
const
|
|
1928
|
-
|
|
1929
|
-
),
|
|
2035
|
+
const os = ki(
|
|
2036
|
+
ss
|
|
2037
|
+
), Me = [
|
|
1930
2038
|
"assignment",
|
|
1931
2039
|
"quiz",
|
|
1932
2040
|
"discussion",
|
|
@@ -1935,7 +2043,7 @@ const Ur = hi(
|
|
|
1935
2043
|
"external_url",
|
|
1936
2044
|
"external_tool",
|
|
1937
2045
|
"sub_header"
|
|
1938
|
-
],
|
|
2046
|
+
], st = [
|
|
1939
2047
|
"not_started",
|
|
1940
2048
|
"in_progress",
|
|
1941
2049
|
"complete",
|
|
@@ -1943,30 +2051,30 @@ const Ur = hi(
|
|
|
1943
2051
|
"incomplete",
|
|
1944
2052
|
"missing_and_incomplete",
|
|
1945
2053
|
"locked"
|
|
1946
|
-
],
|
|
2054
|
+
], fn = [
|
|
1947
2055
|
"must_view",
|
|
1948
2056
|
"must_submit",
|
|
1949
2057
|
"must_contribute",
|
|
1950
2058
|
"must_mark_done",
|
|
1951
2059
|
"min_score",
|
|
1952
2060
|
"min_percentage"
|
|
1953
|
-
],
|
|
2061
|
+
], ls = ["assignment", "quiz", "discussion"], as = ["external_url", "external_tool"], us = ["assignment", "quiz", "discussion"], ds = Date.UTC(2025, 0, 6), cs = 864e5, le = "1", hn = (e) => new Date(ds + e * cs).toISOString(), Re = [
|
|
1954
2062
|
"min_score",
|
|
1955
2063
|
"min_percentage"
|
|
1956
|
-
],
|
|
1957
|
-
(e) => !
|
|
1958
|
-
),
|
|
2064
|
+
], ms = fn.filter(
|
|
2065
|
+
(e) => !Re.includes(e)
|
|
2066
|
+
), gs = [
|
|
1959
2067
|
"in_progress",
|
|
1960
2068
|
"incomplete",
|
|
1961
2069
|
"missing_and_incomplete"
|
|
1962
|
-
],
|
|
1963
|
-
const o = n ?
|
|
1964
|
-
return
|
|
1965
|
-
},
|
|
2070
|
+
], ps = (e, t, n, i) => {
|
|
2071
|
+
const o = n ? fn : ms, r = n && i ? Re[t % Re.length] : o[Math.floor(t / 3) % o.length];
|
|
2072
|
+
return r === "min_score" ? { itemId: e, type: r, minScore: 10 } : r === "min_percentage" ? { itemId: e, type: r, minPercentage: 80 } : { itemId: e, type: r };
|
|
2073
|
+
}, fs = (e, t, n, i) => e === "sub_header" ? !1 : n && i || t % 3 === 0, ct = (e) => st[(e - 1) % st.length], hs = (e, t) => !us.includes(e) || e === "discussion" && Math.floor(t / Me.length) % 2 === 1 ? null : 5 + t % 4 * 5, Is = (e, t, n, i) => t ? e === "missing" ? n != null || i % 2 === 0 : e === "missing_and_incomplete" ? i % 2 === 1 : !1 : !1, Ms = (e, t, n, i) => {
|
|
1966
2074
|
if (e === "locked") return "locked";
|
|
1967
|
-
if (
|
|
2075
|
+
if (Is(e, t, n, i)) return "missing";
|
|
1968
2076
|
if (!n) return;
|
|
1969
|
-
const o = t &&
|
|
2077
|
+
const o = t && Re.includes(n.type);
|
|
1970
2078
|
switch (e) {
|
|
1971
2079
|
case "not_started":
|
|
1972
2080
|
case "missing":
|
|
@@ -1975,122 +2083,122 @@ const Ur = hi(
|
|
|
1975
2083
|
return "complete";
|
|
1976
2084
|
case "incomplete":
|
|
1977
2085
|
case "missing_and_incomplete":
|
|
1978
|
-
return o &&
|
|
2086
|
+
return o && i % 2 === 0 ? "incomplete" : "complete";
|
|
1979
2087
|
case "in_progress":
|
|
1980
|
-
return o ?
|
|
2088
|
+
return o ? i % 3 === 0 ? "complete" : i % 3 === 1 ? "in_progress" : "not_started" : i % 2 === 0 ? "complete" : "not_started";
|
|
1981
2089
|
default:
|
|
1982
2090
|
return e;
|
|
1983
2091
|
}
|
|
1984
|
-
},
|
|
1985
|
-
const
|
|
2092
|
+
}, _s = (e) => e.status === "complete", Es = (e, t, n, i, o, r, a, l) => {
|
|
2093
|
+
const u = String(e), c = Me[i % Me.length], p = c === "sub_header", m = ls.includes(c) && (i % 4 === 0 || o === "missing");
|
|
1986
2094
|
return {
|
|
1987
2095
|
id: n,
|
|
1988
|
-
moduleId:
|
|
1989
|
-
title: `${
|
|
1990
|
-
type:
|
|
2096
|
+
moduleId: u,
|
|
2097
|
+
title: `${c} ${t + 1}`,
|
|
2098
|
+
type: c,
|
|
1991
2099
|
position: t + 1,
|
|
1992
2100
|
indent: t % 5 === 4 ? 1 : 0,
|
|
1993
|
-
published:
|
|
1994
|
-
url:
|
|
1995
|
-
newTab:
|
|
1996
|
-
completionRequirement:
|
|
1997
|
-
dueAt:
|
|
2101
|
+
published: l === "teacher" ? i % 7 !== 0 : !0,
|
|
2102
|
+
url: p ? null : `/courses/${le}/modules/items/${n}`,
|
|
2103
|
+
newTab: as.includes(c) && i % 2 === 0,
|
|
2104
|
+
completionRequirement: a,
|
|
2105
|
+
dueAt: m ? hn(i % 90) : null,
|
|
1998
2106
|
status: o,
|
|
1999
|
-
pointsPossible:
|
|
2000
|
-
extensions:
|
|
2107
|
+
pointsPossible: r,
|
|
2108
|
+
extensions: ot(
|
|
2001
2109
|
void 0,
|
|
2002
|
-
|
|
2110
|
+
i % 37 === 0 ? 5 + i % 4 * 10 : null
|
|
2003
2111
|
)
|
|
2004
2112
|
};
|
|
2005
|
-
},
|
|
2006
|
-
const o =
|
|
2007
|
-
let
|
|
2008
|
-
for (let
|
|
2009
|
-
const
|
|
2010
|
-
|
|
2113
|
+
}, Ss = (e, t, n, i) => {
|
|
2114
|
+
const o = ct(e), r = gs.includes(o), a = [];
|
|
2115
|
+
let l = 0;
|
|
2116
|
+
for (let u = 0; u < t; u += 1) {
|
|
2117
|
+
const c = n + u, p = Me[c % Me.length], m = hs(p, c), h = m !== null, S = h ? l++ : u, M = String(e * 1e3 + u + 1), T = fs(p, c, h, r) ? ps(M, c, h, r) : null, D = Ms(o, h, T, S);
|
|
2118
|
+
a.push(Es(e, u, M, c, D, m, T, i));
|
|
2011
2119
|
}
|
|
2012
|
-
return
|
|
2013
|
-
},
|
|
2014
|
-
const o =
|
|
2120
|
+
return a;
|
|
2121
|
+
}, Ts = (e, t, n, i) => {
|
|
2122
|
+
const o = ct(e);
|
|
2015
2123
|
if (o === "locked" || o === "not_started") return o;
|
|
2016
2124
|
if (t.length === 0) return "not_started";
|
|
2017
|
-
if (!t.some((
|
|
2125
|
+
if (!t.some((r) => r.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && i === 0) return "in_progress";
|
|
2018
2126
|
if (o === "missing_and_incomplete") {
|
|
2019
|
-
if (n === 0 &&
|
|
2127
|
+
if (n === 0 && i === 0) return "in_progress";
|
|
2020
2128
|
if (n === 0) return "incomplete";
|
|
2021
|
-
if (
|
|
2129
|
+
if (i === 0) return "missing";
|
|
2022
2130
|
}
|
|
2023
2131
|
return o;
|
|
2024
|
-
},
|
|
2025
|
-
const
|
|
2132
|
+
}, ys = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, bs = (e, t, n) => {
|
|
2133
|
+
const i = t.filter((c) => c.completionRequirement), o = n ?? i.length, r = Math.min(i.filter(_s).length, o), a = t.filter((c) => c.status === "missing").length, l = t.filter((c) => c.status === "incomplete").length;
|
|
2026
2134
|
return {
|
|
2027
|
-
status:
|
|
2028
|
-
requirementsMet:
|
|
2135
|
+
status: Ts(e, t, a, l),
|
|
2136
|
+
requirementsMet: r,
|
|
2029
2137
|
requirementCount: o,
|
|
2030
|
-
percentComplete: o > 0 ? Math.round(
|
|
2031
|
-
nextDueAt:
|
|
2032
|
-
missingCount:
|
|
2033
|
-
incompleteCount:
|
|
2138
|
+
percentComplete: o > 0 ? Math.round(r / o * 100) : 0,
|
|
2139
|
+
nextDueAt: ys(t),
|
|
2140
|
+
missingCount: a,
|
|
2141
|
+
incompleteCount: l
|
|
2034
2142
|
};
|
|
2035
|
-
},
|
|
2036
|
-
const
|
|
2143
|
+
}, Ps = (e, t, n) => {
|
|
2144
|
+
const i = ct(e), o = e % 2 !== 0 && i !== "incomplete" && i !== "missing_and_incomplete" ? 1 : null;
|
|
2037
2145
|
return {
|
|
2038
2146
|
id: String(e),
|
|
2039
2147
|
name: `Module ${e}`,
|
|
2040
2148
|
position: e,
|
|
2041
2149
|
published: n === "teacher" ? e % 4 !== 0 : !0,
|
|
2042
2150
|
itemCount: t.length,
|
|
2043
|
-
unlockAt: e % 5 === 0 ?
|
|
2151
|
+
unlockAt: e % 5 === 0 ? hn(e) : null,
|
|
2044
2152
|
prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
|
|
2045
2153
|
requirementCount: o,
|
|
2046
2154
|
requireSequentialProgress: e % 6 === 0,
|
|
2047
2155
|
completionRequirements: t.flatMap(
|
|
2048
|
-
(
|
|
2156
|
+
(r) => r.completionRequirement ? [r.completionRequirement] : []
|
|
2049
2157
|
),
|
|
2050
|
-
progress:
|
|
2158
|
+
progress: bs(e, t, o)
|
|
2051
2159
|
};
|
|
2052
2160
|
};
|
|
2053
|
-
function
|
|
2161
|
+
function Cs(e) {
|
|
2054
2162
|
return {
|
|
2055
2163
|
courseId: e.courseId,
|
|
2056
2164
|
modules: e.modules.map(({ progress: t, ...n }) => n),
|
|
2057
2165
|
itemsByModuleId: Object.fromEntries(
|
|
2058
2166
|
Object.entries(e.itemsByModuleId).map(([t, n]) => [
|
|
2059
2167
|
t,
|
|
2060
|
-
n.map(({ status:
|
|
2168
|
+
n.map(({ status: i, ...o }) => o)
|
|
2061
2169
|
])
|
|
2062
2170
|
)
|
|
2063
2171
|
};
|
|
2064
2172
|
}
|
|
2065
|
-
function
|
|
2066
|
-
const n = t.view ?? "student",
|
|
2067
|
-
let
|
|
2068
|
-
e.forEach((
|
|
2069
|
-
const
|
|
2070
|
-
|
|
2173
|
+
function Oe(e, t = {}) {
|
|
2174
|
+
const n = t.view ?? "student", i = t.courseId ?? le, o = [], r = {};
|
|
2175
|
+
let a = 0;
|
|
2176
|
+
e.forEach((u, c) => {
|
|
2177
|
+
const p = c + 1, m = Ss(p, u, a, n);
|
|
2178
|
+
a += u, o.push(Ps(p, m, n)), r[String(p)] = m;
|
|
2071
2179
|
});
|
|
2072
|
-
const
|
|
2073
|
-
return n === "teacher" ?
|
|
2180
|
+
const l = { courseId: i, modules: o, itemsByModuleId: r };
|
|
2181
|
+
return n === "teacher" ? Cs(l) : l;
|
|
2074
2182
|
}
|
|
2075
|
-
const
|
|
2076
|
-
function
|
|
2077
|
-
return
|
|
2183
|
+
const he = (e) => `/courses/${le}/modules/items/${e}`, Bt = "2099-08-31T06:59:00Z", vs = "2020-01-06T07:00:00Z", ws = st.length, Ls = 8, As = 120, Rs = 25, ks = 250, Gt = 8;
|
|
2184
|
+
function Io() {
|
|
2185
|
+
return Oe(Array.from({ length: ws }, () => Ls));
|
|
2078
2186
|
}
|
|
2079
|
-
function
|
|
2080
|
-
return
|
|
2187
|
+
function Mo() {
|
|
2188
|
+
return Oe(Array.from({ length: As }, () => Rs));
|
|
2081
2189
|
}
|
|
2082
|
-
function
|
|
2083
|
-
return
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2190
|
+
function _o() {
|
|
2191
|
+
return Oe([
|
|
2192
|
+
Gt,
|
|
2193
|
+
ks,
|
|
2194
|
+
Gt
|
|
2087
2195
|
]);
|
|
2088
2196
|
}
|
|
2089
|
-
function
|
|
2090
|
-
const e = (
|
|
2091
|
-
id: String(
|
|
2092
|
-
name:
|
|
2093
|
-
position:
|
|
2197
|
+
function Eo() {
|
|
2198
|
+
const e = (r, a, l) => ({
|
|
2199
|
+
id: String(r),
|
|
2200
|
+
name: a,
|
|
2201
|
+
position: r,
|
|
2094
2202
|
published: !0,
|
|
2095
2203
|
itemCount: 0,
|
|
2096
2204
|
prerequisiteModules: [],
|
|
@@ -2103,29 +2211,29 @@ function Xs() {
|
|
|
2103
2211
|
missingCount: 0,
|
|
2104
2212
|
incompleteCount: 0
|
|
2105
2213
|
},
|
|
2106
|
-
...
|
|
2107
|
-
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" },
|
|
2108
|
-
e(1, "Locked by a future date", { unlockAt:
|
|
2214
|
+
...l
|
|
2215
|
+
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, i = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, o = [
|
|
2216
|
+
e(1, "Locked by a future date", { unlockAt: Bt }),
|
|
2109
2217
|
e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
|
|
2110
2218
|
e(3, "Locked by several prerequisites", {
|
|
2111
2219
|
prerequisiteModules: [t, n]
|
|
2112
2220
|
}),
|
|
2113
2221
|
e(4, "Locked by a date and a prerequisite", {
|
|
2114
|
-
unlockAt:
|
|
2115
|
-
prerequisiteModules: [
|
|
2222
|
+
unlockAt: Bt,
|
|
2223
|
+
prerequisiteModules: [i]
|
|
2116
2224
|
}),
|
|
2117
|
-
e(5, "Locked, and the unlock date has passed", { unlockAt:
|
|
2225
|
+
e(5, "Locked, and the unlock date has passed", { unlockAt: vs })
|
|
2118
2226
|
];
|
|
2119
2227
|
return {
|
|
2120
|
-
courseId:
|
|
2228
|
+
courseId: le,
|
|
2121
2229
|
modules: o,
|
|
2122
|
-
itemsByModuleId: Object.fromEntries(o.map((
|
|
2230
|
+
itemsByModuleId: Object.fromEntries(o.map((r) => [r.id, []]))
|
|
2123
2231
|
};
|
|
2124
2232
|
}
|
|
2125
|
-
function
|
|
2126
|
-
return
|
|
2233
|
+
function So() {
|
|
2234
|
+
return Oe([]);
|
|
2127
2235
|
}
|
|
2128
|
-
function
|
|
2236
|
+
function To() {
|
|
2129
2237
|
const t = [
|
|
2130
2238
|
{
|
|
2131
2239
|
title: "Every fact: type, due date, points, requirement",
|
|
@@ -2154,7 +2262,7 @@ function eo() {
|
|
|
2154
2262
|
title: "Career item carrying an estimated duration",
|
|
2155
2263
|
type: "external_tool",
|
|
2156
2264
|
completionRequirement: { itemId: "5", type: "must_view" },
|
|
2157
|
-
extensions:
|
|
2265
|
+
extensions: ot(void 0, 45)
|
|
2158
2266
|
},
|
|
2159
2267
|
{ title: "A file, ungradeable, so no points at all", type: "file" },
|
|
2160
2268
|
{ title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
|
|
@@ -2170,19 +2278,19 @@ function eo() {
|
|
|
2170
2278
|
{ title: "Indented three levels", type: "quiz", indent: 3 },
|
|
2171
2279
|
{ title: "Indented four levels", type: "discussion", indent: 4 },
|
|
2172
2280
|
{ title: "Indented five levels, the deepest Canvas allows", type: "page", indent: 5 }
|
|
2173
|
-
].map((n,
|
|
2174
|
-
id: String(
|
|
2281
|
+
].map((n, i) => ({
|
|
2282
|
+
id: String(i + 1),
|
|
2175
2283
|
moduleId: "1",
|
|
2176
|
-
position:
|
|
2284
|
+
position: i + 1,
|
|
2177
2285
|
indent: 0,
|
|
2178
2286
|
published: !0,
|
|
2179
2287
|
newTab: !1,
|
|
2180
|
-
url:
|
|
2288
|
+
url: he(i + 1),
|
|
2181
2289
|
status: "not_started",
|
|
2182
2290
|
...n
|
|
2183
2291
|
}));
|
|
2184
2292
|
return {
|
|
2185
|
-
courseId:
|
|
2293
|
+
courseId: le,
|
|
2186
2294
|
modules: [
|
|
2187
2295
|
{
|
|
2188
2296
|
id: "1",
|
|
@@ -2197,13 +2305,13 @@ function eo() {
|
|
|
2197
2305
|
itemsByModuleId: { 1: t }
|
|
2198
2306
|
};
|
|
2199
2307
|
}
|
|
2200
|
-
function
|
|
2308
|
+
function yo() {
|
|
2201
2309
|
const t = [
|
|
2202
|
-
{ title: "Reading: limits from the left and the right", type: "page", url:
|
|
2310
|
+
{ title: "Reading: limits from the left and the right", type: "page", url: he(1) },
|
|
2203
2311
|
{
|
|
2204
2312
|
title: "Desmos: interactive limit explorer",
|
|
2205
2313
|
type: "external_url",
|
|
2206
|
-
url:
|
|
2314
|
+
url: he(2),
|
|
2207
2315
|
newTab: !0
|
|
2208
2316
|
},
|
|
2209
2317
|
{ title: "Practice", type: "sub_header", url: null },
|
|
@@ -2211,13 +2319,13 @@ function to() {
|
|
|
2211
2319
|
{
|
|
2212
2320
|
title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
|
|
2213
2321
|
type: "assignment",
|
|
2214
|
-
url:
|
|
2322
|
+
url: he(5)
|
|
2215
2323
|
},
|
|
2216
|
-
{ title: "Unit test", type: "quiz", url:
|
|
2217
|
-
].map((n,
|
|
2218
|
-
id: String(
|
|
2324
|
+
{ title: "Unit test", type: "quiz", url: he(6), status: "locked" }
|
|
2325
|
+
].map((n, i) => ({
|
|
2326
|
+
id: String(i + 1),
|
|
2219
2327
|
moduleId: "1",
|
|
2220
|
-
position:
|
|
2328
|
+
position: i + 1,
|
|
2221
2329
|
indent: 0,
|
|
2222
2330
|
published: !0,
|
|
2223
2331
|
newTab: !1,
|
|
@@ -2225,7 +2333,7 @@ function to() {
|
|
|
2225
2333
|
...n
|
|
2226
2334
|
}));
|
|
2227
2335
|
return {
|
|
2228
|
-
courseId:
|
|
2336
|
+
courseId: le,
|
|
2229
2337
|
modules: [
|
|
2230
2338
|
{
|
|
2231
2339
|
id: "1",
|
|
@@ -2241,126 +2349,126 @@ function to() {
|
|
|
2241
2349
|
};
|
|
2242
2350
|
}
|
|
2243
2351
|
export {
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2352
|
+
mo as ACTION_ORDER_LTI_FLOOR,
|
|
2353
|
+
we as ALL_FILTER,
|
|
2354
|
+
Co as ActionEntrySchema,
|
|
2355
|
+
vo as CompletionRequirementSchema,
|
|
2356
|
+
wo as CompletionRequirementTypeSchema,
|
|
2357
|
+
Lo as DEFAULT_INLINE_THRESHOLD,
|
|
2358
|
+
Ao as DEFAULT_ITEM_CONCURRENCY,
|
|
2359
|
+
Ro as DEFAULT_ITEM_PAGE_SIZE,
|
|
2360
|
+
ko as DEFAULT_LOCALE,
|
|
2361
|
+
Oo as DEFAULT_MOBILE_PAGE_SIZE,
|
|
2362
|
+
Do as DEFAULT_PAGE_SIZE,
|
|
2363
|
+
qo as DEFAULT_RETAIN_COLLAPSED_LIMIT,
|
|
2364
|
+
zo as DEFAULT_STALE_TIME_MS,
|
|
2365
|
+
No as DUE_THIS_WEEK_DAYS,
|
|
2366
|
+
xo as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
|
|
2367
|
+
ri as EXT_ORGANIZE_ADDED_ITEM_COUNT,
|
|
2368
|
+
si as EXT_ORGANIZE_NEW_MODULE,
|
|
2369
|
+
oi as EXT_ORGANIZE_NEW_PLACEMENT,
|
|
2370
|
+
ii as EXT_SUPPRESS_ITEM_NUMBERING,
|
|
2371
|
+
le as FIXTURE_COURSE_ID,
|
|
2372
|
+
$o as FilterClauseSchema,
|
|
2373
|
+
Fo as FilterEntrySchema,
|
|
2374
|
+
_r as FilterSelect,
|
|
2375
|
+
sr as GET_MODULES,
|
|
2376
|
+
lr as GET_MODULE_ITEMS,
|
|
2377
|
+
qn as INLINE_ITEM_LIMIT,
|
|
2378
|
+
kn as INLINE_QUERY_NODE_BUDGET,
|
|
2379
|
+
Uo as InMemoryCourseMismatchError,
|
|
2380
|
+
Bo as ItemDueSoonPill,
|
|
2381
|
+
Go as ItemTypeEntrySchema,
|
|
2382
|
+
nt as MAX_DIRECTION_CHARS,
|
|
2383
|
+
Ho as MetaFieldEntrySchema,
|
|
2384
|
+
qr as ModuleCard,
|
|
2385
|
+
Jn as ModuleDueSoonPill,
|
|
2386
|
+
ni as ModuleItemRow,
|
|
2387
|
+
Wo as ModuleItemSchema,
|
|
2388
|
+
Yo as ModuleItemStatusPill,
|
|
2389
|
+
jo as ModuleItemStatusSchema,
|
|
2390
|
+
Qo as ModuleItemTypeSchema,
|
|
2391
|
+
On as ModuleItemsPageSchema,
|
|
2392
|
+
Ko as ModuleProgressSchema,
|
|
2393
|
+
Vo as ModuleSchema,
|
|
2394
|
+
Kn as ModuleStatusPill,
|
|
2395
|
+
Zo as ModuleStatusSchema,
|
|
2396
|
+
Xo as ModulesAnalyticsProvider,
|
|
2397
|
+
ai as ModulesConfigProvider,
|
|
2398
|
+
xn as ModulesConfigSchema,
|
|
2399
|
+
li as ModulesI18nProvider,
|
|
2400
|
+
os as ModulesList,
|
|
2401
|
+
Jo as ModulesPageInfoSchema,
|
|
2402
|
+
Dn as ModulesPageSchema,
|
|
2403
|
+
ci as ModulesProgressBar,
|
|
2404
|
+
gr as NEW_PLACEMENT_FIELD,
|
|
2405
|
+
mn as ORGANIZE_CONTENT_TYPES,
|
|
2406
|
+
ho as ORGANIZE_MODES,
|
|
2407
|
+
Kr as ORGANIZE_SLOW_AFTER_MS,
|
|
2408
|
+
$r as OrganizeForm,
|
|
2409
|
+
ts as OrganizeModulesButton,
|
|
2410
|
+
es as OrganizeModulesModal,
|
|
2411
|
+
gn as PROPOSAL_PREVIEW_COURSE_ID,
|
|
2412
|
+
el as PageInfoSchema,
|
|
2413
|
+
Zt as PartialCanvasResponseError,
|
|
2414
|
+
tl as PrerequisiteModuleSchema,
|
|
2415
|
+
Qr as ProposalPreview,
|
|
2416
|
+
nl as RegistryEntrySchema,
|
|
2417
|
+
il as TYPE_FIELD,
|
|
2418
|
+
rl as baseFilters,
|
|
2419
|
+
Bn as baseModulesConfig,
|
|
2420
|
+
Oe as buildFixture,
|
|
2421
|
+
So as courseEmpty,
|
|
2422
|
+
_o as courseFatModule,
|
|
2423
|
+
yo as courseItemLinks,
|
|
2424
|
+
To as courseItemRowVariants,
|
|
2425
|
+
Mo as courseLarge,
|
|
2426
|
+
Eo as courseLockReasons,
|
|
2427
|
+
Io as courseSmall,
|
|
2428
|
+
mr as createActionContext,
|
|
2429
|
+
co as createCanvasGraphqlAdapter,
|
|
2430
|
+
ui as createInMemoryAdapter,
|
|
2431
|
+
sl as createTranslate,
|
|
2432
|
+
ol as defaultFormatters,
|
|
2433
|
+
zr as defaultOrganizeInput,
|
|
2434
|
+
ll as defaultTranslate,
|
|
2435
|
+
al as filterClauseOf,
|
|
2436
|
+
Fn as getAddedItemCount,
|
|
2437
|
+
ul as getEstimatedDurationMinutes,
|
|
2438
|
+
$t as hasOrganizeInputErrors,
|
|
2439
|
+
dl as hideUnservableFilters,
|
|
2440
|
+
cl as invalidateCourse,
|
|
2441
|
+
zn as invalidateModuleItems,
|
|
2442
|
+
Ct as invalidateModuleList,
|
|
2443
|
+
Un as isNewPlacement,
|
|
2444
|
+
ml as isPredicateServed,
|
|
2445
|
+
$n as isProposedNewModule,
|
|
2446
|
+
oe as mergeRegistry,
|
|
2447
|
+
gl as moduleItemStatusLabel,
|
|
2448
|
+
pl as moduleItemsPrefix,
|
|
2449
|
+
fl as moduleStatusLabel,
|
|
2450
|
+
hl as modulesKeys,
|
|
2451
|
+
Il as modulesListPrefix,
|
|
2452
|
+
hr as organizePreviewConfig,
|
|
2453
|
+
po as partialModulesConfig,
|
|
2454
|
+
Wr as proposalToFixture,
|
|
2455
|
+
Ml as registrySchema,
|
|
2456
|
+
dn as resolveModulesConfig,
|
|
2457
|
+
_l as servesClause,
|
|
2458
|
+
Zn as suppressesItemNumbering,
|
|
2459
|
+
El as unservableFilters,
|
|
2460
|
+
fo as useActionContext,
|
|
2461
|
+
Sl as useFieldVisible,
|
|
2462
|
+
ut as useFormatters,
|
|
2463
|
+
Tl as useModules,
|
|
2464
|
+
at as useModulesAnalytics,
|
|
2465
|
+
ke as useModulesConfig,
|
|
2466
|
+
F as useModulesI18n,
|
|
2467
|
+
di as useModulesPageData,
|
|
2468
|
+
Jr as useOrganizeModules,
|
|
2469
|
+
xt as validateOrganizeInput,
|
|
2470
|
+
go as visibleActions,
|
|
2471
|
+
lt as visibleEntries,
|
|
2472
|
+
yl as visibleEntry,
|
|
2473
|
+
ot as withEstimatedDurationMinutes
|
|
2366
2474
|
};
|