@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.
Files changed (92) hide show
  1. package/CHANGELOG.md +1455 -0
  2. package/LICENSE.md +5 -0
  3. package/README.md +3 -0
  4. package/configure/CHANGELOG.md +1109 -0
  5. package/configure/lib/defaults.js +271 -0
  6. package/configure/lib/defaults.js.map +1 -0
  7. package/configure/lib/index.js +150 -0
  8. package/configure/lib/index.js.map +1 -0
  9. package/configure/lib/main.js +172 -0
  10. package/configure/lib/main.js.map +1 -0
  11. package/configure/package.json +27 -0
  12. package/configure/src/__tests__/index.test.js +94 -0
  13. package/configure/src/__tests__/main.test.jsx +140 -0
  14. package/configure/src/defaults.js +213 -0
  15. package/configure/src/index.js +169 -0
  16. package/configure/src/main.jsx +162 -0
  17. package/controller/CHANGELOG.md +936 -0
  18. package/controller/lib/defaults.js +42 -0
  19. package/controller/lib/defaults.js.map +1 -0
  20. package/controller/lib/index.js +239 -0
  21. package/controller/lib/index.js.map +1 -0
  22. package/controller/lib/utils.js +11 -0
  23. package/controller/lib/utils.js.map +1 -0
  24. package/controller/package.json +16 -0
  25. package/controller/src/__tests__/index.test.js +55 -0
  26. package/controller/src/defaults.js +39 -0
  27. package/controller/src/index.js +220 -0
  28. package/controller/src/utils.js +3 -0
  29. package/docs/config-schema.json +4255 -0
  30. package/docs/config-schema.json.md +3162 -0
  31. package/docs/demo/config.js +8 -0
  32. package/docs/demo/generate.js +196 -0
  33. package/docs/demo/index.html +1 -0
  34. package/docs/demo/session.js +6 -0
  35. package/docs/pie-schema.json +3302 -0
  36. package/docs/pie-schema.json.md +2364 -0
  37. package/lib/index.js +141 -0
  38. package/lib/index.js.map +1 -0
  39. package/lib/print.js +129 -0
  40. package/lib/print.js.map +1 -0
  41. package/module/configure.js +1 -0
  42. package/module/controller.js +262 -0
  43. package/module/demo.js +221 -0
  44. package/module/element.js +1 -0
  45. package/module/index.html +21 -0
  46. package/module/manifest.json +22 -0
  47. package/module/print-demo.js +259 -0
  48. package/module/print.html +18 -0
  49. package/module/print.js +1 -0
  50. package/package.json +22 -89
  51. package/src/__tests__/index.test.js +256 -0
  52. package/src/index.js +152 -0
  53. package/src/print.js +140 -0
  54. package/configure.js +0 -2
  55. package/controller.js +0 -1
  56. package/dist/author/defaults.d.ts +0 -231
  57. package/dist/author/defaults.js +0 -177
  58. package/dist/author/index.d.ts +0 -34
  59. package/dist/author/index.js +0 -90
  60. package/dist/author/main.d.ts +0 -25
  61. package/dist/author/main.js +0 -109
  62. package/dist/browser/author/index.js +0 -2138
  63. package/dist/browser/author/index.js.map +0 -1
  64. package/dist/browser/complex-rubric.css +0 -2
  65. package/dist/browser/controller/index.js +0 -145
  66. package/dist/browser/controller/index.js.map +0 -1
  67. package/dist/browser/delivery/index.js +0 -97
  68. package/dist/browser/delivery/index.js.map +0 -1
  69. package/dist/browser/delivery-DROj6gHl.js +0 -691
  70. package/dist/browser/delivery-DROj6gHl.js.map +0 -1
  71. package/dist/browser/print/index.js +0 -85
  72. package/dist/browser/print/index.js.map +0 -1
  73. package/dist/browser/private-tags-C6RA489_.js +0 -60411
  74. package/dist/browser/private-tags-C6RA489_.js.map +0 -1
  75. package/dist/controller/defaults.d.ts +0 -39
  76. package/dist/controller/defaults.js +0 -42
  77. package/dist/controller/index.d.ts +0 -25
  78. package/dist/controller/index.js +0 -107
  79. package/dist/controller/utils.d.ts +0 -9
  80. package/dist/controller/utils.js +0 -4
  81. package/dist/delivery/index.d.ts +0 -23
  82. package/dist/delivery/index.js +0 -97
  83. package/dist/index.d.ts +0 -1
  84. package/dist/index.iife.d.ts +0 -8
  85. package/dist/index.iife.js +0 -145
  86. package/dist/index.js +0 -2
  87. package/dist/print/index.d.ts +0 -24
  88. package/dist/print/index.js +0 -85
  89. package/dist/private-tags.d.ts +0 -4
  90. package/dist/private-tags.js +0 -3
  91. package/dist/runtime-support.d.ts +0 -12
  92. package/dist/runtime-support.js +0 -12
