@instructure/platform-rubrics 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/dist/_internal/RubricAssessment/components/TraditionalView.d.ts +4 -2
- package/dist/_internal/RubricAssessment/components/TraditionalView.d.ts.map +1 -1
- package/dist/_internal/types/i18n.d.ts +4 -0
- package/dist/_internal/types/i18n.d.ts.map +1 -1
- package/dist/_internal/utils/i18n.d.ts +468 -2
- package/dist/_internal/utils/i18n.d.ts.map +1 -1
- package/dist/canvas/RubricAssessment/RubricAssessmentContainer.d.ts +5 -3
- package/dist/canvas/RubricAssessment/RubricAssessmentContainer.d.ts.map +1 -1
- package/dist/canvas/RubricAssessment/RubricAssessmentTray.d.ts +4 -2
- package/dist/canvas/RubricAssessment/RubricAssessmentTray.d.ts.map +1 -1
- package/dist/canvas/RubricAssignment/components/DeleteConfirmModal.d.ts +4 -2
- package/dist/canvas/RubricAssignment/components/DeleteConfirmModal.d.ts.map +1 -1
- package/dist/canvas/RubricAssignment/components/RubricAssignmentContainer.d.ts +5 -4
- package/dist/canvas/RubricAssignment/components/RubricAssignmentContainer.d.ts.map +1 -1
- package/dist/canvas/RubricAssignment/components/RubricCreateModal.d.ts +4 -2
- package/dist/canvas/RubricAssignment/components/RubricCreateModal.d.ts.map +1 -1
- package/dist/canvas/RubricAssignment/components/RubricSearchTray/RubricSearchTray.d.ts +4 -2
- package/dist/canvas/RubricAssignment/components/RubricSearchTray/RubricSearchTray.d.ts.map +1 -1
- package/dist/canvas/RubricAssignment/components/RubricSelfAssessmentSettings.d.ts +7 -7
- package/dist/canvas/RubricAssignment/components/RubricSelfAssessmentSettings.d.ts.map +1 -1
- package/dist/canvas/RubricForm/index.d.ts +5 -4
- package/dist/canvas/RubricForm/index.d.ts.map +1 -1
- package/dist/canvas/ViewRubrics/ViewRubricsPaginated.d.ts +2 -1
- package/dist/canvas/ViewRubrics/ViewRubricsPaginated.d.ts.map +1 -1
- package/dist/canvas/ViewRubrics/shared.d.ts +2 -1
- package/dist/canvas/ViewRubrics/shared.d.ts.map +1 -1
- package/dist/canvas/index.d.ts +1 -0
- package/dist/canvas/index.d.ts.map +1 -1
- package/dist/canvas.js +1348 -1348
- package/dist/chunks/{ErrorShip-ie9F1gVL.js → ErrorShip-5dEf9AmU.js} +876 -874
- package/dist/foundation/RubricBuilder/RubricBuilder.d.ts +2 -1
- package/dist/foundation/RubricBuilder/RubricBuilder.d.ts.map +1 -1
- package/dist/foundation/RubricSelector/RubricSelector.d.ts +4 -2
- package/dist/foundation/RubricSelector/RubricSelector.d.ts.map +1 -1
- package/dist/foundation/index.d.ts +1 -0
- package/dist/foundation/index.d.ts.map +1 -1
- package/dist/foundation.js +209 -209
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/foundation.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { D as
|
|
1
|
+
import { g as Ne, u as He, R as Ue, r as _e, e as le, b as qe } from "./chunks/errorPage-Jon3K-u6.js";
|
|
2
|
+
import { D as Bi, a as Si } from "./chunks/errorPage-Jon3K-u6.js";
|
|
3
3
|
import "@instructure/platform-provider";
|
|
4
|
-
import { useState as T, useEffect as
|
|
5
|
-
import { jsx as e, jsxs as m, Fragment as
|
|
4
|
+
import { useState as T, useEffect as $, useRef as ne, useCallback as $e } from "react";
|
|
5
|
+
import { jsx as e, jsxs as m, Fragment as ze } from "react/jsx-runtime";
|
|
6
6
|
import { Heading as N } from "@instructure/ui-heading";
|
|
7
|
-
import { View as
|
|
8
|
-
import { Button as A, CloseButton as
|
|
7
|
+
import { View as p } from "@instructure/ui-view";
|
|
8
|
+
import { Button as A, CloseButton as Fe, IconButton as Y } from "@instructure/ui-buttons";
|
|
9
9
|
import { Flex as v } from "@instructure/ui-flex";
|
|
10
10
|
import { SimpleSelect as te } from "@instructure/ui-simple-select";
|
|
11
|
-
import { Spinner as
|
|
12
|
-
import { Text as
|
|
13
|
-
import { useQuery as
|
|
14
|
-
import { u as me,
|
|
15
|
-
import
|
|
16
|
-
import { LoadingIndicator as
|
|
17
|
-
import { Alert as
|
|
18
|
-
import { IconDragHandleLine as
|
|
11
|
+
import { Spinner as We } from "@instructure/ui-spinner";
|
|
12
|
+
import { Text as k } from "@instructure/ui-text";
|
|
13
|
+
import { useQuery as Ge } from "@tanstack/react-query";
|
|
14
|
+
import { u as me, R as be, a as L, p as je, b as ge, c as se, C as he, d as de, i as Ke, e as pe, f as J, s as fe, K as Ce, P as ve, r as Qe, D as Re, S as Be, v as Se, g as Ve, h as Xe, j as Ye, k as Ze, l as Je, m as er, n as rr, w as ce, o as ir, q as tr, t as nr, x as ar, y as or, z as lr, A as sr, B as dr, E as cr } from "./chunks/ErrorShip-5dEf9AmU.js";
|
|
15
|
+
import ur from "graphql-tag";
|
|
16
|
+
import { LoadingIndicator as mr } from "@instructure/platform-loading-indicator";
|
|
17
|
+
import { Alert as br } from "@instructure/ui-alerts";
|
|
18
|
+
import { IconDragHandleLine as ye, IconTrashLine as De, IconAddLine as Ie, IconArrowOpenDownLine as gr, IconArrowOpenEndLine as hr, IconCommentLine as pr, IconDuplicateLine as fr } from "@instructure/ui-icons";
|
|
19
19
|
import { Modal as Q } from "@instructure/ui-modal";
|
|
20
|
-
import { ScreenReaderContent as
|
|
21
|
-
import { Checkbox as
|
|
22
|
-
import { Pill as
|
|
23
|
-
import { TextArea as
|
|
24
|
-
import { TextInput as
|
|
25
|
-
import { NumberInput as
|
|
26
|
-
import { CloseButton as
|
|
27
|
-
import { Heading as
|
|
20
|
+
import { ScreenReaderContent as Cr } from "@instructure/ui-a11y-content";
|
|
21
|
+
import { Checkbox as vr } from "@instructure/ui-checkbox";
|
|
22
|
+
import { Pill as Le } from "@instructure/ui-pill";
|
|
23
|
+
import { TextArea as Rr } from "@instructure/ui-text-area";
|
|
24
|
+
import { TextInput as z } from "@instructure/ui-text-input";
|
|
25
|
+
import { NumberInput as Br } from "@instructure/ui-number-input";
|
|
26
|
+
import { CloseButton as Sr, Button as ue } from "@instructure/ui-buttons/v11_7";
|
|
27
|
+
import { Heading as yr } from "@instructure/ui-heading/v11_7";
|
|
28
28
|
import { Modal as V } from "@instructure/ui-modal/v11_7";
|
|
29
|
-
import { Text as
|
|
30
|
-
import { RadioInputGroup as
|
|
31
|
-
const
|
|
29
|
+
import { Text as Dr } from "@instructure/ui-text/v11_7";
|
|
30
|
+
import { RadioInputGroup as Ir, RadioInput as Lr } from "@instructure/ui-radio-input";
|
|
31
|
+
const pi = () => /* @__PURE__ */ e(p, { as: "div", padding: "small", children: /* @__PURE__ */ e(N, { level: "h2", children: Ne("foundation") }) }), wr = ur`
|
|
32
32
|
query CourseRubricsList($courseId: ID!, $first: Int) {
|
|
33
33
|
course(id: $courseId) {
|
|
34
34
|
rubricsConnection(first: $first) {
|
|
@@ -46,13 +46,13 @@ const Ci = () => /* @__PURE__ */ e(h, { as: "div", padding: "small", children: /
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
`;
|
|
49
|
-
function
|
|
49
|
+
function Tr(r) {
|
|
50
50
|
const { executeQuery: a } = me();
|
|
51
|
-
return
|
|
51
|
+
return Ge({
|
|
52
52
|
queryKey: ["courseRubrics", r],
|
|
53
53
|
queryFn: async () => {
|
|
54
54
|
var n;
|
|
55
|
-
const { course: o } = await a(
|
|
55
|
+
const { course: o } = await a(wr, {
|
|
56
56
|
courseId: r,
|
|
57
57
|
first: 50
|
|
58
58
|
}), i = o == null ? void 0 : o.rubricsConnection;
|
|
@@ -66,23 +66,23 @@ function kr(r) {
|
|
|
66
66
|
enabled: !!r
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const fi = (r) => /* @__PURE__ */ e(be, { translations: r.translations, children: /* @__PURE__ */ e(kr, { ...r }) }), kr = ({
|
|
70
70
|
courseId: r,
|
|
71
71
|
value: a,
|
|
72
72
|
onChange: o
|
|
73
73
|
}) => {
|
|
74
|
-
const { translations: i } = L(), { data: n, isLoading: t, isError: s, refetch: c } =
|
|
75
|
-
return t ? /* @__PURE__ */ m(
|
|
76
|
-
/* @__PURE__ */ e(
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
] }) : s ? /* @__PURE__ */ e(
|
|
79
|
-
/* @__PURE__ */ e(v.Item, { children: /* @__PURE__ */ m(
|
|
74
|
+
const { translations: i } = L(), { data: n, isLoading: t, isError: s, refetch: c } = Tr(r), b = n == null ? void 0 : n.rubrics;
|
|
75
|
+
return t ? /* @__PURE__ */ m(p, { as: "div", role: "status", "aria-live": "polite", margin: "0 0 medium", children: [
|
|
76
|
+
/* @__PURE__ */ e(We, { renderTitle: i.rubricSelectorLoading, size: "x-small" }),
|
|
77
|
+
/* @__PURE__ */ e(p, { as: "span", padding: "0 0 0 x-small", children: /* @__PURE__ */ e(k, { size: "small", children: i.rubricSelectorLoading }) })
|
|
78
|
+
] }) : s ? /* @__PURE__ */ e(p, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ m(v, { gap: "small", alignItems: "center", wrap: "wrap", children: [
|
|
79
|
+
/* @__PURE__ */ e(v.Item, { children: /* @__PURE__ */ m(k, { size: "small", color: "danger", children: [
|
|
80
80
|
i.rubricSelectorErrorTitle,
|
|
81
81
|
". ",
|
|
82
82
|
i.rubricSelectorErrorBody
|
|
83
83
|
] }) }),
|
|
84
84
|
/* @__PURE__ */ e(v.Item, { children: /* @__PURE__ */ e(A, { size: "small", onClick: () => c(), children: i.rubricSelectorRetry }) })
|
|
85
|
-
] }) }) : !b || b.length === 0 ? /* @__PURE__ */ e(
|
|
85
|
+
] }) }) : !b || b.length === 0 ? /* @__PURE__ */ e(p, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ e(k, { size: "small", children: i.rubricSelectorEmpty }) }) : /* @__PURE__ */ m(p, { as: "div", margin: "0 0 medium", maxWidth: "360px", children: [
|
|
86
86
|
/* @__PURE__ */ m(
|
|
87
87
|
te,
|
|
88
88
|
{
|
|
@@ -108,7 +108,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
108
108
|
]
|
|
109
109
|
}
|
|
110
110
|
),
|
|
111
|
-
(n == null ? void 0 : n.hasMore) && /* @__PURE__ */ e(
|
|
111
|
+
(n == null ? void 0 : n.hasMore) && /* @__PURE__ */ e(p, { as: "div", padding: "xx-small 0 0", children: /* @__PURE__ */ e(k, { size: "x-small", color: "secondary", children: i.rubricSelectorTruncated }) })
|
|
112
112
|
] });
|
|
113
113
|
}, Z = ({
|
|
114
114
|
isOpen: r,
|
|
@@ -124,7 +124,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
124
124
|
return /* @__PURE__ */ m(Q, { open: r, onDismiss: s, size: "small", label: a, "data-testid": c, children: [
|
|
125
125
|
/* @__PURE__ */ m(Q.Header, { children: [
|
|
126
126
|
/* @__PURE__ */ e(
|
|
127
|
-
|
|
127
|
+
Fe,
|
|
128
128
|
{
|
|
129
129
|
placement: "end",
|
|
130
130
|
offset: "small",
|
|
@@ -134,46 +134,46 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
134
134
|
),
|
|
135
135
|
/* @__PURE__ */ e(N, { level: "h2", children: a })
|
|
136
136
|
] }),
|
|
137
|
-
/* @__PURE__ */ e(Q.Body, { children: /* @__PURE__ */ e(
|
|
137
|
+
/* @__PURE__ */ e(Q.Body, { children: /* @__PURE__ */ e(k, { children: o }) }),
|
|
138
138
|
/* @__PURE__ */ m(Q.Footer, { children: [
|
|
139
139
|
/* @__PURE__ */ e(A, { onClick: s, margin: "0 x-small 0 0", children: n }),
|
|
140
140
|
/* @__PURE__ */ e(A, { color: "primary", onClick: t, "data-testid": "confirm-modal-confirm", children: i })
|
|
141
141
|
] })
|
|
142
142
|
] });
|
|
143
|
-
},
|
|
143
|
+
}, Er = ({
|
|
144
144
|
criteriaCount: r,
|
|
145
145
|
showMissingCriteriaError: a,
|
|
146
146
|
actions: o,
|
|
147
147
|
children: i
|
|
148
148
|
}) => {
|
|
149
149
|
const { translations: n } = L();
|
|
150
|
-
return /* @__PURE__ */ m(
|
|
150
|
+
return /* @__PURE__ */ m(p, { as: "section", "aria-labelledby": "rubric-builder-criteria-heading", children: [
|
|
151
151
|
/* @__PURE__ */ m(v, { justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
|
|
152
152
|
/* @__PURE__ */ e(N, { level: "h3", id: "rubric-builder-criteria-heading", children: n.rubricBuilderCriteriaHeading }),
|
|
153
153
|
o && /* @__PURE__ */ e(v, { gap: "small", wrap: "wrap", children: o })
|
|
154
154
|
] }),
|
|
155
|
-
/* @__PURE__ */ e(
|
|
156
|
-
/* @__PURE__ */ e("div", { "aria-live": "polite", children: a && r === 0 && /* @__PURE__ */ e(
|
|
155
|
+
/* @__PURE__ */ e(p, { as: "div", margin: "small 0 0", children: r === 0 ? /* @__PURE__ */ e(k, { color: "secondary", children: n.rubricBuilderCriteriaEmpty }) : i }),
|
|
156
|
+
/* @__PURE__ */ e("div", { "aria-live": "polite", children: a && r === 0 && /* @__PURE__ */ e(k, { color: "danger", "data-testid": "rubric-builder-criteria-error", children: n.rubricBuilderAddCriterionError }) })
|
|
157
157
|
] });
|
|
158
|
-
},
|
|
158
|
+
}, Pr = ({ points: r, onCommit: a }) => {
|
|
159
159
|
const { translations: o } = L(), [i, n] = T(String(r));
|
|
160
|
-
return
|
|
160
|
+
return $(() => {
|
|
161
161
|
n(String(r));
|
|
162
162
|
}, [r]), /* @__PURE__ */ e(
|
|
163
|
-
|
|
163
|
+
z,
|
|
164
164
|
{
|
|
165
165
|
renderLabel: o.rubricBuilderPointsPossibleLabel,
|
|
166
166
|
width: "8rem",
|
|
167
167
|
value: i,
|
|
168
168
|
onChange: (t) => n(t.target.value),
|
|
169
169
|
onBlur: (t) => {
|
|
170
|
-
const s =
|
|
170
|
+
const s = je(t.target.value);
|
|
171
171
|
n(String(s)), s !== r && a(s);
|
|
172
172
|
},
|
|
173
173
|
"data-testid": "rubric-builder-points-possible"
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
|
-
},
|
|
176
|
+
}, xr = ({
|
|
177
177
|
rating: r,
|
|
178
178
|
sortableId: a,
|
|
179
179
|
position: o,
|
|
@@ -186,24 +186,24 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
186
186
|
onPointsBlur: g,
|
|
187
187
|
onRemove: l
|
|
188
188
|
}) => {
|
|
189
|
-
const { translations: u, translate: d } = L(), { attributes: C, listeners: D, setNodeRef: f, transform: I, transition:
|
|
189
|
+
const { translations: u, translate: d } = L(), { attributes: C, listeners: D, setNodeRef: f, transform: I, transition: P } = ge({
|
|
190
190
|
id: a
|
|
191
|
-
}), [x,
|
|
192
|
-
|
|
193
|
-
se(x) !== r.points &&
|
|
191
|
+
}), [x, S] = T(String(r.points));
|
|
192
|
+
$(() => {
|
|
193
|
+
se(x) !== r.points && S(String(r.points));
|
|
194
194
|
}, [r.points]);
|
|
195
|
-
const B = (R,
|
|
196
|
-
y
|
|
195
|
+
const B = (R, y) => {
|
|
196
|
+
S(y), b({ ...r, points: R });
|
|
197
197
|
};
|
|
198
198
|
return /* @__PURE__ */ e(
|
|
199
199
|
"div",
|
|
200
200
|
{
|
|
201
201
|
ref: f,
|
|
202
|
-
style: { transform:
|
|
202
|
+
style: { transform: he.Transform.toString(I), transition: P },
|
|
203
203
|
"data-testid": "rubric-builder-rating-row",
|
|
204
204
|
children: /* @__PURE__ */ m(v, { gap: "small", alignItems: "start", wrap: "wrap", margin: "0 0 small", children: [
|
|
205
205
|
/* @__PURE__ */ e(
|
|
206
|
-
|
|
206
|
+
p,
|
|
207
207
|
{
|
|
208
208
|
as: "div",
|
|
209
209
|
cursor: "grab",
|
|
@@ -211,22 +211,22 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
211
211
|
"aria-label": d("rubricBuilderReorderRating", { position: o }),
|
|
212
212
|
...C,
|
|
213
213
|
...D,
|
|
214
|
-
children: /* @__PURE__ */ e(
|
|
214
|
+
children: /* @__PURE__ */ e(ye, { "aria-hidden": "true" })
|
|
215
215
|
}
|
|
216
216
|
),
|
|
217
|
-
/* @__PURE__ */ e(
|
|
217
|
+
/* @__PURE__ */ e(p, { as: "div", minWidth: "1.5rem", margin: "medium 0 0", children: /* @__PURE__ */ e(k, { weight: "bold", "aria-hidden": "true", children: o }) }),
|
|
218
218
|
!t && /* @__PURE__ */ m(v, { gap: "x-small", alignItems: "end", children: [
|
|
219
|
-
n && i !== void 0 && /* @__PURE__ */ e(
|
|
219
|
+
n && i !== void 0 && /* @__PURE__ */ e(p, { as: "div", margin: "0 0 x-small", children: /* @__PURE__ */ e(k, { children: d("rangeStartPrefix", { rangeStart: i }) }) }),
|
|
220
220
|
/* @__PURE__ */ e(
|
|
221
|
-
|
|
221
|
+
Br,
|
|
222
222
|
{
|
|
223
223
|
renderLabel: n ? u.rubricBuilderPointRangeLabel : u.rubricBuilderPointsLabel,
|
|
224
224
|
allowStringValue: !0,
|
|
225
225
|
showArrows: !1,
|
|
226
226
|
width: "6rem",
|
|
227
227
|
value: x,
|
|
228
|
-
onChange: (R,
|
|
229
|
-
|
|
228
|
+
onChange: (R, y) => {
|
|
229
|
+
Ke(y) && B(se(y), y);
|
|
230
230
|
},
|
|
231
231
|
onIncrement: () => {
|
|
232
232
|
const R = de(Math.floor(r.points) + 1);
|
|
@@ -242,7 +242,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
242
242
|
)
|
|
243
243
|
] }),
|
|
244
244
|
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
|
|
245
|
-
|
|
245
|
+
z,
|
|
246
246
|
{
|
|
247
247
|
renderLabel: u.rubricBuilderRatingNameLabel,
|
|
248
248
|
isRequired: !0,
|
|
@@ -253,7 +253,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
253
253
|
}
|
|
254
254
|
) }),
|
|
255
255
|
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, size: "14rem", children: /* @__PURE__ */ e(
|
|
256
|
-
|
|
256
|
+
z,
|
|
257
257
|
{
|
|
258
258
|
renderLabel: u.rubricBuilderRatingDescriptionLabel,
|
|
259
259
|
value: r.longDescription,
|
|
@@ -261,7 +261,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
261
261
|
"data-testid": "rubric-builder-rating-description"
|
|
262
262
|
}
|
|
263
263
|
) }),
|
|
264
|
-
c && /* @__PURE__ */ e(
|
|
264
|
+
c && /* @__PURE__ */ e(p, { as: "div", margin: "medium 0 0", children: /* @__PURE__ */ e(
|
|
265
265
|
Y,
|
|
266
266
|
{
|
|
267
267
|
screenReaderLabel: d("rubricBuilderRemoveRating", { position: o }),
|
|
@@ -269,13 +269,13 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
269
269
|
withBorder: !1,
|
|
270
270
|
onClick: l,
|
|
271
271
|
"data-testid": "rubric-builder-remove-rating",
|
|
272
|
-
children: /* @__PURE__ */ e(
|
|
272
|
+
children: /* @__PURE__ */ e(De, {})
|
|
273
273
|
}
|
|
274
274
|
) })
|
|
275
275
|
] })
|
|
276
276
|
}
|
|
277
277
|
);
|
|
278
|
-
},
|
|
278
|
+
}, Mr = ({
|
|
279
279
|
ratings: r,
|
|
280
280
|
useRange: a,
|
|
281
281
|
hidePoints: o,
|
|
@@ -283,34 +283,34 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
283
283
|
ratingNamesRequired: n,
|
|
284
284
|
onChange: t
|
|
285
285
|
}) => {
|
|
286
|
-
const { translations: s } = L(), c =
|
|
287
|
-
J(
|
|
288
|
-
J(
|
|
289
|
-
), b = r.map(
|
|
290
|
-
return /* @__PURE__ */ m(
|
|
291
|
-
/* @__PURE__ */ e(
|
|
286
|
+
const { translations: s } = L(), c = pe(
|
|
287
|
+
J(ve, { activationConstraint: { distance: 8 } }),
|
|
288
|
+
J(Ce, { coordinateGetter: fe })
|
|
289
|
+
), b = r.map(Qe), g = i === "ascending", l = r.map((d, C) => g ? r.length - 1 - C : C);
|
|
290
|
+
return /* @__PURE__ */ m(p, { as: "div", children: [
|
|
291
|
+
/* @__PURE__ */ e(Re, { sensors: c, onDragEnd: ({ active: d, over: C }) => {
|
|
292
292
|
if (!C || d.id === C.id) return;
|
|
293
293
|
const D = b.indexOf(String(d.id)), f = b.indexOf(String(C.id));
|
|
294
|
-
D === -1 || f === -1 || t(
|
|
294
|
+
D === -1 || f === -1 || t(er({ list: r, startIndex: D, endIndex: f }));
|
|
295
295
|
}, children: /* @__PURE__ */ e(
|
|
296
|
-
|
|
296
|
+
Be,
|
|
297
297
|
{
|
|
298
298
|
items: l.map((d) => b[d]),
|
|
299
|
-
strategy:
|
|
299
|
+
strategy: Se,
|
|
300
300
|
children: l.map((d, C) => /* @__PURE__ */ e(
|
|
301
|
-
|
|
301
|
+
xr,
|
|
302
302
|
{
|
|
303
303
|
rating: r[d],
|
|
304
304
|
sortableId: b[d],
|
|
305
305
|
position: C + 1,
|
|
306
|
-
rangeStart:
|
|
306
|
+
rangeStart: Ve(r, d),
|
|
307
307
|
useRange: a,
|
|
308
308
|
hidePoints: o,
|
|
309
309
|
showNameError: n.includes(d),
|
|
310
310
|
canRemove: r.length > 1,
|
|
311
|
-
onChange: (D) => t(
|
|
312
|
-
onPointsBlur: () => t(
|
|
313
|
-
onRemove: () => t(
|
|
311
|
+
onChange: (D) => t(Ze(r, d, D)),
|
|
312
|
+
onPointsBlur: () => t(Ye(r)),
|
|
313
|
+
onRemove: () => t(Xe(r, d))
|
|
314
314
|
},
|
|
315
315
|
b[d]
|
|
316
316
|
))
|
|
@@ -319,15 +319,15 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
319
319
|
/* @__PURE__ */ e(
|
|
320
320
|
A,
|
|
321
321
|
{
|
|
322
|
-
renderIcon: /* @__PURE__ */ e(
|
|
322
|
+
renderIcon: /* @__PURE__ */ e(Ie, {}),
|
|
323
323
|
withBackground: !1,
|
|
324
|
-
onClick: () => t(
|
|
324
|
+
onClick: () => t(Je(r, g ? 0 : r.length)),
|
|
325
325
|
"data-testid": "rubric-builder-add-rating",
|
|
326
326
|
children: s.rubricBuilderAddRatingLevel
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
] });
|
|
330
|
-
},
|
|
330
|
+
}, Or = ({
|
|
331
331
|
criterion: r,
|
|
332
332
|
sortableId: a,
|
|
333
333
|
position: o,
|
|
@@ -344,26 +344,26 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
344
344
|
onDuplicate: C,
|
|
345
345
|
onDelete: D
|
|
346
346
|
}) => {
|
|
347
|
-
const { translations: f, translate: I } = L(), { rubricCriterionRange:
|
|
347
|
+
const { translations: f, translate: I } = L(), { rubricCriterionRange: P } = He(), { attributes: x, listeners: S, setNodeRef: B, transform: R, transition: y, isDragging: F } = ge({
|
|
348
348
|
id: a
|
|
349
|
-
}), [
|
|
350
|
-
return
|
|
351
|
-
H &&
|
|
352
|
-
}, [H]),
|
|
353
|
-
var
|
|
354
|
-
b &&
|
|
355
|
-
}, [b,
|
|
356
|
-
var
|
|
357
|
-
g && ((
|
|
349
|
+
}), [E, W] = T(!r.description.trim()), [ee, M] = T(!1), G = ne(null), j = ne(null), H = c && rr(s), U = I("rubricBuilderCriterionHeading", { position: o }), _ = r.description.trim(), O = _ || U, q = `rubric-builder-criterion-body-${a}`;
|
|
350
|
+
return $(() => {
|
|
351
|
+
H && W(!0);
|
|
352
|
+
}, [H]), $(() => {
|
|
353
|
+
var h;
|
|
354
|
+
b && E && ((h = G.current) == null || h.focus(), l());
|
|
355
|
+
}, [b, E, l]), $(() => {
|
|
356
|
+
var h;
|
|
357
|
+
g && ((h = j.current) == null || h.focus(), u());
|
|
358
358
|
}, [g, u]), /* @__PURE__ */ m(
|
|
359
359
|
"div",
|
|
360
360
|
{
|
|
361
361
|
ref: B,
|
|
362
|
-
style: { transform:
|
|
362
|
+
style: { transform: he.Transform.toString(R), transition: y },
|
|
363
363
|
"data-testid": "rubric-builder-criterion-card",
|
|
364
364
|
children: [
|
|
365
365
|
/* @__PURE__ */ m(
|
|
366
|
-
|
|
366
|
+
p,
|
|
367
367
|
{
|
|
368
368
|
as: "section",
|
|
369
369
|
"aria-label": O,
|
|
@@ -372,7 +372,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
372
372
|
padding: "small medium",
|
|
373
373
|
margin: "0 0 small",
|
|
374
374
|
background: "primary",
|
|
375
|
-
shadow:
|
|
375
|
+
shadow: F ? "above" : "none",
|
|
376
376
|
children: [
|
|
377
377
|
/* @__PURE__ */ m(v, { gap: "small", alignItems: "center", wrap: "wrap", children: [
|
|
378
378
|
/* @__PURE__ */ e(
|
|
@@ -382,29 +382,29 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
382
382
|
"aria-label": I("rubricBuilderReorderCriterion", { name: O }),
|
|
383
383
|
"data-testid": "rubric-builder-criterion-drag-handle",
|
|
384
384
|
...x,
|
|
385
|
-
...
|
|
386
|
-
children: /* @__PURE__ */ e(
|
|
385
|
+
...S,
|
|
386
|
+
children: /* @__PURE__ */ e(ye, { "aria-hidden": "true" })
|
|
387
387
|
}
|
|
388
388
|
),
|
|
389
389
|
/* @__PURE__ */ e(
|
|
390
390
|
Y,
|
|
391
391
|
{
|
|
392
392
|
screenReaderLabel: I(
|
|
393
|
-
|
|
393
|
+
E ? "rubricBuilderCollapseCriterion" : "rubricBuilderExpandCriterion",
|
|
394
394
|
{ name: O }
|
|
395
395
|
),
|
|
396
|
-
"aria-expanded":
|
|
396
|
+
"aria-expanded": E,
|
|
397
397
|
"aria-controls": q,
|
|
398
398
|
withBackground: !1,
|
|
399
399
|
withBorder: !1,
|
|
400
400
|
size: "small",
|
|
401
|
-
onClick: () =>
|
|
401
|
+
onClick: () => W((h) => !h),
|
|
402
402
|
"data-testid": "rubric-builder-criterion-toggle",
|
|
403
|
-
children:
|
|
403
|
+
children: E ? /* @__PURE__ */ e(gr, {}) : /* @__PURE__ */ e(hr, {})
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
406
|
n && /* @__PURE__ */ e(
|
|
407
|
-
|
|
407
|
+
pr,
|
|
408
408
|
{
|
|
409
409
|
title: f.rubricBuilderWrittenFeedback,
|
|
410
410
|
"data-testid": "rubric-builder-criterion-written-icon"
|
|
@@ -412,9 +412,9 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
412
412
|
),
|
|
413
413
|
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ m(N, { level: "h4", children: [
|
|
414
414
|
U,
|
|
415
|
-
_ && /* @__PURE__ */ e(
|
|
415
|
+
_ && /* @__PURE__ */ e(k, { weight: "normal", "data-testid": "rubric-builder-criterion-name", children: `: ${_}` })
|
|
416
416
|
] }) }),
|
|
417
|
-
!i && /* @__PURE__ */ e(
|
|
417
|
+
!i && /* @__PURE__ */ e(Le, { "data-testid": "rubric-builder-criterion-max", children: I("rubricBuilderCriterionMaxPoints", { count: r.points }) }),
|
|
418
418
|
/* @__PURE__ */ e(
|
|
419
419
|
Y,
|
|
420
420
|
{
|
|
@@ -423,7 +423,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
423
423
|
withBorder: !1,
|
|
424
424
|
onClick: C,
|
|
425
425
|
"data-testid": "rubric-builder-duplicate-criterion",
|
|
426
|
-
children: /* @__PURE__ */ e(
|
|
426
|
+
children: /* @__PURE__ */ e(fr, {})
|
|
427
427
|
}
|
|
428
428
|
),
|
|
429
429
|
/* @__PURE__ */ e(
|
|
@@ -434,64 +434,64 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
434
434
|
withBorder: !1,
|
|
435
435
|
onClick: () => M(!0),
|
|
436
436
|
"data-testid": "rubric-builder-delete-criterion",
|
|
437
|
-
children: /* @__PURE__ */ e(
|
|
437
|
+
children: /* @__PURE__ */ e(De, {})
|
|
438
438
|
}
|
|
439
439
|
)
|
|
440
440
|
] }),
|
|
441
|
-
|
|
441
|
+
E && /* @__PURE__ */ e(p, { as: "div", id: q, margin: "medium 0 0", children: /* @__PURE__ */ m(v, { direction: "column", gap: "medium", children: [
|
|
442
442
|
/* @__PURE__ */ e(
|
|
443
|
-
|
|
443
|
+
z,
|
|
444
444
|
{
|
|
445
445
|
renderLabel: f.rubricBuilderCriterionNameLabel,
|
|
446
446
|
isRequired: !0,
|
|
447
447
|
value: r.description,
|
|
448
|
-
inputRef: (
|
|
449
|
-
|
|
448
|
+
inputRef: (h) => {
|
|
449
|
+
G.current = h;
|
|
450
450
|
},
|
|
451
|
-
onChange: (
|
|
451
|
+
onChange: (h) => d({ ...r, description: h.target.value }),
|
|
452
452
|
messages: c && s.nameRequired ? [{ text: f.rubricBuilderCriterionNameRequired, type: "error" }] : [],
|
|
453
453
|
"data-testid": "rubric-builder-criterion-name-input"
|
|
454
454
|
}
|
|
455
455
|
),
|
|
456
456
|
/* @__PURE__ */ e(
|
|
457
|
-
|
|
457
|
+
Rr,
|
|
458
458
|
{
|
|
459
459
|
label: f.rubricBuilderCriterionDescriptionLabel,
|
|
460
460
|
value: r.longDescription ?? "",
|
|
461
|
-
onChange: (
|
|
461
|
+
onChange: (h) => d({ ...r, longDescription: h.target.value }),
|
|
462
462
|
"data-testid": "rubric-builder-criterion-description"
|
|
463
463
|
}
|
|
464
464
|
),
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
P && !i && !n && /* @__PURE__ */ e(
|
|
466
|
+
vr,
|
|
467
467
|
{
|
|
468
468
|
variant: "toggle",
|
|
469
469
|
label: f.rubricBuilderEnableRange,
|
|
470
470
|
checked: r.criterionUseRange,
|
|
471
|
-
onChange: (
|
|
471
|
+
onChange: (h) => d({ ...r, criterionUseRange: h.target.checked }),
|
|
472
472
|
"data-testid": "rubric-builder-enable-range"
|
|
473
473
|
}
|
|
474
474
|
),
|
|
475
475
|
n ? !i && /* @__PURE__ */ e(
|
|
476
|
-
|
|
476
|
+
Pr,
|
|
477
477
|
{
|
|
478
478
|
points: r.points,
|
|
479
|
-
onCommit: (
|
|
479
|
+
onCommit: (h) => d(
|
|
480
480
|
ce(
|
|
481
481
|
r,
|
|
482
|
-
|
|
482
|
+
ir(r.ratings, h)
|
|
483
483
|
)
|
|
484
484
|
)
|
|
485
485
|
}
|
|
486
486
|
) : /* @__PURE__ */ e(
|
|
487
|
-
|
|
487
|
+
Mr,
|
|
488
488
|
{
|
|
489
489
|
ratings: r.ratings,
|
|
490
490
|
useRange: r.criterionUseRange && !i,
|
|
491
491
|
hidePoints: i,
|
|
492
492
|
ratingOrder: t,
|
|
493
493
|
ratingNamesRequired: c ? s.ratingNamesRequired : [],
|
|
494
|
-
onChange: (
|
|
494
|
+
onChange: (h) => d(ce(r, h))
|
|
495
495
|
}
|
|
496
496
|
)
|
|
497
497
|
] }) })
|
|
@@ -516,7 +516,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
516
516
|
]
|
|
517
517
|
}
|
|
518
518
|
);
|
|
519
|
-
},
|
|
519
|
+
}, Ar = ({
|
|
520
520
|
criteria: r,
|
|
521
521
|
hidePoints: a,
|
|
522
522
|
freeFormCriterionComments: o,
|
|
@@ -536,18 +536,18 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
536
536
|
clearMovedCriterion: D,
|
|
537
537
|
srAnnouncement: f,
|
|
538
538
|
moveCriterionBySortableId: I
|
|
539
|
-
} =
|
|
540
|
-
J(
|
|
541
|
-
J(
|
|
539
|
+
} = tr({ criteria: r, onReorderCriteria: u }), P = pe(
|
|
540
|
+
J(ve, { activationConstraint: { distance: 8 } }),
|
|
541
|
+
J(Ce, { coordinateGetter: fe })
|
|
542
542
|
);
|
|
543
|
-
return /* @__PURE__ */ m(
|
|
544
|
-
/* @__PURE__ */ e(
|
|
545
|
-
/* @__PURE__ */ e(
|
|
546
|
-
B && I(
|
|
547
|
-
}, children: /* @__PURE__ */ e(
|
|
548
|
-
|
|
543
|
+
return /* @__PURE__ */ m(ze, { children: [
|
|
544
|
+
/* @__PURE__ */ e(Cr, { children: /* @__PURE__ */ e("div", { "aria-live": "polite", "aria-atomic": "true", children: f }) }),
|
|
545
|
+
/* @__PURE__ */ e(Re, { sensors: P, onDragEnd: ({ active: S, over: B }) => {
|
|
546
|
+
B && I(S.id, B.id);
|
|
547
|
+
}, children: /* @__PURE__ */ e(Be, { items: d, strategy: Se, children: r.map((S, B) => /* @__PURE__ */ e(
|
|
548
|
+
Or,
|
|
549
549
|
{
|
|
550
|
-
criterion:
|
|
550
|
+
criterion: S,
|
|
551
551
|
sortableId: d[B],
|
|
552
552
|
position: B + 1,
|
|
553
553
|
hidePoints: a,
|
|
@@ -555,18 +555,18 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
555
555
|
ratingOrder: i,
|
|
556
556
|
errors: n[B],
|
|
557
557
|
showErrors: t,
|
|
558
|
-
shouldFocusName:
|
|
559
|
-
shouldFocusHandle:
|
|
558
|
+
shouldFocusName: S.id === s,
|
|
559
|
+
shouldFocusHandle: S.id === C,
|
|
560
560
|
onNameFocused: c,
|
|
561
561
|
onHandleFocused: D,
|
|
562
562
|
onChange: b,
|
|
563
|
-
onDuplicate: () => g(
|
|
564
|
-
onDelete: () => l(
|
|
563
|
+
onDuplicate: () => g(S),
|
|
564
|
+
onDelete: () => l(S)
|
|
565
565
|
},
|
|
566
566
|
d[B]
|
|
567
567
|
)) }) })
|
|
568
568
|
] });
|
|
569
|
-
},
|
|
569
|
+
}, Nr = ({
|
|
570
570
|
isOpen: r,
|
|
571
571
|
assignmentPoints: a,
|
|
572
572
|
rubricPoints: o,
|
|
@@ -574,7 +574,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
574
574
|
onLeaveDifferent: n,
|
|
575
575
|
onDismiss: t
|
|
576
576
|
}) => {
|
|
577
|
-
const { translations: s, translate: c } = L(), { locale: b } = me(), g =
|
|
577
|
+
const { translations: s, translate: c } = L(), { locale: b } = me(), g = nr(o, a, b), l = g === null ? c("pointsDifferenceModalBodyZeroAssignmentPoints", { rubricPoints: o }) : c("pointsDifferenceModalBody", { assignmentPoints: a, rubricPoints: o, pointRatio: g });
|
|
578
578
|
return /* @__PURE__ */ m(
|
|
579
579
|
V,
|
|
580
580
|
{
|
|
@@ -586,7 +586,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
586
586
|
children: [
|
|
587
587
|
/* @__PURE__ */ m(V.Header, { children: [
|
|
588
588
|
/* @__PURE__ */ e(
|
|
589
|
-
|
|
589
|
+
Sr,
|
|
590
590
|
{
|
|
591
591
|
placement: "end",
|
|
592
592
|
offset: "small",
|
|
@@ -594,9 +594,9 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
594
594
|
screenReaderLabel: s.close
|
|
595
595
|
}
|
|
596
596
|
),
|
|
597
|
-
/* @__PURE__ */ e(
|
|
597
|
+
/* @__PURE__ */ e(yr, { level: "h2", children: s.confirmToContinueHeader })
|
|
598
598
|
] }),
|
|
599
|
-
/* @__PURE__ */ e(V.Body, { children: /* @__PURE__ */ e(
|
|
599
|
+
/* @__PURE__ */ e(V.Body, { children: /* @__PURE__ */ e(Dr, { children: l }) }),
|
|
600
600
|
/* @__PURE__ */ m(V.Footer, { children: [
|
|
601
601
|
/* @__PURE__ */ e(
|
|
602
602
|
ue,
|
|
@@ -612,14 +612,14 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
612
612
|
]
|
|
613
613
|
}
|
|
614
614
|
);
|
|
615
|
-
},
|
|
615
|
+
}, Hr = ({
|
|
616
616
|
savePending: r,
|
|
617
617
|
onDiscard: a,
|
|
618
618
|
onSave: o
|
|
619
619
|
}) => {
|
|
620
620
|
const { translations: i } = L();
|
|
621
621
|
return /* @__PURE__ */ e(
|
|
622
|
-
|
|
622
|
+
p,
|
|
623
623
|
{
|
|
624
624
|
as: "footer",
|
|
625
625
|
position: "sticky",
|
|
@@ -643,7 +643,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
643
643
|
] })
|
|
644
644
|
}
|
|
645
645
|
);
|
|
646
|
-
},
|
|
646
|
+
}, Ur = ({
|
|
647
647
|
isNewRubric: r,
|
|
648
648
|
pointsPossible: a,
|
|
649
649
|
hidePoints: o
|
|
@@ -651,10 +651,10 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
651
651
|
const { translations: i, translate: n } = L();
|
|
652
652
|
return /* @__PURE__ */ m(v, { as: "header", justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
|
|
653
653
|
/* @__PURE__ */ e(N, { level: "h2", children: r ? i.rubricBuilderCreateTitle : i.rubricBuilderEditTitle }),
|
|
654
|
-
!o && /* @__PURE__ */ e(
|
|
654
|
+
!o && /* @__PURE__ */ e(Le, { "data-testid": "rubric-builder-current-total", children: n("rubricBuilderCurrentTotal", { count: a }) })
|
|
655
655
|
] });
|
|
656
656
|
}, X = ({ name: r, label: a, value: o, options: i, onChange: n }) => /* @__PURE__ */ e(
|
|
657
|
-
|
|
657
|
+
Ir,
|
|
658
658
|
{
|
|
659
659
|
name: r,
|
|
660
660
|
description: a,
|
|
@@ -662,9 +662,9 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
662
662
|
layout: "columns",
|
|
663
663
|
value: o,
|
|
664
664
|
onChange: (t, s) => n(s),
|
|
665
|
-
children: i.map((t) => /* @__PURE__ */ e(
|
|
665
|
+
children: i.map((t) => /* @__PURE__ */ e(Lr, { value: t.value, label: t.label }, t.value))
|
|
666
666
|
}
|
|
667
|
-
),
|
|
667
|
+
), _r = ({
|
|
668
668
|
rubricForm: r,
|
|
669
669
|
setRubricFormField: a,
|
|
670
670
|
validateTitle: o,
|
|
@@ -673,13 +673,13 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
673
673
|
}) => {
|
|
674
674
|
const { translations: t } = L(), s = (c) => {
|
|
675
675
|
if (c === "unscored" === r.hidePoints) return;
|
|
676
|
-
const { hidePoints: b, hideScoreTotal: g, useForGrading: l, buttonDisplay: u } =
|
|
676
|
+
const { hidePoints: b, hideScoreTotal: g, useForGrading: l, buttonDisplay: u } = ar(
|
|
677
677
|
r.hidePoints
|
|
678
678
|
);
|
|
679
679
|
a("hidePoints", b), a("hideScoreTotal", g), a("useForGrading", l), u && a("buttonDisplay", u);
|
|
680
680
|
};
|
|
681
681
|
return /* @__PURE__ */ m(
|
|
682
|
-
|
|
682
|
+
p,
|
|
683
683
|
{
|
|
684
684
|
as: "section",
|
|
685
685
|
"aria-labelledby": "rubric-builder-details-heading",
|
|
@@ -690,7 +690,7 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
690
690
|
/* @__PURE__ */ e(N, { level: "h3", id: "rubric-builder-details-heading", margin: "0 0 medium", children: t.rubricBuilderDetailsHeading }),
|
|
691
691
|
/* @__PURE__ */ m(v, { direction: "column", gap: "medium", children: [
|
|
692
692
|
/* @__PURE__ */ e(
|
|
693
|
-
|
|
693
|
+
z,
|
|
694
694
|
{
|
|
695
695
|
"data-testid": "rubric-builder-name",
|
|
696
696
|
renderLabel: t.rubricBuilderNameLabel,
|
|
@@ -760,16 +760,16 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
760
760
|
]
|
|
761
761
|
}
|
|
762
762
|
);
|
|
763
|
-
},
|
|
764
|
-
|
|
763
|
+
}, Ci = (r) => /* @__PURE__ */ e(be, { translations: r.translations, children: /* @__PURE__ */ e(
|
|
764
|
+
Ue,
|
|
765
765
|
{
|
|
766
766
|
courseId: r.courseId,
|
|
767
767
|
accountId: r.accountId,
|
|
768
768
|
featureFlags: r.featureFlags,
|
|
769
769
|
aiLimits: r.aiLimits,
|
|
770
|
-
children: /* @__PURE__ */ e(
|
|
770
|
+
children: /* @__PURE__ */ e(qr, { ...r })
|
|
771
771
|
}
|
|
772
|
-
) }),
|
|
772
|
+
) }), qr = ({
|
|
773
773
|
rubricId: r,
|
|
774
774
|
rubric: a,
|
|
775
775
|
rubricAssociation: o,
|
|
@@ -788,18 +788,18 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
788
788
|
validateField: C,
|
|
789
789
|
validationErrors: D,
|
|
790
790
|
isNewRubric: f,
|
|
791
|
-
load: { data: I, isLoading:
|
|
791
|
+
load: { data: I, isLoading: P, isError: x, isSuccess: S },
|
|
792
792
|
savePending: B,
|
|
793
793
|
saveError: R,
|
|
794
|
-
save:
|
|
795
|
-
saveAction:
|
|
796
|
-
isDirty:
|
|
797
|
-
criteriaValid:
|
|
794
|
+
save: y,
|
|
795
|
+
saveAction: F,
|
|
796
|
+
isDirty: E,
|
|
797
|
+
criteriaValid: W,
|
|
798
798
|
criteriaValidationErrors: ee,
|
|
799
799
|
saveCriterion: M,
|
|
800
|
-
deleteCriterion:
|
|
800
|
+
deleteCriterion: G,
|
|
801
801
|
reorderCriteria: j
|
|
802
|
-
} =
|
|
802
|
+
} = or({
|
|
803
803
|
rubricId: r,
|
|
804
804
|
rubric: a,
|
|
805
805
|
rubricAssociation: o,
|
|
@@ -809,25 +809,25 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
809
809
|
courseId: s,
|
|
810
810
|
canManageRubrics: c,
|
|
811
811
|
onSaveRubric: b
|
|
812
|
-
}), H = ne(null), [U, _] = T(!1), [O, q] = T(!1), [
|
|
813
|
-
if (r &&
|
|
814
|
-
return /* @__PURE__ */ e(
|
|
812
|
+
}), H = ne(null), [U, _] = T(!1), [O, q] = T(!1), [h, re] = T(!1), [we, ie] = T(!1), [Te, K] = T(!1), [ke, ae] = T(), Ee = lr(), Pe = $e(() => ae(void 0), []);
|
|
813
|
+
if (r && P)
|
|
814
|
+
return /* @__PURE__ */ e(mr, {});
|
|
815
815
|
if (r && x)
|
|
816
|
-
return
|
|
817
|
-
errorImageUrl:
|
|
816
|
+
return _e({
|
|
817
|
+
errorImageUrl: sr,
|
|
818
818
|
errorCategory: l.rubricErrorPageCategory,
|
|
819
819
|
translations: le(l)
|
|
820
820
|
});
|
|
821
|
-
if (r &&
|
|
822
|
-
return
|
|
823
|
-
const
|
|
821
|
+
if (r && S && !I)
|
|
822
|
+
return qe({ translations: le(l) });
|
|
823
|
+
const xe = () => {
|
|
824
824
|
var w;
|
|
825
825
|
if (_(!0), !C("title", u.title)) {
|
|
826
826
|
(w = H.current) == null || w.focus();
|
|
827
827
|
return;
|
|
828
828
|
}
|
|
829
|
-
if (!(u.criteria.length === 0 || !
|
|
830
|
-
switch (
|
|
829
|
+
if (!(u.criteria.length === 0 || !W))
|
|
830
|
+
switch (F) {
|
|
831
831
|
case "confirmPointsDifference":
|
|
832
832
|
K(!0);
|
|
833
833
|
break;
|
|
@@ -838,32 +838,32 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
838
838
|
re(!0);
|
|
839
839
|
break;
|
|
840
840
|
case "save":
|
|
841
|
-
|
|
841
|
+
y();
|
|
842
842
|
break;
|
|
843
843
|
default: {
|
|
844
|
-
const
|
|
845
|
-
throw new Error(`Unhandled save action: ${
|
|
844
|
+
const Ae = F;
|
|
845
|
+
throw new Error(`Unhandled save action: ${Ae}`);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
},
|
|
849
|
-
const w =
|
|
848
|
+
}, Me = () => {
|
|
849
|
+
const w = cr(Ee());
|
|
850
850
|
M(w), ae(w.id);
|
|
851
|
-
},
|
|
852
|
-
|
|
851
|
+
}, Oe = () => {
|
|
852
|
+
E ? q(!0) : g();
|
|
853
853
|
};
|
|
854
|
-
return /* @__PURE__ */ m(
|
|
854
|
+
return /* @__PURE__ */ m(p, { as: "div", "data-testid": "rubric-builder", children: [
|
|
855
855
|
/* @__PURE__ */ m(v, { direction: "column", gap: "medium", padding: "medium 0", children: [
|
|
856
856
|
/* @__PURE__ */ e(
|
|
857
|
-
|
|
857
|
+
Ur,
|
|
858
858
|
{
|
|
859
859
|
isNewRubric: f,
|
|
860
860
|
pointsPossible: u.pointsPossible,
|
|
861
861
|
hidePoints: u.hidePoints
|
|
862
862
|
}
|
|
863
863
|
),
|
|
864
|
-
R && /* @__PURE__ */ e(
|
|
864
|
+
R && /* @__PURE__ */ e(br, { variant: "error", margin: "0", children: l.rubricFormSaveError }),
|
|
865
865
|
/* @__PURE__ */ e(
|
|
866
|
-
|
|
866
|
+
_r,
|
|
867
867
|
{
|
|
868
868
|
rubricForm: u,
|
|
869
869
|
setRubricFormField: d,
|
|
@@ -875,21 +875,21 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
875
875
|
}
|
|
876
876
|
),
|
|
877
877
|
/* @__PURE__ */ e(
|
|
878
|
-
|
|
878
|
+
Er,
|
|
879
879
|
{
|
|
880
880
|
criteriaCount: u.criteria.length,
|
|
881
881
|
showMissingCriteriaError: U,
|
|
882
882
|
actions: /* @__PURE__ */ e(
|
|
883
883
|
A,
|
|
884
884
|
{
|
|
885
|
-
renderIcon: /* @__PURE__ */ e(
|
|
886
|
-
onClick:
|
|
885
|
+
renderIcon: /* @__PURE__ */ e(Ie, {}),
|
|
886
|
+
onClick: Me,
|
|
887
887
|
"data-testid": "rubric-builder-add-criterion",
|
|
888
888
|
children: l.rubricBuilderAddCriterion
|
|
889
889
|
}
|
|
890
890
|
),
|
|
891
891
|
children: /* @__PURE__ */ e(
|
|
892
|
-
|
|
892
|
+
Ar,
|
|
893
893
|
{
|
|
894
894
|
criteria: u.criteria,
|
|
895
895
|
hidePoints: u.hidePoints,
|
|
@@ -897,11 +897,11 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
897
897
|
ratingOrder: u.ratingOrder,
|
|
898
898
|
criteriaValidationErrors: ee,
|
|
899
899
|
showErrors: U,
|
|
900
|
-
focusNameCriterionId:
|
|
901
|
-
onFocusedName:
|
|
900
|
+
focusNameCriterionId: ke,
|
|
901
|
+
onFocusedName: Pe,
|
|
902
902
|
onChangeCriterion: M,
|
|
903
|
-
onDuplicateCriterion: (w) => M(
|
|
904
|
-
onDeleteCriterion:
|
|
903
|
+
onDuplicateCriterion: (w) => M(dr(w)),
|
|
904
|
+
onDeleteCriterion: G,
|
|
905
905
|
onReorderCriteria: j
|
|
906
906
|
}
|
|
907
907
|
)
|
|
@@ -909,11 +909,11 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
909
909
|
)
|
|
910
910
|
] }),
|
|
911
911
|
/* @__PURE__ */ e(
|
|
912
|
-
|
|
912
|
+
Hr,
|
|
913
913
|
{
|
|
914
914
|
savePending: B,
|
|
915
|
-
onDiscard:
|
|
916
|
-
onSave:
|
|
915
|
+
onDiscard: Oe,
|
|
916
|
+
onSave: xe
|
|
917
917
|
}
|
|
918
918
|
),
|
|
919
919
|
/* @__PURE__ */ e(
|
|
@@ -932,13 +932,13 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
932
932
|
/* @__PURE__ */ e(
|
|
933
933
|
Z,
|
|
934
934
|
{
|
|
935
|
-
isOpen:
|
|
935
|
+
isOpen: h,
|
|
936
936
|
heading: l.confirmToContinueHeader,
|
|
937
937
|
body: l.gradingHistoryWarning,
|
|
938
938
|
confirmLabel: l.saveConfirmModalSave,
|
|
939
939
|
cancelLabel: l.cancel,
|
|
940
940
|
onConfirm: () => {
|
|
941
|
-
re(!1),
|
|
941
|
+
re(!1), y();
|
|
942
942
|
},
|
|
943
943
|
onDismiss: () => re(!1),
|
|
944
944
|
"data-testid": "rubric-builder-save-confirm-modal"
|
|
@@ -947,29 +947,29 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
947
947
|
/* @__PURE__ */ e(
|
|
948
948
|
Z,
|
|
949
949
|
{
|
|
950
|
-
isOpen:
|
|
950
|
+
isOpen: we,
|
|
951
951
|
heading: l.confirmToContinueHeader,
|
|
952
952
|
body: l.gradingHistoryWarning,
|
|
953
953
|
confirmLabel: l.editConfirmModalConfirm,
|
|
954
954
|
cancelLabel: l.cancel,
|
|
955
955
|
onConfirm: () => {
|
|
956
|
-
ie(!1),
|
|
956
|
+
ie(!1), y();
|
|
957
957
|
},
|
|
958
958
|
onDismiss: () => ie(!1),
|
|
959
959
|
"data-testid": "rubric-builder-assessed-edit-modal"
|
|
960
960
|
}
|
|
961
961
|
),
|
|
962
962
|
/* @__PURE__ */ e(
|
|
963
|
-
|
|
963
|
+
Nr,
|
|
964
964
|
{
|
|
965
|
-
isOpen:
|
|
965
|
+
isOpen: Te,
|
|
966
966
|
assignmentPoints: n ?? 0,
|
|
967
967
|
rubricPoints: u.pointsPossible,
|
|
968
968
|
onChange: () => {
|
|
969
|
-
K(!1),
|
|
969
|
+
K(!1), y(!1);
|
|
970
970
|
},
|
|
971
971
|
onLeaveDifferent: () => {
|
|
972
|
-
K(!1),
|
|
972
|
+
K(!1), y(!0);
|
|
973
973
|
},
|
|
974
974
|
onDismiss: () => K(!1)
|
|
975
975
|
}
|
|
@@ -977,9 +977,9 @@ const vi = (r) => /* @__PURE__ */ e(be, { translations: pe, translate: ge, child
|
|
|
977
977
|
] });
|
|
978
978
|
};
|
|
979
979
|
export {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
980
|
+
Bi as DEFAULT_AI_MAX_CRITERION_COUNT,
|
|
981
|
+
Si as DEFAULT_AI_MAX_RATING_COUNT,
|
|
982
|
+
pi as HelloWorld,
|
|
983
|
+
Ci as RubricBuilder,
|
|
984
|
+
fi as RubricSelector
|
|
985
985
|
};
|