@pie-element/ebsr 14.2.0-next.28 → 14.2.1-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/defaults.d.ts +66 -0
- package/dist/author/defaults.js +161 -0
- package/dist/author/index.d.ts +34 -0
- package/dist/author/index.js +78 -0
- package/dist/author/main.d.ts +22 -0
- package/dist/author/main.js +121 -0
- package/dist/controller/defaults.d.ts +15 -0
- package/dist/controller/defaults.js +26 -0
- package/dist/controller/index.d.ts +42 -0
- package/dist/controller/index.js +186 -0
- package/dist/controller/utils.d.ts +10 -0
- package/dist/controller/utils.js +8 -0
- package/dist/delivery/index.d.ts +26 -0
- package/dist/delivery/index.js +132 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +165 -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/_apply.js +12 -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/_baseGet.js +10 -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/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -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/_isIterateeCall.js +12 -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/_overRest.js +13 -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/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -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/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -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/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.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/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/dist/print/index.d.ts +25 -0
- package/dist/print/index.js +107 -0
- package/package.json +56 -17
- package/CHANGELOG.json +0 -1547
- package/CHANGELOG.md +0 -2271
- package/LICENSE.md +0 -5
- package/README.md +0 -62
- package/configure/CHANGELOG.json +0 -992
- package/configure/CHANGELOG.md +0 -2136
- package/configure/lib/defaults.js +0 -229
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -154
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -222
- package/configure/lib/main.js.map +0 -1
- package/configure/package.json +0 -23
- package/configure/src/__tests__/index.test.js +0 -492
- package/configure/src/defaults.js +0 -173
- package/configure/src/index.js +0 -174
- package/configure/src/main.jsx +0 -235
- package/controller/CHANGELOG.json +0 -552
- package/controller/CHANGELOG.md +0 -1275
- package/controller/lib/defaults.js +0 -31
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -448
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -18
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -18
- package/controller/src/__tests__/index.test.js +0 -591
- package/controller/src/__tests__/utils.test.js +0 -48
- package/controller/src/defaults.js +0 -25
- package/controller/src/index.js +0 -442
- package/controller/src/utils.js +0 -18
- package/docs/config-schema.json +0 -5787
- package/docs/config-schema.json.md +0 -4278
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -52
- package/docs/demo/index.html +0 -2
- package/docs/demo/session.js +0 -14
- package/docs/pie-schema.json +0 -2911
- package/docs/pie-schema.json.md +0 -2142
- package/ebsr.png +0 -0
- package/lib/index.js +0 -207
- package/lib/index.js.map +0 -1
- package/lib/print.js +0 -186
- package/lib/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -5664
- package/module/demo.js +0 -77
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -14
- package/module/print-demo.js +0 -115
- package/module/print.html +0 -18
- package/module/print.js +0 -1
- package/src/__tests__/index.test.js +0 -129
- package/src/index.js +0 -222
- package/src/print.js +0 -207
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { cloneDeep } from 'lodash-es';
|
|
2
|
-
|
|
3
|
-
const defaultConfig = {
|
|
4
|
-
addChoiceButton: {
|
|
5
|
-
settings: true,
|
|
6
|
-
label: 'Add a Choice',
|
|
7
|
-
},
|
|
8
|
-
choiceMode: {
|
|
9
|
-
settings: true,
|
|
10
|
-
label: 'Response Type',
|
|
11
|
-
},
|
|
12
|
-
choicePrefix: {
|
|
13
|
-
settings: true,
|
|
14
|
-
label: 'Choice Labels',
|
|
15
|
-
},
|
|
16
|
-
deleteChoice: {
|
|
17
|
-
settings: true,
|
|
18
|
-
},
|
|
19
|
-
feedback: {
|
|
20
|
-
settings: true,
|
|
21
|
-
label: 'Feedback',
|
|
22
|
-
},
|
|
23
|
-
lockChoiceOrder: {
|
|
24
|
-
settings: true,
|
|
25
|
-
label: 'Lock Choice Order',
|
|
26
|
-
},
|
|
27
|
-
prompt: {
|
|
28
|
-
settings: true,
|
|
29
|
-
label: 'Prompt',
|
|
30
|
-
inputConfiguration: {
|
|
31
|
-
audio: { disabled: false },
|
|
32
|
-
video: { disabled: false },
|
|
33
|
-
image: { disabled: false },
|
|
34
|
-
},
|
|
35
|
-
required: false,
|
|
36
|
-
},
|
|
37
|
-
rationale: {
|
|
38
|
-
settings: true,
|
|
39
|
-
label: 'Rationale',
|
|
40
|
-
inputConfiguration: {
|
|
41
|
-
audio: { disabled: false },
|
|
42
|
-
video: { disabled: false },
|
|
43
|
-
image: { disabled: false },
|
|
44
|
-
},
|
|
45
|
-
required: false,
|
|
46
|
-
},
|
|
47
|
-
settingsPanelDisabled: true,
|
|
48
|
-
studentInstructions: {
|
|
49
|
-
settings: false,
|
|
50
|
-
label: 'Student Instructions',
|
|
51
|
-
},
|
|
52
|
-
teacherInstructions: {
|
|
53
|
-
settings: true,
|
|
54
|
-
label: 'Teacher Instructions',
|
|
55
|
-
inputConfiguration: {
|
|
56
|
-
audio: { disabled: false },
|
|
57
|
-
video: { disabled: false },
|
|
58
|
-
image: { disabled: false },
|
|
59
|
-
},
|
|
60
|
-
required: false,
|
|
61
|
-
},
|
|
62
|
-
choicesLayout: {
|
|
63
|
-
settings: false,
|
|
64
|
-
label: 'Choices Layout',
|
|
65
|
-
},
|
|
66
|
-
gridColumns: {
|
|
67
|
-
label: 'Grid columns',
|
|
68
|
-
},
|
|
69
|
-
spellCheck: {
|
|
70
|
-
label: 'Spellcheck',
|
|
71
|
-
settings: false,
|
|
72
|
-
enabled: true,
|
|
73
|
-
},
|
|
74
|
-
maxImageWidth: {
|
|
75
|
-
teacherInstructions: 300,
|
|
76
|
-
prompt: 300,
|
|
77
|
-
rationale: 636,
|
|
78
|
-
choices: 636,
|
|
79
|
-
},
|
|
80
|
-
maxImageHeight: {
|
|
81
|
-
teacherInstructions: 300,
|
|
82
|
-
prompt: 300,
|
|
83
|
-
rationale: 300,
|
|
84
|
-
choices: 300,
|
|
85
|
-
},
|
|
86
|
-
mathMlOptions: {
|
|
87
|
-
mmlOutput: false,
|
|
88
|
-
mmlEditing: false,
|
|
89
|
-
},
|
|
90
|
-
choices: {
|
|
91
|
-
inputConfiguration: {
|
|
92
|
-
audio: { disabled: false },
|
|
93
|
-
video: { disabled: false },
|
|
94
|
-
image: { disabled: false },
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
baseInputConfiguration: {
|
|
98
|
-
h3: { disabled: true },
|
|
99
|
-
audio: { disabled: false },
|
|
100
|
-
video: { disabled: false },
|
|
101
|
-
image: { disabled: false },
|
|
102
|
-
textAlign: { disabled: true },
|
|
103
|
-
showParagraphs: { disabled: false },
|
|
104
|
-
separateParagraphs: { disabled: true },
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
const partModel = (base) => ({
|
|
109
|
-
choiceMode: 'radio',
|
|
110
|
-
choicePrefix: 'letters',
|
|
111
|
-
choices: [],
|
|
112
|
-
choicesLayout: 'vertical',
|
|
113
|
-
feedbackEnabled: false,
|
|
114
|
-
gridColumns: 2,
|
|
115
|
-
prompt: '',
|
|
116
|
-
promptEnabled: true,
|
|
117
|
-
rationale: '',
|
|
118
|
-
rationaleEnabled: true,
|
|
119
|
-
spellCheckEnabled: true,
|
|
120
|
-
studentInstructionsEnabled: true,
|
|
121
|
-
teacherInstructions: '',
|
|
122
|
-
teacherInstructionsEnabled: true,
|
|
123
|
-
toolbarEditorPosition: 'bottom',
|
|
124
|
-
...base,
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
export default {
|
|
128
|
-
model: {
|
|
129
|
-
partLabels: false,
|
|
130
|
-
partLabelType: 'Letters',
|
|
131
|
-
// partialScoring: false,
|
|
132
|
-
partA: partModel(),
|
|
133
|
-
partB: partModel(),
|
|
134
|
-
},
|
|
135
|
-
configuration: {
|
|
136
|
-
baseInputConfiguration: {
|
|
137
|
-
h3: { disabled: true },
|
|
138
|
-
audio: { disabled: false },
|
|
139
|
-
video: { disabled: false },
|
|
140
|
-
image: { disabled: false },
|
|
141
|
-
textAlign: { disabled: true },
|
|
142
|
-
showParagraphs: { disabled: false },
|
|
143
|
-
separateParagraphs: { disabled: true },
|
|
144
|
-
},
|
|
145
|
-
partialScoring: {
|
|
146
|
-
label: 'Allow Partial Scoring',
|
|
147
|
-
// this will turn off partial scoring toggle in the settings tab by default for the interaction
|
|
148
|
-
// as we'd like partial scoring to be controlled from the environment entirely
|
|
149
|
-
// if any other consumers would like to enable it for themselves, they can do so from their model directly.
|
|
150
|
-
settings: false,
|
|
151
|
-
},
|
|
152
|
-
scoringType: {
|
|
153
|
-
settings: false,
|
|
154
|
-
label: 'Scoring Type',
|
|
155
|
-
},
|
|
156
|
-
partA: cloneDeep(defaultConfig),
|
|
157
|
-
partB: cloneDeep(defaultConfig),
|
|
158
|
-
partLabels: {
|
|
159
|
-
settings: true,
|
|
160
|
-
label: 'Part Labels',
|
|
161
|
-
},
|
|
162
|
-
settingsPanelDisabled: false,
|
|
163
|
-
language: {
|
|
164
|
-
settings: false,
|
|
165
|
-
label: 'Specify Language',
|
|
166
|
-
enabled: false,
|
|
167
|
-
},
|
|
168
|
-
languageChoices: {
|
|
169
|
-
label: 'Language Choices',
|
|
170
|
-
options: [],
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
};
|
package/configure/src/index.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import { ModelUpdatedEvent } from '@pie-framework/pie-configure-events';
|
|
4
|
-
import MultipleChoiceConfigure from '@pie-element/multiple-choice/configure/lib';
|
|
5
|
-
import { defaults } from 'lodash-es';
|
|
6
|
-
import Main from './main';
|
|
7
|
-
|
|
8
|
-
import sensibleDefaults from './defaults';
|
|
9
|
-
|
|
10
|
-
const MODEL_UPDATED = ModelUpdatedEvent.TYPE;
|
|
11
|
-
const MC_TAG_NAME = 'ebsr-multiple-choice-configure';
|
|
12
|
-
|
|
13
|
-
class EbsrMCConfigure extends MultipleChoiceConfigure {}
|
|
14
|
-
const defineMultipleChoice = () => {
|
|
15
|
-
if (!customElements.get(MC_TAG_NAME)) {
|
|
16
|
-
customElements.define(MC_TAG_NAME, EbsrMCConfigure);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
defineMultipleChoice();
|
|
21
|
-
|
|
22
|
-
const prepareCustomizationObject = (config, model) => {
|
|
23
|
-
const configuration = defaults(config, sensibleDefaults.configuration);
|
|
24
|
-
|
|
25
|
-
return {
|
|
26
|
-
configuration,
|
|
27
|
-
model,
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
const { model: modelDefault } = sensibleDefaults || {};
|
|
32
|
-
|
|
33
|
-
export default class EbsrConfigure extends HTMLElement {
|
|
34
|
-
static createDefaultModel = ({ partA = {}, partB = {}, ...model } = {}, defaults = modelDefault) => ({
|
|
35
|
-
...defaults,
|
|
36
|
-
...model,
|
|
37
|
-
partA: {
|
|
38
|
-
...defaults.partA,
|
|
39
|
-
...partA,
|
|
40
|
-
choicesLayout:
|
|
41
|
-
partA.choicesLayout || (partA.verticalMode === false && 'horizontal') || defaults.partA.choicesLayout,
|
|
42
|
-
},
|
|
43
|
-
partB: {
|
|
44
|
-
...defaults.partB,
|
|
45
|
-
...partB,
|
|
46
|
-
choicesLayout:
|
|
47
|
-
partB.choicesLayout || (partB.verticalMode === false && 'horizontal') || defaults.partB.choicesLayout,
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
constructor() {
|
|
52
|
-
super();
|
|
53
|
-
this._root = null;
|
|
54
|
-
|
|
55
|
-
this._model = EbsrConfigure.createDefaultModel();
|
|
56
|
-
|
|
57
|
-
this._configuration = sensibleDefaults.configuration;
|
|
58
|
-
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
set model(m) {
|
|
62
|
-
this._model = EbsrConfigure.createDefaultModel(m, this._model);
|
|
63
|
-
|
|
64
|
-
this._render();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
dispatchModelUpdated(reset) {
|
|
68
|
-
const resetValue = !!reset;
|
|
69
|
-
|
|
70
|
-
this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
onModelChanged = (m, reset) => {
|
|
74
|
-
this._model = EbsrConfigure.createDefaultModel(m, this._model);
|
|
75
|
-
|
|
76
|
-
this.dispatchModelUpdated(reset);
|
|
77
|
-
this._render();
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
set configuration(c) {
|
|
81
|
-
const info = prepareCustomizationObject(c, this._model);
|
|
82
|
-
|
|
83
|
-
const newConfiguration = {
|
|
84
|
-
...sensibleDefaults.configuration,
|
|
85
|
-
...info.configuration,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
this._configuration = newConfiguration;
|
|
89
|
-
|
|
90
|
-
// if language:enabled is true, then the corresponding default item model should include a language value;
|
|
91
|
-
// if it is false, then the language field should be omitted from the item model.
|
|
92
|
-
// if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,
|
|
93
|
-
// then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).
|
|
94
|
-
if (newConfiguration?.language?.enabled) {
|
|
95
|
-
if (newConfiguration?.languageChoices?.options?.length) {
|
|
96
|
-
this._model.language = newConfiguration?.languageChoices.options[0].value;
|
|
97
|
-
}
|
|
98
|
-
} else if (newConfiguration.language.settings && this._model.language) {
|
|
99
|
-
this._configuration.language.enabled = true;
|
|
100
|
-
|
|
101
|
-
if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {
|
|
102
|
-
this._configuration.languageChoices.options = [];
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// check if the language is already included in the languageChoices.options array
|
|
106
|
-
// and if not, then add it.
|
|
107
|
-
if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) {
|
|
108
|
-
this._configuration.languageChoices.options.push({
|
|
109
|
-
value: this._model.language,
|
|
110
|
-
label: this._model.language,
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
} else {
|
|
114
|
-
delete this._model.language;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
this._render();
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
onConfigurationChanged(c) {
|
|
121
|
-
this._configuration = prepareCustomizationObject(c, this._model).configuration;
|
|
122
|
-
|
|
123
|
-
if (this._model) {
|
|
124
|
-
this.onModelChanged(this._model);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
this._render();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
onModelUpdated = (e) => {
|
|
131
|
-
if (e.target === this) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
e.preventDefault();
|
|
136
|
-
e.stopImmediatePropagation();
|
|
137
|
-
|
|
138
|
-
const id = e.target && e.target.getAttribute('id');
|
|
139
|
-
|
|
140
|
-
if (id) {
|
|
141
|
-
if (e.update) {
|
|
142
|
-
this._model[`part${id}`] = e.update;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
this.dispatchEvent(new ModelUpdatedEvent(this._model));
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
connectedCallback() {
|
|
150
|
-
this.addEventListener(MODEL_UPDATED, this.onModelUpdated);
|
|
151
|
-
this._render();
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
_render() {
|
|
155
|
-
let element = React.createElement(Main, {
|
|
156
|
-
model: this._model,
|
|
157
|
-
configuration: this._configuration,
|
|
158
|
-
onModelChanged: this.onModelChanged,
|
|
159
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
if (!this._root) {
|
|
163
|
-
this._root = createRoot(this);
|
|
164
|
-
}
|
|
165
|
-
this._root.render(element);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
disconnectedCallback() {
|
|
169
|
-
this.removeEventListener(MODEL_UPDATED, this.onModelUpdated);
|
|
170
|
-
if (this._root) {
|
|
171
|
-
this._root.unmount();
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
package/configure/src/main.jsx
DELETED
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { settings, layout } from '@pie-lib/config-ui';
|
|
4
|
-
import { styled } from '@mui/material/styles';
|
|
5
|
-
|
|
6
|
-
const { Panel, toggle, radio, dropdown } = settings;
|
|
7
|
-
|
|
8
|
-
const PartLabel = styled('div')(({ theme }) => ({
|
|
9
|
-
paddingBottom: theme.spacing(2),
|
|
10
|
-
}));
|
|
11
|
-
|
|
12
|
-
const Divider = styled('div')(({ theme }) => ({
|
|
13
|
-
flex: 1,
|
|
14
|
-
height: theme.spacing(2.5),
|
|
15
|
-
}));
|
|
16
|
-
|
|
17
|
-
export class Main extends React.Component {
|
|
18
|
-
static propTypes = {
|
|
19
|
-
configuration: PropTypes.object,
|
|
20
|
-
model: PropTypes.object,
|
|
21
|
-
onModelChanged: PropTypes.func,
|
|
22
|
-
onConfigurationChanged: PropTypes.func,
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
removeExtraChoices = (choices) => {
|
|
26
|
-
let correctFound = false;
|
|
27
|
-
|
|
28
|
-
return (choices || []).map((choice) => {
|
|
29
|
-
if (correctFound) {
|
|
30
|
-
choice.correct = false;
|
|
31
|
-
|
|
32
|
-
return choice;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (choice.correct) {
|
|
36
|
-
correctFound = true;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return choice;
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
onModelChanged = (model, key) => {
|
|
44
|
-
const { onModelChanged } = this.props;
|
|
45
|
-
|
|
46
|
-
if (key === 'partA.choiceMode' && model.partA.choiceMode === 'radio') {
|
|
47
|
-
model.partA.choices = this.removeExtraChoices(model.partA.choices);
|
|
48
|
-
|
|
49
|
-
return onModelChanged(model, true);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (key === 'partB.choiceMode' && model.partB.choiceMode === 'radio') {
|
|
53
|
-
model.partB.choices = this.removeExtraChoices(model.partB.choices);
|
|
54
|
-
|
|
55
|
-
return onModelChanged(model, true);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return onModelChanged(model);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
render() {
|
|
62
|
-
const { model, configuration, onConfigurationChanged } = this.props;
|
|
63
|
-
const { partLabelType, partA: modelPartA, partB: modelPartB, extraCSSRules } = model;
|
|
64
|
-
const {
|
|
65
|
-
contentDimensions = {},
|
|
66
|
-
partA = {},
|
|
67
|
-
partB = {},
|
|
68
|
-
partialScoring = {},
|
|
69
|
-
settingsPanelDisabled,
|
|
70
|
-
scoringType = {},
|
|
71
|
-
language = {},
|
|
72
|
-
languageChoices = {},
|
|
73
|
-
...generalConfiguration
|
|
74
|
-
} = configuration;
|
|
75
|
-
const {
|
|
76
|
-
feedback: feedbackA = {},
|
|
77
|
-
choiceMode: choiceModeA = {},
|
|
78
|
-
choicePrefix: choicePrefixA = {},
|
|
79
|
-
lockChoiceOrder: lockChoiceOrderA = {},
|
|
80
|
-
prompt: promptA = {},
|
|
81
|
-
teacherInstructions: teacherInstructionsA = {},
|
|
82
|
-
studentInstructions: studentInstructionsA = {},
|
|
83
|
-
choicesLayout: choicesLayoutA = {},
|
|
84
|
-
gridColumns: gridColumnsA = {},
|
|
85
|
-
rationale: rationaleA = {},
|
|
86
|
-
spellCheck: spellCheckA = {},
|
|
87
|
-
} = partA || {};
|
|
88
|
-
const {
|
|
89
|
-
feedback: feedbackB = {},
|
|
90
|
-
choiceMode: choiceModeB = {},
|
|
91
|
-
choicePrefix: choicePrefixB = {},
|
|
92
|
-
lockChoiceOrder: lockChoiceOrderB = {},
|
|
93
|
-
prompt: promptB = {},
|
|
94
|
-
teacherInstructions: teacherInstructionsB = {},
|
|
95
|
-
studentInstructions: studentInstructionsB = {},
|
|
96
|
-
choicesLayout: choicesLayoutB = {},
|
|
97
|
-
gridColumns: gridColumnsB = {},
|
|
98
|
-
rationale: rationaleB = {},
|
|
99
|
-
spellCheck: spellCheckB = {},
|
|
100
|
-
} = partB || {};
|
|
101
|
-
|
|
102
|
-
const type = partLabelType || 'Numbers';
|
|
103
|
-
const typeIsNumber = type === 'Numbers';
|
|
104
|
-
const firstPart = `Part ${typeIsNumber ? '1' : 'A'}`;
|
|
105
|
-
const secondPart = `Part ${typeIsNumber ? '2' : 'B'}`;
|
|
106
|
-
const nrOfColumnsAvailable = {
|
|
107
|
-
partA:
|
|
108
|
-
modelPartA.choices && modelPartA.choices.length
|
|
109
|
-
? Array.from({ length: modelPartA.choices.length }, (_, i) => `${i + 1}`)
|
|
110
|
-
: [],
|
|
111
|
-
partB:
|
|
112
|
-
modelPartB.choices && modelPartB.choices.length
|
|
113
|
-
? Array.from({ length: modelPartB.choices.length }, (_, i) => `${i + 1}`)
|
|
114
|
-
: [],
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const panelSettings = {
|
|
118
|
-
partLabels: generalConfiguration.partLabels.settings && toggle(generalConfiguration.partLabels.label),
|
|
119
|
-
partLabelType: model.partLabels && dropdown('', ['Numbers', 'Letters']),
|
|
120
|
-
partialScoring: partialScoring.settings && toggle(partialScoring.label),
|
|
121
|
-
scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),
|
|
122
|
-
'language.enabled': language.settings && toggle(language.label, true),
|
|
123
|
-
language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
const panelSettingsPartA = {
|
|
127
|
-
'partA.choiceMode': choiceModeA.settings && radio(choiceModeA.label, ['checkbox', 'radio']),
|
|
128
|
-
'partA.choicePrefix': choicePrefixA.settings && radio(choicePrefixA.label, ['numbers', 'letters']),
|
|
129
|
-
'partA.lockChoiceOrder': lockChoiceOrderA.settings && toggle(lockChoiceOrderA.label),
|
|
130
|
-
'partA.choicesLayout':
|
|
131
|
-
choicesLayoutA.settings && dropdown(choicesLayoutA.label, ['vertical', 'grid', 'horizontal']),
|
|
132
|
-
'partA.gridColumns':
|
|
133
|
-
choicesLayoutA.settings &&
|
|
134
|
-
modelPartA.choicesLayout === 'grid' &&
|
|
135
|
-
nrOfColumnsAvailable.partA.length > 0 &&
|
|
136
|
-
dropdown(gridColumnsA.label, nrOfColumnsAvailable.partA),
|
|
137
|
-
};
|
|
138
|
-
const panelPropertiesPartA = {
|
|
139
|
-
'partA.feedbackEnabled': feedbackA.settings && toggle(feedbackA.label),
|
|
140
|
-
'partA.promptEnabled': promptA.settings && toggle(promptA.label),
|
|
141
|
-
'partA.teacherInstructionsEnabled': teacherInstructionsA.settings && toggle(teacherInstructionsA.label),
|
|
142
|
-
'partA.studentInstructionsEnabled': studentInstructionsA.settings && toggle(studentInstructionsA.label),
|
|
143
|
-
'partA.rationaleEnabled': rationaleA.settings && toggle(rationaleA.label),
|
|
144
|
-
'partA.spellCheckEnabled': spellCheckA.settings && toggle(spellCheckA.label),
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const panelSettingsPartB = {
|
|
148
|
-
'partB.choiceMode': choiceModeB.settings && radio(choiceModeB.label, ['checkbox', 'radio']),
|
|
149
|
-
'partB.choicePrefix': choicePrefixB.settings && radio(choicePrefixB.label, ['numbers', 'letters']),
|
|
150
|
-
'partB.lockChoiceOrder': lockChoiceOrderB.settings && toggle(lockChoiceOrderB.label),
|
|
151
|
-
'partB.choicesLayout':
|
|
152
|
-
choicesLayoutB.settings && dropdown(choicesLayoutB.label, ['vertical', 'grid', 'horizontal']),
|
|
153
|
-
'partB.gridColumns':
|
|
154
|
-
choicesLayoutB.settings &&
|
|
155
|
-
modelPartB.choicesLayout === 'grid' &&
|
|
156
|
-
nrOfColumnsAvailable.partB.length > 0 &&
|
|
157
|
-
dropdown(gridColumnsB.label, nrOfColumnsAvailable.partB),
|
|
158
|
-
};
|
|
159
|
-
const panelPropertiesPartB = {
|
|
160
|
-
'partB.feedbackEnabled': feedbackB.settings && toggle(feedbackB.label),
|
|
161
|
-
'partB.promptEnabled': promptB.settings && toggle(promptB.label),
|
|
162
|
-
'partB.teacherInstructionsEnabled': teacherInstructionsB.settings && toggle(teacherInstructionsB.label),
|
|
163
|
-
'partB.studentInstructionsEnabled': studentInstructionsB.settings && toggle(studentInstructionsB.label),
|
|
164
|
-
'partB.rationaleEnabled': rationaleB.settings && toggle(rationaleB.label),
|
|
165
|
-
'partB.spellCheckEnabled': spellCheckB.settings && toggle(spellCheckB.label),
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
return (
|
|
169
|
-
<layout.ConfigLayout
|
|
170
|
-
extraCSSRules={extraCSSRules}
|
|
171
|
-
dimensions={contentDimensions}
|
|
172
|
-
hideSettings={settingsPanelDisabled}
|
|
173
|
-
settings={
|
|
174
|
-
<Panel
|
|
175
|
-
model={model}
|
|
176
|
-
onChangeModel={this.onModelChanged}
|
|
177
|
-
configuration={configuration}
|
|
178
|
-
onChangeConfiguration={onConfigurationChanged}
|
|
179
|
-
groups={{
|
|
180
|
-
'Settings for both': panelSettings,
|
|
181
|
-
[`Settings ${firstPart}`]: panelSettingsPartA,
|
|
182
|
-
[`Properties ${firstPart}`]: panelPropertiesPartA,
|
|
183
|
-
[`Settings ${secondPart}`]: panelSettingsPartB,
|
|
184
|
-
[`Properties ${secondPart}`]: panelPropertiesPartB,
|
|
185
|
-
}}
|
|
186
|
-
/>
|
|
187
|
-
}
|
|
188
|
-
>
|
|
189
|
-
{model.partLabels && <PartLabel>{firstPart}</PartLabel>}
|
|
190
|
-
<ebsr-multiple-choice-configure
|
|
191
|
-
id="A"
|
|
192
|
-
key="partA"
|
|
193
|
-
ref={(ref) => {
|
|
194
|
-
if (ref) {
|
|
195
|
-
// do not use destructuring to get model from props
|
|
196
|
-
this.partA = ref;
|
|
197
|
-
this.partA._model = {
|
|
198
|
-
...this.props.model.partA,
|
|
199
|
-
errors: (this.props.model.errors && this.props.model.errors.partA) || {},
|
|
200
|
-
};
|
|
201
|
-
this.partA.configuration = {
|
|
202
|
-
...partA,
|
|
203
|
-
...generalConfiguration,
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}}
|
|
207
|
-
/>
|
|
208
|
-
|
|
209
|
-
<Divider />
|
|
210
|
-
|
|
211
|
-
{model.partLabels && <PartLabel>{secondPart}</PartLabel>}
|
|
212
|
-
<ebsr-multiple-choice-configure
|
|
213
|
-
id="B"
|
|
214
|
-
key="partB"
|
|
215
|
-
ref={(ref) => {
|
|
216
|
-
if (ref) {
|
|
217
|
-
// do not use destructuring to get model from props
|
|
218
|
-
this.partB = ref;
|
|
219
|
-
this.partB._model = {
|
|
220
|
-
...this.props.model.partB,
|
|
221
|
-
errors: (this.props.model.errors && this.props.model.errors.partB) || {},
|
|
222
|
-
};
|
|
223
|
-
this.partB.configuration = {
|
|
224
|
-
...partB,
|
|
225
|
-
...generalConfiguration,
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
}}
|
|
229
|
-
/>
|
|
230
|
-
</layout.ConfigLayout>
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export default Main;
|