@@ -1,691 +0,0 @@
1
- import { $ as e, B as t, G as n, J as r, K as i, L as a, Q as o, R as s, U as c, Y as l, at as u, ct as d, dt as f, et as p, ft as m, ht as h, it as g, lt as _, mt as v, ot as ee, pt as y, q as te, rt as ne, tt as b, ut as re, z as x } from "./private-tags-C6RA489_.js";
2
- import * as S from "react";
3
- import C from "react";
4
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
5
- import { createRoot as E } from "react-dom/client";
6
- //#region ../rubric/dist/delivery/main.js
7
- var D = /* @__PURE__ */ h(v(), 1);
8
- function O(e) {
9
- return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
10
- }
11
- function k(e, t) {
12
- return !e || O(e) ? e : O(e.default) ? e.default : t && O(e[t]) ? e[t] : t && O(e[t]?.default) ? e[t].default : e;
13
- }
14
- var ie = k(c, "UiLayout") || k(ae.UiLayout, "UiLayout"), A = t, j = A.default, ae = j && typeof j == "object" ? j : A, oe = u(ie)({
15
- color: r.text(),
16
- backgroundColor: r.background(),
17
- "&:not(.MathJax) table": { borderCollapse: "collapse" },
18
- "&:not(.MathJax) table td, &:not(.MathJax) table th": {
19
- padding: "8px 12px",
20
- textAlign: "left"
21
- },
22
- "& ul p, & ol p": {
23
- marginBottom: 0,
24
- marginTop: 0,
25
- lineHeight: "normal"
26
- }
27
- }), M = u(p)({
28
- display: "flex",
29
- flexDirection: "column",
30
- alignItems: "flex-start",
31
- padding: "12px 0px"
32
- }), N = u("div")({ color: r.text() }), se = u("h3")({
33
- color: r.text(),
34
- fontSize: "16px",
35
- fontWeight: "700",
36
- margin: 0,
37
- paddingBottom: "6px"
38
- }), ce = u("h4")({
39
- color: r.text(),
40
- fontSize: "16px",
41
- fontWeight: "normal",
42
- margin: 0,
43
- paddingBottom: "6px"
44
- }), le = u("h2")(({ theme: e }) => ({
45
- display: "flex",
46
- alignItems: "center",
47
- cursor: "pointer",
48
- userSelect: "none",
49
- fontSize: e.typography.fontSize,
50
- fontWeight: "500",
51
- color: r.tertiary(),
52
- margin: 0
53
- })), ue = u("span")({
54
- display: "inline-flex",
55
- transition: "transform 0.2s",
56
- marginLeft: 2,
57
- alignSelf: "center"
58
- }), P = u("h2")({
59
- position: "absolute",
60
- width: "1px",
61
- height: "1px",
62
- padding: 0,
63
- margin: "-1px",
64
- overflow: "hidden",
65
- clip: "rect(0,0,0,0)",
66
- border: 0,
67
- whiteSpace: "nowrap"
68
- }), F = D.default.shape({
69
- excludeZero: D.default.bool,
70
- points: D.default.arrayOf(D.default.string),
71
- sampleAnswers: D.default.arrayOf(D.default.string),
72
- animationsDisabled: D.default.bool
73
- }), I = class extends C.Component {
74
- dudUrl = "javascript:;";
75
- constructor(e) {
76
- super(e), this.state = {
77
- rubricOpen: !1,
78
- linkPrefix: "Show"
79
- }, this.toggleRubric = this.toggleRubric.bind(this);
80
- }
81
- static propTypes = {
82
- model: D.default.object.isRequired,
83
- animationsDisabled: D.default.bool,
84
- value: F
85
- };
86
- toggleRubric() {
87
- this.setState({ rubricOpen: !this.state.rubricOpen }), this.setState({ linkPrefix: this.state.rubricOpen ? "Show" : "Hide" });
88
- }
89
- shouldRenderPoint = (e, t) => t.excludeZero ? e !== 0 : !0;
90
- render() {
91
- let { model: t, value: n } = this.props, { animationsDisabled: r } = this.props;
92
- if (r ||= n.animationsDisabled, n && n.points) {
93
- let { extraCSSRules: i } = t || {}, { points: a, sampleAnswers: o } = n, s = /* @__PURE__ */ w(e, {
94
- component: "nav",
95
- children: a.slice(0).reverse().map((e, t) => {
96
- t = a.length - t - 1;
97
- let r = n.excludeZero ? t + 1 : t;
98
- return /* @__PURE__ */ T(C.Fragment, { children: [/* @__PURE__ */ T(M, { children: [/* @__PURE__ */ w(se, { children: r === 1 ? `${r} PT` : `${r} PTS` }), /* @__PURE__ */ w(N, { dangerouslySetInnerHTML: { __html: e } })] }, `P${t}`), o && o[t] && /* @__PURE__ */ T(M, { children: [/* @__PURE__ */ w(ce, { children: "Sample Answer" }), /* @__PURE__ */ w(N, { dangerouslySetInnerHTML: { __html: o[t] } })] }, `S${t}`)] }, t);
99
- })
100
- });
101
- return /* @__PURE__ */ T(oe, {
102
- extraCSSRules: i,
103
- children: [/* @__PURE__ */ w(P, { children: "Rubric" }), r ? s : /* @__PURE__ */ T(C.Fragment, { children: [/* @__PURE__ */ T(le, {
104
- id: "rubric-toggle",
105
- tabIndex: 0,
106
- role: "button",
107
- "aria-expanded": this.state.rubricOpen,
108
- onClick: this.toggleRubric,
109
- onKeyPress: (e) => {
110
- (e.key === "Enter" || e.key === " ") && this.toggleRubric();
111
- },
112
- children: [
113
- this.state.linkPrefix,
114
- " Rubric",
115
- /* @__PURE__ */ w(ue, {
116
- "aria-hidden": "true",
117
- children: this.state.rubricOpen ? /* @__PURE__ */ w("svg", {
118
- width: "20",
119
- height: "20",
120
- viewBox: "0 0 24 24",
121
- fill: "none",
122
- stroke: "currentColor",
123
- strokeWidth: "2",
124
- strokeLinecap: "round",
125
- strokeLinejoin: "round",
126
- children: /* @__PURE__ */ w("polyline", { points: "18 15 12 9 6 15" })
127
- }) : /* @__PURE__ */ w("svg", {
128
- width: "20",
129
- height: "20",
130
- viewBox: "0 0 24 24",
131
- fill: "none",
132
- stroke: "currentColor",
133
- strokeWidth: "2",
134
- strokeLinecap: "round",
135
- strokeLinejoin: "round",
136
- children: /* @__PURE__ */ w("polyline", { points: "6 9 12 15 18 9" })
137
- })
138
- })
139
- ]
140
- }), /* @__PURE__ */ w(l, {
141
- in: this.state.rubricOpen,
142
- timeout: {
143
- enter: 225,
144
- exit: 195
145
- },
146
- children: s
147
- })] })]
148
- });
149
- } else return null;
150
- }
151
- }, L = /* @__PURE__ */ h(te(), 1), R = class extends HTMLElement {
152
- constructor() {
153
- super(), L.log("constructor called"), this.onModelChanged = this.onModelChanged.bind(this), this._root = null;
154
- }
155
- set model(e) {
156
- this._model = e, this._render();
157
- }
158
- onModelChanged(e) {
159
- this._model = e, this._render();
160
- }
161
- connectedCallback() {
162
- this._render();
163
- }
164
- _render() {
165
- if (this._model) {
166
- let e = C.createElement(I, { value: this._model });
167
- this._root ||= E(this), this._root.render(e), queueMicrotask(() => {
168
- i(this);
169
- });
170
- }
171
- }
172
- disconnectedCallback() {
173
- this._root && this._root.unmount();
174
- }
175
- }, z = u("td")({
176
- color: r.primaryDark(),
177
- verticalAlign: "middle"
178
- }), B = u("div")({
179
- color: r.secondaryBackground(),
180
- textAlign: "center"
181
- }), V = (e) => {
182
- let { trait: t, traitIndex: n, scaleIndex: r, showStandards: i, showDescription: a, scorePointsValues: o } = e, { name: s, standards: c, scorePointsDescriptors: l, description: u } = t || {};
183
- return /* @__PURE__ */ T("tr", { children: [
184
- /* @__PURE__ */ w(z, { children: /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: s } }) }),
185
- i ? /* @__PURE__ */ w("td", { children: /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: c.join(",") } }) }) : null,
186
- a ? /* @__PURE__ */ w("td", { children: /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: u } }) }) : null,
187
- o && o.map((e, t) => {
188
- let n;
189
- try {
190
- n = l[o.length - t - 1] || "";
191
- } catch {
192
- n = "";
193
- }
194
- return /* @__PURE__ */ w("td", { children: n ? /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: n } }) : /* @__PURE__ */ w(B, { dangerouslySetInnerHTML: { __html: "No Description" } }) }, `table-cell-${t}`);
195
- })
196
- ] }, `scale-${r}-trait-${n}`);
197
- };
198
- V.propTypes = {
199
- showStandards: D.default.bool,
200
- showDescription: D.default.bool,
201
- scorePointsValues: D.default.arrayOf(D.default.number),
202
- scaleIndex: D.default.number,
203
- traitIndex: D.default.number,
204
- trait: D.default.shape({
205
- name: D.default.string,
206
- standards: D.default.arrayOf(D.default.string),
207
- scorePointsDescriptors: D.default.arrayOf(D.default.string),
208
- description: D.default.string
209
- })
210
- };
211
- //#endregion
212
- //#region ../multi-trait-rubric/dist/delivery/scale.js
213
- var H = u("div")({
214
- display: "flex",
215
- position: "relative"
216
- }), U = u("div")({
217
- width: "100%",
218
- overflow: "auto"
219
- }), de = u("table")(({ theme: e }) => ({
220
- borderSpacing: 0,
221
- marginBottom: e.spacing(2),
222
- borderRadius: "4px",
223
- color: r.text(),
224
- fontSize: e.typography.fontSize,
225
- lineHeight: "16px",
226
- overflow: "unset",
227
- "& ul, ol": {
228
- marginBlockStart: 0,
229
- paddingInlineStart: e.spacing(2)
230
- },
231
- "& th": {
232
- padding: e.spacing(2),
233
- textAlign: "left",
234
- backgroundColor: r.secondaryBackground(),
235
- verticalAlign: "bottom"
236
- },
237
- "& th div": { width: "200px" },
238
- "& td": {
239
- width: "200px",
240
- padding: `${e.spacing(2)} ${e.spacing(1)}`,
241
- verticalAlign: "top"
242
- }
243
- })), fe = u("table")({ "& td": {
244
- border: 0,
245
- padding: 0,
246
- textAlign: "center",
247
- minWidth: "200px"
248
- } }), pe = u("div")({ marginBottom: "4px" }), me = u("td")({ fontWeight: "normal" }), W = ({ show: e, onClick: t, extraStyles: n, children: r }) => /* @__PURE__ */ w("div", {
249
- style: {
250
- height: "calc(100% - 1px)",
251
- top: "1px",
252
- display: e ? "flex" : "none",
253
- width: "50px",
254
- margin: "auto",
255
- position: "absolute",
256
- alignItems: "center",
257
- justifyContent: "center",
258
- cursor: "pointer",
259
- ...n
260
- },
261
- onClick: t,
262
- children: r
263
- });
264
- W.propTypes = {
265
- show: D.default.bool,
266
- onClick: D.default.func,
267
- extraStyles: D.default.object,
268
- children: D.default.object
269
- };
270
- var G = class extends C.Component {
271
- state = {};
272
- componentDidMount() {
273
- this.tableWrapper && this.tableWrapper.offsetWidth < this.tableWrapper.scrollWidth && this.setState({ showRight: !0 });
274
- }
275
- scrollLeft = () => {
276
- this.tableWrapper.scrollLeft -= this.tableWrapper.offsetWidth / 2, this.setState({
277
- showRight: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth,
278
- showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0
279
- });
280
- };
281
- scrollRight = () => {
282
- let e = this.tableWrapper.scrollLeft;
283
- this.tableWrapper.scrollLeft += this.tableWrapper.offsetWidth / 2, this.setState({
284
- showRight: e !== this.tableWrapper.scrollLeft && this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth,
285
- showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0
286
- });
287
- };
288
- render() {
289
- let { showRight: e, showLeft: t } = this.state, { scale: n, scaleIndex: i, showDescription: a, showPointsLabels: o, showStandards: c, arrowsDisabled: l } = this.props, { excludeZero: u, maxPoints: d, traitLabel: f, traits: p, scorePointsLabels: m } = n || {}, h = [], g, _, v;
290
- try {
291
- for (let e = d; +(e >= u); --e) h.push(e);
292
- let { traitStandards: e, traitDescriptions: t } = p.reduce((e, t) => ({
293
- traitStandards: [...e.traitStandards, ...t.standards || []],
294
- traitDescriptions: [...e.traitDescriptions, ...t.description || []]
295
- }), {
296
- traitStandards: [],
297
- traitDescriptions: []
298
- });
299
- g = a && t.length, _ = o && m.length, v = c && e.length;
300
- } catch {
301
- g = !1, _ = !1, v = !1;
302
- }
303
- return /* @__PURE__ */ T(H, { children: [
304
- /* @__PURE__ */ w(W, {
305
- show: t && !l,
306
- onClick: this.scrollLeft,
307
- extraStyles: {
308
- left: 0,
309
- background: `linear-gradient(to right, white, ${r.background()})`
310
- },
311
- children: /* @__PURE__ */ w(x, {})
312
- }),
313
- /* @__PURE__ */ T(U, {
314
- ref: (e) => {
315
- this.tableWrapper = e;
316
- },
317
- onScroll: () => {
318
- this.setState({
319
- showRight: this.tableWrapper.scrollLeft + this.tableWrapper.offsetWidth < this.tableWrapper.scrollWidth - 5 && this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth,
320
- showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0
321
- });
322
- },
323
- children: [l && (e || t) ? /* @__PURE__ */ w("div", { children: "The item is too large to fit in print mode." }) : null, /* @__PURE__ */ T(de, { children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", { children: [
324
- /* @__PURE__ */ w("th", { children: /* @__PURE__ */ w("div", { dangerouslySetInnerHTML: { __html: f } }) }),
325
- v ? /* @__PURE__ */ w("th", { children: /* @__PURE__ */ w("div", { children: "Standard(s)" }) }) : null,
326
- g ? /* @__PURE__ */ w("th", { children: /* @__PURE__ */ w("div", { children: "Description" }) }) : null,
327
- h && h.map((e, t) => {
328
- let n = "";
329
- try {
330
- n = m[h.length - t - 1] || "";
331
- } catch {
332
- n = "";
333
- }
334
- return /* @__PURE__ */ w("th", { children: /* @__PURE__ */ w(fe, { children: /* @__PURE__ */ T("thead", { children: [_ ? /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w("td", { children: /* @__PURE__ */ w(pe, { dangerouslySetInnerHTML: { __html: n } }) }) }) : null, /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w(me, { children: e === 1 ? `${e} point` : `${e} points` }) })] }) }) }, `table-header-${t}`);
335
- })
336
- ] }) }), /* @__PURE__ */ w("tbody", { children: p && p.map((e, t) => /* @__PURE__ */ w(V, {
337
- trait: e,
338
- traitIndex: t,
339
- showDescription: !!g,
340
- showStandards: !!v,
341
- scaleIndex: i,
342
- scorePointsValues: h,
343
- excludeZero: u
344
- }, `trait_${i}_${t}`)) })] }, `scale-${i}`)]
345
- }),
346
- /* @__PURE__ */ w(W, {
347
- show: e && !l,
348
- onClick: this.scrollRight,
349
- extraStyles: {
350
- right: 0,
351
- background: `linear-gradient(to left, white, ${r.background()})`
352
- },
353
- children: /* @__PURE__ */ w(s, {})
354
- })
355
- ] });
356
- }
357
- };
358
- G.propTypes = {
359
- scaleIndex: D.default.number,
360
- scale: D.default.shape({
361
- excludeZero: D.default.bool,
362
- maxPoints: D.default.number,
363
- scorePointsLabels: D.default.arrayOf(D.default.string),
364
- traitLabel: D.default.string,
365
- traits: D.default.arrayOf(D.default.shape({
366
- name: D.default.string,
367
- standards: D.default.arrayOf(D.default.string),
368
- scorePointsDescriptors: D.default.arrayOf(D.default.string),
369
- description: D.default.string
370
- }))
371
- }),
372
- showPointsLabels: D.default.bool,
373
- showDescription: D.default.bool,
374
- showStandards: D.default.bool,
375
- arrowsDisabled: D.default.bool
376
- };
377
- //#endregion
378
- //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Link/linkClasses.js
379
- function he(e) {
380
- return f("MuiLink", e);
381
- }
382
- var ge = re("MuiLink", [
383
- "root",
384
- "underlineNone",
385
- "underlineHover",
386
- "underlineAlways",
387
- "button",
388
- "focusVisible"
389
- ]), _e = ({ theme: e, ownerState: t }) => {
390
- let n = t.color;
391
- if ("colorSpace" in e && e.colorSpace) {
392
- let r = y(e, `palette.${n}.main`) || y(e, `palette.${n}`) || t.color;
393
- return e.alpha(r, .4);
394
- }
395
- let r = y(e, `palette.${n}.main`, !1) || y(e, `palette.${n}`, !1) || t.color, i = y(e, `palette.${n}.mainChannel`) || y(e, `palette.${n}Channel`);
396
- return "vars" in e && i ? `rgba(${i} / 0.4)` : _(r, .4);
397
- }, K = {
398
- primary: !0,
399
- secondary: !0,
400
- error: !0,
401
- info: !0,
402
- success: !0,
403
- warning: !0,
404
- textPrimary: !0,
405
- textSecondary: !0,
406
- textDisabled: !0
407
- }, q = (e) => {
408
- let { classes: t, component: n, focusVisible: r, underline: i } = e;
409
- return d({ root: [
410
- "root",
411
- `underline${o(i)}`,
412
- n === "button" && "button",
413
- r && "focusVisible"
414
- ] }, he, t);
415
- }, ve = u(a, {
416
- name: "MuiLink",
417
- slot: "Root",
418
- overridesResolver: (e, t) => {
419
- let { ownerState: n } = e;
420
- return [
421
- t.root,
422
- t[`underline${o(n.underline)}`],
423
- n.component === "button" && t.button
424
- ];
425
- }
426
- })(g(({ theme: e }) => ({ variants: [
427
- {
428
- props: { underline: "none" },
429
- style: { textDecoration: "none" }
430
- },
431
- {
432
- props: { underline: "hover" },
433
- style: {
434
- textDecoration: "none",
435
- "&:hover": { textDecoration: "underline" }
436
- }
437
- },
438
- {
439
- props: { underline: "always" },
440
- style: {
441
- textDecoration: "underline",
442
- "&:hover": { textDecorationColor: "inherit" }
443
- }
444
- },
445
- {
446
- props: ({ underline: e, ownerState: t }) => e === "always" && t.color !== "inherit",
447
- style: { textDecorationColor: "var(--Link-underlineColor)" }
448
- },
449
- {
450
- props: ({ underline: e, ownerState: t }) => e === "always" && t.color === "inherit",
451
- style: e.colorSpace ? { textDecorationColor: e.alpha("currentColor", .4) } : null
452
- },
453
- ...Object.entries(e.palette).filter(n()).map(([t]) => ({
454
- props: {
455
- underline: "always",
456
- color: t
457
- },
458
- style: { "--Link-underlineColor": e.alpha((e.vars || e).palette[t].main, .4) }
459
- })),
460
- {
461
- props: {
462
- underline: "always",
463
- color: "textPrimary"
464
- },
465
- style: { "--Link-underlineColor": e.alpha((e.vars || e).palette.text.primary, .4) }
466
- },
467
- {
468
- props: {
469
- underline: "always",
470
- color: "textSecondary"
471
- },
472
- style: { "--Link-underlineColor": e.alpha((e.vars || e).palette.text.secondary, .4) }
473
- },
474
- {
475
- props: {
476
- underline: "always",
477
- color: "textDisabled"
478
- },
479
- style: { "--Link-underlineColor": (e.vars || e).palette.text.disabled }
480
- },
481
- {
482
- props: { component: "button" },
483
- style: {
484
- position: "relative",
485
- WebkitTapHighlightColor: "transparent",
486
- backgroundColor: "transparent",
487
- outline: 0,
488
- border: 0,
489
- margin: 0,
490
- borderRadius: 0,
491
- padding: 0,
492
- cursor: "pointer",
493
- userSelect: "none",
494
- verticalAlign: "middle",
495
- MozAppearance: "none",
496
- WebkitAppearance: "none",
497
- "&::-moz-focus-inner": { borderStyle: "none" },
498
- [`&.${ge.focusVisible}`]: { outline: "auto" }
499
- }
500
- }
501
- ] }))), ye = /*#__PURE__*/ S.forwardRef(function(e, t) {
502
- let n = ne({
503
- props: e,
504
- name: "MuiLink"
505
- }), r = ee(), { className: i, color: a = "primary", component: o = "a", onBlur: s, onFocus: c, TypographyClasses: l, underline: u = "always", variant: d = "inherit", sx: f, ...p } = n, [h, g] = S.useState(!1), _ = (e) => {
506
- b(e.target) || g(!1), s && s(e);
507
- }, v = (e) => {
508
- b(e.target) && g(!0), c && c(e);
509
- }, y = {
510
- ...n,
511
- color: a,
512
- component: o,
513
- focusVisible: h,
514
- underline: u,
515
- variant: d
516
- };
517
- return /*#__PURE__*/ w(ve, {
518
- color: a,
519
- className: m(q(y).root, i),
520
- classes: l,
521
- component: o,
522
- onBlur: _,
523
- onFocus: v,
524
- ref: t,
525
- ownerState: y,
526
- variant: d,
527
- ...p,
528
- sx: [...K[a] === void 0 ? [{ color: a }] : [], ...Array.isArray(f) ? f : [f]],
529
- style: {
530
- ...p.style,
531
- ...u === "always" && a !== "inherit" && !K[a] && { "--Link-underlineColor": _e({
532
- theme: r,
533
- ownerState: y
534
- }) }
535
- }
536
- });
537
- });
538
- //#endregion
539
- //#region ../multi-trait-rubric/dist/delivery/main.js
540
- function J(e) {
541
- return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
542
- }
543
- function Y(e, t) {
544
- return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
545
- }
546
- var X = Y(c, "UiLayout") || Y(be.UiLayout, "UiLayout"), Z = t, Q = Z.default, be = Q && typeof Q == "object" ? Q : Z, $ = class extends C.Component {
547
- constructor(e) {
548
- super(e), this.state = {
549
- rubricOpen: !1,
550
- linkPrefix: "Show"
551
- }, this.toggleRubric = this.toggleRubric.bind(this);
552
- }
553
- toggleRubric() {
554
- this.setState({ rubricOpen: !this.state.rubricOpen }), this.setState({ linkPrefix: this.state.rubricOpen ? "Show" : "Hide" });
555
- }
556
- render() {
557
- let { model: e } = this.props, { animationsDisabled: t } = this.props, { extraCSSRules: n, halfScoring: i, scales: a, visible: o, pointLabels: s, description: c, standards: u, arrowsDisabled: d } = e || {};
558
- if (t ||= e.animationsDisabled, !a || !o) return null;
559
- let f = /* @__PURE__ */ T(X, {
560
- extraCSSRules: n,
561
- style: {
562
- fontFamily: "Cerebri Sans",
563
- color: r.text(),
564
- backgroundColor: r.background()
565
- },
566
- children: [i ? /* @__PURE__ */ w("div", {
567
- style: { marginBottom: "16px" },
568
- children: "* Half-point or in-between scores are permitted under this rubric."
569
- }) : null, a.map((e, t) => /* @__PURE__ */ w(G, {
570
- scale: e,
571
- scaleIndex: t,
572
- showPointsLabels: s,
573
- showDescription: c,
574
- showStandards: u,
575
- arrowsDisabled: d
576
- }, `scale_${t}`))]
577
- });
578
- return t ? f : /* @__PURE__ */ T(X, {
579
- extraCSSRules: n,
580
- style: {
581
- color: r.text(),
582
- backgroundColor: r.background()
583
- },
584
- children: [/* @__PURE__ */ T(ye, {
585
- style: { backgroundColor: r.background() },
586
- href: this.dudUrl,
587
- onClick: this.toggleRubric,
588
- children: [this.state.linkPrefix, " Rubric"]
589
- }), /* @__PURE__ */ w(l, {
590
- style: { marginTop: "16px" },
591
- in: this.state.rubricOpen,
592
- timeout: {
593
- enter: 225,
594
- exit: 195
595
- },
596
- children: f
597
- })]
598
- });
599
- }
600
- };
601
- $.propTypes = {
602
- model: D.default.shape({
603
- halfScoring: D.default.bool,
604
- scales: D.default.arrayOf(D.default.shape({
605
- excludeZero: D.default.bool,
606
- maxPoints: D.default.number,
607
- scorePointsLabels: D.default.arrayOf(D.default.string),
608
- traitLabel: D.default.string,
609
- traits: D.default.arrayOf(D.default.shape({
610
- name: D.default.string,
611
- description: D.default.string,
612
- scorePointsDescriptors: D.default.arrayOf(D.default.string),
613
- standards: D.default.arrayOf(D.default.string)
614
- }))
615
- })),
616
- visible: D.default.bool,
617
- pointLabels: D.default.bool,
618
- description: D.default.bool,
619
- standards: D.default.bool,
620
- animationsDisabled: D.default.bool
621
- }),
622
- animationsDisabled: D.default.bool
623
- };
624
- //#endregion
625
- //#region ../../shared/player-events/dist/index.js
626
- var xe = class e extends CustomEvent {
627
- static {
628
- this.TYPE = "model-set";
629
- }
630
- constructor(t, n, r) {
631
- super(e.TYPE, {
632
- bubbles: !0,
633
- composed: !0,
634
- detail: {
635
- complete: n,
636
- component: t,
637
- hasModel: r
638
- }
639
- }), this.component = t, this.complete = n;
640
- }
641
- };
642
- (class e extends CustomEvent {
643
- static {
644
- this.TYPE = "session-changed";
645
- }
646
- constructor(t, n) {
647
- super(e.TYPE, {
648
- bubbles: !0,
649
- composed: !0,
650
- detail: {
651
- complete: n,
652
- component: t
653
- }
654
- }), this.component = t, this.complete = n;
655
- }
656
- });
657
- //#endregion
658
- //#region ../multi-trait-rubric/dist/delivery/index.js
659
- var Se = class extends HTMLElement {
660
- constructor() {
661
- super(), this._model = {}, this._session = null, this._root = null;
662
- }
663
- set model(e) {
664
- this._model = e, this.dispatchEvent(new xe(this.tagName.toLowerCase(), this._session, !!this._model)), this._render();
665
- }
666
- set session(e) {
667
- this._session = e;
668
- }
669
- get session() {
670
- return this._session;
671
- }
672
- connectedCallback() {
673
- this._render();
674
- }
675
- _render() {
676
- let e = C.createElement($, {
677
- model: this._model,
678
- session: this._session
679
- });
680
- this._root ||= E(this), this._root.render(e), queueMicrotask(() => {
681
- i(this);
682
- });
683
- }
684
- disconnectedCallback() {
685
- this._root && this._root.unmount();
686
- }
687
- };
688
- //#endregion
689
- export { R as n, Se as t };
690
-
691
- //# sourceMappingURL=delivery-DROj6gHl.js.map