@pie-element/complex-rubric 7.1.2-next.5 → 7.1.3
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/CHANGELOG.md +1455 -0
- package/LICENSE.md +5 -0
- package/README.md +3 -0
- package/configure/CHANGELOG.md +1109 -0
- package/configure/lib/defaults.js +271 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +150 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +172 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/package.json +27 -0
- package/configure/src/__tests__/index.test.js +94 -0
- package/configure/src/__tests__/main.test.jsx +140 -0
- package/configure/src/defaults.js +213 -0
- package/configure/src/index.js +169 -0
- package/configure/src/main.jsx +162 -0
- package/controller/CHANGELOG.md +936 -0
- package/controller/lib/defaults.js +42 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +239 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/utils.js +11 -0
- package/controller/lib/utils.js.map +1 -0
- package/controller/package.json +16 -0
- package/controller/src/__tests__/index.test.js +55 -0
- package/controller/src/defaults.js +39 -0
- package/controller/src/index.js +220 -0
- package/controller/src/utils.js +3 -0
- package/docs/config-schema.json +4255 -0
- package/docs/config-schema.json.md +3162 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +196 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +6 -0
- package/docs/pie-schema.json +3302 -0
- package/docs/pie-schema.json.md +2364 -0
- package/lib/index.js +141 -0
- package/lib/index.js.map +1 -0
- package/lib/print.js +129 -0
- package/lib/print.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +262 -0
- package/module/demo.js +221 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +22 -0
- package/module/print-demo.js +259 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +22 -89
- package/src/__tests__/index.test.js +256 -0
- package/src/index.js +152 -0
- package/src/print.js +140 -0
- package/configure.js +0 -2
- package/controller.js +0 -1
- package/dist/author/defaults.d.ts +0 -231
- package/dist/author/defaults.js +0 -177
- package/dist/author/index.d.ts +0 -34
- package/dist/author/index.js +0 -90
- package/dist/author/main.d.ts +0 -25
- package/dist/author/main.js +0 -109
- package/dist/browser/author/index.js +0 -2138
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/complex-rubric.css +0 -2
- package/dist/browser/controller/index.js +0 -145
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -97
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/delivery-DROj6gHl.js +0 -691
- package/dist/browser/delivery-DROj6gHl.js.map +0 -1
- package/dist/browser/print/index.js +0 -85
- package/dist/browser/print/index.js.map +0 -1
- package/dist/browser/private-tags-C6RA489_.js +0 -60411
- package/dist/browser/private-tags-C6RA489_.js.map +0 -1
- package/dist/controller/defaults.d.ts +0 -39
- package/dist/controller/defaults.js +0 -42
- package/dist/controller/index.d.ts +0 -25
- package/dist/controller/index.js +0 -107
- package/dist/controller/utils.d.ts +0 -9
- package/dist/controller/utils.js +0 -4
- package/dist/delivery/index.d.ts +0 -23
- package/dist/delivery/index.js +0 -97
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -145
- package/dist/index.js +0 -2
- package/dist/print/index.d.ts +0 -24
- package/dist/print/index.js +0 -85
- package/dist/private-tags.d.ts +0 -4
- package/dist/private-tags.js +0 -3
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -12
|
@@ -1,2138 +0,0 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, J as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, V as g, W as _, X as v, Z as y, _ as b, a as x, at as S, b as C, c as w, ct as T, d as E, dt as ee, f as D, ft as O, g as k, h as A, ht as j, j as M, k as N, l as te, m as P, mt as F, nt as ne, o as re, p as I, q as ie, r as ae, s as oe, st as se, t as ce, u as le, ut as ue, v as de, w as fe, x as pe, y as me, z as he } from "../private-tags-C6RA489_.js";
|
|
2
|
-
import * as L from "react";
|
|
3
|
-
import R, { useState as ge } from "react";
|
|
4
|
-
import { jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
5
|
-
import { createRoot as _e } from "react-dom/client";
|
|
6
|
-
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/radioGroupClasses.js
|
|
7
|
-
function ve(e) {
|
|
8
|
-
return ee("MuiRadioGroup", e);
|
|
9
|
-
}
|
|
10
|
-
ue("MuiRadioGroup", [
|
|
11
|
-
"root",
|
|
12
|
-
"row",
|
|
13
|
-
"error"
|
|
14
|
-
]);
|
|
15
|
-
//#endregion
|
|
16
|
-
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroup.js
|
|
17
|
-
var ye = (e) => {
|
|
18
|
-
let { classes: t, row: n, error: r } = e;
|
|
19
|
-
return T({ root: [
|
|
20
|
-
"root",
|
|
21
|
-
n && "row",
|
|
22
|
-
r && "error"
|
|
23
|
-
] }, ve, t);
|
|
24
|
-
}, be = /*#__PURE__*/ L.forwardRef(function(e, t) {
|
|
25
|
-
let { actions: n, children: i, className: a, defaultValue: o, name: s, onChange: c, value: l, ...u } = e, d = L.useRef(null), f = ye(e), [p, m] = v({
|
|
26
|
-
controlled: l,
|
|
27
|
-
default: o,
|
|
28
|
-
name: "RadioGroup"
|
|
29
|
-
});
|
|
30
|
-
L.useImperativeHandle(n, () => ({ focus: () => {
|
|
31
|
-
let e = d.current.querySelector("input:not(:disabled):checked");
|
|
32
|
-
e ||= d.current.querySelector("input:not(:disabled)"), e && e.focus();
|
|
33
|
-
} }), []);
|
|
34
|
-
let h = ne(t, d), g = y(s), _ = L.useMemo(() => ({
|
|
35
|
-
name: g,
|
|
36
|
-
onChange(e) {
|
|
37
|
-
m(e.target.value), c && c(e, e.target.value);
|
|
38
|
-
},
|
|
39
|
-
value: p
|
|
40
|
-
}), [
|
|
41
|
-
g,
|
|
42
|
-
c,
|
|
43
|
-
m,
|
|
44
|
-
p
|
|
45
|
-
]);
|
|
46
|
-
return /*#__PURE__*/ z(le.Provider, {
|
|
47
|
-
value: _,
|
|
48
|
-
children: /*#__PURE__*/ z(r, {
|
|
49
|
-
role: "radiogroup",
|
|
50
|
-
ref: h,
|
|
51
|
-
className: O(f.root, a),
|
|
52
|
-
...u,
|
|
53
|
-
children: i
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
}), V = class e extends CustomEvent {
|
|
57
|
-
static {
|
|
58
|
-
this.TYPE = "model.updated";
|
|
59
|
-
}
|
|
60
|
-
constructor(t, n = !1) {
|
|
61
|
-
super(e.TYPE, {
|
|
62
|
-
bubbles: !0,
|
|
63
|
-
detail: {
|
|
64
|
-
update: t,
|
|
65
|
-
reset: n
|
|
66
|
-
}
|
|
67
|
-
}), this.update = t, this.reset = n;
|
|
68
|
-
}
|
|
69
|
-
}, xe = class e extends CustomEvent {
|
|
70
|
-
static {
|
|
71
|
-
this.TYPE = "delete.image";
|
|
72
|
-
}
|
|
73
|
-
constructor(t, n) {
|
|
74
|
-
super(e.TYPE, {
|
|
75
|
-
bubbles: !0,
|
|
76
|
-
detail: {
|
|
77
|
-
src: t,
|
|
78
|
-
done: n
|
|
79
|
-
}
|
|
80
|
-
}), this.src = t, this.done = n;
|
|
81
|
-
}
|
|
82
|
-
}, Se = class e extends CustomEvent {
|
|
83
|
-
static {
|
|
84
|
-
this.TYPE = "insert.image";
|
|
85
|
-
}
|
|
86
|
-
constructor(t) {
|
|
87
|
-
super(e.TYPE, {
|
|
88
|
-
bubbles: !0,
|
|
89
|
-
detail: t
|
|
90
|
-
}), this.handler = t;
|
|
91
|
-
}
|
|
92
|
-
}, Ce = class e extends CustomEvent {
|
|
93
|
-
static {
|
|
94
|
-
this.TYPE = "delete.sound";
|
|
95
|
-
}
|
|
96
|
-
constructor(t, n) {
|
|
97
|
-
super(e.TYPE, {
|
|
98
|
-
bubbles: !0,
|
|
99
|
-
detail: {
|
|
100
|
-
src: t,
|
|
101
|
-
done: n
|
|
102
|
-
}
|
|
103
|
-
}), this.src = t, this.done = n;
|
|
104
|
-
}
|
|
105
|
-
}, we = class e extends CustomEvent {
|
|
106
|
-
static {
|
|
107
|
-
this.TYPE = "insert.sound";
|
|
108
|
-
}
|
|
109
|
-
constructor(t) {
|
|
110
|
-
super(e.TYPE, {
|
|
111
|
-
bubbles: !0,
|
|
112
|
-
detail: t
|
|
113
|
-
}), this.handler = t;
|
|
114
|
-
}
|
|
115
|
-
}, { Panel: Te, toggle: Ee } = oe, De = S("div")(({ theme: e, width: t }) => ({
|
|
116
|
-
maxWidth: t,
|
|
117
|
-
fontFamily: "Cerebri Sans",
|
|
118
|
-
fontSize: e.typography.fontSize
|
|
119
|
-
})), Oe = class extends R.Component {
|
|
120
|
-
verifyRubriclessModel = (e, t) => {
|
|
121
|
-
let { rubricless: n = !1 } = t || {};
|
|
122
|
-
return n ? (({ points: e, sampleAnswers: t, ...n }) => n)(e) : e;
|
|
123
|
-
};
|
|
124
|
-
render() {
|
|
125
|
-
let { model: e, configuration: t, onConfigurationChanged: n, onModelChanged: r, imageSupport: i } = this.props || {}, { baseInputConfiguration: a = {}, contentDimensions: o = {}, settingsPanelDisabled: s, showExcludeZero: c = {}, showMaxPoint: l = {}, mathMlOptions: u = {}, rubricless: d = !1, rubriclessInstruction: f, width: p } = t || {}, m = this.verifyRubriclessModel(e, t), { extraCSSRules: h } = e, g = {
|
|
126
|
-
excludeZeroEnabled: c.settings && Ee(c.label),
|
|
127
|
-
maxPointsEnabled: l.settings && Ee(l.label),
|
|
128
|
-
rubriclessInstructionEnabled: d && f.settings && Ee(f.label)
|
|
129
|
-
};
|
|
130
|
-
return /* @__PURE__ */ z(w.ConfigLayout, {
|
|
131
|
-
extraCSSRules: h,
|
|
132
|
-
dimensions: o,
|
|
133
|
-
hideSettings: s,
|
|
134
|
-
settings: /* @__PURE__ */ z(Te, {
|
|
135
|
-
model: e,
|
|
136
|
-
onChangeModel: r,
|
|
137
|
-
configuration: t,
|
|
138
|
-
onChangeConfiguration: n,
|
|
139
|
-
pluginOpts: ((e) => Object.assign({ ...a }, e || {}))(f?.inputConfiguration),
|
|
140
|
-
groups: { Properties: g },
|
|
141
|
-
imageSupport: i
|
|
142
|
-
}),
|
|
143
|
-
children: /* @__PURE__ */ z(De, {
|
|
144
|
-
width: p,
|
|
145
|
-
children: /* @__PURE__ */ z(re, {
|
|
146
|
-
value: m,
|
|
147
|
-
config: t,
|
|
148
|
-
onChange: r,
|
|
149
|
-
mathMlOptions: u,
|
|
150
|
-
rubricless: d,
|
|
151
|
-
pluginOpts: a,
|
|
152
|
-
imageSupport: i
|
|
153
|
-
})
|
|
154
|
-
})
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}, ke = {
|
|
158
|
-
model: {
|
|
159
|
-
points: [
|
|
160
|
-
"",
|
|
161
|
-
"",
|
|
162
|
-
"",
|
|
163
|
-
""
|
|
164
|
-
],
|
|
165
|
-
sampleAnswers: [
|
|
166
|
-
null,
|
|
167
|
-
null,
|
|
168
|
-
null,
|
|
169
|
-
null
|
|
170
|
-
],
|
|
171
|
-
maxPoints: 3,
|
|
172
|
-
excludeZero: !1,
|
|
173
|
-
excludeZeroEnabled: !0,
|
|
174
|
-
maxPointsEnabled: !0
|
|
175
|
-
},
|
|
176
|
-
configuration: {
|
|
177
|
-
baseInputConfiguration: {
|
|
178
|
-
h3: { disabled: !0 },
|
|
179
|
-
audio: { disabled: !1 },
|
|
180
|
-
video: { disabled: !1 },
|
|
181
|
-
image: { disabled: !1 },
|
|
182
|
-
textAlign: { disabled: !0 },
|
|
183
|
-
showParagraphs: { disabled: !1 },
|
|
184
|
-
separateParagraphs: { disabled: !0 }
|
|
185
|
-
},
|
|
186
|
-
rubriclessInstruction: { inputConfiguration: {
|
|
187
|
-
audio: { disabled: !1 },
|
|
188
|
-
video: { disabled: !1 },
|
|
189
|
-
image: { disabled: !1 }
|
|
190
|
-
} },
|
|
191
|
-
showExcludeZero: {
|
|
192
|
-
settings: !0,
|
|
193
|
-
label: "Ability to exclude zero"
|
|
194
|
-
},
|
|
195
|
-
showMaxPoint: {
|
|
196
|
-
settings: !0,
|
|
197
|
-
label: "Show max points dropdown"
|
|
198
|
-
},
|
|
199
|
-
settingsPanelDisabled: !1,
|
|
200
|
-
mathMlOptions: {
|
|
201
|
-
mmlOutput: !1,
|
|
202
|
-
mmlEditing: !1
|
|
203
|
-
},
|
|
204
|
-
maxMaxPoints: 9
|
|
205
|
-
}
|
|
206
|
-
}, Ae = /* @__PURE__ */ j(ie(), 1), je = (e) => ({
|
|
207
|
-
...ke.model,
|
|
208
|
-
...e
|
|
209
|
-
}), Me = (e) => ({
|
|
210
|
-
...ke.configuration,
|
|
211
|
-
...e
|
|
212
|
-
}), Ne = class extends HTMLElement {
|
|
213
|
-
constructor() {
|
|
214
|
-
super(), this._root = null, Ae.log("constructor called"), this._model = je(), this._configuration = Me(), this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
215
|
-
}
|
|
216
|
-
updateModelAccordingToReceivedProps = (e) => {
|
|
217
|
-
let t = { ...this._model };
|
|
218
|
-
if (!e) return t;
|
|
219
|
-
let n = { ...e };
|
|
220
|
-
n.maxPoints === 1 && (n.excludeZero = !1);
|
|
221
|
-
let { maxPoints: r, excludeZero: i } = n || {};
|
|
222
|
-
n.points = n.points ? [...n.points] : [], n.sampleAnswers = n.sampleAnswers ? [...n.sampleAnswers] : [];
|
|
223
|
-
let a = i ? r : r + 1, o = n.points.length, s = t?.excludeZero !== e?.excludeZero, c = t?.maxPoints !== e?.maxPoints;
|
|
224
|
-
if (o < a) {
|
|
225
|
-
if (s && !i && (n.points = ["", ...n.points], n.sampleAnswers = [null, ...n.sampleAnswers]), c) for (let e = 0; e < a - o; e++) n.points.push(""), n.sampleAnswers.push(null);
|
|
226
|
-
} else o > a && (s && i && (n.points = n.points.slice(1), n.sampleAnswers = n.sampleAnswers.slice(1)), c && (n.points = n.points.slice(0, a), n.sampleAnswers = n.sampleAnswers.slice(0, a)));
|
|
227
|
-
return n;
|
|
228
|
-
};
|
|
229
|
-
set model(e) {
|
|
230
|
-
this._model = this.updateModelAccordingToReceivedProps(je(e)), this._render();
|
|
231
|
-
}
|
|
232
|
-
set configuration(e) {
|
|
233
|
-
this._configuration = Me(e), this._render();
|
|
234
|
-
}
|
|
235
|
-
onModelChanged(e) {
|
|
236
|
-
this._model = this.updateModelAccordingToReceivedProps(e), this._render(), this.dispatchEvent(new V(this._model, !1));
|
|
237
|
-
}
|
|
238
|
-
onConfigurationChanged = (e) => {
|
|
239
|
-
this._configuration = Me(e), this._model && this.onModelChanged(this._model), this._render();
|
|
240
|
-
};
|
|
241
|
-
insertImage(e) {
|
|
242
|
-
this.dispatchEvent(new Se(e));
|
|
243
|
-
}
|
|
244
|
-
onDeleteImage(e, t) {
|
|
245
|
-
this.dispatchEvent(new xe(e, t));
|
|
246
|
-
}
|
|
247
|
-
connectedCallback() {
|
|
248
|
-
this._render();
|
|
249
|
-
}
|
|
250
|
-
_render() {
|
|
251
|
-
if (this._model) {
|
|
252
|
-
let e = R.createElement(Oe, {
|
|
253
|
-
model: this._model,
|
|
254
|
-
configuration: this._configuration,
|
|
255
|
-
onModelChanged: this.onModelChanged,
|
|
256
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
257
|
-
imageSupport: {
|
|
258
|
-
add: this.insertImage.bind(this),
|
|
259
|
-
delete: this.onDeleteImage.bind(this)
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
this._root ||= _e(this), this._root.render(e);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
disconnectedCallback() {
|
|
266
|
-
this._root && this._root.unmount();
|
|
267
|
-
}
|
|
268
|
-
}, Pe = {
|
|
269
|
-
model: {
|
|
270
|
-
addScaleEnabled: !0,
|
|
271
|
-
description: !1,
|
|
272
|
-
excludeZero: !1,
|
|
273
|
-
halfScoring: !1,
|
|
274
|
-
maxPointsEnabled: !0,
|
|
275
|
-
pointLabels: !0,
|
|
276
|
-
scales: [],
|
|
277
|
-
standards: !1,
|
|
278
|
-
visibleToStudent: !0
|
|
279
|
-
},
|
|
280
|
-
configuration: {
|
|
281
|
-
baseInputConfiguration: {
|
|
282
|
-
h3: { disabled: !0 },
|
|
283
|
-
audio: { disabled: !1 },
|
|
284
|
-
video: { disabled: !1 },
|
|
285
|
-
image: { disabled: !1 },
|
|
286
|
-
textAlign: { disabled: !0 },
|
|
287
|
-
showParagraphs: { disabled: !1 },
|
|
288
|
-
separateParagraphs: { disabled: !0 }
|
|
289
|
-
},
|
|
290
|
-
expandedInput: { inputConfiguration: {
|
|
291
|
-
math: { disabled: !0 },
|
|
292
|
-
audio: { disabled: !1 },
|
|
293
|
-
video: { disabled: !1 },
|
|
294
|
-
image: { disabled: !1 }
|
|
295
|
-
} },
|
|
296
|
-
labelInput: { inputConfiguration: {
|
|
297
|
-
math: { disabled: !0 },
|
|
298
|
-
audio: { disabled: !0 },
|
|
299
|
-
video: { disabled: !0 },
|
|
300
|
-
image: { disabled: !0 }
|
|
301
|
-
} },
|
|
302
|
-
excludeZeroDialogBoxContent: {
|
|
303
|
-
title: "Exclude 0 (Zero) from Score Point Values.",
|
|
304
|
-
text: "<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"
|
|
305
|
-
},
|
|
306
|
-
includeZeroDialogBoxContent: {
|
|
307
|
-
title: "Include 0 (Zero) in Score Point Values.",
|
|
308
|
-
text: "<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"
|
|
309
|
-
},
|
|
310
|
-
deleteScaleDialogBoxContent: {
|
|
311
|
-
title: "Delete Scale",
|
|
312
|
-
text: "Are you sure you want to delete this scale?"
|
|
313
|
-
},
|
|
314
|
-
maxPointsDialogBoxContent: {
|
|
315
|
-
title: "Decreasing Max Points.",
|
|
316
|
-
text: " You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."
|
|
317
|
-
},
|
|
318
|
-
settingsPanelDisabled: !1,
|
|
319
|
-
spellCheck: {
|
|
320
|
-
label: "Spellcheck",
|
|
321
|
-
settings: !1,
|
|
322
|
-
enabled: !0
|
|
323
|
-
},
|
|
324
|
-
showExcludeZero: {
|
|
325
|
-
settings: !0,
|
|
326
|
-
label: "Exclude Zero"
|
|
327
|
-
},
|
|
328
|
-
showScorePointLabels: {
|
|
329
|
-
settings: !0,
|
|
330
|
-
label: "Show Score Point Labels"
|
|
331
|
-
},
|
|
332
|
-
showDescription: {
|
|
333
|
-
settings: !0,
|
|
334
|
-
label: "Show Description"
|
|
335
|
-
},
|
|
336
|
-
showVisibleToStudent: {
|
|
337
|
-
settings: !0,
|
|
338
|
-
label: "Visible to Student"
|
|
339
|
-
},
|
|
340
|
-
showHalfScoring: {
|
|
341
|
-
settings: !0,
|
|
342
|
-
label: "Half Scoring"
|
|
343
|
-
},
|
|
344
|
-
showStandards: {
|
|
345
|
-
settings: !1,
|
|
346
|
-
label: "Show Standards"
|
|
347
|
-
},
|
|
348
|
-
showLevelTagInput: {
|
|
349
|
-
settings: !1,
|
|
350
|
-
label: "Show Level Tag Input",
|
|
351
|
-
enabled: !1
|
|
352
|
-
},
|
|
353
|
-
dragAndDrop: {
|
|
354
|
-
settings: !0,
|
|
355
|
-
label: "Enable Drag and Drop",
|
|
356
|
-
enabled: !1
|
|
357
|
-
},
|
|
358
|
-
showMaxPoint: {
|
|
359
|
-
settings: !0,
|
|
360
|
-
label: "Show Max Points Dropdown"
|
|
361
|
-
},
|
|
362
|
-
addScale: {
|
|
363
|
-
settings: !0,
|
|
364
|
-
label: "Add Scale Available"
|
|
365
|
-
},
|
|
366
|
-
minNoOfTraits: 1,
|
|
367
|
-
maxNoOfTraits: 10,
|
|
368
|
-
minNoOfScales: 1,
|
|
369
|
-
maxNoOfScales: 10,
|
|
370
|
-
defaultTraitLabel: "Trait",
|
|
371
|
-
mathMlOptions: {
|
|
372
|
-
mmlOutput: !1,
|
|
373
|
-
mmlEditing: !1
|
|
374
|
-
},
|
|
375
|
-
maxMaxPoints: 10
|
|
376
|
-
}
|
|
377
|
-
}, H = /* @__PURE__ */ j(F(), 1), { configuration: { excludeZeroDialogBoxContent: Fe, includeZeroDialogBoxContent: Ie, deleteScaleDialogBoxContent: Le, maxPointsDialogBoxContent: Re } } = Pe, U = {
|
|
378
|
-
remove0: "remove0",
|
|
379
|
-
add0: "add0",
|
|
380
|
-
shiftLeft: "shiftLeft",
|
|
381
|
-
shiftRight: "shiftRight"
|
|
382
|
-
}, W = S(P)(({ theme: e }) => ({ "& .MuiPaper-root": { padding: e.spacing(2.5) } })), G = S(I)(({ theme: e }) => ({
|
|
383
|
-
padding: `0 0 ${e.spacing(2)} 0`,
|
|
384
|
-
"& h2": {
|
|
385
|
-
fontSize: "20px",
|
|
386
|
-
lineHeight: "23px",
|
|
387
|
-
fontFamily: "Cerebri Sans",
|
|
388
|
-
color: c.text()
|
|
389
|
-
}
|
|
390
|
-
})), K = S(k)(({ theme: e }) => ({
|
|
391
|
-
paddingLeft: "0",
|
|
392
|
-
"& p": {
|
|
393
|
-
fontSize: e.typography.fontSize + 2,
|
|
394
|
-
fontFamily: "Cerebri Sans",
|
|
395
|
-
color: c.text()
|
|
396
|
-
}
|
|
397
|
-
})), q = S(_)(({ theme: e }) => ({
|
|
398
|
-
padding: `${e.spacing(1.5)} ${e.spacing(2)}`,
|
|
399
|
-
borderRadius: "4px",
|
|
400
|
-
fontSize: e.typography.fontSize,
|
|
401
|
-
fontFamily: "Cerebri Sans",
|
|
402
|
-
lineHeight: "14px",
|
|
403
|
-
textTransform: "none",
|
|
404
|
-
background: c.primary(),
|
|
405
|
-
color: e.palette.common.white
|
|
406
|
-
})), J = S(q)({
|
|
407
|
-
background: c.secondaryBackground(),
|
|
408
|
-
color: c.text()
|
|
409
|
-
}), ze = ({ open: e, changeExcludeZero: t, cancel: n }) => /* @__PURE__ */ B(W, {
|
|
410
|
-
open: e,
|
|
411
|
-
children: [
|
|
412
|
-
/* @__PURE__ */ z(G, { children: Fe.title }),
|
|
413
|
-
/* @__PURE__ */ z(K, { children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ z("div", { dangerouslySetInnerHTML: { __html: Fe.text } }) }) }),
|
|
414
|
-
/* @__PURE__ */ B(A, { children: [
|
|
415
|
-
/* @__PURE__ */ z(J, {
|
|
416
|
-
onClick: () => n(),
|
|
417
|
-
children: "Cancel"
|
|
418
|
-
}),
|
|
419
|
-
/* @__PURE__ */ z(q, {
|
|
420
|
-
onClick: () => t(U.shiftLeft),
|
|
421
|
-
children: "Shift to Left"
|
|
422
|
-
}),
|
|
423
|
-
/* @__PURE__ */ z(q, {
|
|
424
|
-
onClick: () => t(U.remove0),
|
|
425
|
-
children: "Remove 0 column"
|
|
426
|
-
})
|
|
427
|
-
] })
|
|
428
|
-
]
|
|
429
|
-
});
|
|
430
|
-
ze.propTypes = {
|
|
431
|
-
open: H.default.bool,
|
|
432
|
-
changeExcludeZero: H.default.func,
|
|
433
|
-
cancel: H.default.func
|
|
434
|
-
};
|
|
435
|
-
var Be = ({ open: e, changeExcludeZero: t, cancel: n }) => /* @__PURE__ */ B(W, {
|
|
436
|
-
open: e,
|
|
437
|
-
children: [
|
|
438
|
-
/* @__PURE__ */ z(G, { children: Ie.title }),
|
|
439
|
-
/* @__PURE__ */ z(K, { children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ z("div", { dangerouslySetInnerHTML: { __html: Ie.text } }) }) }),
|
|
440
|
-
/* @__PURE__ */ B(A, { children: [
|
|
441
|
-
/* @__PURE__ */ z(J, {
|
|
442
|
-
onClick: () => n(),
|
|
443
|
-
children: "Cancel"
|
|
444
|
-
}),
|
|
445
|
-
/* @__PURE__ */ z(q, {
|
|
446
|
-
onClick: () => t(U.shiftRight),
|
|
447
|
-
children: "Shift to Right"
|
|
448
|
-
}),
|
|
449
|
-
/* @__PURE__ */ z(q, {
|
|
450
|
-
onClick: () => t(U.add0),
|
|
451
|
-
children: "Add 0 column"
|
|
452
|
-
})
|
|
453
|
-
] })
|
|
454
|
-
]
|
|
455
|
-
});
|
|
456
|
-
Be.propTypes = {
|
|
457
|
-
open: H.default.bool,
|
|
458
|
-
changeExcludeZero: H.default.func,
|
|
459
|
-
cancel: H.default.func
|
|
460
|
-
};
|
|
461
|
-
var Ve = ({ open: e, deleteScorePoints: t, cancel: n }) => /* @__PURE__ */ B(W, {
|
|
462
|
-
open: e,
|
|
463
|
-
children: [
|
|
464
|
-
/* @__PURE__ */ z(G, { children: Re.title }),
|
|
465
|
-
/* @__PURE__ */ z(K, { children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ z("div", { dangerouslySetInnerHTML: { __html: Re.text } }) }) }),
|
|
466
|
-
/* @__PURE__ */ B(A, { children: [/* @__PURE__ */ z(J, {
|
|
467
|
-
onClick: n,
|
|
468
|
-
children: "Cancel"
|
|
469
|
-
}), /* @__PURE__ */ z(q, {
|
|
470
|
-
onClick: t,
|
|
471
|
-
children: "Confirm"
|
|
472
|
-
})] })
|
|
473
|
-
]
|
|
474
|
-
});
|
|
475
|
-
Ve.propTypes = {
|
|
476
|
-
open: H.default.bool,
|
|
477
|
-
deleteScorePoints: H.default.func,
|
|
478
|
-
cancel: H.default.func
|
|
479
|
-
};
|
|
480
|
-
var He = ({ open: e, scaleIndex: t, deleteScale: n, cancel: r }) => /* @__PURE__ */ B(W, {
|
|
481
|
-
open: e,
|
|
482
|
-
children: [
|
|
483
|
-
/* @__PURE__ */ z(G, { children: `${Le.title} #${t + 1}` }),
|
|
484
|
-
/* @__PURE__ */ z(K, { children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ z("div", { dangerouslySetInnerHTML: { __html: Le.text } }) }) }),
|
|
485
|
-
/* @__PURE__ */ B(A, { children: [/* @__PURE__ */ z(J, {
|
|
486
|
-
onClick: r,
|
|
487
|
-
children: "Cancel"
|
|
488
|
-
}), /* @__PURE__ */ z(q, {
|
|
489
|
-
onClick: n,
|
|
490
|
-
children: "Delete"
|
|
491
|
-
})] })
|
|
492
|
-
]
|
|
493
|
-
});
|
|
494
|
-
He.propTypes = {
|
|
495
|
-
open: H.default.bool,
|
|
496
|
-
scaleIndex: H.default.number,
|
|
497
|
-
deleteScale: H.default.func,
|
|
498
|
-
cancel: H.default.func
|
|
499
|
-
};
|
|
500
|
-
var Ue = ({ open: e, deleteTrait: t, cancel: n, traitLabel: r }) => /* @__PURE__ */ B(W, {
|
|
501
|
-
open: e,
|
|
502
|
-
children: [
|
|
503
|
-
/* @__PURE__ */ B(G, { children: ["Delete ", r] }),
|
|
504
|
-
/* @__PURE__ */ z(K, { children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ z("div", { dangerouslySetInnerHTML: { __html: `Are you sure you want to delete this ${r}?` } }) }) }),
|
|
505
|
-
/* @__PURE__ */ B(A, { children: [/* @__PURE__ */ z(J, {
|
|
506
|
-
onClick: n,
|
|
507
|
-
children: "Cancel"
|
|
508
|
-
}), /* @__PURE__ */ z(q, {
|
|
509
|
-
onClick: t,
|
|
510
|
-
children: "Delete"
|
|
511
|
-
})] })
|
|
512
|
-
]
|
|
513
|
-
});
|
|
514
|
-
Ue.propTypes = {
|
|
515
|
-
open: H.default.bool,
|
|
516
|
-
deleteTrait: H.default.func,
|
|
517
|
-
cancel: H.default.func,
|
|
518
|
-
traitLabel: H.default.string
|
|
519
|
-
};
|
|
520
|
-
var We = ({ open: e, text: t, onClose: n }) => /* @__PURE__ */ B(W, {
|
|
521
|
-
open: e,
|
|
522
|
-
children: [/* @__PURE__ */ z(G, { children: t }), /* @__PURE__ */ z(A, { children: /* @__PURE__ */ z(q, {
|
|
523
|
-
onClick: n,
|
|
524
|
-
children: "OK"
|
|
525
|
-
}) })]
|
|
526
|
-
});
|
|
527
|
-
We.propTypes = {
|
|
528
|
-
open: H.default.bool,
|
|
529
|
-
text: H.default.string,
|
|
530
|
-
cancel: H.default.func,
|
|
531
|
-
onClose: H.default.func
|
|
532
|
-
};
|
|
533
|
-
//#endregion
|
|
534
|
-
//#region ../multi-trait-rubric/dist/author/utils.js
|
|
535
|
-
var Ge = (fe || []).filter((e) => e !== "table" && e !== "bulleted-list" && e !== "numbered-list"), Ke = (e, t) => !e || !e.length ? [] : e.reduce((e, n) => {
|
|
536
|
-
let { scorePointsLabels: r, traits: i } = n || {};
|
|
537
|
-
if (r.length < 1) return e;
|
|
538
|
-
switch (t) {
|
|
539
|
-
case U.remove0:
|
|
540
|
-
r = r.slice(1), i = i.map(({ scorePointsDescriptors: e, ...t }) => ({
|
|
541
|
-
...t,
|
|
542
|
-
scorePointsDescriptors: e.slice(1)
|
|
543
|
-
}));
|
|
544
|
-
break;
|
|
545
|
-
case U.add0:
|
|
546
|
-
r = ["", ...r], i = i.map(({ scorePointsDescriptors: e, ...t }) => ({
|
|
547
|
-
...t,
|
|
548
|
-
scorePointsDescriptors: ["", ...e]
|
|
549
|
-
}));
|
|
550
|
-
break;
|
|
551
|
-
case U.shiftLeft:
|
|
552
|
-
r = r.slice(0, -1), i = i.map(({ scorePointsDescriptors: e, ...t }) => ({
|
|
553
|
-
...t,
|
|
554
|
-
scorePointsDescriptors: e.slice(0, -1)
|
|
555
|
-
}));
|
|
556
|
-
break;
|
|
557
|
-
case U.shiftRight:
|
|
558
|
-
r = [...r, ""], i = i.map(({ scorePointsDescriptors: e, ...t }) => ({
|
|
559
|
-
...t,
|
|
560
|
-
scorePointsDescriptors: [...e, ""]
|
|
561
|
-
}));
|
|
562
|
-
break;
|
|
563
|
-
default: break;
|
|
564
|
-
}
|
|
565
|
-
return e.push({
|
|
566
|
-
...n,
|
|
567
|
-
scorePointsLabels: r,
|
|
568
|
-
traits: i
|
|
569
|
-
}), e;
|
|
570
|
-
}, []);
|
|
571
|
-
//#endregion
|
|
572
|
-
//#region ../multi-trait-rubric/dist/author/common.js
|
|
573
|
-
function qe(e) {
|
|
574
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
575
|
-
}
|
|
576
|
-
function Je(e, t) {
|
|
577
|
-
return !e || qe(e) ? e : qe(e.default) ? e.default : t && qe(e[t]) ? e[t] : t && qe(e[t]?.default) ? e[t].default : e;
|
|
578
|
-
}
|
|
579
|
-
var Ye = Je(o, "InputContainer") || Je(Qe.InputContainer, "InputContainer"), Xe = t, Ze = Xe.default, Qe = Ze && typeof Ze == "object" ? Ze : Xe, $e = "120px", et = "100px", tt = "160px", Y = `solid 1px ${se[400]}`, nt = "8px 4px", rt = S("div")(({ theme: e }) => ({
|
|
580
|
-
fontFamily: "Cerebri",
|
|
581
|
-
"& .editable-label": {
|
|
582
|
-
textAlign: "left",
|
|
583
|
-
flex: 1,
|
|
584
|
-
border: "none",
|
|
585
|
-
"& div:not(.tiptap)": {
|
|
586
|
-
padding: 0,
|
|
587
|
-
border: "none"
|
|
588
|
-
},
|
|
589
|
-
"& > div:first-of-type": {
|
|
590
|
-
borderLeft: Y,
|
|
591
|
-
borderRadius: 0,
|
|
592
|
-
padding: nt
|
|
593
|
-
}
|
|
594
|
-
},
|
|
595
|
-
"& .editable-level": {
|
|
596
|
-
background: e.palette.common.white,
|
|
597
|
-
width: "60%"
|
|
598
|
-
},
|
|
599
|
-
"& .underlined-editable-level": {
|
|
600
|
-
background: e.palette.common.white,
|
|
601
|
-
width: "100%",
|
|
602
|
-
padding: 0,
|
|
603
|
-
border: "none",
|
|
604
|
-
"& > div:first-of-type": {
|
|
605
|
-
borderBottom: Y,
|
|
606
|
-
borderRadius: 0,
|
|
607
|
-
padding: nt
|
|
608
|
-
}
|
|
609
|
-
},
|
|
610
|
-
"& .expanded-input-prompt": {
|
|
611
|
-
border: "none",
|
|
612
|
-
margin: "10px",
|
|
613
|
-
marginTop: 0,
|
|
614
|
-
"& > div:first-of-type": {
|
|
615
|
-
border: Y,
|
|
616
|
-
borderRadius: "4px",
|
|
617
|
-
padding: nt
|
|
618
|
-
},
|
|
619
|
-
"& .tiptap": {
|
|
620
|
-
fontFamily: "Cerebri",
|
|
621
|
-
height: $e,
|
|
622
|
-
padding: 0
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
})), it = S("div")(({ theme: e }) => ({
|
|
626
|
-
fontSize: e.typography.fontSize + 2,
|
|
627
|
-
textAlign: "right",
|
|
628
|
-
display: "flex",
|
|
629
|
-
flexDirection: "row",
|
|
630
|
-
alignItems: "flex-start",
|
|
631
|
-
padding: `${e.spacing(1.5)} ${e.spacing(2)}`,
|
|
632
|
-
width: "114px",
|
|
633
|
-
background: c.secondaryBackground(),
|
|
634
|
-
borderRadius: "4px",
|
|
635
|
-
justifyContent: "space-around",
|
|
636
|
-
color: c.text(),
|
|
637
|
-
cursor: "pointer"
|
|
638
|
-
})), at = ({ children: e, onClick: t }) => /* @__PURE__ */ B(it, {
|
|
639
|
-
onClick: t,
|
|
640
|
-
children: [/* @__PURE__ */ z("strong", { children: "+" }), /* @__PURE__ */ z("div", { children: e })]
|
|
641
|
-
}), ot = S("div")({
|
|
642
|
-
width: "200px",
|
|
643
|
-
minWidth: "200px",
|
|
644
|
-
position: "relative",
|
|
645
|
-
padding: "0 10px",
|
|
646
|
-
boxSizing: "border-box"
|
|
647
|
-
}), X = S("div")(({ theme: e }) => ({
|
|
648
|
-
width: "200px",
|
|
649
|
-
minWidth: "200px",
|
|
650
|
-
"& ul, ol": {
|
|
651
|
-
marginBlockStart: 0,
|
|
652
|
-
paddingInlineStart: e.spacing(2)
|
|
653
|
-
}
|
|
654
|
-
})), st = S("div")({
|
|
655
|
-
display: "flex",
|
|
656
|
-
overflowX: "hidden",
|
|
657
|
-
overflowY: "hidden",
|
|
658
|
-
alignItems: "flex-end",
|
|
659
|
-
paddingBottom: "30px"
|
|
660
|
-
}), ct = ({ children: e, setRef: t, width: n }) => /* @__PURE__ */ z(st, {
|
|
661
|
-
style: { width: n },
|
|
662
|
-
ref: t,
|
|
663
|
-
children: e
|
|
664
|
-
}), lt = (({ children: e, height: t }) => /* @__PURE__ */ z("div", {
|
|
665
|
-
style: {
|
|
666
|
-
display: "flex",
|
|
667
|
-
height: t
|
|
668
|
-
},
|
|
669
|
-
children: e
|
|
670
|
-
})), ut = S("div")({ padding: "0 10px" }), dt = S("div")({
|
|
671
|
-
display: "flex",
|
|
672
|
-
borderRadius: "4px",
|
|
673
|
-
background: "white",
|
|
674
|
-
flexDirection: "row",
|
|
675
|
-
alignItems: "center",
|
|
676
|
-
justifyContent: "space-between",
|
|
677
|
-
border: Y
|
|
678
|
-
}), ft = S("div")({
|
|
679
|
-
display: "flex",
|
|
680
|
-
borderRadius: "4px",
|
|
681
|
-
background: "none",
|
|
682
|
-
flexDirection: "row",
|
|
683
|
-
alignItems: "center",
|
|
684
|
-
justifyContent: "center",
|
|
685
|
-
border: "0"
|
|
686
|
-
}), pt = S("div")({
|
|
687
|
-
width: "24px",
|
|
688
|
-
textAlign: "center"
|
|
689
|
-
}), mt = ({ error: e = "", scorePointsValue: t, scoreDescriptor: n, pluginProps: r, onChange: i, showScorePointLabels: a, alignToRight: o, spellCheck: s, uploadSoundSupport: c, imageSupport: l = {}, mathMlOptions: u = {} }) => /* @__PURE__ */ z(rt, { children: /* @__PURE__ */ z(ut, { children: /* @__PURE__ */ B(a ? dt : ft, { children: [/* @__PURE__ */ z(pt, { children: t }), a ? /* @__PURE__ */ z(E, {
|
|
690
|
-
className: "editable-label",
|
|
691
|
-
error: e,
|
|
692
|
-
markup: n,
|
|
693
|
-
placeholder: " Enter Label",
|
|
694
|
-
onChange: i,
|
|
695
|
-
pluginProps: r,
|
|
696
|
-
activePlugins: Ge,
|
|
697
|
-
spellCheck: s,
|
|
698
|
-
toolbarOpts: o ? { alignment: "right" } : {},
|
|
699
|
-
uploadSoundSupport: c,
|
|
700
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
701
|
-
mathMlOptions: u,
|
|
702
|
-
imageSupport: l,
|
|
703
|
-
autoWidthToolbar: !0
|
|
704
|
-
}) : null] }) }) }), ht = S(s)(({ theme: e }) => ({
|
|
705
|
-
"&.MuiInputBase-root": {
|
|
706
|
-
background: e.palette.common.white,
|
|
707
|
-
marginTop: e.spacing(1),
|
|
708
|
-
"label + &": { width: "80px" }
|
|
709
|
-
},
|
|
710
|
-
"& .MuiInputBase-input": {
|
|
711
|
-
borderRadius: "4px",
|
|
712
|
-
position: "relative",
|
|
713
|
-
border: Y,
|
|
714
|
-
fontSize: e.typography.fontSize,
|
|
715
|
-
fontFamily: "Cerebri Sans",
|
|
716
|
-
padding: `${e.spacing(1)} ${e.spacing(1.5)}`,
|
|
717
|
-
"&:focus": { borderRadius: "4px" }
|
|
718
|
-
}
|
|
719
|
-
})), gt = (e) => Array.from({ length: e }, (e, t) => t + 1), _t = ({ maxPoints: e, onChange: t, maxMaxPoints: n }) => /* @__PURE__ */ z(Ye, {
|
|
720
|
-
label: "Max Points",
|
|
721
|
-
children: /* @__PURE__ */ z(a, {
|
|
722
|
-
value: e,
|
|
723
|
-
onChange: t,
|
|
724
|
-
input: /* @__PURE__ */ z(ht, {}),
|
|
725
|
-
MenuProps: { transitionDuration: {
|
|
726
|
-
enter: 225,
|
|
727
|
-
exit: 195
|
|
728
|
-
} },
|
|
729
|
-
children: gt(n).map((e) => /* @__PURE__ */ z(f, {
|
|
730
|
-
value: e,
|
|
731
|
-
children: e
|
|
732
|
-
}, `menu-item-${e}`))
|
|
733
|
-
})
|
|
734
|
-
}), vt = S("div")(({ theme: e }) => ({
|
|
735
|
-
display: "flex",
|
|
736
|
-
justifyContent: "space-between",
|
|
737
|
-
alignItems: "center",
|
|
738
|
-
margin: `${e.spacing(1.5)} 0`
|
|
739
|
-
})), yt = ({ markup: e, onChange: t, pluginProps: n, label: r, spellCheck: i, uploadSoundSupport: a, mathMlOptions: o = {}, imageSupport: s = {} }) => /* @__PURE__ */ z(rt, { children: /* @__PURE__ */ B(vt, { children: [r && /* @__PURE__ */ z("div", { children: r }), /* @__PURE__ */ z(E, {
|
|
740
|
-
className: "editable-level",
|
|
741
|
-
markup: e,
|
|
742
|
-
onChange: t,
|
|
743
|
-
placeholder: "Trait Label",
|
|
744
|
-
pluginProps: n,
|
|
745
|
-
activePlugins: Ge,
|
|
746
|
-
spellCheck: i,
|
|
747
|
-
uploadSoundSupport: a,
|
|
748
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
749
|
-
mathMlOptions: o,
|
|
750
|
-
imageSupport: s,
|
|
751
|
-
autoWidthToolbar: !0
|
|
752
|
-
})] }) }), bt = S("div")({
|
|
753
|
-
width: "100%",
|
|
754
|
-
display: "flex",
|
|
755
|
-
justifyContent: "center",
|
|
756
|
-
alignItems: "center"
|
|
757
|
-
}), xt = ({ error: e, markup: t, onChange: n, pluginProps: r, label: i, placeholder: a, spellCheck: o, uploadSoundSupport: s, imageSupport: c = {}, mathMlOptions: l = {} }) => /* @__PURE__ */ z(rt, { children: /* @__PURE__ */ B(bt, { children: [i && /* @__PURE__ */ z("div", { children: i }), /* @__PURE__ */ z(E, {
|
|
758
|
-
className: "underlined-editable-level",
|
|
759
|
-
error: e,
|
|
760
|
-
markup: t,
|
|
761
|
-
onChange: n,
|
|
762
|
-
placeholder: a,
|
|
763
|
-
pluginProps: r,
|
|
764
|
-
activePlugins: Ge,
|
|
765
|
-
spellCheck: o,
|
|
766
|
-
uploadSoundSupport: s,
|
|
767
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
768
|
-
mathMlOptions: l,
|
|
769
|
-
imageSupport: c,
|
|
770
|
-
autoWidthToolbar: !0
|
|
771
|
-
})] }) }), St = ({ error: e, markup: t, onChange: n, pluginProps: r, placeholder: i, alignToRight: a, spellCheck: o, uploadSoundSupport: s, mathMlOptions: c = {}, imageSupport: l = {} }) => /* @__PURE__ */ z(rt, { children: /* @__PURE__ */ z(E, {
|
|
772
|
-
className: "expanded-input-prompt",
|
|
773
|
-
error: e,
|
|
774
|
-
markup: t,
|
|
775
|
-
onChange: n,
|
|
776
|
-
placeholder: i,
|
|
777
|
-
pluginProps: r,
|
|
778
|
-
toolbarOpts: a ? { alignment: "right" } : {},
|
|
779
|
-
spellCheck: o,
|
|
780
|
-
uploadSoundSupport: s,
|
|
781
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
782
|
-
autoWidthToolbar: !0,
|
|
783
|
-
mathMlOptions: c,
|
|
784
|
-
imageSupport: l
|
|
785
|
-
}) }), Ct = S("div")(({ theme: e }) => ({
|
|
786
|
-
display: "flex",
|
|
787
|
-
justifyContent: "space-between",
|
|
788
|
-
alignItems: "flex-end",
|
|
789
|
-
paddingBottom: "18px",
|
|
790
|
-
gap: e.spacing(.25)
|
|
791
|
-
})), wt = S("div")(({ theme: e }) => ({
|
|
792
|
-
position: "absolute",
|
|
793
|
-
zIndex: 10,
|
|
794
|
-
cursor: "pointer",
|
|
795
|
-
right: 0,
|
|
796
|
-
alignItems: "flex-start",
|
|
797
|
-
justifyContent: "center",
|
|
798
|
-
background: `linear-gradient(to left, ${e.palette.common.white}, ${c.background()})`,
|
|
799
|
-
boxSizing: "border-box"
|
|
800
|
-
})), Tt = S("div")(({ theme: e }) => ({
|
|
801
|
-
position: "absolute",
|
|
802
|
-
zIndex: 11,
|
|
803
|
-
cursor: "pointer",
|
|
804
|
-
right: 0,
|
|
805
|
-
alignItems: "flex-start",
|
|
806
|
-
justifyContent: "center",
|
|
807
|
-
background: `linear-gradient(to left, ${e.palette.common.white}, ${c.background()})`,
|
|
808
|
-
boxSizing: "border-box",
|
|
809
|
-
"& svg": {
|
|
810
|
-
position: "absolute",
|
|
811
|
-
bottom: "-24px"
|
|
812
|
-
}
|
|
813
|
-
})), Et = ({ children: e, show: t, width: n, onClick: r, left: i, showLevelTagInput: a }) => /* @__PURE__ */ z(wt, {
|
|
814
|
-
style: {
|
|
815
|
-
height: "-webkit-fill-available",
|
|
816
|
-
display: t ? "flex" : "none",
|
|
817
|
-
width: n,
|
|
818
|
-
left: i,
|
|
819
|
-
background: i ? `linear-gradient(to right, white, ${c.background()})` : void 0
|
|
820
|
-
},
|
|
821
|
-
onClick: r,
|
|
822
|
-
children: /* @__PURE__ */ z(Tt, {
|
|
823
|
-
style: {
|
|
824
|
-
display: t ? "flex" : "none",
|
|
825
|
-
width: n,
|
|
826
|
-
height: a ? tt : et,
|
|
827
|
-
left: 0,
|
|
828
|
-
background: i ? `linear-gradient(to right, ${c.secondaryBackground()}, ${c.background()})` : void 0
|
|
829
|
-
},
|
|
830
|
-
onClick: r,
|
|
831
|
-
children: e
|
|
832
|
-
})
|
|
833
|
-
});
|
|
834
|
-
//#endregion
|
|
835
|
-
//#region ../multi-trait-rubric/dist/author/traitsHeader.js
|
|
836
|
-
function Dt(e) {
|
|
837
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
838
|
-
}
|
|
839
|
-
function Ot(e, t) {
|
|
840
|
-
return !e || Dt(e) ? e : Dt(e.default) ? e.default : t && Dt(e[t]) ? e[t] : t && Dt(e[t]?.default) ? e[t].default : e;
|
|
841
|
-
}
|
|
842
|
-
var kt = Ot(g, "InlineMenu") || Ot(Mt.InlineMenu, "InlineMenu"), At = t, jt = At.default, Mt = jt && typeof jt == "object" ? jt : At, Nt = S("div")({
|
|
843
|
-
width: "140px",
|
|
844
|
-
border: "none",
|
|
845
|
-
padding: "10px 0",
|
|
846
|
-
display: "flex",
|
|
847
|
-
alignItems: "center",
|
|
848
|
-
justifyContent: "space-around"
|
|
849
|
-
}), Pt = S("div")(({ height: e, theme: t }) => ({
|
|
850
|
-
background: c.secondaryBackground(),
|
|
851
|
-
borderRadius: "4px",
|
|
852
|
-
position: "relative",
|
|
853
|
-
marginBottom: t.spacing(2),
|
|
854
|
-
display: "flex",
|
|
855
|
-
height: e
|
|
856
|
-
})), Ft = S("div")(({ theme: e }) => ({
|
|
857
|
-
width: "200px",
|
|
858
|
-
minWidth: "200px",
|
|
859
|
-
position: "relative",
|
|
860
|
-
padding: "0 10px",
|
|
861
|
-
boxSizing: "border-box",
|
|
862
|
-
paddingTop: e.spacing(1.5),
|
|
863
|
-
alignSelf: "center"
|
|
864
|
-
})), It = S("div")(({ theme: e }) => ({
|
|
865
|
-
position: "absolute",
|
|
866
|
-
fontSize: e.typography.fontSize - 2,
|
|
867
|
-
color: e.palette.error.main,
|
|
868
|
-
paddingTop: e.spacing(.5)
|
|
869
|
-
})), Lt = class extends R.Component {
|
|
870
|
-
static propTypes = {
|
|
871
|
-
maxPointsEnabled: H.default.bool,
|
|
872
|
-
spellCheck: H.default.bool,
|
|
873
|
-
errors: H.default.object
|
|
874
|
-
};
|
|
875
|
-
state = { anchorEl: null };
|
|
876
|
-
UNSAFE_componentWillReceiveProps(e) {
|
|
877
|
-
e.currentPosition !== this.props.currentPosition && this.scrollToPosition(e.currentPosition);
|
|
878
|
-
}
|
|
879
|
-
onScorePointLabelChange = ({ scorePointLabel: e, value: t }) => {
|
|
880
|
-
let { scorePointsLabels: n, onScaleChange: r } = this.props;
|
|
881
|
-
t < 0 || t >= n.length || (n[t] = e, r({ scorePointsLabels: n }));
|
|
882
|
-
};
|
|
883
|
-
handleClick = (e) => this.setState({ anchorEl: e.currentTarget });
|
|
884
|
-
handleClose = () => this.setState({ anchorEl: null });
|
|
885
|
-
scrollToPosition = (e) => {
|
|
886
|
-
this.secondaryBlock && this.secondaryBlock.scrollTo({ left: e });
|
|
887
|
-
};
|
|
888
|
-
openMenu = () => {
|
|
889
|
-
this.props.showDeleteScaleModal(), this.handleClose();
|
|
890
|
-
};
|
|
891
|
-
render() {
|
|
892
|
-
let { scorePointsValues: e, scorePointsLabels: t, traitLabel: n, currentPosition: r, showStandards: i, onTraitLabelChange: a, showDescription: o, showLevelTagInput: s, maxPoints: c, updateMaxPointsFieldValue: d, scaleIndex: p, showScorePointLabels: m, secondaryBlockWidth: h, setSecondaryBlockRef: g, spellCheck: _, uploadSoundSupport: v, maxPointsEnabled: y, mathMlOptions: b = {}, errors: x = {}, maxMaxPoints: S, labelPluginProps: C = {}, imageSupport: w = {} } = this.props, { anchorEl: T } = this.state;
|
|
893
|
-
return /* @__PURE__ */ B(Pt, {
|
|
894
|
-
height: s ? tt : et,
|
|
895
|
-
children: [/* @__PURE__ */ B(Ft, { children: [s && /* @__PURE__ */ z(yt, {
|
|
896
|
-
markup: n || "Trait",
|
|
897
|
-
onChange: a,
|
|
898
|
-
pluginProps: C,
|
|
899
|
-
spellCheck: _,
|
|
900
|
-
label: "Level Label",
|
|
901
|
-
uploadSoundSupport: v,
|
|
902
|
-
mathMlOptions: b,
|
|
903
|
-
imageSupport: w
|
|
904
|
-
}), /* @__PURE__ */ B(Ct, { children: [
|
|
905
|
-
/* @__PURE__ */ B("div", { children: ["Scale ", p + 1] }),
|
|
906
|
-
y && /* @__PURE__ */ z(_t, {
|
|
907
|
-
maxPoints: c,
|
|
908
|
-
maxMaxPoints: S,
|
|
909
|
-
onChange: d
|
|
910
|
-
}),
|
|
911
|
-
/* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z(l, {
|
|
912
|
-
"aria-label": "more",
|
|
913
|
-
"aria-controls": "long-menu",
|
|
914
|
-
"aria-haspopup": "true",
|
|
915
|
-
onClick: this.handleClick,
|
|
916
|
-
size: "large",
|
|
917
|
-
children: /* @__PURE__ */ z(u, {})
|
|
918
|
-
}), /* @__PURE__ */ z(kt, {
|
|
919
|
-
id: "long-menu",
|
|
920
|
-
anchorEl: T,
|
|
921
|
-
keepMounted: !0,
|
|
922
|
-
open: !!T,
|
|
923
|
-
onClose: this.handleClose,
|
|
924
|
-
transitionDuration: {
|
|
925
|
-
enter: 225,
|
|
926
|
-
exit: 195
|
|
927
|
-
},
|
|
928
|
-
children: ["Remove Scale"].map((e) => /* @__PURE__ */ z(f, {
|
|
929
|
-
onClick: this.openMenu,
|
|
930
|
-
children: e
|
|
931
|
-
}, e))
|
|
932
|
-
})] })
|
|
933
|
-
] })] }), /* @__PURE__ */ B(ct, {
|
|
934
|
-
setRef: (e) => {
|
|
935
|
-
e && (this.secondaryBlock = e, g(e));
|
|
936
|
-
},
|
|
937
|
-
width: `${h}px`,
|
|
938
|
-
children: [
|
|
939
|
-
i && /* @__PURE__ */ z(X, { children: /* @__PURE__ */ z(Nt, { children: "Standard(s)" }) }),
|
|
940
|
-
o && /* @__PURE__ */ z(X, { children: /* @__PURE__ */ z(Nt, { children: "Description" }) }),
|
|
941
|
-
e.map((n, i) => {
|
|
942
|
-
let a = h - 216 * i + r - 128, o = e.length - i - 1, s, l;
|
|
943
|
-
try {
|
|
944
|
-
s = t[o] || "", l = x[o] || "";
|
|
945
|
-
} catch {
|
|
946
|
-
s = "";
|
|
947
|
-
}
|
|
948
|
-
return /* @__PURE__ */ B(X, { children: [/* @__PURE__ */ z(mt, {
|
|
949
|
-
scorePointsValue: n,
|
|
950
|
-
error: l,
|
|
951
|
-
scoreDescriptor: s,
|
|
952
|
-
pluginProps: C,
|
|
953
|
-
showScorePointLabels: m,
|
|
954
|
-
onChange: (e) => this.onScorePointLabelChange({
|
|
955
|
-
scorePointLabel: e,
|
|
956
|
-
value: o
|
|
957
|
-
}),
|
|
958
|
-
alignToRight: a < 296 && n < c,
|
|
959
|
-
spellCheck: _,
|
|
960
|
-
uploadSoundSupport: v,
|
|
961
|
-
mathMlOptions: b,
|
|
962
|
-
imageSupport: w
|
|
963
|
-
}), l && /* @__PURE__ */ z(It, { children: l })] }, `secondary-block-part-${i}`);
|
|
964
|
-
})
|
|
965
|
-
]
|
|
966
|
-
})]
|
|
967
|
-
});
|
|
968
|
-
}
|
|
969
|
-
};
|
|
970
|
-
//#endregion
|
|
971
|
-
//#region ../multi-trait-rubric/dist/author/trait.js
|
|
972
|
-
Lt.propTypes = {
|
|
973
|
-
onTraitLabelChange: H.default.func,
|
|
974
|
-
onScaleChange: H.default.func,
|
|
975
|
-
scorePointsValues: H.default.arrayOf(H.default.number),
|
|
976
|
-
scorePointsLabels: H.default.arrayOf(H.default.string),
|
|
977
|
-
traitLabel: H.default.string,
|
|
978
|
-
showStandards: H.default.bool,
|
|
979
|
-
showLevelTagInput: H.default.bool,
|
|
980
|
-
showDescription: H.default.bool,
|
|
981
|
-
maxPoints: H.default.number,
|
|
982
|
-
updateMaxPointsFieldValue: H.default.func,
|
|
983
|
-
scaleIndex: H.default.number,
|
|
984
|
-
currentPosition: H.default.number,
|
|
985
|
-
secondaryBlockWidth: H.default.number,
|
|
986
|
-
showDeleteScaleModal: H.default.func,
|
|
987
|
-
showScorePointLabels: H.default.bool,
|
|
988
|
-
setSecondaryBlockRef: H.default.func,
|
|
989
|
-
uploadSoundSupport: H.default.object,
|
|
990
|
-
maxMaxPoints: H.default.number,
|
|
991
|
-
labelPluginProps: H.default.object,
|
|
992
|
-
imageSupport: H.default.shape({
|
|
993
|
-
add: H.default.func.isRequired,
|
|
994
|
-
delete: H.default.func.isRequired
|
|
995
|
-
})
|
|
996
|
-
}, (0, Ae.default)("@pie-element:placement-ordering:configure:trait-tile");
|
|
997
|
-
var Rt = S(h)({ color: c.text() }), zt = S(ot)(({ theme: e }) => ({
|
|
998
|
-
display: "flex",
|
|
999
|
-
flexDirection: "column",
|
|
1000
|
-
justifyContent: "space-between",
|
|
1001
|
-
marginBottom: e.spacing(5),
|
|
1002
|
-
touchAction: "none"
|
|
1003
|
-
})), Bt = S("div")({
|
|
1004
|
-
display: "flex",
|
|
1005
|
-
alignItems: "center",
|
|
1006
|
-
width: "100%",
|
|
1007
|
-
cursor: "pointer"
|
|
1008
|
-
}), Vt = S(l)({ marginLeft: "auto" }), Ht = S("div")({
|
|
1009
|
-
display: "flex",
|
|
1010
|
-
whiteSpace: "break-spaces"
|
|
1011
|
-
}), Ut = S("div")(({ theme: e }) => ({
|
|
1012
|
-
fontSize: e.typography.fontSize - 2,
|
|
1013
|
-
color: e.palette.error.main,
|
|
1014
|
-
paddingBottom: e.spacing(1)
|
|
1015
|
-
}));
|
|
1016
|
-
function Wt({ error: e, trait: { name: t, standards: n, description: r, scorePointsDescriptors: i }, traitLabel: a, scorePointsValues: o, showStandards: s, showDescription: c, enableDragAndDrop: l, currentPosition: p, secondaryBlockWidth: m, spellCheck: h, maxPoints: _, uploadSoundSupport: v, mathMlOptions: y = {}, expandedPluginProps: b = {}, labelPluginProps: x = {}, imageSupport: S = {}, index: w, onTraitChanged: T, onTraitRemoved: E, onTraitDropped: ee }) {
|
|
1017
|
-
let [D, O] = R.useState(null), k = R.useRef(null), { attributes: A, listeners: j, setNodeRef: M, transform: N, isDragging: te } = C({
|
|
1018
|
-
id: `trait-${w}`,
|
|
1019
|
-
data: {
|
|
1020
|
-
type: "trait",
|
|
1021
|
-
index: w,
|
|
1022
|
-
name: t
|
|
1023
|
-
}
|
|
1024
|
-
}), { setNodeRef: P } = pe({
|
|
1025
|
-
id: `trait-drop-${w}`,
|
|
1026
|
-
data: {
|
|
1027
|
-
type: "trait",
|
|
1028
|
-
index: w
|
|
1029
|
-
}
|
|
1030
|
-
});
|
|
1031
|
-
R.useLayoutEffect(() => {
|
|
1032
|
-
p !== void 0 && k.current && k.current.scrollTo({ left: p });
|
|
1033
|
-
}, [p]);
|
|
1034
|
-
let F = (e) => {
|
|
1035
|
-
d(e) || T({
|
|
1036
|
-
name: t,
|
|
1037
|
-
standards: n,
|
|
1038
|
-
description: r,
|
|
1039
|
-
scorePointsDescriptors: i,
|
|
1040
|
-
...e
|
|
1041
|
-
});
|
|
1042
|
-
}, ne = ({ descriptor: e, value: t }) => {
|
|
1043
|
-
if (t < 0 || t >= i.length) return;
|
|
1044
|
-
let n = [...i];
|
|
1045
|
-
n[t] = e, F({ scorePointsDescriptors: n });
|
|
1046
|
-
}, re = (e) => O(e.currentTarget), I = () => O(null), ie = () => {
|
|
1047
|
-
E(), I();
|
|
1048
|
-
};
|
|
1049
|
-
return /* @__PURE__ */ z("div", {
|
|
1050
|
-
ref: P,
|
|
1051
|
-
style: N ? {
|
|
1052
|
-
transform: `translate3d(${N.x}px, ${N.y}px, 0)`,
|
|
1053
|
-
opacity: te ? .5 : 1
|
|
1054
|
-
} : {},
|
|
1055
|
-
children: /* @__PURE__ */ B(lt, { children: [/* @__PURE__ */ B(zt, { children: [
|
|
1056
|
-
/* @__PURE__ */ B(Bt, { children: [
|
|
1057
|
-
l && /* @__PURE__ */ z("span", {
|
|
1058
|
-
ref: M,
|
|
1059
|
-
...A,
|
|
1060
|
-
...j,
|
|
1061
|
-
children: /* @__PURE__ */ z(Rt, {})
|
|
1062
|
-
}),
|
|
1063
|
-
/* @__PURE__ */ z(Vt, {
|
|
1064
|
-
"aria-label": "more",
|
|
1065
|
-
"aria-controls": "long-menu",
|
|
1066
|
-
"aria-haspopup": "true",
|
|
1067
|
-
onClick: re,
|
|
1068
|
-
size: "large",
|
|
1069
|
-
children: /* @__PURE__ */ z(u, {})
|
|
1070
|
-
}),
|
|
1071
|
-
/* @__PURE__ */ z(g, {
|
|
1072
|
-
id: "long-menu",
|
|
1073
|
-
anchorEl: D,
|
|
1074
|
-
keepMounted: !0,
|
|
1075
|
-
open: !!D,
|
|
1076
|
-
onClose: I,
|
|
1077
|
-
transitionDuration: {
|
|
1078
|
-
enter: 225,
|
|
1079
|
-
exit: 195
|
|
1080
|
-
},
|
|
1081
|
-
children: /* @__PURE__ */ z(f, {
|
|
1082
|
-
onClick: ie,
|
|
1083
|
-
children: /* @__PURE__ */ z(Ht, { dangerouslySetInnerHTML: { __html: `Remove ${t || a}` } })
|
|
1084
|
-
})
|
|
1085
|
-
})
|
|
1086
|
-
] }),
|
|
1087
|
-
/* @__PURE__ */ z(xt, {
|
|
1088
|
-
markup: t,
|
|
1089
|
-
error: e?.name || "",
|
|
1090
|
-
onChange: (e) => F({ name: e }),
|
|
1091
|
-
pluginProps: x,
|
|
1092
|
-
placeholder: `Enter ${a}`,
|
|
1093
|
-
spellCheck: h,
|
|
1094
|
-
uploadSoundSupport: v,
|
|
1095
|
-
mathMlOptions: y,
|
|
1096
|
-
imageSupport: S
|
|
1097
|
-
}),
|
|
1098
|
-
e && /* @__PURE__ */ z(Ut, { children: e.name || "" })
|
|
1099
|
-
] }), /* @__PURE__ */ B(ct, {
|
|
1100
|
-
setRef: (e) => {
|
|
1101
|
-
k.current = e;
|
|
1102
|
-
},
|
|
1103
|
-
width: `${m}px`,
|
|
1104
|
-
children: [
|
|
1105
|
-
s && n && /* @__PURE__ */ z(X, { children: /* @__PURE__ */ z(St, {
|
|
1106
|
-
placeholder: "Standards",
|
|
1107
|
-
markup: n.join(","),
|
|
1108
|
-
onChange: (e) => F({ standards: e.split(",") }),
|
|
1109
|
-
pluginProps: b,
|
|
1110
|
-
spellCheck: h,
|
|
1111
|
-
uploadSoundSupport: v,
|
|
1112
|
-
mathMlOptions: y,
|
|
1113
|
-
imageSupport: S
|
|
1114
|
-
}) }),
|
|
1115
|
-
c && /* @__PURE__ */ B(X, { children: [/* @__PURE__ */ z(St, {
|
|
1116
|
-
placeholder: "Enter Description",
|
|
1117
|
-
markup: r,
|
|
1118
|
-
error: e?.description || "",
|
|
1119
|
-
onChange: (e) => F({ description: e }),
|
|
1120
|
-
pluginProps: b,
|
|
1121
|
-
spellCheck: h,
|
|
1122
|
-
uploadSoundSupport: v,
|
|
1123
|
-
mathMlOptions: y,
|
|
1124
|
-
imageSupport: S
|
|
1125
|
-
}), e && /* @__PURE__ */ z(Ut, { children: e.description || "" })] }),
|
|
1126
|
-
(o || []).map((e, t) => {
|
|
1127
|
-
let n = m - 216 * t + p - 98, r = o.length - t - 1, a;
|
|
1128
|
-
try {
|
|
1129
|
-
a = i[r] || "";
|
|
1130
|
-
} catch {
|
|
1131
|
-
a = "";
|
|
1132
|
-
}
|
|
1133
|
-
return /* @__PURE__ */ z(X, { children: /* @__PURE__ */ z(St, {
|
|
1134
|
-
placeholder: "Enter Descriptor",
|
|
1135
|
-
markup: a,
|
|
1136
|
-
onChange: (e) => ne({
|
|
1137
|
-
descriptor: e,
|
|
1138
|
-
value: r
|
|
1139
|
-
}),
|
|
1140
|
-
pluginProps: b,
|
|
1141
|
-
alignToRight: n < 296 && e < _,
|
|
1142
|
-
spellCheck: h,
|
|
1143
|
-
uploadSoundSupport: v,
|
|
1144
|
-
mathMlOptions: y,
|
|
1145
|
-
imageSupport: S
|
|
1146
|
-
}) }, `key-key-${t}`);
|
|
1147
|
-
})
|
|
1148
|
-
]
|
|
1149
|
-
})] })
|
|
1150
|
-
});
|
|
1151
|
-
}
|
|
1152
|
-
Wt.propTypes = {
|
|
1153
|
-
error: H.default.object,
|
|
1154
|
-
index: H.default.number.isRequired,
|
|
1155
|
-
onTraitChanged: H.default.func.isRequired,
|
|
1156
|
-
onTraitRemoved: H.default.func.isRequired,
|
|
1157
|
-
onTraitDropped: H.default.func,
|
|
1158
|
-
trait: H.default.shape({
|
|
1159
|
-
name: H.default.string,
|
|
1160
|
-
standards: H.default.arrayOf(H.default.string),
|
|
1161
|
-
scorePointsDescriptors: H.default.arrayOf(H.default.string),
|
|
1162
|
-
description: H.default.string
|
|
1163
|
-
}),
|
|
1164
|
-
traitLabel: H.default.string,
|
|
1165
|
-
scorePointsValues: H.default.arrayOf(H.default.number),
|
|
1166
|
-
showStandards: H.default.bool,
|
|
1167
|
-
showDescription: H.default.bool,
|
|
1168
|
-
maxPoints: H.default.number,
|
|
1169
|
-
enableDragAndDrop: H.default.bool,
|
|
1170
|
-
currentPosition: H.default.number,
|
|
1171
|
-
secondaryBlockWidth: H.default.number,
|
|
1172
|
-
spellCheck: H.default.bool,
|
|
1173
|
-
uploadSoundSupport: H.default.object,
|
|
1174
|
-
mathMlOptions: H.default.object,
|
|
1175
|
-
expandedPluginProps: H.default.object,
|
|
1176
|
-
labelPluginProps: H.default.object,
|
|
1177
|
-
imageSupport: H.default.shape({
|
|
1178
|
-
add: H.default.func.isRequired,
|
|
1179
|
-
delete: H.default.func.isRequired
|
|
1180
|
-
})
|
|
1181
|
-
};
|
|
1182
|
-
//#endregion
|
|
1183
|
-
//#region ../../lib-react/drag/dist/drag-provider.js
|
|
1184
|
-
function Gt({ children: e, onDragEnd: t, onDragStart: r, collisionDetection: i, modifiers: a, autoScroll: o }) {
|
|
1185
|
-
let [s, c] = ge(null);
|
|
1186
|
-
return /* @__PURE__ */ z(b, {
|
|
1187
|
-
sensors: n(m(me, { activationConstraint: { distance: 8 } }), m(de)),
|
|
1188
|
-
onDragStart: (e) => {
|
|
1189
|
-
c(e.active.id), r && r(e);
|
|
1190
|
-
},
|
|
1191
|
-
onDragEnd: (e) => {
|
|
1192
|
-
c(null), t && t(e);
|
|
1193
|
-
},
|
|
1194
|
-
collisionDetection: i,
|
|
1195
|
-
modifiers: a,
|
|
1196
|
-
autoScroll: o,
|
|
1197
|
-
children: e
|
|
1198
|
-
});
|
|
1199
|
-
}
|
|
1200
|
-
Gt.propTypes = {
|
|
1201
|
-
children: H.default.node.isRequired,
|
|
1202
|
-
onDragEnd: H.default.func,
|
|
1203
|
-
onDragStart: H.default.func,
|
|
1204
|
-
collisionDetection: H.default.func,
|
|
1205
|
-
modifiers: H.default.arrayOf(H.default.func),
|
|
1206
|
-
autoScroll: H.default.object
|
|
1207
|
-
};
|
|
1208
|
-
//#endregion
|
|
1209
|
-
//#region ../multi-trait-rubric/dist/author/scale.js
|
|
1210
|
-
var Z = 216, Kt = S("div")(({ theme: e }) => ({
|
|
1211
|
-
display: "flex",
|
|
1212
|
-
flexDirection: "column",
|
|
1213
|
-
wordBreak: "break-word",
|
|
1214
|
-
position: "relative",
|
|
1215
|
-
marginBottom: e.spacing(2.5)
|
|
1216
|
-
})), qt = class extends R.Component {
|
|
1217
|
-
state = {
|
|
1218
|
-
showDecreaseMaxPointsDialog: !1,
|
|
1219
|
-
showDeleteScaleDialog: !1,
|
|
1220
|
-
showDeleteTraitDialog: !1,
|
|
1221
|
-
currentPosition: 0,
|
|
1222
|
-
showRight: null,
|
|
1223
|
-
showLeft: null,
|
|
1224
|
-
showInfoDialog: !1,
|
|
1225
|
-
infoDialogText: ""
|
|
1226
|
-
};
|
|
1227
|
-
set = (e) => this.setState(e);
|
|
1228
|
-
componentDidMount() {
|
|
1229
|
-
this.state.showRight === null && this.secondaryBlockRef && this.setState({ showRight: this.getMaxScroll() });
|
|
1230
|
-
}
|
|
1231
|
-
componentDidUpdate(e) {
|
|
1232
|
-
(e.scale.maxPoints !== this.props.scale.maxPoints || e.showDescription !== this.props.showDescription || e.excludeZero !== this.props.excludeZero) && this.setState({ showRight: this.getMaxScroll() });
|
|
1233
|
-
}
|
|
1234
|
-
UNSAFE_componentWillReceiveProps(e) {
|
|
1235
|
-
(e.excludeZero !== this.props.excludeZero || e.showStandards !== this.props.showStandards || e.showDescription !== this.props.showDescription) && this.setState({
|
|
1236
|
-
currentPosition: 0,
|
|
1237
|
-
showLeft: !1,
|
|
1238
|
-
showRight: this.getMaxScroll()
|
|
1239
|
-
});
|
|
1240
|
-
}
|
|
1241
|
-
updateMaxPointsFieldValue = ({ target: e }) => {
|
|
1242
|
-
let { scale: t, scaleIndex: n, onScaleChanged: r } = this.props || {}, { maxPoints: i } = t, a = parseInt(e.value, 10);
|
|
1243
|
-
this.setState({
|
|
1244
|
-
currentPosition: 0,
|
|
1245
|
-
showLeft: !1,
|
|
1246
|
-
showRight: this.getMaxScroll()
|
|
1247
|
-
}), a < i ? this.showDecreaseMaxPointsModal({ newMaxPoints: a }) : r(n, { maxPoints: a });
|
|
1248
|
-
};
|
|
1249
|
-
showDecreaseMaxPointsModal = ({ newMaxPoints: e }) => this.set({
|
|
1250
|
-
showDecreaseMaxPointsDialog: !0,
|
|
1251
|
-
newMaxPoints: e
|
|
1252
|
-
});
|
|
1253
|
-
hideDecreaseMaxPointsModal = () => this.set({
|
|
1254
|
-
showDecreaseMaxPointsDialog: !1,
|
|
1255
|
-
newMaxPoints: void 0
|
|
1256
|
-
});
|
|
1257
|
-
changeMaxPoints = () => {
|
|
1258
|
-
let { newMaxPoints: e } = this.state || {}, { scaleIndex: t, onScaleChanged: n } = this.props || {};
|
|
1259
|
-
e && n(t, { maxPoints: e }), this.hideDecreaseMaxPointsModal();
|
|
1260
|
-
};
|
|
1261
|
-
showDeleteScaleModal = () => this.set({ showDeleteScaleDialog: !0 });
|
|
1262
|
-
hideDeleteScaleModal = () => this.set({ showDeleteScaleDialog: !1 });
|
|
1263
|
-
deleteScale = () => {
|
|
1264
|
-
let { scaleIndex: e, onScaleRemoved: t } = this.props || {};
|
|
1265
|
-
this.hideDeleteScaleModal(), t(e);
|
|
1266
|
-
};
|
|
1267
|
-
showDeleteTraitModal = (e) => this.set({
|
|
1268
|
-
showDeleteTraitDialog: !0,
|
|
1269
|
-
traitToDeleteIndex: e
|
|
1270
|
-
});
|
|
1271
|
-
hideDeleteTraitModal = () => this.set({
|
|
1272
|
-
showDeleteTraitDialog: !1,
|
|
1273
|
-
traitToDeleteIndex: void 0
|
|
1274
|
-
});
|
|
1275
|
-
onTraitRemoved = () => {
|
|
1276
|
-
let { traitToDeleteIndex: e } = this.state, { scale: t, scaleIndex: n, onScaleChanged: r, minNoOfTraits: i } = this.props || {}, { traits: a, traitLabel: o } = t || {};
|
|
1277
|
-
if (!(e < 0 || e >= a.length)) {
|
|
1278
|
-
if (a.length === i) return this.set({
|
|
1279
|
-
infoDialogText: `There can't be less than ${i} ${(o || "trait").toLowerCase()}s.`,
|
|
1280
|
-
showInfoDialog: !0
|
|
1281
|
-
}), !1;
|
|
1282
|
-
a = [...a.slice(0, e), ...a.slice(e + 1)], r(n, { traits: a }), this.hideDeleteTraitModal();
|
|
1283
|
-
}
|
|
1284
|
-
};
|
|
1285
|
-
onTraitAdded = () => {
|
|
1286
|
-
let { scale: e, scaleIndex: t, onScaleChanged: n, maxNoOfTraits: r } = this.props || {}, { traits: i, scorePointsLabels: a } = e || {};
|
|
1287
|
-
if (i.length === r) return this.set({
|
|
1288
|
-
infoDialogText: `There can't be more than ${r} scales.`,
|
|
1289
|
-
showInfoDialog: !0
|
|
1290
|
-
}), !1;
|
|
1291
|
-
i.push({
|
|
1292
|
-
name: "",
|
|
1293
|
-
description: "",
|
|
1294
|
-
standards: [],
|
|
1295
|
-
scorePointsDescriptors: Array.from({ length: a.length }, () => "")
|
|
1296
|
-
}), n(t, { traits: i });
|
|
1297
|
-
};
|
|
1298
|
-
onTraitChanged = (e, t) => {
|
|
1299
|
-
let { scale: n, scaleIndex: r, onScaleChanged: i } = this.props || {}, { traits: a } = n || {};
|
|
1300
|
-
e >= 0 && e < a.length && (a[e] = t, i(r, { traits: a }));
|
|
1301
|
-
};
|
|
1302
|
-
onTraitDropped = (e) => {
|
|
1303
|
-
let { active: t, over: n } = e;
|
|
1304
|
-
if (!n || !t) return;
|
|
1305
|
-
let r = t.data.current, i = n.data.current;
|
|
1306
|
-
if (r?.type === "trait" && i?.type === "trait") {
|
|
1307
|
-
let e = r.index, t = i.index;
|
|
1308
|
-
if (e === t) return;
|
|
1309
|
-
let { scale: n, scaleIndex: a, onScaleChanged: o } = this.props || {}, { traits: s } = n || {}, c = s[e], l = s.filter((t, n) => n !== e);
|
|
1310
|
-
o(a, { traits: [
|
|
1311
|
-
...l.slice(0, t),
|
|
1312
|
-
c,
|
|
1313
|
-
...l.slice(t)
|
|
1314
|
-
] });
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
decreasePosition = () => {
|
|
1318
|
-
let { currentPosition: e } = this.state, t = Math.max(e - Z, 0), n = this.getMaxScroll();
|
|
1319
|
-
this.setState({
|
|
1320
|
-
currentPosition: t,
|
|
1321
|
-
showRight: t < n,
|
|
1322
|
-
showLeft: t > 0
|
|
1323
|
-
});
|
|
1324
|
-
};
|
|
1325
|
-
getMaxScroll = () => {
|
|
1326
|
-
if (!this.secondaryBlockRef) return 0;
|
|
1327
|
-
let e = this.secondaryBlockRef.scrollWidth, t = this.getNumberOfBlocks() * 200;
|
|
1328
|
-
return Math.max(0, Math.min(e, t) - this.secondaryBlockRef.offsetWidth);
|
|
1329
|
-
};
|
|
1330
|
-
getNumberOfBlocks = () => {
|
|
1331
|
-
let { scale: e, showStandards: t, showDescription: n, excludeZero: r } = this.props, { maxPoints: i } = e || {}, a = i - +!!r + 1;
|
|
1332
|
-
return +!!t + +!!n + a;
|
|
1333
|
-
};
|
|
1334
|
-
increasePosition = () => {
|
|
1335
|
-
let { currentPosition: e } = this.state, t = this.getMaxScroll(), n = Math.min(e + Z, t);
|
|
1336
|
-
this.setState({
|
|
1337
|
-
currentPosition: n,
|
|
1338
|
-
showRight: n < t,
|
|
1339
|
-
showLeft: n > 0
|
|
1340
|
-
});
|
|
1341
|
-
};
|
|
1342
|
-
render() {
|
|
1343
|
-
let { errors: e, scale: t, scaleIndex: n, showStandards: r, onScaleChanged: i, excludeZero: a, showDescription: o, showLevelTagInput: s, showScorePointLabels: c, enableDragAndDrop: l, spellCheck: u, width: d, uploadSoundSupport: f, maxPointsEnabled: m, mathMlOptions: h = {}, maxMaxPoints: g, expandedPluginProps: _ = {}, labelPluginProps: v = {}, imageSupport: y = {} } = this.props || {}, { maxPoints: b, scorePointsLabels: x, traitLabel: S, traits: C } = t || {}, { showDecreaseMaxPointsDialog: w, showDeleteScaleDialog: T, showDeleteTraitDialog: E, currentPosition: ee, showRight: D, showLeft: O, showInfoDialog: k, infoDialogText: A } = this.state, { traitsErrors: j, scorePointsErrors: M } = e || {}, N = j && j[n] || {}, te = M && M[n] || {}, P = [], F = parseInt(d) - 32 - 200 || 320;
|
|
1344
|
-
for (let e = b; +(e >= a); --e) P.push(e);
|
|
1345
|
-
return /* @__PURE__ */ z(Gt, {
|
|
1346
|
-
onDragEnd: this.onTraitDropped,
|
|
1347
|
-
children: /* @__PURE__ */ B(Kt, {
|
|
1348
|
-
ref: (e) => {
|
|
1349
|
-
this.scaleWrapper = e;
|
|
1350
|
-
},
|
|
1351
|
-
children: [
|
|
1352
|
-
/* @__PURE__ */ z(Lt, {
|
|
1353
|
-
setSecondaryBlockRef: (e) => {
|
|
1354
|
-
e && (this.secondaryBlockRef = e);
|
|
1355
|
-
},
|
|
1356
|
-
errors: te,
|
|
1357
|
-
traitLabel: S,
|
|
1358
|
-
scorePointsValues: P,
|
|
1359
|
-
scorePointsLabels: x,
|
|
1360
|
-
onScaleChange: (e) => i(n, e),
|
|
1361
|
-
onTraitLabelChange: (e) => i(n, { traitLabel: e }),
|
|
1362
|
-
showStandards: r,
|
|
1363
|
-
showDescription: o,
|
|
1364
|
-
showLevelTagInput: s,
|
|
1365
|
-
showScorePointLabels: c,
|
|
1366
|
-
maxPoints: b,
|
|
1367
|
-
updateMaxPointsFieldValue: this.updateMaxPointsFieldValue,
|
|
1368
|
-
scaleIndex: n,
|
|
1369
|
-
showDeleteScaleModal: this.showDeleteScaleModal,
|
|
1370
|
-
currentPosition: ee,
|
|
1371
|
-
secondaryBlockWidth: F,
|
|
1372
|
-
spellCheck: u,
|
|
1373
|
-
uploadSoundSupport: f,
|
|
1374
|
-
maxPointsEnabled: m,
|
|
1375
|
-
mathMlOptions: h,
|
|
1376
|
-
maxMaxPoints: g,
|
|
1377
|
-
expandedPluginProps: _,
|
|
1378
|
-
labelPluginProps: v,
|
|
1379
|
-
imageSupport: y
|
|
1380
|
-
}, "header-key"),
|
|
1381
|
-
C.map((e, t) => /* @__PURE__ */ z(Wt, {
|
|
1382
|
-
index: t,
|
|
1383
|
-
error: N && N[t],
|
|
1384
|
-
trait: e,
|
|
1385
|
-
traitLabel: S || "Trait",
|
|
1386
|
-
scorePointsValues: P,
|
|
1387
|
-
scorePointsLabels: x,
|
|
1388
|
-
onTraitRemoved: () => this.showDeleteTraitModal(t),
|
|
1389
|
-
onTraitChanged: (e) => this.onTraitChanged(t, e),
|
|
1390
|
-
showStandards: r,
|
|
1391
|
-
showDescription: o,
|
|
1392
|
-
maxPoints: b,
|
|
1393
|
-
currentPosition: ee,
|
|
1394
|
-
enableDragAndDrop: l,
|
|
1395
|
-
secondaryBlockWidth: F,
|
|
1396
|
-
spellCheck: u,
|
|
1397
|
-
uploadSoundSupport: f,
|
|
1398
|
-
mathMlOptions: h,
|
|
1399
|
-
expandedPluginProps: _,
|
|
1400
|
-
labelPluginProps: v,
|
|
1401
|
-
imageSupport: y
|
|
1402
|
-
}, t)),
|
|
1403
|
-
/* @__PURE__ */ z(Et, {
|
|
1404
|
-
width: `${Z / 2}px`,
|
|
1405
|
-
show: O,
|
|
1406
|
-
onClick: this.decreasePosition,
|
|
1407
|
-
left: "200px",
|
|
1408
|
-
showLevelTagInput: s,
|
|
1409
|
-
children: /* @__PURE__ */ z(he, {})
|
|
1410
|
-
}),
|
|
1411
|
-
/* @__PURE__ */ z(Et, {
|
|
1412
|
-
width: `${Z / 2}px`,
|
|
1413
|
-
show: D,
|
|
1414
|
-
onClick: this.increasePosition,
|
|
1415
|
-
showLevelTagInput: s,
|
|
1416
|
-
children: /* @__PURE__ */ z(p, {})
|
|
1417
|
-
}),
|
|
1418
|
-
/* @__PURE__ */ z(at, {
|
|
1419
|
-
onClick: this.onTraitAdded,
|
|
1420
|
-
children: /* @__PURE__ */ z("div", { dangerouslySetInnerHTML: { __html: `Add ${S || " Trait"}` } })
|
|
1421
|
-
}),
|
|
1422
|
-
/* @__PURE__ */ z(Ve, {
|
|
1423
|
-
open: !!w,
|
|
1424
|
-
deleteScorePoints: this.changeMaxPoints,
|
|
1425
|
-
cancel: this.hideDecreaseMaxPointsModal
|
|
1426
|
-
}),
|
|
1427
|
-
/* @__PURE__ */ z(He, {
|
|
1428
|
-
open: !!T,
|
|
1429
|
-
scaleIndex: n,
|
|
1430
|
-
deleteScale: this.deleteScale,
|
|
1431
|
-
cancel: this.hideDeleteScaleModal
|
|
1432
|
-
}),
|
|
1433
|
-
/* @__PURE__ */ z(Ue, {
|
|
1434
|
-
open: !!E,
|
|
1435
|
-
deleteTrait: this.onTraitRemoved,
|
|
1436
|
-
cancel: this.hideDeleteTraitModal,
|
|
1437
|
-
traitLabel: S.toLowerCase()
|
|
1438
|
-
}),
|
|
1439
|
-
/* @__PURE__ */ z(We, {
|
|
1440
|
-
open: k,
|
|
1441
|
-
text: A,
|
|
1442
|
-
onClose: () => this.set({ showInfoDialog: !1 })
|
|
1443
|
-
})
|
|
1444
|
-
]
|
|
1445
|
-
}, `scale-${n}`)
|
|
1446
|
-
});
|
|
1447
|
-
}
|
|
1448
|
-
};
|
|
1449
|
-
qt.propTypes = {
|
|
1450
|
-
errors: H.default.object,
|
|
1451
|
-
scale: H.default.shape({
|
|
1452
|
-
maxPoints: H.default.number,
|
|
1453
|
-
scorePointsLabels: H.default.arrayOf(H.default.string),
|
|
1454
|
-
traitLabel: H.default.string,
|
|
1455
|
-
traits: H.default.arrayOf(H.default.shape({
|
|
1456
|
-
name: H.default.string,
|
|
1457
|
-
standards: H.default.arrayOf(H.default.string),
|
|
1458
|
-
scorePointsDescriptors: H.default.arrayOf(H.default.string),
|
|
1459
|
-
description: H.default.string
|
|
1460
|
-
}))
|
|
1461
|
-
}),
|
|
1462
|
-
width: H.default.string,
|
|
1463
|
-
excludeZero: H.default.bool,
|
|
1464
|
-
scaleIndex: H.default.number,
|
|
1465
|
-
onScaleChanged: H.default.func,
|
|
1466
|
-
onScaleRemoved: H.default.func,
|
|
1467
|
-
showStandards: H.default.bool,
|
|
1468
|
-
showLevelTagInput: H.default.bool,
|
|
1469
|
-
showDescription: H.default.bool,
|
|
1470
|
-
uploadSoundSupport: H.default.object,
|
|
1471
|
-
showScorePointLabels: H.default.bool,
|
|
1472
|
-
enableDragAndDrop: H.default.bool,
|
|
1473
|
-
expandedPluginProps: H.default.object,
|
|
1474
|
-
labelPluginProps: H.default.object
|
|
1475
|
-
};
|
|
1476
|
-
//#endregion
|
|
1477
|
-
//#region ../multi-trait-rubric/dist/author/main.js
|
|
1478
|
-
var { Panel: Jt, toggle: Q } = oe, Yt = "650px", Xt = S("div")(({ theme: e }) => ({
|
|
1479
|
-
fontFamily: "Cerebri Sans",
|
|
1480
|
-
fontSize: e.typography.fontSize + 2,
|
|
1481
|
-
padding: "16px 0"
|
|
1482
|
-
})), Zt = ({ showExcludeZeroDialog: e, excludeZero: t, changeExcludeZero: n, cancel: r }) => e && !t ? /* @__PURE__ */ z(ze, {
|
|
1483
|
-
open: e && !t,
|
|
1484
|
-
changeExcludeZero: n,
|
|
1485
|
-
cancel: r
|
|
1486
|
-
}) : e && t ? /* @__PURE__ */ z(Be, {
|
|
1487
|
-
open: e && t,
|
|
1488
|
-
changeExcludeZero: n,
|
|
1489
|
-
cancel: r
|
|
1490
|
-
}) : null;
|
|
1491
|
-
Zt.propTypes = {
|
|
1492
|
-
showExcludeZeroDialog: H.default.bool,
|
|
1493
|
-
excludeZero: H.default.bool,
|
|
1494
|
-
changeExcludeZero: H.default.func,
|
|
1495
|
-
cancel: H.default.func
|
|
1496
|
-
};
|
|
1497
|
-
var Qt = class extends R.Component {
|
|
1498
|
-
constructor(e) {
|
|
1499
|
-
super(e), this.divRef = R.createRef(), this.updateDivWidth = this.updateDivWidth.bind(this);
|
|
1500
|
-
}
|
|
1501
|
-
state = {
|
|
1502
|
-
showDecreaseMaxPointsDialog: !1,
|
|
1503
|
-
showDeleteScaleDialog: !1,
|
|
1504
|
-
showDeleteTraitDialog: !1,
|
|
1505
|
-
showExcludeZeroDialog: !1,
|
|
1506
|
-
showInfoDialog: !1,
|
|
1507
|
-
infoDialogText: "",
|
|
1508
|
-
adjustedWidth: Yt,
|
|
1509
|
-
initialUpdateCompleted: !1
|
|
1510
|
-
};
|
|
1511
|
-
componentDidMount() {
|
|
1512
|
-
window.addEventListener("resize", this.updateDivWidthDebounced), window.addEventListener("load", this.updateDivWidth), setTimeout(this.updateDivWidth, 0);
|
|
1513
|
-
}
|
|
1514
|
-
componentWillUnmount() {
|
|
1515
|
-
window.removeEventListener("resize", this.updateDivWidthDebounced), window.removeEventListener("load", this.updateDivWidth);
|
|
1516
|
-
}
|
|
1517
|
-
componentDidUpdate() {
|
|
1518
|
-
this.state.initialUpdateCompleted || (this.updateDivWidth(), this.setState({ initialUpdateCompleted: !0 }));
|
|
1519
|
-
}
|
|
1520
|
-
updateDivWidth() {
|
|
1521
|
-
if (this.divRef && this.divRef.current) {
|
|
1522
|
-
let e = this.divRef.current.offsetWidth;
|
|
1523
|
-
e !== this.state.adjustedWidth && this.set({ adjustedWidth: e });
|
|
1524
|
-
}
|
|
1525
|
-
}
|
|
1526
|
-
updateDivWidthDebounced = N(() => this.updateDivWidth(), 50);
|
|
1527
|
-
onScaleAdded = () => {
|
|
1528
|
-
let { model: e, onModelChanged: t, configuration: n } = this.props, { scales: r, excludeZero: i } = e || {}, { maxNoOfScales: a } = n || {}, { defaultTraitLabel: o } = n || "";
|
|
1529
|
-
if (r.length || (r = []), o = typeof o == "string" ? o : r[0]?.traitLabel || "", r.length === a) return this.set({
|
|
1530
|
-
infoDialogText: `There can't be more than ${a} scales.`,
|
|
1531
|
-
showInfoDialog: !0
|
|
1532
|
-
}), !1;
|
|
1533
|
-
r.push({
|
|
1534
|
-
maxPoints: 1,
|
|
1535
|
-
scorePointsLabels: i ? [""] : ["", ""],
|
|
1536
|
-
traitLabel: o,
|
|
1537
|
-
traits: []
|
|
1538
|
-
}), t({
|
|
1539
|
-
...e,
|
|
1540
|
-
scales: r
|
|
1541
|
-
});
|
|
1542
|
-
};
|
|
1543
|
-
onScaleChanged = (t, n) => {
|
|
1544
|
-
let { model: r, onModelChanged: i } = this.props, a = e((r || {}).scales);
|
|
1545
|
-
if (t < 0 || t >= a.length || d(n)) return !1;
|
|
1546
|
-
Object.keys(n).forEach((e) => {
|
|
1547
|
-
a[t][e] = n[e];
|
|
1548
|
-
}), r.excludeZero && n.maxPoints === 1 && (r.excludeZero = !1, a = Ke(a, U.add0)), i({
|
|
1549
|
-
...r,
|
|
1550
|
-
scales: a
|
|
1551
|
-
});
|
|
1552
|
-
};
|
|
1553
|
-
onScaleRemoved = (e) => {
|
|
1554
|
-
let { model: t, onModelChanged: n, configuration: r } = this.props, { scales: i } = t || {}, { minNoOfScales: a } = r || {};
|
|
1555
|
-
if (e < 0 || e >= i.length) return !1;
|
|
1556
|
-
if (i.length === a) return this.set({
|
|
1557
|
-
infoDialogText: `There can't be less than ${a} scales.`,
|
|
1558
|
-
showInfoDialog: !0
|
|
1559
|
-
}), !1;
|
|
1560
|
-
i = [...i.slice(0, e), ...i.slice(e + 1)], n({
|
|
1561
|
-
...t,
|
|
1562
|
-
scales: i
|
|
1563
|
-
});
|
|
1564
|
-
};
|
|
1565
|
-
onHalfScoringChanged = () => {
|
|
1566
|
-
let { model: e, onModelChanged: t } = this.props, { halfScoring: n } = e || {};
|
|
1567
|
-
t({
|
|
1568
|
-
...e,
|
|
1569
|
-
halfScoring: !n
|
|
1570
|
-
});
|
|
1571
|
-
};
|
|
1572
|
-
onVisibleToStudentChanged = () => {
|
|
1573
|
-
let { model: e, onModelChanged: t } = this.props, { visibleToStudent: n } = e || {};
|
|
1574
|
-
t({
|
|
1575
|
-
...e,
|
|
1576
|
-
visibleToStudent: !n
|
|
1577
|
-
});
|
|
1578
|
-
};
|
|
1579
|
-
set = (e) => this.setState(e);
|
|
1580
|
-
changeShowScorePointLabels = () => {
|
|
1581
|
-
let { model: e, onModelChanged: t } = this.props || {}, { pointLabels: n } = e || {};
|
|
1582
|
-
n = !n, t({
|
|
1583
|
-
...e,
|
|
1584
|
-
pointLabels: n
|
|
1585
|
-
});
|
|
1586
|
-
};
|
|
1587
|
-
changeShowDescription = () => {
|
|
1588
|
-
let { model: e, onModelChanged: t } = this.props || {}, { description: n } = e || {};
|
|
1589
|
-
n = !n, t({
|
|
1590
|
-
...e,
|
|
1591
|
-
description: n
|
|
1592
|
-
});
|
|
1593
|
-
};
|
|
1594
|
-
changeShowStandards = () => {
|
|
1595
|
-
let { model: e, onModelChanged: t } = this.props || {}, { standards: n } = e || {};
|
|
1596
|
-
n = !n, t({
|
|
1597
|
-
...e,
|
|
1598
|
-
standards: n
|
|
1599
|
-
});
|
|
1600
|
-
};
|
|
1601
|
-
showToggleExcludeZeroModal = () => this.set({ showExcludeZeroDialog: !0 });
|
|
1602
|
-
hideToggleExcludeZeroModal = () => {
|
|
1603
|
-
this.set({ showExcludeZeroDialog: !1 });
|
|
1604
|
-
};
|
|
1605
|
-
onCloseInfoDialog = () => this.set({ showInfoDialog: !1 });
|
|
1606
|
-
changeExcludeZero = (e) => {
|
|
1607
|
-
let { model: t, onModelChanged: n } = this.props || {}, { scales: r } = t || {}, { excludeZero: i } = t || {};
|
|
1608
|
-
if (!r || !r.length) return;
|
|
1609
|
-
i = !i;
|
|
1610
|
-
let a = Ke(r, e);
|
|
1611
|
-
n({
|
|
1612
|
-
...t,
|
|
1613
|
-
scales: a,
|
|
1614
|
-
excludeZero: i
|
|
1615
|
-
}), this.hideToggleExcludeZeroModal();
|
|
1616
|
-
};
|
|
1617
|
-
onModelChanged = (e, t) => {
|
|
1618
|
-
let { onModelChanged: n } = this.props || {};
|
|
1619
|
-
t === "excludeZero" ? this.showToggleExcludeZeroModal() : n(e);
|
|
1620
|
-
};
|
|
1621
|
-
render() {
|
|
1622
|
-
let { model: e, configuration: t, onConfigurationChanged: n, uploadSoundSupport: r, imageSupport: i } = this.props || {}, { addScale: a, baseInputConfiguration: o = {}, dragAndDrop: s, contentDimensions: c = {}, showDescription: l, showExcludeZero: u, showLevelTagInput: d, showStandards: f, showHalfScoring: p, showMaxPoint: m, showScorePointLabels: h, showVisibleToStudent: g, spellCheck: _ = {}, settingsPanelDisabled: v, maxNoOfTraits: y, minNoOfTraits: b, width: x, mathMlOptions: S = {}, maxMaxPoints: C, expandedInput: T = {}, labelInput: E = {} } = t || {}, { errors: ee, extraCSSRules: D, scales: O, excludeZero: k, description: A, pointLabels: j, standards: M, spellCheckEnabled: N, maxPointsEnabled: te, addScaleEnabled: P } = e || {}, { showExcludeZeroDialog: F, showInfoDialog: ne, infoDialogText: re, adjustedWidth: I } = this.state || {}, ie = O?.some((e) => e.maxPoints === 1), ae = {
|
|
1623
|
-
standards: f.settings && Q(f.label),
|
|
1624
|
-
"showLevelTagInput.enabled": d.settings && Q(d.label, !0),
|
|
1625
|
-
visibleToStudent: g.settings && Q(g.label),
|
|
1626
|
-
excludeZero: u.settings && Q(u.label, !1, ie),
|
|
1627
|
-
halfScoring: p.settings && Q(p.label),
|
|
1628
|
-
"dragAndDrop.enabled": s.settings && Q(s.label, !0)
|
|
1629
|
-
}, oe = {
|
|
1630
|
-
description: l.settings && Q(l.label),
|
|
1631
|
-
pointLabels: h.settings && Q(h.label),
|
|
1632
|
-
spellCheckEnabled: _.settings && Q(_.label),
|
|
1633
|
-
maxPointsEnabled: m.settings && Q(m.label),
|
|
1634
|
-
addScaleEnabled: a.settings && Q(a.label)
|
|
1635
|
-
}, se = (e) => Object.assign({ ...o }, e || {});
|
|
1636
|
-
return /* @__PURE__ */ B(w.ConfigLayout, {
|
|
1637
|
-
extraCSSRules: D,
|
|
1638
|
-
dimensions: c,
|
|
1639
|
-
hideSettings: v,
|
|
1640
|
-
settings: /* @__PURE__ */ z(Jt, {
|
|
1641
|
-
model: e,
|
|
1642
|
-
onChangeModel: this.onModelChanged,
|
|
1643
|
-
configuration: t,
|
|
1644
|
-
onChangeConfiguration: n,
|
|
1645
|
-
groups: {
|
|
1646
|
-
Settings: ae,
|
|
1647
|
-
Properties: oe
|
|
1648
|
-
},
|
|
1649
|
-
modal: /* @__PURE__ */ z(Zt, {
|
|
1650
|
-
showExcludeZeroDialog: F,
|
|
1651
|
-
excludeZero: k,
|
|
1652
|
-
changeExcludeZero: this.changeExcludeZero,
|
|
1653
|
-
cancel: this.hideToggleExcludeZeroModal
|
|
1654
|
-
})
|
|
1655
|
-
}),
|
|
1656
|
-
children: [
|
|
1657
|
-
/* @__PURE__ */ z("div", {
|
|
1658
|
-
style: { width: "100%" },
|
|
1659
|
-
ref: this.divRef
|
|
1660
|
-
}),
|
|
1661
|
-
/* @__PURE__ */ B(Xt, {
|
|
1662
|
-
style: { width: x || I },
|
|
1663
|
-
children: [(O || []).map((e, t) => /* @__PURE__ */ z(qt, {
|
|
1664
|
-
scale: e,
|
|
1665
|
-
scaleIndex: t,
|
|
1666
|
-
errors: ee,
|
|
1667
|
-
onScaleRemoved: this.onScaleRemoved,
|
|
1668
|
-
onScaleChanged: this.onScaleChanged,
|
|
1669
|
-
showStandards: M,
|
|
1670
|
-
showScorePointLabels: j,
|
|
1671
|
-
showDescription: A,
|
|
1672
|
-
showLevelTagInput: d.enabled,
|
|
1673
|
-
excludeZero: k,
|
|
1674
|
-
enableDragAndDrop: s.enabled,
|
|
1675
|
-
spellCheck: N,
|
|
1676
|
-
width: I,
|
|
1677
|
-
uploadSoundSupport: r,
|
|
1678
|
-
maxPointsEnabled: te,
|
|
1679
|
-
maxNoOfTraits: y,
|
|
1680
|
-
minNoOfTraits: b,
|
|
1681
|
-
imageSupport: i,
|
|
1682
|
-
...this.props,
|
|
1683
|
-
mathMlOptions: S,
|
|
1684
|
-
maxMaxPoints: C,
|
|
1685
|
-
expandedPluginProps: se(T?.inputConfiguration),
|
|
1686
|
-
labelPluginProps: se(E?.inputConfiguration)
|
|
1687
|
-
}, `scale-${t}`)), P && /* @__PURE__ */ z(at, {
|
|
1688
|
-
onClick: this.onScaleAdded,
|
|
1689
|
-
children: "Add Scale"
|
|
1690
|
-
})]
|
|
1691
|
-
}),
|
|
1692
|
-
/* @__PURE__ */ z(We, {
|
|
1693
|
-
open: ne,
|
|
1694
|
-
text: re,
|
|
1695
|
-
onClose: () => this.set({ showInfoDialog: !1 })
|
|
1696
|
-
})
|
|
1697
|
-
]
|
|
1698
|
-
});
|
|
1699
|
-
}
|
|
1700
|
-
};
|
|
1701
|
-
Qt.propTypes = {
|
|
1702
|
-
model: H.default.object,
|
|
1703
|
-
uploadSoundSupport: H.default.object,
|
|
1704
|
-
configuration: H.default.object,
|
|
1705
|
-
onModelChanged: H.default.func,
|
|
1706
|
-
onConfigurationChanged: H.default.func,
|
|
1707
|
-
imageSupport: H.default.shape({
|
|
1708
|
-
add: H.default.func.isRequired,
|
|
1709
|
-
delete: H.default.func.isRequired
|
|
1710
|
-
})
|
|
1711
|
-
};
|
|
1712
|
-
//#endregion
|
|
1713
|
-
//#region ../multi-trait-rubric/dist/author/index.js
|
|
1714
|
-
var $t = (e) => ({
|
|
1715
|
-
...Pe.model,
|
|
1716
|
-
...e
|
|
1717
|
-
}), en = (e) => ({
|
|
1718
|
-
...Pe.configuration,
|
|
1719
|
-
...e
|
|
1720
|
-
}), tn = class extends HTMLElement {
|
|
1721
|
-
constructor() {
|
|
1722
|
-
super(), this._root = null, this._model = $t(), this._configuration = en();
|
|
1723
|
-
}
|
|
1724
|
-
updateModelAccordingToReceivedProps = (e) => {
|
|
1725
|
-
let t = { ...this._model };
|
|
1726
|
-
if (!e) return t;
|
|
1727
|
-
let n = { ...e }, { scales: r, excludeZero: i } = n || {};
|
|
1728
|
-
return (r || []).forEach((e) => {
|
|
1729
|
-
e ||= {
|
|
1730
|
-
scorePointsLabels: [],
|
|
1731
|
-
traits: []
|
|
1732
|
-
};
|
|
1733
|
-
let { maxPoints: t } = e || {};
|
|
1734
|
-
e.scorePointsLabels = [...e.scorePointsLabels || []], e.traits = [...e.traits || []];
|
|
1735
|
-
let n = i ? t : t + 1, r = e.scorePointsLabels.length;
|
|
1736
|
-
if (r !== n) if (r < n) for (let t = 0; t < n - r; t++) e.scorePointsLabels.push("");
|
|
1737
|
-
else e.scorePointsLabels = e.scorePointsLabels.slice(0, n);
|
|
1738
|
-
(e.traits || []).forEach((e) => {
|
|
1739
|
-
e ||= { scorePointsDescriptors: [] }, e.scorePointsDescriptors = [...e.scorePointsDescriptors || []];
|
|
1740
|
-
let t = e.scorePointsDescriptors.length;
|
|
1741
|
-
if (t !== n) if (t < n) for (let r = 0; r < n - t; r++) e.scorePointsDescriptors.push("");
|
|
1742
|
-
else e.scorePointsDescriptors = e.scorePointsDescriptors.slice(0, n);
|
|
1743
|
-
});
|
|
1744
|
-
}), n.excludeZero && n.scales.some((e) => e.maxPoints === 1) && (n.excludeZero = !1, n.scales = Ke(r, U.add0)), n;
|
|
1745
|
-
};
|
|
1746
|
-
set model(e) {
|
|
1747
|
-
this._model = this.updateModelAccordingToReceivedProps($t(e)), this._render();
|
|
1748
|
-
}
|
|
1749
|
-
set configuration(e) {
|
|
1750
|
-
this._configuration = en(e), this._render();
|
|
1751
|
-
}
|
|
1752
|
-
onModelChanged = (e) => {
|
|
1753
|
-
this._model = this.updateModelAccordingToReceivedProps($t(e)), this._render(), this.dispatchEvent(new V(this._model, !1));
|
|
1754
|
-
};
|
|
1755
|
-
onConfigurationChanged = (e) => {
|
|
1756
|
-
this._configuration = en(e), this._render();
|
|
1757
|
-
};
|
|
1758
|
-
insertSound(e) {
|
|
1759
|
-
this.dispatchEvent(new we(e));
|
|
1760
|
-
}
|
|
1761
|
-
onDeleteSound(e, t) {
|
|
1762
|
-
this.dispatchEvent(new Ce(e, t));
|
|
1763
|
-
}
|
|
1764
|
-
insertImage(e) {
|
|
1765
|
-
this.dispatchEvent(new Se(e));
|
|
1766
|
-
}
|
|
1767
|
-
onDeleteImage(e, t) {
|
|
1768
|
-
this.dispatchEvent(new xe(e, t));
|
|
1769
|
-
}
|
|
1770
|
-
_render() {
|
|
1771
|
-
if (this._model) {
|
|
1772
|
-
let e = R.createElement(Qt, {
|
|
1773
|
-
model: this._model,
|
|
1774
|
-
configuration: this._configuration,
|
|
1775
|
-
onModelChanged: this.onModelChanged,
|
|
1776
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
1777
|
-
uploadSoundSupport: {
|
|
1778
|
-
add: this.insertSound.bind(this),
|
|
1779
|
-
delete: this.onDeleteSound.bind(this)
|
|
1780
|
-
},
|
|
1781
|
-
imageSupport: {
|
|
1782
|
-
add: this.insertImage.bind(this),
|
|
1783
|
-
delete: this.onDeleteImage.bind(this)
|
|
1784
|
-
}
|
|
1785
|
-
});
|
|
1786
|
-
this._root ||= _e(this), this._root.render(e);
|
|
1787
|
-
}
|
|
1788
|
-
}
|
|
1789
|
-
disconnectedCallback() {
|
|
1790
|
-
this._root && this._root.unmount();
|
|
1791
|
-
}
|
|
1792
|
-
}, nn = S(i)({ "&.MuiFormControlLabel-root": {
|
|
1793
|
-
width: "fit-content",
|
|
1794
|
-
paddingRight: "24px",
|
|
1795
|
-
boxSizing: "border-box",
|
|
1796
|
-
"&:hover": { background: "var(--pie-secondary-background, rgba(241,241,241,1))" }
|
|
1797
|
-
} }), rn = S(te)({ "&.MuiRadio-root": { color: `${c.tertiary()} !important` } }), an = {
|
|
1798
|
-
[x.MULTI_TRAIT_RUBRIC]: "Multi Trait Rubric",
|
|
1799
|
-
[x.SIMPLE_RUBRIC]: "Simple Rubric",
|
|
1800
|
-
[x.RUBRICLESS]: "Rubricless"
|
|
1801
|
-
}, on = class extends R.Component {
|
|
1802
|
-
static propTypes = {
|
|
1803
|
-
canUpdateModel: H.default.bool,
|
|
1804
|
-
configuration: H.default.object,
|
|
1805
|
-
multiTraitRubricTagName: H.default.string,
|
|
1806
|
-
model: H.default.object,
|
|
1807
|
-
onModelChanged: H.default.func,
|
|
1808
|
-
onConfigurationChanged: H.default.func,
|
|
1809
|
-
simpleRubricTagName: H.default.string
|
|
1810
|
-
};
|
|
1811
|
-
onModelChanged = (e) => {
|
|
1812
|
-
let { onModelChanged: t } = this.props;
|
|
1813
|
-
return t(e);
|
|
1814
|
-
};
|
|
1815
|
-
onChangeRubricType = (e) => {
|
|
1816
|
-
let { model: t } = this.props, n = e.target.value;
|
|
1817
|
-
this.onModelChanged({
|
|
1818
|
-
...t,
|
|
1819
|
-
rubricType: n
|
|
1820
|
-
});
|
|
1821
|
-
};
|
|
1822
|
-
render() {
|
|
1823
|
-
let { model: e, configuration: t, canUpdateModel: n, multiTraitRubricTagName: r = ce, simpleRubricTagName: i = ae } = this.props, a = r, o = i, { extraCSSRules: s, rubrics: c = {} } = e || {}, { rubricType: l } = e, { contentDimensions: u = {}, rubricOptions: d = [], multiTraitRubric: f, simpleRubric: p, rubricless: m, width: h } = t, g = "";
|
|
1824
|
-
l ||= x.SIMPLE_RUBRIC;
|
|
1825
|
-
let _ = d.indexOf(l) > -1;
|
|
1826
|
-
if (n) switch (l) {
|
|
1827
|
-
case x.SIMPLE_RUBRIC:
|
|
1828
|
-
default:
|
|
1829
|
-
g = /* @__PURE__ */ z(o, {
|
|
1830
|
-
id: "simpleRubric",
|
|
1831
|
-
ref: (t) => {
|
|
1832
|
-
t && (this.simpleRubric = t, this.simpleRubric.model = {
|
|
1833
|
-
...c.simpleRubric,
|
|
1834
|
-
errors: e.errors || {}
|
|
1835
|
-
}, this.simpleRubric.configuration = {
|
|
1836
|
-
...p,
|
|
1837
|
-
width: h
|
|
1838
|
-
});
|
|
1839
|
-
}
|
|
1840
|
-
}, "simple-rubric");
|
|
1841
|
-
break;
|
|
1842
|
-
case x.MULTI_TRAIT_RUBRIC:
|
|
1843
|
-
g = /* @__PURE__ */ z(a, {
|
|
1844
|
-
id: "multiTraitRubric",
|
|
1845
|
-
ref: (t) => {
|
|
1846
|
-
t && (this.multiTraitRubric = t, this.multiTraitRubric.model = {
|
|
1847
|
-
...c.multiTraitRubric,
|
|
1848
|
-
errors: e.errors || {}
|
|
1849
|
-
}, this.multiTraitRubric.configuration = {
|
|
1850
|
-
...f,
|
|
1851
|
-
width: h || f.width
|
|
1852
|
-
});
|
|
1853
|
-
}
|
|
1854
|
-
}, "multi-trait-rubric");
|
|
1855
|
-
break;
|
|
1856
|
-
case x.RUBRICLESS:
|
|
1857
|
-
g = /* @__PURE__ */ z(o, {
|
|
1858
|
-
id: "rubricless",
|
|
1859
|
-
ref: (e) => {
|
|
1860
|
-
e && (this.rubricless = e, this.rubricless.model = c.rubricless, this.rubricless.configuration = {
|
|
1861
|
-
...m,
|
|
1862
|
-
width: h
|
|
1863
|
-
});
|
|
1864
|
-
}
|
|
1865
|
-
}, "rubricless");
|
|
1866
|
-
break;
|
|
1867
|
-
}
|
|
1868
|
-
return /* @__PURE__ */ B(w.ConfigLayout, {
|
|
1869
|
-
extraCSSRules: s,
|
|
1870
|
-
dimensions: u,
|
|
1871
|
-
hideSettings: !0,
|
|
1872
|
-
settings: null,
|
|
1873
|
-
children: [/* @__PURE__ */ z(be, {
|
|
1874
|
-
"aria-label": "rubric-type",
|
|
1875
|
-
name: "rubricType",
|
|
1876
|
-
value: e.rubricType,
|
|
1877
|
-
onChange: this.onChangeRubricType,
|
|
1878
|
-
children: d.length > 1 && d.map((e, t) => /* @__PURE__ */ z(nn, {
|
|
1879
|
-
value: e,
|
|
1880
|
-
control: /* @__PURE__ */ z(rn, { checked: l === e }),
|
|
1881
|
-
label: an[e]
|
|
1882
|
-
}, t))
|
|
1883
|
-
}), _ && g]
|
|
1884
|
-
});
|
|
1885
|
-
}
|
|
1886
|
-
}, sn = {
|
|
1887
|
-
description: !1,
|
|
1888
|
-
excludeZero: !1,
|
|
1889
|
-
halfScoring: !1,
|
|
1890
|
-
pointLabels: !0,
|
|
1891
|
-
scales: [],
|
|
1892
|
-
standards: !1,
|
|
1893
|
-
visibleToStudent: !0
|
|
1894
|
-
}, cn = {
|
|
1895
|
-
points: [
|
|
1896
|
-
"",
|
|
1897
|
-
"",
|
|
1898
|
-
"",
|
|
1899
|
-
""
|
|
1900
|
-
],
|
|
1901
|
-
sampleAnswers: [
|
|
1902
|
-
null,
|
|
1903
|
-
null,
|
|
1904
|
-
null,
|
|
1905
|
-
null
|
|
1906
|
-
],
|
|
1907
|
-
maxPoints: 3,
|
|
1908
|
-
excludeZero: !1
|
|
1909
|
-
}, ln = {
|
|
1910
|
-
maxPoints: 100,
|
|
1911
|
-
excludeZero: !1,
|
|
1912
|
-
rubriclessInstructionEnabled: !0
|
|
1913
|
-
}, un = {
|
|
1914
|
-
baseInputConfiguration: {
|
|
1915
|
-
h3: { disabled: !0 },
|
|
1916
|
-
audio: { disabled: !1 },
|
|
1917
|
-
video: { disabled: !1 },
|
|
1918
|
-
image: { disabled: !1 },
|
|
1919
|
-
textAlign: { disabled: !0 },
|
|
1920
|
-
showParagraphs: { disabled: !1 }
|
|
1921
|
-
},
|
|
1922
|
-
expandedInput: { inputConfiguration: {
|
|
1923
|
-
math: { disabled: !0 },
|
|
1924
|
-
audio: { disabled: !1 },
|
|
1925
|
-
video: { disabled: !1 },
|
|
1926
|
-
image: { disabled: !1 }
|
|
1927
|
-
} },
|
|
1928
|
-
labelInput: { inputConfiguration: {
|
|
1929
|
-
math: { disabled: !0 },
|
|
1930
|
-
audio: { disabled: !0 },
|
|
1931
|
-
video: { disabled: !0 },
|
|
1932
|
-
image: { disabled: !0 }
|
|
1933
|
-
} },
|
|
1934
|
-
settingsPanelDisabled: !1,
|
|
1935
|
-
excludeZeroDialogBoxContent: {
|
|
1936
|
-
title: "Exclude 0 (Zero) from Score Point Values.",
|
|
1937
|
-
text: "<div>\n You are about to exclude 0 from score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the left\n </li>\n <li>\n remove 0 column with its Label and Description\n </li>\n </ul>\n </div>"
|
|
1938
|
-
},
|
|
1939
|
-
includeZeroDialogBoxContent: {
|
|
1940
|
-
title: "Include 0 (Zero) in Score Point Values.",
|
|
1941
|
-
text: "<div>\n You are about to include 0 in score point values.\n <br/>\n Some of the existing data has to be changed.\n <br/>\n Please choose if you want to:\n <ul>\n <li>\n shift Labels and Descriptions to the right\n </li>\n <li>\n add 0 column with empty Label and Descriptions\n </li>\n </ul>\n </div>"
|
|
1942
|
-
},
|
|
1943
|
-
deleteScaleDialogBoxContent: {
|
|
1944
|
-
title: "Delete Scale",
|
|
1945
|
-
text: "Are you sure you want to delete this scale?"
|
|
1946
|
-
},
|
|
1947
|
-
maxPointsDialogBoxContent: {
|
|
1948
|
-
title: "Decreasing Max Points.",
|
|
1949
|
-
text: " You are about to decrease max score point value.\n <br/>\n All the Labels and Descriptions for scores above Max Point will be deleted."
|
|
1950
|
-
},
|
|
1951
|
-
spellCheck: {
|
|
1952
|
-
label: "Spellcheck",
|
|
1953
|
-
settings: !1,
|
|
1954
|
-
enabled: !0
|
|
1955
|
-
},
|
|
1956
|
-
showExcludeZero: {
|
|
1957
|
-
settings: !0,
|
|
1958
|
-
label: "Exclude Zero"
|
|
1959
|
-
},
|
|
1960
|
-
showScorePointLabels: {
|
|
1961
|
-
settings: !0,
|
|
1962
|
-
label: "Show Score Point Labels"
|
|
1963
|
-
},
|
|
1964
|
-
showDescription: {
|
|
1965
|
-
settings: !0,
|
|
1966
|
-
label: "Show Description"
|
|
1967
|
-
},
|
|
1968
|
-
showVisibleToStudent: {
|
|
1969
|
-
settings: !0,
|
|
1970
|
-
label: "Visible to Student"
|
|
1971
|
-
},
|
|
1972
|
-
showHalfScoring: {
|
|
1973
|
-
settings: !0,
|
|
1974
|
-
label: "Half Scoring"
|
|
1975
|
-
},
|
|
1976
|
-
showStandards: {
|
|
1977
|
-
settings: !1,
|
|
1978
|
-
label: "Show Standards"
|
|
1979
|
-
},
|
|
1980
|
-
showLevelTagInput: {
|
|
1981
|
-
settings: !1,
|
|
1982
|
-
label: "Show Level Tag Input",
|
|
1983
|
-
enabled: !1
|
|
1984
|
-
},
|
|
1985
|
-
dragAndDrop: {
|
|
1986
|
-
settings: !0,
|
|
1987
|
-
label: "Enable Drag and Drop",
|
|
1988
|
-
enabled: !1
|
|
1989
|
-
},
|
|
1990
|
-
maxMaxPoints: 9
|
|
1991
|
-
}, dn = {
|
|
1992
|
-
baseInputConfiguration: {
|
|
1993
|
-
h3: { disabled: !0 },
|
|
1994
|
-
audio: { disabled: !1 },
|
|
1995
|
-
video: { disabled: !1 },
|
|
1996
|
-
image: { disabled: !1 },
|
|
1997
|
-
textAlign: { disabled: !0 },
|
|
1998
|
-
showParagraphs: { disabled: !1 }
|
|
1999
|
-
},
|
|
2000
|
-
showExcludeZero: {
|
|
2001
|
-
settings: !0,
|
|
2002
|
-
label: "Ability to exclude zero"
|
|
2003
|
-
},
|
|
2004
|
-
showMaxPoint: {
|
|
2005
|
-
settings: !0,
|
|
2006
|
-
label: "Show max points dropdown"
|
|
2007
|
-
},
|
|
2008
|
-
settingsPanelDisabled: !1,
|
|
2009
|
-
maxMaxPoints: 9
|
|
2010
|
-
}, fn = {
|
|
2011
|
-
baseInputConfiguration: {
|
|
2012
|
-
h3: { disabled: !0 },
|
|
2013
|
-
audio: { disabled: !1 },
|
|
2014
|
-
video: { disabled: !1 },
|
|
2015
|
-
image: { disabled: !1 },
|
|
2016
|
-
textAlign: { disabled: !0 },
|
|
2017
|
-
showParagraphs: { disabled: !1 }
|
|
2018
|
-
},
|
|
2019
|
-
showExcludeZero: {
|
|
2020
|
-
settings: !0,
|
|
2021
|
-
label: "Ability to exclude zero"
|
|
2022
|
-
},
|
|
2023
|
-
showMaxPoint: {
|
|
2024
|
-
settings: !0,
|
|
2025
|
-
label: "Show max points dropdown"
|
|
2026
|
-
},
|
|
2027
|
-
settingsPanelDisabled: !1,
|
|
2028
|
-
rubricless: !0,
|
|
2029
|
-
rubriclessInstruction: {
|
|
2030
|
-
settings: !0,
|
|
2031
|
-
label: "Instruction",
|
|
2032
|
-
inputConfiguration: {
|
|
2033
|
-
audio: { disabled: !1 },
|
|
2034
|
-
video: { disabled: !1 },
|
|
2035
|
-
image: { disabled: !1 }
|
|
2036
|
-
}
|
|
2037
|
-
},
|
|
2038
|
-
maxMaxPoints: 100
|
|
2039
|
-
}, $ = {
|
|
2040
|
-
model: {
|
|
2041
|
-
rubricType: "simpleRubric",
|
|
2042
|
-
rubrics: {
|
|
2043
|
-
[x.SIMPLE_RUBRIC]: cn,
|
|
2044
|
-
[x.MULTI_TRAIT_RUBRIC]: sn,
|
|
2045
|
-
[x.RUBRICLESS]: ln
|
|
2046
|
-
}
|
|
2047
|
-
},
|
|
2048
|
-
configuration: {
|
|
2049
|
-
rubricOptions: [
|
|
2050
|
-
"simpleRubric",
|
|
2051
|
-
"multiTraitRubric",
|
|
2052
|
-
"rubricless"
|
|
2053
|
-
],
|
|
2054
|
-
[x.MULTI_TRAIT_RUBRIC]: un,
|
|
2055
|
-
[x.SIMPLE_RUBRIC]: dn,
|
|
2056
|
-
[x.RUBRICLESS]: fn
|
|
2057
|
-
}
|
|
2058
|
-
}, pn = V.TYPE, mn = ae, hn = ce, gn = class extends Ne {}, _n = class extends tn {};
|
|
2059
|
-
customElements.get(mn) || customElements.define(mn, gn), customElements.get(hn) || customElements.define(hn, _n);
|
|
2060
|
-
var vn = (e, t) => ({
|
|
2061
|
-
configuration: M(e, $.configuration),
|
|
2062
|
-
model: t
|
|
2063
|
-
}), yn = class e extends HTMLElement {
|
|
2064
|
-
static createDefaultModel = ({ rubrics: { simpleRubric: e = {}, rubricless: t = {}, multiTraitRubric: n = {} } = {
|
|
2065
|
-
simpleRubric: {},
|
|
2066
|
-
rubricless: {},
|
|
2067
|
-
multiTraitRubric: {}
|
|
2068
|
-
}, ...r } = {}, i = {}) => ({
|
|
2069
|
-
...$?.model || {},
|
|
2070
|
-
...i,
|
|
2071
|
-
...r,
|
|
2072
|
-
rubrics: {
|
|
2073
|
-
simpleRubric: {
|
|
2074
|
-
...($?.model?.rubrics || {}).simpleRubric,
|
|
2075
|
-
...(i.rubrics || {}).simpleRubric,
|
|
2076
|
-
...e
|
|
2077
|
-
},
|
|
2078
|
-
multiTraitRubric: {
|
|
2079
|
-
...($?.model?.rubrics || {}).multiTraitRubric,
|
|
2080
|
-
...(i.rubrics || {}).multiTraitRubric,
|
|
2081
|
-
...n
|
|
2082
|
-
},
|
|
2083
|
-
rubricless: {
|
|
2084
|
-
...($?.model?.rubrics || {}).rubricless,
|
|
2085
|
-
...(i.rubrics || {}).rubricless,
|
|
2086
|
-
...t
|
|
2087
|
-
}
|
|
2088
|
-
}
|
|
2089
|
-
});
|
|
2090
|
-
constructor() {
|
|
2091
|
-
super(), this._root = null, this.canUpdateModel = !1, Ae.log("constructor called"), this._model = e.createDefaultModel(), this._configuration = $.configuration, this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
2092
|
-
}
|
|
2093
|
-
set model(t) {
|
|
2094
|
-
this._model = e.createDefaultModel(t, this._model), this.canUpdateModel = !0, this._render();
|
|
2095
|
-
}
|
|
2096
|
-
dispatchModelUpdated(e) {
|
|
2097
|
-
let t = !!e;
|
|
2098
|
-
this.dispatchEvent(new V(this._model, t));
|
|
2099
|
-
}
|
|
2100
|
-
onModelChanged = (t, n) => {
|
|
2101
|
-
this._model = e.createDefaultModel(t, this._model), this.dispatchModelUpdated(n), this._render();
|
|
2102
|
-
};
|
|
2103
|
-
set configuration(e) {
|
|
2104
|
-
let t = vn(e, this._model);
|
|
2105
|
-
this._configuration = t.configuration, this._render();
|
|
2106
|
-
}
|
|
2107
|
-
onConfigurationChanged(e) {
|
|
2108
|
-
this._configuration = vn(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
|
|
2109
|
-
}
|
|
2110
|
-
onModelUpdated = (e) => {
|
|
2111
|
-
if (e.target === this) return;
|
|
2112
|
-
e.preventDefault(), e.stopImmediatePropagation();
|
|
2113
|
-
let t = e.target && e.target.getAttribute("id");
|
|
2114
|
-
t && (e.update && (this._model.rubrics[t] = e.update), this.dispatchEvent(new V(this._model)));
|
|
2115
|
-
};
|
|
2116
|
-
connectedCallback() {
|
|
2117
|
-
this.addEventListener(pn, this.onModelUpdated), this._render();
|
|
2118
|
-
}
|
|
2119
|
-
_render() {
|
|
2120
|
-
let e = R.createElement(on, {
|
|
2121
|
-
model: this._model,
|
|
2122
|
-
configuration: this._configuration,
|
|
2123
|
-
multiTraitRubricTagName: hn,
|
|
2124
|
-
onModelChanged: this.onModelChanged,
|
|
2125
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
2126
|
-
simpleRubricTagName: mn,
|
|
2127
|
-
canUpdateModel: this.canUpdateModel
|
|
2128
|
-
});
|
|
2129
|
-
this._root ||= _e(this), this._root.render(e);
|
|
2130
|
-
}
|
|
2131
|
-
disconnectedCallback() {
|
|
2132
|
-
this.removeEventListener(pn, this.onModelUpdated), this._root && this._root.unmount();
|
|
2133
|
-
}
|
|
2134
|
-
};
|
|
2135
|
-
//#endregion
|
|
2136
|
-
export { yn as default };
|
|
2137
|
-
|
|
2138
|
-
//# sourceMappingURL=index.js.map
|