@pie-element/multi-trait-rubric 9.0.2-next.20261007003844 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Typography-DKQL_lzf.js → Typography-7pyD6Kbe.js} +2565 -1642
- package/dist/browser/Typography-7pyD6Kbe.js.map +1 -0
- package/dist/browser/author/index.js +1227 -1227
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +83 -83
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/{Typography-BNk5ubng.js → Typography-9Zm_a8OS.js} +2597 -1674
- package/dist/browser/editor-runtime/Typography-9Zm_a8OS.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +1259 -1259
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +82 -82
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/browser/{mathjax-BKrHE4xs-CO0g28Yn.js → editor-runtime/mathjax-BKrHE4xs-DJZ7oXS7.js} +2 -2
- package/dist/browser/editor-runtime/{mathjax-BKrHE4xs-CUxVqXGp.js.map → mathjax-BKrHE4xs-DJZ7oXS7.js.map} +1 -1
- package/dist/browser/{editor-runtime/mathjax-BKrHE4xs-CUxVqXGp.js → mathjax-BKrHE4xs-Bu6C_Knc.js} +12 -12
- package/dist/browser/{mathjax-BKrHE4xs-CO0g28Yn.js.map → mathjax-BKrHE4xs-Bu6C_Knc.js.map} +1 -1
- package/dist/delivery/scale.js +40 -39
- package/dist/delivery/trait.js +16 -15
- package/dist/index.iife.js +48 -46
- package/package.json +12 -11
- package/dist/browser/Typography-DKQL_lzf.js.map +0 -1
- package/dist/browser/editor-runtime/Typography-BNk5ubng.js.map +0 -1
package/dist/delivery/scale.js
CHANGED
|
@@ -3,17 +3,18 @@ import t from "react";
|
|
|
3
3
|
import n from "prop-types";
|
|
4
4
|
import { styled as r } from "@mui/material/styles";
|
|
5
5
|
import { color as i } from "@pie-lib/render-ui";
|
|
6
|
-
import {
|
|
7
|
-
import s from "
|
|
8
|
-
import c from "@mui/icons-material/
|
|
6
|
+
import { sanitizeModelHtml as a } from "@pie-element/shared-utils";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import c from "@mui/icons-material/ArrowBackIos";
|
|
9
|
+
import l from "@mui/icons-material/ArrowForwardIos";
|
|
9
10
|
//#region src/delivery/scale.tsx
|
|
10
|
-
var
|
|
11
|
+
var u = r("div")({
|
|
11
12
|
display: "flex",
|
|
12
13
|
position: "relative"
|
|
13
|
-
}),
|
|
14
|
+
}), d = r("div")({
|
|
14
15
|
width: "100%",
|
|
15
16
|
overflow: "auto"
|
|
16
|
-
}),
|
|
17
|
+
}), f = r("table")(({ theme: e }) => ({
|
|
17
18
|
borderSpacing: 0,
|
|
18
19
|
marginBottom: e.spacing(2),
|
|
19
20
|
borderRadius: "4px",
|
|
@@ -37,12 +38,12 @@ var l = r("div")({
|
|
|
37
38
|
padding: `${e.spacing(2)} ${e.spacing(1)}`,
|
|
38
39
|
verticalAlign: "top"
|
|
39
40
|
}
|
|
40
|
-
})),
|
|
41
|
+
})), p = r("table")({ "& td": {
|
|
41
42
|
border: 0,
|
|
42
43
|
padding: 0,
|
|
43
44
|
textAlign: "center",
|
|
44
45
|
minWidth: "200px"
|
|
45
|
-
} }),
|
|
46
|
+
} }), m = r("div")({ marginBottom: "4px" }), h = r("td")({ fontWeight: "normal" }), g = ({ show: e, onClick: t, extraStyles: n, children: r }) => /* @__PURE__ */ o("div", {
|
|
46
47
|
style: {
|
|
47
48
|
height: "calc(100% - 1px)",
|
|
48
49
|
top: "1px",
|
|
@@ -58,13 +59,13 @@ var l = r("div")({
|
|
|
58
59
|
onClick: t,
|
|
59
60
|
children: r
|
|
60
61
|
});
|
|
61
|
-
|
|
62
|
+
g.propTypes = {
|
|
62
63
|
show: n.bool,
|
|
63
64
|
onClick: n.func,
|
|
64
65
|
extraStyles: n.object,
|
|
65
66
|
children: n.object
|
|
66
67
|
};
|
|
67
|
-
var
|
|
68
|
+
var _ = class extends t.Component {
|
|
68
69
|
state = {};
|
|
69
70
|
componentDidMount() {
|
|
70
71
|
this.tableWrapper && this.tableWrapper.offsetWidth < this.tableWrapper.scrollWidth && this.setState({ showRight: !0 });
|
|
@@ -83,31 +84,31 @@ var g = class extends t.Component {
|
|
|
83
84
|
});
|
|
84
85
|
};
|
|
85
86
|
render() {
|
|
86
|
-
let { showRight: t, showLeft: n } = this.state, { scale: r, scaleIndex:
|
|
87
|
+
let { showRight: t, showLeft: n } = this.state, { scale: r, scaleIndex: _, showDescription: v, showPointsLabels: y, showStandards: b, arrowsDisabled: x } = this.props, { excludeZero: S, maxPoints: C, traitLabel: w, traits: T, scorePointsLabels: E } = r || {}, D = [], O, k, A;
|
|
87
88
|
try {
|
|
88
|
-
for (let e =
|
|
89
|
-
let { traitStandards: e, traitDescriptions: t } =
|
|
89
|
+
for (let e = C; +(e >= S); --e) D.push(e);
|
|
90
|
+
let { traitStandards: e, traitDescriptions: t } = T.reduce((e, t) => ({
|
|
90
91
|
traitStandards: [...e.traitStandards, ...t.standards || []],
|
|
91
92
|
traitDescriptions: [...e.traitDescriptions, ...t.description || []]
|
|
92
93
|
}), {
|
|
93
94
|
traitStandards: [],
|
|
94
95
|
traitDescriptions: []
|
|
95
96
|
});
|
|
96
|
-
|
|
97
|
+
O = v && t.length, k = y && E.length, A = b && e.length;
|
|
97
98
|
} catch {
|
|
98
|
-
|
|
99
|
+
O = !1, k = !1, A = !1;
|
|
99
100
|
}
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
show: n && !
|
|
101
|
+
return /* @__PURE__ */ s(u, { children: [
|
|
102
|
+
/* @__PURE__ */ o(g, {
|
|
103
|
+
show: n && !x,
|
|
103
104
|
onClick: this.scrollLeft,
|
|
104
105
|
extraStyles: {
|
|
105
106
|
left: 0,
|
|
106
107
|
background: `linear-gradient(to right, white, ${i.background()})`
|
|
107
108
|
},
|
|
108
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ o(c, {})
|
|
109
110
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ s(d, {
|
|
111
112
|
ref: (e) => {
|
|
112
113
|
this.tableWrapper = e;
|
|
113
114
|
},
|
|
@@ -117,42 +118,42 @@ var g = class extends t.Component {
|
|
|
117
118
|
showLeft: this.tableWrapper.scrollLeft < this.tableWrapper.scrollWidth && this.tableWrapper.scrollLeft > 0
|
|
118
119
|
});
|
|
119
120
|
},
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
children: [x && (t || n) ? /* @__PURE__ */ o("div", { children: "The item is too large to fit in print mode." }) : null, /* @__PURE__ */ s(f, { children: [/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ s("tr", { children: [
|
|
122
|
+
/* @__PURE__ */ o("th", { children: /* @__PURE__ */ o("div", { dangerouslySetInnerHTML: { __html: a(w) } }) }),
|
|
123
|
+
A ? /* @__PURE__ */ o("th", { children: /* @__PURE__ */ o("div", { children: "Standard(s)" }) }) : null,
|
|
124
|
+
O ? /* @__PURE__ */ o("th", { children: /* @__PURE__ */ o("div", { children: "Description" }) }) : null,
|
|
125
|
+
D && D.map((e, t) => {
|
|
125
126
|
let n = "";
|
|
126
127
|
try {
|
|
127
|
-
n =
|
|
128
|
+
n = E[D.length - t - 1] || "";
|
|
128
129
|
} catch {
|
|
129
130
|
n = "";
|
|
130
131
|
}
|
|
131
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ o("th", { children: /* @__PURE__ */ o(p, { children: /* @__PURE__ */ s("thead", { children: [k ? /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(m, { dangerouslySetInnerHTML: { __html: a(n) } }) }) }) : null, /* @__PURE__ */ o("tr", { children: /* @__PURE__ */ o(h, { children: e === 1 ? `${e} point` : `${e} points` }) })] }) }) }, `table-header-${t}`);
|
|
132
133
|
})
|
|
133
|
-
] }) }), /* @__PURE__ */
|
|
134
|
+
] }) }), /* @__PURE__ */ o("tbody", { children: T && T.map((t, n) => /* @__PURE__ */ o(e, {
|
|
134
135
|
trait: t,
|
|
135
136
|
traitIndex: n,
|
|
136
|
-
showDescription: !!
|
|
137
|
-
showStandards: !!
|
|
138
|
-
scaleIndex:
|
|
139
|
-
scorePointsValues:
|
|
140
|
-
excludeZero:
|
|
141
|
-
}, `trait_${
|
|
137
|
+
showDescription: !!O,
|
|
138
|
+
showStandards: !!A,
|
|
139
|
+
scaleIndex: _,
|
|
140
|
+
scorePointsValues: D,
|
|
141
|
+
excludeZero: S
|
|
142
|
+
}, `trait_${_}_${n}`)) })] }, `scale-${_}`)]
|
|
142
143
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
show: t && !
|
|
144
|
+
/* @__PURE__ */ o(g, {
|
|
145
|
+
show: t && !x,
|
|
145
146
|
onClick: this.scrollRight,
|
|
146
147
|
extraStyles: {
|
|
147
148
|
right: 0,
|
|
148
149
|
background: `linear-gradient(to left, white, ${i.background()})`
|
|
149
150
|
},
|
|
150
|
-
children: /* @__PURE__ */
|
|
151
|
+
children: /* @__PURE__ */ o(l, {})
|
|
151
152
|
})
|
|
152
153
|
] });
|
|
153
154
|
}
|
|
154
155
|
};
|
|
155
|
-
|
|
156
|
+
_.propTypes = {
|
|
156
157
|
scaleIndex: n.number,
|
|
157
158
|
scale: n.shape({
|
|
158
159
|
excludeZero: n.bool,
|
|
@@ -172,4 +173,4 @@ g.propTypes = {
|
|
|
172
173
|
arrowsDisabled: n.bool
|
|
173
174
|
};
|
|
174
175
|
//#endregion
|
|
175
|
-
export {
|
|
176
|
+
export { _ as default };
|
package/dist/delivery/trait.js
CHANGED
|
@@ -2,32 +2,33 @@ import "react";
|
|
|
2
2
|
import e from "prop-types";
|
|
3
3
|
import { styled as t } from "@mui/material/styles";
|
|
4
4
|
import { color as n } from "@pie-lib/render-ui";
|
|
5
|
-
import {
|
|
5
|
+
import { sanitizeModelHtml as r } from "@pie-element/shared-utils";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
7
|
//#region src/delivery/trait.tsx
|
|
7
|
-
var
|
|
8
|
+
var o = t("td")({
|
|
8
9
|
color: n.primaryDark(),
|
|
9
10
|
verticalAlign: "middle"
|
|
10
|
-
}),
|
|
11
|
+
}), s = t("div")({
|
|
11
12
|
color: n.secondaryBackground(),
|
|
12
13
|
textAlign: "center"
|
|
13
|
-
}),
|
|
14
|
-
let { trait: t, traitIndex: n, scaleIndex:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
}), c = (e) => {
|
|
15
|
+
let { trait: t, traitIndex: n, scaleIndex: c, showStandards: l, showDescription: u, scorePointsValues: d } = e, { name: f, standards: p, scorePointsDescriptors: m, description: h } = t || {};
|
|
16
|
+
return /* @__PURE__ */ a("tr", { children: [
|
|
17
|
+
/* @__PURE__ */ i(o, { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: r(f) } }) }),
|
|
18
|
+
l ? /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: r(p.join(",")) } }) }) : null,
|
|
19
|
+
u ? /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: r(h) } }) }) : null,
|
|
20
|
+
d && d.map((e, t) => {
|
|
20
21
|
let n;
|
|
21
22
|
try {
|
|
22
|
-
n =
|
|
23
|
+
n = m[d.length - t - 1] || "";
|
|
23
24
|
} catch {
|
|
24
25
|
n = "";
|
|
25
26
|
}
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ i("td", { children: n ? /* @__PURE__ */ i("div", { dangerouslySetInnerHTML: { __html: r(n) } }) : /* @__PURE__ */ i(s, { dangerouslySetInnerHTML: { __html: "No Description" } }) }, `table-cell-${t}`);
|
|
27
28
|
})
|
|
28
|
-
] }, `scale-${
|
|
29
|
+
] }, `scale-${c}-trait-${n}`);
|
|
29
30
|
};
|
|
30
|
-
|
|
31
|
+
c.propTypes = {
|
|
31
32
|
showStandards: e.bool,
|
|
32
33
|
showDescription: e.bool,
|
|
33
34
|
scorePointsValues: e.arrayOf(e.number),
|
|
@@ -41,4 +42,4 @@ s.propTypes = {
|
|
|
41
42
|
})
|
|
42
43
|
};
|
|
43
44
|
//#endregion
|
|
44
|
-
export {
|
|
45
|
+
export { c as default };
|