@pie-element/select-text 13.1.2-next.0 → 13.1.2-next.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/author/design.d.ts +2 -2
- package/dist/author/design.js +77 -78
- package/dist/browser/{Check-CXevxzJJ.js → Check-BMR_1cO0.js} +2687 -3367
- package/dist/browser/Check-BMR_1cO0.js.map +1 -0
- package/dist/browser/author/index.js +8520 -8957
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +11 -12
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{_getTag-x1UozeM0.js → dist-SG92p6xV.js} +98 -160
- package/dist/browser/dist-SG92p6xV.js.map +1 -0
- package/dist/browser/{main-4aycOoI5.js → main-jVjbBKTM.js} +884 -884
- package/dist/browser/main-jVjbBKTM.js.map +1 -0
- package/dist/browser/print/index.js +7 -8
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/index.js +19 -19
- package/dist/index.iife.js +26 -26
- package/dist/print/index.js +11 -11
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +12 -9
- package/dist/browser/Check-CXevxzJJ.js.map +0 -1
- package/dist/browser/_getTag-x1UozeM0.js.map +0 -1
- package/dist/browser/debounce-CUpLfqAu.js +0 -86
- package/dist/browser/debounce-CUpLfqAu.js.map +0 -1
- package/dist/browser/isEmpty-Bsms1e2W.js +0 -16
- package/dist/browser/isEmpty-Bsms1e2W.js.map +0 -1
- package/dist/browser/main-4aycOoI5.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +0 -50
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
package/dist/author/design.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export declare class Design extends React.Component {
|
|
|
23
23
|
static defaultProps: {};
|
|
24
24
|
constructor(props: any);
|
|
25
25
|
UNSAFE_componentWillReceiveProps(nProps: any): void;
|
|
26
|
-
updateText: any
|
|
27
|
-
changeText: (event: any) =>
|
|
26
|
+
updateText: import("@pie-element/shared-lodash").CancelableFunction<(val: any) => void>;
|
|
27
|
+
changeText: (event: any) => void | undefined;
|
|
28
28
|
changeTokens: any;
|
|
29
29
|
changeMaxSelections: any;
|
|
30
30
|
apply: any;
|
package/dist/author/design.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import l from "debug";
|
|
1
|
+
import { generateValidationMessage as e } from "./utils.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { Tokenizer as r } from "@pie-lib/text-select";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { styled as o } from "@mui/material/styles";
|
|
7
|
+
import s from "debug";
|
|
8
|
+
import { cloneDeep as c, debounce as l } from "@pie-element/shared-lodash";
|
|
10
9
|
import u from "@mui/material/TextField";
|
|
11
10
|
import { FeedbackConfig as ee, InputContainer as d, NumberTextField as f, layout as p, settings as m } from "@pie-lib/config-ui";
|
|
12
11
|
import h from "@mui/material/Chip";
|
|
@@ -14,15 +13,15 @@ import te from "@mui/icons-material/Info";
|
|
|
14
13
|
import g from "@pie-lib/editable-html-tip-tap";
|
|
15
14
|
import _ from "@mui/material/Tooltip";
|
|
16
15
|
//#region src/author/design.tsx
|
|
17
|
-
var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b =
|
|
16
|
+
var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = o(d)(({ theme: e }) => ({
|
|
18
17
|
width: "100%",
|
|
19
18
|
paddingTop: e.spacing(2),
|
|
20
19
|
marginBottom: e.spacing(2)
|
|
21
|
-
})), x =
|
|
20
|
+
})), x = o(g)({ width: "100%" }), S = o("div")(({ theme: e }) => ({
|
|
22
21
|
fontSize: e.typography.fontSize - 2,
|
|
23
22
|
color: e.palette.error.main,
|
|
24
23
|
paddingTop: e.spacing(1)
|
|
25
|
-
})), ie =
|
|
24
|
+
})), ie = o(u)({ width: "100%" }), ae = o(d)(({ theme: e }) => ({
|
|
26
25
|
paddingRight: 0,
|
|
27
26
|
marginRight: 0,
|
|
28
27
|
position: "relative",
|
|
@@ -36,32 +35,32 @@ var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }
|
|
|
36
35
|
backgroundColor: e.palette.primary.main
|
|
37
36
|
},
|
|
38
37
|
marginBottom: e.spacing(1)
|
|
39
|
-
})), C =
|
|
38
|
+
})), C = o(_)(({ theme: e }) => ({ "& .MuiTooltip-tooltip": {
|
|
40
39
|
fontSize: e.typography.fontSize - 2,
|
|
41
40
|
whiteSpace: "pre",
|
|
42
41
|
maxWidth: "500px"
|
|
43
|
-
} })), oe =
|
|
42
|
+
} })), oe = o(r)(({ theme: e }) => ({ marginTop: e.spacing(2) })), w = o(h)(({ theme: e }) => ({
|
|
44
43
|
marginTop: e.spacing(.5),
|
|
45
44
|
marginRight: e.spacing(2)
|
|
46
|
-
})), se =
|
|
45
|
+
})), se = o("div")(({ theme: e }) => ({
|
|
47
46
|
display: "flex",
|
|
48
47
|
alignItems: "center",
|
|
49
48
|
flexWrap: "wrap",
|
|
50
49
|
marginBottom: e.spacing(2.5)
|
|
51
|
-
})), ce =
|
|
50
|
+
})), ce = o(f)(({ theme: e }) => ({
|
|
52
51
|
width: "180px",
|
|
53
52
|
margin: `${e.spacing(.5)} auto 0`
|
|
54
|
-
})), le =
|
|
53
|
+
})), le = s("@pie-element:select-text:configure"), T = class extends t.Component {
|
|
55
54
|
static propTypes = {
|
|
56
|
-
model:
|
|
57
|
-
configuration:
|
|
58
|
-
onModelChanged:
|
|
59
|
-
onConfigurationChanged:
|
|
60
|
-
imageSupport:
|
|
61
|
-
add:
|
|
62
|
-
delete:
|
|
55
|
+
model: n.object.isRequired,
|
|
56
|
+
configuration: n.object.isRequired,
|
|
57
|
+
onModelChanged: n.func.isRequired,
|
|
58
|
+
onConfigurationChanged: n.func.isRequired,
|
|
59
|
+
imageSupport: n.shape({
|
|
60
|
+
add: n.func.isRequired,
|
|
61
|
+
delete: n.func.isRequired
|
|
63
62
|
}),
|
|
64
|
-
uploadSoundSupport:
|
|
63
|
+
uploadSoundSupport: n.object
|
|
65
64
|
};
|
|
66
65
|
static defaultProps = {};
|
|
67
66
|
constructor(e) {
|
|
@@ -73,7 +72,7 @@ var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }
|
|
|
73
72
|
let { model: t } = e;
|
|
74
73
|
t && t.text && this.setState({ text: t.text });
|
|
75
74
|
}
|
|
76
|
-
updateText =
|
|
75
|
+
updateText = l((e) => {
|
|
77
76
|
this.apply((t) => {
|
|
78
77
|
t.text = e, t.tokens = [];
|
|
79
78
|
});
|
|
@@ -89,24 +88,24 @@ var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }
|
|
|
89
88
|
changeMaxSelections = (e, t) => {
|
|
90
89
|
this.apply((e) => e.maxSelections = t);
|
|
91
90
|
};
|
|
92
|
-
apply = (
|
|
93
|
-
let { onModelChanged:
|
|
94
|
-
|
|
91
|
+
apply = (e) => {
|
|
92
|
+
let { onModelChanged: t, model: n } = this.props, r = c(n);
|
|
93
|
+
e(r), t(r);
|
|
95
94
|
};
|
|
96
95
|
changeFeedback = (e) => {
|
|
97
96
|
this.apply((t) => t.feedback = e);
|
|
98
97
|
};
|
|
99
|
-
changePartialScoring = (
|
|
100
|
-
let { onModelChanged:
|
|
101
|
-
|
|
98
|
+
changePartialScoring = (e) => {
|
|
99
|
+
let { onModelChanged: t, model: n } = this.props, r = c(n);
|
|
100
|
+
r.partialScoring = e, t(r);
|
|
102
101
|
};
|
|
103
|
-
onPromptChanged = (
|
|
104
|
-
let { onModelChanged:
|
|
105
|
-
|
|
102
|
+
onPromptChanged = (e) => {
|
|
103
|
+
let { onModelChanged: t, model: n } = this.props, r = c(n);
|
|
104
|
+
r.prompt = e, t(r);
|
|
106
105
|
};
|
|
107
|
-
onTeacherInstructionsChanged = (
|
|
108
|
-
let { onModelChanged:
|
|
109
|
-
|
|
106
|
+
onTeacherInstructionsChanged = (e) => {
|
|
107
|
+
let { onModelChanged: t, model: n } = this.props, r = c(n);
|
|
108
|
+
r.teacherInstructions = e, t(r);
|
|
110
109
|
};
|
|
111
110
|
onRationaleChanged = (e) => {
|
|
112
111
|
let { onModelChanged: t, model: n } = this.props;
|
|
@@ -116,10 +115,10 @@ var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }
|
|
|
116
115
|
});
|
|
117
116
|
};
|
|
118
117
|
render() {
|
|
119
|
-
let { text:
|
|
118
|
+
let { text: t } = this.state, { configuration: n, imageSupport: r, model: o, onConfigurationChanged: s, onModelChanged: c, uploadSoundSupport: l } = this.props, { baseInputConfiguration: u = {}, correctAnswer: d = {}, contentDimensions: f = {}, feedback: m = {}, highlightChoices: h = {}, mode: g = {}, partialScoring: _ = {}, prompt: T = {}, rationale: E = {}, selectionCount: D = {}, selections: O = {}, settingsPanelDisabled: ue, scoringType: k = {}, spellCheck: A = {}, studentInstructions: j = {}, teacherInstructions: M = {}, text: N = {}, tokens: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, withRubric: L = {}, mathMlOptions: R = {}, language: z = {}, languageChoices: B = {} } = n || {}, { errors: V, extraCSSRules: H, feedbackEnabled: de, promptEnabled: fe, rationaleEnabled: pe, spellCheckEnabled: U, teacherInstructionsEnabled: me, toolbarEditorPosition: he } = o || {}, { prompt: W, rationale: G, selectionsError: K, teacherInstructions: q, tokensError: J } = V || {}, ge = e(n), Y = F && F.prompt, X = I && I.prompt, { tokens: Z } = o;
|
|
120
119
|
Z ||= [];
|
|
121
120
|
let Q = { position: he === "top" ? "top" : "bottom" };
|
|
122
|
-
le("[render] maxSelections:",
|
|
121
|
+
le("[render] maxSelections:", o.maxSelections);
|
|
123
122
|
let _e = {
|
|
124
123
|
partialScoring: _.settings && v(_.label),
|
|
125
124
|
highlightChoices: h.settings && v(h.label),
|
|
@@ -138,74 +137,74 @@ var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }
|
|
|
138
137
|
...u,
|
|
139
138
|
...e
|
|
140
139
|
});
|
|
141
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ a(p.ConfigLayout, {
|
|
142
141
|
extraCSSRules: H,
|
|
143
142
|
dimensions: f,
|
|
144
143
|
hideSettings: ue,
|
|
145
|
-
settings: /* @__PURE__ */
|
|
146
|
-
model:
|
|
147
|
-
configuration:
|
|
144
|
+
settings: /* @__PURE__ */ i(ne, {
|
|
145
|
+
model: o,
|
|
146
|
+
configuration: n,
|
|
148
147
|
onChangeModel: (e) => c(e),
|
|
149
|
-
onChangeConfiguration:
|
|
148
|
+
onChangeConfiguration: s,
|
|
150
149
|
groups: {
|
|
151
150
|
Settings: _e,
|
|
152
151
|
Properties: ve
|
|
153
152
|
}
|
|
154
153
|
}),
|
|
155
154
|
children: [
|
|
156
|
-
me && /* @__PURE__ */
|
|
155
|
+
me && /* @__PURE__ */ a(b, {
|
|
157
156
|
label: M.label,
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
-
markup:
|
|
157
|
+
children: [/* @__PURE__ */ i(x, {
|
|
158
|
+
markup: o.teacherInstructions || "",
|
|
160
159
|
onChange: this.onTeacherInstructionsChanged,
|
|
161
160
|
imageSupport: r,
|
|
162
161
|
nonEmpty: !1,
|
|
163
162
|
error: q,
|
|
164
163
|
toolbarOpts: Q,
|
|
165
|
-
pluginProps: $(
|
|
164
|
+
pluginProps: $(n?.teacherInstructions?.inputConfiguration),
|
|
166
165
|
spellCheck: U,
|
|
167
166
|
maxImageWidth: F && F.teacherInstructions || Y,
|
|
168
167
|
maxImageHeight: I && I.teacherInstructions || X,
|
|
169
168
|
uploadSoundSupport: l,
|
|
170
169
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
171
170
|
mathMlOptions: R
|
|
172
|
-
}), q && /* @__PURE__ */
|
|
171
|
+
}), q && /* @__PURE__ */ i(S, { children: q })]
|
|
173
172
|
}),
|
|
174
|
-
fe && /* @__PURE__ */
|
|
173
|
+
fe && /* @__PURE__ */ a(b, {
|
|
175
174
|
label: T.label || "",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
177
|
-
markup:
|
|
175
|
+
children: [/* @__PURE__ */ i(x, {
|
|
176
|
+
markup: o.prompt,
|
|
178
177
|
onChange: this.onPromptChanged,
|
|
179
178
|
imageSupport: r,
|
|
180
179
|
error: W,
|
|
181
180
|
toolbarOpts: Q,
|
|
182
|
-
pluginProps: $(
|
|
181
|
+
pluginProps: $(n?.prompt?.inputConfiguration),
|
|
183
182
|
spellCheck: U,
|
|
184
183
|
maxImageWidth: Y,
|
|
185
184
|
maxImageHeight: X,
|
|
186
185
|
uploadSoundSupport: l,
|
|
187
186
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
188
187
|
mathMlOptions: R
|
|
189
|
-
}), W && /* @__PURE__ */
|
|
188
|
+
}), W && /* @__PURE__ */ i(S, { children: W })]
|
|
190
189
|
}),
|
|
191
|
-
N.settings && /* @__PURE__ */
|
|
190
|
+
N.settings && /* @__PURE__ */ i(b, {
|
|
192
191
|
label: N.label || "",
|
|
193
|
-
children: /* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ i(ie, {
|
|
194
193
|
variant: "standard",
|
|
195
194
|
multiline: !0,
|
|
196
|
-
defaultValue:
|
|
195
|
+
defaultValue: t,
|
|
197
196
|
onChange: this.changeText,
|
|
198
197
|
spellCheck: U
|
|
199
198
|
})
|
|
200
199
|
}),
|
|
201
|
-
P.settings && /* @__PURE__ */
|
|
200
|
+
P.settings && /* @__PURE__ */ a(ae, {
|
|
202
201
|
label: P.label || "",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
202
|
+
children: [/* @__PURE__ */ i(C, {
|
|
204
203
|
disableFocusListener: !0,
|
|
205
204
|
disableTouchListener: !0,
|
|
206
205
|
placement: "right",
|
|
207
206
|
title: ge,
|
|
208
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ i(te, {
|
|
209
208
|
fontSize: "small",
|
|
210
209
|
color: "primary",
|
|
211
210
|
style: {
|
|
@@ -214,45 +213,45 @@ var { Panel: ne, toggle: v, radio: y, dropdown: re } = m, b = c(d)(({ theme: e }
|
|
|
214
213
|
top: "-3px"
|
|
215
214
|
}
|
|
216
215
|
})
|
|
217
|
-
}), /* @__PURE__ */
|
|
218
|
-
text:
|
|
216
|
+
}), /* @__PURE__ */ i(oe, {
|
|
217
|
+
text: o.text,
|
|
219
218
|
tokens: Z,
|
|
220
219
|
onChange: this.changeTokens
|
|
221
220
|
})]
|
|
222
221
|
}),
|
|
223
|
-
J && /* @__PURE__ */
|
|
224
|
-
K && /* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
g.settings && /* @__PURE__ */
|
|
227
|
-
O.settings && /* @__PURE__ */
|
|
228
|
-
d.settings && /* @__PURE__ */
|
|
229
|
-
D.settings && /* @__PURE__ */
|
|
222
|
+
J && /* @__PURE__ */ i(S, { children: J }),
|
|
223
|
+
K && /* @__PURE__ */ i(S, { children: K }),
|
|
224
|
+
/* @__PURE__ */ a(se, { children: [
|
|
225
|
+
g.settings && /* @__PURE__ */ i(w, { label: `${g.label}: ${o.mode ? o.mode : "None"}` }),
|
|
226
|
+
O.settings && /* @__PURE__ */ i(w, { label: `${O.label}: ${Z.length}` }),
|
|
227
|
+
d.settings && /* @__PURE__ */ i(w, { label: `${d.label}: ${Z.filter((e) => e.correct).length}` }),
|
|
228
|
+
D.settings && /* @__PURE__ */ i(ce, {
|
|
230
229
|
min: Z.filter((e) => e.correct).length || 0,
|
|
231
230
|
label: `${D.label} (0:any)`,
|
|
232
231
|
max: Z.length,
|
|
233
|
-
value:
|
|
232
|
+
value: o.maxSelections,
|
|
234
233
|
onChange: this.changeMaxSelections
|
|
235
234
|
})
|
|
236
235
|
] }),
|
|
237
|
-
pe && /* @__PURE__ */
|
|
236
|
+
pe && /* @__PURE__ */ a(b, {
|
|
238
237
|
label: E.label || "",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
240
|
-
markup:
|
|
238
|
+
children: [/* @__PURE__ */ i(x, {
|
|
239
|
+
markup: o.rationale || "",
|
|
241
240
|
onChange: this.onRationaleChanged,
|
|
242
241
|
imageSupport: r,
|
|
243
242
|
error: G,
|
|
244
243
|
toolbarOpts: Q,
|
|
245
|
-
pluginProps: $(
|
|
244
|
+
pluginProps: $(n?.rationale?.inputConfiguration),
|
|
246
245
|
spellCheck: U,
|
|
247
246
|
maxImageWidth: F && F.rationale || Y,
|
|
248
247
|
maxImageHeight: I && I.rationale || X,
|
|
249
248
|
uploadSoundSupport: l,
|
|
250
249
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
251
250
|
mathMlOptions: R
|
|
252
|
-
}), G && /* @__PURE__ */
|
|
251
|
+
}), G && /* @__PURE__ */ i(S, { children: G })]
|
|
253
252
|
}),
|
|
254
|
-
de && /* @__PURE__ */
|
|
255
|
-
feedback:
|
|
253
|
+
de && /* @__PURE__ */ i(ee, {
|
|
254
|
+
feedback: o.feedback,
|
|
256
255
|
onChange: this.changeFeedback,
|
|
257
256
|
toolbarOpts: Q
|
|
258
257
|
})
|