@pie-element/extended-text-entry 15.1.2-next.11 → 15.1.2-next.13
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 +172 -172
- package/dist/browser/delivery/index.js +72 -18
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-dyuok0rH.js → dist-BFhge1uy.js} +31048 -38552
- package/dist/browser/dist-BFhge1uy.js.map +1 -0
- package/dist/browser/{main-KQeC5IX0.js → main-B7xdPHnf.js} +180 -182
- package/dist/browser/{main-KQeC5IX0.js.map → main-B7xdPHnf.js.map} +1 -1
- package/dist/browser/print/index.js +5 -5
- package/dist/delivery/index.js +17 -13
- package/dist/delivery/main.d.ts +0 -2
- package/dist/delivery/main.js +57 -60
- package/dist/index.iife.js +100 -140
- package/dist/print/index.js +13 -13
- package/module/print.js +29822 -37331
- package/module/print.js.map +1 -1
- package/package.json +5 -5
- package/dist/browser/dist-dyuok0rH.js.map +0 -1
package/dist/delivery/main.js
CHANGED
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
import e from "./annotation/annotation-editor.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "prop-types";
|
|
4
|
-
import
|
|
5
|
-
import i from "
|
|
6
|
-
import a from "@mui/material/
|
|
7
|
-
import
|
|
8
|
-
import s from "@pie-lib/
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
|
+
import r from "debug";
|
|
5
|
+
import i from "@mui/material/Typography";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import o from "@pie-lib/editable-html-tip-tap";
|
|
8
|
+
import * as s from "@pie-lib/render-ui";
|
|
9
|
+
import { Collapsible as c, Feedback as l, PreviewPrompt as u, UiLayout as d, color as f } from "@pie-lib/render-ui";
|
|
10
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
12
11
|
//#region src/delivery/main.tsx
|
|
13
|
-
function
|
|
12
|
+
function h(e) {
|
|
14
13
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
15
14
|
}
|
|
16
|
-
function
|
|
17
|
-
return !e ||
|
|
15
|
+
function g(e, t) {
|
|
16
|
+
return !e || h(e) ? e : h(e.default) ? e.default : t && h(e[t]) ? e[t] : t && h(e[t]?.default) ? e[t].default : e;
|
|
18
17
|
}
|
|
19
|
-
var
|
|
20
|
-
backgroundColor:
|
|
21
|
-
color:
|
|
22
|
-
}),
|
|
18
|
+
var _ = g(d, "UiLayout") || g(C.UiLayout, "UiLayout"), v = g(u, "PreviewPrompt") || g(C.PreviewPrompt, "PreviewPrompt"), y = g(c, "Collapsible") || g(C.Collapsible, "Collapsible"), b = g(l, "Feedback") || g(C.Feedback, "Feedback"), x = s, S = x.default, C = S && typeof S == "object" ? S : x, w = r("@pie-ui:extended-text-entry"), T = a(_)({
|
|
19
|
+
backgroundColor: f.background(),
|
|
20
|
+
color: f.text()
|
|
21
|
+
}), E = a(i)(({ theme: e }) => ({
|
|
23
22
|
width: "100%",
|
|
24
|
-
color:
|
|
23
|
+
color: f.text(),
|
|
25
24
|
marginBottom: e.spacing(2),
|
|
26
25
|
fontSize: "inherit",
|
|
27
26
|
display: "block"
|
|
28
|
-
})),
|
|
27
|
+
})), D = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), O = a(o)(({ theme: e }) => ({
|
|
29
28
|
marginBottom: e.spacing(2),
|
|
30
29
|
borderRadius: "4px"
|
|
31
|
-
})),
|
|
30
|
+
})), k = a("h2")({
|
|
32
31
|
position: "absolute",
|
|
33
32
|
left: "-10000px",
|
|
34
33
|
top: "auto",
|
|
35
34
|
width: "1px",
|
|
36
35
|
height: "1px",
|
|
37
36
|
overflow: "hidden"
|
|
38
|
-
}),
|
|
37
|
+
}), A = class extends t.Component {
|
|
39
38
|
static propTypes = {
|
|
40
39
|
onValueChange: n.func.isRequired,
|
|
41
40
|
onAnnotationsChange: n.func.isRequired,
|
|
@@ -47,67 +46,65 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
|
|
|
47
46
|
comment: n.string
|
|
48
47
|
}).isRequired
|
|
49
48
|
};
|
|
50
|
-
changeSessionValue = r(this.props.onValueChange, 1500);
|
|
51
|
-
changeSessionComment = r(this.props.onCommentChange, 1500);
|
|
52
49
|
render() {
|
|
53
|
-
let { model: t, session: n, onAnnotationsChange: r } = this.props, { animationsDisabled:
|
|
54
|
-
|
|
55
|
-
let
|
|
50
|
+
let { model: t, session: n, onAnnotationsChange: r, onCommentChange: i, onValueChange: a } = this.props, { animationsDisabled: o, annotatorMode: s, customKeys: c, dimensions: l, disabled: u, disabledAnnotator: d, equationEditor: f, extraCSSRules: h, feedback: g, mathInput: _, playersToolbarPosition: x, predefinedAnnotations: S, prompt: C, spanishInput: A, specialInput: j, spellCheckEnabled: M, teacherInstructions: N } = t, { annotations: P, comment: F, value: I } = n, { width: L, height: R } = l || {}, z = "40vh", B = { position: x === "top" ? "top" : "bottom" };
|
|
51
|
+
w("[render] disabled? ", u);
|
|
52
|
+
let V = /* @__PURE__ */ p(v, {
|
|
56
53
|
defaultClassName: "teacher-instructions",
|
|
57
|
-
prompt:
|
|
58
|
-
}),
|
|
59
|
-
return
|
|
60
|
-
extraCSSRules:
|
|
54
|
+
prompt: N
|
|
55
|
+
}), H = [];
|
|
56
|
+
return A && H.push({ language: "spanish" }), j && H.push({ language: "special" }), /* @__PURE__ */ m(T, {
|
|
57
|
+
extraCSSRules: h,
|
|
61
58
|
ref: (e) => {
|
|
62
59
|
this.containerRef = e;
|
|
63
60
|
},
|
|
64
61
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
|
|
62
|
+
/* @__PURE__ */ p(k, { children: "Constructed Response Question" }),
|
|
63
|
+
N && /* @__PURE__ */ p(D, { children: o ? V : /* @__PURE__ */ p(y, {
|
|
67
64
|
labels: {
|
|
68
65
|
hidden: "Show Teacher Instructions",
|
|
69
66
|
visible: "Hide Teacher Instructions"
|
|
70
67
|
},
|
|
71
|
-
children:
|
|
68
|
+
children: V
|
|
72
69
|
}) }),
|
|
73
|
-
|
|
70
|
+
C && /* @__PURE__ */ p(E, {
|
|
74
71
|
component: "span",
|
|
75
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ p(v, {
|
|
76
73
|
defaultClassName: "prompt",
|
|
77
74
|
prompt: t.prompt
|
|
78
75
|
})
|
|
79
76
|
}),
|
|
80
|
-
|
|
81
|
-
text:
|
|
82
|
-
annotations:
|
|
83
|
-
comment:
|
|
84
|
-
predefinedAnnotations:
|
|
77
|
+
s ? /* @__PURE__ */ p(e, {
|
|
78
|
+
text: I || "",
|
|
79
|
+
annotations: P || [],
|
|
80
|
+
comment: F || "",
|
|
81
|
+
predefinedAnnotations: S || [],
|
|
85
82
|
onChange: r,
|
|
86
|
-
onCommentChange:
|
|
87
|
-
width:
|
|
88
|
-
height:
|
|
89
|
-
maxHeight:
|
|
90
|
-
disabled:
|
|
91
|
-
disabledMath: !
|
|
92
|
-
customKeys:
|
|
93
|
-
keypadMode:
|
|
94
|
-
}) : /* @__PURE__ */
|
|
83
|
+
onCommentChange: i,
|
|
84
|
+
width: L,
|
|
85
|
+
height: R,
|
|
86
|
+
maxHeight: z,
|
|
87
|
+
disabled: d,
|
|
88
|
+
disabledMath: !_,
|
|
89
|
+
customKeys: c,
|
|
90
|
+
keypadMode: f
|
|
91
|
+
}) : /* @__PURE__ */ p(O, {
|
|
95
92
|
className: "response-area-editor",
|
|
96
|
-
onChange:
|
|
97
|
-
markup:
|
|
98
|
-
maxWidth:
|
|
93
|
+
onChange: a,
|
|
94
|
+
markup: I || "",
|
|
95
|
+
maxWidth: L && L.toString(),
|
|
99
96
|
minWidth: "100px",
|
|
100
|
-
minHeight:
|
|
101
|
-
maxHeight:
|
|
102
|
-
disabled:
|
|
97
|
+
minHeight: R && R.toString(),
|
|
98
|
+
maxHeight: z,
|
|
99
|
+
disabled: u,
|
|
103
100
|
highlightShape: !0,
|
|
104
|
-
toolbarOpts:
|
|
105
|
-
spellCheck:
|
|
101
|
+
toolbarOpts: B,
|
|
102
|
+
spellCheck: M,
|
|
106
103
|
charactersLimit: 5e4,
|
|
107
104
|
autoWidthToolbar: !0,
|
|
108
105
|
pluginProps: {
|
|
109
106
|
math: {
|
|
110
|
-
disabled: !
|
|
107
|
+
disabled: !_,
|
|
111
108
|
customKeys: this.props.model.customKeys,
|
|
112
109
|
keypadMode: this.props.model.equationEditor,
|
|
113
110
|
controlledKeypadMode: !1
|
|
@@ -121,15 +118,15 @@ var v = _(f, "UiLayout") || _(w.UiLayout, "UiLayout"), y = _(d, "PreviewPrompt")
|
|
|
121
118
|
ul_list: { disabled: !0 },
|
|
122
119
|
ol_list: { disabled: !0 }
|
|
123
120
|
},
|
|
124
|
-
languageCharactersProps:
|
|
121
|
+
languageCharactersProps: H
|
|
125
122
|
}),
|
|
126
|
-
|
|
123
|
+
g && /* @__PURE__ */ p(b, {
|
|
127
124
|
correctness: "correct",
|
|
128
|
-
feedback:
|
|
125
|
+
feedback: g
|
|
129
126
|
})
|
|
130
127
|
]
|
|
131
128
|
});
|
|
132
129
|
}
|
|
133
130
|
};
|
|
134
131
|
//#endregion
|
|
135
|
-
export {
|
|
132
|
+
export { A as Main, A as default };
|