@instructure/platform-modules 1.13.0 → 1.15.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 +1 -0
- package/dist/adapters/canvasGraphql/normalize.d.ts.map +1 -1
- package/dist/adapters/canvasGraphql/queries.d.ts +13 -1
- package/dist/adapters/canvasGraphql/queries.d.ts.map +1 -1
- package/dist/adapters/inMemory.d.ts.map +1 -1
- package/dist/chunks/ModulesProgressBar-DOUI1JeK.js +2532 -0
- package/dist/components/FilterSelect.d.ts.map +1 -1
- package/dist/components/ModuleCard.d.ts.map +1 -1
- package/dist/components/ModuleItemRow.d.ts +3 -4
- package/dist/components/ModuleItemRow.d.ts.map +1 -1
- package/dist/components/ModulesList.stories.d.ts +1 -1
- package/dist/components/ModulesList.stories.d.ts.map +1 -1
- package/dist/components/ModulesProgressBar.d.ts +5 -1
- package/dist/components/ModulesProgressBar.d.ts.map +1 -1
- package/dist/edit/EditModuleCard.d.ts +19 -0
- package/dist/edit/EditModuleCard.d.ts.map +1 -0
- package/dist/edit/EditModuleItemRow.d.ts +10 -0
- package/dist/edit/EditModuleItemRow.d.ts.map +1 -0
- package/dist/edit/ModulesEditActions.d.ts +7 -0
- package/dist/edit/ModulesEditActions.d.ts.map +1 -0
- package/dist/edit/ModulesEditView.d.ts +10 -0
- package/dist/edit/ModulesEditView.d.ts.map +1 -0
- package/dist/edit/ModulesEditView.stories.d.ts +17 -0
- package/dist/edit/ModulesEditView.stories.d.ts.map +1 -0
- package/dist/edit/controls/AddItemMenu.d.ts +6 -0
- package/dist/edit/controls/AddItemMenu.d.ts.map +1 -0
- package/dist/edit/controls/AddModuleButton.d.ts +6 -0
- package/dist/edit/controls/AddModuleButton.d.ts.map +1 -0
- package/dist/edit/controls/DragHandle.d.ts +12 -0
- package/dist/edit/controls/DragHandle.d.ts.map +1 -0
- package/dist/edit/controls/InlineRename.d.ts +5 -0
- package/dist/edit/controls/InlineRename.d.ts.map +1 -0
- package/dist/edit/controls/ItemActionsMenu.d.ts +7 -0
- package/dist/edit/controls/ItemActionsMenu.d.ts.map +1 -0
- package/dist/edit/controls/ItemPublishToggle.d.ts +6 -0
- package/dist/edit/controls/ItemPublishToggle.d.ts.map +1 -0
- package/dist/edit/controls/ModuleActionsMenu.d.ts +6 -0
- package/dist/edit/controls/ModuleActionsMenu.d.ts.map +1 -0
- package/dist/edit/controls/ModulePublishMenu.d.ts +6 -0
- package/dist/edit/controls/ModulePublishMenu.d.ts.map +1 -0
- package/dist/edit/controls/ModuleSettingsModal.d.ts +6 -0
- package/dist/edit/controls/ModuleSettingsModal.d.ts.map +1 -0
- package/dist/edit/controls/PublishAllMenu.d.ts +6 -0
- package/dist/edit/controls/PublishAllMenu.d.ts.map +1 -0
- package/dist/edit/controls/ViewAsLearnerButton.d.ts +6 -0
- package/dist/edit/controls/ViewAsLearnerButton.d.ts.map +1 -0
- package/dist/edit/dnd/EditDndProvider.d.ts +18 -0
- package/dist/edit/dnd/EditDndProvider.d.ts.map +1 -0
- package/dist/edit/dnd/announcements.d.ts +24 -0
- package/dist/edit/dnd/announcements.d.ts.map +1 -0
- package/dist/edit/dnd/ids.d.ts +41 -0
- package/dist/edit/dnd/ids.d.ts.map +1 -0
- package/dist/edit/index.d.ts +6 -0
- package/dist/edit/index.d.ts.map +1 -1
- package/dist/edit.js +794 -131
- package/dist/hooks/useModulesPageData.d.ts.map +1 -1
- package/dist/index.js +1223 -1986
- package/dist/types/domain.d.ts +2 -0
- package/dist/types/domain.d.ts.map +1 -1
- package/dist/types/schemas.d.ts.map +1 -1
- package/locales/en.json +23 -1
- package/package.json +1 -1
- package/dist/chunks/useModulesPageData-BFCZuChP.js +0 -1639
package/dist/index.js
CHANGED
|
@@ -1,68 +1,49 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { ScreenReaderContent as
|
|
11
|
-
import { SimpleSelect as
|
|
12
|
-
import { Text as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { WithBreakpoints as
|
|
28
|
-
import { Modal as
|
|
29
|
-
import { CheckboxGroup as
|
|
30
|
-
import { RadioInputGroup as
|
|
31
|
-
import { TextArea as
|
|
32
|
-
|
|
33
|
-
const $n = or(null), Or = () => {
|
|
34
|
-
};
|
|
35
|
-
function Ql({
|
|
36
|
-
host: e,
|
|
37
|
-
onEvent: t,
|
|
38
|
-
children: n
|
|
39
|
-
}) {
|
|
40
|
-
const o = k(t);
|
|
41
|
-
o.current = t;
|
|
42
|
-
const i = F(
|
|
43
|
-
() => (s) => o.current({ event: s, host: e }),
|
|
44
|
-
[e]
|
|
45
|
-
);
|
|
46
|
-
return /* @__PURE__ */ r($n.Provider, { value: i, children: n });
|
|
47
|
-
}
|
|
48
|
-
function Ve() {
|
|
49
|
-
return rr($n) ?? Or;
|
|
50
|
-
}
|
|
51
|
-
function Fn(e) {
|
|
1
|
+
import { w as Ve, I as Sn, M as yn, a as Tn, b as bn, i as ft, c as Pn, v as Ze, h as Cn, o as Ue, m as ne, d as vn, e as Ln, g as wn, f as An, j as Rn, u as x, k as Te, D as kn, l as _e, n as On, p as Xe, q as Je, r as Dn, s as qn, t as zn, x as Nn, y as Ot, z as xn, A as Dt, B as qt, C as $n, E as Un, F as Fn, G as Bn, H as Gn, J as Wn, K as Hn, L as Yn, N as jn, O as Qn, P as Kn, Q as Vn, R as Zn, S as Ie } from "./chunks/ModulesProgressBar-DOUI1JeK.js";
|
|
2
|
+
import { a8 as io, T as ro, U as so, ao as oo, ap as lo, aq as ao, aF as uo, ar as co, as as mo, at as go, au as po, ab as fo, a4 as ho, V as Mo, ad as _o, a7 as Io, aA as Eo, ag as So, ah as yo, X as To, aC as bo, Y as Po, Z as Co, _ as vo, $ as Lo, a1 as wo, a6 as Ao, a0 as Ro, a2 as ko, a3 as Oo, ai as Do, ak as qo, a9 as zo, aE as No, aa as xo, aG as $o, ac as Uo, a5 as Fo, ae as Bo, aw as Go, af as Wo, aB as Ho, ax as Yo, aD as jo, ay as Qo, az as Ko, aj as Vo, W as Zo, al as Xo, am as Jo, av as el, an as tl } from "./chunks/ModulesProgressBar-DOUI1JeK.js";
|
|
3
|
+
import { canvasFetch as ht } from "@instructure/platform-canvas-fetch";
|
|
4
|
+
import { z as Mt } from "zod";
|
|
5
|
+
import { gql as J } from "graphql-tag";
|
|
6
|
+
import { jsx as s, jsxs as m, Fragment as W } from "react/jsx-runtime";
|
|
7
|
+
import { Pill as Xn } from "@instructure/ui-pill/v11_7";
|
|
8
|
+
import { useQueryClient as Jn, QueryClient as ei, QueryClientProvider as ti } from "@tanstack/react-query";
|
|
9
|
+
import { useCallback as U, useMemo as F, useId as ni, memo as ii, useRef as k, useEffect as B, useState as G } from "react";
|
|
10
|
+
import { ScreenReaderContent as zt } from "@instructure/ui-a11y-content";
|
|
11
|
+
import { SimpleSelect as _t } from "@instructure/ui-simple-select/v11_7";
|
|
12
|
+
import { Text as b } from "@instructure/ui-text/v11_7";
|
|
13
|
+
import { IconArrowOpenUpLine as ri, IconArrowOpenDownLine as si, IconClockLine as Nt, IconAiColoredSolid as oi, IconAiSolid as li } from "@instructure/ui-icons";
|
|
14
|
+
import { politeAnnounce as N, getLiveRegion as Se, TruncateWithTooltip as ai } from "@instructure/platform-instui-bindings";
|
|
15
|
+
import { InstUISettingsProvider as ui } from "@instructure/emotion";
|
|
16
|
+
import { Alert as X } from "@instructure/ui-alerts/v11_7";
|
|
17
|
+
import { IconButton as di, CloseButton as ci, Button as z } from "@instructure/ui-buttons/v11_7";
|
|
18
|
+
import { Flex as _ } from "@instructure/ui-flex/v11_7";
|
|
19
|
+
import { Heading as ue } from "@instructure/ui-heading/v11_7";
|
|
20
|
+
import { Link as mi } from "@instructure/ui-link/v11_7";
|
|
21
|
+
import { List as Ge, ListItem as We } from "@instructure/ui-list/v11_7";
|
|
22
|
+
import { Pagination as xt } from "@instructure/ui-pagination/v11_7";
|
|
23
|
+
import { ProgressBar as gi } from "@instructure/ui-progress/v11_7";
|
|
24
|
+
import { Spinner as et } from "@instructure/ui-spinner/v11_7";
|
|
25
|
+
import { Tooltip as pi } from "@instructure/ui-tooltip/v11_7";
|
|
26
|
+
import { View as M } from "@instructure/ui-view/v11_7";
|
|
27
|
+
import { WithBreakpoints as fi } from "@instructure/platform-with-breakpoints";
|
|
28
|
+
import { Modal as hi, ModalHeader as Mi, ModalBody as _i, ModalFooter as Ii } from "@instructure/ui-modal/v11_7";
|
|
29
|
+
import { CheckboxGroup as It, Checkbox as Fe } from "@instructure/ui-checkbox/v11_7";
|
|
30
|
+
import { RadioInputGroup as Ei, RadioInput as Et } from "@instructure/ui-radio-input/v11_7";
|
|
31
|
+
import { TextArea as Si } from "@instructure/ui-text-area/v11_7";
|
|
32
|
+
function $t(e) {
|
|
52
33
|
return e === "module" ? "module" : "module item";
|
|
53
34
|
}
|
|
54
|
-
class
|
|
55
|
-
constructor(t, n,
|
|
35
|
+
class Ut extends Error {
|
|
36
|
+
constructor(t, n, r) {
|
|
56
37
|
super(
|
|
57
|
-
`Canvas returned ${
|
|
58
|
-
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field =
|
|
38
|
+
`Canvas returned ${$t(t)} ${n} without a usable ${r}. This is a partial response; refusing to guess a value for it.`
|
|
39
|
+
), this.name = "PartialCanvasResponseError", this.subject = t, this.id = n, this.field = r;
|
|
59
40
|
}
|
|
60
41
|
}
|
|
61
|
-
function
|
|
42
|
+
function Ft(e, t, n) {
|
|
62
43
|
if (e != null) return e;
|
|
63
|
-
throw new
|
|
44
|
+
throw new Ut(t, n, "published");
|
|
64
45
|
}
|
|
65
|
-
function
|
|
46
|
+
function yi(e, t) {
|
|
66
47
|
if (e.onUnsupportedItem) {
|
|
67
48
|
e.onUnsupportedItem(t);
|
|
68
49
|
return;
|
|
@@ -71,16 +52,16 @@ function xr(e, t) {
|
|
|
71
52
|
`[platform-modules] dropped module item ${t.id}: content type "${t.typename ?? "null"}" is outside the closed ModuleItemType enum. Pass \`onUnsupportedItem\` to handle these yourself.`
|
|
72
53
|
);
|
|
73
54
|
}
|
|
74
|
-
function
|
|
55
|
+
function Bt(e, t) {
|
|
75
56
|
if (e.onUnsupportedStatus) {
|
|
76
57
|
e.onUnsupportedStatus(t);
|
|
77
58
|
return;
|
|
78
59
|
}
|
|
79
60
|
console.warn(
|
|
80
|
-
`[platform-modules] ${
|
|
61
|
+
`[platform-modules] ${$t(t.subject)} ${t.id}: status "${t.value}" is outside the closed status enum and was ignored. Pass \`onUnsupportedStatus\` to handle these yourself.`
|
|
81
62
|
);
|
|
82
63
|
}
|
|
83
|
-
const
|
|
64
|
+
const Ti = /* @__PURE__ */ new Map([
|
|
84
65
|
["Assignment", "assignment"],
|
|
85
66
|
["Quiz", "quiz"],
|
|
86
67
|
["Discussion", "discussion"],
|
|
@@ -92,21 +73,21 @@ const Dr = /* @__PURE__ */ new Map([
|
|
|
92
73
|
["SubHeader", "sub_header"],
|
|
93
74
|
["PeerReviewSubAssignment", "assignment"]
|
|
94
75
|
]);
|
|
95
|
-
function
|
|
76
|
+
function bi(e) {
|
|
96
77
|
const t = e == null ? void 0 : e.__typename;
|
|
97
78
|
if (!t) return null;
|
|
98
|
-
const n =
|
|
79
|
+
const n = Ti.get(t);
|
|
99
80
|
return n ? n === "assignment" && (e == null ? void 0 : e.isNewQuiz) === !0 ? "quiz" : n : null;
|
|
100
81
|
}
|
|
101
|
-
const
|
|
102
|
-
function
|
|
82
|
+
const Pi = /^P(?!$)(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?!$)(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
|
|
83
|
+
function Gt(e) {
|
|
103
84
|
if (!e) return null;
|
|
104
|
-
const t =
|
|
85
|
+
const t = Pi.exec(e);
|
|
105
86
|
if (!t) return null;
|
|
106
|
-
const [, n, o, i,
|
|
107
|
-
return Math.round(
|
|
87
|
+
const [, n, r, o, i, l] = t, u = Number(n ?? 0) * 7 * 24 * 60 + Number(r ?? 0) * 24 * 60 + Number(o ?? 0) * 60 + Number(i ?? 0) + Number(l ?? 0) / 60;
|
|
88
|
+
return Math.round(u);
|
|
108
89
|
}
|
|
109
|
-
const
|
|
90
|
+
const Ci = /* @__PURE__ */ new Set([
|
|
110
91
|
"must_view",
|
|
111
92
|
"must_mark_done",
|
|
112
93
|
"must_contribute",
|
|
@@ -114,18 +95,18 @@ const qr = /* @__PURE__ */ new Set([
|
|
|
114
95
|
"min_score",
|
|
115
96
|
"min_percentage"
|
|
116
97
|
]);
|
|
117
|
-
function
|
|
118
|
-
return
|
|
98
|
+
function vi(e) {
|
|
99
|
+
return Ci.has(e) ? e : "unknown";
|
|
119
100
|
}
|
|
120
|
-
function
|
|
101
|
+
function Li(e) {
|
|
121
102
|
return {
|
|
122
103
|
itemId: String(e.id),
|
|
123
|
-
type:
|
|
104
|
+
type: vi(e.type),
|
|
124
105
|
minScore: e.minScore ?? null,
|
|
125
106
|
minPercentage: e.minPercentage ?? null
|
|
126
107
|
};
|
|
127
108
|
}
|
|
128
|
-
function
|
|
109
|
+
function Wt(e) {
|
|
129
110
|
return {
|
|
130
111
|
hasNextPage: (e == null ? void 0 : e.hasNextPage) ?? !1,
|
|
131
112
|
endCursor: (e == null ? void 0 : e.endCursor) ?? null,
|
|
@@ -135,36 +116,36 @@ function Hn(e) {
|
|
|
135
116
|
totalNrOfPages: (e == null ? void 0 : e.totalNrOfPages) ?? null
|
|
136
117
|
};
|
|
137
118
|
}
|
|
138
|
-
const
|
|
139
|
-
function
|
|
119
|
+
const wi = /* @__PURE__ */ new Set(["min_score", "min_percentage"]);
|
|
120
|
+
function Ai(e) {
|
|
140
121
|
var t;
|
|
141
122
|
for (const n of ((t = e == null ? void 0 : e.submissionsConnection) == null ? void 0 : t.nodes) ?? [])
|
|
142
123
|
if (n) return n;
|
|
143
124
|
return null;
|
|
144
125
|
}
|
|
145
|
-
function
|
|
126
|
+
function Ht(e, t) {
|
|
146
127
|
if (!e) return;
|
|
147
|
-
const n = new Map(t.map((
|
|
148
|
-
for (const
|
|
149
|
-
if (!
|
|
150
|
-
const l = String(
|
|
151
|
-
n.get(l) ===
|
|
128
|
+
const n = new Map(t.map((i) => [i.itemId, i.type])), r = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
129
|
+
for (const i of e.requirementsMet ?? []) {
|
|
130
|
+
if (!i) continue;
|
|
131
|
+
const l = String(i.id);
|
|
132
|
+
n.get(l) === i.type && r.add(l);
|
|
152
133
|
}
|
|
153
|
-
for (const
|
|
154
|
-
if (!
|
|
155
|
-
const l = String(
|
|
156
|
-
n.get(l) ===
|
|
134
|
+
for (const i of e.incompleteRequirements ?? []) {
|
|
135
|
+
if (!i) continue;
|
|
136
|
+
const l = String(i.id);
|
|
137
|
+
n.get(l) === i.type && wi.has(i.type) && o.set(l, i.score ?? null);
|
|
157
138
|
}
|
|
158
139
|
return {
|
|
159
140
|
locked: e.locked === !0 || e.workflowState === "locked",
|
|
160
141
|
workflowState: e.workflowState ?? null,
|
|
161
142
|
completed: e.completed === !0 || e.workflowState === "completed",
|
|
162
143
|
started: e.started === !0 || e.workflowState === "started",
|
|
163
|
-
requirementsMetItemIds:
|
|
164
|
-
incompleteRequirementScores:
|
|
144
|
+
requirementsMetItemIds: r,
|
|
145
|
+
incompleteRequirementScores: o
|
|
165
146
|
};
|
|
166
147
|
}
|
|
167
|
-
const
|
|
148
|
+
const Ri = /* @__PURE__ */ new Map([
|
|
168
149
|
["LOCKED", "locked"],
|
|
169
150
|
["MISSING", "missing"],
|
|
170
151
|
["INCOMPLETE", "incomplete"],
|
|
@@ -172,16 +153,16 @@ const Gr = /* @__PURE__ */ new Map([
|
|
|
172
153
|
["IN_PROGRESS", "in_progress"],
|
|
173
154
|
["NOT_STARTED", "not_started"]
|
|
174
155
|
]);
|
|
175
|
-
function
|
|
156
|
+
function ki(e, t, n) {
|
|
176
157
|
if (e == null) return;
|
|
177
|
-
const
|
|
178
|
-
return
|
|
158
|
+
const r = Ri.get(e);
|
|
159
|
+
return r || Bt(n, {
|
|
179
160
|
subject: "moduleItem",
|
|
180
161
|
id: String(t),
|
|
181
162
|
value: e
|
|
182
|
-
}),
|
|
163
|
+
}), r;
|
|
183
164
|
}
|
|
184
|
-
const
|
|
165
|
+
const Oi = /* @__PURE__ */ new Map([
|
|
185
166
|
["LOCKED", "locked"],
|
|
186
167
|
["MISSING", "missing"],
|
|
187
168
|
["MISSING_AND_INCOMPLETE", "missing_and_incomplete"],
|
|
@@ -190,128 +171,130 @@ const Hr = /* @__PURE__ */ new Map([
|
|
|
190
171
|
["IN_PROGRESS", "in_progress"],
|
|
191
172
|
["NOT_STARTED", "not_started"]
|
|
192
173
|
]);
|
|
193
|
-
function
|
|
174
|
+
function Di(e, t, n) {
|
|
194
175
|
if (e == null) return;
|
|
195
|
-
const
|
|
196
|
-
return
|
|
176
|
+
const r = Oi.get(e);
|
|
177
|
+
return r || Bt(n, { subject: "module", id: String(t), value: e }), r;
|
|
197
178
|
}
|
|
198
|
-
function
|
|
199
|
-
var
|
|
179
|
+
function qi(e, t, n, r = {}) {
|
|
180
|
+
var a, d;
|
|
200
181
|
if (!n) return;
|
|
201
|
-
const
|
|
202
|
-
(
|
|
182
|
+
const o = e.requirementCount ?? t.length, i = Math.min(n.requirementsMetItemIds.size, o), l = ((a = e.submissionStatistics) == null ? void 0 : a.missingAssignmentCount) ?? 0, u = [...n.incompleteRequirementScores.values()].filter(
|
|
183
|
+
(g) => g != null
|
|
203
184
|
).length;
|
|
204
185
|
return {
|
|
205
|
-
status:
|
|
206
|
-
requirementsMet:
|
|
207
|
-
requirementCount:
|
|
208
|
-
percentComplete:
|
|
209
|
-
nextDueAt: ((
|
|
186
|
+
status: Di(e.moduleStatus, e._id, r) ?? (n.locked ? "locked" : void 0),
|
|
187
|
+
requirementsMet: i,
|
|
188
|
+
requirementCount: o,
|
|
189
|
+
percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
|
|
190
|
+
nextDueAt: ((d = e.submissionStatistics) == null ? void 0 : d.nextDueAt) ?? null,
|
|
210
191
|
missingCount: l,
|
|
211
|
-
incompleteCount:
|
|
192
|
+
incompleteCount: u
|
|
212
193
|
};
|
|
213
194
|
}
|
|
214
|
-
function
|
|
215
|
-
var
|
|
216
|
-
const
|
|
195
|
+
function zi(e, t, n, r = {}, o) {
|
|
196
|
+
var d, g, p;
|
|
197
|
+
const i = String(e._id), l = bi(e.content);
|
|
217
198
|
if (!l)
|
|
218
|
-
return
|
|
219
|
-
const
|
|
199
|
+
return yi(r, { id: i, typename: ((d = e.content) == null ? void 0 : d.__typename) ?? null }), null;
|
|
200
|
+
const u = Ai(e.content), a = n.get(i) ?? null;
|
|
220
201
|
return {
|
|
221
|
-
id:
|
|
202
|
+
id: i,
|
|
222
203
|
moduleId: t,
|
|
223
204
|
title: e.title ?? "",
|
|
224
205
|
type: l,
|
|
225
206
|
position: e.position ?? 0,
|
|
207
|
+
itemNumber: e.itemNumber ?? void 0,
|
|
226
208
|
indent: e.indent ?? 0,
|
|
227
|
-
published:
|
|
209
|
+
published: Ft(e.published, "moduleItem", i),
|
|
228
210
|
url: e.url ?? null,
|
|
229
211
|
newTab: e.newTab ?? !1,
|
|
230
|
-
completionRequirement:
|
|
231
|
-
dueAt: (
|
|
232
|
-
status:
|
|
233
|
-
pointsPossible: ((
|
|
234
|
-
extensions:
|
|
212
|
+
completionRequirement: a,
|
|
213
|
+
dueAt: (u == null ? void 0 : u.cachedDueDate) ?? ((g = e.content) == null ? void 0 : g.dueAt) ?? null,
|
|
214
|
+
status: o ? ki(e.moduleItemStatus, i, r) ?? (o.locked ? "locked" : void 0) : void 0,
|
|
215
|
+
pointsPossible: ((p = e.content) == null ? void 0 : p.pointsPossible) ?? null,
|
|
216
|
+
extensions: Ve(
|
|
235
217
|
void 0,
|
|
236
|
-
|
|
218
|
+
Gt(e.estimatedDuration)
|
|
237
219
|
)
|
|
238
220
|
};
|
|
239
221
|
}
|
|
240
|
-
function
|
|
241
|
-
const
|
|
222
|
+
function Yt(e, t, n, r, o) {
|
|
223
|
+
const i = [];
|
|
242
224
|
for (const l of e ?? []) {
|
|
243
225
|
if (!l) continue;
|
|
244
|
-
const
|
|
226
|
+
const u = zi(
|
|
245
227
|
l,
|
|
246
228
|
t,
|
|
247
229
|
n,
|
|
248
|
-
|
|
249
|
-
|
|
230
|
+
r,
|
|
231
|
+
o
|
|
250
232
|
);
|
|
251
|
-
|
|
233
|
+
u && i.push(u);
|
|
252
234
|
}
|
|
253
|
-
return
|
|
235
|
+
return i;
|
|
254
236
|
}
|
|
255
|
-
function
|
|
237
|
+
function jt(e) {
|
|
256
238
|
const t = [], n = /* @__PURE__ */ new Map();
|
|
257
|
-
for (const
|
|
258
|
-
if (!
|
|
259
|
-
const
|
|
260
|
-
t.push(
|
|
239
|
+
for (const r of e ?? []) {
|
|
240
|
+
if (!r) continue;
|
|
241
|
+
const o = Li(r);
|
|
242
|
+
t.push(o), n.set(o.itemId, o);
|
|
261
243
|
}
|
|
262
244
|
return { list: t, byItemId: n };
|
|
263
245
|
}
|
|
264
|
-
function
|
|
265
|
-
var
|
|
246
|
+
function Ni(e, t = {}) {
|
|
247
|
+
var d, g;
|
|
266
248
|
const n = String(e._id);
|
|
267
249
|
if (e.moduleItemsTotalCount == null)
|
|
268
|
-
throw new
|
|
269
|
-
const { list:
|
|
250
|
+
throw new Ut("module", n, "moduleItemsTotalCount");
|
|
251
|
+
const { list: r, byItemId: o } = jt(e.completionRequirements), i = e.moduleItemsConnection, l = i != null && !((d = i.pageInfo) != null && d.hasNextPage), u = Ht(e.progression, r), a = l ? Yt(i.nodes, n, o, t, u) : void 0;
|
|
270
252
|
return {
|
|
271
253
|
id: n,
|
|
272
254
|
name: e.name ?? "",
|
|
273
255
|
position: e.position ?? 0,
|
|
274
|
-
published:
|
|
256
|
+
published: Ft(e.published, "module", n),
|
|
275
257
|
itemCount: e.moduleItemsTotalCount,
|
|
276
|
-
items:
|
|
277
|
-
estimatedDurationMinutes:
|
|
258
|
+
items: a,
|
|
259
|
+
estimatedDurationMinutes: Gt(e.estimatedDuration) || void 0,
|
|
278
260
|
unlockAt: e.unlockAt ?? null,
|
|
279
261
|
prerequisiteModules: (e.prerequisites ?? []).filter(
|
|
280
|
-
(
|
|
281
|
-
).map((
|
|
262
|
+
(p) => p != null
|
|
263
|
+
).map((p) => ({ id: String(p.id), name: p.name ?? "" })),
|
|
282
264
|
requirementCount: e.requirementCount ?? null,
|
|
283
265
|
requireSequentialProgress: e.requireSequentialProgress ?? !1,
|
|
284
|
-
completionRequirements:
|
|
285
|
-
progress:
|
|
286
|
-
collapsed: ((
|
|
266
|
+
completionRequirements: r,
|
|
267
|
+
progress: qi(e, r, u, t),
|
|
268
|
+
collapsed: ((g = e.progression) == null ? void 0 : g.collapsed) ?? null
|
|
287
269
|
};
|
|
288
270
|
}
|
|
289
|
-
function
|
|
290
|
-
var
|
|
291
|
-
const n = (
|
|
292
|
-
for (const
|
|
293
|
-
|
|
294
|
-
return { modules:
|
|
271
|
+
function xi(e, t = {}) {
|
|
272
|
+
var o;
|
|
273
|
+
const n = (o = e == null ? void 0 : e.legacyNode) == null ? void 0 : o.modulesConnection, r = [];
|
|
274
|
+
for (const i of (n == null ? void 0 : n.nodes) ?? [])
|
|
275
|
+
i && r.push(Ni(i, t));
|
|
276
|
+
return { modules: r, pageInfo: Wt(n == null ? void 0 : n.pageInfo) };
|
|
295
277
|
}
|
|
296
|
-
function
|
|
297
|
-
const
|
|
278
|
+
function $i(e, t, n = {}) {
|
|
279
|
+
const r = e == null ? void 0 : e.legacyNode, { list: o, byItemId: i } = jt(r == null ? void 0 : r.completionRequirements), l = r == null ? void 0 : r.moduleItemsConnection, u = Ht(r == null ? void 0 : r.progression, o);
|
|
298
280
|
return {
|
|
299
|
-
items:
|
|
300
|
-
pageInfo:
|
|
281
|
+
items: Yt(l == null ? void 0 : l.nodes, t, i, n, u),
|
|
282
|
+
pageInfo: Wt(l == null ? void 0 : l.pageInfo)
|
|
301
283
|
};
|
|
302
284
|
}
|
|
303
|
-
const
|
|
285
|
+
const Ui = J`
|
|
304
286
|
fragment PlatformModulesSubmissionFields on Submission {
|
|
305
287
|
_id
|
|
306
288
|
cachedDueDate
|
|
307
289
|
}
|
|
308
|
-
`,
|
|
290
|
+
`, Qt = J`
|
|
309
291
|
fragment PlatformModulesItemFields on ModuleItem {
|
|
310
292
|
_id
|
|
311
293
|
title
|
|
312
294
|
url
|
|
313
295
|
newTab
|
|
314
296
|
position
|
|
297
|
+
itemNumber
|
|
315
298
|
indent
|
|
316
299
|
published
|
|
317
300
|
estimatedDuration @include(if: $includeEstimatedDuration)
|
|
@@ -353,8 +336,8 @@ const Zr = we`
|
|
|
353
336
|
}
|
|
354
337
|
}
|
|
355
338
|
}
|
|
356
|
-
${
|
|
357
|
-
`,
|
|
339
|
+
${Ui}
|
|
340
|
+
`, Kt = J`
|
|
358
341
|
fragment PlatformModulesProgressionFields on ModuleProgression {
|
|
359
342
|
workflowState
|
|
360
343
|
completed
|
|
@@ -374,14 +357,74 @@ const Zr = we`
|
|
|
374
357
|
score
|
|
375
358
|
}
|
|
376
359
|
}
|
|
377
|
-
`,
|
|
360
|
+
`, Vt = J`
|
|
361
|
+
fragment PlatformModulesModuleFields on Module {
|
|
362
|
+
_id
|
|
363
|
+
name
|
|
364
|
+
position
|
|
365
|
+
published
|
|
366
|
+
unlockAt
|
|
367
|
+
moduleItemsTotalCount
|
|
368
|
+
estimatedDuration @include(if: $includeEstimatedDuration)
|
|
369
|
+
moduleStatus
|
|
370
|
+
requirementCount
|
|
371
|
+
requireSequentialProgress
|
|
372
|
+
prerequisites {
|
|
373
|
+
id
|
|
374
|
+
name
|
|
375
|
+
}
|
|
376
|
+
completionRequirements {
|
|
377
|
+
id
|
|
378
|
+
type
|
|
379
|
+
minScore
|
|
380
|
+
minPercentage
|
|
381
|
+
}
|
|
382
|
+
progression {
|
|
383
|
+
collapsed
|
|
384
|
+
...PlatformModulesProgressionFields
|
|
385
|
+
}
|
|
386
|
+
submissionStatistics {
|
|
387
|
+
nextDueAt
|
|
388
|
+
missingAssignmentCount
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
${Kt}
|
|
392
|
+
`, Fi = J`
|
|
378
393
|
query PlatformModulesGetModules(
|
|
379
394
|
$courseId: ID!
|
|
380
395
|
$first: Int
|
|
381
396
|
$after: String
|
|
382
397
|
$before: String
|
|
383
398
|
$last: Int
|
|
384
|
-
$
|
|
399
|
+
$includeEstimatedDuration: Boolean!
|
|
400
|
+
$filter: ModuleFilterInput
|
|
401
|
+
) {
|
|
402
|
+
legacyNode(_id: $courseId, type: Course) {
|
|
403
|
+
... on Course {
|
|
404
|
+
modulesConnection(first: $first, after: $after, before: $before, last: $last, filter: $filter) {
|
|
405
|
+
nodes {
|
|
406
|
+
...PlatformModulesModuleFields
|
|
407
|
+
}
|
|
408
|
+
pageInfo {
|
|
409
|
+
hasNextPage
|
|
410
|
+
hasPreviousPage
|
|
411
|
+
endCursor
|
|
412
|
+
startCursor
|
|
413
|
+
totalCount
|
|
414
|
+
totalNrOfPages
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
${Vt}
|
|
421
|
+
`, Bi = J`
|
|
422
|
+
query PlatformModulesGetModulesWithItems(
|
|
423
|
+
$courseId: ID!
|
|
424
|
+
$first: Int
|
|
425
|
+
$after: String
|
|
426
|
+
$before: String
|
|
427
|
+
$last: Int
|
|
385
428
|
$itemsFirst: Int!
|
|
386
429
|
$includeSubmissions: Boolean!
|
|
387
430
|
$includeEstimatedDuration: Boolean!
|
|
@@ -392,35 +435,8 @@ const Zr = we`
|
|
|
392
435
|
... on Course {
|
|
393
436
|
modulesConnection(first: $first, after: $after, before: $before, last: $last, filter: $filter) {
|
|
394
437
|
nodes {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
position
|
|
398
|
-
published
|
|
399
|
-
unlockAt
|
|
400
|
-
moduleItemsTotalCount
|
|
401
|
-
estimatedDuration @include(if: $includeEstimatedDuration)
|
|
402
|
-
moduleStatus
|
|
403
|
-
requirementCount
|
|
404
|
-
requireSequentialProgress
|
|
405
|
-
prerequisites {
|
|
406
|
-
id
|
|
407
|
-
name
|
|
408
|
-
}
|
|
409
|
-
completionRequirements {
|
|
410
|
-
id
|
|
411
|
-
type
|
|
412
|
-
minScore
|
|
413
|
-
minPercentage
|
|
414
|
-
}
|
|
415
|
-
progression {
|
|
416
|
-
collapsed
|
|
417
|
-
...PlatformModulesProgressionFields
|
|
418
|
-
}
|
|
419
|
-
submissionStatistics {
|
|
420
|
-
nextDueAt
|
|
421
|
-
missingAssignmentCount
|
|
422
|
-
}
|
|
423
|
-
moduleItemsConnection(first: $itemsFirst) @include(if: $includeItems) {
|
|
438
|
+
...PlatformModulesModuleFields
|
|
439
|
+
moduleItemsConnection(first: $itemsFirst) {
|
|
424
440
|
nodes {
|
|
425
441
|
...PlatformModulesItemFields
|
|
426
442
|
}
|
|
@@ -442,9 +458,9 @@ const Zr = we`
|
|
|
442
458
|
}
|
|
443
459
|
}
|
|
444
460
|
}
|
|
445
|
-
${
|
|
446
|
-
${
|
|
447
|
-
`,
|
|
461
|
+
${Vt}
|
|
462
|
+
${Qt}
|
|
463
|
+
`, Gi = J`
|
|
448
464
|
query PlatformModulesGetModuleItems(
|
|
449
465
|
$moduleId: ID!
|
|
450
466
|
$first: Int
|
|
@@ -482,27 +498,27 @@ const Zr = we`
|
|
|
482
498
|
}
|
|
483
499
|
}
|
|
484
500
|
}
|
|
485
|
-
${
|
|
486
|
-
${
|
|
501
|
+
${Qt}
|
|
502
|
+
${Kt}
|
|
487
503
|
`;
|
|
488
|
-
function
|
|
504
|
+
function Zt() {
|
|
489
505
|
return new DOMException("The operation was aborted.", "AbortError");
|
|
490
506
|
}
|
|
491
|
-
function
|
|
492
|
-
if (e != null && e.aborted) throw
|
|
507
|
+
function Ee(e) {
|
|
508
|
+
if (e != null && e.aborted) throw Zt();
|
|
493
509
|
}
|
|
494
|
-
function
|
|
495
|
-
return t ? new Promise((n,
|
|
496
|
-
const
|
|
497
|
-
t.addEventListener("abort",
|
|
510
|
+
function St(e, t) {
|
|
511
|
+
return t ? new Promise((n, r) => {
|
|
512
|
+
const o = () => r(Zt());
|
|
513
|
+
t.addEventListener("abort", o, { once: !0 }), e.then(n, r).finally(() => t.removeEventListener("abort", o));
|
|
498
514
|
}) : e;
|
|
499
515
|
}
|
|
500
|
-
const
|
|
516
|
+
const yt = [
|
|
501
517
|
"COMPLETED",
|
|
502
518
|
"INCOMPLETE",
|
|
503
519
|
"IN_PROGRESS",
|
|
504
520
|
"NOT_STARTED"
|
|
505
|
-
],
|
|
521
|
+
], Tt = /* @__PURE__ */ new Map([
|
|
506
522
|
["locked", ["LOCKED"]],
|
|
507
523
|
["missing", ["MISSING"]],
|
|
508
524
|
["missing_and_incomplete", ["MISSING_AND_INCOMPLETE"]],
|
|
@@ -510,24 +526,24 @@ const nn = [
|
|
|
510
526
|
["complete", ["COMPLETE"]],
|
|
511
527
|
["in_progress", ["IN_PROGRESS"]],
|
|
512
528
|
["not_started", ["NOT_STARTED"]]
|
|
513
|
-
]),
|
|
529
|
+
]), Wi = {
|
|
514
530
|
module: { completionStatus: ["eq"], moduleStatus: ["eq"], dueWithinDays: ["within"] }
|
|
515
531
|
};
|
|
516
|
-
function
|
|
532
|
+
function Hi(e, t) {
|
|
517
533
|
if (!e) return null;
|
|
518
534
|
if (e.target === "module" && e.field === "completionStatus" && e.op === "eq") {
|
|
519
535
|
const n = e.value;
|
|
520
|
-
if (!
|
|
536
|
+
if (!yt.includes(n))
|
|
521
537
|
throw new Error(
|
|
522
|
-
`"${e.value}" is not a ModuleCompletionStatus (${
|
|
538
|
+
`"${e.value}" is not a ModuleCompletionStatus (${yt.join(", ")}).`
|
|
523
539
|
);
|
|
524
540
|
return { completionStatus: n };
|
|
525
541
|
}
|
|
526
542
|
if (e.target === "module" && e.field === "moduleStatus" && e.op === "eq") {
|
|
527
|
-
const n = typeof e.value == "string" ?
|
|
543
|
+
const n = typeof e.value == "string" ? Tt.get(e.value) : void 0;
|
|
528
544
|
if (!n)
|
|
529
545
|
throw new Error(
|
|
530
|
-
`"${String(e.value)}" is not a ModuleStatus (${[...
|
|
546
|
+
`"${String(e.value)}" is not a ModuleStatus (${[...Tt.keys()].join(", ")}).`
|
|
531
547
|
);
|
|
532
548
|
return { moduleStatus: n };
|
|
533
549
|
}
|
|
@@ -540,881 +556,332 @@ function ni(e, t) {
|
|
|
540
556
|
`Canvas GraphQL cannot serve ${e.target}.${e.field} "${e.op}". It compiles module.completionStatus eq, module.moduleStatus eq and module.dueWithinDays within.`
|
|
541
557
|
);
|
|
542
558
|
}
|
|
543
|
-
function
|
|
559
|
+
function Be(e, t, n) {
|
|
544
560
|
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 };
|
|
545
561
|
}
|
|
546
|
-
function
|
|
562
|
+
function Bs({
|
|
547
563
|
executeQuery: e,
|
|
548
|
-
inlineItemLimit: t =
|
|
549
|
-
nodeBudget: n =
|
|
550
|
-
onUnsupportedItem:
|
|
551
|
-
onUnsupportedStatus:
|
|
552
|
-
studentId:
|
|
564
|
+
inlineItemLimit: t = bn,
|
|
565
|
+
nodeBudget: n = Sn,
|
|
566
|
+
onUnsupportedItem: r,
|
|
567
|
+
onUnsupportedStatus: o,
|
|
568
|
+
studentId: i,
|
|
553
569
|
validate: l = !0,
|
|
554
|
-
capabilities:
|
|
555
|
-
includeEstimatedDuration:
|
|
570
|
+
capabilities: u = Wi,
|
|
571
|
+
includeEstimatedDuration: a = !1
|
|
556
572
|
}) {
|
|
557
|
-
const
|
|
573
|
+
const d = i != null, g = { onUnsupportedItem: r, onUnsupportedStatus: o };
|
|
558
574
|
return {
|
|
559
575
|
inlineNodeBudget: n,
|
|
560
|
-
capabilities:
|
|
576
|
+
capabilities: u,
|
|
561
577
|
async listModules({
|
|
562
|
-
courseId:
|
|
563
|
-
page:
|
|
564
|
-
pageSize:
|
|
565
|
-
includeItems:
|
|
566
|
-
filter:
|
|
567
|
-
dueRange:
|
|
568
|
-
inlineItemsFirst:
|
|
569
|
-
inlineFirst:
|
|
570
|
-
signal:
|
|
578
|
+
courseId: p,
|
|
579
|
+
page: h = { kind: "first" },
|
|
580
|
+
pageSize: f,
|
|
581
|
+
includeItems: I,
|
|
582
|
+
filter: v,
|
|
583
|
+
dueRange: L,
|
|
584
|
+
inlineItemsFirst: $,
|
|
585
|
+
inlineFirst: O,
|
|
586
|
+
signal: S
|
|
571
587
|
}) {
|
|
572
|
-
|
|
573
|
-
const
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
588
|
+
Ee(S);
|
|
589
|
+
const C = Hi(v, L);
|
|
590
|
+
let Y;
|
|
591
|
+
if (I) {
|
|
592
|
+
const w = Math.min(O ?? f, f), H = Math.min($ ?? t, t), A = Math.max(1, Math.min(H, Math.floor(n / w)));
|
|
593
|
+
Y = e(
|
|
594
|
+
Bi,
|
|
595
|
+
{
|
|
596
|
+
courseId: p,
|
|
597
|
+
...Be(h, w, f),
|
|
598
|
+
itemsFirst: A,
|
|
599
|
+
includeSubmissions: d,
|
|
600
|
+
includeEstimatedDuration: a,
|
|
601
|
+
studentId: i ?? null,
|
|
602
|
+
filter: C
|
|
603
|
+
}
|
|
604
|
+
);
|
|
605
|
+
} else
|
|
606
|
+
Y = e(Fi, {
|
|
607
|
+
courseId: p,
|
|
608
|
+
...Be(h, f, f),
|
|
609
|
+
includeEstimatedDuration: a,
|
|
610
|
+
filter: C
|
|
611
|
+
});
|
|
612
|
+
const j = await St(Y, S);
|
|
613
|
+
Ee(S);
|
|
614
|
+
const T = xi(j, g);
|
|
615
|
+
return l ? Tn.parse(T) : T;
|
|
589
616
|
},
|
|
590
617
|
async listModuleItems({
|
|
591
|
-
moduleId:
|
|
592
|
-
page:
|
|
593
|
-
pageSize:
|
|
594
|
-
signal:
|
|
618
|
+
moduleId: p,
|
|
619
|
+
page: h = { kind: "first" },
|
|
620
|
+
pageSize: f,
|
|
621
|
+
signal: I
|
|
595
622
|
}) {
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
e(
|
|
599
|
-
moduleId:
|
|
600
|
-
...
|
|
601
|
-
includeSubmissions:
|
|
602
|
-
includeEstimatedDuration:
|
|
603
|
-
studentId:
|
|
623
|
+
Ee(I);
|
|
624
|
+
const v = await St(
|
|
625
|
+
e(Gi, {
|
|
626
|
+
moduleId: p,
|
|
627
|
+
...Be(h, f, f),
|
|
628
|
+
includeSubmissions: d,
|
|
629
|
+
includeEstimatedDuration: a,
|
|
630
|
+
studentId: i ?? null
|
|
604
631
|
}),
|
|
605
|
-
|
|
632
|
+
I
|
|
606
633
|
);
|
|
607
|
-
|
|
608
|
-
const
|
|
609
|
-
return l ?
|
|
634
|
+
Ee(I);
|
|
635
|
+
const L = $i(v, p, g);
|
|
636
|
+
return l ? yn.parse(L) : L;
|
|
610
637
|
},
|
|
611
638
|
async setModuleCollapsed({
|
|
612
|
-
courseId:
|
|
613
|
-
moduleId:
|
|
614
|
-
collapsed:
|
|
615
|
-
signal:
|
|
639
|
+
courseId: p,
|
|
640
|
+
moduleId: h,
|
|
641
|
+
collapsed: f,
|
|
642
|
+
signal: I
|
|
616
643
|
}) {
|
|
617
|
-
await
|
|
644
|
+
await ht(
|
|
618
645
|
{
|
|
619
|
-
path: `/courses/${
|
|
646
|
+
path: `/courses/${p}/modules/${h}/collapse`,
|
|
620
647
|
method: "POST",
|
|
621
|
-
body: { collapse:
|
|
622
|
-
signal:
|
|
648
|
+
body: { collapse: f },
|
|
649
|
+
signal: I
|
|
623
650
|
},
|
|
624
|
-
|
|
651
|
+
Mt.unknown()
|
|
625
652
|
);
|
|
626
653
|
},
|
|
627
654
|
async setAllModulesCollapsed({
|
|
628
|
-
courseId:
|
|
629
|
-
collapsed:
|
|
630
|
-
signal:
|
|
655
|
+
courseId: p,
|
|
656
|
+
collapsed: h,
|
|
657
|
+
signal: f
|
|
631
658
|
}) {
|
|
632
|
-
await
|
|
659
|
+
await ht(
|
|
633
660
|
{
|
|
634
|
-
path: `/courses/${
|
|
661
|
+
path: `/courses/${p}/collapse_all_modules`,
|
|
635
662
|
method: "POST",
|
|
636
|
-
params: { collapse:
|
|
637
|
-
signal:
|
|
663
|
+
params: { collapse: h ? 1 : 0 },
|
|
664
|
+
signal: f
|
|
638
665
|
},
|
|
639
|
-
|
|
666
|
+
Mt.unknown()
|
|
640
667
|
);
|
|
641
668
|
}
|
|
642
669
|
};
|
|
643
670
|
}
|
|
644
|
-
const
|
|
645
|
-
function
|
|
671
|
+
const Gs = 1e3;
|
|
672
|
+
function Yi({
|
|
646
673
|
queryClient: e,
|
|
647
674
|
courseId: t,
|
|
648
675
|
module: n,
|
|
649
|
-
item:
|
|
676
|
+
item: r
|
|
650
677
|
}) {
|
|
651
678
|
return {
|
|
652
679
|
module: n,
|
|
653
|
-
item:
|
|
654
|
-
invalidateModuleItems: async (
|
|
680
|
+
item: r,
|
|
681
|
+
invalidateModuleItems: async (o) => {
|
|
655
682
|
await Promise.all([
|
|
656
|
-
|
|
657
|
-
|
|
683
|
+
Pn(e, t, o),
|
|
684
|
+
ft(e, t)
|
|
658
685
|
]);
|
|
659
686
|
},
|
|
660
|
-
invalidateModuleList: () =>
|
|
687
|
+
invalidateModuleList: () => ft(e, t)
|
|
661
688
|
};
|
|
662
689
|
}
|
|
663
|
-
function
|
|
664
|
-
return
|
|
690
|
+
function Ws(e, t) {
|
|
691
|
+
return Ze(e).filter(
|
|
665
692
|
(n) => n.visible == null || n.visible(t) === !0
|
|
666
693
|
);
|
|
667
694
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
order: b.number(),
|
|
671
|
-
hidden: b.boolean().optional()
|
|
672
|
-
});
|
|
673
|
-
function ge(e) {
|
|
674
|
-
return b.record(b.string(), e);
|
|
675
|
-
}
|
|
676
|
-
const ri = ge(Pe.strict()), Ot = (e) => e == null || typeof e == "string" || typeof e == "number" || typeof e == "bigint" || typeof e == "boolean" || wt(e) || Array.isArray(e) && e.every(Ot), Zn = (e) => {
|
|
677
|
-
var t;
|
|
678
|
-
return e == null || typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
679
|
-
}, ii = Pe.extend({
|
|
680
|
-
icon: b.custom(Ot, { message: "icon must be a ReactNode" }),
|
|
681
|
-
renderIcon: b.custom(Zn, {
|
|
682
|
-
message: "renderIcon must be a function of the item, not a React component"
|
|
683
|
-
})
|
|
684
|
-
}).strict(), Jn = (e) => {
|
|
685
|
-
var t;
|
|
686
|
-
return typeof e == "function" && !((t = e.prototype) != null && t.isReactComponent);
|
|
687
|
-
}, sn = (e) => e == null || Jn(e), ln = Pe.extend({
|
|
688
|
-
onSelect: b.custom(Jn, {
|
|
689
|
-
message: "onSelect must be a function taking an ActionContext"
|
|
690
|
-
}),
|
|
691
|
-
visible: b.custom(sn, {
|
|
692
|
-
message: "visible must be a function taking an ActionContext, not a React component"
|
|
693
|
-
}),
|
|
694
|
-
renderModal: b.custom(sn, {
|
|
695
|
-
message: "renderModal must be a function taking an ActionContext, not a React component"
|
|
696
|
-
})
|
|
697
|
-
}).strict();
|
|
698
|
-
function Be() {
|
|
699
|
-
return b.custom((e) => typeof e == "function", {
|
|
700
|
-
message: "Expected a function"
|
|
701
|
-
});
|
|
702
|
-
}
|
|
703
|
-
const si = Pe.extend({
|
|
704
|
-
render: b.custom((e) => typeof e == "function", {
|
|
705
|
-
message: "render must be a function taking a MetaFieldContext"
|
|
706
|
-
}),
|
|
707
|
-
icon: b.custom(Ot, { message: "icon must be a ReactNode" }),
|
|
708
|
-
renderIcon: b.custom(Zn, {
|
|
709
|
-
message: "renderIcon must be a function of the field context, not a React component"
|
|
710
|
-
})
|
|
711
|
-
}).strict(), li = Pe.extend({
|
|
712
|
-
predicate: b.custom((e) => typeof e == "function", {
|
|
713
|
-
message: "predicate must be a function of the module and a FilterContext"
|
|
714
|
-
}),
|
|
715
|
-
query: No.optional(),
|
|
716
|
-
unfiltered: b.boolean().optional()
|
|
717
|
-
}).strict(), Me = () => b.custom((e) => typeof e == "function", { message: "Expected a function" }).optional(), ai = b.object({
|
|
718
|
-
getItemHref: Me(),
|
|
719
|
-
getItemEditHref: Me(),
|
|
720
|
-
getModuleHref: Me(),
|
|
721
|
-
onItemClick: Me()
|
|
722
|
-
}).strict(), ci = b.object({
|
|
723
|
-
createModule: b.boolean().optional(),
|
|
724
|
-
updateModule: b.boolean().optional(),
|
|
725
|
-
deleteModule: b.boolean().optional(),
|
|
726
|
-
reorderModules: b.boolean().optional(),
|
|
727
|
-
setModulesPublished: b.boolean().optional(),
|
|
728
|
-
createModuleItem: b.boolean().optional(),
|
|
729
|
-
updateModuleItem: b.boolean().optional(),
|
|
730
|
-
deleteModuleItem: b.boolean().optional(),
|
|
731
|
-
reorderModuleItems: b.boolean().optional()
|
|
732
|
-
}).strict(), ui = b.object({
|
|
733
|
-
formatters: b.object({
|
|
734
|
-
moduleLabel: Be(),
|
|
735
|
-
dateTime: Be(),
|
|
736
|
-
points: Be(),
|
|
737
|
-
progress: Be()
|
|
738
|
-
}).strict(),
|
|
739
|
-
itemTypes: ge(ii),
|
|
740
|
-
itemStatuses: ri,
|
|
741
|
-
itemMeta: ge(si),
|
|
742
|
-
filters: ge(li),
|
|
743
|
-
moduleActions: ge(ln),
|
|
744
|
-
itemActions: ge(ln),
|
|
745
|
-
navigation: ai,
|
|
746
|
-
permissions: ci,
|
|
747
|
-
notify: Me()
|
|
748
|
-
});
|
|
749
|
-
function eo(e, t = {}) {
|
|
750
|
-
const n = Object.keys(t).filter((i) => !zo(e, i));
|
|
695
|
+
function Xt(e, t = {}) {
|
|
696
|
+
const n = Object.keys(t).filter((o) => !Cn(e, o));
|
|
751
697
|
if (n.length > 0)
|
|
752
698
|
throw new Error(
|
|
753
699
|
`Unknown modules config key(s): ${n.join(", ")}. Known keys are ${Object.keys(e).join(", ")}.`
|
|
754
700
|
);
|
|
755
|
-
const
|
|
756
|
-
formatters:
|
|
757
|
-
itemTypes:
|
|
758
|
-
itemStatuses:
|
|
759
|
-
itemMeta:
|
|
760
|
-
filters:
|
|
761
|
-
moduleActions:
|
|
762
|
-
itemActions:
|
|
763
|
-
navigation:
|
|
764
|
-
permissions:
|
|
701
|
+
const r = {
|
|
702
|
+
formatters: Ue(e.formatters, t.formatters),
|
|
703
|
+
itemTypes: ne(e.itemTypes, t.itemTypes),
|
|
704
|
+
itemStatuses: ne(e.itemStatuses, t.itemStatuses),
|
|
705
|
+
itemMeta: ne(e.itemMeta, t.itemMeta),
|
|
706
|
+
filters: ne(e.filters, t.filters),
|
|
707
|
+
moduleActions: ne(e.moduleActions, t.moduleActions),
|
|
708
|
+
itemActions: ne(e.itemActions, t.itemActions),
|
|
709
|
+
navigation: Ue(e.navigation, t.navigation),
|
|
710
|
+
permissions: Ue(e.permissions, t.permissions),
|
|
765
711
|
notify: t.notify ?? e.notify
|
|
766
712
|
};
|
|
767
|
-
return
|
|
713
|
+
return vn.parse(r), r;
|
|
768
714
|
}
|
|
769
|
-
const
|
|
715
|
+
const ji = "organizeNewPlacement", Qi = {
|
|
770
716
|
label: "metaFieldNewPlacementLabel",
|
|
771
717
|
order: 5,
|
|
772
|
-
render: ({ item: e, t }) =>
|
|
773
|
-
},
|
|
774
|
-
itemMeta: { [
|
|
775
|
-
filters:
|
|
718
|
+
render: ({ item: e, t }) => An(e) ? /* @__PURE__ */ s(Xn, { color: "success", children: t("organizeNewItemPill") }) : null
|
|
719
|
+
}, Ki = (e) => Object.fromEntries(Object.keys(e).map((t) => [t, { hidden: !0 }])), Vi = (e) => Xt(e, {
|
|
720
|
+
itemMeta: { [ji]: Qi },
|
|
721
|
+
filters: Ki(e.filters),
|
|
776
722
|
formatters: {
|
|
777
|
-
moduleLabel: (t, n, { t:
|
|
778
|
-
if (
|
|
779
|
-
const
|
|
780
|
-
return
|
|
723
|
+
moduleLabel: (t, n, { t: r }) => {
|
|
724
|
+
if (Ln(n)) return r("organizeNewModuleLabel");
|
|
725
|
+
const o = wn(n);
|
|
726
|
+
return o === 0 ? null : r("organizeItemsAddedLabel", { count: o });
|
|
781
727
|
}
|
|
782
728
|
}
|
|
783
729
|
});
|
|
784
|
-
function
|
|
785
|
-
return
|
|
730
|
+
function Hs(e = {}) {
|
|
731
|
+
return Xt(Rn, e);
|
|
786
732
|
}
|
|
787
|
-
function
|
|
788
|
-
const t =
|
|
789
|
-
return
|
|
790
|
-
(n,
|
|
733
|
+
function Ys(e) {
|
|
734
|
+
const t = Jn();
|
|
735
|
+
return U(
|
|
736
|
+
(n, r) => Yi({ queryClient: t, courseId: e, module: n, item: r }),
|
|
791
737
|
[t, e]
|
|
792
738
|
);
|
|
793
739
|
}
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
pastDueByline: (l, a) => t("pastDueByline", { when: s(l, a) }),
|
|
802
|
-
unlockByline: (l, a) => t("unlockByline", { when: s(l, a) }),
|
|
803
|
-
unlockedByline: (l, a) => t("unlockedByline", { when: s(l, a) }),
|
|
804
|
-
estimatedDurationByline: (l) => Go(t, l),
|
|
805
|
-
remainingDurationByline: (l) => Bo(t, l),
|
|
806
|
-
points: (l) => e.points(l, i),
|
|
807
|
-
progress: (l, a, c) => e.progress(l, a, c, i)
|
|
808
|
-
};
|
|
809
|
-
}, [e, t, n, o]);
|
|
810
|
-
}
|
|
811
|
-
const fi = 20, hi = 4.5, an = 7, Ii = 5, _i = 20, to = "#000000", no = "#FFFFFF", oo = {
|
|
812
|
-
primary: { semantic: "base", textKey: "baseTextColor", borderKey: "baseBorderColor" },
|
|
813
|
-
info: { semantic: "info", textKey: "infoTextColor", borderKey: "infoBorderColor" },
|
|
814
|
-
success: { semantic: "success", textKey: "successTextColor", borderKey: "successBorderColor" },
|
|
815
|
-
warning: { semantic: "warning", textKey: "warningTextColor", borderKey: "warningBorderColor" }
|
|
816
|
-
}, Ei = {
|
|
817
|
-
card: {
|
|
818
|
-
primary: { fill: "#E8EAEC", stroke: "#8D959F", text: "#273540" },
|
|
819
|
-
info: { fill: "#D5E4F2", stroke: "#2B7ABC", text: "#23649A" },
|
|
820
|
-
success: { fill: "#CDE7D8", stroke: "#03893D", text: "#02642C" },
|
|
821
|
-
warning: { fill: "#F5DBCC", stroke: "#CF4A00", text: "#A13900" }
|
|
822
|
-
},
|
|
823
|
-
row: {
|
|
824
|
-
primary: { fill: "#DEE1E4", stroke: "#8D959F", text: "#273540" },
|
|
825
|
-
info: { fill: "#CADCEA", stroke: "#2B7ABC", text: "#1E5685" },
|
|
826
|
-
success: { fill: "#C2DFD0", stroke: "#03893D", text: "#02642C" },
|
|
827
|
-
warning: { fill: "#EBD2C4", stroke: "#CF4A00", text: "#A13900" }
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
function yi(e, t) {
|
|
831
|
-
const n = Er(
|
|
832
|
-
It(e),
|
|
833
|
-
It(yr(t, fi))
|
|
834
|
-
);
|
|
835
|
-
return Nn(n);
|
|
836
|
-
}
|
|
837
|
-
function bi(e, t, n) {
|
|
838
|
-
const o = le(n, t) >= an ? an : hi;
|
|
839
|
-
return Math.min(o, Math.max(le(e, to), le(e, no)));
|
|
840
|
-
}
|
|
841
|
-
function Si(e, t, n) {
|
|
842
|
-
const o = bi(e, t, n);
|
|
843
|
-
if (le(e, t) >= o) return t;
|
|
844
|
-
const i = le(e, to) > le(e, no) ? br : Sr;
|
|
845
|
-
let s = t;
|
|
846
|
-
for (let l = 0; l < _i && le(e, s) < o; l++)
|
|
847
|
-
s = i(s, Ii);
|
|
848
|
-
return Nn(s);
|
|
849
|
-
}
|
|
850
|
-
function Mi(e) {
|
|
851
|
-
return ht(e) && It(e).a === 1;
|
|
852
|
-
}
|
|
853
|
-
function cn(e, t) {
|
|
854
|
-
var n;
|
|
855
|
-
return t === "card" ? (n = e == null ? void 0 : e.elevatedSurface) == null ? void 0 : n.base : e == null ? void 0 : e.muted;
|
|
856
|
-
}
|
|
857
|
-
function un(e, t, n, o) {
|
|
858
|
-
var l, a, c, u;
|
|
859
|
-
const i = Ei[n][e], s = t;
|
|
860
|
-
try {
|
|
861
|
-
const d = s == null ? void 0 : s.newTheme, m = (l = d == null ? void 0 : d.semantics) == null ? void 0 : l.call(d, d.primitives);
|
|
862
|
-
if (!m) return i;
|
|
863
|
-
const { semantic: p } = oo[e], h = cn((u = (c = (a = s == null ? void 0 : s.themeOverride) == null ? void 0 : a.semantics) == null ? void 0 : c.color) == null ? void 0 : u.background, n) ?? cn(m.color.background, n) ?? "", _ = o.stroke ?? m.color.stroke[p], A = o.label ?? m.color.text[p];
|
|
864
|
-
if (!Mi(h) || !ht(_) || !ht(A)) return i;
|
|
865
|
-
const v = yi(h, _);
|
|
866
|
-
return { fill: v, stroke: _, text: Si(v, A, h) };
|
|
867
|
-
} catch {
|
|
868
|
-
return i;
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
const dn = /* @__PURE__ */ new WeakMap();
|
|
872
|
-
function ro(e, t, n, o = {}) {
|
|
873
|
-
if (typeof t != "object" || t === null)
|
|
874
|
-
return un(e, t, n, o);
|
|
875
|
-
let i = dn.get(t);
|
|
876
|
-
i === void 0 && (i = /* @__PURE__ */ new Map(), dn.set(t, i));
|
|
877
|
-
const s = `${n}:${e}:${o.stroke ?? ""}:${o.label ?? ""}`, l = i.get(s);
|
|
878
|
-
if (l !== void 0) return l;
|
|
879
|
-
const a = un(e, t, n, o);
|
|
880
|
-
return i.set(s, a), a;
|
|
881
|
-
}
|
|
882
|
-
function Ge(e, t) {
|
|
883
|
-
const { textKey: n, borderKey: o } = oo[e];
|
|
884
|
-
return (i, s) => {
|
|
885
|
-
const l = i, { fill: a, stroke: c, text: u } = ro(e, s, t, {
|
|
886
|
-
stroke: l == null ? void 0 : l[o],
|
|
887
|
-
label: l == null ? void 0 : l[n]
|
|
888
|
-
});
|
|
889
|
-
return { backgroundColor: a, [n]: u, [o]: c };
|
|
890
|
-
};
|
|
891
|
-
}
|
|
892
|
-
function mn(e) {
|
|
893
|
-
return {
|
|
894
|
-
primary: Ge("primary", e),
|
|
895
|
-
info: Ge("info", e),
|
|
896
|
-
success: Ge("success", e),
|
|
897
|
-
warning: Ge("warning", e)
|
|
898
|
-
};
|
|
899
|
-
}
|
|
900
|
-
const Ti = {
|
|
901
|
-
card: mn("card"),
|
|
902
|
-
row: mn("row")
|
|
903
|
-
}, Ci = "#9242B4", vi = "#9E58BD";
|
|
904
|
-
function gn(e) {
|
|
905
|
-
return (t, n) => {
|
|
906
|
-
var l, a, c, u;
|
|
907
|
-
const { fill: o, stroke: i, text: s } = ro("primary", n, e, {
|
|
908
|
-
stroke: ((a = (l = n.colors) == null ? void 0 : l.contrasts) == null ? void 0 : a.violet4570) ?? vi,
|
|
909
|
-
label: ((u = (c = n.colors) == null ? void 0 : c.contrasts) == null ? void 0 : u.violet5790) ?? Ci
|
|
910
|
-
});
|
|
911
|
-
return { backgroundColor: o, baseTextColor: s, baseBorderColor: i };
|
|
912
|
-
};
|
|
913
|
-
}
|
|
914
|
-
const xt = {
|
|
915
|
-
tone: "primary",
|
|
916
|
-
icon: /* @__PURE__ */ r(ur, { size: "sm" }),
|
|
917
|
-
themes: {
|
|
918
|
-
card: gn("card"),
|
|
919
|
-
row: gn("row")
|
|
920
|
-
}
|
|
921
|
-
}, Te = {
|
|
922
|
-
not_started: { tone: "primary", icon: /* @__PURE__ */ r(Rt, { size: "sm" }) },
|
|
923
|
-
in_progress: { tone: "info", icon: /* @__PURE__ */ r(Lt, { size: "sm" }) },
|
|
924
|
-
complete: { tone: "success", icon: /* @__PURE__ */ r(At, { size: "sm" }) },
|
|
925
|
-
missing: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
|
|
926
|
-
incomplete: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
|
|
927
|
-
missing_and_incomplete: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
|
|
928
|
-
locked: { tone: "primary", icon: /* @__PURE__ */ r(Pt, { size: "sm" }) }
|
|
929
|
-
}, wi = {
|
|
930
|
-
not_started: { tone: "primary", icon: /* @__PURE__ */ r(Rt, { size: "sm" }) },
|
|
931
|
-
in_progress: { tone: "info", icon: /* @__PURE__ */ r(Lt, { size: "sm" }) },
|
|
932
|
-
complete: { tone: "success", icon: /* @__PURE__ */ r(At, { size: "sm" }) },
|
|
933
|
-
incomplete: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
|
|
934
|
-
missing: { tone: "warning", icon: /* @__PURE__ */ r(fe, { size: "sm" }) },
|
|
935
|
-
locked: { tone: "primary", icon: /* @__PURE__ */ r(Pt, { size: "sm" }) }
|
|
936
|
-
};
|
|
937
|
-
function io(e, t, n, o) {
|
|
938
|
-
switch (t) {
|
|
939
|
-
case "not_started":
|
|
940
|
-
return e("moduleStatusNotStarted");
|
|
941
|
-
case "in_progress":
|
|
942
|
-
return e("moduleStatusInProgress");
|
|
943
|
-
case "complete":
|
|
944
|
-
return e("moduleStatusComplete");
|
|
945
|
-
case "missing":
|
|
946
|
-
return e("moduleStatusMissing", { count: n });
|
|
947
|
-
case "incomplete":
|
|
948
|
-
return e("moduleStatusIncomplete", { count: o });
|
|
949
|
-
case "missing_and_incomplete":
|
|
950
|
-
return e("moduleStatusMissingAndIncomplete", {
|
|
951
|
-
missing: e("moduleStatusMissing", { count: n }),
|
|
952
|
-
incomplete: e("moduleStatusIncomplete", { count: o })
|
|
953
|
-
});
|
|
954
|
-
case "locked":
|
|
955
|
-
return e("moduleStatusLocked");
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
function Pi(e, t) {
|
|
959
|
-
switch (t) {
|
|
960
|
-
case "not_started":
|
|
961
|
-
return e("itemStatusNotStarted");
|
|
962
|
-
case "in_progress":
|
|
963
|
-
return e("itemStatusInProgress");
|
|
964
|
-
case "complete":
|
|
965
|
-
return e("itemStatusComplete");
|
|
966
|
-
case "incomplete":
|
|
967
|
-
return e("itemStatusIncomplete");
|
|
968
|
-
case "missing":
|
|
969
|
-
return e("itemStatusMissing");
|
|
970
|
-
case "locked":
|
|
971
|
-
return e("itemStatusLocked");
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
function Qe(e, t, n, o) {
|
|
975
|
-
var i;
|
|
976
|
-
return /* @__PURE__ */ r(
|
|
977
|
-
kn,
|
|
978
|
-
{
|
|
979
|
-
color: e.tone,
|
|
980
|
-
renderIcon: e.icon,
|
|
981
|
-
themeOverride: ((i = e.themes) == null ? void 0 : i[o]) ?? Ti[o][e.tone],
|
|
982
|
-
"data-testid": n,
|
|
983
|
-
children: t
|
|
984
|
-
}
|
|
985
|
-
);
|
|
986
|
-
}
|
|
987
|
-
function Ai({
|
|
988
|
-
status: e,
|
|
989
|
-
missingCount: t,
|
|
990
|
-
incompleteCount: n
|
|
991
|
-
}) {
|
|
992
|
-
const { t: o } = P();
|
|
993
|
-
return Qe(
|
|
994
|
-
Te[e],
|
|
995
|
-
io(o, e, t, n),
|
|
996
|
-
"module-status-pill",
|
|
997
|
-
"card"
|
|
998
|
-
);
|
|
999
|
-
}
|
|
1000
|
-
function Li({ status: e }) {
|
|
1001
|
-
const { t } = P();
|
|
1002
|
-
return Qe(
|
|
1003
|
-
wi[e],
|
|
1004
|
-
Pi(t, e),
|
|
1005
|
-
"item-status-pill",
|
|
1006
|
-
"row"
|
|
1007
|
-
);
|
|
1008
|
-
}
|
|
1009
|
-
function Ri() {
|
|
1010
|
-
const { t: e } = P();
|
|
1011
|
-
return Qe(xt, e("moduleStatusDueSoon"), "module-due-soon-pill", "card");
|
|
1012
|
-
}
|
|
1013
|
-
function ki() {
|
|
1014
|
-
const { t: e } = P();
|
|
1015
|
-
return Qe(xt, e("itemStatusDueSoon"), "item-due-soon-pill", "row");
|
|
1016
|
-
}
|
|
1017
|
-
function so() {
|
|
1018
|
-
const e = xn();
|
|
1019
|
-
return "key" in e && e.key === "canvas-high-contrast" ? "inline" : "standalone";
|
|
1020
|
-
}
|
|
1021
|
-
const lo = 2.75, Oi = `${lo}rem`, pn = "0.065em", he = "0.8em", xi = "0.28em", fn = "1px", Di = "0.57em", ao = {
|
|
1022
|
-
display: "inline-block",
|
|
1023
|
-
paddingLeft: he,
|
|
1024
|
-
marginLeft: `-${he}`,
|
|
1025
|
-
backgroundImage: `radial-gradient(circle, currentColor ${pn}, transparent ${pn})`,
|
|
1026
|
-
backgroundRepeat: "no-repeat",
|
|
1027
|
-
backgroundSize: `${he} 100%`,
|
|
1028
|
-
backgroundPosition: "left center"
|
|
1029
|
-
}, Ni = {
|
|
1030
|
-
...ao,
|
|
1031
|
-
backgroundImage: "none",
|
|
1032
|
-
borderLeft: `${fn} solid`,
|
|
1033
|
-
paddingLeft: `calc(${he} / 2 - ${fn})`,
|
|
1034
|
-
marginLeft: `calc(-${he} / 2)`
|
|
1035
|
-
};
|
|
1036
|
-
function hn() {
|
|
1037
|
-
return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia("(forced-colors: active)");
|
|
1038
|
-
}
|
|
1039
|
-
function Dt() {
|
|
1040
|
-
const [e, t] = j(() => {
|
|
1041
|
-
var n;
|
|
1042
|
-
return ((n = hn()) == null ? void 0 : n.matches) ?? !1;
|
|
1043
|
-
});
|
|
1044
|
-
return W(() => {
|
|
1045
|
-
const n = hn();
|
|
1046
|
-
if (n === null) return;
|
|
1047
|
-
t(n.matches);
|
|
1048
|
-
const o = (i) => t(i.matches);
|
|
1049
|
-
return n.addEventListener("change", o), () => n.removeEventListener("change", o);
|
|
1050
|
-
}, []), e ? Ni : ao;
|
|
1051
|
-
}
|
|
1052
|
-
const Nt = {
|
|
1053
|
-
overflowX: "clip",
|
|
1054
|
-
overflowWrap: "anywhere",
|
|
1055
|
-
lineHeight: 0
|
|
1056
|
-
}, zi = "#6A7883", Xe = 0.5, He = { display: "block" }, qi = { ...He, marginTop: `${Xe}rem` }, $i = {
|
|
1057
|
-
...He,
|
|
1058
|
-
marginTop: `-${Xe}rem`
|
|
1059
|
-
}, In = { marginTop: `${Xe}rem` }, _n = { display: "inline-block" }, Fi = {
|
|
1060
|
-
display: "-webkit-box",
|
|
1061
|
-
WebkitLineClamp: 2,
|
|
1062
|
-
WebkitBoxOrient: "vertical",
|
|
1063
|
-
overflow: "hidden"
|
|
1064
|
-
}, zt = {
|
|
1065
|
-
marginRight: `calc(${he} - ${xi})`
|
|
1066
|
-
}, co = {
|
|
1067
|
-
display: "inline-flex",
|
|
1068
|
-
alignItems: "center",
|
|
1069
|
-
height: "1lh",
|
|
1070
|
-
verticalAlign: "top",
|
|
1071
|
-
marginInlineEnd: Di
|
|
1072
|
-
};
|
|
1073
|
-
function pe(e) {
|
|
1074
|
-
return e == null || typeof e == "boolean" || e === "" ? !0 : Array.isArray(e) ? e.every(pe) : wt(e) && e.type === Rn ? pe(e.props.children) : !1;
|
|
1075
|
-
}
|
|
1076
|
-
const uo = 1.5, mo = 0.25, go = 0.5, po = 1.125, fo = 1.3125, Ui = 1 + uo + mo + po + 1, Bi = 0.75 + 1.25 + go + fo + 0.75, Gi = 2;
|
|
1077
|
-
function En(e, t, n, o) {
|
|
1078
|
-
const i = Math.max(n - 1, 0) * (t + Xe);
|
|
1079
|
-
return { contentVisibility: "auto", containIntrinsicSize: `auto ${e + i + (o ? Gi : 0)}rem` };
|
|
1080
|
-
}
|
|
1081
|
-
const Wi = "0.5rem", Et = { fontWeightBold: 700 };
|
|
1082
|
-
function Hi(e, t) {
|
|
1083
|
-
var o, i;
|
|
1084
|
-
const n = xn();
|
|
1085
|
-
return ("colors" in n ? (i = (o = n.colors) == null ? void 0 : o.contrasts) == null ? void 0 : i[e] : void 0) ?? t;
|
|
1086
|
-
}
|
|
1087
|
-
function Ki({
|
|
1088
|
-
item: e,
|
|
1089
|
-
today: t,
|
|
1090
|
-
attachedAbove: n,
|
|
1091
|
-
attachedBelow: o,
|
|
1092
|
-
stackPill: i = !1,
|
|
1093
|
-
moduleLabel: s,
|
|
1094
|
-
itemNumber: l
|
|
1095
|
-
}) {
|
|
1096
|
-
var re;
|
|
1097
|
-
const { t: a, locale: c, timezone: u } = P(), d = Ve(), m = so(), p = Hi("grey4570", zi), h = Dt(), _ = k(null), A = Ae(), v = _e(), { navigation: z } = v, U = F(() => je(v.itemMeta), [v.itemMeta]), M = e.title || a("itemUntitled");
|
|
1098
|
-
if (e.type === "sub_header")
|
|
1099
|
-
return /* @__PURE__ */ r(
|
|
1100
|
-
E,
|
|
1101
|
-
{
|
|
1102
|
-
as: "div",
|
|
1103
|
-
padding: i ? "x-small small" : "x-small mediumSmall",
|
|
1104
|
-
margin: "x-small 0 0 0",
|
|
1105
|
-
"data-testid": `module-item-${e.id}`,
|
|
1106
|
-
children: /* @__PURE__ */ r(
|
|
1107
|
-
S,
|
|
1108
|
-
{
|
|
1109
|
-
size: "small",
|
|
1110
|
-
weight: "bold",
|
|
1111
|
-
transform: "uppercase",
|
|
1112
|
-
themeOverride: Et,
|
|
1113
|
-
"data-testid": "module-item-title",
|
|
1114
|
-
"data-sub-header": "true",
|
|
1115
|
-
children: M
|
|
1116
|
-
}
|
|
1117
|
-
)
|
|
1118
|
-
}
|
|
1119
|
-
);
|
|
1120
|
-
const L = Wo(s, l, c), J = L ? a("itemNameWithLabel", { label: L, name: M }) : M, X = ((re = z.getItemHref) == null ? void 0 : re.call(z, e)) ?? e.url ?? null, C = e.status === "locked", R = C ? null : X, B = e.status !== void 0 && e.status !== "complete" && !C && An(e.dueAt, t, u), D = z.onItemClick, ne = (y) => {
|
|
1121
|
-
d(`item-click-${e.type}`), D == null || D(e, y);
|
|
1122
|
-
}, G = (y) => {
|
|
1123
|
-
var q;
|
|
1124
|
-
const Y = _.current;
|
|
1125
|
-
!Y || Y.contains(y.target) || (q = window.getSelection()) != null && q.toString().trim() || Y.dispatchEvent(
|
|
1126
|
-
new window.MouseEvent("click", {
|
|
1127
|
-
bubbles: !0,
|
|
1128
|
-
cancelable: !0,
|
|
1129
|
-
ctrlKey: y.ctrlKey,
|
|
1130
|
-
metaKey: y.metaKey,
|
|
1131
|
-
shiftKey: y.shiftKey,
|
|
1132
|
-
altKey: y.altKey
|
|
1133
|
-
})
|
|
1134
|
-
);
|
|
1135
|
-
}, Z = { item: e, t: a, today: t, locale: c, timezone: u, formatters: A, config: v }, N = U.map((y) => ({
|
|
1136
|
-
key: y.key,
|
|
1137
|
-
node: y.render(Z),
|
|
1138
|
-
icon: y.renderIcon ? y.renderIcon(Z) : y.icon
|
|
1139
|
-
})).filter((y) => !pe(y.node)), $ = [];
|
|
1140
|
-
let ee;
|
|
1141
|
-
const O = i ? N.find((y) => y.key === "dueAt" && !pe(y.icon)) : void 0, ce = O && N.find((y) => y.key === "estimatedDuration");
|
|
1142
|
-
for (const y of N)
|
|
1143
|
-
if (y !== ce)
|
|
1144
|
-
if (!pe(y.icon) && (i || !ee)) {
|
|
1145
|
-
const Y = y === O && ce ? [y, ce] : [y];
|
|
1146
|
-
$.push(Y), ee ?? (ee = Y);
|
|
1147
|
-
} else ee ? ee.push(y) : $.length === 0 ? $.push([y]) : $[0].push(y);
|
|
1148
|
-
const Le = i ? { ..._n, ...In } : _n, Re = i ? { ...h, ...In } : h, oe = B || e.status ? /* @__PURE__ */ g(I, { alignItems: "center", gap: "x-small", wrap: i ? "wrap" : "no-wrap", children: [
|
|
1149
|
-
B ? /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(ki, {}) }) : null,
|
|
1150
|
-
e.status ? /* @__PURE__ */ r(I.Item, { children: /* @__PURE__ */ r(Li, { status: e.status }) }) : null
|
|
1151
|
-
] }) : null, ke = i ? /* @__PURE__ */ r("span", { style: Fi, "data-title-clamp": "", children: J }) : J, Oe = {
|
|
1152
|
-
weight: "bold",
|
|
1153
|
-
size: i ? "medium" : "small",
|
|
1154
|
-
lineHeight: "condensed",
|
|
1155
|
-
themeOverride: Et,
|
|
1156
|
-
"data-testid": "module-item-title"
|
|
1157
|
-
}, Je = R ? /* @__PURE__ */ g(
|
|
1158
|
-
Dn,
|
|
1159
|
-
{
|
|
1160
|
-
href: R,
|
|
1161
|
-
elementRef: (y) => {
|
|
1162
|
-
_.current = y;
|
|
1163
|
-
},
|
|
1164
|
-
onClick: ne,
|
|
1165
|
-
forceButtonRole: !1,
|
|
1166
|
-
variant: m,
|
|
1167
|
-
display: i ? "block" : void 0,
|
|
1168
|
-
target: e.newTab ? "_blank" : void 0,
|
|
1169
|
-
rel: e.newTab ? "noopener noreferrer" : void 0,
|
|
1170
|
-
children: [
|
|
1171
|
-
/* @__PURE__ */ r(S, { ...Oe, color: "primary", children: ke }),
|
|
1172
|
-
e.newTab ? /* @__PURE__ */ r(Ye, { children: ` ${a("opensInNewWindow")}` }) : null
|
|
1173
|
-
]
|
|
1174
|
-
}
|
|
1175
|
-
) : /* @__PURE__ */ r(
|
|
1176
|
-
S,
|
|
1177
|
-
{
|
|
1178
|
-
...Oe,
|
|
1179
|
-
color: C ? "secondary" : "primary",
|
|
1180
|
-
"data-locked": C ? "true" : void 0,
|
|
1181
|
-
children: ke
|
|
1182
|
-
}
|
|
1183
|
-
), xe = n ? "none" : "large", ue = o ? "none" : "large";
|
|
1184
|
-
return /* @__PURE__ */ r(
|
|
1185
|
-
"div",
|
|
1186
|
-
{
|
|
1187
|
-
style: {
|
|
1188
|
-
...i ? En(Bi, fo, $.length, oe !== null) : En(Ui, po, $.length, !1),
|
|
1189
|
-
marginTop: n ? void 0 : Wi
|
|
1190
|
-
},
|
|
1191
|
-
children: /* @__PURE__ */ r(
|
|
1192
|
-
E,
|
|
1193
|
-
{
|
|
1194
|
-
as: "div",
|
|
1195
|
-
background: "secondary",
|
|
1196
|
-
borderRadius: `${xe} ${xe} ${ue} ${ue}`,
|
|
1197
|
-
padding: i ? "small" : "mediumSmall",
|
|
1198
|
-
cursor: R ? "pointer" : void 0,
|
|
1199
|
-
onClick: R ? G : void 0,
|
|
1200
|
-
"data-testid": `module-item-${e.id}`,
|
|
1201
|
-
children: /* @__PURE__ */ r("div", { style: { paddingInlineStart: `${Math.max(e.indent - 1, 0) * lo}rem` }, children: /* @__PURE__ */ g(I, { alignItems: "start", gap: "mediumSmall", children: [
|
|
1202
|
-
/* @__PURE__ */ r(I.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ g(I, { alignItems: "center", children: [
|
|
1203
|
-
e.indent > 0 ? /* @__PURE__ */ r(
|
|
1204
|
-
I.Item,
|
|
1205
|
-
{
|
|
1206
|
-
size: Oi,
|
|
1207
|
-
textAlign: "center",
|
|
1208
|
-
"data-testid": "item-nest-arrow",
|
|
1209
|
-
children: /* @__PURE__ */ r("span", { style: { color: p }, children: /* @__PURE__ */ r(dr, { size: "md", color: "inherit" }) })
|
|
1210
|
-
}
|
|
1211
|
-
) : null,
|
|
1212
|
-
/* @__PURE__ */ g(I.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1213
|
-
/* @__PURE__ */ r(
|
|
1214
|
-
"div",
|
|
1215
|
-
{
|
|
1216
|
-
style: {
|
|
1217
|
-
lineHeight: i ? 0 : `${uo}rem`,
|
|
1218
|
-
marginBottom: N.length === 0 ? 0 : `${i ? go : mo}rem`
|
|
1219
|
-
},
|
|
1220
|
-
children: Je
|
|
1221
|
-
}
|
|
1222
|
-
),
|
|
1223
|
-
/* @__PURE__ */ r("div", { style: Nt, children: /* @__PURE__ */ r(
|
|
1224
|
-
S,
|
|
1225
|
-
{
|
|
1226
|
-
size: i ? "small" : "x-small",
|
|
1227
|
-
lineHeight: "default",
|
|
1228
|
-
color: "secondary",
|
|
1229
|
-
"data-testid": "module-item-meta",
|
|
1230
|
-
children: $.map((y, Y) => /* @__PURE__ */ r(
|
|
1231
|
-
"span",
|
|
1232
|
-
{
|
|
1233
|
-
style: i ? Y > 0 ? He : $i : $.length > 1 ? Y > 0 ? qi : He : void 0,
|
|
1234
|
-
"data-testid": "meta-line",
|
|
1235
|
-
children: y.map((q, T) => /* @__PURE__ */ g(Rn, { children: [
|
|
1236
|
-
T > 0 ? /* @__PURE__ */ r("span", { style: zt, children: " " }) : null,
|
|
1237
|
-
/* @__PURE__ */ g(
|
|
1238
|
-
"span",
|
|
1239
|
-
{
|
|
1240
|
-
style: T > 0 ? Re : Le,
|
|
1241
|
-
"data-testid": "meta-fact",
|
|
1242
|
-
"data-fact-key": q.key,
|
|
1243
|
-
children: [
|
|
1244
|
-
pe(q.icon) ? null : /* @__PURE__ */ r(
|
|
1245
|
-
"span",
|
|
1246
|
-
{
|
|
1247
|
-
style: co,
|
|
1248
|
-
"aria-hidden": "true",
|
|
1249
|
-
"data-testid": `meta-icon-${q.key}`,
|
|
1250
|
-
children: i && wt(q.icon) && q.icon.props.size === "xs" ? ir(q.icon, { size: "sm" }) : q.icon
|
|
1251
|
-
}
|
|
1252
|
-
),
|
|
1253
|
-
q.node
|
|
1254
|
-
]
|
|
1255
|
-
}
|
|
1256
|
-
)
|
|
1257
|
-
] }, q.key))
|
|
1258
|
-
},
|
|
1259
|
-
y[0].key
|
|
1260
|
-
))
|
|
1261
|
-
}
|
|
1262
|
-
) }),
|
|
1263
|
-
i && oe ? /* @__PURE__ */ r(E, { as: "div", margin: "x-small 0 0 0", children: oe }) : null
|
|
1264
|
-
] })
|
|
1265
|
-
] }) }),
|
|
1266
|
-
!i && oe ? /* @__PURE__ */ r(I.Item, { children: oe }) : null
|
|
1267
|
-
] }) })
|
|
1268
|
-
}
|
|
1269
|
-
)
|
|
1270
|
-
}
|
|
1271
|
-
);
|
|
1272
|
-
}
|
|
1273
|
-
const ji = Ln(Ki), Yi = {
|
|
1274
|
-
not_started: Te.not_started,
|
|
1275
|
-
in_progress: Te.in_progress,
|
|
1276
|
-
complete: Te.complete,
|
|
1277
|
-
missing: Te.missing,
|
|
1278
|
-
due_this_week: xt
|
|
1279
|
-
}, Vi = {
|
|
740
|
+
const Zi = {
|
|
741
|
+
not_started: _e.not_started,
|
|
742
|
+
in_progress: _e.in_progress,
|
|
743
|
+
complete: _e.complete,
|
|
744
|
+
missing: _e.missing,
|
|
745
|
+
due_this_week: kn
|
|
746
|
+
}, Xi = {
|
|
1280
747
|
primary: "secondary",
|
|
1281
748
|
info: "brand",
|
|
1282
749
|
success: "success",
|
|
1283
750
|
warning: "warning"
|
|
1284
751
|
};
|
|
1285
|
-
function
|
|
752
|
+
function Ji({
|
|
1286
753
|
value: e,
|
|
1287
754
|
onChange: t,
|
|
1288
755
|
interaction: n = "enabled"
|
|
1289
756
|
}) {
|
|
1290
|
-
const { t:
|
|
1291
|
-
return
|
|
1292
|
-
|
|
757
|
+
const { t: r } = x(), o = Te(), i = F(() => Ze(o.filters), [o.filters]), l = ni();
|
|
758
|
+
return i.length === 0 ? null : /* @__PURE__ */ s(
|
|
759
|
+
_t,
|
|
1293
760
|
{
|
|
1294
|
-
renderLabel: /* @__PURE__ */
|
|
1295
|
-
renderBeforeInput: /* @__PURE__ */
|
|
761
|
+
renderLabel: /* @__PURE__ */ s(zt, { children: r("filterGroupLabel") }),
|
|
762
|
+
renderBeforeInput: /* @__PURE__ */ s(b, { weight: "bold", "aria-hidden": "true", children: r("filterGroupLabel") }),
|
|
1296
763
|
value: e,
|
|
1297
|
-
onChange: (
|
|
1298
|
-
|
|
764
|
+
onChange: (u, a) => {
|
|
765
|
+
a.value !== void 0 && t(String(a.value));
|
|
1299
766
|
},
|
|
1300
767
|
interaction: n,
|
|
1301
768
|
"data-testid": "filter-select",
|
|
1302
|
-
children:
|
|
1303
|
-
const
|
|
1304
|
-
return /* @__PURE__ */
|
|
1305
|
-
|
|
769
|
+
children: i.map((u) => {
|
|
770
|
+
const a = Zi[u.key];
|
|
771
|
+
return /* @__PURE__ */ s(
|
|
772
|
+
_t.Option,
|
|
1306
773
|
{
|
|
1307
|
-
id: `${l}-${
|
|
1308
|
-
value:
|
|
1309
|
-
renderBeforeLabel:
|
|
1310
|
-
"data-testid": `filter-option-${
|
|
1311
|
-
children:
|
|
774
|
+
id: `${l}-${u.key}`,
|
|
775
|
+
value: u.key,
|
|
776
|
+
renderBeforeLabel: a ? /* @__PURE__ */ s(b, { color: Xi[a.tone], children: a.icon }) : void 0,
|
|
777
|
+
"data-testid": `filter-option-${u.key}`,
|
|
778
|
+
children: r(u.label)
|
|
1312
779
|
},
|
|
1313
|
-
|
|
780
|
+
u.key
|
|
1314
781
|
);
|
|
1315
782
|
})
|
|
1316
783
|
}
|
|
1317
784
|
);
|
|
1318
785
|
}
|
|
1319
|
-
const
|
|
1320
|
-
function
|
|
1321
|
-
const { t } =
|
|
1322
|
-
if (e.length === 1) return /* @__PURE__ */
|
|
786
|
+
const bt = "\0", er = { textDecoration: "underline dotted", cursor: "help" }, Jt = { ...On, marginInlineEnd: "0.375rem" };
|
|
787
|
+
function tr({ names: e }) {
|
|
788
|
+
const { t } = x();
|
|
789
|
+
if (e.length === 1) return /* @__PURE__ */ s(W, { children: t("lockedByPrerequisiteByline", { name: e[0] }) });
|
|
1323
790
|
const n = t("lockedByPrerequisitesByline", {
|
|
1324
791
|
count: e.length,
|
|
1325
|
-
prerequisites:
|
|
1326
|
-
}), [
|
|
1327
|
-
return /* @__PURE__ */
|
|
1328
|
-
|
|
1329
|
-
/* @__PURE__ */
|
|
792
|
+
prerequisites: bt
|
|
793
|
+
}), [r, ...o] = n.split(bt), i = o.length > 0 ? o.join("") : null;
|
|
794
|
+
return /* @__PURE__ */ m(W, { children: [
|
|
795
|
+
i === null ? null : r,
|
|
796
|
+
/* @__PURE__ */ s(pi, { renderTip: e.join(", "), children: /* @__PURE__ */ s(
|
|
1330
797
|
"span",
|
|
1331
798
|
{
|
|
1332
799
|
tabIndex: 0,
|
|
1333
|
-
style:
|
|
800
|
+
style: er,
|
|
1334
801
|
onClick: (l) => l.stopPropagation(),
|
|
1335
802
|
"data-testid": "module-byline-prerequisites",
|
|
1336
|
-
children:
|
|
803
|
+
children: i === null ? n : t("lockedByPrerequisitesCount", { count: e.length })
|
|
1337
804
|
}
|
|
1338
805
|
) }),
|
|
1339
|
-
|
|
806
|
+
i
|
|
1340
807
|
] });
|
|
1341
808
|
}
|
|
1342
|
-
function
|
|
1343
|
-
var
|
|
1344
|
-
const n =
|
|
1345
|
-
let
|
|
1346
|
-
|
|
1347
|
-
const
|
|
1348
|
-
let
|
|
1349
|
-
if (
|
|
1350
|
-
const
|
|
1351
|
-
|
|
809
|
+
function nr({ module: e, today: t }) {
|
|
810
|
+
var p;
|
|
811
|
+
const n = Je(), r = Ot(), o = ((p = e.progress) == null ? void 0 : p.status) === "locked", i = e.unlockAt ?? null, l = e.prerequisiteModules.map((h) => h.name.trim()).filter((h) => h !== ""), u = i !== null && new Date(i) > t;
|
|
812
|
+
let a = null;
|
|
813
|
+
i !== null && u && (o || !e.progress) ? a = n.unlockByline(i, t) : i !== null && !u && !e.progress && (a = n.unlockedByline(i, t));
|
|
814
|
+
const d = o && l.length > 0;
|
|
815
|
+
let g = null;
|
|
816
|
+
if (a === null && !d && !o) {
|
|
817
|
+
const h = e.estimatedDurationMinutes ?? xn(e.items);
|
|
818
|
+
g = h === null ? null : n.estimatedDurationByline(h);
|
|
1352
819
|
}
|
|
1353
|
-
return
|
|
1354
|
-
/* @__PURE__ */
|
|
1355
|
-
|
|
1356
|
-
] }) : /* @__PURE__ */
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
820
|
+
return a === null && !d && g === null ? null : /* @__PURE__ */ s(M, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ s("div", { style: Dt, children: /* @__PURE__ */ s(b, { variant: "contentSmall", color: "secondary", "data-testid": "module-byline", children: g !== null ? /* @__PURE__ */ m(W, { children: [
|
|
821
|
+
/* @__PURE__ */ s("span", { style: Jt, children: /* @__PURE__ */ s(Nt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
|
|
822
|
+
g
|
|
823
|
+
] }) : /* @__PURE__ */ m(W, { children: [
|
|
824
|
+
a,
|
|
825
|
+
a !== null && d ? /* @__PURE__ */ s("span", { style: qt, children: " " }) : null,
|
|
826
|
+
d ? /* @__PURE__ */ s("span", { style: a !== null ? r : void 0, children: /* @__PURE__ */ s(tr, { names: l }) }) : null
|
|
1360
827
|
] }) }) }) });
|
|
1361
828
|
}
|
|
1362
|
-
const
|
|
1363
|
-
var n, o, i,
|
|
829
|
+
const ir = "#273540", rr = "#D7DADE", sr = "0.25rem", or = (e, t) => {
|
|
830
|
+
var n, r, o, i, l;
|
|
1364
831
|
return {
|
|
1365
|
-
meterColorBrand: ((
|
|
1366
|
-
borderRadius: String(((
|
|
1367
|
-
borderColor: ((l = (
|
|
832
|
+
meterColorBrand: ((r = (n = t.colors) == null ? void 0 : n.contrasts) == null ? void 0 : r.grey125125) ?? ir,
|
|
833
|
+
borderRadius: String(((o = t.borders) == null ? void 0 : o.radiusMedium) ?? sr),
|
|
834
|
+
borderColor: ((l = (i = t.colors) == null ? void 0 : i.contrasts) == null ? void 0 : l.grey1424) ?? rr,
|
|
1368
835
|
trackBottomBorderColor: "transparent"
|
|
1369
836
|
};
|
|
1370
|
-
},
|
|
1371
|
-
function
|
|
837
|
+
}, lr = "66.667%", ar = "80px", ur = 2, dr = { components: { TruncateText: { fontFamily: "inherit" } } };
|
|
838
|
+
function cr({
|
|
1372
839
|
module: e,
|
|
1373
840
|
breakpoints: t
|
|
1374
841
|
}) {
|
|
1375
|
-
const { t: n } =
|
|
1376
|
-
if (!
|
|
1377
|
-
const l = Object.keys(t).length === 0 || t.desktop === !0,
|
|
1378
|
-
return /* @__PURE__ */
|
|
1379
|
-
|
|
842
|
+
const { t: n } = x(), r = Je(), o = Ot(), i = e.progress;
|
|
843
|
+
if (!i || i.status === "locked" || i.requirementCount <= 0) return null;
|
|
844
|
+
const l = Object.keys(t).length === 0 || t.desktop === !0, u = Un(e.items);
|
|
845
|
+
return /* @__PURE__ */ m(
|
|
846
|
+
_,
|
|
1380
847
|
{
|
|
1381
|
-
width: l ?
|
|
848
|
+
width: l ? lr : "100%",
|
|
1382
849
|
alignItems: "center",
|
|
1383
850
|
gap: "x-small",
|
|
1384
851
|
margin: "x-small 0 0 0",
|
|
1385
852
|
"data-testid": "module-progress",
|
|
1386
853
|
children: [
|
|
1387
|
-
/* @__PURE__ */
|
|
1388
|
-
|
|
854
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(M, { as: "div", width: ar, "data-testid": "module-progress-bar", children: /* @__PURE__ */ s(
|
|
855
|
+
gi,
|
|
1389
856
|
{
|
|
1390
857
|
size: "x-small",
|
|
1391
858
|
meterColor: "brand",
|
|
1392
|
-
valueNow:
|
|
1393
|
-
valueMax:
|
|
859
|
+
valueNow: i.requirementsMet,
|
|
860
|
+
valueMax: i.requirementCount,
|
|
1394
861
|
shouldAnimate: !1,
|
|
1395
862
|
screenReaderLabel: n("moduleProgressScreenReaderLabel", { name: e.name }),
|
|
1396
863
|
formatScreenReaderValue: () => {
|
|
1397
|
-
const
|
|
864
|
+
const a = Fn(
|
|
1398
865
|
n,
|
|
1399
|
-
|
|
1400
|
-
|
|
866
|
+
i.requirementsMet,
|
|
867
|
+
i.requirementCount
|
|
1401
868
|
);
|
|
1402
|
-
return
|
|
869
|
+
return u === null ? a : `${a}, ${r.remainingDurationByline(u)}`;
|
|
1403
870
|
},
|
|
1404
|
-
themeOverride:
|
|
871
|
+
themeOverride: or
|
|
1405
872
|
}
|
|
1406
873
|
) }) }),
|
|
1407
|
-
/* @__PURE__ */
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
874
|
+
/* @__PURE__ */ s(_.Item, { shouldShrink: !0, "aria-hidden": "true", children: /* @__PURE__ */ s("div", { style: Dt, children: /* @__PURE__ */ m(b, { variant: "contentSmall", color: "secondary", children: [
|
|
875
|
+
r.progress(
|
|
876
|
+
i.percentComplete,
|
|
877
|
+
i.requirementsMet,
|
|
878
|
+
i.requirementCount
|
|
1412
879
|
),
|
|
1413
|
-
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
/* @__PURE__ */
|
|
1416
|
-
/* @__PURE__ */
|
|
1417
|
-
|
|
880
|
+
u !== null ? /* @__PURE__ */ m(W, { children: [
|
|
881
|
+
/* @__PURE__ */ s("span", { style: qt, children: " " }),
|
|
882
|
+
/* @__PURE__ */ m("span", { style: o, children: [
|
|
883
|
+
/* @__PURE__ */ s("span", { style: Jt, children: /* @__PURE__ */ s(Nt, { width: "0.75rem", height: "0.75rem", color: "secondary" }) }),
|
|
884
|
+
r.remainingDurationByline(u)
|
|
1418
885
|
] })
|
|
1419
886
|
] }) : null
|
|
1420
887
|
] }) }) })
|
|
@@ -1422,32 +889,35 @@ function as({
|
|
|
1422
889
|
}
|
|
1423
890
|
);
|
|
1424
891
|
}
|
|
1425
|
-
const
|
|
1426
|
-
function
|
|
892
|
+
const Pt = (e) => `platform-modules-panel-${e}`;
|
|
893
|
+
function He(e) {
|
|
1427
894
|
return e !== void 0 && e.type !== "sub_header";
|
|
1428
895
|
}
|
|
1429
|
-
function
|
|
1430
|
-
return
|
|
896
|
+
function Ct(e) {
|
|
897
|
+
return He(e) && e.indent > 0;
|
|
1431
898
|
}
|
|
1432
|
-
function
|
|
899
|
+
function mr(e, t) {
|
|
1433
900
|
let n = t;
|
|
1434
|
-
return e.map((
|
|
901
|
+
return e.map((r) => {
|
|
902
|
+
if (r.type !== "sub_header")
|
|
903
|
+
return n = r.itemNumber ?? n + 1, n;
|
|
904
|
+
});
|
|
1435
905
|
}
|
|
1436
|
-
function
|
|
906
|
+
function gr({
|
|
1437
907
|
module: e,
|
|
1438
908
|
state: t,
|
|
1439
909
|
today: n,
|
|
1440
|
-
showDiagnostics:
|
|
1441
|
-
stackPill:
|
|
1442
|
-
moduleLabel:
|
|
910
|
+
showDiagnostics: r,
|
|
911
|
+
stackPill: o,
|
|
912
|
+
moduleLabel: i
|
|
1443
913
|
}) {
|
|
1444
|
-
const { t: l } =
|
|
1445
|
-
|
|
1446
|
-
if (!
|
|
1447
|
-
const
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
loaded:
|
|
914
|
+
const { t: l } = x(), u = Xe(), a = k(null), d = mr(t.items, t.itemOffset), g = t.items.length, p = !t.isLoading && !t.isRefreshing;
|
|
915
|
+
B(() => {
|
|
916
|
+
if (!p || g === 0 || a.current === t.page) return;
|
|
917
|
+
const f = a.current === null;
|
|
918
|
+
a.current = t.page, N(
|
|
919
|
+
f ? l("itemsLoadedAnnouncement", {
|
|
920
|
+
loaded: g,
|
|
1451
921
|
count: e.itemCount,
|
|
1452
922
|
name: e.name
|
|
1453
923
|
}) : l("itemsPageChangedAnnouncement", {
|
|
@@ -1456,26 +926,26 @@ function us({
|
|
|
1456
926
|
name: e.name
|
|
1457
927
|
})
|
|
1458
928
|
);
|
|
1459
|
-
}, [
|
|
1460
|
-
const
|
|
1461
|
-
|
|
929
|
+
}, [p, g, t.page, t.pageCount, e.itemCount, e.name, l]);
|
|
930
|
+
const h = (f) => {
|
|
931
|
+
u("paginate-items"), f === 1 ? t.goToFirstPage() : f === t.page - 1 ? t.goToPreviousPage() : f === t.page + 1 ? t.goToNextPage() : f === t.pageCount && t.goToLastPage();
|
|
1462
932
|
};
|
|
1463
|
-
return t.error ? /* @__PURE__ */
|
|
1464
|
-
|
|
933
|
+
return t.error ? /* @__PURE__ */ s(M, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(
|
|
934
|
+
X,
|
|
1465
935
|
{
|
|
1466
936
|
variant: "error",
|
|
1467
937
|
margin: "0",
|
|
1468
|
-
liveRegion:
|
|
938
|
+
liveRegion: Se,
|
|
1469
939
|
liveRegionPoliteness: "assertive",
|
|
1470
940
|
"data-testid": "items-error",
|
|
1471
941
|
children: l("itemsLoadErrorAlert", { message: t.error.message })
|
|
1472
942
|
}
|
|
1473
|
-
) }) : t.isLoading ? /* @__PURE__ */
|
|
1474
|
-
/* @__PURE__ */
|
|
943
|
+
) }) : t.isLoading ? /* @__PURE__ */ m(M, { as: "div", margin: "small 0 0 0", "data-testid": "items-loading", children: [
|
|
944
|
+
/* @__PURE__ */ s(et, { size: "x-small", renderTitle: l("itemsLoadingSpinnerLabel") }),
|
|
1475
945
|
" ",
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
] }) : /* @__PURE__ */
|
|
1478
|
-
|
|
946
|
+
/* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("itemsLoadingText") })
|
|
947
|
+
] }) : /* @__PURE__ */ m(M, { as: "div", margin: "small 0 0 0", children: [
|
|
948
|
+
r ? /* @__PURE__ */ m(b, { size: "x-small", color: "secondary", "data-testid": "items-source", children: [
|
|
1479
949
|
"items source: ",
|
|
1480
950
|
t.source,
|
|
1481
951
|
" · page ",
|
|
@@ -1483,79 +953,79 @@ function us({
|
|
|
1483
953
|
" of ",
|
|
1484
954
|
t.pageCount
|
|
1485
955
|
] }) : null,
|
|
1486
|
-
t.items.length === 0 ? /* @__PURE__ */
|
|
1487
|
-
|
|
956
|
+
t.items.length === 0 ? /* @__PURE__ */ s(M, { as: "div", padding: "small", "data-testid": "items-empty", children: /* @__PURE__ */ s(b, { size: "small", color: "secondary", children: l("noItemsEmptyState") }) }) : /* @__PURE__ */ s(Ge, { isUnstyled: !0, margin: "none", "data-testid": "items-list", children: t.items.map((f, I) => /* @__PURE__ */ s(We, { children: /* @__PURE__ */ s(
|
|
957
|
+
Bn,
|
|
1488
958
|
{
|
|
1489
|
-
item:
|
|
959
|
+
item: f,
|
|
1490
960
|
today: n,
|
|
1491
|
-
attachedAbove:
|
|
1492
|
-
attachedBelow:
|
|
1493
|
-
stackPill:
|
|
1494
|
-
moduleLabel:
|
|
1495
|
-
itemNumber:
|
|
961
|
+
attachedAbove: Ct(f) && He(t.items[I - 1]),
|
|
962
|
+
attachedBelow: He(f) && Ct(t.items[I + 1]),
|
|
963
|
+
stackPill: o,
|
|
964
|
+
moduleLabel: i,
|
|
965
|
+
itemNumber: d[I]
|
|
1496
966
|
}
|
|
1497
|
-
) },
|
|
1498
|
-
t.pageCount > 1 ? /* @__PURE__ */
|
|
1499
|
-
|
|
967
|
+
) }, f.id)) }),
|
|
968
|
+
t.pageCount > 1 ? /* @__PURE__ */ s(
|
|
969
|
+
xt,
|
|
1500
970
|
{
|
|
1501
971
|
as: "nav",
|
|
1502
972
|
variant: "compact",
|
|
1503
973
|
withFirstAndLastButton: !0,
|
|
1504
974
|
margin: "small 0 0 0",
|
|
1505
|
-
label: /* @__PURE__ */
|
|
975
|
+
label: /* @__PURE__ */ s(zt, { children: l("itemsPaginationLabel", { name: e.name }) }),
|
|
1506
976
|
labelFirst: l("paginationFirstPage"),
|
|
1507
977
|
labelPrev: l("paginationPreviousPage"),
|
|
1508
978
|
labelNext: l("paginationNextPage"),
|
|
1509
979
|
labelLast: l("paginationLastPage"),
|
|
1510
|
-
screenReaderLabelPageButton: (
|
|
980
|
+
screenReaderLabelPageButton: (f) => l("paginationPageLabel", { page: f }),
|
|
1511
981
|
ellipsis: l("paginationEllipsis"),
|
|
1512
982
|
totalPageNumber: t.pageCount,
|
|
1513
983
|
currentPage: t.page,
|
|
1514
984
|
disabled: t.isRefreshing,
|
|
1515
|
-
onPageChange:
|
|
985
|
+
onPageChange: h,
|
|
1516
986
|
"data-testid": "items-pagination"
|
|
1517
987
|
}
|
|
1518
988
|
) : null
|
|
1519
989
|
] });
|
|
1520
990
|
}
|
|
1521
|
-
function
|
|
991
|
+
function pr({
|
|
1522
992
|
module: e,
|
|
1523
993
|
expanded: t,
|
|
1524
994
|
onToggle: n,
|
|
1525
|
-
itemsState:
|
|
1526
|
-
today:
|
|
1527
|
-
showDiagnostics:
|
|
995
|
+
itemsState: r,
|
|
996
|
+
today: o,
|
|
997
|
+
showDiagnostics: i = !1,
|
|
1528
998
|
headingLevel: l = "h3",
|
|
1529
|
-
moduleLabel:
|
|
1530
|
-
breakpoints:
|
|
1531
|
-
toggleRef:
|
|
999
|
+
moduleLabel: u,
|
|
1000
|
+
breakpoints: a = {},
|
|
1001
|
+
toggleRef: d
|
|
1532
1002
|
}) {
|
|
1533
|
-
var
|
|
1534
|
-
const { t:
|
|
1535
|
-
|
|
1003
|
+
var K, q, ee, ce;
|
|
1004
|
+
const { t: g, timezone: p } = x(), h = Xe(), f = Je(), { navigation: I } = Te(), v = Dn(), L = ((K = e.progress) == null ? void 0 : K.status) === "locked", $ = L ? null : ((q = I.getModuleHref) == null ? void 0 : q.call(I, e)) ?? null, O = u === void 0 ? f.moduleLabel(e.position, e) : u, S = (O == null ? void 0 : O.trim()) || null, C = S ? g("moduleNameWithLabel", { label: S, name: e.name }) : e.name, j = /* @__PURE__ */ s(
|
|
1005
|
+
ue,
|
|
1536
1006
|
{
|
|
1537
1007
|
level: l,
|
|
1538
1008
|
variant: "titleCardMini",
|
|
1539
|
-
color:
|
|
1540
|
-
"aria-label":
|
|
1009
|
+
color: L ? "secondary" : "primary",
|
|
1010
|
+
"aria-label": C,
|
|
1541
1011
|
"data-testid": "module-name",
|
|
1542
|
-
children: /* @__PURE__ */
|
|
1012
|
+
children: /* @__PURE__ */ s(ui, { themeOverride: dr, children: /* @__PURE__ */ s(ai, { linesAllowed: ur, children: C }) })
|
|
1543
1013
|
}
|
|
1544
|
-
),
|
|
1545
|
-
|
|
1546
|
-
},
|
|
1547
|
-
var
|
|
1548
|
-
(
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1014
|
+
), T = a.mobileOnly === !0, w = () => {
|
|
1015
|
+
h(t ? "module-collapse" : "module-expand"), n(e.id);
|
|
1016
|
+
}, H = () => {
|
|
1017
|
+
var R;
|
|
1018
|
+
(R = window.getSelection()) != null && R.toString().trim() || w();
|
|
1019
|
+
}, A = (ee = e.progress) != null && ee.status ? /* @__PURE__ */ s(
|
|
1020
|
+
qn,
|
|
1551
1021
|
{
|
|
1552
1022
|
status: e.progress.status,
|
|
1553
1023
|
missingCount: e.progress.missingCount,
|
|
1554
1024
|
incompleteCount: e.progress.incompleteCount
|
|
1555
1025
|
}
|
|
1556
|
-
) : null,
|
|
1557
|
-
return /* @__PURE__ */
|
|
1558
|
-
|
|
1026
|
+
) : null, D = ((ce = e.progress) == null ? void 0 : ce.status) !== void 0 && e.progress.status !== "complete" && !L && zn(e.progress.nextDueAt, o, p) ? /* @__PURE__ */ s($n, {}) : null;
|
|
1027
|
+
return /* @__PURE__ */ m(
|
|
1028
|
+
M,
|
|
1559
1029
|
{
|
|
1560
1030
|
as: "div",
|
|
1561
1031
|
background: "primary",
|
|
@@ -1566,509 +1036,509 @@ function ds({
|
|
|
1566
1036
|
margin: "0 0 small 0",
|
|
1567
1037
|
"data-testid": `module-card-${e.id}`,
|
|
1568
1038
|
children: [
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
|
|
1039
|
+
/* @__PURE__ */ s(M, { as: "div", cursor: "pointer", children: /* @__PURE__ */ m(
|
|
1040
|
+
_,
|
|
1571
1041
|
{
|
|
1572
1042
|
alignItems: "start",
|
|
1573
1043
|
gap: "mediumSmall",
|
|
1574
|
-
onClick:
|
|
1044
|
+
onClick: H,
|
|
1575
1045
|
"data-testid": "module-header",
|
|
1576
1046
|
children: [
|
|
1577
|
-
/* @__PURE__ */
|
|
1578
|
-
/* @__PURE__ */
|
|
1579
|
-
/* @__PURE__ */
|
|
1580
|
-
|
|
1047
|
+
/* @__PURE__ */ m(_.Item, { shouldGrow: !0, shouldShrink: !0, children: [
|
|
1048
|
+
/* @__PURE__ */ m(M, { as: "div", children: [
|
|
1049
|
+
/* @__PURE__ */ s(M, { as: "div", children: $ ? /* @__PURE__ */ s(
|
|
1050
|
+
mi,
|
|
1581
1051
|
{
|
|
1582
|
-
href:
|
|
1052
|
+
href: $,
|
|
1583
1053
|
display: "inline-block",
|
|
1584
1054
|
forceButtonRole: !1,
|
|
1585
|
-
variant:
|
|
1586
|
-
"aria-label":
|
|
1587
|
-
onClick: (
|
|
1588
|
-
children:
|
|
1055
|
+
variant: v,
|
|
1056
|
+
"aria-label": C,
|
|
1057
|
+
onClick: (R) => R.stopPropagation(),
|
|
1058
|
+
children: j
|
|
1589
1059
|
}
|
|
1590
|
-
) :
|
|
1591
|
-
e.published ? null : /* @__PURE__ */
|
|
1060
|
+
) : j }),
|
|
1061
|
+
e.published ? null : /* @__PURE__ */ m(b, { size: "x-small", color: "secondary", children: [
|
|
1592
1062
|
" ",
|
|
1593
|
-
|
|
1063
|
+
g("moduleUnpublishedBadge")
|
|
1594
1064
|
] })
|
|
1595
1065
|
] }),
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1066
|
+
/* @__PURE__ */ s(nr, { module: e, today: o }),
|
|
1067
|
+
T && (A || D) ? /* @__PURE__ */ s(M, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ m(_, { gap: "x-small", wrap: "wrap", children: [
|
|
1068
|
+
D ? /* @__PURE__ */ s(_.Item, { children: D }) : null,
|
|
1069
|
+
A ? /* @__PURE__ */ s(_.Item, { children: A }) : null
|
|
1600
1070
|
] }) }) : null,
|
|
1601
|
-
/* @__PURE__ */
|
|
1071
|
+
/* @__PURE__ */ s(cr, { module: e, breakpoints: a })
|
|
1602
1072
|
] }),
|
|
1603
|
-
/* @__PURE__ */
|
|
1604
|
-
!
|
|
1605
|
-
|
|
1606
|
-
|
|
1073
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(_, { alignItems: "center", gap: "mediumSmall", children: [
|
|
1074
|
+
!T && (D || A) ? /* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(_, { alignItems: "center", gap: "x-small", children: [
|
|
1075
|
+
D ? /* @__PURE__ */ s(_.Item, { children: D }) : null,
|
|
1076
|
+
A ? /* @__PURE__ */ s(_.Item, { children: A }) : null
|
|
1607
1077
|
] }) }) : null,
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
|
|
1078
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(
|
|
1079
|
+
di,
|
|
1610
1080
|
{
|
|
1611
|
-
elementRef: (
|
|
1081
|
+
elementRef: (R) => d == null ? void 0 : d(e.id, R),
|
|
1612
1082
|
size: "medium",
|
|
1613
1083
|
withBorder: !0,
|
|
1614
1084
|
withBackground: !1,
|
|
1615
|
-
screenReaderLabel: t ?
|
|
1085
|
+
screenReaderLabel: t ? g("collapseModule", { name: e.name }) : g("expandModule", { name: e.name }),
|
|
1616
1086
|
"aria-expanded": t,
|
|
1617
|
-
"aria-controls":
|
|
1618
|
-
onClick: (
|
|
1619
|
-
|
|
1087
|
+
"aria-controls": Pt(e.id),
|
|
1088
|
+
onClick: (R) => {
|
|
1089
|
+
R.stopPropagation(), w();
|
|
1620
1090
|
},
|
|
1621
1091
|
"data-testid": `toggle-module-${e.id}`,
|
|
1622
|
-
children: t ? /* @__PURE__ */
|
|
1092
|
+
children: t ? /* @__PURE__ */ s(ri, {}) : /* @__PURE__ */ s(si, {})
|
|
1623
1093
|
}
|
|
1624
1094
|
) })
|
|
1625
1095
|
] }) })
|
|
1626
1096
|
]
|
|
1627
1097
|
}
|
|
1628
1098
|
) }),
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
|
|
1099
|
+
/* @__PURE__ */ s("div", { id: Pt(e.id), role: "group", "aria-label": e.name, hidden: !t, children: t ? /* @__PURE__ */ s(
|
|
1100
|
+
gr,
|
|
1631
1101
|
{
|
|
1632
1102
|
module: e,
|
|
1633
|
-
state:
|
|
1634
|
-
today:
|
|
1635
|
-
showDiagnostics:
|
|
1636
|
-
stackPill:
|
|
1637
|
-
moduleLabel:
|
|
1103
|
+
state: r,
|
|
1104
|
+
today: o,
|
|
1105
|
+
showDiagnostics: i,
|
|
1106
|
+
stackPill: T,
|
|
1107
|
+
moduleLabel: Nn(e) ? null : S
|
|
1638
1108
|
}
|
|
1639
1109
|
) : null })
|
|
1640
1110
|
]
|
|
1641
1111
|
}
|
|
1642
1112
|
);
|
|
1643
1113
|
}
|
|
1644
|
-
const
|
|
1114
|
+
const fr = ii(pr), js = ["place_new", "reorganize_all"], en = ["assignment", "discussion", "quiz", "page", "file"], Ye = 1e3, hr = () => ({
|
|
1645
1115
|
mode: "place_new",
|
|
1646
|
-
contentTypes: [...
|
|
1116
|
+
contentTypes: [...en],
|
|
1647
1117
|
setPrerequisites: !0,
|
|
1648
1118
|
setRequirements: !0,
|
|
1649
1119
|
direction: ""
|
|
1650
1120
|
});
|
|
1651
|
-
function
|
|
1121
|
+
function Mr(e, t) {
|
|
1652
1122
|
return e(t === "assignment" ? "itemTypeAssignment" : t === "discussion" ? "itemTypeDiscussion" : t === "quiz" ? "itemTypeQuiz" : t === "page" ? "itemTypePage" : "itemTypeFile");
|
|
1653
1123
|
}
|
|
1654
|
-
const
|
|
1655
|
-
...e.setPrerequisites ? [
|
|
1656
|
-
...e.setRequirements ? [
|
|
1124
|
+
const je = "prerequisites", Qe = "requirements", _r = (e) => [
|
|
1125
|
+
...e.setPrerequisites ? [je] : [],
|
|
1126
|
+
...e.setRequirements ? [Qe] : []
|
|
1657
1127
|
];
|
|
1658
|
-
function
|
|
1128
|
+
function Ir({
|
|
1659
1129
|
input: e,
|
|
1660
1130
|
errors: t,
|
|
1661
1131
|
onChange: n,
|
|
1662
|
-
disabled:
|
|
1132
|
+
disabled: r = !1
|
|
1663
1133
|
}) {
|
|
1664
|
-
const { t:
|
|
1665
|
-
return /* @__PURE__ */
|
|
1666
|
-
/* @__PURE__ */
|
|
1667
|
-
|
|
1134
|
+
const { t: o } = x();
|
|
1135
|
+
return /* @__PURE__ */ m(M, { as: "div", "data-testid": "organize-form", children: [
|
|
1136
|
+
/* @__PURE__ */ m(
|
|
1137
|
+
Ei,
|
|
1668
1138
|
{
|
|
1669
1139
|
name: "organize-mode",
|
|
1670
1140
|
value: e.mode,
|
|
1671
|
-
onChange: (
|
|
1672
|
-
description:
|
|
1673
|
-
disabled:
|
|
1141
|
+
onChange: (i, l) => n({ mode: l }),
|
|
1142
|
+
description: o("organizeModeLegend"),
|
|
1143
|
+
disabled: r,
|
|
1674
1144
|
children: [
|
|
1675
|
-
/* @__PURE__ */
|
|
1676
|
-
|
|
1145
|
+
/* @__PURE__ */ s(
|
|
1146
|
+
Et,
|
|
1677
1147
|
{
|
|
1678
1148
|
value: "place_new",
|
|
1679
|
-
label:
|
|
1149
|
+
label: o("organizeModePlaceNew"),
|
|
1680
1150
|
"data-testid": "organize-mode-place-new"
|
|
1681
1151
|
}
|
|
1682
1152
|
),
|
|
1683
|
-
/* @__PURE__ */
|
|
1684
|
-
|
|
1153
|
+
/* @__PURE__ */ s(
|
|
1154
|
+
Et,
|
|
1685
1155
|
{
|
|
1686
1156
|
value: "reorganize_all",
|
|
1687
|
-
label:
|
|
1157
|
+
label: o("organizeModeReorganizeAll"),
|
|
1688
1158
|
"data-testid": "organize-mode-reorganize-all"
|
|
1689
1159
|
}
|
|
1690
1160
|
)
|
|
1691
1161
|
]
|
|
1692
1162
|
}
|
|
1693
1163
|
),
|
|
1694
|
-
e.mode === "reorganize_all" ? /* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
|
|
1164
|
+
e.mode === "reorganize_all" ? /* @__PURE__ */ s(M, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(X, { variant: "warning", margin: "0", "data-testid": "organize-reorganize-warning", children: o("organizeReorganizeWarning") }) }) : null,
|
|
1165
|
+
/* @__PURE__ */ s(M, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ s(
|
|
1166
|
+
It,
|
|
1697
1167
|
{
|
|
1698
1168
|
name: "organize-content-types",
|
|
1699
1169
|
value: [...e.contentTypes],
|
|
1700
|
-
onChange: (
|
|
1701
|
-
description:
|
|
1702
|
-
messages: t.contentTypes ? [{ type: "newError", text:
|
|
1170
|
+
onChange: (i) => n({ contentTypes: i }),
|
|
1171
|
+
description: o("organizeContentTypesLegend"),
|
|
1172
|
+
messages: t.contentTypes ? [{ type: "newError", text: o("organizeErrorPickAContentType") }] : void 0,
|
|
1703
1173
|
layout: "columns",
|
|
1704
|
-
children:
|
|
1705
|
-
|
|
1174
|
+
children: en.map((i) => /* @__PURE__ */ s(
|
|
1175
|
+
Fe,
|
|
1706
1176
|
{
|
|
1707
|
-
value:
|
|
1708
|
-
label:
|
|
1709
|
-
disabled:
|
|
1710
|
-
"data-testid": `organize-content-type-${
|
|
1177
|
+
value: i,
|
|
1178
|
+
label: Mr(o, i),
|
|
1179
|
+
disabled: r,
|
|
1180
|
+
"data-testid": `organize-content-type-${i}`
|
|
1711
1181
|
},
|
|
1712
|
-
|
|
1182
|
+
i
|
|
1713
1183
|
))
|
|
1714
1184
|
}
|
|
1715
1185
|
) }),
|
|
1716
|
-
/* @__PURE__ */
|
|
1717
|
-
|
|
1186
|
+
/* @__PURE__ */ s(M, { as: "div", margin: "medium 0 0 0", children: /* @__PURE__ */ m(
|
|
1187
|
+
It,
|
|
1718
1188
|
{
|
|
1719
1189
|
name: "organize-progression",
|
|
1720
|
-
value:
|
|
1721
|
-
onChange: (
|
|
1722
|
-
setPrerequisites:
|
|
1723
|
-
setRequirements:
|
|
1190
|
+
value: _r(e),
|
|
1191
|
+
onChange: (i) => n({
|
|
1192
|
+
setPrerequisites: i.includes(je),
|
|
1193
|
+
setRequirements: i.includes(Qe)
|
|
1724
1194
|
}),
|
|
1725
|
-
description:
|
|
1195
|
+
description: o("organizeProgressionLegend"),
|
|
1726
1196
|
children: [
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
-
|
|
1197
|
+
/* @__PURE__ */ s(
|
|
1198
|
+
Fe,
|
|
1729
1199
|
{
|
|
1730
|
-
value:
|
|
1731
|
-
label:
|
|
1732
|
-
disabled:
|
|
1200
|
+
value: je,
|
|
1201
|
+
label: o("organizeSetPrerequisites"),
|
|
1202
|
+
disabled: r,
|
|
1733
1203
|
"data-testid": "organize-set-prerequisites"
|
|
1734
1204
|
}
|
|
1735
1205
|
),
|
|
1736
|
-
/* @__PURE__ */
|
|
1737
|
-
|
|
1206
|
+
/* @__PURE__ */ s(
|
|
1207
|
+
Fe,
|
|
1738
1208
|
{
|
|
1739
|
-
value:
|
|
1740
|
-
label:
|
|
1741
|
-
disabled:
|
|
1209
|
+
value: Qe,
|
|
1210
|
+
label: o("organizeSetRequirements"),
|
|
1211
|
+
disabled: r,
|
|
1742
1212
|
"data-testid": "organize-set-requirements"
|
|
1743
1213
|
}
|
|
1744
1214
|
)
|
|
1745
1215
|
]
|
|
1746
1216
|
}
|
|
1747
1217
|
) }),
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
|
|
1218
|
+
/* @__PURE__ */ m(M, { as: "div", margin: "medium 0 0 0", children: [
|
|
1219
|
+
/* @__PURE__ */ s(
|
|
1220
|
+
Si,
|
|
1751
1221
|
{
|
|
1752
|
-
label:
|
|
1753
|
-
placeholder:
|
|
1222
|
+
label: o("organizeDirectionLabel"),
|
|
1223
|
+
placeholder: o("organizeDirectionPlaceholder"),
|
|
1754
1224
|
value: e.direction,
|
|
1755
|
-
onChange: (
|
|
1756
|
-
disabled:
|
|
1225
|
+
onChange: (i) => n({ direction: i.target.value.slice(0, Ye) }),
|
|
1226
|
+
disabled: r,
|
|
1757
1227
|
height: "6rem",
|
|
1758
1228
|
"data-testid": "organize-direction"
|
|
1759
1229
|
}
|
|
1760
1230
|
),
|
|
1761
|
-
/* @__PURE__ */
|
|
1231
|
+
/* @__PURE__ */ s(M, { 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", {
|
|
1762
1232
|
used: e.direction.length,
|
|
1763
|
-
max:
|
|
1233
|
+
max: Ye
|
|
1764
1234
|
}) }) })
|
|
1765
1235
|
] })
|
|
1766
1236
|
] });
|
|
1767
1237
|
}
|
|
1768
|
-
const
|
|
1769
|
-
function
|
|
1238
|
+
const tn = "organize-preview", nn = (e) => `proposed-module-${e + 1}`, Er = (e) => `${e.contentType}-${e.contentId}`;
|
|
1239
|
+
function Sr(e, t) {
|
|
1770
1240
|
const n = e.completionRequirement;
|
|
1771
1241
|
if (n)
|
|
1772
1242
|
return { itemId: t, type: n.type, minScore: n.minScore ?? null };
|
|
1773
1243
|
}
|
|
1774
|
-
function
|
|
1775
|
-
const
|
|
1244
|
+
function yr(e, t, n) {
|
|
1245
|
+
const r = Er(e);
|
|
1776
1246
|
return {
|
|
1777
|
-
id:
|
|
1247
|
+
id: r,
|
|
1778
1248
|
moduleId: t,
|
|
1779
1249
|
title: e.title,
|
|
1780
1250
|
type: e.contentType,
|
|
1781
1251
|
position: n + 1,
|
|
1782
1252
|
indent: 0,
|
|
1783
1253
|
published: !0,
|
|
1784
|
-
completionRequirement:
|
|
1785
|
-
extensions: { [
|
|
1254
|
+
completionRequirement: Sr(e, r) ?? null,
|
|
1255
|
+
extensions: { [Yn]: e.isNew }
|
|
1786
1256
|
};
|
|
1787
1257
|
}
|
|
1788
|
-
function
|
|
1258
|
+
function Tr(e) {
|
|
1789
1259
|
const t = /* @__PURE__ */ new Map();
|
|
1790
|
-
return e.forEach((n,
|
|
1260
|
+
return e.forEach((n, r) => {
|
|
1791
1261
|
t.set(
|
|
1792
1262
|
n.position,
|
|
1793
|
-
t.has(n.position) ? null : { id:
|
|
1263
|
+
t.has(n.position) ? null : { id: nn(r), name: n.name }
|
|
1794
1264
|
);
|
|
1795
1265
|
}), t;
|
|
1796
1266
|
}
|
|
1797
|
-
function
|
|
1798
|
-
return e.prerequisitePositions.flatMap((
|
|
1799
|
-
const
|
|
1800
|
-
return !
|
|
1267
|
+
function br(e, t, n) {
|
|
1268
|
+
return e.prerequisitePositions.flatMap((r) => {
|
|
1269
|
+
const o = n.get(r);
|
|
1270
|
+
return !o || o.id === t ? [] : [o];
|
|
1801
1271
|
});
|
|
1802
1272
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const t =
|
|
1805
|
-
for (const [
|
|
1806
|
-
const l =
|
|
1807
|
-
|
|
1273
|
+
function Pr(e) {
|
|
1274
|
+
const t = Tr(e.modules), n = [], r = {};
|
|
1275
|
+
for (const [o, i] of e.modules.entries()) {
|
|
1276
|
+
const l = nn(o), u = i.items.map((a, d) => yr(a, l, d));
|
|
1277
|
+
r[l] = u, n.push({
|
|
1808
1278
|
id: l,
|
|
1809
|
-
name:
|
|
1810
|
-
position:
|
|
1279
|
+
name: i.name,
|
|
1280
|
+
position: i.position,
|
|
1811
1281
|
published: !0,
|
|
1812
|
-
itemCount:
|
|
1813
|
-
items:
|
|
1814
|
-
prerequisiteModules:
|
|
1815
|
-
requirementCount:
|
|
1282
|
+
itemCount: u.length,
|
|
1283
|
+
items: u,
|
|
1284
|
+
prerequisiteModules: br(i, l, t),
|
|
1285
|
+
requirementCount: i.requirementType === "one" ? 1 : null,
|
|
1816
1286
|
requireSequentialProgress: !1,
|
|
1817
|
-
completionRequirements:
|
|
1818
|
-
(
|
|
1287
|
+
completionRequirements: u.flatMap(
|
|
1288
|
+
(a) => a.completionRequirement ? [a.completionRequirement] : []
|
|
1819
1289
|
),
|
|
1820
1290
|
extensions: {
|
|
1821
|
-
[
|
|
1822
|
-
[
|
|
1823
|
-
[
|
|
1291
|
+
[Hn]: i.isNew,
|
|
1292
|
+
[Wn]: i.items.filter((a) => a.isNew).length,
|
|
1293
|
+
[Gn]: !0
|
|
1824
1294
|
}
|
|
1825
1295
|
});
|
|
1826
1296
|
}
|
|
1827
|
-
return { courseId:
|
|
1297
|
+
return { courseId: tn, modules: n, itemsByModuleId: r };
|
|
1828
1298
|
}
|
|
1829
|
-
const
|
|
1299
|
+
const Cr = {
|
|
1830
1300
|
itemsLoadedAnnouncement: ""
|
|
1831
1301
|
};
|
|
1832
|
-
function
|
|
1833
|
-
const { t } =
|
|
1834
|
-
courseId:
|
|
1835
|
-
adapter:
|
|
1302
|
+
function vr({ proposal: e }) {
|
|
1303
|
+
const { t } = x(), n = F(() => Pr(e), [e]), r = F(() => Kn(n), [n]), o = F(() => n.modules.map((l) => l.id), [n]), i = Vn({
|
|
1304
|
+
courseId: tn,
|
|
1305
|
+
adapter: r,
|
|
1836
1306
|
itemsMode: "inline",
|
|
1837
|
-
initialExpandedModuleIds:
|
|
1307
|
+
initialExpandedModuleIds: o
|
|
1838
1308
|
});
|
|
1839
|
-
return /* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1841
|
-
/* @__PURE__ */ r
|
|
1309
|
+
return /* @__PURE__ */ m(W, { children: [
|
|
1310
|
+
/* @__PURE__ */ s(ue, { level: "h3", margin: "0 0 medium 0", children: t("organizePreviewHeading") }),
|
|
1311
|
+
/* @__PURE__ */ s($r, { data: i, headingLevel: "h3" })
|
|
1842
1312
|
] });
|
|
1843
1313
|
}
|
|
1844
|
-
function
|
|
1845
|
-
const { t } =
|
|
1846
|
-
() => new
|
|
1314
|
+
function Lr({ proposal: e }) {
|
|
1315
|
+
const { t } = x(), n = Te(), r = F(() => Vi(n), [n]), [o] = G(
|
|
1316
|
+
() => new ei({ defaultOptions: { queries: { retry: !1 } } })
|
|
1847
1317
|
);
|
|
1848
|
-
return /* @__PURE__ */
|
|
1849
|
-
e.unplacedItems.length > 0 ? /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
/* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ m(M, { as: "div", "data-testid": "organize-proposal-preview", children: [
|
|
1319
|
+
e.unplacedItems.length > 0 ? /* @__PURE__ */ m(X, { variant: "warning", margin: "0 0 small 0", "data-testid": "organize-unplaced", children: [
|
|
1320
|
+
/* @__PURE__ */ s(M, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeUnplacedHeading", { count: e.unplacedItems.length }) }) }),
|
|
1321
|
+
/* @__PURE__ */ s(M, { as: "div", children: /* @__PURE__ */ s(b, { children: t("organizeUnplacedExplanation") }) }),
|
|
1322
|
+
/* @__PURE__ */ s(Ge, { margin: "x-small 0 0 0", children: e.unplacedItems.map((i) => /* @__PURE__ */ s(We, { children: i.title }, `${i.contentType}-${i.contentId}`)) })
|
|
1853
1323
|
] }) : null,
|
|
1854
|
-
e.warnings.length > 0 ? /* @__PURE__ */
|
|
1855
|
-
/* @__PURE__ */
|
|
1856
|
-
/* @__PURE__ */
|
|
1324
|
+
e.warnings.length > 0 ? /* @__PURE__ */ m(X, { variant: "info", margin: "0 0 small 0", "data-testid": "organize-warnings", children: [
|
|
1325
|
+
/* @__PURE__ */ s(M, { as: "div", children: /* @__PURE__ */ s(b, { weight: "bold", children: t("organizeWarningsHeading", { count: e.warnings.length }) }) }),
|
|
1326
|
+
/* @__PURE__ */ s(Ge, { margin: "x-small 0 0 0", children: e.warnings.map((i) => /* @__PURE__ */ s(We, { children: i }, i)) })
|
|
1857
1327
|
] }) : null,
|
|
1858
|
-
/* @__PURE__ */
|
|
1328
|
+
/* @__PURE__ */ s(ti, { client: o, children: /* @__PURE__ */ s(jn, { translations: Cr, children: /* @__PURE__ */ s(Qn, { value: r, children: /* @__PURE__ */ s(vr, { proposal: e }) }) }) })
|
|
1859
1329
|
] });
|
|
1860
1330
|
}
|
|
1861
|
-
function
|
|
1331
|
+
function vt(e) {
|
|
1862
1332
|
const t = {};
|
|
1863
|
-
return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length >
|
|
1333
|
+
return e.contentTypes.length === 0 && (t.contentTypes = "none_selected"), e.direction.length > Ye && (t.direction = "too_long"), t;
|
|
1864
1334
|
}
|
|
1865
|
-
const
|
|
1335
|
+
const Lt = (e) => Object.keys(e).length > 0, wr = 1e4, Ar = (e) => e instanceof DOMException && e.name === "AbortError", Rr = (e) => e instanceof Error ? e : new Error(String(e)), kr = { loading: "read", applying: "write" }, wt = (e) => {
|
|
1866
1336
|
(e == null ? void 0 : e.kind) === "read" && e.controller.abort();
|
|
1867
1337
|
};
|
|
1868
|
-
function
|
|
1338
|
+
function Or({
|
|
1869
1339
|
actions: e,
|
|
1870
1340
|
onApplied: t
|
|
1871
1341
|
}) {
|
|
1872
|
-
const [n,
|
|
1873
|
-
|
|
1874
|
-
|
|
1342
|
+
const [n, r] = G("form"), [o, i] = G(hr), [l, u] = G(null), [a, d] = G(null), [g, p] = G(!1), h = k(null), f = k(0), I = k(!0);
|
|
1343
|
+
B(() => (I.current = !0, () => {
|
|
1344
|
+
I.current = !1, wt(h.current), h.current = null;
|
|
1875
1345
|
}), []);
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1878
|
-
}, []),
|
|
1879
|
-
|
|
1880
|
-
}, []),
|
|
1881
|
-
(
|
|
1882
|
-
|
|
1883
|
-
const
|
|
1884
|
-
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1887
|
-
|
|
1346
|
+
const v = F(() => vt(o), [o]), L = !Lt(v), $ = U(() => {
|
|
1347
|
+
wt(h.current), h.current = null, f.current += 1, p(!1);
|
|
1348
|
+
}, []), O = U((T) => {
|
|
1349
|
+
i((w) => ({ ...w, ...T }));
|
|
1350
|
+
}, []), S = U(
|
|
1351
|
+
(T, w, H) => {
|
|
1352
|
+
$();
|
|
1353
|
+
const A = new AbortController(), re = f.current;
|
|
1354
|
+
h.current = { kind: kr[T], controller: A }, d(null), r(T);
|
|
1355
|
+
const D = () => I.current && f.current === re;
|
|
1356
|
+
H({ signal: A.signal, current: D }).catch((K) => {
|
|
1357
|
+
A.signal.aborted || Ar(K) || !D() || (d(Rr(K)), r(w));
|
|
1888
1358
|
});
|
|
1889
1359
|
},
|
|
1890
|
-
[
|
|
1891
|
-
),
|
|
1892
|
-
|
|
1893
|
-
const
|
|
1894
|
-
|
|
1360
|
+
[$]
|
|
1361
|
+
), C = U(() => {
|
|
1362
|
+
Lt(vt(o)) || S("loading", "error", async ({ signal: T, current: w }) => {
|
|
1363
|
+
const H = await e.organize(o, T);
|
|
1364
|
+
T.aborted || !w() || (u(H), r("preview"));
|
|
1895
1365
|
});
|
|
1896
|
-
}, [e,
|
|
1897
|
-
l !== null &&
|
|
1898
|
-
await e.apply(l,
|
|
1366
|
+
}, [e, o, S]), Y = U(() => {
|
|
1367
|
+
l !== null && S("applying", "preview", async ({ signal: T }) => {
|
|
1368
|
+
await e.apply(l, o, T), t == null || t();
|
|
1899
1369
|
});
|
|
1900
|
-
}, [e,
|
|
1901
|
-
|
|
1902
|
-
}, [
|
|
1903
|
-
return
|
|
1370
|
+
}, [e, o, t, l, S]), j = U(() => {
|
|
1371
|
+
$(), u(null), d(null), r("form");
|
|
1372
|
+
}, [$]);
|
|
1373
|
+
return B(() => {
|
|
1904
1374
|
if (n !== "loading" && n !== "applying") return;
|
|
1905
|
-
const
|
|
1906
|
-
return () => clearTimeout(
|
|
1375
|
+
const T = setTimeout(() => p(!0), wr);
|
|
1376
|
+
return () => clearTimeout(T);
|
|
1907
1377
|
}, [n]), {
|
|
1908
1378
|
status: n,
|
|
1909
|
-
input:
|
|
1910
|
-
setInput:
|
|
1911
|
-
errors:
|
|
1912
|
-
canSubmit:
|
|
1379
|
+
input: o,
|
|
1380
|
+
setInput: O,
|
|
1381
|
+
errors: v,
|
|
1382
|
+
canSubmit: L,
|
|
1913
1383
|
proposal: l,
|
|
1914
|
-
error:
|
|
1915
|
-
takingLong:
|
|
1916
|
-
submit:
|
|
1917
|
-
regenerate:
|
|
1918
|
-
apply:
|
|
1919
|
-
cancel:
|
|
1384
|
+
error: a,
|
|
1385
|
+
takingLong: g && (n === "loading" || n === "applying"),
|
|
1386
|
+
submit: C,
|
|
1387
|
+
regenerate: C,
|
|
1388
|
+
apply: Y,
|
|
1389
|
+
cancel: j
|
|
1920
1390
|
};
|
|
1921
1391
|
}
|
|
1922
|
-
function
|
|
1923
|
-
const { t: n } =
|
|
1924
|
-
return /* @__PURE__ */
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */
|
|
1927
|
-
t ? /* @__PURE__ */
|
|
1392
|
+
function At({ label: e, takingLong: t }) {
|
|
1393
|
+
const { t: n } = x();
|
|
1394
|
+
return /* @__PURE__ */ m(M, { as: "div", padding: "x-large", textAlign: "center", "data-testid": "organize-working", children: [
|
|
1395
|
+
/* @__PURE__ */ s(et, { renderTitle: e }),
|
|
1396
|
+
/* @__PURE__ */ s(M, { as: "div", margin: "small 0 0 0", children: /* @__PURE__ */ s(b, { color: "secondary", children: e }) }),
|
|
1397
|
+
t ? /* @__PURE__ */ s(M, { 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
|
|
1928
1398
|
] });
|
|
1929
1399
|
}
|
|
1930
|
-
function
|
|
1400
|
+
function Dr({
|
|
1931
1401
|
actions: e,
|
|
1932
1402
|
open: t,
|
|
1933
1403
|
onDismiss: n,
|
|
1934
|
-
onApplied:
|
|
1935
|
-
aiDisclosure:
|
|
1404
|
+
onApplied: r,
|
|
1405
|
+
aiDisclosure: o
|
|
1936
1406
|
}) {
|
|
1937
|
-
const { t:
|
|
1938
|
-
|
|
1407
|
+
const { t: i } = x(), l = k(!0);
|
|
1408
|
+
B(() => (l.current = !0, () => {
|
|
1939
1409
|
l.current = !1;
|
|
1940
1410
|
}), []);
|
|
1941
|
-
const
|
|
1411
|
+
const u = Or({
|
|
1942
1412
|
actions: e,
|
|
1943
1413
|
onApplied: () => {
|
|
1944
|
-
|
|
1414
|
+
N(i("organizeAppliedAnnouncement")), r == null || r(), l.current && n();
|
|
1945
1415
|
}
|
|
1946
|
-
}), { status:
|
|
1947
|
-
return
|
|
1948
|
-
t && (
|
|
1949
|
-
}, [t,
|
|
1950
|
-
|
|
1951
|
-
}, [
|
|
1952
|
-
|
|
1416
|
+
}), { status: a, proposal: d, error: g, takingLong: p } = u;
|
|
1417
|
+
return B(() => {
|
|
1418
|
+
t && (a === "loading" && N(i("organizeLoadingLabel")), a === "applying" && N(i("organizeApplyingLabel")), a === "preview" && g === null && N(i("organizeProposalReadyAnnouncement")));
|
|
1419
|
+
}, [t, a, g, i]), B(() => {
|
|
1420
|
+
p && N(i("organizeStillWorking"));
|
|
1421
|
+
}, [p, i]), /* @__PURE__ */ m(
|
|
1422
|
+
hi,
|
|
1953
1423
|
{
|
|
1954
1424
|
open: t,
|
|
1955
1425
|
onDismiss: n,
|
|
1956
1426
|
size: "large",
|
|
1957
|
-
label:
|
|
1427
|
+
label: i("organizeModalLabel"),
|
|
1958
1428
|
shouldCloseOnDocumentClick: !1,
|
|
1959
1429
|
children: [
|
|
1960
|
-
/* @__PURE__ */
|
|
1961
|
-
/* @__PURE__ */
|
|
1962
|
-
|
|
1430
|
+
/* @__PURE__ */ m(Mi, { children: [
|
|
1431
|
+
/* @__PURE__ */ s(
|
|
1432
|
+
ci,
|
|
1963
1433
|
{
|
|
1964
1434
|
placement: "end",
|
|
1965
1435
|
offset: "small",
|
|
1966
1436
|
onClick: n,
|
|
1967
|
-
screenReaderLabel:
|
|
1437
|
+
screenReaderLabel: i("organizeCloseModal"),
|
|
1968
1438
|
"data-testid": "organize-close-modal"
|
|
1969
1439
|
}
|
|
1970
1440
|
),
|
|
1971
|
-
/* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1973
|
-
|
|
1441
|
+
/* @__PURE__ */ m(_, { alignItems: "center", gap: "small", children: [
|
|
1442
|
+
/* @__PURE__ */ s(_.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ s(ue, { level: "h2", "data-testid": "organize-modal-title", children: i("organizeModalLabel") }) }),
|
|
1443
|
+
o ? /* @__PURE__ */ s(_.Item, { "data-testid": "organize-ai-disclosure", children: o }) : null
|
|
1974
1444
|
] })
|
|
1975
1445
|
] }),
|
|
1976
|
-
/* @__PURE__ */
|
|
1977
|
-
|
|
1978
|
-
|
|
1446
|
+
/* @__PURE__ */ m(_i, { children: [
|
|
1447
|
+
a === "form" ? /* @__PURE__ */ s(
|
|
1448
|
+
Ir,
|
|
1979
1449
|
{
|
|
1980
|
-
input:
|
|
1981
|
-
errors:
|
|
1982
|
-
onChange:
|
|
1450
|
+
input: u.input,
|
|
1451
|
+
errors: u.errors,
|
|
1452
|
+
onChange: u.setInput
|
|
1983
1453
|
}
|
|
1984
1454
|
) : null,
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1455
|
+
a === "loading" ? /* @__PURE__ */ s(At, { label: i("organizeLoadingLabel"), takingLong: p }) : null,
|
|
1456
|
+
a === "applying" ? /* @__PURE__ */ s(At, { label: i("organizeApplyingLabel"), takingLong: p }) : null,
|
|
1457
|
+
a === "preview" && d ? /* @__PURE__ */ m(W, { children: [
|
|
1458
|
+
g ? /* @__PURE__ */ s(
|
|
1459
|
+
X,
|
|
1990
1460
|
{
|
|
1991
1461
|
variant: "error",
|
|
1992
1462
|
margin: "0 0 small 0",
|
|
1993
|
-
liveRegion:
|
|
1463
|
+
liveRegion: Se,
|
|
1994
1464
|
liveRegionPoliteness: "assertive",
|
|
1995
1465
|
"data-testid": "organize-apply-error",
|
|
1996
|
-
children:
|
|
1466
|
+
children: i("organizeApplyFailed", { message: g.message })
|
|
1997
1467
|
}
|
|
1998
1468
|
) : null,
|
|
1999
|
-
/* @__PURE__ */
|
|
1469
|
+
/* @__PURE__ */ s(Lr, { proposal: d })
|
|
2000
1470
|
] }) : null,
|
|
2001
|
-
|
|
2002
|
-
|
|
1471
|
+
a === "error" ? /* @__PURE__ */ s(
|
|
1472
|
+
X,
|
|
2003
1473
|
{
|
|
2004
1474
|
variant: "error",
|
|
2005
1475
|
margin: "0",
|
|
2006
|
-
liveRegion:
|
|
1476
|
+
liveRegion: Se,
|
|
2007
1477
|
liveRegionPoliteness: "assertive",
|
|
2008
1478
|
"data-testid": "organize-error",
|
|
2009
|
-
children:
|
|
1479
|
+
children: i("organizeFailed", { message: (g == null ? void 0 : g.message) ?? "" })
|
|
2010
1480
|
}
|
|
2011
1481
|
) : null
|
|
2012
1482
|
] }),
|
|
2013
|
-
/* @__PURE__ */
|
|
2014
|
-
|
|
2015
|
-
/* @__PURE__ */
|
|
2016
|
-
/* @__PURE__ */
|
|
2017
|
-
|
|
1483
|
+
/* @__PURE__ */ m(Ii, { children: [
|
|
1484
|
+
a === "form" ? /* @__PURE__ */ m(W, { children: [
|
|
1485
|
+
/* @__PURE__ */ s(z, { onClick: n, margin: "0 x-small 0 0", "data-testid": "organize-close", children: i("organizeCancel") }),
|
|
1486
|
+
/* @__PURE__ */ s(
|
|
1487
|
+
z,
|
|
2018
1488
|
{
|
|
2019
1489
|
color: "ai-primary",
|
|
2020
|
-
onClick:
|
|
2021
|
-
interaction:
|
|
1490
|
+
onClick: u.submit,
|
|
1491
|
+
interaction: u.canSubmit ? "enabled" : "disabled",
|
|
2022
1492
|
"data-testid": "organize-submit",
|
|
2023
|
-
children:
|
|
1493
|
+
children: i("organizeSubmit")
|
|
2024
1494
|
}
|
|
2025
1495
|
)
|
|
2026
1496
|
] }) : null,
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
/* @__PURE__ */
|
|
2030
|
-
/* @__PURE__ */
|
|
2031
|
-
|
|
1497
|
+
a === "loading" ? /* @__PURE__ */ s(z, { onClick: u.cancel, "data-testid": "organize-cancel-loading", children: i("organizeCancel") }) : null,
|
|
1498
|
+
a === "preview" ? /* @__PURE__ */ m(W, { children: [
|
|
1499
|
+
/* @__PURE__ */ s(z, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
|
|
1500
|
+
/* @__PURE__ */ s(
|
|
1501
|
+
z,
|
|
2032
1502
|
{
|
|
2033
|
-
onClick:
|
|
1503
|
+
onClick: u.regenerate,
|
|
2034
1504
|
margin: "0 x-small 0 0",
|
|
2035
1505
|
"data-testid": "organize-regenerate",
|
|
2036
|
-
children:
|
|
1506
|
+
children: i("organizeRegenerate")
|
|
2037
1507
|
}
|
|
2038
1508
|
),
|
|
2039
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ s(z, { color: "primary", onClick: u.apply, "data-testid": "organize-apply", children: i("organizeApply") })
|
|
2040
1510
|
] }) : null,
|
|
2041
|
-
|
|
2042
|
-
/* @__PURE__ */
|
|
2043
|
-
/* @__PURE__ */
|
|
1511
|
+
a === "error" ? /* @__PURE__ */ m(W, { children: [
|
|
1512
|
+
/* @__PURE__ */ s(z, { onClick: u.cancel, margin: "0 x-small 0 0", "data-testid": "organize-back", children: i("organizeStartOver") }),
|
|
1513
|
+
/* @__PURE__ */ s(z, { color: "primary", onClick: u.submit, "data-testid": "organize-retry", children: i("organizeTryAgain") })
|
|
2044
1514
|
] }) : null,
|
|
2045
|
-
|
|
1515
|
+
a === "applying" ? /* @__PURE__ */ s(z, { interaction: "disabled", "data-testid": "organize-applying", children: i("organizeApply") }) : null
|
|
2046
1516
|
] })
|
|
2047
1517
|
]
|
|
2048
1518
|
}
|
|
2049
1519
|
);
|
|
2050
1520
|
}
|
|
2051
|
-
function
|
|
1521
|
+
function qr({
|
|
2052
1522
|
actions: e,
|
|
2053
1523
|
onApplied: t,
|
|
2054
1524
|
aiDisclosure: n,
|
|
2055
|
-
display:
|
|
1525
|
+
display: r = "inline-block"
|
|
2056
1526
|
}) {
|
|
2057
|
-
const { t:
|
|
2058
|
-
return /* @__PURE__ */
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
|
|
1527
|
+
const { t: o } = x(), [i, l] = G(!1);
|
|
1528
|
+
return /* @__PURE__ */ m(W, { children: [
|
|
1529
|
+
/* @__PURE__ */ s(
|
|
1530
|
+
z,
|
|
2061
1531
|
{
|
|
2062
1532
|
color: "ai-primary",
|
|
2063
|
-
display:
|
|
1533
|
+
display: r,
|
|
2064
1534
|
onClick: () => l(!0),
|
|
2065
|
-
renderIcon:
|
|
1535
|
+
renderIcon: i ? /* @__PURE__ */ s(oi, {}) : /* @__PURE__ */ s(li, {}),
|
|
2066
1536
|
"data-testid": "organize-modules-trigger",
|
|
2067
|
-
children:
|
|
1537
|
+
children: o("organizeModulesTrigger")
|
|
2068
1538
|
}
|
|
2069
1539
|
),
|
|
2070
|
-
|
|
2071
|
-
|
|
1540
|
+
i ? /* @__PURE__ */ s(
|
|
1541
|
+
Dr,
|
|
2072
1542
|
{
|
|
2073
1543
|
actions: e,
|
|
2074
1544
|
open: !0,
|
|
@@ -2079,247 +1549,14 @@ function ks({
|
|
|
2079
1549
|
) : null
|
|
2080
1550
|
] });
|
|
2081
1551
|
}
|
|
2082
|
-
function
|
|
2083
|
-
switch (e) {
|
|
2084
|
-
case "complete":
|
|
2085
|
-
return "complete";
|
|
2086
|
-
case "locked":
|
|
2087
|
-
return "locked";
|
|
2088
|
-
case void 0:
|
|
2089
|
-
case "not_started":
|
|
2090
|
-
return "notStarted";
|
|
2091
|
-
case "in_progress":
|
|
2092
|
-
return "inProgress";
|
|
2093
|
-
case "missing":
|
|
2094
|
-
case "incomplete":
|
|
2095
|
-
case "missing_and_incomplete":
|
|
2096
|
-
return "missing";
|
|
2097
|
-
}
|
|
2098
|
-
}
|
|
2099
|
-
function ft(e) {
|
|
2100
|
-
return (t, n) => {
|
|
2101
|
-
const { newTheme: o } = n;
|
|
2102
|
-
return {
|
|
2103
|
-
backgroundPrimaryInverse: o.semantics(o.primitives).color.background.accent[e]
|
|
2104
|
-
};
|
|
2105
|
-
};
|
|
2106
|
-
}
|
|
2107
|
-
const xs = {
|
|
2108
|
-
missing: {
|
|
2109
|
-
background: "primary-inverse",
|
|
2110
|
-
borderWidth: "none",
|
|
2111
|
-
themeOverride: ft("honey"),
|
|
2112
|
-
icon: /* @__PURE__ */ r(fe, { size: "sm", color: "onColor" })
|
|
2113
|
-
},
|
|
2114
|
-
complete: {
|
|
2115
|
-
background: "primary-inverse",
|
|
2116
|
-
borderWidth: "none",
|
|
2117
|
-
themeOverride: ft("aurora"),
|
|
2118
|
-
icon: /* @__PURE__ */ r(At, { size: "sm", color: "onColor" })
|
|
2119
|
-
},
|
|
2120
|
-
inProgress: {
|
|
2121
|
-
background: "primary-inverse",
|
|
2122
|
-
borderWidth: "none",
|
|
2123
|
-
themeOverride: ft("sky"),
|
|
2124
|
-
icon: /* @__PURE__ */ r(Lt, { size: "sm", color: "onColor" })
|
|
2125
|
-
},
|
|
2126
|
-
notStarted: {
|
|
2127
|
-
background: "primary",
|
|
2128
|
-
borderWidth: "medium",
|
|
2129
|
-
icon: /* @__PURE__ */ r(Rt, { size: "sm", color: "baseColor" })
|
|
2130
|
-
},
|
|
2131
|
-
locked: {
|
|
2132
|
-
background: "secondary",
|
|
2133
|
-
borderWidth: "small",
|
|
2134
|
-
icon: /* @__PURE__ */ r(Pt, { size: "sm", color: "baseColor" })
|
|
2135
|
-
}
|
|
2136
|
-
};
|
|
2137
|
-
function Ds(e) {
|
|
2138
|
-
var l, a, c;
|
|
2139
|
-
let t = 0, n = 0, o = 0;
|
|
2140
|
-
for (const u of e)
|
|
2141
|
-
((l = u.progress) == null ? void 0 : l.status) === "complete" && (t += 1), n += ((a = u.progress) == null ? void 0 : a.requirementCount) ?? 0, o += ((c = u.progress) == null ? void 0 : c.requirementsMet) ?? 0;
|
|
2142
|
-
const i = e.length, s = i === 0 ? 0 : t === i ? 100 : Math.floor(t / i * 100);
|
|
2143
|
-
return {
|
|
2144
|
-
totalModules: i,
|
|
2145
|
-
completedModules: t,
|
|
2146
|
-
totalItems: n,
|
|
2147
|
-
completedItems: o,
|
|
2148
|
-
percent: s
|
|
2149
|
-
};
|
|
2150
|
-
}
|
|
2151
|
-
const Tt = 32, Ns = "4px", zs = 4, qs = { none: 0, small: 1, medium: 2 };
|
|
2152
|
-
function $s(e, t, n) {
|
|
2153
|
-
const o = zs + n / 2, i = e ? Tt / 2 : o, s = t ? Tt / 2 : o;
|
|
2154
|
-
return `${i}px ${s}px ${s}px ${i}px`;
|
|
2155
|
-
}
|
|
2156
|
-
function Fs({
|
|
2157
|
-
module: e,
|
|
2158
|
-
isFirst: t,
|
|
2159
|
-
isLast: n,
|
|
2160
|
-
onClick: o
|
|
2161
|
-
}) {
|
|
2162
|
-
var p, h, _;
|
|
2163
|
-
const { t: i } = P(), l = Ae().moduleLabel(e.position, e), a = l ? i("moduleNameWithLabel", { label: l, name: e.name }) : e.name, c = ((p = e.progress) == null ? void 0 : p.status) ?? "not_started", u = Os(c), d = i("moduleProgressSegmentLabel", {
|
|
2164
|
-
name: a,
|
|
2165
|
-
status: io(
|
|
2166
|
-
i,
|
|
2167
|
-
c,
|
|
2168
|
-
((h = e.progress) == null ? void 0 : h.missingCount) ?? 0,
|
|
2169
|
-
((_ = e.progress) == null ? void 0 : _.incompleteCount) ?? 0
|
|
2170
|
-
)
|
|
2171
|
-
}), m = xs[u];
|
|
2172
|
-
return /* @__PURE__ */ r(I.Item, { shouldGrow: !0, shouldShrink: !0, size: "0", children: /* @__PURE__ */ r(qn, { renderTip: a, children: () => /* @__PURE__ */ g(
|
|
2173
|
-
E,
|
|
2174
|
-
{
|
|
2175
|
-
as: "button",
|
|
2176
|
-
type: "button",
|
|
2177
|
-
display: "block",
|
|
2178
|
-
width: "100%",
|
|
2179
|
-
height: `${Tt}px`,
|
|
2180
|
-
padding: "0",
|
|
2181
|
-
borderRadius: $s(t, n, qs[m.borderWidth]),
|
|
2182
|
-
borderWidth: m.borderWidth,
|
|
2183
|
-
borderColor: "secondary",
|
|
2184
|
-
background: m.background,
|
|
2185
|
-
themeOverride: m.themeOverride,
|
|
2186
|
-
cursor: o ? "pointer" : void 0,
|
|
2187
|
-
onClick: o ? () => o(e.id) : void 0,
|
|
2188
|
-
"data-testid": `modules-progress-segment-${e.id}`,
|
|
2189
|
-
children: [
|
|
2190
|
-
/* @__PURE__ */ r(I, { as: "span", height: "100%", justifyItems: "center", alignItems: "center", children: m.icon }),
|
|
2191
|
-
/* @__PURE__ */ r(Ye, { children: d })
|
|
2192
|
-
]
|
|
2193
|
-
}
|
|
2194
|
-
) }) });
|
|
2195
|
-
}
|
|
2196
|
-
function Us({
|
|
2197
|
-
modules: e,
|
|
2198
|
-
onModuleClick: t,
|
|
2199
|
-
hasMoreModules: n = !1,
|
|
2200
|
-
continuesBefore: o = !1,
|
|
2201
|
-
continuesAfter: i = !1,
|
|
2202
|
-
pagination: s
|
|
2203
|
-
}) {
|
|
2204
|
-
const { t: l } = P(), a = F(() => Ds(e), [e]);
|
|
2205
|
-
if (!e.some((m) => m.progress !== void 0) || a.totalModules === 0) return null;
|
|
2206
|
-
const u = l("moduleProgressOverviewSummary", {
|
|
2207
|
-
count: a.totalModules,
|
|
2208
|
-
completedModules: a.completedModules,
|
|
2209
|
-
totalModules: a.totalModules
|
|
2210
|
-
}), d = a.totalItems > 0 ? l("moduleProgressOverviewDetail", {
|
|
2211
|
-
itemsSummary: l("moduleProgressOverviewItemsSummary", {
|
|
2212
|
-
count: a.totalItems,
|
|
2213
|
-
completedItems: a.completedItems,
|
|
2214
|
-
totalItems: a.totalItems
|
|
2215
|
-
})
|
|
2216
|
-
}) : null;
|
|
2217
|
-
return /* @__PURE__ */ g(E, { as: "div", margin: "0 0 small 0", "data-testid": "modules-progress-overview", children: [
|
|
2218
|
-
n ? null : /* @__PURE__ */ r(I, { wrap: "wrap", children: /* @__PURE__ */ g(I.Item, { children: [
|
|
2219
|
-
/* @__PURE__ */ r(E, { as: "span", margin: "0 x-small 0 0", children: /* @__PURE__ */ r(
|
|
2220
|
-
Ie,
|
|
2221
|
-
{
|
|
2222
|
-
level: "reset",
|
|
2223
|
-
variant: "titleSection",
|
|
2224
|
-
"data-testid": "modules-progress-overview-percent",
|
|
2225
|
-
children: l("moduleProgressOverviewPercentLabel", { percent: a.percent })
|
|
2226
|
-
}
|
|
2227
|
-
) }),
|
|
2228
|
-
/* @__PURE__ */ r(S, { variant: "content", "data-testid": "modules-progress-overview-summary", children: d ? `${u} ${d}` : u })
|
|
2229
|
-
] }) }),
|
|
2230
|
-
/* @__PURE__ */ r(E, { as: "div", margin: "xx-small 0 0 0", children: /* @__PURE__ */ r(
|
|
2231
|
-
I,
|
|
2232
|
-
{
|
|
2233
|
-
gap: Ns,
|
|
2234
|
-
role: "group",
|
|
2235
|
-
"aria-label": l("moduleProgressOverviewGroupLabel"),
|
|
2236
|
-
"data-testid": "modules-progress-overview-segments",
|
|
2237
|
-
children: e.map((m, p) => /* @__PURE__ */ r(
|
|
2238
|
-
Fs,
|
|
2239
|
-
{
|
|
2240
|
-
module: m,
|
|
2241
|
-
isFirst: p === 0 && !o,
|
|
2242
|
-
isLast: p === e.length - 1 && !i,
|
|
2243
|
-
onClick: t
|
|
2244
|
-
},
|
|
2245
|
-
m.id
|
|
2246
|
-
))
|
|
2247
|
-
}
|
|
2248
|
-
) }),
|
|
2249
|
-
s ? /* @__PURE__ */ r(Bs, { pagination: s, shownCount: e.length }) : null
|
|
2250
|
-
] });
|
|
2251
|
-
}
|
|
2252
|
-
function Bs({
|
|
2253
|
-
pagination: e,
|
|
2254
|
-
shownCount: t
|
|
2255
|
-
}) {
|
|
2256
|
-
const { t: n } = P(), { rangeStart: o, totalCount: i, hasPreviousPage: s, hasNextPage: l, disabled: a = !1 } = e, c = k(null), u = k(null), d = k(null);
|
|
2257
|
-
W(() => {
|
|
2258
|
-
var h, _;
|
|
2259
|
-
if (a) return;
|
|
2260
|
-
const p = d.current;
|
|
2261
|
-
d.current = null, p === "next" && !l && ((h = c.current) == null || h.focus()), p === "previous" && !s && ((_ = u.current) == null || _.focus());
|
|
2262
|
-
}, [a, l, s]);
|
|
2263
|
-
const m = (p) => {
|
|
2264
|
-
a || (d.current = p, p === "next" ? e.onNextPage() : e.onPreviousPage());
|
|
2265
|
-
};
|
|
2266
|
-
return /* @__PURE__ */ r(E, { as: "div", margin: "x-small 0 0 0", children: /* @__PURE__ */ g(
|
|
2267
|
-
I,
|
|
2268
|
-
{
|
|
2269
|
-
as: "nav",
|
|
2270
|
-
justifyItems: "space-between",
|
|
2271
|
-
alignItems: "center",
|
|
2272
|
-
gap: "x-small",
|
|
2273
|
-
"aria-label": n("moduleProgressOverviewPaginationLabel"),
|
|
2274
|
-
"data-testid": "modules-progress-overview-pagination",
|
|
2275
|
-
children: [
|
|
2276
|
-
/* @__PURE__ */ r(
|
|
2277
|
-
_t,
|
|
2278
|
-
{
|
|
2279
|
-
size: "small",
|
|
2280
|
-
withBackground: !1,
|
|
2281
|
-
withBorder: !1,
|
|
2282
|
-
renderIcon: /* @__PURE__ */ r(hr, {}),
|
|
2283
|
-
screenReaderLabel: n("paginationPreviousPage"),
|
|
2284
|
-
interaction: s ? "enabled" : "disabled",
|
|
2285
|
-
elementRef: (p) => {
|
|
2286
|
-
c.current = p;
|
|
2287
|
-
},
|
|
2288
|
-
onClick: () => m("previous")
|
|
2289
|
-
}
|
|
2290
|
-
),
|
|
2291
|
-
i === null ? null : /* @__PURE__ */ r(S, { size: "small", color: "secondary", "data-testid": "modules-progress-overview-range", children: n("moduleProgressOverviewPageRange", {
|
|
2292
|
-
start: o,
|
|
2293
|
-
end: o + t - 1,
|
|
2294
|
-
total: i
|
|
2295
|
-
}) }),
|
|
2296
|
-
/* @__PURE__ */ r(
|
|
2297
|
-
_t,
|
|
2298
|
-
{
|
|
2299
|
-
size: "small",
|
|
2300
|
-
withBackground: !1,
|
|
2301
|
-
withBorder: !1,
|
|
2302
|
-
renderIcon: /* @__PURE__ */ r(Ir, {}),
|
|
2303
|
-
screenReaderLabel: n("paginationNextPage"),
|
|
2304
|
-
interaction: l ? "enabled" : "disabled",
|
|
2305
|
-
elementRef: (p) => {
|
|
2306
|
-
u.current = p;
|
|
2307
|
-
},
|
|
2308
|
-
onClick: () => m("next")
|
|
2309
|
-
}
|
|
2310
|
-
)
|
|
2311
|
-
]
|
|
2312
|
-
}
|
|
2313
|
-
) });
|
|
2314
|
-
}
|
|
2315
|
-
function Gs({
|
|
1552
|
+
function zr({
|
|
2316
1553
|
counts: e,
|
|
2317
1554
|
itemsMode: t,
|
|
2318
1555
|
loadedModules: n
|
|
2319
1556
|
}) {
|
|
2320
|
-
const
|
|
2321
|
-
return /* @__PURE__ */
|
|
2322
|
-
|
|
1557
|
+
const r = e.listModules + e.listModuleItems;
|
|
1558
|
+
return /* @__PURE__ */ s(
|
|
1559
|
+
M,
|
|
2323
1560
|
{
|
|
2324
1561
|
as: "div",
|
|
2325
1562
|
background: "secondary",
|
|
@@ -2328,25 +1565,25 @@ function Gs({
|
|
|
2328
1565
|
padding: "x-small small",
|
|
2329
1566
|
margin: "0 0 small 0",
|
|
2330
1567
|
"data-testid": "dev-diagnostics",
|
|
2331
|
-
children: /* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
2333
|
-
/* @__PURE__ */
|
|
1568
|
+
children: /* @__PURE__ */ m(_, { gap: "medium", wrap: "wrap", children: [
|
|
1569
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ s(b, { size: "x-small", weight: "bold", children: "Adapter requests" }) }),
|
|
1570
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "request-count-list-modules", children: [
|
|
2334
1571
|
"listModules: ",
|
|
2335
1572
|
e.listModules
|
|
2336
1573
|
] }) }),
|
|
2337
|
-
/* @__PURE__ */
|
|
1574
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "request-count-list-module-items", children: [
|
|
2338
1575
|
"listModuleItems: ",
|
|
2339
1576
|
e.listModuleItems
|
|
2340
1577
|
] }) }),
|
|
2341
|
-
/* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", weight: "bold", "data-testid": "request-count-total", children: [
|
|
2342
1579
|
"total: ",
|
|
2343
|
-
|
|
1580
|
+
r
|
|
2344
1581
|
] }) }),
|
|
2345
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "resolved-items-mode", children: [
|
|
2346
1583
|
"itemsMode: ",
|
|
2347
1584
|
t ?? "probing…"
|
|
2348
1585
|
] }) }),
|
|
2349
|
-
/* @__PURE__ */
|
|
1586
|
+
/* @__PURE__ */ s(_.Item, { children: /* @__PURE__ */ m(b, { size: "x-small", "data-testid": "modules-loaded-count", children: [
|
|
2350
1587
|
"modules loaded: ",
|
|
2351
1588
|
n
|
|
2352
1589
|
] }) })
|
|
@@ -2354,172 +1591,172 @@ function Gs({
|
|
|
2354
1591
|
}
|
|
2355
1592
|
);
|
|
2356
1593
|
}
|
|
2357
|
-
const
|
|
2358
|
-
function
|
|
1594
|
+
const Nr = 200;
|
|
1595
|
+
function xr({
|
|
2359
1596
|
data: e,
|
|
2360
1597
|
today: t,
|
|
2361
1598
|
requestCounts: n,
|
|
2362
|
-
showDiagnostics:
|
|
2363
|
-
as:
|
|
2364
|
-
headingLevel:
|
|
1599
|
+
showDiagnostics: r = n !== void 0,
|
|
1600
|
+
as: o = "div",
|
|
1601
|
+
headingLevel: i = "h2",
|
|
2365
1602
|
organizationActions: l,
|
|
2366
|
-
onOrganizationApplied:
|
|
2367
|
-
organizationAiDisclosure:
|
|
2368
|
-
breakpoints:
|
|
1603
|
+
onOrganizationApplied: u,
|
|
1604
|
+
organizationAiDisclosure: a,
|
|
1605
|
+
breakpoints: d = {}
|
|
2369
1606
|
}) {
|
|
2370
|
-
const { miniTablet:
|
|
2371
|
-
() => ({ miniTablet:
|
|
2372
|
-
[
|
|
1607
|
+
const { miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: v, ICEDesktop: L } = d, $ = F(
|
|
1608
|
+
() => ({ miniTablet: g, tablet: p, desktop: h, desktopNavOpen: f, desktopOnly: I, mobileOnly: v, ICEDesktop: L }),
|
|
1609
|
+
[g, p, h, f, I, v, L]
|
|
2373
1610
|
), {
|
|
2374
|
-
modules:
|
|
2375
|
-
page:
|
|
2376
|
-
pageCount:
|
|
2377
|
-
pageSize:
|
|
2378
|
-
pageInfo:
|
|
2379
|
-
hasNextPage:
|
|
2380
|
-
hasPreviousPage:
|
|
2381
|
-
goToFirstPage:
|
|
2382
|
-
goToPreviousPage:
|
|
2383
|
-
goToNextPage:
|
|
2384
|
-
goToLastPage:
|
|
2385
|
-
isLoading:
|
|
2386
|
-
isRefreshing:
|
|
2387
|
-
error:
|
|
2388
|
-
itemsMode:
|
|
2389
|
-
expandedModuleIds:
|
|
2390
|
-
expandModule:
|
|
2391
|
-
collapseModule:
|
|
2392
|
-
toggleModule:
|
|
2393
|
-
expandModules:
|
|
2394
|
-
collapseModules:
|
|
2395
|
-
expandAllModules:
|
|
2396
|
-
collapseAllModules:
|
|
2397
|
-
isPersistingCollapsed:
|
|
2398
|
-
getItems:
|
|
2399
|
-
filter:
|
|
2400
|
-
setFilter:
|
|
2401
|
-
filterEntry:
|
|
2402
|
-
filterPredicate:
|
|
2403
|
-
} = e, { t:
|
|
2404
|
-
var
|
|
2405
|
-
(
|
|
2406
|
-
}, []),
|
|
2407
|
-
|
|
2408
|
-
}, []), [
|
|
2409
|
-
|
|
2410
|
-
var
|
|
2411
|
-
if (
|
|
2412
|
-
const
|
|
2413
|
-
|
|
2414
|
-
}, [
|
|
2415
|
-
const
|
|
2416
|
-
(
|
|
2417
|
-
|
|
1611
|
+
modules: O,
|
|
1612
|
+
page: S,
|
|
1613
|
+
pageCount: C,
|
|
1614
|
+
pageSize: Y,
|
|
1615
|
+
pageInfo: j,
|
|
1616
|
+
hasNextPage: T,
|
|
1617
|
+
hasPreviousPage: w,
|
|
1618
|
+
goToFirstPage: H,
|
|
1619
|
+
goToPreviousPage: A,
|
|
1620
|
+
goToNextPage: re,
|
|
1621
|
+
goToLastPage: D,
|
|
1622
|
+
isLoading: K,
|
|
1623
|
+
isRefreshing: q,
|
|
1624
|
+
error: ee,
|
|
1625
|
+
itemsMode: ce,
|
|
1626
|
+
expandedModuleIds: R,
|
|
1627
|
+
expandModule: nt,
|
|
1628
|
+
collapseModule: it,
|
|
1629
|
+
toggleModule: rt,
|
|
1630
|
+
expandModules: on,
|
|
1631
|
+
collapseModules: ln,
|
|
1632
|
+
expandAllModules: an,
|
|
1633
|
+
collapseAllModules: un,
|
|
1634
|
+
isPersistingCollapsed: dn,
|
|
1635
|
+
getItems: Pe,
|
|
1636
|
+
filter: me,
|
|
1637
|
+
setFilter: st,
|
|
1638
|
+
filterEntry: cn,
|
|
1639
|
+
filterPredicate: Ce
|
|
1640
|
+
} = e, { t: E, timezone: ot } = x(), ge = Xe(), { filters: lt } = Te(), mn = F(() => Ze(lt).length > 0, [lt]), at = k(null), ve = k(/* @__PURE__ */ new Map()), Le = k(/* @__PURE__ */ new Map()), Q = v === !0, se = k(null), gn = U((c) => {
|
|
1641
|
+
var y, Z;
|
|
1642
|
+
(y = ve.current.get(c)) == null || y.scrollIntoView({ behavior: "smooth", block: "start" }), (Z = Le.current.get(c)) == null || Z.focus({ preventScroll: !0 });
|
|
1643
|
+
}, []), pn = U((c, y) => {
|
|
1644
|
+
y ? Le.current.set(c, y) : Le.current.delete(c);
|
|
1645
|
+
}, []), [fn] = G(() => /* @__PURE__ */ new Date()), we = t ?? fn;
|
|
1646
|
+
B(() => {
|
|
1647
|
+
var y;
|
|
1648
|
+
if (se.current === null || q) return;
|
|
1649
|
+
const c = se.current === "focusList";
|
|
1650
|
+
se.current = null, N(E("pageChangedAnnouncement", { page: S, pageCount: C })), c && ((y = at.current) == null || y.focus());
|
|
1651
|
+
}, [q, S, C, E]);
|
|
1652
|
+
const Ae = U(
|
|
1653
|
+
(c, y = "focusList") => {
|
|
1654
|
+
se.current = y, ge("paginate-modules"), c === 1 ? H() : c === S - 1 ? A() : c === S + 1 ? re() : c === C && D();
|
|
2418
1655
|
},
|
|
2419
|
-
[
|
|
2420
|
-
),
|
|
2421
|
-
() =>
|
|
2422
|
-
(
|
|
1656
|
+
[S, C, H, A, re, D, ge]
|
|
1657
|
+
), Re = F(
|
|
1658
|
+
() => O.filter(
|
|
1659
|
+
(c) => Ce === void 0 || Ce(c, { today: we, timezone: ot })
|
|
2423
1660
|
),
|
|
2424
|
-
[
|
|
2425
|
-
),
|
|
2426
|
-
rows:
|
|
2427
|
-
expanded:
|
|
1661
|
+
[O, Ce, we, ot]
|
|
1662
|
+
), ut = k({
|
|
1663
|
+
rows: Re,
|
|
1664
|
+
expanded: R,
|
|
2428
1665
|
items: /* @__PURE__ */ new Map()
|
|
2429
|
-
}), [
|
|
2430
|
-
|
|
2431
|
-
rows:
|
|
2432
|
-
expanded:
|
|
2433
|
-
items: new Map(
|
|
2434
|
-
},
|
|
2435
|
-
const
|
|
2436
|
-
() =>
|
|
2437
|
-
[
|
|
2438
|
-
),
|
|
2439
|
-
|
|
2440
|
-
if (
|
|
2441
|
-
if (
|
|
2442
|
-
|
|
1666
|
+
}), [P, oe] = G(null);
|
|
1667
|
+
q ? P === null && oe(ut.current) : (ut.current = {
|
|
1668
|
+
rows: Re,
|
|
1669
|
+
expanded: R,
|
|
1670
|
+
items: new Map(R.map((c) => [c, Pe(c)]))
|
|
1671
|
+
}, P !== null && oe(null));
|
|
1672
|
+
const V = (P == null ? void 0 : P.rows) ?? Re, ke = (P == null ? void 0 : P.expanded) ?? R, dt = F(() => new Set(ke), [ke]), le = F(
|
|
1673
|
+
() => V.filter((c) => dt.has(c.id)).map((c) => c.id),
|
|
1674
|
+
[V, dt]
|
|
1675
|
+
), ct = le.length > 0, [Oe, De] = G(!1), pe = le.filter((c) => Pe(c).isLoading).length, te = k(!1);
|
|
1676
|
+
B(() => {
|
|
1677
|
+
if (Oe) {
|
|
1678
|
+
if (pe > 0 && !te.current) {
|
|
1679
|
+
te.current = !0, N(E("expandAllLoadingItems", { count: pe }));
|
|
2443
1680
|
return;
|
|
2444
1681
|
}
|
|
2445
|
-
|
|
1682
|
+
pe === 0 && (te.current && R.length > 0 && N(E("expandAllItemsLoaded")), te.current = !1, De(!1));
|
|
2446
1683
|
}
|
|
2447
|
-
}, [
|
|
2448
|
-
const
|
|
2449
|
-
|
|
2450
|
-
var
|
|
2451
|
-
|
|
2452
|
-
}, [
|
|
2453
|
-
const
|
|
2454
|
-
if (
|
|
2455
|
-
|
|
2456
|
-
const
|
|
2457
|
-
|
|
1684
|
+
}, [Oe, pe, R.length, E]);
|
|
1685
|
+
const qe = Oe || dn, ze = k(null), Ne = k(!1);
|
|
1686
|
+
B(() => {
|
|
1687
|
+
var c;
|
|
1688
|
+
qe || !Ne.current || (Ne.current = !1, (c = ze.current) == null || c.focus());
|
|
1689
|
+
}, [qe]);
|
|
1690
|
+
const hn = () => {
|
|
1691
|
+
if (Ne.current = document.activeElement === ze.current, ct) {
|
|
1692
|
+
ge("collapse-all");
|
|
1693
|
+
const y = new Set(le);
|
|
1694
|
+
De(!1), te.current = !1, me === Ie ? un() : ln(le), P !== null && oe({ ...P, expanded: P.expanded.filter((Z) => !y.has(Z)) }), N(E("modulesCollapsedAnnouncement", { count: le.length }));
|
|
2458
1695
|
return;
|
|
2459
1696
|
}
|
|
2460
|
-
|
|
2461
|
-
const
|
|
2462
|
-
|
|
2463
|
-
},
|
|
2464
|
-
|
|
2465
|
-
const
|
|
2466
|
-
(
|
|
2467
|
-
const
|
|
2468
|
-
if (
|
|
2469
|
-
|
|
1697
|
+
ge("expand-all");
|
|
1698
|
+
const c = V.map((y) => y.id);
|
|
1699
|
+
De(!0), te.current = !1, me === Ie ? an() : on(c), P !== null && oe({ ...P, expanded: c }), N(E("modulesExpandedAnnouncement", { count: c.length }));
|
|
1700
|
+
}, mt = k(P);
|
|
1701
|
+
mt.current = P;
|
|
1702
|
+
const Mn = U(
|
|
1703
|
+
(c) => {
|
|
1704
|
+
const y = mt.current;
|
|
1705
|
+
if (y === null) {
|
|
1706
|
+
rt(c);
|
|
2470
1707
|
return;
|
|
2471
1708
|
}
|
|
2472
|
-
const
|
|
2473
|
-
|
|
2474
|
-
...
|
|
2475
|
-
expanded:
|
|
2476
|
-
}),
|
|
1709
|
+
const Z = y.expanded.includes(c);
|
|
1710
|
+
oe({
|
|
1711
|
+
...y,
|
|
1712
|
+
expanded: Z ? y.expanded.filter((En) => En !== c) : [...y.expanded, c]
|
|
1713
|
+
}), Z ? it(c) : nt(c);
|
|
2477
1714
|
},
|
|
2478
|
-
[
|
|
2479
|
-
), [
|
|
2480
|
-
|
|
2481
|
-
if (!
|
|
2482
|
-
|
|
1715
|
+
[rt, it, nt]
|
|
1716
|
+
), [_n, gt] = G(!1);
|
|
1717
|
+
B(() => {
|
|
1718
|
+
if (!q) {
|
|
1719
|
+
gt(!1);
|
|
2483
1720
|
return;
|
|
2484
1721
|
}
|
|
2485
|
-
const
|
|
2486
|
-
return () => clearTimeout(
|
|
2487
|
-
}, [
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
}, [
|
|
2492
|
-
const
|
|
2493
|
-
return /* @__PURE__ */
|
|
2494
|
-
/* @__PURE__ */
|
|
2495
|
-
|
|
1722
|
+
const c = setTimeout(() => gt(!0), Nr);
|
|
1723
|
+
return () => clearTimeout(c);
|
|
1724
|
+
}, [q]);
|
|
1725
|
+
const fe = cn !== void 0 && me !== Ie, xe = K || q && V.length === 0, he = V.length === 0 && !xe && !ee, Me = he && fe, $e = i === "h1" ? "h2" : "h3";
|
|
1726
|
+
B(() => {
|
|
1727
|
+
Me && N(E("filteredEmptyStateTitle"));
|
|
1728
|
+
}, [Me, E]);
|
|
1729
|
+
const pt = C > 1 || T || w, In = C > 1 && !xe && !he && !Me;
|
|
1730
|
+
return /* @__PURE__ */ m(M, { as: o, display: "block", "data-testid": "modules-list", children: [
|
|
1731
|
+
/* @__PURE__ */ s(
|
|
1732
|
+
Zn,
|
|
2496
1733
|
{
|
|
2497
|
-
modules:
|
|
2498
|
-
hasMoreModules:
|
|
2499
|
-
continuesBefore:
|
|
2500
|
-
continuesAfter:
|
|
2501
|
-
onModuleClick:
|
|
2502
|
-
pagination:
|
|
2503
|
-
rangeStart: (
|
|
2504
|
-
totalCount:
|
|
2505
|
-
hasPreviousPage:
|
|
2506
|
-
hasNextPage:
|
|
2507
|
-
onPreviousPage: () =>
|
|
2508
|
-
onNextPage: () =>
|
|
2509
|
-
disabled:
|
|
1734
|
+
modules: O,
|
|
1735
|
+
hasMoreModules: pt || fe,
|
|
1736
|
+
continuesBefore: w,
|
|
1737
|
+
continuesAfter: T,
|
|
1738
|
+
onModuleClick: gn,
|
|
1739
|
+
pagination: pt ? {
|
|
1740
|
+
rangeStart: (S - 1) * Y + 1,
|
|
1741
|
+
totalCount: j.totalCount,
|
|
1742
|
+
hasPreviousPage: w,
|
|
1743
|
+
hasNextPage: T,
|
|
1744
|
+
onPreviousPage: () => Ae(S - 1, "keepFocus"),
|
|
1745
|
+
onNextPage: () => Ae(S + 1, "keepFocus"),
|
|
1746
|
+
disabled: q
|
|
2510
1747
|
} : void 0
|
|
2511
1748
|
}
|
|
2512
1749
|
),
|
|
2513
|
-
|
|
2514
|
-
|
|
1750
|
+
r && n ? /* @__PURE__ */ s(
|
|
1751
|
+
zr,
|
|
2515
1752
|
{
|
|
2516
1753
|
counts: n,
|
|
2517
|
-
itemsMode:
|
|
2518
|
-
loadedModules:
|
|
1754
|
+
itemsMode: ce,
|
|
1755
|
+
loadedModules: O.length
|
|
2519
1756
|
}
|
|
2520
1757
|
) : null,
|
|
2521
|
-
/* @__PURE__ */
|
|
2522
|
-
|
|
1758
|
+
/* @__PURE__ */ m(
|
|
1759
|
+
_,
|
|
2523
1760
|
{
|
|
2524
1761
|
justifyItems: "end",
|
|
2525
1762
|
gap: "x-small",
|
|
@@ -2527,54 +1764,54 @@ function Hs({
|
|
|
2527
1764
|
margin: "medium 0 0 0",
|
|
2528
1765
|
"data-testid": "modules-controls",
|
|
2529
1766
|
children: [
|
|
2530
|
-
l ? /* @__PURE__ */
|
|
2531
|
-
|
|
1767
|
+
l ? /* @__PURE__ */ s(_.Item, { shouldGrow: Q, children: /* @__PURE__ */ s(
|
|
1768
|
+
qr,
|
|
2532
1769
|
{
|
|
2533
1770
|
actions: l,
|
|
2534
|
-
onApplied:
|
|
2535
|
-
aiDisclosure:
|
|
2536
|
-
display:
|
|
1771
|
+
onApplied: u,
|
|
1772
|
+
aiDisclosure: a,
|
|
1773
|
+
display: Q ? "block" : "inline-block"
|
|
2537
1774
|
}
|
|
2538
1775
|
) }) : null,
|
|
2539
|
-
|
|
2540
|
-
|
|
1776
|
+
mn ? /* @__PURE__ */ s(_.Item, { shouldGrow: Q, children: /* @__PURE__ */ s(
|
|
1777
|
+
Ji,
|
|
2541
1778
|
{
|
|
2542
|
-
value:
|
|
2543
|
-
onChange:
|
|
2544
|
-
interaction:
|
|
1779
|
+
value: me,
|
|
1780
|
+
onChange: st,
|
|
1781
|
+
interaction: he && !fe ? "disabled" : "enabled"
|
|
2545
1782
|
}
|
|
2546
1783
|
) }) : null,
|
|
2547
|
-
/* @__PURE__ */
|
|
2548
|
-
|
|
1784
|
+
/* @__PURE__ */ s(_.Item, { shouldGrow: Q, children: /* @__PURE__ */ s(
|
|
1785
|
+
z,
|
|
2549
1786
|
{
|
|
2550
|
-
elementRef: (
|
|
2551
|
-
|
|
1787
|
+
elementRef: (c) => {
|
|
1788
|
+
ze.current = c;
|
|
2552
1789
|
},
|
|
2553
|
-
display:
|
|
2554
|
-
onClick:
|
|
2555
|
-
interaction:
|
|
1790
|
+
display: Q ? "block" : "inline-block",
|
|
1791
|
+
onClick: hn,
|
|
1792
|
+
interaction: V.length === 0 || qe ? "disabled" : "enabled",
|
|
2556
1793
|
"data-testid": "expand-collapse-all",
|
|
2557
|
-
children:
|
|
1794
|
+
children: E(ct ? "collapseAllModules" : "expandAllModules")
|
|
2558
1795
|
}
|
|
2559
1796
|
) })
|
|
2560
1797
|
]
|
|
2561
1798
|
}
|
|
2562
1799
|
),
|
|
2563
|
-
/* @__PURE__ */
|
|
2564
|
-
|
|
2565
|
-
|
|
1800
|
+
/* @__PURE__ */ m(M, { as: "div", margin: "medium 0 0 0", children: [
|
|
1801
|
+
ee ? /* @__PURE__ */ s(
|
|
1802
|
+
X,
|
|
2566
1803
|
{
|
|
2567
1804
|
variant: "error",
|
|
2568
1805
|
margin: "0 0 small 0",
|
|
2569
|
-
liveRegion:
|
|
1806
|
+
liveRegion: Se,
|
|
2570
1807
|
liveRegionPoliteness: "assertive",
|
|
2571
1808
|
"data-testid": "modules-error",
|
|
2572
|
-
children:
|
|
1809
|
+
children: E("modulesLoadErrorAlert", { message: ee.message })
|
|
2573
1810
|
}
|
|
2574
1811
|
) : null,
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
1812
|
+
xe ? /* @__PURE__ */ s(M, { as: "div", padding: "large", textAlign: "center", "data-testid": "modules-loading", children: /* @__PURE__ */ s(et, { renderTitle: E("modulesLoadingSpinnerLabel") }) }) : null,
|
|
1813
|
+
he && !fe ? /* @__PURE__ */ m(
|
|
1814
|
+
M,
|
|
2578
1815
|
{
|
|
2579
1816
|
as: "div",
|
|
2580
1817
|
background: "primary",
|
|
@@ -2585,108 +1822,108 @@ function Hs({
|
|
|
2585
1822
|
textAlign: "center",
|
|
2586
1823
|
"data-testid": "modules-empty",
|
|
2587
1824
|
children: [
|
|
2588
|
-
/* @__PURE__ */
|
|
2589
|
-
/* @__PURE__ */
|
|
1825
|
+
/* @__PURE__ */ s(ue, { level: $e, variant: "titleCardLarge", margin: "0 0 x-small 0", children: E("noModulesEmptyStateTitle") }),
|
|
1826
|
+
/* @__PURE__ */ s(b, { color: "secondary", children: E("noModulesEmptyStateDescription") })
|
|
2590
1827
|
]
|
|
2591
1828
|
}
|
|
2592
1829
|
) : null,
|
|
2593
|
-
|
|
2594
|
-
|
|
1830
|
+
Me ? /* @__PURE__ */ m(
|
|
1831
|
+
M,
|
|
2595
1832
|
{
|
|
2596
1833
|
as: "div",
|
|
2597
1834
|
background: "primary",
|
|
2598
1835
|
borderRadius: "card.lg",
|
|
2599
1836
|
borderWidth: "small",
|
|
2600
1837
|
shadow: "resting",
|
|
2601
|
-
padding:
|
|
1838
|
+
padding: Q ? "general.spaceLg general.spaceMd" : "general.space2xl general.spaceXl",
|
|
2602
1839
|
textAlign: "center",
|
|
2603
1840
|
"data-testid": "modules-filtered-empty",
|
|
2604
1841
|
children: [
|
|
2605
|
-
/* @__PURE__ */
|
|
2606
|
-
|
|
1842
|
+
/* @__PURE__ */ s(
|
|
1843
|
+
ue,
|
|
2607
1844
|
{
|
|
2608
|
-
level:
|
|
2609
|
-
variant:
|
|
1845
|
+
level: $e,
|
|
1846
|
+
variant: Q ? "titleCardMini" : "titleCardLarge",
|
|
2610
1847
|
margin: "0 0 general.spaceXs 0",
|
|
2611
|
-
children:
|
|
1848
|
+
children: E("filteredEmptyStateTitle")
|
|
2612
1849
|
}
|
|
2613
1850
|
),
|
|
2614
|
-
/* @__PURE__ */
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
|
|
1851
|
+
/* @__PURE__ */ s(b, { as: "div", color: "secondary", size: Q ? "small" : void 0, children: E("filteredEmptyStateDescription") }),
|
|
1852
|
+
/* @__PURE__ */ s(
|
|
1853
|
+
z,
|
|
2617
1854
|
{
|
|
2618
1855
|
color: "primary",
|
|
2619
1856
|
margin: "general.spaceLg 0 0 0",
|
|
2620
1857
|
onClick: () => {
|
|
2621
|
-
|
|
1858
|
+
st(Ie), se.current = "focusList";
|
|
2622
1859
|
},
|
|
2623
1860
|
"data-testid": "clear-filters",
|
|
2624
|
-
children:
|
|
1861
|
+
children: E("clearFilters")
|
|
2625
1862
|
}
|
|
2626
1863
|
)
|
|
2627
1864
|
]
|
|
2628
1865
|
}
|
|
2629
1866
|
) : null,
|
|
2630
|
-
/* @__PURE__ */
|
|
1867
|
+
/* @__PURE__ */ s(
|
|
2631
1868
|
"ul",
|
|
2632
1869
|
{
|
|
2633
|
-
ref:
|
|
2634
|
-
style: { listStyle: "none", margin: 0, padding: 0, opacity:
|
|
2635
|
-
"aria-busy":
|
|
1870
|
+
ref: at,
|
|
1871
|
+
style: { listStyle: "none", margin: 0, padding: 0, opacity: _n ? 0.5 : 1 },
|
|
1872
|
+
"aria-busy": q,
|
|
2636
1873
|
tabIndex: -1,
|
|
2637
1874
|
"data-testid": "modules-stack",
|
|
2638
|
-
children:
|
|
1875
|
+
children: V.map((c) => /* @__PURE__ */ s(
|
|
2639
1876
|
"li",
|
|
2640
1877
|
{
|
|
2641
|
-
ref: (
|
|
2642
|
-
|
|
1878
|
+
ref: (y) => {
|
|
1879
|
+
y ? ve.current.set(c.id, y) : ve.current.delete(c.id);
|
|
2643
1880
|
},
|
|
2644
|
-
children: /* @__PURE__ */
|
|
2645
|
-
|
|
1881
|
+
children: /* @__PURE__ */ s(
|
|
1882
|
+
fr,
|
|
2646
1883
|
{
|
|
2647
|
-
module:
|
|
2648
|
-
expanded:
|
|
2649
|
-
onToggle:
|
|
2650
|
-
itemsState: (
|
|
2651
|
-
today:
|
|
2652
|
-
showDiagnostics:
|
|
2653
|
-
headingLevel:
|
|
2654
|
-
breakpoints:
|
|
2655
|
-
toggleRef:
|
|
1884
|
+
module: c,
|
|
1885
|
+
expanded: ke.includes(c.id),
|
|
1886
|
+
onToggle: Mn,
|
|
1887
|
+
itemsState: (P == null ? void 0 : P.items.get(c.id)) ?? Pe(c.id),
|
|
1888
|
+
today: we,
|
|
1889
|
+
showDiagnostics: r,
|
|
1890
|
+
headingLevel: $e,
|
|
1891
|
+
breakpoints: $,
|
|
1892
|
+
toggleRef: pn
|
|
2656
1893
|
}
|
|
2657
1894
|
)
|
|
2658
1895
|
},
|
|
2659
|
-
|
|
1896
|
+
c.id
|
|
2660
1897
|
))
|
|
2661
1898
|
}
|
|
2662
1899
|
)
|
|
2663
1900
|
] }),
|
|
2664
|
-
|
|
2665
|
-
|
|
1901
|
+
In ? /* @__PURE__ */ s(
|
|
1902
|
+
xt,
|
|
2666
1903
|
{
|
|
2667
1904
|
as: "nav",
|
|
2668
1905
|
variant: "compact",
|
|
2669
1906
|
withFirstAndLastButton: !0,
|
|
2670
1907
|
margin: "small 0 0 0",
|
|
2671
|
-
labelFirst:
|
|
2672
|
-
labelPrev:
|
|
2673
|
-
labelNext:
|
|
2674
|
-
labelLast:
|
|
2675
|
-
screenReaderLabelPageButton: (
|
|
2676
|
-
ellipsis:
|
|
2677
|
-
totalPageNumber:
|
|
2678
|
-
currentPage:
|
|
2679
|
-
disabled:
|
|
2680
|
-
onPageChange: (
|
|
1908
|
+
labelFirst: E("paginationFirstPage"),
|
|
1909
|
+
labelPrev: E("paginationPreviousPage"),
|
|
1910
|
+
labelNext: E("paginationNextPage"),
|
|
1911
|
+
labelLast: E("paginationLastPage"),
|
|
1912
|
+
screenReaderLabelPageButton: (c) => E("paginationPageLabel", { page: c }),
|
|
1913
|
+
ellipsis: E("paginationEllipsis"),
|
|
1914
|
+
totalPageNumber: C,
|
|
1915
|
+
currentPage: S,
|
|
1916
|
+
disabled: q,
|
|
1917
|
+
onPageChange: (c) => Ae(c),
|
|
2681
1918
|
"data-testid": "modules-pagination"
|
|
2682
1919
|
},
|
|
2683
|
-
|
|
1920
|
+
S
|
|
2684
1921
|
) : null
|
|
2685
1922
|
] });
|
|
2686
1923
|
}
|
|
2687
|
-
const
|
|
2688
|
-
|
|
2689
|
-
),
|
|
1924
|
+
const $r = fi(
|
|
1925
|
+
xr
|
|
1926
|
+
), de = [
|
|
2690
1927
|
"assignment",
|
|
2691
1928
|
"quiz",
|
|
2692
1929
|
"discussion",
|
|
@@ -2695,7 +1932,7 @@ const Ks = vr(
|
|
|
2695
1932
|
"external_url",
|
|
2696
1933
|
"external_tool",
|
|
2697
1934
|
"sub_header"
|
|
2698
|
-
],
|
|
1935
|
+
], Ke = [
|
|
2699
1936
|
"not_started",
|
|
2700
1937
|
"in_progress",
|
|
2701
1938
|
"complete",
|
|
@@ -2703,30 +1940,30 @@ const Ks = vr(
|
|
|
2703
1940
|
"incomplete",
|
|
2704
1941
|
"missing_and_incomplete",
|
|
2705
1942
|
"locked"
|
|
2706
|
-
],
|
|
1943
|
+
], rn = [
|
|
2707
1944
|
"must_view",
|
|
2708
1945
|
"must_submit",
|
|
2709
1946
|
"must_contribute",
|
|
2710
1947
|
"must_mark_done",
|
|
2711
1948
|
"min_score",
|
|
2712
1949
|
"min_percentage"
|
|
2713
|
-
],
|
|
1950
|
+
], Ur = ["assignment", "quiz", "discussion"], Fr = ["external_url", "external_tool"], Br = ["assignment", "quiz", "discussion"], Gr = Date.UTC(2025, 0, 6), Wr = 864e5, ie = "1", sn = (e) => new Date(Gr + e * Wr).toISOString(), ye = [
|
|
2714
1951
|
"min_score",
|
|
2715
1952
|
"min_percentage"
|
|
2716
|
-
],
|
|
2717
|
-
(e) => !
|
|
2718
|
-
),
|
|
1953
|
+
], Hr = rn.filter(
|
|
1954
|
+
(e) => !ye.includes(e)
|
|
1955
|
+
), Yr = [
|
|
2719
1956
|
"in_progress",
|
|
2720
1957
|
"incomplete",
|
|
2721
1958
|
"missing_and_incomplete"
|
|
2722
|
-
],
|
|
2723
|
-
const
|
|
2724
|
-
return
|
|
2725
|
-
},
|
|
1959
|
+
], jr = (e, t, n, r) => {
|
|
1960
|
+
const o = n ? rn : Hr, i = n && r ? ye[t % ye.length] : o[Math.floor(t / 3) % o.length];
|
|
1961
|
+
return i === "min_score" ? { itemId: e, type: i, minScore: 10 } : i === "min_percentage" ? { itemId: e, type: i, minPercentage: 80 } : { itemId: e, type: i };
|
|
1962
|
+
}, Qr = (e, t, n, r) => e === "sub_header" ? !1 : n && r || t % 3 === 0, tt = (e) => Ke[(e - 1) % Ke.length], Kr = (e, t) => !Br.includes(e) || e === "discussion" && Math.floor(t / de.length) % 2 === 1 ? null : 5 + t % 4 * 5, Vr = (e, t, n, r) => t ? e === "missing" ? n != null || r % 2 === 0 : e === "missing_and_incomplete" ? r % 2 === 1 : !1 : !1, Zr = (e, t, n, r) => {
|
|
2726
1963
|
if (e === "locked") return "locked";
|
|
2727
|
-
if (
|
|
1964
|
+
if (Vr(e, t, n, r)) return "missing";
|
|
2728
1965
|
if (!n) return;
|
|
2729
|
-
const
|
|
1966
|
+
const o = t && ye.includes(n.type);
|
|
2730
1967
|
switch (e) {
|
|
2731
1968
|
case "not_started":
|
|
2732
1969
|
case "missing":
|
|
@@ -2735,122 +1972,122 @@ const Ks = vr(
|
|
|
2735
1972
|
return "complete";
|
|
2736
1973
|
case "incomplete":
|
|
2737
1974
|
case "missing_and_incomplete":
|
|
2738
|
-
return
|
|
1975
|
+
return o && r % 2 === 0 ? "incomplete" : "complete";
|
|
2739
1976
|
case "in_progress":
|
|
2740
|
-
return
|
|
1977
|
+
return o ? r % 3 === 0 ? "complete" : r % 3 === 1 ? "in_progress" : "not_started" : r % 2 === 0 ? "complete" : "not_started";
|
|
2741
1978
|
default:
|
|
2742
1979
|
return e;
|
|
2743
1980
|
}
|
|
2744
|
-
},
|
|
2745
|
-
const
|
|
1981
|
+
}, Xr = (e) => e.status === "complete", Jr = (e, t, n, r, o, i, l, u) => {
|
|
1982
|
+
const a = String(e), d = de[r % de.length], g = d === "sub_header", p = Ur.includes(d) && (r % 4 === 0 || o === "missing");
|
|
2746
1983
|
return {
|
|
2747
1984
|
id: n,
|
|
2748
|
-
moduleId:
|
|
2749
|
-
title: `${
|
|
2750
|
-
type:
|
|
1985
|
+
moduleId: a,
|
|
1986
|
+
title: `${d} ${t + 1}`,
|
|
1987
|
+
type: d,
|
|
2751
1988
|
position: t + 1,
|
|
2752
1989
|
indent: t % 5 === 4 ? 1 : 0,
|
|
2753
|
-
published:
|
|
2754
|
-
url:
|
|
2755
|
-
newTab:
|
|
1990
|
+
published: u === "teacher" ? r % 7 !== 0 : !0,
|
|
1991
|
+
url: g ? null : `/courses/${ie}/modules/items/${n}`,
|
|
1992
|
+
newTab: Fr.includes(d) && r % 2 === 0,
|
|
2756
1993
|
completionRequirement: l,
|
|
2757
|
-
dueAt:
|
|
2758
|
-
status:
|
|
2759
|
-
pointsPossible:
|
|
2760
|
-
extensions:
|
|
1994
|
+
dueAt: p ? sn(r % 90) : null,
|
|
1995
|
+
status: o,
|
|
1996
|
+
pointsPossible: i,
|
|
1997
|
+
extensions: Ve(
|
|
2761
1998
|
void 0,
|
|
2762
|
-
|
|
1999
|
+
r % 37 === 0 ? 5 + r % 4 * 10 : null
|
|
2763
2000
|
)
|
|
2764
2001
|
};
|
|
2765
|
-
},
|
|
2766
|
-
const
|
|
2767
|
-
let
|
|
2768
|
-
for (let
|
|
2769
|
-
const
|
|
2770
|
-
l.push(
|
|
2002
|
+
}, es = (e, t, n, r) => {
|
|
2003
|
+
const o = tt(e), i = Yr.includes(o), l = [];
|
|
2004
|
+
let u = 0;
|
|
2005
|
+
for (let a = 0; a < t; a += 1) {
|
|
2006
|
+
const d = n + a, g = de[d % de.length], p = Kr(g, d), h = p !== null, f = h ? u++ : a, I = String(e * 1e3 + a + 1), v = Qr(g, d, h, i) ? jr(I, d, h, i) : null, L = Zr(o, h, v, f);
|
|
2007
|
+
l.push(Jr(e, a, I, d, L, p, v, r));
|
|
2771
2008
|
}
|
|
2772
2009
|
return l;
|
|
2773
|
-
},
|
|
2774
|
-
const
|
|
2775
|
-
if (
|
|
2010
|
+
}, ts = (e, t, n, r) => {
|
|
2011
|
+
const o = tt(e);
|
|
2012
|
+
if (o === "locked" || o === "not_started") return o;
|
|
2776
2013
|
if (t.length === 0) return "not_started";
|
|
2777
|
-
if (!t.some((
|
|
2778
|
-
if (
|
|
2779
|
-
if (n === 0 &&
|
|
2014
|
+
if (!t.some((i) => i.pointsPossible != null) || o === "missing" && n === 0 || o === "incomplete" && r === 0) return "in_progress";
|
|
2015
|
+
if (o === "missing_and_incomplete") {
|
|
2016
|
+
if (n === 0 && r === 0) return "in_progress";
|
|
2780
2017
|
if (n === 0) return "incomplete";
|
|
2781
|
-
if (
|
|
2018
|
+
if (r === 0) return "missing";
|
|
2782
2019
|
}
|
|
2783
|
-
return
|
|
2784
|
-
},
|
|
2785
|
-
const
|
|
2020
|
+
return o;
|
|
2021
|
+
}, ns = (e) => e.map((n) => n.dueAt).filter((n) => typeof n == "string").sort()[0] ?? null, is = (e, t, n) => {
|
|
2022
|
+
const r = t.filter((d) => d.completionRequirement), o = n ?? r.length, i = Math.min(r.filter(Xr).length, o), l = t.filter((d) => d.status === "missing").length, u = t.filter((d) => d.status === "incomplete").length;
|
|
2786
2023
|
return {
|
|
2787
|
-
status:
|
|
2788
|
-
requirementsMet:
|
|
2789
|
-
requirementCount:
|
|
2790
|
-
percentComplete:
|
|
2791
|
-
nextDueAt:
|
|
2024
|
+
status: ts(e, t, l, u),
|
|
2025
|
+
requirementsMet: i,
|
|
2026
|
+
requirementCount: o,
|
|
2027
|
+
percentComplete: o > 0 ? Math.round(i / o * 100) : 0,
|
|
2028
|
+
nextDueAt: ns(t),
|
|
2792
2029
|
missingCount: l,
|
|
2793
|
-
incompleteCount:
|
|
2030
|
+
incompleteCount: u
|
|
2794
2031
|
};
|
|
2795
|
-
},
|
|
2796
|
-
const
|
|
2032
|
+
}, rs = (e, t, n) => {
|
|
2033
|
+
const r = tt(e), o = e % 2 !== 0 && r !== "incomplete" && r !== "missing_and_incomplete" ? 1 : null;
|
|
2797
2034
|
return {
|
|
2798
2035
|
id: String(e),
|
|
2799
2036
|
name: `Module ${e}`,
|
|
2800
2037
|
position: e,
|
|
2801
2038
|
published: n === "teacher" ? e % 4 !== 0 : !0,
|
|
2802
2039
|
itemCount: t.length,
|
|
2803
|
-
unlockAt: e % 5 === 0 ?
|
|
2040
|
+
unlockAt: e % 5 === 0 ? sn(e) : null,
|
|
2804
2041
|
prerequisiteModules: e > 1 && e % 3 === 0 ? [{ id: String(e - 1), name: `Module ${e - 1}` }] : [],
|
|
2805
|
-
requirementCount:
|
|
2042
|
+
requirementCount: o,
|
|
2806
2043
|
requireSequentialProgress: e % 6 === 0,
|
|
2807
2044
|
completionRequirements: t.flatMap(
|
|
2808
|
-
(
|
|
2045
|
+
(i) => i.completionRequirement ? [i.completionRequirement] : []
|
|
2809
2046
|
),
|
|
2810
|
-
progress:
|
|
2047
|
+
progress: is(e, t, o)
|
|
2811
2048
|
};
|
|
2812
2049
|
};
|
|
2813
|
-
function
|
|
2050
|
+
function ss(e) {
|
|
2814
2051
|
return {
|
|
2815
2052
|
courseId: e.courseId,
|
|
2816
2053
|
modules: e.modules.map(({ progress: t, ...n }) => n),
|
|
2817
2054
|
itemsByModuleId: Object.fromEntries(
|
|
2818
2055
|
Object.entries(e.itemsByModuleId).map(([t, n]) => [
|
|
2819
2056
|
t,
|
|
2820
|
-
n.map(({ status:
|
|
2057
|
+
n.map(({ status: r, ...o }) => o)
|
|
2821
2058
|
])
|
|
2822
2059
|
)
|
|
2823
2060
|
};
|
|
2824
2061
|
}
|
|
2825
|
-
function
|
|
2826
|
-
const n = t.view ?? "student",
|
|
2062
|
+
function be(e, t = {}) {
|
|
2063
|
+
const n = t.view ?? "student", r = t.courseId ?? ie, o = [], i = {};
|
|
2827
2064
|
let l = 0;
|
|
2828
|
-
e.forEach((
|
|
2829
|
-
const
|
|
2830
|
-
l +=
|
|
2065
|
+
e.forEach((a, d) => {
|
|
2066
|
+
const g = d + 1, p = es(g, a, l, n);
|
|
2067
|
+
l += a, o.push(rs(g, p, n)), i[String(g)] = p;
|
|
2831
2068
|
});
|
|
2832
|
-
const
|
|
2833
|
-
return n === "teacher" ?
|
|
2069
|
+
const u = { courseId: r, modules: o, itemsByModuleId: i };
|
|
2070
|
+
return n === "teacher" ? ss(u) : u;
|
|
2834
2071
|
}
|
|
2835
|
-
const
|
|
2836
|
-
function
|
|
2837
|
-
return
|
|
2072
|
+
const ae = (e) => `/courses/${ie}/modules/items/${e}`, Rt = "2099-08-31T06:59:00Z", os = "2020-01-06T07:00:00Z", ls = Ke.length, as = 8, us = 120, ds = 25, cs = 250, kt = 8;
|
|
2073
|
+
function Qs() {
|
|
2074
|
+
return be(Array.from({ length: ls }, () => as));
|
|
2838
2075
|
}
|
|
2839
|
-
function
|
|
2840
|
-
return
|
|
2076
|
+
function Ks() {
|
|
2077
|
+
return be(Array.from({ length: us }, () => ds));
|
|
2841
2078
|
}
|
|
2842
|
-
function
|
|
2843
|
-
return
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2079
|
+
function Vs() {
|
|
2080
|
+
return be([
|
|
2081
|
+
kt,
|
|
2082
|
+
cs,
|
|
2083
|
+
kt
|
|
2847
2084
|
]);
|
|
2848
2085
|
}
|
|
2849
|
-
function
|
|
2850
|
-
const e = (
|
|
2851
|
-
id: String(
|
|
2086
|
+
function Zs() {
|
|
2087
|
+
const e = (i, l, u) => ({
|
|
2088
|
+
id: String(i),
|
|
2852
2089
|
name: l,
|
|
2853
|
-
position:
|
|
2090
|
+
position: i,
|
|
2854
2091
|
published: !0,
|
|
2855
2092
|
itemCount: 0,
|
|
2856
2093
|
prerequisiteModules: [],
|
|
@@ -2863,29 +2100,29 @@ function sa() {
|
|
|
2863
2100
|
missingCount: 0,
|
|
2864
2101
|
incompleteCount: 0
|
|
2865
2102
|
},
|
|
2866
|
-
...
|
|
2867
|
-
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" },
|
|
2868
|
-
e(1, "Locked by a future date", { unlockAt:
|
|
2103
|
+
...u
|
|
2104
|
+
}), t = { id: "101", name: "Week 1: Foundations" }, n = { id: "102", name: "Week 2: Derivatives" }, r = { id: "103", name: "Trigonometry_Unit_One_Foundations_Of_Indirect_Measurement" }, o = [
|
|
2105
|
+
e(1, "Locked by a future date", { unlockAt: Rt }),
|
|
2869
2106
|
e(2, "Locked by one prerequisite", { prerequisiteModules: [t] }),
|
|
2870
2107
|
e(3, "Locked by several prerequisites", {
|
|
2871
2108
|
prerequisiteModules: [t, n]
|
|
2872
2109
|
}),
|
|
2873
2110
|
e(4, "Locked by a date and a prerequisite", {
|
|
2874
|
-
unlockAt:
|
|
2875
|
-
prerequisiteModules: [
|
|
2111
|
+
unlockAt: Rt,
|
|
2112
|
+
prerequisiteModules: [r]
|
|
2876
2113
|
}),
|
|
2877
|
-
e(5, "Locked, and the unlock date has passed", { unlockAt:
|
|
2114
|
+
e(5, "Locked, and the unlock date has passed", { unlockAt: os })
|
|
2878
2115
|
];
|
|
2879
2116
|
return {
|
|
2880
|
-
courseId:
|
|
2881
|
-
modules:
|
|
2882
|
-
itemsByModuleId: Object.fromEntries(
|
|
2117
|
+
courseId: ie,
|
|
2118
|
+
modules: o,
|
|
2119
|
+
itemsByModuleId: Object.fromEntries(o.map((i) => [i.id, []]))
|
|
2883
2120
|
};
|
|
2884
2121
|
}
|
|
2885
|
-
function
|
|
2886
|
-
return
|
|
2122
|
+
function Xs() {
|
|
2123
|
+
return be([]);
|
|
2887
2124
|
}
|
|
2888
|
-
function
|
|
2125
|
+
function Js() {
|
|
2889
2126
|
const t = [
|
|
2890
2127
|
{
|
|
2891
2128
|
title: "Every fact: type, due date, points, requirement",
|
|
@@ -2914,7 +2151,7 @@ function aa() {
|
|
|
2914
2151
|
title: "Career item carrying an estimated duration",
|
|
2915
2152
|
type: "external_tool",
|
|
2916
2153
|
completionRequirement: { itemId: "5", type: "must_view" },
|
|
2917
|
-
extensions:
|
|
2154
|
+
extensions: Ve(void 0, 45)
|
|
2918
2155
|
},
|
|
2919
2156
|
{ title: "A file, ungradeable, so no points at all", type: "file" },
|
|
2920
2157
|
{ title: "External link, opens in a new tab", type: "external_url", newTab: !0 },
|
|
@@ -2930,19 +2167,19 @@ function aa() {
|
|
|
2930
2167
|
{ title: "Indented three levels", type: "quiz", indent: 3 },
|
|
2931
2168
|
{ title: "Indented four levels", type: "discussion", indent: 4 },
|
|
2932
2169
|
{ title: "Indented five levels, the deepest Canvas allows", type: "page", indent: 5 }
|
|
2933
|
-
].map((n,
|
|
2934
|
-
id: String(
|
|
2170
|
+
].map((n, r) => ({
|
|
2171
|
+
id: String(r + 1),
|
|
2935
2172
|
moduleId: "1",
|
|
2936
|
-
position:
|
|
2173
|
+
position: r + 1,
|
|
2937
2174
|
indent: 0,
|
|
2938
2175
|
published: !0,
|
|
2939
2176
|
newTab: !1,
|
|
2940
|
-
url:
|
|
2177
|
+
url: ae(r + 1),
|
|
2941
2178
|
status: "not_started",
|
|
2942
2179
|
...n
|
|
2943
2180
|
}));
|
|
2944
2181
|
return {
|
|
2945
|
-
courseId:
|
|
2182
|
+
courseId: ie,
|
|
2946
2183
|
modules: [
|
|
2947
2184
|
{
|
|
2948
2185
|
id: "1",
|
|
@@ -2957,13 +2194,13 @@ function aa() {
|
|
|
2957
2194
|
itemsByModuleId: { 1: t }
|
|
2958
2195
|
};
|
|
2959
2196
|
}
|
|
2960
|
-
function
|
|
2197
|
+
function eo() {
|
|
2961
2198
|
const t = [
|
|
2962
|
-
{ title: "Reading: limits from the left and the right", type: "page", url:
|
|
2199
|
+
{ title: "Reading: limits from the left and the right", type: "page", url: ae(1) },
|
|
2963
2200
|
{
|
|
2964
2201
|
title: "Desmos: interactive limit explorer",
|
|
2965
2202
|
type: "external_url",
|
|
2966
|
-
url:
|
|
2203
|
+
url: ae(2),
|
|
2967
2204
|
newTab: !0
|
|
2968
2205
|
},
|
|
2969
2206
|
{ title: "Practice", type: "sub_header", url: null },
|
|
@@ -2971,13 +2208,13 @@ function ca() {
|
|
|
2971
2208
|
{
|
|
2972
2209
|
title: "Utilizing Triangle Characteristics: Measuring Distances Through Angles, Elevation and the Practical Limits of Indirect Measurement in the Field",
|
|
2973
2210
|
type: "assignment",
|
|
2974
|
-
url:
|
|
2211
|
+
url: ae(5)
|
|
2975
2212
|
},
|
|
2976
|
-
{ title: "Unit test", type: "quiz", url:
|
|
2977
|
-
].map((n,
|
|
2978
|
-
id: String(
|
|
2213
|
+
{ title: "Unit test", type: "quiz", url: ae(6), status: "locked" }
|
|
2214
|
+
].map((n, r) => ({
|
|
2215
|
+
id: String(r + 1),
|
|
2979
2216
|
moduleId: "1",
|
|
2980
|
-
position:
|
|
2217
|
+
position: r + 1,
|
|
2981
2218
|
indent: 0,
|
|
2982
2219
|
published: !0,
|
|
2983
2220
|
newTab: !1,
|
|
@@ -2985,7 +2222,7 @@ function ca() {
|
|
|
2985
2222
|
...n
|
|
2986
2223
|
}));
|
|
2987
2224
|
return {
|
|
2988
|
-
courseId:
|
|
2225
|
+
courseId: ie,
|
|
2989
2226
|
modules: [
|
|
2990
2227
|
{
|
|
2991
2228
|
id: "1",
|
|
@@ -3001,126 +2238,126 @@ function ca() {
|
|
|
3001
2238
|
};
|
|
3002
2239
|
}
|
|
3003
2240
|
export {
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
2241
|
+
Gs as ACTION_ORDER_LTI_FLOOR,
|
|
2242
|
+
Ie as ALL_FILTER,
|
|
2243
|
+
io as ActionEntrySchema,
|
|
2244
|
+
ro as CompletionRequirementSchema,
|
|
2245
|
+
so as CompletionRequirementTypeSchema,
|
|
2246
|
+
oo as DEFAULT_INLINE_THRESHOLD,
|
|
2247
|
+
lo as DEFAULT_ITEM_CONCURRENCY,
|
|
2248
|
+
ao as DEFAULT_ITEM_PAGE_SIZE,
|
|
2249
|
+
uo as DEFAULT_LOCALE,
|
|
2250
|
+
co as DEFAULT_MOBILE_PAGE_SIZE,
|
|
2251
|
+
mo as DEFAULT_PAGE_SIZE,
|
|
2252
|
+
go as DEFAULT_RETAIN_COLLAPSED_LIMIT,
|
|
2253
|
+
po as DEFAULT_STALE_TIME_MS,
|
|
2254
|
+
fo as DUE_THIS_WEEK_DAYS,
|
|
2255
|
+
ho as EXT_CAREER_ESTIMATED_DURATION_MINUTES,
|
|
2256
|
+
Wn as EXT_ORGANIZE_ADDED_ITEM_COUNT,
|
|
2257
|
+
Hn as EXT_ORGANIZE_NEW_MODULE,
|
|
2258
|
+
Yn as EXT_ORGANIZE_NEW_PLACEMENT,
|
|
2259
|
+
Gn as EXT_SUPPRESS_ITEM_NUMBERING,
|
|
2260
|
+
ie as FIXTURE_COURSE_ID,
|
|
2261
|
+
Mo as FilterClauseSchema,
|
|
2262
|
+
_o as FilterEntrySchema,
|
|
2263
|
+
Ji as FilterSelect,
|
|
2264
|
+
Fi as GET_MODULES,
|
|
2265
|
+
Gi as GET_MODULE_ITEMS,
|
|
2266
|
+
bn as INLINE_ITEM_LIMIT,
|
|
2267
|
+
Sn as INLINE_QUERY_NODE_BUDGET,
|
|
2268
|
+
Io as InMemoryCourseMismatchError,
|
|
2269
|
+
Eo as ItemDueSoonPill,
|
|
2270
|
+
So as ItemTypeEntrySchema,
|
|
2271
|
+
Ye as MAX_DIRECTION_CHARS,
|
|
2272
|
+
yo as MetaFieldEntrySchema,
|
|
2273
|
+
fr as ModuleCard,
|
|
2274
|
+
$n as ModuleDueSoonPill,
|
|
2275
|
+
Bn as ModuleItemRow,
|
|
2276
|
+
To as ModuleItemSchema,
|
|
2277
|
+
bo as ModuleItemStatusPill,
|
|
2278
|
+
Po as ModuleItemStatusSchema,
|
|
2279
|
+
Co as ModuleItemTypeSchema,
|
|
2280
|
+
yn as ModuleItemsPageSchema,
|
|
2281
|
+
vo as ModuleProgressSchema,
|
|
2282
|
+
Lo as ModuleSchema,
|
|
2283
|
+
qn as ModuleStatusPill,
|
|
2284
|
+
wo as ModuleStatusSchema,
|
|
2285
|
+
Ao as ModulesAnalyticsProvider,
|
|
2286
|
+
Qn as ModulesConfigProvider,
|
|
2287
|
+
vn as ModulesConfigSchema,
|
|
2288
|
+
jn as ModulesI18nProvider,
|
|
2289
|
+
$r as ModulesList,
|
|
2290
|
+
Ro as ModulesPageInfoSchema,
|
|
2291
|
+
Tn as ModulesPageSchema,
|
|
2292
|
+
Zn as ModulesProgressBar,
|
|
2293
|
+
ji as NEW_PLACEMENT_FIELD,
|
|
2294
|
+
en as ORGANIZE_CONTENT_TYPES,
|
|
2295
|
+
js as ORGANIZE_MODES,
|
|
2296
|
+
wr as ORGANIZE_SLOW_AFTER_MS,
|
|
2297
|
+
Ir as OrganizeForm,
|
|
2298
|
+
qr as OrganizeModulesButton,
|
|
2299
|
+
Dr as OrganizeModulesModal,
|
|
2300
|
+
tn as PROPOSAL_PREVIEW_COURSE_ID,
|
|
2301
|
+
ko as PageInfoSchema,
|
|
2302
|
+
Ut as PartialCanvasResponseError,
|
|
2303
|
+
Oo as PrerequisiteModuleSchema,
|
|
2304
|
+
Lr as ProposalPreview,
|
|
2305
|
+
Do as RegistryEntrySchema,
|
|
2306
|
+
qo as TYPE_FIELD,
|
|
2307
|
+
zo as baseFilters,
|
|
2308
|
+
Rn as baseModulesConfig,
|
|
2309
|
+
be as buildFixture,
|
|
2310
|
+
Xs as courseEmpty,
|
|
2311
|
+
Vs as courseFatModule,
|
|
2312
|
+
eo as courseItemLinks,
|
|
2313
|
+
Js as courseItemRowVariants,
|
|
2314
|
+
Ks as courseLarge,
|
|
2315
|
+
Zs as courseLockReasons,
|
|
2316
|
+
Qs as courseSmall,
|
|
2317
|
+
Yi as createActionContext,
|
|
2318
|
+
Bs as createCanvasGraphqlAdapter,
|
|
2319
|
+
Kn as createInMemoryAdapter,
|
|
2320
|
+
No as createTranslate,
|
|
2321
|
+
xo as defaultFormatters,
|
|
2322
|
+
hr as defaultOrganizeInput,
|
|
2323
|
+
$o as defaultTranslate,
|
|
2324
|
+
Uo as filterClauseOf,
|
|
2325
|
+
wn as getAddedItemCount,
|
|
2326
|
+
Fo as getEstimatedDurationMinutes,
|
|
2327
|
+
Lt as hasOrganizeInputErrors,
|
|
2328
|
+
Bo as hideUnservableFilters,
|
|
2329
|
+
Go as invalidateCourse,
|
|
2330
|
+
Pn as invalidateModuleItems,
|
|
2331
|
+
ft as invalidateModuleList,
|
|
2332
|
+
An as isNewPlacement,
|
|
2333
|
+
Wo as isPredicateServed,
|
|
2334
|
+
Ln as isProposedNewModule,
|
|
2335
|
+
ne as mergeRegistry,
|
|
2336
|
+
Ho as moduleItemStatusLabel,
|
|
2337
|
+
Yo as moduleItemsPrefix,
|
|
2338
|
+
jo as moduleStatusLabel,
|
|
2339
|
+
Qo as modulesKeys,
|
|
2340
|
+
Ko as modulesListPrefix,
|
|
2341
|
+
Vi as organizePreviewConfig,
|
|
2342
|
+
Hs as partialModulesConfig,
|
|
2343
|
+
Pr as proposalToFixture,
|
|
2344
|
+
Vo as registrySchema,
|
|
2345
|
+
Xt as resolveModulesConfig,
|
|
2346
|
+
Zo as servesClause,
|
|
2347
|
+
Nn as suppressesItemNumbering,
|
|
2348
|
+
Xo as unservableFilters,
|
|
2349
|
+
Ys as useActionContext,
|
|
2350
|
+
Jo as useFieldVisible,
|
|
2351
|
+
Je as useFormatters,
|
|
2352
|
+
el as useModules,
|
|
2353
|
+
Xe as useModulesAnalytics,
|
|
2354
|
+
Te as useModulesConfig,
|
|
2355
|
+
x as useModulesI18n,
|
|
2356
|
+
Vn as useModulesPageData,
|
|
2357
|
+
Or as useOrganizeModules,
|
|
2358
|
+
vt as validateOrganizeInput,
|
|
2359
|
+
Ws as visibleActions,
|
|
2360
|
+
Ze as visibleEntries,
|
|
2361
|
+
tl as visibleEntry,
|
|
2362
|
+
Ve as withEstimatedDurationMinutes
|
|
3126
2363
|
};
|