@pie-element/match 12.1.1-next.11 → 12.1.2-next.0
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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/add-row.d.ts +17 -0
- package/dist/author/add-row.js +24 -0
- package/dist/author/answer-config-block.d.ts +36 -0
- package/dist/author/answer-config-block.js +176 -0
- package/dist/author/common.d.ts +22 -0
- package/dist/author/configure.d.ts +48 -0
- package/dist/author/configure.js +259 -0
- package/dist/author/defaults.d.ts +203 -0
- package/dist/author/defaults.js +151 -0
- package/dist/author/general-config-block.d.ts +22 -0
- package/dist/author/general-config-block.js +93 -0
- package/dist/author/index.d.ts +44 -0
- package/dist/author/index.js +78 -0
- package/dist/author/row.d.ts +51 -0
- package/dist/author/row.js +204 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.js +10 -0
- package/dist/browser/Typography-CbSskKxx.js +9217 -0
- package/dist/browser/Typography-CbSskKxx.js.map +1 -0
- package/dist/browser/author/index.js +42080 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/browser-kkT1XVKw.js +210 -0
- package/dist/browser/browser-kkT1XVKw.js.map +1 -0
- package/dist/browser/controller/index.js +267 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +1984 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/isEqual-xtQxYITi.js +856 -0
- package/dist/browser/isEqual-xtQxYITi.js.map +1 -0
- package/dist/browser/match.css +2 -0
- package/dist/controller/defaults.d.ts +27 -0
- package/dist/controller/defaults.js +25 -0
- package/dist/controller/index.d.ts +29 -0
- package/dist/controller/index.js +156 -0
- package/dist/delivery/answer-grid.d.ts +28 -0
- package/dist/delivery/answer-grid.js +99 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.js +51 -0
- package/dist/delivery/main.d.ts +26 -0
- package/dist/delivery/main.js +112 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +148 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/package.json +82 -19
- package/CHANGELOG.json +0 -1462
- package/CHANGELOG.md +0 -2327
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -892
- package/configure/CHANGELOG.md +0 -2030
- package/configure/lib/add-row.js +0 -40
- package/configure/lib/add-row.js.map +0 -1
- package/configure/lib/answer-config-block.js +0 -288
- package/configure/lib/answer-config-block.js.map +0 -1
- package/configure/lib/common.js +0 -31
- package/configure/lib/common.js.map +0 -1
- package/configure/lib/configure.js +0 -410
- package/configure/lib/configure.js.map +0 -1
- package/configure/lib/defaults.js +0 -201
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/general-config-block.js +0 -144
- package/configure/lib/general-config-block.js.map +0 -1
- package/configure/lib/index.js +0 -152
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/row.js +0 -321
- package/configure/lib/row.js.map +0 -1
- package/configure/lib/utils.js +0 -12
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -29
- package/configure/utils.js +0 -19
- package/controller/CHANGELOG.json +0 -502
- package/controller/CHANGELOG.md +0 -1359
- package/controller/lib/defaults.js +0 -25
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -424
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -24
- package/docs/config-schema.json +0 -2929
- package/docs/config-schema.json.md +0 -2162
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -49
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -11
- package/docs/pie-schema.json +0 -1530
- package/docs/pie-schema.json.md +0 -907
- package/lib/answer-grid.js +0 -166
- package/lib/answer-grid.js.map +0 -1
- package/lib/index.js +0 -85
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -163
- package/lib/main.js.map +0 -1
package/configure.js
ADDED
package/controller.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/controller/index.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/match/configure/src/add-row.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare class AddRowButton extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
onAddClick: PropTypes.Validator<(...args: any[]) => any>;
|
|
14
|
+
};
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
17
|
+
export default AddRowButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { styled as i } from "@mui/material/styles";
|
|
5
|
+
import a from "@mui/material/Button";
|
|
6
|
+
import o from "@mui/icons-material/Add";
|
|
7
|
+
//#region src/author/add-row.tsx
|
|
8
|
+
var s = i(a)({
|
|
9
|
+
display: "flex",
|
|
10
|
+
alignSelf: "flex-start",
|
|
11
|
+
margin: 0
|
|
12
|
+
}), c = i(o)(({ theme: e }) => ({ marginRight: e.spacing(.5) })), l = class extends e.Component {
|
|
13
|
+
static propTypes = { onAddClick: t.func.isRequired };
|
|
14
|
+
render() {
|
|
15
|
+
let { onAddClick: e } = this.props;
|
|
16
|
+
return /* @__PURE__ */ r(s, {
|
|
17
|
+
disabled: !1,
|
|
18
|
+
onClick: e,
|
|
19
|
+
children: [/* @__PURE__ */ n(c, {}), "Add Another Row"]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { l as default };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/match/configure/src/answer-config-block.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
declare class AnswerConfigBlock extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
model: PropTypes.Validator<object>;
|
|
14
|
+
configuration: PropTypes.Validator<object>;
|
|
15
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
16
|
+
onDeleteRow: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
onAddRow: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
+
}>>;
|
|
22
|
+
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
}>>;
|
|
26
|
+
toolbarOpts: PropTypes.Requireable<object>;
|
|
27
|
+
spellCheck: PropTypes.Requireable<boolean>;
|
|
28
|
+
};
|
|
29
|
+
moveRow: any;
|
|
30
|
+
onChange: (name: any, isBoolean: any) => ({ target }: {
|
|
31
|
+
target: any;
|
|
32
|
+
}) => void;
|
|
33
|
+
onHeaderChange: (headerIndex: any) => (value: any) => void;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
|
+
}
|
|
36
|
+
export default AnswerConfigBlock;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js";
|
|
2
|
+
import { getPluginProps as t } from "./utils.js";
|
|
3
|
+
import n from "./add-row.js";
|
|
4
|
+
import r from "./row.js";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import a from "prop-types";
|
|
7
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
import c from "@mui/material/Typography";
|
|
9
|
+
import { styled as l } from "@mui/material/styles";
|
|
10
|
+
import u from "debug";
|
|
11
|
+
import d, { DEFAULT_PLUGINS as f } from "@pie-lib/editable-html-tip-tap";
|
|
12
|
+
import p from "classnames";
|
|
13
|
+
import { DragProvider as m } from "@pie-lib/drag";
|
|
14
|
+
//#region src/author/answer-config-block.tsx
|
|
15
|
+
var h = u("pie-elements:match:configure"), g = l("div")(({ theme: e }) => ({
|
|
16
|
+
marginBottom: e.spacing(2.5),
|
|
17
|
+
display: "flex",
|
|
18
|
+
flexDirection: "column"
|
|
19
|
+
})), _ = l("div")(({ theme: e }) => ({
|
|
20
|
+
display: "flex",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
flex: 1,
|
|
23
|
+
width: "100%",
|
|
24
|
+
borderBottom: `2px solid ${e.palette.grey.A100}`,
|
|
25
|
+
paddingBottom: e.spacing(2),
|
|
26
|
+
marginTop: e.spacing(2),
|
|
27
|
+
marginBottom: e.spacing(1)
|
|
28
|
+
})), v = l("div")(({ theme: e }) => ({
|
|
29
|
+
flex: 1,
|
|
30
|
+
display: "flex",
|
|
31
|
+
justifyContent: "center",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
flexDirection: "column",
|
|
34
|
+
"&> div": {
|
|
35
|
+
width: "120px",
|
|
36
|
+
padding: `0 ${e.spacing(1)}`,
|
|
37
|
+
textAlign: "center"
|
|
38
|
+
}
|
|
39
|
+
})), y = l("div")(({ theme: e }) => ({
|
|
40
|
+
flex: .5,
|
|
41
|
+
minWidth: "45px",
|
|
42
|
+
padding: `0 ${e.spacing(1)}`
|
|
43
|
+
})), b = l("div")({
|
|
44
|
+
display: "flex",
|
|
45
|
+
flexDirection: "column"
|
|
46
|
+
}), x = l("div")(({ theme: e }) => ({
|
|
47
|
+
fontSize: e.typography.fontSize - 2,
|
|
48
|
+
color: e.palette.error.main,
|
|
49
|
+
paddingTop: `${e.spacing(1)} !important`,
|
|
50
|
+
width: "fit-content !important"
|
|
51
|
+
})), S = l("div")(({ theme: e }) => ({
|
|
52
|
+
fontSize: e.typography.fontSize - 2,
|
|
53
|
+
color: e.palette.error.main,
|
|
54
|
+
paddingBottom: e.spacing(1)
|
|
55
|
+
})), C = l("div")(({ theme: e }) => ({
|
|
56
|
+
"& .marginBottom": { marginBottom: e.typography.fontSize - 2 + e.spacing(1) },
|
|
57
|
+
"& .headerInput": { "& > div": { fontWeight: "bold" } }
|
|
58
|
+
})), w = class extends i.Component {
|
|
59
|
+
static propTypes = {
|
|
60
|
+
model: a.object.isRequired,
|
|
61
|
+
configuration: a.object.isRequired,
|
|
62
|
+
onChange: a.func.isRequired,
|
|
63
|
+
onDeleteRow: a.func.isRequired,
|
|
64
|
+
onAddRow: a.func.isRequired,
|
|
65
|
+
imageSupport: a.shape({
|
|
66
|
+
add: a.func.isRequired,
|
|
67
|
+
delete: a.func.isRequired
|
|
68
|
+
}),
|
|
69
|
+
uploadSoundSupport: a.shape({
|
|
70
|
+
add: a.func.isRequired,
|
|
71
|
+
delete: a.func.isRequired
|
|
72
|
+
}),
|
|
73
|
+
toolbarOpts: a.object,
|
|
74
|
+
spellCheck: a.bool
|
|
75
|
+
};
|
|
76
|
+
moveRow = (e) => {
|
|
77
|
+
let { active: t, over: n } = e;
|
|
78
|
+
if (!n || !t) return;
|
|
79
|
+
let r = t.data.current, i = n.data.current;
|
|
80
|
+
if (r?.type === "row" && i?.type === "row") {
|
|
81
|
+
let e = r.index, t = i.index, { model: n, onChange: a } = this.props, o = { ...n }, s = o.rows || [];
|
|
82
|
+
h("[moveRow]: ", e, t);
|
|
83
|
+
let { movedRow: c, remainingRows: l } = s.reduce((t, n, r) => (r === e ? t.movedRow = n : t.remainingRows.push(n), t), {
|
|
84
|
+
movedRow: null,
|
|
85
|
+
remainingRows: []
|
|
86
|
+
}), u = [
|
|
87
|
+
...l.slice(0, t),
|
|
88
|
+
c,
|
|
89
|
+
...l.slice(t)
|
|
90
|
+
];
|
|
91
|
+
h("update: ", u), o.rows = u, a(o);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
onChange = (t, n) => ({ target: r }) => {
|
|
95
|
+
let { model: i, onChange: a } = this.props, o;
|
|
96
|
+
o = n ? r.checked : r.value, e(i, t, o), a(i, t);
|
|
97
|
+
};
|
|
98
|
+
onHeaderChange = (e) => (t) => {
|
|
99
|
+
let { model: n, onChange: r } = this.props, i = { ...n };
|
|
100
|
+
if (e === 0) {
|
|
101
|
+
i.headers[e] = t, r(i);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
i.headers[e] = t, r(i);
|
|
105
|
+
};
|
|
106
|
+
render() {
|
|
107
|
+
let { model: e, onAddRow: i, imageSupport: a, configuration: l, toolbarOpts: u, spellCheck: h, uploadSoundSupport: w } = this.props, { baseInputConfiguration: T = {}, headers: E = {}, rows: D = {}, maxImageWidth: O = {}, maxImageHeight: k = {}, mathMlOptions: A = {}, minQuestions: j } = l || {}, { errors: M } = e || {}, { correctResponseError: N, rowsErrors: P, columnsErrors: F, noOfRowsError: I, columnsLengthError: L } = M || {}, R = (f || []).filter((e) => e !== "table" && e !== "bulleted-list" && e !== "numbered-list"), z = O && O.prompt, B = k && k.prompt;
|
|
108
|
+
return /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(m, {
|
|
109
|
+
onDragEnd: this.moveRow,
|
|
110
|
+
children: /* @__PURE__ */ s(g, { children: [/* @__PURE__ */ o(c, {
|
|
111
|
+
type: "body1",
|
|
112
|
+
component: "div",
|
|
113
|
+
children: "Click on the labels to edit or remove. Set the correct answers by clicking each correct answer per row."
|
|
114
|
+
}), /* @__PURE__ */ s(b, {
|
|
115
|
+
style: l.width ? {
|
|
116
|
+
width: l.width,
|
|
117
|
+
overflow: "scroll"
|
|
118
|
+
} : {},
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ s(_, { children: [E.settings && (e.headers || []).map((e, n) => /* @__PURE__ */ s(v, {
|
|
121
|
+
className: p({ questionText: n === 0 }),
|
|
122
|
+
sx: n === 0 ? {
|
|
123
|
+
flex: 2,
|
|
124
|
+
display: "flex",
|
|
125
|
+
justifyContent: "flex-start",
|
|
126
|
+
marginRight: 1,
|
|
127
|
+
"&> div": {
|
|
128
|
+
width: "100%",
|
|
129
|
+
padding: 0,
|
|
130
|
+
maxWidth: "unset",
|
|
131
|
+
textAlign: "left",
|
|
132
|
+
minWidth: "200px"
|
|
133
|
+
}
|
|
134
|
+
} : {},
|
|
135
|
+
children: [/* @__PURE__ */ o(d, {
|
|
136
|
+
onChange: this.onHeaderChange(n),
|
|
137
|
+
markup: e,
|
|
138
|
+
className: F && !F[n] ? "marginBottom" : "headerInput",
|
|
139
|
+
label: "column label",
|
|
140
|
+
activePlugins: R,
|
|
141
|
+
pluginProps: t(E?.inputConfiguration, T),
|
|
142
|
+
autoWidthToolbar: !0,
|
|
143
|
+
spellCheck: h,
|
|
144
|
+
uploadSoundSupport: w,
|
|
145
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
146
|
+
error: F && F[n]
|
|
147
|
+
}), F && F[n] && /* @__PURE__ */ o(x, { children: F[n] })]
|
|
148
|
+
}, n)), /* @__PURE__ */ o(y, {})] }),
|
|
149
|
+
e.rows.map((n, i) => /* @__PURE__ */ o(r, {
|
|
150
|
+
model: e,
|
|
151
|
+
row: n,
|
|
152
|
+
idx: i,
|
|
153
|
+
onDeleteRow: this.props.onDeleteRow,
|
|
154
|
+
onChange: this.props.onChange,
|
|
155
|
+
imageSupport: a,
|
|
156
|
+
toolbarOpts: u,
|
|
157
|
+
spellCheck: h,
|
|
158
|
+
error: P?.[n.id],
|
|
159
|
+
maxImageWidth: O && O.rowTitles || z,
|
|
160
|
+
maxImageHeight: k && k.rowTitles || B,
|
|
161
|
+
uploadSoundSupport: w,
|
|
162
|
+
mathMlOptions: A,
|
|
163
|
+
minQuestions: j,
|
|
164
|
+
inputConfiguration: t(D?.inputConfiguration, T)
|
|
165
|
+
}, i)),
|
|
166
|
+
N && /* @__PURE__ */ o(S, { children: N }),
|
|
167
|
+
I && /* @__PURE__ */ o(S, { children: I }),
|
|
168
|
+
L && /* @__PURE__ */ o(S, { children: L }),
|
|
169
|
+
/* @__PURE__ */ o(n, { onAddClick: i })
|
|
170
|
+
]
|
|
171
|
+
})] })
|
|
172
|
+
}) });
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
//#endregion
|
|
176
|
+
export { w as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/match/configure/src/common.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
export declare const InfoDialog: {
|
|
12
|
+
({ title, open, onOk }: {
|
|
13
|
+
title: any;
|
|
14
|
+
open: any;
|
|
15
|
+
onOk: any;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
propTypes: {
|
|
18
|
+
title: PropTypes.Requireable<string>;
|
|
19
|
+
open: PropTypes.Requireable<boolean>;
|
|
20
|
+
onOk: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/match/configure/src/configure.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
|
+
declare class Configure extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
+
onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
model: PropTypes.Validator<object>;
|
|
16
|
+
configuration: PropTypes.Validator<object>;
|
|
17
|
+
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
18
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
19
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
+
}>>;
|
|
21
|
+
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
}>>;
|
|
25
|
+
};
|
|
26
|
+
static defaultProps: {};
|
|
27
|
+
constructor(props: any);
|
|
28
|
+
componentDidMount(): void;
|
|
29
|
+
validateRowsID(rows: any): {
|
|
30
|
+
updatedRows: any;
|
|
31
|
+
wasChanged: boolean;
|
|
32
|
+
};
|
|
33
|
+
onTabChange: any;
|
|
34
|
+
onChangeTabIndex: any;
|
|
35
|
+
onChange: any;
|
|
36
|
+
onFeedbackChange: any;
|
|
37
|
+
onDeleteRow: any;
|
|
38
|
+
onAddRow: any;
|
|
39
|
+
onLayoutChange: any;
|
|
40
|
+
onResponseTypeChange: any;
|
|
41
|
+
onPartialScoringChange: any;
|
|
42
|
+
onPromptChanged: any;
|
|
43
|
+
onTeacherInstructionsChanged: any;
|
|
44
|
+
onRationaleChanged: any;
|
|
45
|
+
render(): React.JSX.Element;
|
|
46
|
+
}
|
|
47
|
+
export declare const Config: typeof Configure;
|
|
48
|
+
export default Configure;
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import { getPluginProps as e } from "./utils.js";
|
|
2
|
+
import t from "./general-config-block.js";
|
|
3
|
+
import n from "./answer-config-block.js";
|
|
4
|
+
import r from "react";
|
|
5
|
+
import i from "prop-types";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { styled as s } from "@mui/material/styles";
|
|
8
|
+
import c from "debug";
|
|
9
|
+
import { AlertDialog as l, FeedbackConfig as ee, InputContainer as u, layout as d, settings as f } from "@pie-lib/config-ui";
|
|
10
|
+
import p from "@pie-lib/editable-html-tip-tap";
|
|
11
|
+
//#region src/author/configure.tsx
|
|
12
|
+
var te = c("@pie-element:match:configure"), { Panel: m, toggle: h, radio: g, dropdown: _ } = f, v = s("div")(() => ({ "& .promptHolder": { width: "100%" } })), y = s("div")(({ theme: e }) => ({
|
|
13
|
+
width: "100%",
|
|
14
|
+
paddingTop: e.spacing(2),
|
|
15
|
+
marginBottom: e.spacing(2)
|
|
16
|
+
})), b = s("div")(({ theme: e }) => ({
|
|
17
|
+
fontSize: e.typography.fontSize - 2,
|
|
18
|
+
color: e.palette.error.main,
|
|
19
|
+
paddingTop: e.spacing(1)
|
|
20
|
+
})), x = class extends r.Component {
|
|
21
|
+
static propTypes = {
|
|
22
|
+
onModelChanged: i.func,
|
|
23
|
+
onConfigurationChanged: i.func,
|
|
24
|
+
model: i.object.isRequired,
|
|
25
|
+
configuration: i.object.isRequired,
|
|
26
|
+
imageSupport: i.shape({
|
|
27
|
+
add: i.func.isRequired,
|
|
28
|
+
delete: i.func.isRequired
|
|
29
|
+
}),
|
|
30
|
+
uploadSoundSupport: i.shape({
|
|
31
|
+
add: i.func.isRequired,
|
|
32
|
+
delete: i.func.isRequired
|
|
33
|
+
})
|
|
34
|
+
};
|
|
35
|
+
static defaultProps = {};
|
|
36
|
+
constructor(e) {
|
|
37
|
+
super(e);
|
|
38
|
+
let t = 0;
|
|
39
|
+
e.model.rows && e.model.rows.length > 0 && (t = Math.max(...e.model.rows.map((e) => e.id))), this.rowIdCounter = t + 1, this.state = {
|
|
40
|
+
activeTab: 0,
|
|
41
|
+
dialog: {
|
|
42
|
+
open: !1,
|
|
43
|
+
text: ""
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
componentDidMount() {
|
|
48
|
+
let { updatedRows: e, wasChanged: t } = this.validateRowsID(this.props.model.rows);
|
|
49
|
+
if (t) {
|
|
50
|
+
let t = {
|
|
51
|
+
...this.props.model,
|
|
52
|
+
rows: e
|
|
53
|
+
};
|
|
54
|
+
this.props.onModelChanged(t);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
validateRowsID(e) {
|
|
58
|
+
let t = !1;
|
|
59
|
+
return {
|
|
60
|
+
updatedRows: (e || []).map((e, n) => e.id === n + 1 ? e : (t = !0, {
|
|
61
|
+
...e,
|
|
62
|
+
id: n + 1
|
|
63
|
+
})),
|
|
64
|
+
wasChanged: t
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
onTabChange = (e, t) => {
|
|
68
|
+
this.setState({ activeTab: t });
|
|
69
|
+
};
|
|
70
|
+
onChangeTabIndex = (e) => {
|
|
71
|
+
this.setState({ activeTab: e });
|
|
72
|
+
};
|
|
73
|
+
onChange = (e) => {
|
|
74
|
+
this.props.onModelChanged(e);
|
|
75
|
+
};
|
|
76
|
+
onFeedbackChange = (e) => {
|
|
77
|
+
let { model: t, onModelChanged: n } = this.props;
|
|
78
|
+
t.feedback = e, n(t);
|
|
79
|
+
};
|
|
80
|
+
onDeleteRow = (e) => {
|
|
81
|
+
let { model: t } = this.props, n = { ...t };
|
|
82
|
+
n.rows.splice(e, 1), this.onChange(n);
|
|
83
|
+
};
|
|
84
|
+
onAddRow = () => {
|
|
85
|
+
let { model: e, configuration: t } = this.props, n = { ...e }, { maxQuestions: r } = t || {};
|
|
86
|
+
if (r && (n.rows || []).length >= r) {
|
|
87
|
+
this.setState({ dialog: {
|
|
88
|
+
open: !0,
|
|
89
|
+
text: `There can be maximum ${r} question row` + (r > 1 ? "s" : "") + "."
|
|
90
|
+
} });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
n.rows = n.rows.concat({
|
|
94
|
+
id: this.rowIdCounter + 1,
|
|
95
|
+
title: `Question Text ${(n.rows || []).length + 1}`,
|
|
96
|
+
values: Array(e.layout - 1).fill(!1)
|
|
97
|
+
}), this.rowIdCounter += 1, this.onChange(n);
|
|
98
|
+
};
|
|
99
|
+
onLayoutChange = (e) => {
|
|
100
|
+
let { model: t } = this.props, n = t.layout, r = { ...t };
|
|
101
|
+
if (e > n) {
|
|
102
|
+
for (let t = 0; t < e - n; t++) r.headers.push(`Column ${r.headers.length + 1}`);
|
|
103
|
+
r.rows.forEach((t) => {
|
|
104
|
+
for (let r = 0; r < e - n; r++) t.values.push(!1);
|
|
105
|
+
});
|
|
106
|
+
} else e < n && (r.headers.splice(e), r.rows.forEach((t) => {
|
|
107
|
+
t.values.splice(e - 1);
|
|
108
|
+
}));
|
|
109
|
+
r.layout = e, this.onChange(r);
|
|
110
|
+
};
|
|
111
|
+
onResponseTypeChange = (e) => {
|
|
112
|
+
let { model: t } = this.props, n = { ...t };
|
|
113
|
+
e === "radio" && n.rows.forEach((e) => {
|
|
114
|
+
e.values.reduce((e, t) => t === !0 ? e + 1 : e) > 1 && (e.values = Array(t.layout - 1).fill(!1));
|
|
115
|
+
}), n.choiceMode = e, this.onChange(n);
|
|
116
|
+
};
|
|
117
|
+
onPartialScoringChange = (e) => {
|
|
118
|
+
this.props.model.partialScoring = e, this.props.onModelChanged(this.props.model);
|
|
119
|
+
};
|
|
120
|
+
onPromptChanged = (e) => {
|
|
121
|
+
this.props.onModelChanged({
|
|
122
|
+
...this.props.model,
|
|
123
|
+
prompt: e
|
|
124
|
+
});
|
|
125
|
+
};
|
|
126
|
+
onTeacherInstructionsChanged = (e) => {
|
|
127
|
+
this.props.onModelChanged({
|
|
128
|
+
...this.props.model,
|
|
129
|
+
teacherInstructions: e
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
onRationaleChanged = (e) => {
|
|
133
|
+
this.props.onModelChanged({
|
|
134
|
+
...this.props.model,
|
|
135
|
+
rationale: e
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
render() {
|
|
139
|
+
let { model: r, imageSupport: i, onModelChanged: s, configuration: c, onConfigurationChanged: f, uploadSoundSupport: x } = this.props, { baseInputConfiguration: S = {}, contentDimensions: C = {}, feedback: w = {}, lockChoiceOrder: T = {}, maxImageWidth: E = {}, maxImageHeight: D = {}, partialScoring: O = {}, prompt: k = {}, rationale: A = {}, settingsPanelDisabled: j, scoringType: M = {}, spellCheck: N = {}, studentInstructions: P = {}, teacherInstructions: F = {}, withRubric: I = {}, language: L = {}, languageChoices: R = {} } = c || {}, { errors: z, extraCSSRules: B, feedbackEnabled: V, promptEnabled: H, rationaleEnabled: U, spellCheckEnabled: W, teacherInstructionsEnabled: G, toolbarEditorPosition: K } = r || {}, { prompt: q, rationale: J, teacherInstructions: Y } = z || {}, { dialog: X } = this.state, Z = { position: K === "top" ? "top" : "bottom" }, Q = E && E.prompt, $ = D && D.prompt, ne = {
|
|
140
|
+
partialScoring: O.settings && h(O.label),
|
|
141
|
+
lockChoiceOrder: T.settings && h(T.label),
|
|
142
|
+
feedbackEnabled: w.settings && h(w.label),
|
|
143
|
+
"language.enabled": L.settings && h(L.label, !0),
|
|
144
|
+
language: L.settings && L.enabled && _(R.label, R.options)
|
|
145
|
+
}, re = {
|
|
146
|
+
teacherInstructionsEnabled: F.settings && h(F.label),
|
|
147
|
+
studentInstructionsEnabled: P.settings && h(P.label),
|
|
148
|
+
promptEnabled: k.settings && h(k.label),
|
|
149
|
+
rationaleEnabled: A.settings && h(A.label),
|
|
150
|
+
spellCheckEnabled: N.settings && h(N.label),
|
|
151
|
+
scoringType: M.settings && g(M.label, ["auto", "rubric"]),
|
|
152
|
+
rubricEnabled: I?.settings && h(I?.label)
|
|
153
|
+
};
|
|
154
|
+
return te("[render] model", r), /* @__PURE__ */ a(v, { children: /* @__PURE__ */ o(d.ConfigLayout, {
|
|
155
|
+
extraCSSRules: B,
|
|
156
|
+
dimensions: C,
|
|
157
|
+
hideSettings: j,
|
|
158
|
+
settings: /* @__PURE__ */ a(m, {
|
|
159
|
+
model: r,
|
|
160
|
+
configuration: c,
|
|
161
|
+
onChangeModel: (e) => s(e),
|
|
162
|
+
onChangeConfiguration: (e) => f(e),
|
|
163
|
+
groups: {
|
|
164
|
+
Settings: ne,
|
|
165
|
+
Properties: re
|
|
166
|
+
}
|
|
167
|
+
}),
|
|
168
|
+
children: [
|
|
169
|
+
G && /* @__PURE__ */ a(u, {
|
|
170
|
+
label: F.label,
|
|
171
|
+
className: "promptHolder",
|
|
172
|
+
children: /* @__PURE__ */ o(y, { children: [/* @__PURE__ */ a(p, {
|
|
173
|
+
className: "prompt",
|
|
174
|
+
markup: r.teacherInstructions || "",
|
|
175
|
+
onChange: this.onTeacherInstructionsChanged,
|
|
176
|
+
imageSupport: i,
|
|
177
|
+
error: Y,
|
|
178
|
+
nonEmpty: !1,
|
|
179
|
+
toolbarOpts: Z,
|
|
180
|
+
pluginProps: e(F?.inputConfiguration, S),
|
|
181
|
+
spellCheck: W,
|
|
182
|
+
maxImageWidth: E && E.teacherInstructions || Q,
|
|
183
|
+
maxImageHeight: D && D.teacherInstructions || $,
|
|
184
|
+
uploadSoundSupport: x,
|
|
185
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }]
|
|
186
|
+
}), Y && /* @__PURE__ */ a(b, { children: Y })] })
|
|
187
|
+
}),
|
|
188
|
+
H && /* @__PURE__ */ a(u, {
|
|
189
|
+
label: k.label,
|
|
190
|
+
className: "promptHolder",
|
|
191
|
+
children: /* @__PURE__ */ o(y, { children: [/* @__PURE__ */ a(p, {
|
|
192
|
+
className: "prompt",
|
|
193
|
+
markup: r.prompt,
|
|
194
|
+
onChange: this.onPromptChanged,
|
|
195
|
+
imageSupport: i,
|
|
196
|
+
error: q,
|
|
197
|
+
nonEmpty: !1,
|
|
198
|
+
disableUnderline: !0,
|
|
199
|
+
toolbarOpts: Z,
|
|
200
|
+
pluginProps: e(k?.inputConfiguration, S),
|
|
201
|
+
spellCheck: W,
|
|
202
|
+
maxImageWidth: E && E.prompt,
|
|
203
|
+
maxImageHeight: D && D.prompt,
|
|
204
|
+
uploadSoundSupport: x,
|
|
205
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }]
|
|
206
|
+
}), q && /* @__PURE__ */ a(b, { children: q })] })
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ a(t, {
|
|
209
|
+
model: r,
|
|
210
|
+
configuration: c,
|
|
211
|
+
onResponseTypeChange: this.onResponseTypeChange,
|
|
212
|
+
onLayoutChange: this.onLayoutChange
|
|
213
|
+
}),
|
|
214
|
+
/* @__PURE__ */ a(n, {
|
|
215
|
+
model: r,
|
|
216
|
+
configuration: c,
|
|
217
|
+
imageSupport: i,
|
|
218
|
+
onChange: this.onChange,
|
|
219
|
+
onAddRow: this.onAddRow,
|
|
220
|
+
onDeleteRow: this.onDeleteRow,
|
|
221
|
+
toolbarOpts: Z,
|
|
222
|
+
spellCheck: W,
|
|
223
|
+
uploadSoundSupport: x
|
|
224
|
+
}),
|
|
225
|
+
U && /* @__PURE__ */ a(u, {
|
|
226
|
+
label: A.label,
|
|
227
|
+
className: "promptHolder",
|
|
228
|
+
children: /* @__PURE__ */ o(y, { children: [/* @__PURE__ */ a(p, {
|
|
229
|
+
className: "prompt",
|
|
230
|
+
markup: r.rationale || "",
|
|
231
|
+
onChange: this.onRationaleChanged,
|
|
232
|
+
imageSupport: i,
|
|
233
|
+
error: J,
|
|
234
|
+
toolbarOpts: Z,
|
|
235
|
+
pluginProps: e(A?.inputConfiguration, S),
|
|
236
|
+
spellCheck: W,
|
|
237
|
+
maxImageWidth: E && E.rationale || Q,
|
|
238
|
+
maxImageHeight: D && D.rationale || $,
|
|
239
|
+
uploadSoundSupport: x,
|
|
240
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }]
|
|
241
|
+
}), J && /* @__PURE__ */ a(b, { children: J })] })
|
|
242
|
+
}),
|
|
243
|
+
V && /* @__PURE__ */ a(ee, {
|
|
244
|
+
feedback: r.feedback,
|
|
245
|
+
onChange: this.onFeedbackChange,
|
|
246
|
+
toolbarOpts: Z
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ a(l, {
|
|
249
|
+
open: X.open,
|
|
250
|
+
title: "Warning",
|
|
251
|
+
text: X.text,
|
|
252
|
+
onConfirm: () => this.setState({ dialog: { open: !1 } })
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
}) });
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
//#endregion
|
|
259
|
+
export { x as default };
|