@instructure/platform-rubrics 3.0.0 → 3.0.1
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/_internal/RubricForm/utils.d.ts +1 -0
- package/dist/_internal/RubricForm/utils.d.ts.map +1 -1
- package/dist/canvas/RubricForm/components/RubricAssignmentSettings.d.ts.map +1 -1
- package/dist/canvas.js +566 -565
- package/dist/chunks/{ErrorShip-DnpTf4ze.js → ErrorShip-COgM3wMV.js} +76 -72
- package/dist/foundation/RubricBuilder/RubricBuilder.d.ts +2 -2
- package/dist/foundation/RubricBuilder/RubricBuilder.d.ts.map +1 -1
- package/dist/foundation/RubricBuilder/components/AssignmentSettings.d.ts +8 -0
- package/dist/foundation/RubricBuilder/components/AssignmentSettings.d.ts.map +1 -0
- package/dist/foundation/RubricBuilder/components/RubricDetailsCard.d.ts +4 -1
- package/dist/foundation/RubricBuilder/components/RubricDetailsCard.d.ts.map +1 -1
- package/dist/foundation.js +489 -435
- package/package.json +1 -1
package/dist/foundation.js
CHANGED
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { D as
|
|
1
|
+
import { g as Ue, R as be, u as D, f as _e, h as Ge, r as $e, i as le, b as Fe } from "./chunks/errorPage-CYyehhNJ.js";
|
|
2
|
+
import { D as ki, a as Ti, d as xi } from "./chunks/errorPage-CYyehhNJ.js";
|
|
3
3
|
import "@instructure/platform-provider";
|
|
4
|
-
import { useState as
|
|
4
|
+
import { useState as w, useEffect as $, useRef as ae, useCallback as qe } from "react";
|
|
5
5
|
import { jsx as e, jsxs as m, Fragment as ze } from "react/jsx-runtime";
|
|
6
|
-
import { Heading as
|
|
6
|
+
import { Heading as U } from "@instructure/ui-heading";
|
|
7
7
|
import { View as p } from "@instructure/ui-view";
|
|
8
|
-
import { Button as A, CloseButton as
|
|
8
|
+
import { Button as A, CloseButton as We, 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
|
|
11
|
+
import { Spinner as je } from "@instructure/ui-spinner";
|
|
12
12
|
import { Text as k } from "@instructure/ui-text";
|
|
13
|
-
import { useQuery as
|
|
14
|
-
import { u as
|
|
15
|
-
import
|
|
16
|
-
import { LoadingIndicator as
|
|
17
|
-
import { Alert as
|
|
18
|
-
import { IconDragHandleLine as
|
|
13
|
+
import { useQuery as Ke } from "@tanstack/react-query";
|
|
14
|
+
import { u as ge, g as Qe, p as Ve, a as he, b as de, C as pe, c as ce, i as Xe, d as fe, e as J, s as Ce, K as ve, P as Re, r as Ye, D as Be, S as Se, v as ye, f as Ze, h as Je, j as er, k as rr, l as ir, m as tr, n as nr, w as ue, o as ar, q as or, t as sr, x as lr, y as dr, z as cr, A as ur, B as mr, E as br } from "./chunks/ErrorShip-COgM3wMV.js";
|
|
15
|
+
import gr from "graphql-tag";
|
|
16
|
+
import { LoadingIndicator as hr } from "@instructure/platform-loading-indicator";
|
|
17
|
+
import { Alert as pr } from "@instructure/ui-alerts";
|
|
18
|
+
import { IconDragHandleLine as De, IconTrashLine as Ie, IconAddLine as Le, IconArrowOpenDownLine as fr, IconArrowOpenEndLine as Cr, IconCommentLine as vr, IconDuplicateLine as Rr } from "@instructure/ui-icons";
|
|
19
|
+
import { Checkbox as ne } from "@instructure/ui-checkbox/v11_7";
|
|
20
|
+
import { Flex as Br } from "@instructure/ui-flex/v11_7";
|
|
19
21
|
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
|
|
22
|
+
import { ScreenReaderContent as Sr } from "@instructure/ui-a11y-content";
|
|
23
|
+
import { Checkbox as yr } from "@instructure/ui-checkbox";
|
|
24
|
+
import { Pill as we } from "@instructure/ui-pill";
|
|
25
|
+
import { TextArea as Dr } from "@instructure/ui-text-area";
|
|
26
|
+
import { TextInput as F } from "@instructure/ui-text-input";
|
|
27
|
+
import { NumberInput as Ir } from "@instructure/ui-number-input";
|
|
28
|
+
import { CloseButton as Lr, Button as me } from "@instructure/ui-buttons/v11_7";
|
|
29
|
+
import { Heading as wr } from "@instructure/ui-heading/v11_7";
|
|
28
30
|
import { Modal as V } from "@instructure/ui-modal/v11_7";
|
|
29
|
-
import { Text as
|
|
30
|
-
import { RadioInputGroup as
|
|
31
|
-
const
|
|
31
|
+
import { Text as kr } from "@instructure/ui-text/v11_7";
|
|
32
|
+
import { RadioInputGroup as Tr, RadioInput as xr } from "@instructure/ui-radio-input";
|
|
33
|
+
const yi = () => /* @__PURE__ */ e(p, { as: "div", padding: "small", children: /* @__PURE__ */ e(U, { level: "h2", children: Ue("foundation") }) }), Pr = gr`
|
|
32
34
|
query CourseRubricsList($courseId: ID!, $first: Int) {
|
|
33
35
|
course(id: $courseId) {
|
|
34
36
|
rubricsConnection(first: $first) {
|
|
@@ -46,160 +48,201 @@ const pi = () => /* @__PURE__ */ e(p, { as: "div", padding: "small", children: /
|
|
|
46
48
|
}
|
|
47
49
|
}
|
|
48
50
|
`;
|
|
49
|
-
function
|
|
50
|
-
const { executeQuery:
|
|
51
|
-
return
|
|
51
|
+
function Er(r) {
|
|
52
|
+
const { executeQuery: o } = ge();
|
|
53
|
+
return Ke({
|
|
52
54
|
queryKey: ["courseRubrics", r],
|
|
53
55
|
queryFn: async () => {
|
|
54
|
-
var
|
|
55
|
-
const { course:
|
|
56
|
+
var a;
|
|
57
|
+
const { course: s } = await o(Pr, {
|
|
56
58
|
courseId: r,
|
|
57
59
|
first: 50
|
|
58
|
-
}), i =
|
|
60
|
+
}), i = s == null ? void 0 : s.rubricsConnection;
|
|
59
61
|
return {
|
|
60
62
|
rubrics: ((i == null ? void 0 : i.nodes) ?? []).filter(
|
|
61
|
-
(
|
|
63
|
+
(d) => d != null
|
|
62
64
|
),
|
|
63
|
-
hasMore: ((
|
|
65
|
+
hasMore: ((a = i == null ? void 0 : i.pageInfo) == null ? void 0 : a.hasNextPage) ?? !1
|
|
64
66
|
};
|
|
65
67
|
},
|
|
66
68
|
enabled: !!r
|
|
67
69
|
});
|
|
68
70
|
}
|
|
69
|
-
const
|
|
71
|
+
const Di = (r) => /* @__PURE__ */ e(be, { translations: r.translations, children: /* @__PURE__ */ e(Or, { ...r }) }), Or = ({
|
|
70
72
|
courseId: r,
|
|
71
|
-
value:
|
|
72
|
-
onChange:
|
|
73
|
+
value: o,
|
|
74
|
+
onChange: s
|
|
73
75
|
}) => {
|
|
74
|
-
const { translations: i } =
|
|
75
|
-
return
|
|
76
|
-
/* @__PURE__ */ e(
|
|
76
|
+
const { translations: i } = D(), { data: a, isLoading: d, isError: t, refetch: g } = Er(r), l = a == null ? void 0 : a.rubrics;
|
|
77
|
+
return d ? /* @__PURE__ */ m(p, { as: "div", role: "status", "aria-live": "polite", margin: "0 0 medium", children: [
|
|
78
|
+
/* @__PURE__ */ e(je, { renderTitle: i.rubricSelectorLoading, size: "x-small" }),
|
|
77
79
|
/* @__PURE__ */ e(p, { as: "span", padding: "0 0 0 x-small", children: /* @__PURE__ */ e(k, { size: "small", children: i.rubricSelectorLoading }) })
|
|
78
|
-
] }) :
|
|
80
|
+
] }) : t ? /* @__PURE__ */ e(p, { as: "div", margin: "0 0 medium", children: /* @__PURE__ */ m(v, { gap: "small", alignItems: "center", wrap: "wrap", children: [
|
|
79
81
|
/* @__PURE__ */ e(v.Item, { children: /* @__PURE__ */ m(k, { size: "small", color: "danger", children: [
|
|
80
82
|
i.rubricSelectorErrorTitle,
|
|
81
83
|
". ",
|
|
82
84
|
i.rubricSelectorErrorBody
|
|
83
85
|
] }) }),
|
|
84
|
-
/* @__PURE__ */ e(v.Item, { children: /* @__PURE__ */ e(A, { size: "small", onClick: () =>
|
|
85
|
-
] }) }) : !
|
|
86
|
+
/* @__PURE__ */ e(v.Item, { children: /* @__PURE__ */ e(A, { size: "small", onClick: () => g(), children: i.rubricSelectorRetry }) })
|
|
87
|
+
] }) }) : !l || l.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
88
|
/* @__PURE__ */ m(
|
|
87
89
|
te,
|
|
88
90
|
{
|
|
89
91
|
renderLabel: i.rubricSelectorLabel,
|
|
90
92
|
assistiveText: i.rubricSelectorAssistiveText,
|
|
91
|
-
value:
|
|
92
|
-
onChange: (
|
|
93
|
-
if (typeof
|
|
94
|
-
const
|
|
95
|
-
|
|
93
|
+
value: o ?? "",
|
|
94
|
+
onChange: (u, { value: b }) => {
|
|
95
|
+
if (typeof b != "string" || !b) return;
|
|
96
|
+
const c = l.find((n) => n.id === b);
|
|
97
|
+
s(b, (c == null ? void 0 : c.title) ?? "");
|
|
96
98
|
},
|
|
97
99
|
children: [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
o === void 0 && /* @__PURE__ */ e(te.Option, { id: "rubrics-rubric-selector-placeholder", value: "", children: i.rubricSelectorPlaceholder }),
|
|
101
|
+
l.map((u) => /* @__PURE__ */ e(
|
|
100
102
|
te.Option,
|
|
101
103
|
{
|
|
102
|
-
id: `rubrics-rubric-selector-option-${
|
|
103
|
-
value:
|
|
104
|
-
children:
|
|
104
|
+
id: `rubrics-rubric-selector-option-${u.id}`,
|
|
105
|
+
value: u.id,
|
|
106
|
+
children: u.title || i.rubricSelectorUntitled
|
|
105
107
|
},
|
|
106
|
-
|
|
108
|
+
u.id
|
|
107
109
|
))
|
|
108
110
|
]
|
|
109
111
|
}
|
|
110
112
|
),
|
|
111
|
-
(
|
|
113
|
+
(a == null ? void 0 : a.hasMore) && /* @__PURE__ */ e(p, { as: "div", padding: "xx-small 0 0", children: /* @__PURE__ */ e(k, { size: "x-small", color: "secondary", children: i.rubricSelectorTruncated }) })
|
|
114
|
+
] });
|
|
115
|
+
}, Mr = ({
|
|
116
|
+
rubricForm: r,
|
|
117
|
+
canUseForGrading: o,
|
|
118
|
+
setRubricFormField: s
|
|
119
|
+
}) => {
|
|
120
|
+
const { translations: i } = D(), { hidePoints: a, useForGrading: d, hideScoreTotal: t, hideOutcomeResults: g } = r, l = (u) => {
|
|
121
|
+
const b = Qe(u);
|
|
122
|
+
s("useForGrading", b.useForGrading), s("hideScoreTotal", b.hideScoreTotal);
|
|
123
|
+
};
|
|
124
|
+
return /* @__PURE__ */ m(Br, { direction: "column", gap: "small", "data-testid": "rubric-builder-assignment-settings", children: [
|
|
125
|
+
/* @__PURE__ */ e(
|
|
126
|
+
ne,
|
|
127
|
+
{
|
|
128
|
+
variant: "toggle",
|
|
129
|
+
label: i.hideOutcomeResultsLabel,
|
|
130
|
+
checked: g,
|
|
131
|
+
onChange: (u) => s("hideOutcomeResults", u.target.checked),
|
|
132
|
+
"data-testid": "rubric-builder-hide-outcome-results"
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
!a && o && /* @__PURE__ */ e(
|
|
136
|
+
ne,
|
|
137
|
+
{
|
|
138
|
+
variant: "toggle",
|
|
139
|
+
label: i.useForGradingLabel,
|
|
140
|
+
checked: d,
|
|
141
|
+
onChange: (u) => l(u.target.checked),
|
|
142
|
+
"data-testid": "rubric-builder-use-for-grading"
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
!a && !d && /* @__PURE__ */ e(
|
|
146
|
+
ne,
|
|
147
|
+
{
|
|
148
|
+
variant: "toggle",
|
|
149
|
+
label: i.hideScoreTotalLabel,
|
|
150
|
+
checked: t,
|
|
151
|
+
onChange: (u) => s("hideScoreTotal", u.target.checked),
|
|
152
|
+
"data-testid": "rubric-builder-hide-score-total"
|
|
153
|
+
}
|
|
154
|
+
)
|
|
112
155
|
] });
|
|
113
156
|
}, Z = ({
|
|
114
157
|
isOpen: r,
|
|
115
|
-
heading:
|
|
116
|
-
body:
|
|
158
|
+
heading: o,
|
|
159
|
+
body: s,
|
|
117
160
|
confirmLabel: i,
|
|
118
|
-
cancelLabel:
|
|
119
|
-
onConfirm:
|
|
120
|
-
onDismiss:
|
|
121
|
-
"data-testid":
|
|
161
|
+
cancelLabel: a,
|
|
162
|
+
onConfirm: d,
|
|
163
|
+
onDismiss: t,
|
|
164
|
+
"data-testid": g
|
|
122
165
|
}) => {
|
|
123
|
-
const { translations:
|
|
124
|
-
return /* @__PURE__ */ m(Q, { open: r, onDismiss:
|
|
166
|
+
const { translations: l } = D();
|
|
167
|
+
return /* @__PURE__ */ m(Q, { open: r, onDismiss: t, size: "small", label: o, "data-testid": g, children: [
|
|
125
168
|
/* @__PURE__ */ m(Q.Header, { children: [
|
|
126
169
|
/* @__PURE__ */ e(
|
|
127
|
-
|
|
170
|
+
We,
|
|
128
171
|
{
|
|
129
172
|
placement: "end",
|
|
130
173
|
offset: "small",
|
|
131
|
-
onClick:
|
|
132
|
-
screenReaderLabel:
|
|
174
|
+
onClick: t,
|
|
175
|
+
screenReaderLabel: l.close
|
|
133
176
|
}
|
|
134
177
|
),
|
|
135
|
-
/* @__PURE__ */ e(
|
|
178
|
+
/* @__PURE__ */ e(U, { level: "h2", children: o })
|
|
136
179
|
] }),
|
|
137
|
-
/* @__PURE__ */ e(Q.Body, { children: /* @__PURE__ */ e(k, { children:
|
|
180
|
+
/* @__PURE__ */ e(Q.Body, { children: /* @__PURE__ */ e(k, { children: s }) }),
|
|
138
181
|
/* @__PURE__ */ m(Q.Footer, { children: [
|
|
139
|
-
/* @__PURE__ */ e(A, { onClick:
|
|
140
|
-
/* @__PURE__ */ e(A, { color: "primary", onClick:
|
|
182
|
+
/* @__PURE__ */ e(A, { onClick: t, margin: "0 x-small 0 0", children: a }),
|
|
183
|
+
/* @__PURE__ */ e(A, { color: "primary", onClick: d, "data-testid": "confirm-modal-confirm", children: i })
|
|
141
184
|
] })
|
|
142
185
|
] });
|
|
143
|
-
},
|
|
186
|
+
}, Ar = ({
|
|
144
187
|
criteriaCount: r,
|
|
145
|
-
showMissingCriteriaError:
|
|
146
|
-
actions:
|
|
188
|
+
showMissingCriteriaError: o,
|
|
189
|
+
actions: s,
|
|
147
190
|
children: i
|
|
148
191
|
}) => {
|
|
149
|
-
const { translations:
|
|
192
|
+
const { translations: a } = D();
|
|
150
193
|
return /* @__PURE__ */ m(p, { as: "section", "aria-labelledby": "rubric-builder-criteria-heading", children: [
|
|
151
194
|
/* @__PURE__ */ m(v, { justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
|
|
152
|
-
/* @__PURE__ */ e(
|
|
153
|
-
|
|
195
|
+
/* @__PURE__ */ e(U, { level: "h3", id: "rubric-builder-criteria-heading", children: a.rubricBuilderCriteriaHeading }),
|
|
196
|
+
s && /* @__PURE__ */ e(v, { gap: "small", wrap: "wrap", children: s })
|
|
154
197
|
] }),
|
|
155
|
-
/* @__PURE__ */ e(p, { as: "div", margin: "small 0 0", children: r === 0 ? /* @__PURE__ */ e(k, { color: "secondary", children:
|
|
156
|
-
/* @__PURE__ */ e("div", { "aria-live": "polite", children:
|
|
198
|
+
/* @__PURE__ */ e(p, { as: "div", margin: "small 0 0", children: r === 0 ? /* @__PURE__ */ e(k, { color: "secondary", children: a.rubricBuilderCriteriaEmpty }) : i }),
|
|
199
|
+
/* @__PURE__ */ e("div", { "aria-live": "polite", children: o && r === 0 && /* @__PURE__ */ e(k, { color: "danger", "data-testid": "rubric-builder-criteria-error", children: a.rubricBuilderAddCriterionError }) })
|
|
157
200
|
] });
|
|
158
|
-
},
|
|
159
|
-
const { translations:
|
|
201
|
+
}, Nr = ({ points: r, onCommit: o }) => {
|
|
202
|
+
const { translations: s } = D(), [i, a] = w(String(r));
|
|
160
203
|
return $(() => {
|
|
161
|
-
|
|
204
|
+
a(String(r));
|
|
162
205
|
}, [r]), /* @__PURE__ */ e(
|
|
163
|
-
|
|
206
|
+
F,
|
|
164
207
|
{
|
|
165
|
-
renderLabel:
|
|
208
|
+
renderLabel: s.rubricBuilderPointsPossibleLabel,
|
|
166
209
|
width: "8rem",
|
|
167
210
|
value: i,
|
|
168
|
-
onChange: (
|
|
169
|
-
onBlur: (
|
|
170
|
-
const
|
|
171
|
-
|
|
211
|
+
onChange: (d) => a(d.target.value),
|
|
212
|
+
onBlur: (d) => {
|
|
213
|
+
const t = Ve(d.target.value);
|
|
214
|
+
a(String(t)), t !== r && o(t);
|
|
172
215
|
},
|
|
173
216
|
"data-testid": "rubric-builder-points-possible"
|
|
174
217
|
}
|
|
175
218
|
);
|
|
176
|
-
},
|
|
219
|
+
}, Hr = ({
|
|
177
220
|
rating: r,
|
|
178
|
-
sortableId:
|
|
179
|
-
position:
|
|
221
|
+
sortableId: o,
|
|
222
|
+
position: s,
|
|
180
223
|
rangeStart: i,
|
|
181
|
-
useRange:
|
|
182
|
-
hidePoints:
|
|
183
|
-
showNameError:
|
|
184
|
-
canRemove:
|
|
185
|
-
onChange:
|
|
186
|
-
onPointsBlur:
|
|
187
|
-
onRemove:
|
|
224
|
+
useRange: a,
|
|
225
|
+
hidePoints: d,
|
|
226
|
+
showNameError: t,
|
|
227
|
+
canRemove: g,
|
|
228
|
+
onChange: l,
|
|
229
|
+
onPointsBlur: u,
|
|
230
|
+
onRemove: b
|
|
188
231
|
}) => {
|
|
189
|
-
const { translations:
|
|
190
|
-
id:
|
|
191
|
-
}), [
|
|
232
|
+
const { translations: c, translate: n } = D(), { attributes: C, listeners: y, setNodeRef: f, transform: I, transition: P } = he({
|
|
233
|
+
id: o
|
|
234
|
+
}), [E, S] = w(String(r.points));
|
|
192
235
|
$(() => {
|
|
193
|
-
|
|
236
|
+
de(E) !== r.points && S(String(r.points));
|
|
194
237
|
}, [r.points]);
|
|
195
|
-
const B = (R,
|
|
196
|
-
S(
|
|
238
|
+
const B = (R, T) => {
|
|
239
|
+
S(T), l({ ...r, points: R });
|
|
197
240
|
};
|
|
198
241
|
return /* @__PURE__ */ e(
|
|
199
242
|
"div",
|
|
200
243
|
{
|
|
201
244
|
ref: f,
|
|
202
|
-
style: { transform:
|
|
245
|
+
style: { transform: pe.Transform.toString(I), transition: P },
|
|
203
246
|
"data-testid": "rubric-builder-rating-row",
|
|
204
247
|
children: /* @__PURE__ */ m(v, { gap: "small", alignItems: "start", wrap: "wrap", margin: "0 0 small", children: [
|
|
205
248
|
/* @__PURE__ */ e(
|
|
@@ -208,290 +251,290 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
208
251
|
as: "div",
|
|
209
252
|
cursor: "grab",
|
|
210
253
|
margin: "medium 0 0",
|
|
211
|
-
"aria-label":
|
|
254
|
+
"aria-label": n("rubricBuilderReorderRating", { position: s }),
|
|
212
255
|
...C,
|
|
213
|
-
...
|
|
214
|
-
children: /* @__PURE__ */ e(
|
|
256
|
+
...y,
|
|
257
|
+
children: /* @__PURE__ */ e(De, { "aria-hidden": "true" })
|
|
215
258
|
}
|
|
216
259
|
),
|
|
217
|
-
/* @__PURE__ */ e(p, { as: "div", minWidth: "1.5rem", margin: "medium 0 0", children: /* @__PURE__ */ e(k, { weight: "bold", "aria-hidden": "true", children:
|
|
218
|
-
!
|
|
219
|
-
|
|
260
|
+
/* @__PURE__ */ e(p, { as: "div", minWidth: "1.5rem", margin: "medium 0 0", children: /* @__PURE__ */ e(k, { weight: "bold", "aria-hidden": "true", children: s }) }),
|
|
261
|
+
!d && /* @__PURE__ */ m(v, { gap: "x-small", alignItems: "end", children: [
|
|
262
|
+
a && i !== void 0 && /* @__PURE__ */ e(p, { as: "div", margin: "0 0 x-small", children: /* @__PURE__ */ e(k, { children: n("rangeStartPrefix", { rangeStart: i }) }) }),
|
|
220
263
|
/* @__PURE__ */ e(
|
|
221
|
-
|
|
264
|
+
Ir,
|
|
222
265
|
{
|
|
223
|
-
renderLabel:
|
|
266
|
+
renderLabel: a ? c.rubricBuilderPointRangeLabel : c.rubricBuilderPointsLabel,
|
|
224
267
|
allowStringValue: !0,
|
|
225
268
|
showArrows: !1,
|
|
226
269
|
width: "6rem",
|
|
227
|
-
value:
|
|
228
|
-
onChange: (R,
|
|
229
|
-
|
|
270
|
+
value: E,
|
|
271
|
+
onChange: (R, T) => {
|
|
272
|
+
Xe(T) && B(de(T), T);
|
|
230
273
|
},
|
|
231
274
|
onIncrement: () => {
|
|
232
|
-
const R =
|
|
275
|
+
const R = ce(Math.floor(r.points) + 1);
|
|
233
276
|
B(R, String(R));
|
|
234
277
|
},
|
|
235
278
|
onDecrement: () => {
|
|
236
|
-
const R =
|
|
279
|
+
const R = ce(Math.floor(r.points) - 1);
|
|
237
280
|
B(R, String(R));
|
|
238
281
|
},
|
|
239
|
-
onBlur:
|
|
282
|
+
onBlur: u,
|
|
240
283
|
"data-testid": "rubric-builder-rating-points"
|
|
241
284
|
}
|
|
242
285
|
)
|
|
243
286
|
] }),
|
|
244
287
|
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, size: "10rem", children: /* @__PURE__ */ e(
|
|
245
|
-
|
|
288
|
+
F,
|
|
246
289
|
{
|
|
247
|
-
renderLabel:
|
|
290
|
+
renderLabel: c.rubricBuilderRatingNameLabel,
|
|
248
291
|
isRequired: !0,
|
|
249
292
|
value: r.description,
|
|
250
|
-
onChange: (R) =>
|
|
251
|
-
messages:
|
|
293
|
+
onChange: (R) => l({ ...r, description: R.target.value }),
|
|
294
|
+
messages: t ? [{ text: c.rubricBuilderRatingNameRequired, type: "error" }] : [],
|
|
252
295
|
"data-testid": "rubric-builder-rating-name"
|
|
253
296
|
}
|
|
254
297
|
) }),
|
|
255
298
|
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, size: "14rem", children: /* @__PURE__ */ e(
|
|
256
|
-
|
|
299
|
+
F,
|
|
257
300
|
{
|
|
258
|
-
renderLabel:
|
|
301
|
+
renderLabel: c.rubricBuilderRatingDescriptionLabel,
|
|
259
302
|
value: r.longDescription,
|
|
260
|
-
onChange: (R) =>
|
|
303
|
+
onChange: (R) => l({ ...r, longDescription: R.target.value }),
|
|
261
304
|
"data-testid": "rubric-builder-rating-description"
|
|
262
305
|
}
|
|
263
306
|
) }),
|
|
264
|
-
|
|
307
|
+
g && /* @__PURE__ */ e(p, { as: "div", margin: "medium 0 0", children: /* @__PURE__ */ e(
|
|
265
308
|
Y,
|
|
266
309
|
{
|
|
267
|
-
screenReaderLabel:
|
|
310
|
+
screenReaderLabel: n("rubricBuilderRemoveRating", { position: s }),
|
|
268
311
|
withBackground: !1,
|
|
269
312
|
withBorder: !1,
|
|
270
|
-
onClick:
|
|
313
|
+
onClick: b,
|
|
271
314
|
"data-testid": "rubric-builder-remove-rating",
|
|
272
|
-
children: /* @__PURE__ */ e(
|
|
315
|
+
children: /* @__PURE__ */ e(Ie, {})
|
|
273
316
|
}
|
|
274
317
|
) })
|
|
275
318
|
] })
|
|
276
319
|
}
|
|
277
320
|
);
|
|
278
|
-
},
|
|
321
|
+
}, Ur = ({
|
|
279
322
|
ratings: r,
|
|
280
|
-
useRange:
|
|
281
|
-
hidePoints:
|
|
323
|
+
useRange: o,
|
|
324
|
+
hidePoints: s,
|
|
282
325
|
ratingOrder: i,
|
|
283
|
-
ratingNamesRequired:
|
|
284
|
-
onChange:
|
|
326
|
+
ratingNamesRequired: a,
|
|
327
|
+
onChange: d
|
|
285
328
|
}) => {
|
|
286
|
-
const { translations:
|
|
287
|
-
J(
|
|
288
|
-
J(
|
|
289
|
-
),
|
|
329
|
+
const { translations: t } = D(), g = fe(
|
|
330
|
+
J(Re, { activationConstraint: { distance: 8 } }),
|
|
331
|
+
J(ve, { coordinateGetter: Ce })
|
|
332
|
+
), l = r.map(Ye), u = i === "ascending", b = r.map((n, C) => u ? r.length - 1 - C : C);
|
|
290
333
|
return /* @__PURE__ */ m(p, { as: "div", children: [
|
|
291
|
-
/* @__PURE__ */ e(
|
|
292
|
-
if (!C ||
|
|
293
|
-
const
|
|
294
|
-
|
|
334
|
+
/* @__PURE__ */ e(Be, { sensors: g, onDragEnd: ({ active: n, over: C }) => {
|
|
335
|
+
if (!C || n.id === C.id) return;
|
|
336
|
+
const y = l.indexOf(String(n.id)), f = l.indexOf(String(C.id));
|
|
337
|
+
y === -1 || f === -1 || d(tr({ list: r, startIndex: y, endIndex: f }));
|
|
295
338
|
}, children: /* @__PURE__ */ e(
|
|
296
|
-
|
|
339
|
+
Se,
|
|
297
340
|
{
|
|
298
|
-
items:
|
|
299
|
-
strategy:
|
|
300
|
-
children:
|
|
301
|
-
|
|
341
|
+
items: b.map((n) => l[n]),
|
|
342
|
+
strategy: ye,
|
|
343
|
+
children: b.map((n, C) => /* @__PURE__ */ e(
|
|
344
|
+
Hr,
|
|
302
345
|
{
|
|
303
|
-
rating: r[
|
|
304
|
-
sortableId:
|
|
346
|
+
rating: r[n],
|
|
347
|
+
sortableId: l[n],
|
|
305
348
|
position: C + 1,
|
|
306
|
-
rangeStart:
|
|
307
|
-
useRange:
|
|
308
|
-
hidePoints:
|
|
309
|
-
showNameError:
|
|
349
|
+
rangeStart: Ze(r, n),
|
|
350
|
+
useRange: o,
|
|
351
|
+
hidePoints: s,
|
|
352
|
+
showNameError: a.includes(n),
|
|
310
353
|
canRemove: r.length > 1,
|
|
311
|
-
onChange: (
|
|
312
|
-
onPointsBlur: () =>
|
|
313
|
-
onRemove: () =>
|
|
354
|
+
onChange: (y) => d(rr(r, n, y)),
|
|
355
|
+
onPointsBlur: () => d(er(r)),
|
|
356
|
+
onRemove: () => d(Je(r, n))
|
|
314
357
|
},
|
|
315
|
-
|
|
358
|
+
l[n]
|
|
316
359
|
))
|
|
317
360
|
}
|
|
318
361
|
) }),
|
|
319
362
|
/* @__PURE__ */ e(
|
|
320
363
|
A,
|
|
321
364
|
{
|
|
322
|
-
renderIcon: /* @__PURE__ */ e(
|
|
365
|
+
renderIcon: /* @__PURE__ */ e(Le, {}),
|
|
323
366
|
withBackground: !1,
|
|
324
|
-
onClick: () =>
|
|
367
|
+
onClick: () => d(ir(r, u ? 0 : r.length)),
|
|
325
368
|
"data-testid": "rubric-builder-add-rating",
|
|
326
|
-
children:
|
|
369
|
+
children: t.rubricBuilderAddRatingLevel
|
|
327
370
|
}
|
|
328
371
|
)
|
|
329
372
|
] });
|
|
330
|
-
},
|
|
373
|
+
}, _r = ({
|
|
331
374
|
criterion: r,
|
|
332
|
-
sortableId:
|
|
333
|
-
position:
|
|
375
|
+
sortableId: o,
|
|
376
|
+
position: s,
|
|
334
377
|
hidePoints: i,
|
|
335
|
-
freeFormCriterionComments:
|
|
336
|
-
ratingOrder:
|
|
337
|
-
errors:
|
|
338
|
-
showErrors:
|
|
339
|
-
shouldFocusName:
|
|
340
|
-
shouldFocusHandle:
|
|
341
|
-
onNameFocused:
|
|
342
|
-
onHandleFocused:
|
|
343
|
-
onChange:
|
|
378
|
+
freeFormCriterionComments: a,
|
|
379
|
+
ratingOrder: d,
|
|
380
|
+
errors: t,
|
|
381
|
+
showErrors: g,
|
|
382
|
+
shouldFocusName: l,
|
|
383
|
+
shouldFocusHandle: u,
|
|
384
|
+
onNameFocused: b,
|
|
385
|
+
onHandleFocused: c,
|
|
386
|
+
onChange: n,
|
|
344
387
|
onDuplicate: C,
|
|
345
|
-
onDelete:
|
|
388
|
+
onDelete: y
|
|
346
389
|
}) => {
|
|
347
|
-
const { translations: f, translate: I } =
|
|
348
|
-
id:
|
|
349
|
-
}), [
|
|
390
|
+
const { translations: f, translate: I } = D(), { rubricCriterionRange: P } = _e(), { attributes: E, listeners: S, setNodeRef: B, transform: R, transition: T, isDragging: O } = he({
|
|
391
|
+
id: o
|
|
392
|
+
}), [x, q] = w(!r.description.trim()), [ee, _] = w(!1), N = ae(null), z = ae(null), W = g && nr(t), G = I("rubricBuilderCriterionHeading", { position: s }), H = r.description.trim(), M = H || G, j = `rubric-builder-criterion-body-${o}`;
|
|
350
393
|
return $(() => {
|
|
351
|
-
|
|
352
|
-
}, [
|
|
394
|
+
W && q(!0);
|
|
395
|
+
}, [W]), $(() => {
|
|
353
396
|
var h;
|
|
354
|
-
|
|
355
|
-
}, [
|
|
397
|
+
l && x && ((h = N.current) == null || h.focus(), b());
|
|
398
|
+
}, [l, x, b]), $(() => {
|
|
356
399
|
var h;
|
|
357
|
-
|
|
358
|
-
}, [
|
|
400
|
+
u && ((h = z.current) == null || h.focus(), c());
|
|
401
|
+
}, [u, c]), /* @__PURE__ */ m(
|
|
359
402
|
"div",
|
|
360
403
|
{
|
|
361
404
|
ref: B,
|
|
362
|
-
style: { transform:
|
|
405
|
+
style: { transform: pe.Transform.toString(R), transition: T },
|
|
363
406
|
"data-testid": "rubric-builder-criterion-card",
|
|
364
407
|
children: [
|
|
365
408
|
/* @__PURE__ */ m(
|
|
366
409
|
p,
|
|
367
410
|
{
|
|
368
411
|
as: "section",
|
|
369
|
-
"aria-label":
|
|
412
|
+
"aria-label": M,
|
|
370
413
|
borderWidth: "small",
|
|
371
414
|
borderRadius: "medium",
|
|
372
415
|
padding: "small medium",
|
|
373
416
|
margin: "0 0 small",
|
|
374
417
|
background: "primary",
|
|
375
|
-
shadow:
|
|
418
|
+
shadow: O ? "above" : "none",
|
|
376
419
|
children: [
|
|
377
420
|
/* @__PURE__ */ m(v, { gap: "small", alignItems: "center", wrap: "wrap", children: [
|
|
378
421
|
/* @__PURE__ */ e(
|
|
379
422
|
"div",
|
|
380
423
|
{
|
|
381
|
-
ref:
|
|
382
|
-
"aria-label": I("rubricBuilderReorderCriterion", { name:
|
|
424
|
+
ref: z,
|
|
425
|
+
"aria-label": I("rubricBuilderReorderCriterion", { name: M }),
|
|
383
426
|
"data-testid": "rubric-builder-criterion-drag-handle",
|
|
384
|
-
...
|
|
427
|
+
...E,
|
|
385
428
|
...S,
|
|
386
|
-
children: /* @__PURE__ */ e(
|
|
429
|
+
children: /* @__PURE__ */ e(De, { "aria-hidden": "true" })
|
|
387
430
|
}
|
|
388
431
|
),
|
|
389
432
|
/* @__PURE__ */ e(
|
|
390
433
|
Y,
|
|
391
434
|
{
|
|
392
435
|
screenReaderLabel: I(
|
|
393
|
-
|
|
394
|
-
{ name:
|
|
436
|
+
x ? "rubricBuilderCollapseCriterion" : "rubricBuilderExpandCriterion",
|
|
437
|
+
{ name: M }
|
|
395
438
|
),
|
|
396
|
-
"aria-expanded":
|
|
397
|
-
"aria-controls":
|
|
439
|
+
"aria-expanded": x,
|
|
440
|
+
"aria-controls": j,
|
|
398
441
|
withBackground: !1,
|
|
399
442
|
withBorder: !1,
|
|
400
443
|
size: "small",
|
|
401
|
-
onClick: () =>
|
|
444
|
+
onClick: () => q((h) => !h),
|
|
402
445
|
"data-testid": "rubric-builder-criterion-toggle",
|
|
403
|
-
children:
|
|
446
|
+
children: x ? /* @__PURE__ */ e(fr, {}) : /* @__PURE__ */ e(Cr, {})
|
|
404
447
|
}
|
|
405
448
|
),
|
|
406
|
-
|
|
407
|
-
|
|
449
|
+
a && /* @__PURE__ */ e(
|
|
450
|
+
vr,
|
|
408
451
|
{
|
|
409
452
|
title: f.rubricBuilderWrittenFeedback,
|
|
410
453
|
"data-testid": "rubric-builder-criterion-written-icon"
|
|
411
454
|
}
|
|
412
455
|
),
|
|
413
|
-
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ m(
|
|
414
|
-
|
|
415
|
-
|
|
456
|
+
/* @__PURE__ */ e(v.Item, { shouldGrow: !0, shouldShrink: !0, children: /* @__PURE__ */ m(U, { level: "h4", children: [
|
|
457
|
+
G,
|
|
458
|
+
H && /* @__PURE__ */ e(k, { weight: "normal", "data-testid": "rubric-builder-criterion-name", children: `: ${H}` })
|
|
416
459
|
] }) }),
|
|
417
|
-
!i && /* @__PURE__ */ e(
|
|
460
|
+
!i && /* @__PURE__ */ e(we, { "data-testid": "rubric-builder-criterion-max", children: I("rubricBuilderCriterionMaxPoints", { count: r.points }) }),
|
|
418
461
|
/* @__PURE__ */ e(
|
|
419
462
|
Y,
|
|
420
463
|
{
|
|
421
|
-
screenReaderLabel: I("rubricBuilderDuplicateCriterion", { name:
|
|
464
|
+
screenReaderLabel: I("rubricBuilderDuplicateCriterion", { name: M }),
|
|
422
465
|
withBackground: !1,
|
|
423
466
|
withBorder: !1,
|
|
424
467
|
onClick: C,
|
|
425
468
|
"data-testid": "rubric-builder-duplicate-criterion",
|
|
426
|
-
children: /* @__PURE__ */ e(
|
|
469
|
+
children: /* @__PURE__ */ e(Rr, {})
|
|
427
470
|
}
|
|
428
471
|
),
|
|
429
472
|
/* @__PURE__ */ e(
|
|
430
473
|
Y,
|
|
431
474
|
{
|
|
432
|
-
screenReaderLabel: I("rubricBuilderDeleteCriterion", { name:
|
|
475
|
+
screenReaderLabel: I("rubricBuilderDeleteCriterion", { name: M }),
|
|
433
476
|
withBackground: !1,
|
|
434
477
|
withBorder: !1,
|
|
435
|
-
onClick: () =>
|
|
478
|
+
onClick: () => _(!0),
|
|
436
479
|
"data-testid": "rubric-builder-delete-criterion",
|
|
437
|
-
children: /* @__PURE__ */ e(
|
|
480
|
+
children: /* @__PURE__ */ e(Ie, {})
|
|
438
481
|
}
|
|
439
482
|
)
|
|
440
483
|
] }),
|
|
441
|
-
|
|
484
|
+
x && /* @__PURE__ */ e(p, { as: "div", id: j, margin: "medium 0 0", children: /* @__PURE__ */ m(v, { direction: "column", gap: "medium", children: [
|
|
442
485
|
/* @__PURE__ */ e(
|
|
443
|
-
|
|
486
|
+
F,
|
|
444
487
|
{
|
|
445
488
|
renderLabel: f.rubricBuilderCriterionNameLabel,
|
|
446
489
|
isRequired: !0,
|
|
447
490
|
value: r.description,
|
|
448
491
|
inputRef: (h) => {
|
|
449
|
-
|
|
492
|
+
N.current = h;
|
|
450
493
|
},
|
|
451
|
-
onChange: (h) =>
|
|
452
|
-
messages:
|
|
494
|
+
onChange: (h) => n({ ...r, description: h.target.value }),
|
|
495
|
+
messages: g && t.nameRequired ? [{ text: f.rubricBuilderCriterionNameRequired, type: "error" }] : [],
|
|
453
496
|
"data-testid": "rubric-builder-criterion-name-input"
|
|
454
497
|
}
|
|
455
498
|
),
|
|
456
499
|
/* @__PURE__ */ e(
|
|
457
|
-
|
|
500
|
+
Dr,
|
|
458
501
|
{
|
|
459
502
|
label: f.rubricBuilderCriterionDescriptionLabel,
|
|
460
503
|
value: r.longDescription ?? "",
|
|
461
|
-
onChange: (h) =>
|
|
504
|
+
onChange: (h) => n({ ...r, longDescription: h.target.value }),
|
|
462
505
|
"data-testid": "rubric-builder-criterion-description"
|
|
463
506
|
}
|
|
464
507
|
),
|
|
465
|
-
|
|
466
|
-
|
|
508
|
+
P && !i && !a && /* @__PURE__ */ e(
|
|
509
|
+
yr,
|
|
467
510
|
{
|
|
468
511
|
variant: "toggle",
|
|
469
512
|
label: f.rubricBuilderEnableRange,
|
|
470
513
|
checked: r.criterionUseRange,
|
|
471
|
-
onChange: (h) =>
|
|
514
|
+
onChange: (h) => n({ ...r, criterionUseRange: h.target.checked }),
|
|
472
515
|
"data-testid": "rubric-builder-enable-range"
|
|
473
516
|
}
|
|
474
517
|
),
|
|
475
|
-
|
|
476
|
-
|
|
518
|
+
a ? !i && /* @__PURE__ */ e(
|
|
519
|
+
Nr,
|
|
477
520
|
{
|
|
478
521
|
points: r.points,
|
|
479
|
-
onCommit: (h) =>
|
|
480
|
-
|
|
522
|
+
onCommit: (h) => n(
|
|
523
|
+
ue(
|
|
481
524
|
r,
|
|
482
|
-
|
|
525
|
+
ar(r.ratings, h)
|
|
483
526
|
)
|
|
484
527
|
)
|
|
485
528
|
}
|
|
486
529
|
) : /* @__PURE__ */ e(
|
|
487
|
-
|
|
530
|
+
Ur,
|
|
488
531
|
{
|
|
489
532
|
ratings: r.ratings,
|
|
490
533
|
useRange: r.criterionUseRange && !i,
|
|
491
534
|
hidePoints: i,
|
|
492
|
-
ratingOrder:
|
|
493
|
-
ratingNamesRequired:
|
|
494
|
-
onChange: (h) =>
|
|
535
|
+
ratingOrder: d,
|
|
536
|
+
ratingNamesRequired: g ? t.ratingNamesRequired : [],
|
|
537
|
+
onChange: (h) => n(ue(r, h))
|
|
495
538
|
}
|
|
496
539
|
)
|
|
497
540
|
] }) })
|
|
@@ -507,117 +550,117 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
507
550
|
confirmLabel: f.delete,
|
|
508
551
|
cancelLabel: f.cancel,
|
|
509
552
|
onConfirm: () => {
|
|
510
|
-
|
|
553
|
+
_(!1), y();
|
|
511
554
|
},
|
|
512
|
-
onDismiss: () =>
|
|
555
|
+
onDismiss: () => _(!1),
|
|
513
556
|
"data-testid": "rubric-builder-delete-criterion-modal"
|
|
514
557
|
}
|
|
515
558
|
)
|
|
516
559
|
]
|
|
517
560
|
}
|
|
518
561
|
);
|
|
519
|
-
},
|
|
562
|
+
}, Gr = ({
|
|
520
563
|
criteria: r,
|
|
521
|
-
hidePoints:
|
|
522
|
-
freeFormCriterionComments:
|
|
564
|
+
hidePoints: o,
|
|
565
|
+
freeFormCriterionComments: s,
|
|
523
566
|
ratingOrder: i,
|
|
524
|
-
criteriaValidationErrors:
|
|
525
|
-
showErrors:
|
|
526
|
-
focusNameCriterionId:
|
|
527
|
-
onFocusedName:
|
|
528
|
-
onChangeCriterion:
|
|
529
|
-
onDuplicateCriterion:
|
|
530
|
-
onDeleteCriterion:
|
|
531
|
-
onReorderCriteria:
|
|
567
|
+
criteriaValidationErrors: a,
|
|
568
|
+
showErrors: d,
|
|
569
|
+
focusNameCriterionId: t,
|
|
570
|
+
onFocusedName: g,
|
|
571
|
+
onChangeCriterion: l,
|
|
572
|
+
onDuplicateCriterion: u,
|
|
573
|
+
onDeleteCriterion: b,
|
|
574
|
+
onReorderCriteria: c
|
|
532
575
|
}) => {
|
|
533
576
|
const {
|
|
534
|
-
sortableIds:
|
|
577
|
+
sortableIds: n,
|
|
535
578
|
movedCriterionId: C,
|
|
536
|
-
clearMovedCriterion:
|
|
579
|
+
clearMovedCriterion: y,
|
|
537
580
|
srAnnouncement: f,
|
|
538
581
|
moveCriterionBySortableId: I
|
|
539
|
-
} =
|
|
540
|
-
J(
|
|
541
|
-
J(
|
|
582
|
+
} = or({ criteria: r, onReorderCriteria: c }), P = fe(
|
|
583
|
+
J(Re, { activationConstraint: { distance: 8 } }),
|
|
584
|
+
J(ve, { coordinateGetter: Ce })
|
|
542
585
|
);
|
|
543
586
|
return /* @__PURE__ */ m(ze, { children: [
|
|
544
|
-
/* @__PURE__ */ e(
|
|
545
|
-
/* @__PURE__ */ e(
|
|
587
|
+
/* @__PURE__ */ e(Sr, { children: /* @__PURE__ */ e("div", { "aria-live": "polite", "aria-atomic": "true", children: f }) }),
|
|
588
|
+
/* @__PURE__ */ e(Be, { sensors: P, onDragEnd: ({ active: S, over: B }) => {
|
|
546
589
|
B && I(S.id, B.id);
|
|
547
|
-
}, children: /* @__PURE__ */ e(
|
|
548
|
-
|
|
590
|
+
}, children: /* @__PURE__ */ e(Se, { items: n, strategy: ye, children: r.map((S, B) => /* @__PURE__ */ e(
|
|
591
|
+
_r,
|
|
549
592
|
{
|
|
550
593
|
criterion: S,
|
|
551
|
-
sortableId:
|
|
594
|
+
sortableId: n[B],
|
|
552
595
|
position: B + 1,
|
|
553
|
-
hidePoints:
|
|
554
|
-
freeFormCriterionComments:
|
|
596
|
+
hidePoints: o,
|
|
597
|
+
freeFormCriterionComments: s,
|
|
555
598
|
ratingOrder: i,
|
|
556
|
-
errors:
|
|
557
|
-
showErrors:
|
|
558
|
-
shouldFocusName: S.id ===
|
|
599
|
+
errors: a[B],
|
|
600
|
+
showErrors: d,
|
|
601
|
+
shouldFocusName: S.id === t,
|
|
559
602
|
shouldFocusHandle: S.id === C,
|
|
560
|
-
onNameFocused:
|
|
561
|
-
onHandleFocused:
|
|
562
|
-
onChange:
|
|
563
|
-
onDuplicate: () =>
|
|
564
|
-
onDelete: () =>
|
|
603
|
+
onNameFocused: g,
|
|
604
|
+
onHandleFocused: y,
|
|
605
|
+
onChange: l,
|
|
606
|
+
onDuplicate: () => u(S),
|
|
607
|
+
onDelete: () => b(S)
|
|
565
608
|
},
|
|
566
|
-
|
|
609
|
+
n[B]
|
|
567
610
|
)) }) })
|
|
568
611
|
] });
|
|
569
|
-
},
|
|
612
|
+
}, $r = ({
|
|
570
613
|
isOpen: r,
|
|
571
|
-
assignmentPoints:
|
|
572
|
-
rubricPoints:
|
|
614
|
+
assignmentPoints: o,
|
|
615
|
+
rubricPoints: s,
|
|
573
616
|
onChange: i,
|
|
574
|
-
onLeaveDifferent:
|
|
575
|
-
onDismiss:
|
|
617
|
+
onLeaveDifferent: a,
|
|
618
|
+
onDismiss: d
|
|
576
619
|
}) => {
|
|
577
|
-
const { translations:
|
|
620
|
+
const { translations: t, translate: g } = D(), { locale: l } = ge(), u = sr(s, o, l), b = u === null ? g("pointsDifferenceModalBodyZeroAssignmentPoints", { rubricPoints: s }) : g("pointsDifferenceModalBody", { assignmentPoints: o, rubricPoints: s, pointRatio: u });
|
|
578
621
|
return /* @__PURE__ */ m(
|
|
579
622
|
V,
|
|
580
623
|
{
|
|
581
624
|
open: r,
|
|
582
|
-
onDismiss:
|
|
625
|
+
onDismiss: d,
|
|
583
626
|
size: "small",
|
|
584
|
-
label:
|
|
627
|
+
label: t.pointsDifferenceModalLabel,
|
|
585
628
|
"data-testid": "rubric-builder-points-difference-modal",
|
|
586
629
|
children: [
|
|
587
630
|
/* @__PURE__ */ m(V.Header, { children: [
|
|
588
631
|
/* @__PURE__ */ e(
|
|
589
|
-
|
|
632
|
+
Lr,
|
|
590
633
|
{
|
|
591
634
|
placement: "end",
|
|
592
635
|
offset: "small",
|
|
593
|
-
onClick:
|
|
594
|
-
screenReaderLabel:
|
|
636
|
+
onClick: d,
|
|
637
|
+
screenReaderLabel: t.close
|
|
595
638
|
}
|
|
596
639
|
),
|
|
597
|
-
/* @__PURE__ */ e(
|
|
640
|
+
/* @__PURE__ */ e(wr, { level: "h2", children: t.confirmToContinueHeader })
|
|
598
641
|
] }),
|
|
599
|
-
/* @__PURE__ */ e(V.Body, { children: /* @__PURE__ */ e(
|
|
642
|
+
/* @__PURE__ */ e(V.Body, { children: /* @__PURE__ */ e(kr, { children: b }) }),
|
|
600
643
|
/* @__PURE__ */ m(V.Footer, { children: [
|
|
601
644
|
/* @__PURE__ */ e(
|
|
602
|
-
|
|
645
|
+
me,
|
|
603
646
|
{
|
|
604
|
-
onClick:
|
|
647
|
+
onClick: a,
|
|
605
648
|
margin: "0 x-small 0 0",
|
|
606
649
|
"data-testid": "rubric-builder-leave-points-different",
|
|
607
|
-
children:
|
|
650
|
+
children: t.pointsDifferenceModalLeaveDifferent
|
|
608
651
|
}
|
|
609
652
|
),
|
|
610
|
-
/* @__PURE__ */ e(
|
|
653
|
+
/* @__PURE__ */ e(me, { color: "primary", onClick: i, "data-testid": "rubric-builder-change-points", children: t.pointsDifferenceModalChange })
|
|
611
654
|
] })
|
|
612
655
|
]
|
|
613
656
|
}
|
|
614
657
|
);
|
|
615
|
-
},
|
|
658
|
+
}, Fr = ({
|
|
616
659
|
savePending: r,
|
|
617
|
-
onDiscard:
|
|
618
|
-
onSave:
|
|
660
|
+
onDiscard: o,
|
|
661
|
+
onSave: s
|
|
619
662
|
}) => {
|
|
620
|
-
const { translations: i } =
|
|
663
|
+
const { translations: i } = D();
|
|
621
664
|
return /* @__PURE__ */ e(
|
|
622
665
|
p,
|
|
623
666
|
{
|
|
@@ -629,12 +672,12 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
629
672
|
padding: "small 0",
|
|
630
673
|
stacking: "above",
|
|
631
674
|
children: /* @__PURE__ */ m(v, { justifyItems: "end", gap: "small", wrap: "wrap", children: [
|
|
632
|
-
/* @__PURE__ */ e(A, { onClick:
|
|
675
|
+
/* @__PURE__ */ e(A, { onClick: o, "data-testid": "rubric-builder-discard", children: i.rubricBuilderDiscard }),
|
|
633
676
|
/* @__PURE__ */ e(
|
|
634
677
|
A,
|
|
635
678
|
{
|
|
636
679
|
color: "primary",
|
|
637
|
-
onClick:
|
|
680
|
+
onClick: s,
|
|
638
681
|
interaction: r ? "disabled" : "enabled",
|
|
639
682
|
"data-testid": "rubric-builder-save",
|
|
640
683
|
children: i.rubricBuilderSave
|
|
@@ -643,40 +686,41 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
643
686
|
] })
|
|
644
687
|
}
|
|
645
688
|
);
|
|
646
|
-
},
|
|
689
|
+
}, qr = ({
|
|
647
690
|
isNewRubric: r,
|
|
648
|
-
pointsPossible:
|
|
649
|
-
hidePoints:
|
|
691
|
+
pointsPossible: o,
|
|
692
|
+
hidePoints: s
|
|
650
693
|
}) => {
|
|
651
|
-
const { translations: i, translate:
|
|
694
|
+
const { translations: i, translate: a } = D();
|
|
652
695
|
return /* @__PURE__ */ m(v, { as: "header", justifyItems: "space-between", alignItems: "center", wrap: "wrap", gap: "small", children: [
|
|
653
|
-
/* @__PURE__ */ e(
|
|
654
|
-
!
|
|
696
|
+
/* @__PURE__ */ e(U, { level: "h2", children: r ? i.rubricBuilderCreateTitle : i.rubricBuilderEditTitle }),
|
|
697
|
+
!s && /* @__PURE__ */ e(we, { "data-testid": "rubric-builder-current-total", children: a("rubricBuilderCurrentTotal", { count: o }) })
|
|
655
698
|
] });
|
|
656
|
-
}, X = ({ name: r, label:
|
|
657
|
-
|
|
699
|
+
}, X = ({ name: r, label: o, value: s, options: i, onChange: a }) => /* @__PURE__ */ e(
|
|
700
|
+
Tr,
|
|
658
701
|
{
|
|
659
702
|
name: r,
|
|
660
|
-
description:
|
|
703
|
+
description: o,
|
|
661
704
|
variant: "toggle",
|
|
662
705
|
layout: "columns",
|
|
663
|
-
value:
|
|
664
|
-
onChange: (
|
|
665
|
-
children: i.map((
|
|
706
|
+
value: s,
|
|
707
|
+
onChange: (d, t) => a(t),
|
|
708
|
+
children: i.map((d) => /* @__PURE__ */ e(xr, { value: d.value, label: d.label }, d.value))
|
|
666
709
|
}
|
|
667
|
-
),
|
|
710
|
+
), zr = ({
|
|
668
711
|
rubricForm: r,
|
|
669
|
-
setRubricFormField:
|
|
670
|
-
validateTitle:
|
|
712
|
+
setRubricFormField: o,
|
|
713
|
+
validateTitle: s,
|
|
671
714
|
titleError: i,
|
|
672
|
-
titleInputRef:
|
|
715
|
+
titleInputRef: a,
|
|
716
|
+
assignmentSettings: d
|
|
673
717
|
}) => {
|
|
674
|
-
const { translations: t } =
|
|
675
|
-
if (
|
|
676
|
-
const { hidePoints:
|
|
718
|
+
const { translations: t } = D(), g = (l) => {
|
|
719
|
+
if (l === "unscored" === r.hidePoints) return;
|
|
720
|
+
const { hidePoints: u, hideScoreTotal: b, useForGrading: c, buttonDisplay: n } = lr(
|
|
677
721
|
r.hidePoints
|
|
678
722
|
);
|
|
679
|
-
|
|
723
|
+
o("hidePoints", u), o("hideScoreTotal", b), o("useForGrading", c), n && o("buttonDisplay", n);
|
|
680
724
|
};
|
|
681
725
|
return /* @__PURE__ */ m(
|
|
682
726
|
p,
|
|
@@ -687,18 +731,18 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
687
731
|
borderRadius: "medium",
|
|
688
732
|
padding: "medium",
|
|
689
733
|
children: [
|
|
690
|
-
/* @__PURE__ */ e(
|
|
734
|
+
/* @__PURE__ */ e(U, { level: "h3", id: "rubric-builder-details-heading", margin: "0 0 medium", children: t.rubricBuilderDetailsHeading }),
|
|
691
735
|
/* @__PURE__ */ m(v, { direction: "column", gap: "medium", children: [
|
|
692
736
|
/* @__PURE__ */ e(
|
|
693
|
-
|
|
737
|
+
F,
|
|
694
738
|
{
|
|
695
739
|
"data-testid": "rubric-builder-name",
|
|
696
740
|
renderLabel: t.rubricBuilderNameLabel,
|
|
697
741
|
isRequired: !0,
|
|
698
742
|
value: r.title,
|
|
699
|
-
inputRef:
|
|
700
|
-
onChange: (
|
|
701
|
-
onBlur: (
|
|
743
|
+
inputRef: a,
|
|
744
|
+
onChange: (l) => o("title", l.target.value),
|
|
745
|
+
onBlur: (l) => s(l.target.value),
|
|
702
746
|
messages: i ? [{ text: i, type: "error" }] : []
|
|
703
747
|
}
|
|
704
748
|
),
|
|
@@ -713,7 +757,7 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
713
757
|
{ value: "scored", label: t.scoringTypeScored },
|
|
714
758
|
{ value: "unscored", label: t.scoringTypeUnscored }
|
|
715
759
|
],
|
|
716
|
-
onChange:
|
|
760
|
+
onChange: g
|
|
717
761
|
}
|
|
718
762
|
),
|
|
719
763
|
!r.hidePoints && !r.freeFormCriterionComments && /* @__PURE__ */ e(
|
|
@@ -726,7 +770,7 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
726
770
|
{ value: "points", label: t.ratingDisplayPoints },
|
|
727
771
|
{ value: "numeric", label: t.ratingDisplayLevel }
|
|
728
772
|
],
|
|
729
|
-
onChange: (
|
|
773
|
+
onChange: (l) => o("buttonDisplay", l)
|
|
730
774
|
}
|
|
731
775
|
),
|
|
732
776
|
/* @__PURE__ */ e(
|
|
@@ -739,7 +783,7 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
739
783
|
{ value: "scale", label: t.gradingTypeScale },
|
|
740
784
|
{ value: "freeForm", label: t.rubricBuilderFeedbackWrittenOnly }
|
|
741
785
|
],
|
|
742
|
-
onChange: (
|
|
786
|
+
onChange: (l) => o("freeFormCriterionComments", l === "freeForm")
|
|
743
787
|
}
|
|
744
788
|
),
|
|
745
789
|
!r.freeFormCriterionComments && /* @__PURE__ */ e(
|
|
@@ -752,82 +796,84 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
752
796
|
{ value: "ascending", label: t.rubricBuilderRatingOrderLowToHigh },
|
|
753
797
|
{ value: "descending", label: t.rubricBuilderRatingOrderHighToLow }
|
|
754
798
|
],
|
|
755
|
-
onChange: (
|
|
799
|
+
onChange: (l) => o("ratingOrder", l)
|
|
756
800
|
}
|
|
757
801
|
)
|
|
758
|
-
] })
|
|
802
|
+
] }),
|
|
803
|
+
d
|
|
759
804
|
] })
|
|
760
805
|
]
|
|
761
806
|
}
|
|
762
807
|
);
|
|
763
|
-
},
|
|
764
|
-
|
|
808
|
+
}, Ii = (r) => /* @__PURE__ */ e(be, { translations: r.translations, children: /* @__PURE__ */ e(
|
|
809
|
+
Ge,
|
|
765
810
|
{
|
|
766
811
|
courseId: r.courseId,
|
|
767
812
|
accountId: r.accountId,
|
|
768
813
|
featureFlags: r.featureFlags,
|
|
769
814
|
aiLimits: r.aiLimits,
|
|
770
|
-
children: /* @__PURE__ */ e(
|
|
815
|
+
children: /* @__PURE__ */ e(Wr, { ...r })
|
|
771
816
|
}
|
|
772
|
-
) }),
|
|
817
|
+
) }), Wr = ({
|
|
773
818
|
rubricId: r,
|
|
774
|
-
rubric:
|
|
775
|
-
rubricAssociation:
|
|
819
|
+
rubric: o,
|
|
820
|
+
rubricAssociation: s,
|
|
776
821
|
assignmentId: i,
|
|
777
|
-
assignmentPointsPossible:
|
|
822
|
+
assignmentPointsPossible: a,
|
|
823
|
+
canUseForGrading: d = !0,
|
|
778
824
|
accountId: t,
|
|
779
|
-
courseId:
|
|
780
|
-
canManageRubrics:
|
|
781
|
-
onSaveRubric:
|
|
782
|
-
onDiscard:
|
|
825
|
+
courseId: g,
|
|
826
|
+
canManageRubrics: l,
|
|
827
|
+
onSaveRubric: u,
|
|
828
|
+
onDiscard: b
|
|
783
829
|
}) => {
|
|
784
|
-
var
|
|
785
|
-
const { translations:
|
|
786
|
-
rubricForm:
|
|
787
|
-
setRubricFormField:
|
|
788
|
-
validateField:
|
|
789
|
-
validationErrors:
|
|
790
|
-
isNewRubric:
|
|
791
|
-
load: { data:
|
|
792
|
-
savePending:
|
|
793
|
-
saveError:
|
|
794
|
-
save:
|
|
795
|
-
saveAction:
|
|
796
|
-
isDirty:
|
|
797
|
-
criteriaValid:
|
|
798
|
-
criteriaValidationErrors:
|
|
799
|
-
saveCriterion:
|
|
800
|
-
deleteCriterion:
|
|
801
|
-
reorderCriteria:
|
|
802
|
-
} =
|
|
830
|
+
var se;
|
|
831
|
+
const { translations: c } = D(), {
|
|
832
|
+
rubricForm: n,
|
|
833
|
+
setRubricFormField: C,
|
|
834
|
+
validateField: y,
|
|
835
|
+
validationErrors: f,
|
|
836
|
+
isNewRubric: I,
|
|
837
|
+
load: { data: P, isLoading: E, isError: S, isSuccess: B },
|
|
838
|
+
savePending: R,
|
|
839
|
+
saveError: T,
|
|
840
|
+
save: O,
|
|
841
|
+
saveAction: x,
|
|
842
|
+
isDirty: q,
|
|
843
|
+
criteriaValid: ee,
|
|
844
|
+
criteriaValidationErrors: _,
|
|
845
|
+
saveCriterion: N,
|
|
846
|
+
deleteCriterion: z,
|
|
847
|
+
reorderCriteria: W
|
|
848
|
+
} = dr({
|
|
803
849
|
rubricId: r,
|
|
804
|
-
rubric:
|
|
805
|
-
rubricAssociation:
|
|
850
|
+
rubric: o,
|
|
851
|
+
rubricAssociation: s,
|
|
806
852
|
assignmentId: i,
|
|
807
|
-
assignmentPointsPossible:
|
|
853
|
+
assignmentPointsPossible: a,
|
|
808
854
|
accountId: t,
|
|
809
|
-
courseId:
|
|
810
|
-
canManageRubrics:
|
|
811
|
-
onSaveRubric:
|
|
812
|
-
}),
|
|
855
|
+
courseId: g,
|
|
856
|
+
canManageRubrics: l,
|
|
857
|
+
onSaveRubric: u
|
|
858
|
+
}), G = ae(null), [H, M] = w(!1), [j, h] = w(!1), [ke, re] = w(!1), [Te, ie] = w(!1), [xe, K] = w(!1), [Pe, oe] = w(), Ee = cr(), Oe = qe(() => oe(void 0), []);
|
|
813
859
|
if (r && E)
|
|
814
|
-
return /* @__PURE__ */ e(
|
|
815
|
-
if (r &&
|
|
816
|
-
return
|
|
817
|
-
errorImageUrl:
|
|
818
|
-
errorCategory:
|
|
819
|
-
translations: le(
|
|
860
|
+
return /* @__PURE__ */ e(hr, {});
|
|
861
|
+
if (r && S)
|
|
862
|
+
return $e({
|
|
863
|
+
errorImageUrl: ur,
|
|
864
|
+
errorCategory: c.rubricErrorPageCategory,
|
|
865
|
+
translations: le(c)
|
|
820
866
|
});
|
|
821
|
-
if (r &&
|
|
822
|
-
return
|
|
823
|
-
const
|
|
824
|
-
var
|
|
825
|
-
if (
|
|
826
|
-
(
|
|
867
|
+
if (r && B && !P)
|
|
868
|
+
return Fe({ translations: le(c) });
|
|
869
|
+
const Me = () => {
|
|
870
|
+
var L;
|
|
871
|
+
if (M(!0), !y("title", n.title)) {
|
|
872
|
+
(L = G.current) == null || L.focus();
|
|
827
873
|
return;
|
|
828
874
|
}
|
|
829
|
-
if (!(
|
|
830
|
-
switch (
|
|
875
|
+
if (!(n.criteria.length === 0 || !ee))
|
|
876
|
+
switch (x) {
|
|
831
877
|
case "confirmPointsDifference":
|
|
832
878
|
K(!0);
|
|
833
879
|
break;
|
|
@@ -838,107 +884,115 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
838
884
|
re(!0);
|
|
839
885
|
break;
|
|
840
886
|
case "save":
|
|
841
|
-
|
|
887
|
+
O();
|
|
842
888
|
break;
|
|
843
889
|
default: {
|
|
844
|
-
const
|
|
845
|
-
throw new Error(`Unhandled save action: ${
|
|
890
|
+
const He = x;
|
|
891
|
+
throw new Error(`Unhandled save action: ${He}`);
|
|
846
892
|
}
|
|
847
893
|
}
|
|
848
|
-
},
|
|
849
|
-
const
|
|
850
|
-
|
|
851
|
-
},
|
|
852
|
-
|
|
894
|
+
}, Ae = () => {
|
|
895
|
+
const L = br(Ee());
|
|
896
|
+
N(L), oe(L.id);
|
|
897
|
+
}, Ne = () => {
|
|
898
|
+
q ? h(!0) : b();
|
|
853
899
|
};
|
|
854
900
|
return /* @__PURE__ */ m(p, { as: "div", "data-testid": "rubric-builder", children: [
|
|
855
901
|
/* @__PURE__ */ m(v, { direction: "column", gap: "medium", padding: "medium 0", children: [
|
|
856
902
|
/* @__PURE__ */ e(
|
|
857
|
-
|
|
903
|
+
qr,
|
|
858
904
|
{
|
|
859
|
-
isNewRubric:
|
|
860
|
-
pointsPossible:
|
|
861
|
-
hidePoints:
|
|
905
|
+
isNewRubric: I,
|
|
906
|
+
pointsPossible: n.pointsPossible,
|
|
907
|
+
hidePoints: n.hidePoints
|
|
862
908
|
}
|
|
863
909
|
),
|
|
864
|
-
|
|
910
|
+
T && /* @__PURE__ */ e(pr, { variant: "error", margin: "0", children: c.rubricFormSaveError }),
|
|
865
911
|
/* @__PURE__ */ e(
|
|
866
|
-
|
|
912
|
+
zr,
|
|
867
913
|
{
|
|
868
|
-
rubricForm:
|
|
869
|
-
setRubricFormField:
|
|
870
|
-
validateTitle: (
|
|
871
|
-
titleError: (
|
|
872
|
-
titleInputRef: (
|
|
873
|
-
|
|
874
|
-
}
|
|
914
|
+
rubricForm: n,
|
|
915
|
+
setRubricFormField: C,
|
|
916
|
+
validateTitle: (L) => y("title", L),
|
|
917
|
+
titleError: (se = f.title) == null ? void 0 : se.message,
|
|
918
|
+
titleInputRef: (L) => {
|
|
919
|
+
G.current = L;
|
|
920
|
+
},
|
|
921
|
+
assignmentSettings: /* @__PURE__ */ e(
|
|
922
|
+
Mr,
|
|
923
|
+
{
|
|
924
|
+
rubricForm: n,
|
|
925
|
+
canUseForGrading: d,
|
|
926
|
+
setRubricFormField: C
|
|
927
|
+
}
|
|
928
|
+
)
|
|
875
929
|
}
|
|
876
930
|
),
|
|
877
931
|
/* @__PURE__ */ e(
|
|
878
|
-
|
|
932
|
+
Ar,
|
|
879
933
|
{
|
|
880
|
-
criteriaCount:
|
|
881
|
-
showMissingCriteriaError:
|
|
934
|
+
criteriaCount: n.criteria.length,
|
|
935
|
+
showMissingCriteriaError: H,
|
|
882
936
|
actions: /* @__PURE__ */ e(
|
|
883
937
|
A,
|
|
884
938
|
{
|
|
885
|
-
renderIcon: /* @__PURE__ */ e(
|
|
886
|
-
onClick:
|
|
939
|
+
renderIcon: /* @__PURE__ */ e(Le, {}),
|
|
940
|
+
onClick: Ae,
|
|
887
941
|
"data-testid": "rubric-builder-add-criterion",
|
|
888
|
-
children:
|
|
942
|
+
children: c.rubricBuilderAddCriterion
|
|
889
943
|
}
|
|
890
944
|
),
|
|
891
945
|
children: /* @__PURE__ */ e(
|
|
892
|
-
|
|
946
|
+
Gr,
|
|
893
947
|
{
|
|
894
|
-
criteria:
|
|
895
|
-
hidePoints:
|
|
896
|
-
freeFormCriterionComments:
|
|
897
|
-
ratingOrder:
|
|
898
|
-
criteriaValidationErrors:
|
|
899
|
-
showErrors:
|
|
900
|
-
focusNameCriterionId:
|
|
901
|
-
onFocusedName:
|
|
902
|
-
onChangeCriterion:
|
|
903
|
-
onDuplicateCriterion: (
|
|
904
|
-
onDeleteCriterion:
|
|
905
|
-
onReorderCriteria:
|
|
948
|
+
criteria: n.criteria,
|
|
949
|
+
hidePoints: n.hidePoints,
|
|
950
|
+
freeFormCriterionComments: n.freeFormCriterionComments,
|
|
951
|
+
ratingOrder: n.ratingOrder,
|
|
952
|
+
criteriaValidationErrors: _,
|
|
953
|
+
showErrors: H,
|
|
954
|
+
focusNameCriterionId: Pe,
|
|
955
|
+
onFocusedName: Oe,
|
|
956
|
+
onChangeCriterion: N,
|
|
957
|
+
onDuplicateCriterion: (L) => N(mr(L)),
|
|
958
|
+
onDeleteCriterion: z,
|
|
959
|
+
onReorderCriteria: W
|
|
906
960
|
}
|
|
907
961
|
)
|
|
908
962
|
}
|
|
909
963
|
)
|
|
910
964
|
] }),
|
|
911
965
|
/* @__PURE__ */ e(
|
|
912
|
-
|
|
966
|
+
Fr,
|
|
913
967
|
{
|
|
914
|
-
savePending:
|
|
915
|
-
onDiscard:
|
|
916
|
-
onSave:
|
|
968
|
+
savePending: R,
|
|
969
|
+
onDiscard: Ne,
|
|
970
|
+
onSave: Me
|
|
917
971
|
}
|
|
918
972
|
),
|
|
919
973
|
/* @__PURE__ */ e(
|
|
920
974
|
Z,
|
|
921
975
|
{
|
|
922
|
-
isOpen:
|
|
923
|
-
heading:
|
|
924
|
-
body:
|
|
925
|
-
confirmLabel:
|
|
926
|
-
cancelLabel:
|
|
927
|
-
onConfirm:
|
|
928
|
-
onDismiss: () =>
|
|
976
|
+
isOpen: j,
|
|
977
|
+
heading: c.rubricBuilderDiscardHeading,
|
|
978
|
+
body: c.rubricBuilderDiscardBody,
|
|
979
|
+
confirmLabel: c.rubricBuilderDiscard,
|
|
980
|
+
cancelLabel: c.rubricBuilderKeepEditing,
|
|
981
|
+
onConfirm: b,
|
|
982
|
+
onDismiss: () => h(!1),
|
|
929
983
|
"data-testid": "rubric-builder-discard-modal"
|
|
930
984
|
}
|
|
931
985
|
),
|
|
932
986
|
/* @__PURE__ */ e(
|
|
933
987
|
Z,
|
|
934
988
|
{
|
|
935
|
-
isOpen:
|
|
936
|
-
heading:
|
|
937
|
-
body:
|
|
938
|
-
confirmLabel:
|
|
939
|
-
cancelLabel:
|
|
989
|
+
isOpen: ke,
|
|
990
|
+
heading: c.confirmToContinueHeader,
|
|
991
|
+
body: c.gradingHistoryWarning,
|
|
992
|
+
confirmLabel: c.saveConfirmModalSave,
|
|
993
|
+
cancelLabel: c.cancel,
|
|
940
994
|
onConfirm: () => {
|
|
941
|
-
re(!1),
|
|
995
|
+
re(!1), O();
|
|
942
996
|
},
|
|
943
997
|
onDismiss: () => re(!1),
|
|
944
998
|
"data-testid": "rubric-builder-save-confirm-modal"
|
|
@@ -947,29 +1001,29 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
947
1001
|
/* @__PURE__ */ e(
|
|
948
1002
|
Z,
|
|
949
1003
|
{
|
|
950
|
-
isOpen:
|
|
951
|
-
heading:
|
|
952
|
-
body:
|
|
953
|
-
confirmLabel:
|
|
954
|
-
cancelLabel:
|
|
1004
|
+
isOpen: Te,
|
|
1005
|
+
heading: c.confirmToContinueHeader,
|
|
1006
|
+
body: c.gradingHistoryWarning,
|
|
1007
|
+
confirmLabel: c.editConfirmModalConfirm,
|
|
1008
|
+
cancelLabel: c.cancel,
|
|
955
1009
|
onConfirm: () => {
|
|
956
|
-
ie(!1),
|
|
1010
|
+
ie(!1), O();
|
|
957
1011
|
},
|
|
958
1012
|
onDismiss: () => ie(!1),
|
|
959
1013
|
"data-testid": "rubric-builder-assessed-edit-modal"
|
|
960
1014
|
}
|
|
961
1015
|
),
|
|
962
1016
|
/* @__PURE__ */ e(
|
|
963
|
-
|
|
1017
|
+
$r,
|
|
964
1018
|
{
|
|
965
|
-
isOpen:
|
|
966
|
-
assignmentPoints:
|
|
967
|
-
rubricPoints:
|
|
1019
|
+
isOpen: xe,
|
|
1020
|
+
assignmentPoints: a ?? 0,
|
|
1021
|
+
rubricPoints: n.pointsPossible,
|
|
968
1022
|
onChange: () => {
|
|
969
|
-
K(!1),
|
|
1023
|
+
K(!1), O(!1);
|
|
970
1024
|
},
|
|
971
1025
|
onLeaveDifferent: () => {
|
|
972
|
-
K(!1),
|
|
1026
|
+
K(!1), O(!0);
|
|
973
1027
|
},
|
|
974
1028
|
onDismiss: () => K(!1)
|
|
975
1029
|
}
|
|
@@ -977,10 +1031,10 @@ const fi = (r) => /* @__PURE__ */ e(me, { translations: r.translations, children
|
|
|
977
1031
|
] });
|
|
978
1032
|
};
|
|
979
1033
|
export {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1034
|
+
ki as DEFAULT_AI_MAX_CRITERION_COUNT,
|
|
1035
|
+
Ti as DEFAULT_AI_MAX_RATING_COUNT,
|
|
1036
|
+
yi as HelloWorld,
|
|
1037
|
+
Ii as RubricBuilder,
|
|
1038
|
+
Di as RubricSelector,
|
|
1039
|
+
xi as defaultRubricsTranslations
|
|
986
1040
|
};
|