@pie-element/multiple-choice 13.2.2-next.0 → 13.2.2-next.1
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/index.js +23 -23
- package/dist/author/main.js +67 -67
- package/dist/browser/{debounce-PkR6OuzU.js → Radio-D9xGO4mD.js} +2598 -2695
- package/dist/browser/Radio-D9xGO4mD.js.map +1 -0
- package/dist/browser/author/index.js +7819 -8261
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +9 -8
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/dist-nl5urzAW.js +107 -0
- package/dist/browser/dist-nl5urzAW.js.map +1 -0
- package/dist/browser/{main-CmP4Uwst.js → main-D2qC-1Hm.js} +220 -220
- package/dist/browser/{main-CmP4Uwst.js.map → main-D2qC-1Hm.js.map} +1 -1
- package/dist/browser/print/index.js +11 -16
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/index.js +26 -26
- package/dist/controller/utils.js +1 -1
- package/dist/delivery/choice-input.js +73 -73
- package/dist/delivery/index.js +19 -19
- package/dist/delivery/multiple-choice.js +72 -72
- package/dist/index.iife.js +1 -1
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/print/index.js +10 -11
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +12 -8
- package/dist/browser/_Uint8Array-CUOjhemR.js +0 -396
- package/dist/browser/_Uint8Array-CUOjhemR.js.map +0 -1
- package/dist/browser/_baseClone-fFvdZAu5.js +0 -245
- package/dist/browser/_baseClone-fFvdZAu5.js.map +0 -1
- package/dist/browser/debounce-PkR6OuzU.js.map +0 -1
- package/dist/browser/isEqual-CnAlrBXo.js +0 -182
- package/dist/browser/isEqual-CnAlrBXo.js.map +0 -1
- package/dist/browser/isObject-B-uKF3Sg.js +0 -38
- package/dist/browser/isObject-B-uKF3Sg.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/_SetCache.js +0 -11
- 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/_apply.js +0 -12
- 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/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js +0 -8
- 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/_baseFor.js +0 -5
- 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/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- 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/_baseMerge.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- 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/_cacheHas.js +0 -6
- 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/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- 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/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- 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/_isIterateeCall.js +0 -12
- 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/_mapToArray.js +0 -9
- 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/_overRest.js +0 -13
- 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/_safeGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- 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/constant.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/defaults.js +0 -16
- 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/identity.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/isArrayLikeObject.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/isEqual.js +0 -7
- 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/isPlainObject.js +0 -14
- 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/merge.js +0 -8
- 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/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import u from "
|
|
8
|
-
import d from "
|
|
1
|
+
import e from "../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
2
|
+
import t from "./choice.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import * as i from "@pie-lib/render-ui";
|
|
6
|
+
import { Collapsible as a, PreviewPrompt as o, color as s, transformDataHeadings as c } from "@pie-lib/render-ui";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
import d from "@pie-lib/correct-answer-toggle";
|
|
9
9
|
import { styled as f } from "@mui/material/styles";
|
|
10
10
|
import p from "@mui/material/Box";
|
|
11
11
|
import m from "@pie-lib/translator";
|
|
@@ -16,9 +16,9 @@ function h(e) {
|
|
|
16
16
|
function g(e, t) {
|
|
17
17
|
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
18
|
}
|
|
19
|
-
var _ = g(
|
|
20
|
-
color:
|
|
21
|
-
backgroundColor:
|
|
19
|
+
var _ = g(o, "PreviewPrompt") || g(x.PreviewPrompt, "PreviewPrompt"), v = g(a, "Collapsible") || g(x.Collapsible, "Collapsible"), y = i, b = y.default, x = b && typeof b == "object" ? b : y, { translator: S } = m, C = f(p)({
|
|
20
|
+
color: s.text(),
|
|
21
|
+
backgroundColor: s.background(),
|
|
22
22
|
"& *": { "-webkit-font-smoothing": "antialiased" },
|
|
23
23
|
position: "relative",
|
|
24
24
|
"& legend": { border: "none !important" }
|
|
@@ -48,56 +48,56 @@ var _ = g(a, "PreviewPrompt") || g(x.PreviewPrompt, "PreviewPrompt"), v = g(i, "
|
|
|
48
48
|
fontSize: e.typography.fontSize - 2,
|
|
49
49
|
color: e.palette.error.main,
|
|
50
50
|
paddingTop: e.spacing(1)
|
|
51
|
-
})), j = class extends
|
|
51
|
+
})), j = class extends n.Component {
|
|
52
52
|
static propTypes = {
|
|
53
|
-
className:
|
|
54
|
-
mode:
|
|
53
|
+
className: r.string,
|
|
54
|
+
mode: r.oneOf([
|
|
55
55
|
"gather",
|
|
56
56
|
"view",
|
|
57
57
|
"evaluate"
|
|
58
58
|
]),
|
|
59
|
-
choiceMode:
|
|
60
|
-
keyMode:
|
|
59
|
+
choiceMode: r.oneOf(["radio", "checkbox"]),
|
|
60
|
+
keyMode: r.oneOf([
|
|
61
61
|
"numbers",
|
|
62
62
|
"letters",
|
|
63
63
|
"none"
|
|
64
64
|
]),
|
|
65
|
-
choices:
|
|
66
|
-
partLabel:
|
|
67
|
-
prompt:
|
|
68
|
-
teacherInstructions:
|
|
69
|
-
session:
|
|
70
|
-
disabled:
|
|
71
|
-
onChoiceChanged:
|
|
72
|
-
responseCorrect:
|
|
73
|
-
correctResponse:
|
|
74
|
-
choicesLayout:
|
|
65
|
+
choices: r.array,
|
|
66
|
+
partLabel: r.string,
|
|
67
|
+
prompt: r.string,
|
|
68
|
+
teacherInstructions: r.string,
|
|
69
|
+
session: r.object,
|
|
70
|
+
disabled: r.bool,
|
|
71
|
+
onChoiceChanged: r.func,
|
|
72
|
+
responseCorrect: r.bool,
|
|
73
|
+
correctResponse: r.array,
|
|
74
|
+
choicesLayout: r.oneOf([
|
|
75
75
|
"vertical",
|
|
76
76
|
"grid",
|
|
77
77
|
"horizontal"
|
|
78
78
|
]),
|
|
79
|
-
gridColumns:
|
|
80
|
-
alwaysShowCorrect:
|
|
81
|
-
animationsDisabled:
|
|
82
|
-
language:
|
|
83
|
-
selectedAnswerBackgroundColor:
|
|
84
|
-
selectedAnswerStrokeColor:
|
|
85
|
-
selectedAnswerStrokeWidth:
|
|
86
|
-
hoverAnswerBackgroundColor:
|
|
87
|
-
hoverAnswerStrokeColor:
|
|
88
|
-
hoverAnswerStrokeWidth:
|
|
89
|
-
onShowCorrectToggle:
|
|
90
|
-
isSelectionButtonBelow:
|
|
91
|
-
minSelections:
|
|
92
|
-
maxSelections:
|
|
93
|
-
autoplayAudioEnabled:
|
|
79
|
+
gridColumns: r.string,
|
|
80
|
+
alwaysShowCorrect: r.bool,
|
|
81
|
+
animationsDisabled: r.bool,
|
|
82
|
+
language: r.string,
|
|
83
|
+
selectedAnswerBackgroundColor: r.string,
|
|
84
|
+
selectedAnswerStrokeColor: r.string,
|
|
85
|
+
selectedAnswerStrokeWidth: r.string,
|
|
86
|
+
hoverAnswerBackgroundColor: r.string,
|
|
87
|
+
hoverAnswerStrokeColor: r.string,
|
|
88
|
+
hoverAnswerStrokeWidth: r.string,
|
|
89
|
+
onShowCorrectToggle: r.func,
|
|
90
|
+
isSelectionButtonBelow: r.bool,
|
|
91
|
+
minSelections: r.number,
|
|
92
|
+
maxSelections: r.number,
|
|
93
|
+
autoplayAudioEnabled: r.bool,
|
|
94
94
|
customAudioButton: {
|
|
95
|
-
playImage:
|
|
96
|
-
pauseImage:
|
|
95
|
+
playImage: r.string,
|
|
96
|
+
pauseImage: r.string
|
|
97
97
|
},
|
|
98
|
-
options:
|
|
99
|
-
baseHeadingLevel:
|
|
100
|
-
includeSrHeading:
|
|
98
|
+
options: r.object,
|
|
99
|
+
baseHeadingLevel: r.number,
|
|
100
|
+
includeSrHeading: r.bool
|
|
101
101
|
};
|
|
102
102
|
constructor(e) {
|
|
103
103
|
super(e), this.state = {
|
|
@@ -145,14 +145,14 @@ var _ = g(a, "PreviewPrompt") || g(x.PreviewPrompt, "PreviewPrompt"), v = g(i, "
|
|
|
145
145
|
let { mode: e, choiceMode: t, includeSrHeading: n, baseHeadingLevel: r, partLabel: i } = this.props;
|
|
146
146
|
if (!(!i && n !== !1) || e !== "gather") return null;
|
|
147
147
|
let a = r ? Math.min(6, r) : 2;
|
|
148
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ l(k.withComponent(`h${a}`), { children: t === "radio" ? "Multiple Choice Question" : "Multiple Select Question" });
|
|
149
149
|
}
|
|
150
150
|
render() {
|
|
151
|
-
let { mode:
|
|
151
|
+
let { mode: n, disabled: r, className: i, choices: a = [], choiceMode: o, gridColumns: s, partLabel: f, prompt: m, responseCorrect: h, teacherInstructions: g, alwaysShowCorrect: y, animationsDisabled: b, language: x, isSelectionButtonBelow: k, minSelections: j, maxSelections: M, autoplayAudioEnabled: N, session: P, customAudioButton: F, options: I, baseHeadingLevel: L } = this.props, { showCorrect: R, maxSelectionsErrorState: z } = this.state, B = n === "evaluate", V = B && !h, H = s > 1 ? { gridTemplateColumns: `repeat(${s}, 1fr)` } : void 0, U = P.value && P.value.length || 0, W = (() => {
|
|
152
152
|
if (!L) return;
|
|
153
153
|
let e = 1;
|
|
154
154
|
return f && (e += 1), Math.min(6, L + e);
|
|
155
|
-
})(), G = (e) => e && W ?
|
|
155
|
+
})(), G = (e) => e && W ? c(e, W) : e, K = /* @__PURE__ */ l(_, {
|
|
156
156
|
tagName: "div",
|
|
157
157
|
className: "prompt",
|
|
158
158
|
defaultClassName: "teacher-instructions",
|
|
@@ -168,26 +168,26 @@ var _ = g(a, "PreviewPrompt") || g(x.PreviewPrompt, "PreviewPrompt"), v = g(i, "
|
|
|
168
168
|
lng: x,
|
|
169
169
|
minSelections: j
|
|
170
170
|
}) : "", J = this.props.choicesLayout === "grid" ? D : this.props.choicesLayout === "horizontal" ? E : p;
|
|
171
|
-
return /* @__PURE__ */
|
|
171
|
+
return /* @__PURE__ */ u(C, {
|
|
172
172
|
id: "main-container",
|
|
173
|
-
className:
|
|
173
|
+
className: e(i, "multiple-choice"),
|
|
174
174
|
children: [
|
|
175
|
-
f && /* @__PURE__ */
|
|
175
|
+
f && /* @__PURE__ */ l(w, {
|
|
176
176
|
as: L ? `h${Math.min(6, L + 1)}` : "h2",
|
|
177
177
|
children: f
|
|
178
178
|
}),
|
|
179
179
|
this.renderHeading(),
|
|
180
|
-
g && /* @__PURE__ */
|
|
180
|
+
g && /* @__PURE__ */ l(T, { children: b ? K : /* @__PURE__ */ l(v, {
|
|
181
181
|
labels: {
|
|
182
182
|
hidden: "Show Teacher Instructions",
|
|
183
183
|
visible: "Hide Teacher Instructions"
|
|
184
184
|
},
|
|
185
185
|
children: K
|
|
186
186
|
}) }),
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
role:
|
|
187
|
+
/* @__PURE__ */ u(O, {
|
|
188
|
+
role: o === "radio" ? "radiogroup" : "group",
|
|
189
189
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ l(_, {
|
|
191
191
|
className: "prompt",
|
|
192
192
|
defaultClassName: "prompt",
|
|
193
193
|
prompt: G(m),
|
|
@@ -195,15 +195,15 @@ var _ = g(a, "PreviewPrompt") || g(x.PreviewPrompt, "PreviewPrompt"), v = g(i, "
|
|
|
195
195
|
autoplayAudioEnabled: N,
|
|
196
196
|
customAudioButton: F
|
|
197
197
|
}),
|
|
198
|
-
!(I && y) && /* @__PURE__ */
|
|
198
|
+
!(I && y) && /* @__PURE__ */ l(d, {
|
|
199
199
|
show: V,
|
|
200
200
|
toggled: R,
|
|
201
201
|
onToggle: this.onToggle.bind(this),
|
|
202
202
|
language: x
|
|
203
203
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ l(J, {
|
|
205
205
|
style: H,
|
|
206
|
-
children:
|
|
206
|
+
children: a.map((e, n) => /* @__PURE__ */ l(t, {
|
|
207
207
|
choicesLayout: this.props.choicesLayout,
|
|
208
208
|
selectedAnswerBackgroundColor: this.props.selectedAnswerBackgroundColor,
|
|
209
209
|
selectedAnswerStrokeColor: this.props.selectedAnswerStrokeColor,
|
|
@@ -211,27 +211,27 @@ var _ = g(a, "PreviewPrompt") || g(x.PreviewPrompt, "PreviewPrompt"), v = g(i, "
|
|
|
211
211
|
hoverAnswerBackgroundColor: this.props.hoverAnswerBackgroundColor,
|
|
212
212
|
hoverAnswerStrokeColor: this.props.hoverAnswerStrokeColor,
|
|
213
213
|
hoverAnswerStrokeWidth: this.props.hoverAnswerStrokeWidth,
|
|
214
|
-
gridColumns:
|
|
215
|
-
choice:
|
|
216
|
-
index:
|
|
217
|
-
choicesLength:
|
|
214
|
+
gridColumns: s,
|
|
215
|
+
choice: e,
|
|
216
|
+
index: n,
|
|
217
|
+
choicesLength: a.length,
|
|
218
218
|
showCorrect: R,
|
|
219
219
|
isEvaluateMode: B,
|
|
220
|
-
choiceMode:
|
|
221
|
-
disabled:
|
|
220
|
+
choiceMode: o,
|
|
221
|
+
disabled: r,
|
|
222
222
|
tagName: this.groupName,
|
|
223
223
|
onChoiceChanged: this.handleChange,
|
|
224
|
-
hideTick:
|
|
225
|
-
checked: this.getChecked(
|
|
226
|
-
correctness: B ? this.getCorrectness(
|
|
227
|
-
displayKey: this.indexToSymbol(
|
|
224
|
+
hideTick: e.hideTick,
|
|
225
|
+
checked: this.getChecked(e),
|
|
226
|
+
correctness: B ? this.getCorrectness(e) : void 0,
|
|
227
|
+
displayKey: this.indexToSymbol(n),
|
|
228
228
|
isSelectionButtonBelow: k
|
|
229
|
-
}, `choice-${
|
|
229
|
+
}, `choice-${n}`))
|
|
230
230
|
})
|
|
231
231
|
]
|
|
232
232
|
}),
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
o === "checkbox" && U < j && /* @__PURE__ */ l(A, { children: q() }),
|
|
234
|
+
o === "checkbox" && z && /* @__PURE__ */ l(A, { children: S.t(`translation:multipleChoice:maxSelections_${M === 1 ? "one" : "other"}`, {
|
|
235
235
|
lng: x,
|
|
236
236
|
maxSelections: M
|
|
237
237
|
}) })
|