@pie-element/extended-text-entry 16.0.2-next.20261007003844 → 16.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/author/index.js +644 -644
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{dist-Dcix7OLC.js → dist-j1vyVp3g.js} +10160 -9237
- package/dist/browser/dist-j1vyVp3g.js.map +1 -0
- package/dist/browser/editor-runtime/author/index.js +644 -644
- package/dist/browser/editor-runtime/author/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/{dist-DOjPCQ8G.js → dist-DuFswITB.js} +7033 -6110
- package/dist/browser/editor-runtime/dist-DuFswITB.js.map +1 -0
- package/dist/browser/editor-runtime/{main-CbR0FsxW.js → main-BhK70YBL.js} +176 -176
- package/dist/browser/editor-runtime/main-BhK70YBL.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/{main-D5PwTUlN.js → main-BRPP6Mvf.js} +176 -176
- package/dist/browser/main-BRPP6Mvf.js.map +1 -0
- package/dist/browser/print/index.js +2 -2
- package/dist/delivery/annotation/annotation-editor.js +24 -23
- package/dist/index.iife.js +44 -42
- package/module/print.js +9572 -8649
- package/module/print.js.map +1 -1
- package/package.json +12 -11
- package/dist/browser/dist-Dcix7OLC.js.map +0 -1
- package/dist/browser/editor-runtime/dist-DOjPCQ8G.js.map +0 -1
- package/dist/browser/editor-runtime/main-CbR0FsxW.js.map +0 -1
- package/dist/browser/main-D5PwTUlN.js.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { i as e } from "./rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import
|
|
5
|
-
import { jsx as
|
|
2
|
+
import { A as t, O as n, Q as r, R as i, S as a, U as o, a as s, g as c, k as l, l as u, n as d, t as f, u as p, v as m, x as h, y as g } from "./dist-j1vyVp3g.js";
|
|
3
|
+
import { t as _ } from "./browser-CcvjX8VA.js";
|
|
4
|
+
import v from "react";
|
|
5
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
6
6
|
//#region src/delivery/annotation/annotation-utils.ts
|
|
7
|
-
var
|
|
7
|
+
var x = /* @__PURE__ */ e(r(), 1), S = /* @__PURE__ */ e(_(), 1), C = (e, t, n) => {
|
|
8
8
|
let r = n || [], i = r.reduce((e, t) => e + t.textContent.length, 0), a = !0;
|
|
9
9
|
if (i > t) return !1;
|
|
10
|
-
for (e &&= (e.nodeType === 3 && e.parentNode && !e.parentNode.hasAttribute("data-ann-id") && r.push(e), e.firstChild); e && a;) a =
|
|
10
|
+
for (e &&= (e.nodeType === 3 && e.parentNode && !e.parentNode.hasAttribute("data-ann-id") && r.push(e), e.firstChild); e && a;) a = C(e, t, r), e = e.nextSibling;
|
|
11
11
|
return r;
|
|
12
|
-
},
|
|
13
|
-
let r =
|
|
12
|
+
}, w = (e, t, n) => {
|
|
13
|
+
let r = C(n, t), i = [], a = 0;
|
|
14
14
|
return r.forEach((n) => {
|
|
15
15
|
let r = a + n.textContent.length;
|
|
16
16
|
[e, t].forEach((e) => {
|
|
@@ -20,7 +20,7 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
20
20
|
});
|
|
21
21
|
}), a = r;
|
|
22
22
|
}), i;
|
|
23
|
-
},
|
|
23
|
+
}, T = (e) => {
|
|
24
24
|
let { commonAncestorContainer: t, startContainer: n, endContainer: r, startOffset: i, endOffset: a } = e, o = [], s = !1, c = !1, l = "", u = (e) => {
|
|
25
25
|
let { nodeValue: t, childNodes: d } = e;
|
|
26
26
|
e === n && e === r ? (t && (l += t.substring(i, a)), s = c = !0) : e === n ? (t && (l += t.substring(i)), s = !0) : e === r ? (t && (l += t.substring(0, a)), c = !0) : e && e.nodeType === 3 && e.parentNode && !e.parentNode.hasAttribute("data-ann-id") && t && s && !c && (l += t, o.push(e)), d.forEach((e) => {
|
|
@@ -29,16 +29,16 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
31
|
return u(t), [o, l];
|
|
32
|
-
},
|
|
32
|
+
}, E = (e) => {
|
|
33
33
|
let t = document.createElement("SPAN");
|
|
34
34
|
return e.surroundContents(t), t;
|
|
35
|
-
},
|
|
36
|
-
if (e.startContainer === e.endContainer) return [
|
|
37
|
-
let [t] =
|
|
35
|
+
}, D = (e) => {
|
|
36
|
+
if (e.startContainer === e.endContainer) return [E(e)];
|
|
37
|
+
let [t] = T(e), n = document.createRange();
|
|
38
38
|
n.selectNodeContents(e.startContainer), n.setStart(e.startContainer, e.startOffset);
|
|
39
|
-
let r =
|
|
39
|
+
let r = E(n), i = document.createRange();
|
|
40
40
|
i.selectNode(e.endContainer), i.setEnd(e.endContainer, e.endOffset);
|
|
41
|
-
let a =
|
|
41
|
+
let a = E(i);
|
|
42
42
|
return [
|
|
43
43
|
r,
|
|
44
44
|
...t.map((e) => {
|
|
@@ -47,25 +47,25 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
47
47
|
}),
|
|
48
48
|
a
|
|
49
49
|
];
|
|
50
|
-
},
|
|
50
|
+
}, O = (e, t) => {
|
|
51
51
|
let n = document.createRange();
|
|
52
52
|
n.setStart(t, 0), n.setEnd(e.startContainer, e.startOffset);
|
|
53
|
-
let [, r] =
|
|
53
|
+
let [, r] = T(n), [, i] = T(e), a = r.length;
|
|
54
54
|
return {
|
|
55
55
|
quote: i,
|
|
56
56
|
start: a,
|
|
57
57
|
end: a + i.length
|
|
58
58
|
};
|
|
59
|
-
},
|
|
59
|
+
}, k = (e, t) => {
|
|
60
60
|
(e || []).forEach((e) => {
|
|
61
61
|
let t = e.parentNode, n = e.childNodes, r = n.length;
|
|
62
62
|
if (r > 0) for (let i = 0; i < r; i++) t.insertBefore(n[0], e);
|
|
63
63
|
else t.insertBefore(document.createTextNode(e.textContent), e);
|
|
64
64
|
t.removeChild(e);
|
|
65
65
|
}), t.normalize();
|
|
66
|
-
},
|
|
66
|
+
}, A = () => {
|
|
67
67
|
document.getSelection ? (document.getSelection().removeAllRanges(), document.getSelection().addRange(document.createRange())) : window.getSelection ? window.getSelection().removeAllRanges ? (window.getSelection().removeAllRanges(), window.getSelection().addRange(document.createRange())) : window.getSelection().empty && window.getSelection().empty() : document.selection && document.selection.empty();
|
|
68
|
-
},
|
|
68
|
+
}, j = (e) => e.length >= 20 || e.search(/\n|\r|\r\n/) !== -1, M = (e) => Array.from(document.querySelectorAll(`[data-id='${e}']`)), N = (e) => document.querySelector(`[data-ann-id='${e}']`), P = o(a)(({ annotationType: e }) => ({ "& .MuiPaper-root": {
|
|
69
69
|
overflowX: "unset",
|
|
70
70
|
overflowY: "unset",
|
|
71
71
|
marginLeft: "16px",
|
|
@@ -79,19 +79,19 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
79
79
|
width: 0,
|
|
80
80
|
pointerEvents: "none",
|
|
81
81
|
borderWidth: "7px",
|
|
82
|
-
borderRightColor:
|
|
82
|
+
borderRightColor: t.border()
|
|
83
83
|
},
|
|
84
84
|
...e === "negative" && { "&::before": { borderRightColor: "rgb(255, 204, 238) !important" } },
|
|
85
85
|
...e === "positive" && { "&::before": { borderRightColor: "rgb(153, 255, 153) !important" } }
|
|
86
|
-
} })),
|
|
86
|
+
} })), ee = o("div")(({ theme: e, annotationType: n }) => ({
|
|
87
87
|
width: "200px",
|
|
88
88
|
overflow: "hidden",
|
|
89
89
|
borderRadius: "4px",
|
|
90
|
-
backgroundColor:
|
|
91
|
-
color:
|
|
92
|
-
border: `4px solid ${
|
|
90
|
+
backgroundColor: t.v("pie")("background", t.defaults.WHITE),
|
|
91
|
+
color: t.v("pie")("text", e.palette.text.primary),
|
|
92
|
+
border: `4px solid ${t.border()}`,
|
|
93
93
|
"& .MuiInputBase-root": { color: "inherit" },
|
|
94
|
-
...(
|
|
94
|
+
...(n === "negative" || n === "positive") && {
|
|
95
95
|
position: "relative",
|
|
96
96
|
boxShadow: "0 0 0 1px #757575",
|
|
97
97
|
"&::after": {
|
|
@@ -102,52 +102,52 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
102
102
|
pointerEvents: "none"
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
|
-
...
|
|
106
|
-
...
|
|
107
|
-
})), F =
|
|
105
|
+
...n === "negative" && { borderColor: "rgb(255, 204, 238) !important" },
|
|
106
|
+
...n === "positive" && { borderColor: "rgb(153, 255, 153) !important" }
|
|
107
|
+
})), F = o("div")(() => ({
|
|
108
108
|
display: "flex",
|
|
109
109
|
flexWrap: "wrap",
|
|
110
|
-
borderTop: `2px solid ${
|
|
111
|
-
})), I =
|
|
110
|
+
borderTop: `2px solid ${t.border()}`
|
|
111
|
+
})), I = o("div")(({ theme: e, variant: n, annotationType: r }) => ({
|
|
112
112
|
flexGrow: 1,
|
|
113
113
|
width: "28%",
|
|
114
114
|
textAlign: "center",
|
|
115
115
|
padding: "4px",
|
|
116
116
|
cursor: "pointer",
|
|
117
|
-
"&:not(:nth-child(3n))": { borderRight: `1px solid ${
|
|
118
|
-
"&:hover": { backgroundColor:
|
|
119
|
-
...
|
|
117
|
+
"&:not(:nth-child(3n))": { borderRight: `1px solid ${t.border()}` },
|
|
118
|
+
"&:hover": { backgroundColor: t.backgroundDark() },
|
|
119
|
+
...n === "positive" && {
|
|
120
120
|
backgroundColor: "rgb(153, 255, 153) !important",
|
|
121
121
|
color: e.palette.text.primary,
|
|
122
122
|
"&:hover": { filter: "brightness(85%)" }
|
|
123
123
|
},
|
|
124
|
-
...
|
|
124
|
+
...n === "negative" && {
|
|
125
125
|
backgroundColor: "rgb(255, 204, 238) !important",
|
|
126
126
|
color: e.palette.text.primary,
|
|
127
127
|
"&:hover": { filter: "brightness(85%)" }
|
|
128
128
|
},
|
|
129
|
-
...
|
|
129
|
+
...n === "typeChange" && r === "negative" && { "&:hover": {
|
|
130
130
|
backgroundColor: "rgb(153, 255, 153) !important",
|
|
131
131
|
color: e.palette.text.primary
|
|
132
132
|
} },
|
|
133
|
-
...
|
|
133
|
+
...n === "typeChange" && r === "positive" && { "&:hover": {
|
|
134
134
|
backgroundColor: "rgb(255, 204, 238) !important",
|
|
135
135
|
color: e.palette.text.primary
|
|
136
136
|
} }
|
|
137
|
-
})),
|
|
137
|
+
})), te = class extends v.Component {
|
|
138
138
|
static propTypes = {
|
|
139
|
-
anchorEl:
|
|
140
|
-
open:
|
|
141
|
-
offset:
|
|
142
|
-
value:
|
|
143
|
-
type:
|
|
144
|
-
onClose:
|
|
145
|
-
onDelete:
|
|
146
|
-
onSave:
|
|
147
|
-
onTypeChange:
|
|
139
|
+
anchorEl: x.default.object,
|
|
140
|
+
open: x.default.bool,
|
|
141
|
+
offset: x.default.number,
|
|
142
|
+
value: x.default.string,
|
|
143
|
+
type: x.default.string,
|
|
144
|
+
onClose: x.default.func,
|
|
145
|
+
onDelete: x.default.func,
|
|
146
|
+
onSave: x.default.func,
|
|
147
|
+
onTypeChange: x.default.func
|
|
148
148
|
};
|
|
149
149
|
constructor(e) {
|
|
150
|
-
super(e), this.state = { value: e.value }, this.editorId =
|
|
150
|
+
super(e), this.state = { value: e.value }, this.editorId = h("annotation-editor");
|
|
151
151
|
}
|
|
152
152
|
UNSAFE_componentWillReceiveProps(e) {
|
|
153
153
|
let { value: t } = e, { value: n } = this.props;
|
|
@@ -164,7 +164,7 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
164
164
|
};
|
|
165
165
|
render() {
|
|
166
166
|
let { anchorEl: e, offset: t, onDelete: n, open: r, type: i } = this.props, { value: a } = this.state;
|
|
167
|
-
return /* @__PURE__ */
|
|
167
|
+
return /* @__PURE__ */ y(P, {
|
|
168
168
|
anchorEl: e,
|
|
169
169
|
elevation: 2,
|
|
170
170
|
open: r,
|
|
@@ -186,9 +186,9 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
186
186
|
vertical: "top",
|
|
187
187
|
horizontal: "left"
|
|
188
188
|
},
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ b(ee, {
|
|
190
190
|
annotationType: i,
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ y(s, {
|
|
192
192
|
id: this.editorId,
|
|
193
193
|
style: {
|
|
194
194
|
padding: "2px 5px",
|
|
@@ -201,18 +201,18 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
201
201
|
value: a,
|
|
202
202
|
onChange: this.onValueChange,
|
|
203
203
|
InputProps: { disableUnderline: !0 }
|
|
204
|
-
}), /* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ b(F, { children: [
|
|
205
|
+
/* @__PURE__ */ y(I, {
|
|
206
206
|
onClick: n,
|
|
207
207
|
children: "Delete"
|
|
208
208
|
}),
|
|
209
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ y(I, {
|
|
210
210
|
variant: "typeChange",
|
|
211
211
|
annotationType: i,
|
|
212
212
|
onClick: this.handleTypeChange,
|
|
213
213
|
children: i === "negative" ? "Green" : "Pink"
|
|
214
214
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ y(I, {
|
|
216
216
|
onClick: this.handleSave,
|
|
217
217
|
children: "Save"
|
|
218
218
|
})
|
|
@@ -220,7 +220,7 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
220
220
|
})
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
},
|
|
223
|
+
}, ne = o(a)({ "& .MuiPaper-root": {
|
|
224
224
|
overflowX: "unset",
|
|
225
225
|
overflowY: "unset",
|
|
226
226
|
marginTop: "-16px",
|
|
@@ -233,56 +233,56 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
233
233
|
width: 0,
|
|
234
234
|
pointerEvents: "none",
|
|
235
235
|
borderWidth: "7px",
|
|
236
|
-
borderTopColor:
|
|
236
|
+
borderTopColor: t.borderDark()
|
|
237
237
|
}
|
|
238
|
-
} }),
|
|
238
|
+
} }), re = o("div")(({ theme: e }) => ({
|
|
239
239
|
width: "300px",
|
|
240
240
|
overflow: "hidden",
|
|
241
241
|
borderRadius: "4px",
|
|
242
|
-
backgroundColor:
|
|
243
|
-
color:
|
|
244
|
-
border: `2px solid ${
|
|
245
|
-
})),
|
|
242
|
+
backgroundColor: t.v("pie")("background", t.defaults.WHITE),
|
|
243
|
+
color: t.v("pie")("text", e.palette.text.primary),
|
|
244
|
+
border: `2px solid ${t.borderDark()}`
|
|
245
|
+
})), ie = o("div")({
|
|
246
246
|
display: "flex",
|
|
247
247
|
flexWrap: "wrap"
|
|
248
|
-
}),
|
|
248
|
+
}), ae = o("div")(() => ({
|
|
249
249
|
display: "flex",
|
|
250
250
|
flexWrap: "wrap",
|
|
251
|
-
borderTop: `2px solid ${
|
|
252
|
-
})),
|
|
251
|
+
borderTop: `2px solid ${t.border()}`
|
|
252
|
+
})), L = o("div")(({ theme: e, variant: n }) => ({
|
|
253
253
|
width: "22%",
|
|
254
254
|
textAlign: "center",
|
|
255
255
|
padding: "4px",
|
|
256
256
|
cursor: "pointer",
|
|
257
|
-
borderBottom: `1px solid ${
|
|
258
|
-
"&:not(:nth-child(4n))": { borderRight: `1px solid ${
|
|
257
|
+
borderBottom: `1px solid ${t.border()}`,
|
|
258
|
+
"&:not(:nth-child(4n))": { borderRight: `1px solid ${t.border()}` },
|
|
259
259
|
"&:nth-child(4n)": { flexGrow: 1 },
|
|
260
|
-
"&:hover": { backgroundColor:
|
|
261
|
-
...
|
|
260
|
+
"&:hover": { backgroundColor: t.backgroundDark() },
|
|
261
|
+
...n === "positive" && {
|
|
262
262
|
backgroundColor: "rgb(153, 255, 153) !important",
|
|
263
263
|
color: e.palette.text.primary,
|
|
264
264
|
"&:hover": { filter: "brightness(85%)" }
|
|
265
265
|
},
|
|
266
|
-
...
|
|
266
|
+
...n === "negative" && {
|
|
267
267
|
backgroundColor: "rgb(255, 204, 238) !important",
|
|
268
268
|
color: e.palette.text.primary,
|
|
269
269
|
"&:hover": { filter: "brightness(85%)" }
|
|
270
270
|
}
|
|
271
|
-
})),
|
|
271
|
+
})), R = class extends v.Component {
|
|
272
272
|
static propTypes = {
|
|
273
|
-
anchorEl:
|
|
274
|
-
open:
|
|
275
|
-
annotations:
|
|
276
|
-
isNewAnnotation:
|
|
277
|
-
onClose:
|
|
278
|
-
onDelete:
|
|
279
|
-
onEdit:
|
|
280
|
-
onWrite:
|
|
281
|
-
onAnnotate:
|
|
273
|
+
anchorEl: x.default.object,
|
|
274
|
+
open: x.default.bool,
|
|
275
|
+
annotations: x.default.array,
|
|
276
|
+
isNewAnnotation: x.default.bool,
|
|
277
|
+
onClose: x.default.func,
|
|
278
|
+
onDelete: x.default.func,
|
|
279
|
+
onEdit: x.default.func,
|
|
280
|
+
onWrite: x.default.func,
|
|
281
|
+
onAnnotate: x.default.func
|
|
282
282
|
};
|
|
283
283
|
render() {
|
|
284
284
|
let { anchorEl: e, annotations: t, isNewAnnotation: n, onAnnotate: r, onClose: i, onEdit: a, onDelete: o, onWrite: s, open: c } = this.props;
|
|
285
|
-
return /* @__PURE__ */
|
|
285
|
+
return /* @__PURE__ */ y(ne, {
|
|
286
286
|
anchorEl: e,
|
|
287
287
|
open: c,
|
|
288
288
|
onClose: i,
|
|
@@ -299,35 +299,35 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
299
299
|
vertical: "bottom",
|
|
300
300
|
horizontal: "center"
|
|
301
301
|
},
|
|
302
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ b(re, { children: [/* @__PURE__ */ y(ie, { children: t.map((e, t) => /* @__PURE__ */ y(L, {
|
|
303
303
|
variant: e.type,
|
|
304
304
|
onClick: () => r(e),
|
|
305
305
|
children: e.label
|
|
306
|
-
}, `annotation-${t}`)) }), /* @__PURE__ */
|
|
307
|
-
/* @__PURE__ */
|
|
306
|
+
}, `annotation-${t}`)) }), /* @__PURE__ */ b(ae, { children: [
|
|
307
|
+
/* @__PURE__ */ y(L, {
|
|
308
308
|
onClick: i,
|
|
309
309
|
children: "Cancel"
|
|
310
310
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
n ? /* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ y(L, { style: { pointerEvents: "none" } }),
|
|
312
|
+
n ? /* @__PURE__ */ b(v.Fragment, { children: [/* @__PURE__ */ y(L, {
|
|
313
313
|
variant: "positive",
|
|
314
314
|
onClick: () => s("positive"),
|
|
315
315
|
children: "Write"
|
|
316
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ y(L, {
|
|
317
317
|
variant: "negative",
|
|
318
318
|
onClick: () => s("negative"),
|
|
319
319
|
children: "Write"
|
|
320
|
-
})] }) : /* @__PURE__ */
|
|
320
|
+
})] }) : /* @__PURE__ */ b(v.Fragment, { children: [/* @__PURE__ */ y(L, {
|
|
321
321
|
onClick: o,
|
|
322
322
|
children: "Delete"
|
|
323
|
-
}), /* @__PURE__ */
|
|
323
|
+
}), /* @__PURE__ */ y(L, {
|
|
324
324
|
onClick: a,
|
|
325
325
|
children: "Edit"
|
|
326
326
|
})] })
|
|
327
327
|
] })] })
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
}, { translator:
|
|
330
|
+
}, { translator: z } = g, B = o("div")({
|
|
331
331
|
padding: "10px 120px 10px 16px",
|
|
332
332
|
backgroundColor: "rgba(0, 0, 0, 0.06)",
|
|
333
333
|
border: "1px solid #ccc",
|
|
@@ -343,11 +343,11 @@ var b = /* @__PURE__ */ e(a(), 1), x = /* @__PURE__ */ e(g(), 1), S = (e, t, n)
|
|
|
343
343
|
"-moz-user-select": "none",
|
|
344
344
|
"-ms-user-select": "none"
|
|
345
345
|
}
|
|
346
|
-
}), V =
|
|
346
|
+
}), V = o("div")({ width: "230px" }), H = o("div")({
|
|
347
347
|
position: "relative",
|
|
348
348
|
overflowX: "hidden",
|
|
349
349
|
display: "flex"
|
|
350
|
-
}), U =
|
|
350
|
+
}), U = o(f)(({ theme: e }) => ({
|
|
351
351
|
paddingTop: e.spacing(2),
|
|
352
352
|
marginBottom: e.spacing(2),
|
|
353
353
|
marginTop: e.spacing(2),
|
|
@@ -357,22 +357,22 @@ if (!document.getElementById("annotation-editor-styles")) {
|
|
|
357
357
|
let e = document.createElement("style");
|
|
358
358
|
e.id = "annotation-editor-styles", e.textContent = W, document.head.appendChild(e);
|
|
359
359
|
}
|
|
360
|
-
var G = class extends
|
|
360
|
+
var G = class extends v.Component {
|
|
361
361
|
static propTypes = {
|
|
362
|
-
text:
|
|
363
|
-
comment:
|
|
364
|
-
annotations:
|
|
365
|
-
predefinedAnnotations:
|
|
366
|
-
onChange:
|
|
367
|
-
onCommentChange:
|
|
368
|
-
width:
|
|
369
|
-
height:
|
|
370
|
-
maxHeight:
|
|
371
|
-
disabled:
|
|
372
|
-
disabledMath:
|
|
373
|
-
customKeys:
|
|
374
|
-
keypadMode:
|
|
375
|
-
language:
|
|
362
|
+
text: x.default.string,
|
|
363
|
+
comment: x.default.string,
|
|
364
|
+
annotations: x.default.array,
|
|
365
|
+
predefinedAnnotations: x.default.array,
|
|
366
|
+
onChange: x.default.func.isRequired,
|
|
367
|
+
onCommentChange: x.default.func.isRequired,
|
|
368
|
+
width: x.default.number,
|
|
369
|
+
height: x.default.number,
|
|
370
|
+
maxHeight: x.default.string,
|
|
371
|
+
disabled: x.default.bool,
|
|
372
|
+
disabledMath: x.default.bool,
|
|
373
|
+
customKeys: x.default.array,
|
|
374
|
+
keypadMode: x.default.string,
|
|
375
|
+
language: x.default.string
|
|
376
376
|
};
|
|
377
377
|
constructor(e) {
|
|
378
378
|
super(e), this.state = {
|
|
@@ -389,11 +389,11 @@ var G = class extends _.Component {
|
|
|
389
389
|
componentDidMount() {
|
|
390
390
|
let { annotations: e, text: t } = this.props;
|
|
391
391
|
t && e.forEach((e) => {
|
|
392
|
-
let [t, n] =
|
|
392
|
+
let [t, n] = w(e.start, e.end, this.textRef);
|
|
393
393
|
if (t && n) {
|
|
394
394
|
let r = document.createRange();
|
|
395
395
|
r.setStart(t.node, t.offset), r.setEnd(n.node, n.offset);
|
|
396
|
-
let i =
|
|
396
|
+
let i = D(r);
|
|
397
397
|
this.createDOMAnnotation(i, e);
|
|
398
398
|
}
|
|
399
399
|
}), this.textRef && (this.adjustAnnotationsPosition(), this.textRef.addEventListener("scroll", this.adjustAnnotationsPosition));
|
|
@@ -402,7 +402,7 @@ var G = class extends _.Component {
|
|
|
402
402
|
if (this.textRef && this.labelsRef) {
|
|
403
403
|
let e = this.textRef.offsetLeft + this.textRef.offsetWidth + 8;
|
|
404
404
|
Array.from(this.labelsRef.children).forEach((t) => {
|
|
405
|
-
let n =
|
|
405
|
+
let n = M(t.dataset.annId), r = (n[0].offsetTop ? n[0].offsetTop : n[0].offsetParent.offsetTop) - this.textRef.scrollTop - 6;
|
|
406
406
|
t.style.top = `${r}px`, t.style.left = `${e}px`;
|
|
407
407
|
});
|
|
408
408
|
}
|
|
@@ -410,7 +410,7 @@ var G = class extends _.Component {
|
|
|
410
410
|
handleClick = (e) => {
|
|
411
411
|
let { annotations: t } = this.props, { selectionDetails: n } = this.state;
|
|
412
412
|
if (n) return;
|
|
413
|
-
let { id: r, annId: i } = e.target.dataset, a = r || i, o =
|
|
413
|
+
let { id: r, annId: i } = e.target.dataset, a = r || i, o = M(a), s = N(a), c = t.findIndex((e) => e.id === a), l = s.hasAttribute("data-freeform");
|
|
414
414
|
l && (s.style.zIndex = "10"), this.setState({
|
|
415
415
|
anchorEl: o[0],
|
|
416
416
|
openedMenu: !!r || !!i && !l,
|
|
@@ -423,20 +423,20 @@ var G = class extends _.Component {
|
|
|
423
423
|
});
|
|
424
424
|
};
|
|
425
425
|
handleHover = (e) => {
|
|
426
|
-
let { id: t, annId: n } = e.target.dataset, r = t || n, i =
|
|
426
|
+
let { id: t, annId: n } = e.target.dataset, r = t || n, i = M(r), a = N(r), o = a.hasAttribute("data-freeform");
|
|
427
427
|
i.forEach((e) => {
|
|
428
428
|
e.style.zIndex = "20", e.classList.contains("positive") ? e.style.backgroundColor = "rgb(51, 255, 51, 0.7)" : e.classList.contains("negative") && (e.style.backgroundColor = "rgba(255, 102, 204, 0.55)");
|
|
429
429
|
}), o ? (a.style.zIndex = "20", a.classList.contains("positive") ? (a.style.backgroundColor = "rgb(128, 255, 128)", a.style.setProperty("--before-border-color", "rgb(153, 255, 153)")) : a.classList.contains("negative") && (a.style.backgroundColor = "rgb(255, 179, 230)", a.style.setProperty("--before-border-color", "rgb(255, 179, 230)"))) : (a.style.zIndex = "20", a.classList.contains("positive") ? a.style.color = "rgb(0, 77, 0)" : a.classList.contains("negative") && (a.style.color = "rgb(153, 0, 102)"));
|
|
430
430
|
};
|
|
431
431
|
handleCancelHover = (e) => {
|
|
432
|
-
let { id: t, annId: n } = e.target.dataset, r = t || n, i =
|
|
432
|
+
let { id: t, annId: n } = e.target.dataset, r = t || n, i = M(r), a = N(r), o = a.hasAttribute("data-freeform");
|
|
433
433
|
i.forEach((e) => {
|
|
434
434
|
e.style.zIndex = "", e.classList.contains("positive") ? e.style.backgroundColor = "rgb(51, 255, 51, 0.5)" : e.classList.contains("negative") && (e.style.backgroundColor = "rgba(255, 102, 204, 0.4)");
|
|
435
435
|
}), o ? (a.style.zIndex = "", a.classList.contains("positive") ? (a.style.backgroundColor = "rgb(153, 255, 153)", a.style.removeProperty("--before-border-color")) : a.classList.contains("negative") && (a.style.backgroundColor = "rgb(255, 204, 238)", a.style.removeProperty("--before-border-color"))) : (a.style.zIndex = "", a.classList.contains("positive") ? a.style.color = "rgb(0, 128, 0)" : a.classList.contains("negative") && (a.style.color = "rgb(204, 0, 136)"));
|
|
436
436
|
};
|
|
437
437
|
handleClose = (e) => {
|
|
438
438
|
let { selectedElems: t, labelElem: n } = this.state;
|
|
439
|
-
t.length && !t[0].hasAttribute("data-id") &&
|
|
439
|
+
t.length && !t[0].hasAttribute("data-id") && k(t, this.textRef), n && (n.style.zIndex = ""), this.setState({
|
|
440
440
|
anchorEl: null,
|
|
441
441
|
openedMenu: !1,
|
|
442
442
|
openedEditor: !1,
|
|
@@ -445,18 +445,18 @@ var G = class extends _.Component {
|
|
|
445
445
|
selectionDetails: null,
|
|
446
446
|
annotationIndex: null,
|
|
447
447
|
annotation: null
|
|
448
|
-
}),
|
|
448
|
+
}), A();
|
|
449
449
|
};
|
|
450
450
|
handleSelection = (e) => {
|
|
451
451
|
let t = window.getSelection();
|
|
452
452
|
if (e.detail > 2) {
|
|
453
|
-
|
|
453
|
+
A();
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
456
|
if (t && t.rangeCount > 0) {
|
|
457
457
|
let e = t.getRangeAt(0), n = e.toString(), r = this.textRef.contains(e.commonAncestorContainer);
|
|
458
458
|
if (!t.isCollapsed && n !== "" && r) {
|
|
459
|
-
let t =
|
|
459
|
+
let t = O(e, this.textRef), n = D(e);
|
|
460
460
|
this.setState({
|
|
461
461
|
anchorEl: n[0],
|
|
462
462
|
openedMenu: !0,
|
|
@@ -468,7 +468,7 @@ var G = class extends _.Component {
|
|
|
468
468
|
};
|
|
469
469
|
deleteAnnotation = () => {
|
|
470
470
|
let { annotations: e, onChange: t } = this.props, { selectedElems: n, labelElem: r, annotationIndex: i, annotation: a } = this.state;
|
|
471
|
-
(
|
|
471
|
+
(j(a.label) ? this.labelsRef : n[0]).removeChild(r), k(n, this.textRef), e.splice(i, 1), t(e), this.handleClose();
|
|
472
472
|
};
|
|
473
473
|
createDOMAnnotation = (e, t) => {
|
|
474
474
|
let { disabled: n } = this.props, { id: r, label: i, type: a } = t;
|
|
@@ -476,7 +476,7 @@ var G = class extends _.Component {
|
|
|
476
476
|
e.dataset.id = r, e.className = `annotation ${a}`, e.style.position = "relative", e.style.cursor = "pointer", a === "positive" ? e.style.backgroundColor = "rgb(51, 255, 51, 0.5)" : a === "negative" && (e.style.backgroundColor = "rgba(255, 102, 204, 0.4)"), e.onclick = !n && this.handleClick, e.onmouseover = this.handleHover, e.onmouseout = this.handleCancelHover;
|
|
477
477
|
});
|
|
478
478
|
let o = e && e[0] || {}, s = document.createElement("SPAN");
|
|
479
|
-
if (s.dataset.annId = r, s.innerHTML = i, s.onclick = !n && this.handleClick, s.onmouseover = this.handleHover, s.onmouseout = this.handleCancelHover,
|
|
479
|
+
if (s.dataset.annId = r, s.innerHTML = l(i), s.onclick = !n && this.handleClick, s.onmouseover = this.handleHover, s.onmouseout = this.handleCancelHover, j(i)) {
|
|
480
480
|
let e = (o.offsetTop ? o.offsetTop : o.offsetParent.offsetTop) - this.textRef.scrollTop, t = this.textRef.offsetLeft + this.textRef.offsetWidth + 8;
|
|
481
481
|
s.dataset.freeform = !0, s.className = `sideAnnotation ${a}`, s.style.position = "absolute", s.style.padding = "4px", s.style.borderRadius = "4px", s.style.marginLeft = "8px", s.style.width = "180px", s.style.whiteSpace = "pre-wrap", s.style.wordBreak = "break-word", s.style.border = "2px solid #ffffff", s.style.fontSize = "14px", s.style.fontStyle = "normal", s.style.fontWeight = "normal", s.style.top = `${e}px`, s.style.left = `${t}px`, a === "negative" ? s.style.backgroundColor = "rgb(255, 204, 238)" : a === "positive" && (s.style.backgroundColor = "rgb(153, 255, 153)"), s.style.setProperty("--before-border-width", "7px"), s.style.setProperty("--before-top", "5px"), s.style.setProperty("--before-right", "100%"), a === "negative" ? s.style.setProperty("--before-border-color", "rgb(255, 204, 238)") : a === "positive" && s.style.setProperty("--before-border-color", "rgb(153, 255, 153)"), this.labelsRef.appendChild(s);
|
|
482
482
|
} else s.className = `annotationLabel ${a}`, s.style.backgroundColor = "rgb(242, 242, 242)", s.style.padding = "2px", s.style.position = "absolute", s.style.userSelect = "none", s.style.whiteSpace = "nowrap", s.style.top = "-10px", s.style.left = "-2px", s.style.fontSize = "12px", s.style.fontStyle = "normal", s.style.fontWeight = "normal", s.style.lineHeight = "6px", s.style.webkitUserSelect = "none", s.style.mozUserSelect = "none", s.style.msUserSelect = "none", a === "positive" ? s.style.color = "rgb(0, 128, 0)" : a === "negative" && (s.style.color = "rgb(204, 0, 136)"), o.appendChild(s);
|
|
@@ -516,7 +516,7 @@ var G = class extends _.Component {
|
|
|
516
516
|
});
|
|
517
517
|
};
|
|
518
518
|
addAnnotation = (e) => {
|
|
519
|
-
let { annotations: t, onChange: n } = this.props, r = this.createNewAnnotation("", e), i =
|
|
519
|
+
let { annotations: t, onChange: n } = this.props, r = this.createNewAnnotation("", e), i = N(r.id);
|
|
520
520
|
t.push(r), this.setState({
|
|
521
521
|
openedMenu: !1,
|
|
522
522
|
openedEditor: !0,
|
|
@@ -527,9 +527,9 @@ var G = class extends _.Component {
|
|
|
527
527
|
};
|
|
528
528
|
updateLabel = (e, t, n) => {
|
|
529
529
|
let { selectedElems: r, labelElem: i } = this.state, { label: a, type: o } = t;
|
|
530
|
-
|
|
530
|
+
j(a) && j(e) || !j(a) && !j(e) ? (i.innerHTML = l(a), n && (i.classList.remove(n), i.classList.add(o), r.forEach((e) => {
|
|
531
531
|
e.classList.remove(n), e.classList.add(o);
|
|
532
|
-
}))) :
|
|
532
|
+
}))) : j(a) && !j(e) ? (r[0].removeChild(i), this.createDOMAnnotation(r, t)) : !j(a) && j(e) && (this.labelsRef.removeChild(i), this.createDOMAnnotation(r, t));
|
|
533
533
|
};
|
|
534
534
|
changeAnnotationType = (e) => {
|
|
535
535
|
let { annotations: t, onChange: n } = this.props, { annotationIndex: r, selectedElems: i } = this.state, { type: a, label: o } = t[r], s = a === "positive" ? "negative" : "positive", c = {
|
|
@@ -552,28 +552,28 @@ var G = class extends _.Component {
|
|
|
552
552
|
this.textRef.removeEventListener("scroll", this.adjustAnnotationsPosition);
|
|
553
553
|
}
|
|
554
554
|
render() {
|
|
555
|
-
let { comment: e, customKeys: t, disabled: n, disabledMath: r, keypadMode: i, height: a, language: o, width: s, maxHeight: c, onCommentChange:
|
|
556
|
-
return /* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
555
|
+
let { comment: e, customKeys: t, disabled: n, disabledMath: r, keypadMode: i, height: a, language: o, width: s, maxHeight: c, onCommentChange: u, predefinedAnnotations: f, text: p } = this.props, { anchorEl: m, annotation: h, openedMenu: g, openedEditor: _, selectionDetails: v } = this.state, x = m && (m.offsetTop ? m.offsetTop : m.offsetParent.offsetTop), S = this.textRef && x ? x - this.textRef.scrollTop - 8 : 0, C = z.t("extendedTextEntry.comment", { lng: o });
|
|
556
|
+
return /* @__PURE__ */ b("div", { children: [
|
|
557
|
+
/* @__PURE__ */ b(H, { children: [/* @__PURE__ */ y(B, {
|
|
558
558
|
style: {
|
|
559
559
|
width: s - 34,
|
|
560
560
|
minHeight: a,
|
|
561
561
|
maxHeight: c
|
|
562
562
|
},
|
|
563
563
|
ref: (e) => this.textRef = e,
|
|
564
|
-
onMouseDown: n ? () => {} :
|
|
564
|
+
onMouseDown: n ? () => {} : A,
|
|
565
565
|
onMouseUp: n ? () => {} : this.handleSelection,
|
|
566
|
-
dangerouslySetInnerHTML: { __html:
|
|
567
|
-
}), /* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
label:
|
|
570
|
-
children: /* @__PURE__ */
|
|
566
|
+
dangerouslySetInnerHTML: { __html: l(p) }
|
|
567
|
+
}), /* @__PURE__ */ y(V, { ref: (e) => this.labelsRef = e })] }),
|
|
568
|
+
/* @__PURE__ */ y(U, {
|
|
569
|
+
label: C,
|
|
570
|
+
children: /* @__PURE__ */ y(d, {
|
|
571
571
|
className: "prompt",
|
|
572
572
|
markup: e || "",
|
|
573
|
-
onChange:
|
|
573
|
+
onChange: u,
|
|
574
574
|
width: s && (s + 104).toString(),
|
|
575
575
|
disabled: n,
|
|
576
|
-
ariaLabel:
|
|
576
|
+
ariaLabel: C,
|
|
577
577
|
language: o,
|
|
578
578
|
pluginProps: {
|
|
579
579
|
math: {
|
|
@@ -589,23 +589,23 @@ var G = class extends _.Component {
|
|
|
589
589
|
}
|
|
590
590
|
})
|
|
591
591
|
}),
|
|
592
|
-
/* @__PURE__ */
|
|
593
|
-
anchorEl:
|
|
594
|
-
open:
|
|
595
|
-
annotations:
|
|
596
|
-
isNewAnnotation: !!
|
|
592
|
+
/* @__PURE__ */ y(R, {
|
|
593
|
+
anchorEl: m,
|
|
594
|
+
open: g && !n,
|
|
595
|
+
annotations: f,
|
|
596
|
+
isNewAnnotation: !!v,
|
|
597
597
|
onClose: this.handleClose,
|
|
598
598
|
onDelete: this.deleteAnnotation,
|
|
599
599
|
onEdit: this.editAnnotation,
|
|
600
600
|
onWrite: this.addAnnotation,
|
|
601
601
|
onAnnotate: this.handleMenuClick
|
|
602
602
|
}),
|
|
603
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ y(te, {
|
|
604
604
|
anchorEl: this.textRef,
|
|
605
|
-
open:
|
|
606
|
-
offset:
|
|
607
|
-
value:
|
|
608
|
-
type:
|
|
605
|
+
open: _ && !n,
|
|
606
|
+
offset: S,
|
|
607
|
+
value: h && h.label || "",
|
|
608
|
+
type: h && h.type,
|
|
609
609
|
onClose: this.handleClose,
|
|
610
610
|
onDelete: this.deleteAnnotation,
|
|
611
611
|
onSave: this.updateAnnotation,
|
|
@@ -622,68 +622,68 @@ function K(e) {
|
|
|
622
622
|
function q(e, t) {
|
|
623
623
|
return !e || K(e) ? e : K(e.default) ? e.default : t && K(e[t]) ? e[t] : t && K(e[t]?.default) ? e[t].default : e;
|
|
624
624
|
}
|
|
625
|
-
var
|
|
626
|
-
backgroundColor:
|
|
627
|
-
color:
|
|
628
|
-
}),
|
|
625
|
+
var oe = q(c, "UiLayout") || q(Z.UiLayout, "UiLayout"), J = q(p, "PreviewPrompt") || q(Z.PreviewPrompt, "PreviewPrompt"), se = q(m, "Collapsible") || q(Z.Collapsible, "Collapsible"), ce = q(n, "Feedback") || q(Z.Feedback, "Feedback"), Y = u, X = Y.default, Z = X && typeof X == "object" ? X : Y, { translator: Q } = g, le = (0, S.default)("@pie-ui:extended-text-entry"), $ = o(oe)({
|
|
626
|
+
backgroundColor: t.background(),
|
|
627
|
+
color: t.text()
|
|
628
|
+
}), ue = o(i)(({ theme: e }) => ({
|
|
629
629
|
width: "100%",
|
|
630
|
-
color:
|
|
630
|
+
color: t.text(),
|
|
631
631
|
marginBottom: e.spacing(2),
|
|
632
632
|
fontSize: "inherit",
|
|
633
633
|
display: "block"
|
|
634
|
-
})),
|
|
634
|
+
})), de = o("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), fe = o(d)(({ theme: e }) => ({
|
|
635
635
|
marginBottom: e.spacing(2),
|
|
636
636
|
borderRadius: "4px"
|
|
637
|
-
})),
|
|
637
|
+
})), pe = o("h2")({
|
|
638
638
|
position: "absolute",
|
|
639
639
|
left: "-10000px",
|
|
640
640
|
top: "auto",
|
|
641
641
|
width: "1px",
|
|
642
642
|
height: "1px",
|
|
643
643
|
overflow: "hidden"
|
|
644
|
-
}),
|
|
644
|
+
}), me = class extends v.Component {
|
|
645
645
|
static propTypes = {
|
|
646
|
-
onValueChange:
|
|
647
|
-
onAnnotationsChange:
|
|
648
|
-
onCommentChange:
|
|
649
|
-
model:
|
|
650
|
-
session:
|
|
651
|
-
value:
|
|
652
|
-
annotations:
|
|
653
|
-
comment:
|
|
646
|
+
onValueChange: x.default.func.isRequired,
|
|
647
|
+
onAnnotationsChange: x.default.func.isRequired,
|
|
648
|
+
onCommentChange: x.default.func.isRequired,
|
|
649
|
+
model: x.default.object,
|
|
650
|
+
session: x.default.shape({
|
|
651
|
+
value: x.default.string,
|
|
652
|
+
annotations: x.default.array,
|
|
653
|
+
comment: x.default.string
|
|
654
654
|
}).isRequired
|
|
655
655
|
};
|
|
656
656
|
promptId = `ete-prompt-${Math.random().toString(36).slice(2, 10)}`;
|
|
657
657
|
render() {
|
|
658
|
-
let { model: e, session: t, onAnnotationsChange: n, onCommentChange: r, onValueChange: i } = this.props, { animationsDisabled: a, annotatorMode: o, customKeys: s, dimensions: c, disabled: l, disabledAnnotator: u, equationEditor: d, extraCSSRules: f, feedback: p, mathInput: m, pasteFormattingDisabled: h, playersToolbarPosition: g, predefinedAnnotations: _, prompt:
|
|
659
|
-
|
|
660
|
-
let M = /* @__PURE__ */
|
|
658
|
+
let { model: e, session: t, onAnnotationsChange: n, onCommentChange: r, onValueChange: i } = this.props, { animationsDisabled: a, annotatorMode: o, customKeys: s, dimensions: c, disabled: l, disabledAnnotator: u, equationEditor: d, extraCSSRules: f, feedback: p, mathInput: m, pasteFormattingDisabled: h, playersToolbarPosition: g, predefinedAnnotations: _, prompt: v, spanishInput: x, specialInput: S, spellCheckEnabled: C, teacherInstructions: w } = e, { annotations: T, comment: E, value: D } = t, { width: O, height: k } = c || {}, A = "40vh", j = { position: g === "top" ? "top" : "bottom" };
|
|
659
|
+
le("[render] disabled? ", l);
|
|
660
|
+
let M = /* @__PURE__ */ y(J, {
|
|
661
661
|
defaultClassName: "teacher-instructions",
|
|
662
662
|
prompt: w
|
|
663
663
|
}), N = [];
|
|
664
|
-
return x && N.push({ language: "spanish" }), S && N.push({ language: "special" }), /* @__PURE__ */
|
|
664
|
+
return x && N.push({ language: "spanish" }), S && N.push({ language: "special" }), /* @__PURE__ */ b($, {
|
|
665
665
|
extraCSSRules: f,
|
|
666
666
|
ref: (e) => {
|
|
667
667
|
this.containerRef = e;
|
|
668
668
|
},
|
|
669
669
|
children: [
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
w && /* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ y(pe, { children: Q.t("extendedTextEntry.constructedResponseQuestion", { lng: e.language }) }),
|
|
671
|
+
w && /* @__PURE__ */ y(de, { children: a ? M : /* @__PURE__ */ y(se, {
|
|
672
672
|
labels: {
|
|
673
|
-
hidden:
|
|
674
|
-
visible:
|
|
673
|
+
hidden: Q.t("common:showTeacherInstructions", { lng: e.language }),
|
|
674
|
+
visible: Q.t("common:hideTeacherInstructions", { lng: e.language })
|
|
675
675
|
},
|
|
676
676
|
children: M
|
|
677
677
|
}) }),
|
|
678
|
-
|
|
678
|
+
v && /* @__PURE__ */ y(ue, {
|
|
679
679
|
component: "span",
|
|
680
680
|
id: this.promptId,
|
|
681
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ y(J, {
|
|
682
682
|
defaultClassName: "prompt",
|
|
683
683
|
prompt: e.prompt
|
|
684
684
|
})
|
|
685
685
|
}),
|
|
686
|
-
o ? /* @__PURE__ */
|
|
686
|
+
o ? /* @__PURE__ */ y(G, {
|
|
687
687
|
text: D || "",
|
|
688
688
|
annotations: T || [],
|
|
689
689
|
comment: E || "",
|
|
@@ -698,7 +698,7 @@ var J = q(s, "UiLayout") || q(Q.UiLayout, "UiLayout"), Y = q(f, "PreviewPrompt")
|
|
|
698
698
|
customKeys: s,
|
|
699
699
|
keypadMode: d,
|
|
700
700
|
language: e.language
|
|
701
|
-
}) : /* @__PURE__ */
|
|
701
|
+
}) : /* @__PURE__ */ y(fe, {
|
|
702
702
|
className: "response-area-editor",
|
|
703
703
|
onChange: i,
|
|
704
704
|
markup: D || "",
|
|
@@ -730,11 +730,11 @@ var J = q(s, "UiLayout") || q(Q.UiLayout, "UiLayout"), Y = q(f, "PreviewPrompt")
|
|
|
730
730
|
pasteFormatting: { disabled: h === !0 }
|
|
731
731
|
},
|
|
732
732
|
languageCharactersProps: N,
|
|
733
|
-
ariaLabelledBy:
|
|
734
|
-
ariaLabel:
|
|
733
|
+
ariaLabelledBy: v ? this.promptId : void 0,
|
|
734
|
+
ariaLabel: Q.t("extendedTextEntry.response", { lng: e.language }),
|
|
735
735
|
language: e.language
|
|
736
736
|
}),
|
|
737
|
-
p && /* @__PURE__ */
|
|
737
|
+
p && /* @__PURE__ */ y(ce, {
|
|
738
738
|
correctness: "correct",
|
|
739
739
|
feedback: p
|
|
740
740
|
})
|
|
@@ -743,6 +743,6 @@ var J = q(s, "UiLayout") || q(Q.UiLayout, "UiLayout"), Y = q(f, "PreviewPrompt")
|
|
|
743
743
|
}
|
|
744
744
|
};
|
|
745
745
|
//#endregion
|
|
746
|
-
export {
|
|
746
|
+
export { me as t };
|
|
747
747
|
|
|
748
|
-
//# sourceMappingURL=main-
|
|
748
|
+
//# sourceMappingURL=main-BRPP6Mvf.js.map
|