@pie-element/charting 13.0.6 → 13.0.7-next.20261019062545
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/author/index.js +263 -263
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{chart-CX7vDvbm.js → chart-DKqh2rSP.js} +9263 -9248
- package/dist/browser/chart-DKqh2rSP.js.map +1 -0
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/delivery/index.js +135 -134
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/editor-runtime/author/index.js +263 -263
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/{chart-CwvlidAB.js → chart-CMQmcsbF.js} +5651 -5636
- package/dist/browser/editor-runtime/chart-CMQmcsbF.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +135 -134
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -1
- package/dist/index.iife.js +102 -102
- package/dist/schemas/configuration.schema.json +1 -1
- package/dist/schemas/model.schema.json +1 -1
- package/dist/schemas/session.schema.json +1 -1
- package/package.json +14 -14
- package/dist/browser/chart-CX7vDvbm.js.map +0 -1
- package/dist/browser/editor-runtime/chart-CwvlidAB.js.map +0 -1
|
@@ -190,7 +190,7 @@ var b = (e, t) => new Promise((n) => {
|
|
|
190
190
|
}), c.length < 1 || c.length > 20 ? u.categoriesError = "The correct answer should include between 1 and 20 categories." : t(o.map((e) => n(e, "value", "label")), s.map((e) => n(e, "value", "label"))) && (u.identicalError = "Correct answer should not be identical to the chart’s initial state"), r(d) || (l.categoryErrors = d), r(u) || (l.correctAnswerErrors = u), l;
|
|
191
191
|
}, w = Object.freeze({
|
|
192
192
|
name: "@pie-element/charting",
|
|
193
|
-
version: "13.0.
|
|
193
|
+
version: "13.0.7-next.20261019062545"
|
|
194
194
|
});
|
|
195
195
|
//#endregion
|
|
196
196
|
export { f as checkLabelsEquality, b as createCorrectResponseSession, _ as filterCategories, g as getLogTrace, h as getScore, v as model, m as normalize, y as outcome, w as piePackage, p as setCorrectness, C as validate };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as e } from "../rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import {
|
|
3
|
-
import { g as
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import { jsx as
|
|
2
|
+
import { G as t, M as n, N as r, P as i, S as a, W as o, a as s, b as c, g as l, h as u, j as d, k as f, nt as p, o as m, q as h, t as g, v as _, x as v, y } from "../chart-DKqh2rSP.js";
|
|
3
|
+
import { g as b } from "../dist-kMt4MdSv.js";
|
|
4
|
+
import x, { useRef as S } from "react";
|
|
5
|
+
import { createRoot as C } from "react-dom/client";
|
|
6
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
7
7
|
//#region ../../lib-react/icons/dist/correct-response-icon.js
|
|
8
|
-
var
|
|
8
|
+
var E = /* @__PURE__ */ e(p(), 1), D = ({ bgFill: e, fgFill: t }) => /* @__PURE__ */ T("svg", {
|
|
9
9
|
"aria-hidden": "true",
|
|
10
10
|
focusable: "false",
|
|
11
11
|
preserveAspectRatio: "xMinYMin meet",
|
|
@@ -13,27 +13,27 @@ var T = /* @__PURE__ */ e(h(), 1), E = ({ bgFill: e, fgFill: t }) => /* @__PURE_
|
|
|
13
13
|
viewBox: "-283 359 34 35",
|
|
14
14
|
style: { enableBackground: "new -283 359 34 35" },
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ w("circle", {
|
|
17
17
|
cx: "-266",
|
|
18
18
|
cy: "375.9",
|
|
19
19
|
r: "14",
|
|
20
20
|
fill: e
|
|
21
21
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ w("path", {
|
|
23
23
|
d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z\n M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z",
|
|
24
24
|
fill: e
|
|
25
25
|
}),
|
|
26
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ w("polygon", {
|
|
27
27
|
points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6",
|
|
28
28
|
fill: t
|
|
29
29
|
})
|
|
30
30
|
]
|
|
31
31
|
});
|
|
32
|
-
|
|
33
|
-
bgFill:
|
|
34
|
-
fgFill:
|
|
32
|
+
D.propTypes = {
|
|
33
|
+
bgFill: E.default.string.isRequired,
|
|
34
|
+
fgFill: E.default.string.isRequired
|
|
35
35
|
};
|
|
36
|
-
var
|
|
36
|
+
var O = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ T("svg", {
|
|
37
37
|
"aria-hidden": "true",
|
|
38
38
|
focusable: "false",
|
|
39
39
|
preserveAspectRatio: "xMinYMin meet",
|
|
@@ -41,7 +41,7 @@ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
41
41
|
viewBox: "-129.5 127 34 35",
|
|
42
42
|
style: { enableBackground: "new -129.5 127 34 35" },
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ w("path", {
|
|
45
45
|
style: {
|
|
46
46
|
fill: "#D0CAC5",
|
|
47
47
|
stroke: "#E6E3E0",
|
|
@@ -50,7 +50,7 @@ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
50
50
|
},
|
|
51
51
|
d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5\n C-97.4,153.5-104.3,160.4-112.9,160.4z"
|
|
52
52
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ w("path", {
|
|
54
54
|
style: {
|
|
55
55
|
fill: "#B3ABA4",
|
|
56
56
|
stroke: "#CDC7C2",
|
|
@@ -59,86 +59,86 @@ var D = ({ bgFill: e, fgFill: t, borderFill: n }) => /* @__PURE__ */ w("svg", {
|
|
|
59
59
|
},
|
|
60
60
|
d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
|
|
61
61
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ w("circle", {
|
|
63
63
|
cx: "-114.2",
|
|
64
64
|
cy: "143.5",
|
|
65
65
|
r: "14",
|
|
66
66
|
fill: e
|
|
67
67
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ w("path", {
|
|
69
69
|
d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z\n M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z",
|
|
70
70
|
fill: n
|
|
71
71
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ w("polygon", {
|
|
73
73
|
points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2",
|
|
74
74
|
fill: t
|
|
75
75
|
})
|
|
76
76
|
]
|
|
77
77
|
});
|
|
78
|
-
|
|
79
|
-
bgFill:
|
|
80
|
-
fgFill:
|
|
81
|
-
borderFill:
|
|
78
|
+
O.propTypes = {
|
|
79
|
+
bgFill: E.default.string.isRequired,
|
|
80
|
+
fgFill: E.default.string.isRequired,
|
|
81
|
+
borderFill: E.default.string.isRequired
|
|
82
82
|
};
|
|
83
|
-
var ee =
|
|
83
|
+
var ee = h("div")(({ size: e }) => ({
|
|
84
84
|
width: e || "25px",
|
|
85
85
|
height: e || "25px"
|
|
86
|
-
})),
|
|
86
|
+
})), k = ({ open: e, size: t }) => /* @__PURE__ */ w(ee, {
|
|
87
87
|
size: t,
|
|
88
|
-
children: e ? /* @__PURE__ */
|
|
88
|
+
children: e ? /* @__PURE__ */ w(D, {
|
|
89
89
|
bgFill: "#bce2ff",
|
|
90
90
|
fgFill: "#1a9cff"
|
|
91
|
-
}) : /* @__PURE__ */
|
|
91
|
+
}) : /* @__PURE__ */ w(O, {
|
|
92
92
|
bgFill: "white",
|
|
93
93
|
fgFill: "#1a9cff",
|
|
94
94
|
borderFill: "#bce2ff"
|
|
95
95
|
})
|
|
96
96
|
});
|
|
97
|
-
|
|
98
|
-
open:
|
|
99
|
-
size:
|
|
100
|
-
},
|
|
97
|
+
k.propTypes = {
|
|
98
|
+
open: E.default.bool,
|
|
99
|
+
size: E.default.string
|
|
100
|
+
}, k.defaultProps = { open: !1 };
|
|
101
101
|
//#endregion
|
|
102
102
|
//#region ../../lib-react/charting/dist/key-legend.js
|
|
103
|
-
var te =
|
|
104
|
-
backgroundColor:
|
|
105
|
-
color:
|
|
103
|
+
var te = h("div")(({ theme: e }) => ({
|
|
104
|
+
backgroundColor: t.v("pie")("background", t.defaults.WHITE),
|
|
105
|
+
color: t.text(),
|
|
106
106
|
padding: e.spacing(2),
|
|
107
107
|
width: "355px",
|
|
108
108
|
boxShadow: "inset 0px 1px 5px 0px #9297A6",
|
|
109
109
|
display: "flex",
|
|
110
110
|
flexDirection: "column",
|
|
111
111
|
gap: "16px"
|
|
112
|
-
})),
|
|
112
|
+
})), A = h("div")(() => ({
|
|
113
113
|
display: "flex",
|
|
114
114
|
alignItems: "center",
|
|
115
115
|
gap: "12px"
|
|
116
|
-
})), ne =
|
|
116
|
+
})), ne = h("div")(({ theme: e }) => ({
|
|
117
117
|
fontSize: e.typography.h6.fontSize,
|
|
118
118
|
fontWeight: "700"
|
|
119
|
-
})),
|
|
120
|
-
backgroundColor:
|
|
119
|
+
})), j = h("div")(() => ({ marginLeft: "2px" })), M = h(l)(({ theme: e }) => ({
|
|
120
|
+
backgroundColor: t.correct(),
|
|
121
121
|
borderRadius: e.spacing(2),
|
|
122
|
-
color:
|
|
123
|
-
})), re =
|
|
124
|
-
backgroundColor:
|
|
122
|
+
color: t.defaults.WHITE
|
|
123
|
+
})), re = h(m)(({ theme: e }) => ({
|
|
124
|
+
backgroundColor: t.incorrectWithIcon(),
|
|
125
125
|
borderRadius: e.spacing(2),
|
|
126
|
-
color:
|
|
127
|
-
})), ie =
|
|
126
|
+
color: t.defaults.WHITE
|
|
127
|
+
})), ie = h("div")(() => ({
|
|
128
128
|
marginLeft: "3px",
|
|
129
129
|
display: "flex",
|
|
130
130
|
alignItems: "center",
|
|
131
131
|
gap: "12px"
|
|
132
|
-
})), { translator:
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
132
|
+
})), { translator: N } = u, P = ({ language: e }) => /* @__PURE__ */ T(te, { children: [
|
|
133
|
+
/* @__PURE__ */ w(ne, { children: N.t("selectText.key", { lng: e }) }),
|
|
134
|
+
/* @__PURE__ */ T(A, { children: [/* @__PURE__ */ w(re, {}), /* @__PURE__ */ w("div", { children: N.t("charting.keyLegend.incorrectAnswer", { lng: e }) })] }),
|
|
135
|
+
/* @__PURE__ */ T(A, { children: [/* @__PURE__ */ w(M, {}), /* @__PURE__ */ w("div", { children: N.t("charting.keyLegend.correctAnswer", { lng: e }) })] }),
|
|
136
|
+
/* @__PURE__ */ T(ie, { children: [/* @__PURE__ */ w(M, { fontSize: "small" }), /* @__PURE__ */ w(j, { children: N.t("charting.keyLegend.correctKeyAnswer", { lng: e }) })] })
|
|
137
137
|
] });
|
|
138
|
-
|
|
138
|
+
P.propTypes = { language: E.default.string };
|
|
139
139
|
//#endregion
|
|
140
140
|
//#region ../../lib-react/correct-answer-toggle/dist/expander.js
|
|
141
|
-
var
|
|
141
|
+
var F = "height ease-in 300ms, opacity ease-in 300ms", ae = h("div")(() => ({
|
|
142
142
|
position: "relative",
|
|
143
143
|
height: 0,
|
|
144
144
|
overflow: "hidden",
|
|
@@ -146,7 +146,7 @@ var P = "height ease-in 300ms, opacity ease-in 300ms", ae = t("div")(() => ({
|
|
|
146
146
|
visibility: "hidden",
|
|
147
147
|
width: 0,
|
|
148
148
|
"&.enter": {
|
|
149
|
-
transition:
|
|
149
|
+
transition: F,
|
|
150
150
|
opacity: 1,
|
|
151
151
|
height: "auto",
|
|
152
152
|
width: "auto",
|
|
@@ -160,7 +160,7 @@ var P = "height ease-in 300ms, opacity ease-in 300ms", ae = t("div")(() => ({
|
|
|
160
160
|
minHeight: "25px"
|
|
161
161
|
},
|
|
162
162
|
"&.exit": {
|
|
163
|
-
transition:
|
|
163
|
+
transition: F,
|
|
164
164
|
opacity: 0,
|
|
165
165
|
height: 0,
|
|
166
166
|
visibility: "visible",
|
|
@@ -172,9 +172,9 @@ var P = "height ease-in 300ms, opacity ease-in 300ms", ae = t("div")(() => ({
|
|
|
172
172
|
height: 0,
|
|
173
173
|
width: 0
|
|
174
174
|
}
|
|
175
|
-
})),
|
|
176
|
-
let { show: t, children: n, className: r } = e, i =
|
|
177
|
-
return /* @__PURE__ */
|
|
175
|
+
})), I = (e) => {
|
|
176
|
+
let { show: t, children: n, className: r } = e, i = S(null);
|
|
177
|
+
return /* @__PURE__ */ w(o, {
|
|
178
178
|
nodeRef: i,
|
|
179
179
|
in: t,
|
|
180
180
|
appear: !0,
|
|
@@ -186,21 +186,21 @@ var P = "height ease-in 300ms, opacity ease-in 300ms", ae = t("div")(() => ({
|
|
|
186
186
|
exit: "exit",
|
|
187
187
|
exitDone: "exit-done"
|
|
188
188
|
},
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ w(ae, {
|
|
190
190
|
ref: i,
|
|
191
191
|
className: r,
|
|
192
192
|
children: n
|
|
193
193
|
})
|
|
194
194
|
});
|
|
195
195
|
};
|
|
196
|
-
|
|
197
|
-
show:
|
|
198
|
-
className:
|
|
199
|
-
children:
|
|
196
|
+
I.propTypes = {
|
|
197
|
+
show: E.default.bool.isRequired,
|
|
198
|
+
className: E.default.string,
|
|
199
|
+
children: E.default.oneOfType([E.default.arrayOf(E.default.node), E.default.node]).isRequired
|
|
200
200
|
};
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region ../../lib-react/correct-answer-toggle/dist/i18n/index.js
|
|
203
|
-
var oe =
|
|
203
|
+
var oe = i({
|
|
204
204
|
packageName: "@pie-lib/correct-answer-toggle",
|
|
205
205
|
source: {
|
|
206
206
|
showCorrectAnswer: "Show correct answer",
|
|
@@ -259,23 +259,23 @@ var oe = r({
|
|
|
259
259
|
});
|
|
260
260
|
//#endregion
|
|
261
261
|
//#region ../../lib-react/correct-answer-toggle/dist/index.js
|
|
262
|
-
function
|
|
262
|
+
function L(e) {
|
|
263
263
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
264
264
|
}
|
|
265
|
-
function
|
|
266
|
-
return !e ||
|
|
265
|
+
function R(e, t) {
|
|
266
|
+
return !e || L(e) ? e : L(e.default) ? e.default : t && L(e[t]) ? e[t] : t && L(e[t]?.default) ? e[t].default : e;
|
|
267
267
|
}
|
|
268
|
-
var
|
|
268
|
+
var z = _, B = z.default, se = B && typeof B == "object" ? B : z, ce = R(v, "Readable") || R(se.Readable, "Readable"), le = {
|
|
269
269
|
WebkitTouchCallout: "none",
|
|
270
270
|
WebkitUserSelect: "none",
|
|
271
271
|
KhtmlUserSelect: "none",
|
|
272
272
|
MozUserSelect: "none",
|
|
273
273
|
msUserSelect: "none",
|
|
274
274
|
userSelect: "none"
|
|
275
|
-
}, ue =
|
|
275
|
+
}, ue = h("div")(() => ({
|
|
276
276
|
width: "100%",
|
|
277
277
|
cursor: "pointer"
|
|
278
|
-
})), de =
|
|
278
|
+
})), de = h("button")(() => ({
|
|
279
279
|
margin: "0 auto",
|
|
280
280
|
textAlign: "center",
|
|
281
281
|
display: "flex",
|
|
@@ -288,18 +288,18 @@ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Rea
|
|
|
288
288
|
font: "inherit",
|
|
289
289
|
cursor: "pointer",
|
|
290
290
|
"&:focus-visible": {
|
|
291
|
-
outline: `2px solid ${
|
|
291
|
+
outline: `2px solid ${t.buttonFocusOutline()}`,
|
|
292
292
|
outlineOffset: "-2px"
|
|
293
293
|
}
|
|
294
|
-
})),
|
|
294
|
+
})), V = h("div")(() => ({
|
|
295
295
|
width: "fit-content",
|
|
296
296
|
minWidth: "140px",
|
|
297
297
|
alignSelf: "center",
|
|
298
298
|
verticalAlign: "middle",
|
|
299
|
-
color: `var(--correct-answer-toggle-label-color, ${
|
|
299
|
+
color: `var(--correct-answer-toggle-label-color, ${t.text()})`,
|
|
300
300
|
fontWeight: "normal",
|
|
301
301
|
...le
|
|
302
|
-
})),
|
|
302
|
+
})), H = h("div")(() => ({
|
|
303
303
|
position: "absolute",
|
|
304
304
|
width: "25px",
|
|
305
305
|
"&.enter": { opacity: "0" },
|
|
@@ -312,27 +312,27 @@ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Rea
|
|
|
312
312
|
opacity: "0",
|
|
313
313
|
transition: "opacity 0.3s ease-in"
|
|
314
314
|
}
|
|
315
|
-
})), fe =
|
|
315
|
+
})), fe = h("div")(() => ({
|
|
316
316
|
width: "25px",
|
|
317
317
|
marginRight: "5px",
|
|
318
318
|
display: "flex",
|
|
319
319
|
alignItems: "center"
|
|
320
|
-
})), pe = class extends
|
|
320
|
+
})), pe = class extends x.Component {
|
|
321
321
|
static propTypes = {
|
|
322
|
-
onToggle:
|
|
323
|
-
toggled:
|
|
324
|
-
show:
|
|
325
|
-
hideMessage:
|
|
326
|
-
showMessage:
|
|
327
|
-
className:
|
|
328
|
-
language:
|
|
322
|
+
onToggle: E.default.func,
|
|
323
|
+
toggled: E.default.bool,
|
|
324
|
+
show: E.default.bool,
|
|
325
|
+
hideMessage: E.default.string,
|
|
326
|
+
showMessage: E.default.string,
|
|
327
|
+
className: E.default.string,
|
|
328
|
+
language: E.default.string
|
|
329
329
|
};
|
|
330
330
|
static defaultProps = {
|
|
331
331
|
show: !1,
|
|
332
332
|
toggled: !1
|
|
333
333
|
};
|
|
334
334
|
constructor(e) {
|
|
335
|
-
super(e), this.state = { show: e.show }, this.openIconRef =
|
|
335
|
+
super(e), this.state = { show: e.show }, this.openIconRef = x.createRef(), this.closedIconRef = x.createRef();
|
|
336
336
|
}
|
|
337
337
|
relabel = () => this.forceUpdate();
|
|
338
338
|
onClick() {
|
|
@@ -345,17 +345,18 @@ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Rea
|
|
|
345
345
|
this.setState({ show: e.show });
|
|
346
346
|
}
|
|
347
347
|
render() {
|
|
348
|
-
let { className: e, toggled: t, language: n } = this.props,
|
|
349
|
-
return /* @__PURE__ */
|
|
348
|
+
let { className: e, toggled: t, language: n } = this.props, i = oe.forLocale(n, this.relabel), a = this.props.hideMessage ?? i.t("hideCorrectAnswer"), s = this.props.showMessage ?? i.t("showCorrectAnswer");
|
|
349
|
+
return /* @__PURE__ */ w(ue, {
|
|
350
350
|
className: e,
|
|
351
|
-
|
|
351
|
+
...r(n),
|
|
352
|
+
children: /* @__PURE__ */ w(I, {
|
|
352
353
|
show: this.state.show,
|
|
353
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ T(de, {
|
|
354
355
|
type: "button",
|
|
355
356
|
"aria-pressed": !!t,
|
|
356
357
|
onClick: this.onClick.bind(this),
|
|
357
358
|
onTouchEnd: this.onTouch.bind(this),
|
|
358
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ T(fe, { children: [/* @__PURE__ */ w(o, {
|
|
359
360
|
nodeRef: this.openIconRef,
|
|
360
361
|
timeout: 400,
|
|
361
362
|
in: t,
|
|
@@ -366,11 +367,11 @@ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Rea
|
|
|
366
367
|
exit: "exit",
|
|
367
368
|
exitActive: "exit-active"
|
|
368
369
|
},
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ w(H, {
|
|
370
371
|
ref: this.openIconRef,
|
|
371
|
-
children: /* @__PURE__ */
|
|
372
|
+
children: /* @__PURE__ */ w(k, { open: t }, "correct-open")
|
|
372
373
|
})
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ w(o, {
|
|
374
375
|
nodeRef: this.closedIconRef,
|
|
375
376
|
timeout: 5e3,
|
|
376
377
|
in: !t,
|
|
@@ -381,15 +382,15 @@ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Rea
|
|
|
381
382
|
exit: "exit",
|
|
382
383
|
exitActive: "exit-active"
|
|
383
384
|
},
|
|
384
|
-
children: /* @__PURE__ */
|
|
385
|
+
children: /* @__PURE__ */ w(H, {
|
|
385
386
|
ref: this.closedIconRef,
|
|
386
|
-
children: /* @__PURE__ */
|
|
387
|
+
children: /* @__PURE__ */ w(k, { open: t }, "correct-closed")
|
|
387
388
|
})
|
|
388
|
-
})] }), /* @__PURE__ */
|
|
389
|
+
})] }), /* @__PURE__ */ w(ce, {
|
|
389
390
|
false: !0,
|
|
390
|
-
children: /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ w(V, {
|
|
391
392
|
"aria-hidden": !this.state.show,
|
|
392
|
-
children: t ?
|
|
393
|
+
children: t ? a : s
|
|
393
394
|
})
|
|
394
395
|
})]
|
|
395
396
|
})
|
|
@@ -399,25 +400,25 @@ var R = g, z = R.default, se = z && typeof z == "object" ? z : R, ce = L(_, "Rea
|
|
|
399
400
|
};
|
|
400
401
|
//#endregion
|
|
401
402
|
//#region src/delivery/main.tsx
|
|
402
|
-
function
|
|
403
|
+
function U(e) {
|
|
403
404
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
404
405
|
}
|
|
405
|
-
function
|
|
406
|
-
return !e ||
|
|
406
|
+
function W(e, t) {
|
|
407
|
+
return !e || U(e) ? e : U(e.default) ? e.default : t && U(e[t]) ? e[t] : t && U(e[t]?.default) ? e[t].default : e;
|
|
407
408
|
}
|
|
408
|
-
var
|
|
409
|
-
color:
|
|
410
|
-
backgroundColor:
|
|
409
|
+
var G = _, K = G.default, q = K && typeof K == "object" ? K : G, me = W(f, "UiLayout") || W(q.UiLayout, "UiLayout"), J = W(a, "PreviewPrompt") || W(q.PreviewPrompt, "PreviewPrompt"), Y = W(d, "Collapsible") || W(q.Collapsible, "Collapsible"), { translator: X } = u, he = h(me)({
|
|
410
|
+
color: t.text(),
|
|
411
|
+
backgroundColor: t.background(),
|
|
411
412
|
overflowX: "scroll",
|
|
412
413
|
overflowY: "hidden"
|
|
413
|
-
}),
|
|
414
|
+
}), Z = h(g)(({ theme: e }) => ({
|
|
414
415
|
marginTop: e.spacing(2),
|
|
415
416
|
marginBottom: e.spacing(2)
|
|
416
|
-
})), ge =
|
|
417
|
+
})), ge = h(Y)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), Q = class extends x.Component {
|
|
417
418
|
static propTypes = {
|
|
418
|
-
model:
|
|
419
|
-
onAnswersChange:
|
|
420
|
-
categories:
|
|
419
|
+
model: E.default.object.isRequired,
|
|
420
|
+
onAnswersChange: E.default.func,
|
|
421
|
+
categories: E.default.array
|
|
421
422
|
};
|
|
422
423
|
constructor(e) {
|
|
423
424
|
super(e), this.state = {
|
|
@@ -426,42 +427,42 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
426
427
|
};
|
|
427
428
|
}
|
|
428
429
|
componentDidUpdate(e) {
|
|
429
|
-
|
|
430
|
+
b(e.categories, this.props.categories) ? b(e.model.data, this.props.model.data) || this.setState({ categories: this.props.model.data }) : this.setState({ categories: this.props.categories });
|
|
430
431
|
}
|
|
431
432
|
changeData = (e) => this.setState({ categories: e }, () => this.props.onAnswersChange(e));
|
|
432
433
|
toggleCorrect = (e) => this.setState({ showingCorrect: e });
|
|
433
434
|
render() {
|
|
434
|
-
let { categories: e, showingCorrect: t } = this.state, { model: n } = this.props, { teacherInstructions: r, prompt: i, chartType: a, size: o, domain: l, range: u, title: d, addCategoryEnabled: f, studentNewCategoryDefaultLabel: p, showToggle: m, rationale: h, correctAnswer: g, language: _, env:
|
|
435
|
+
let { categories: e, showingCorrect: t } = this.state, { model: n } = this.props, { teacherInstructions: r, prompt: i, chartType: a, size: o, domain: l, range: u, title: d, addCategoryEnabled: f, studentNewCategoryDefaultLabel: p, showToggle: m, rationale: h, correctAnswer: g, language: _, env: v, showKeyLegend: b } = n, { correctedAnswer: x, extraCSSRules: S } = n, C = (g?.data || []).map((e) => ({
|
|
435
436
|
...e,
|
|
436
437
|
interactive: !1,
|
|
437
438
|
editable: !1
|
|
438
|
-
})), { mode: E } =
|
|
439
|
+
})), { mode: E } = v || {};
|
|
439
440
|
E === "view" && (x = (x || []).map((e) => ({
|
|
440
441
|
...e,
|
|
441
442
|
editable: !1
|
|
442
443
|
})));
|
|
443
|
-
let D = n.rationale && (c(n.rationale) ||
|
|
444
|
-
return /* @__PURE__ */
|
|
444
|
+
let D = n.rationale && (c(n.rationale) || y(n.rationale));
|
|
445
|
+
return /* @__PURE__ */ T(he, {
|
|
445
446
|
extraCSSRules: S,
|
|
446
447
|
children: [
|
|
447
|
-
n.teacherInstructions && (c(n.teacherInstructions) ||
|
|
448
|
+
n.teacherInstructions && (c(n.teacherInstructions) || y(n.teacherInstructions)) && /* @__PURE__ */ w(ge, {
|
|
448
449
|
labels: {
|
|
449
|
-
hidden:
|
|
450
|
-
visible:
|
|
450
|
+
hidden: X.t("common:showTeacherInstructions", { lng: _ }),
|
|
451
|
+
visible: X.t("common:hideTeacherInstructions", { lng: _ })
|
|
451
452
|
},
|
|
452
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ w(J, { prompt: r })
|
|
453
454
|
}),
|
|
454
|
-
i && /* @__PURE__ */
|
|
455
|
+
i && /* @__PURE__ */ w(J, {
|
|
455
456
|
className: "prompt",
|
|
456
457
|
prompt: i
|
|
457
458
|
}),
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ w(pe, {
|
|
459
460
|
show: m,
|
|
460
461
|
toggled: t,
|
|
461
462
|
onToggle: this.toggleCorrect,
|
|
462
463
|
language: _
|
|
463
464
|
}),
|
|
464
|
-
t && m ? /* @__PURE__ */
|
|
465
|
+
t && m ? /* @__PURE__ */ w(Z, {
|
|
465
466
|
chartType: a,
|
|
466
467
|
size: o,
|
|
467
468
|
domain: l,
|
|
@@ -474,7 +475,7 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
474
475
|
s.DotPlot(),
|
|
475
476
|
s.LinePlot()
|
|
476
477
|
],
|
|
477
|
-
data:
|
|
478
|
+
data: C || e,
|
|
478
479
|
title: d,
|
|
479
480
|
onDataChange: this.changeData,
|
|
480
481
|
addCategoryEnabled: !1,
|
|
@@ -482,7 +483,7 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
482
483
|
language: _,
|
|
483
484
|
disabled: n.disabled,
|
|
484
485
|
labelsPlaceholders: {}
|
|
485
|
-
}) : /* @__PURE__ */
|
|
486
|
+
}) : /* @__PURE__ */ w(Z, {
|
|
486
487
|
chartType: a,
|
|
487
488
|
size: o,
|
|
488
489
|
domain: l,
|
|
@@ -503,20 +504,20 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
503
504
|
language: _,
|
|
504
505
|
disabled: n.disabled,
|
|
505
506
|
labelsPlaceholders: {},
|
|
506
|
-
correctData: m ?
|
|
507
|
+
correctData: m ? C : void 0
|
|
507
508
|
}),
|
|
508
|
-
!t && b && /* @__PURE__ */
|
|
509
|
-
D && /* @__PURE__ */
|
|
509
|
+
!t && b && /* @__PURE__ */ w(P, { language: _ }),
|
|
510
|
+
D && /* @__PURE__ */ w(Y, {
|
|
510
511
|
labels: {
|
|
511
|
-
hidden:
|
|
512
|
-
visible:
|
|
512
|
+
hidden: X.t("common:showRationale", { lng: _ }),
|
|
513
|
+
visible: X.t("common:hideRationale", { lng: _ })
|
|
513
514
|
},
|
|
514
|
-
children: /* @__PURE__ */
|
|
515
|
+
children: /* @__PURE__ */ w(J, { prompt: h })
|
|
515
516
|
})
|
|
516
517
|
]
|
|
517
518
|
});
|
|
518
519
|
}
|
|
519
|
-
},
|
|
520
|
+
}, $ = class e extends CustomEvent {
|
|
520
521
|
static {
|
|
521
522
|
this.TYPE = "model-set";
|
|
522
523
|
}
|
|
@@ -531,7 +532,7 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
531
532
|
}
|
|
532
533
|
}), this.component = t, this.complete = n;
|
|
533
534
|
}
|
|
534
|
-
},
|
|
535
|
+
}, _e = class e extends CustomEvent {
|
|
535
536
|
static {
|
|
536
537
|
this.TYPE = "session-changed";
|
|
537
538
|
}
|
|
@@ -545,7 +546,7 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
545
546
|
}
|
|
546
547
|
}), this.component = t, this.complete = n;
|
|
547
548
|
}
|
|
548
|
-
},
|
|
549
|
+
}, ve = class extends HTMLElement {
|
|
549
550
|
constructor() {
|
|
550
551
|
super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
|
|
551
552
|
}
|
|
@@ -569,7 +570,7 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
569
570
|
this._mathObserver &&= (this._mathObserver.disconnect(), null);
|
|
570
571
|
}
|
|
571
572
|
set model(e) {
|
|
572
|
-
this._model = e, this._session && this.isComplete(this._session.answer) ? this.dispatchEvent(new
|
|
573
|
+
this._model = e, this._session && this.isComplete(this._session.answer) ? this.dispatchEvent(new $(this.tagName.toLowerCase(), !0, !!this._model)) : this.dispatchEvent(new $(this.tagName.toLowerCase(), !1, !!this._model)), this._render();
|
|
573
574
|
}
|
|
574
575
|
set session(e) {
|
|
575
576
|
this._session = e, this._render();
|
|
@@ -582,7 +583,7 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
582
583
|
}
|
|
583
584
|
isComplete = (e) => Array.isArray(e) && e.length > 0;
|
|
584
585
|
changeAnswers = (e) => {
|
|
585
|
-
this._session.answer = e, this.dispatchEvent(new
|
|
586
|
+
this._session.answer = e, this.dispatchEvent(new _e(this.tagName.toLowerCase(), this.isComplete(this._session.answer))), this._render();
|
|
586
587
|
};
|
|
587
588
|
_render() {
|
|
588
589
|
if (!this._model || !this._session) return;
|
|
@@ -590,21 +591,21 @@ var W = g, G = W.default, K = G && typeof G == "object" ? G : W, me = U(f, "UiLa
|
|
|
590
591
|
let e = {
|
|
591
592
|
...this._model,
|
|
592
593
|
data: this._model.data ? [...this._model.data] : this._model.data
|
|
593
|
-
}, t =
|
|
594
|
+
}, t = x.createElement(Q, {
|
|
594
595
|
model: e,
|
|
595
596
|
categories: this._session.answer,
|
|
596
597
|
onAnswersChange: this.changeAnswers
|
|
597
598
|
});
|
|
598
|
-
this._root ||=
|
|
599
|
+
this._root ||= C(this), this._root.render(t);
|
|
599
600
|
}
|
|
600
601
|
disconnectedCallback() {
|
|
601
602
|
this._disconnectMathObserver(), this._root &&= (this._root.unmount(), null);
|
|
602
603
|
}
|
|
603
|
-
},
|
|
604
|
+
}, ye = Object.freeze({
|
|
604
605
|
name: "@pie-element/charting",
|
|
605
|
-
version: "13.0.
|
|
606
|
+
version: "13.0.7-next.20261019062545"
|
|
606
607
|
});
|
|
607
608
|
//#endregion
|
|
608
|
-
export {
|
|
609
|
+
export { Q as Component, ve as default, ye as piePackage };
|
|
609
610
|
|
|
610
611
|
//# sourceMappingURL=index.js.map
|