@pie-element/categorize 0.1.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/dist/author/defaults.d.ts +224 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +170 -0
- package/dist/author/design/builder.d.ts +11 -0
- package/dist/author/design/builder.d.ts.map +1 -0
- package/dist/author/design/builder.js +24 -0
- package/dist/author/design/buttons.d.ts +29 -0
- package/dist/author/design/buttons.d.ts.map +1 -0
- package/dist/author/design/buttons.js +36 -0
- package/dist/author/design/categories/RowLabel.d.ts +24 -0
- package/dist/author/design/categories/RowLabel.d.ts.map +1 -0
- package/dist/author/design/categories/RowLabel.js +46 -0
- package/dist/author/design/categories/alternateResponses.d.ts +32 -0
- package/dist/author/design/categories/alternateResponses.d.ts.map +1 -0
- package/dist/author/design/categories/alternateResponses.js +62 -0
- package/dist/author/design/categories/category.d.ts +45 -0
- package/dist/author/design/categories/category.d.ts.map +1 -0
- package/dist/author/design/categories/category.js +102 -0
- package/dist/author/design/categories/choice-preview.d.ts +26 -0
- package/dist/author/design/categories/choice-preview.d.ts.map +1 -0
- package/dist/author/design/categories/choice-preview.js +60 -0
- package/dist/author/design/categories/droppable-placeholder.d.ts +11 -0
- package/dist/author/design/categories/droppable-placeholder.d.ts.map +1 -0
- package/dist/author/design/categories/droppable-placeholder.js +70 -0
- package/dist/author/design/categories/index.d.ts +42 -0
- package/dist/author/design/categories/index.d.ts.map +1 -0
- package/dist/author/design/categories/index.js +146 -0
- package/dist/author/design/choices/choice.d.ts +11 -0
- package/dist/author/design/choices/choice.d.ts.map +1 -0
- package/dist/author/design/choices/choice.js +129 -0
- package/dist/author/design/choices/config.d.ts +22 -0
- package/dist/author/design/choices/config.d.ts.map +1 -0
- package/dist/author/design/choices/config.js +33 -0
- package/dist/author/design/choices/index.d.ts +42 -0
- package/dist/author/design/choices/index.d.ts.map +1 -0
- package/dist/author/design/choices/index.js +110 -0
- package/dist/author/design/header.d.ts +25 -0
- package/dist/author/design/header.d.ts.map +1 -0
- package/dist/author/design/header.js +49 -0
- package/dist/author/design/index.d.ts +53 -0
- package/dist/author/design/index.d.ts.map +1 -0
- package/dist/author/design/index.js +410 -0
- package/dist/author/design/input-header.d.ts +40 -0
- package/dist/author/design/input-header.d.ts.map +1 -0
- package/dist/author/design/input-header.js +69 -0
- package/dist/author/design/utils.d.ts +10 -0
- package/dist/author/design/utils.d.ts.map +1 -0
- package/dist/author/design/utils.js +7 -0
- package/dist/author/index.d.ts +52 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +87 -0
- package/dist/author/main.d.ts +24 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +30 -0
- package/dist/author/utils.d.ts +17 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +17 -0
- package/dist/controller/defaults.d.ts +35 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +29 -0
- package/dist/controller/index.d.ts +62 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +155 -0
- package/dist/controller/utils.d.ts +21 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +35 -0
- package/dist/delivery/categorize/categories.d.ts +35 -0
- package/dist/delivery/categorize/categories.d.ts.map +1 -0
- package/dist/delivery/categorize/categories.js +66 -0
- package/dist/delivery/categorize/category.d.ts +29 -0
- package/dist/delivery/categorize/category.d.ts.map +1 -0
- package/dist/delivery/categorize/category.js +48 -0
- package/dist/delivery/categorize/choice.d.ts +28 -0
- package/dist/delivery/categorize/choice.d.ts.map +1 -0
- package/dist/delivery/categorize/choice.js +94 -0
- package/dist/delivery/categorize/choices.d.ts +40 -0
- package/dist/delivery/categorize/choices.d.ts.map +1 -0
- package/dist/delivery/categorize/choices.js +51 -0
- package/dist/delivery/categorize/droppable-placeholder.d.ts +33 -0
- package/dist/delivery/categorize/droppable-placeholder.d.ts.map +1 -0
- package/dist/delivery/categorize/droppable-placeholder.js +64 -0
- package/dist/delivery/categorize/grid-content.d.ts +26 -0
- package/dist/delivery/categorize/grid-content.d.ts.map +1 -0
- package/dist/delivery/categorize/grid-content.js +39 -0
- package/dist/delivery/categorize/index.d.ts +58 -0
- package/dist/delivery/categorize/index.d.ts.map +1 -0
- package/dist/delivery/categorize/index.js +260 -0
- package/dist/delivery/index.d.ts +28 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +152 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +152 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/package.json +74 -0
- package/src/author/defaults.ts +182 -0
- package/src/author/design/builder.ts +63 -0
- package/src/author/design/buttons.tsx +60 -0
- package/src/author/design/categories/RowLabel.tsx +91 -0
- package/src/author/design/categories/alternateResponses.tsx +127 -0
- package/src/author/design/categories/category.tsx +161 -0
- package/src/author/design/categories/choice-preview.tsx +112 -0
- package/src/author/design/categories/droppable-placeholder.tsx +114 -0
- package/src/author/design/categories/index.tsx +254 -0
- package/src/author/design/choices/choice.tsx +200 -0
- package/src/author/design/choices/config.tsx +58 -0
- package/src/author/design/choices/index.tsx +185 -0
- package/src/author/design/header.tsx +74 -0
- package/src/author/design/index.tsx +764 -0
- package/src/author/design/input-header.tsx +109 -0
- package/src/author/design/utils.ts +14 -0
- package/src/author/index.ts +171 -0
- package/src/author/main.tsx +45 -0
- package/src/author/utils.ts +46 -0
- package/src/controller/defaults.ts +37 -0
- package/src/controller/index.ts +469 -0
- package/src/controller/utils.ts +79 -0
- package/src/delivery/categorize/categories.tsx +139 -0
- package/src/delivery/categorize/category.tsx +78 -0
- package/src/delivery/categorize/choice.tsx +117 -0
- package/src/delivery/categorize/choices.tsx +95 -0
- package/src/delivery/categorize/droppable-placeholder.tsx +95 -0
- package/src/delivery/categorize/grid-content.tsx +53 -0
- package/src/delivery/categorize/index.tsx +515 -0
- package/src/delivery/index.ts +390 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pie-element/categorize",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@dnd-kit/core": "6.3.1",
|
|
7
|
+
"@emotion/react": "^11.14.0",
|
|
8
|
+
"@emotion/style": "^0.8.0",
|
|
9
|
+
"@mui/icons-material": "^7.3.4",
|
|
10
|
+
"@mui/material": "^7.3.4",
|
|
11
|
+
"@pie-lib/categorize": "0.1.0",
|
|
12
|
+
"@pie-lib/config-ui": "0.1.0",
|
|
13
|
+
"@pie-lib/correct-answer-toggle": "0.1.0",
|
|
14
|
+
"@pie-lib/drag": "0.1.0",
|
|
15
|
+
"@pie-lib/render-ui": "0.1.0",
|
|
16
|
+
"@pie-lib/translator": "0.1.0",
|
|
17
|
+
"debug": "^4.1.1",
|
|
18
|
+
"lodash-es": "^4.17.23",
|
|
19
|
+
"prop-types": "^15.6.1",
|
|
20
|
+
"@pie-lib/editable-html-tip-tap": "0.1.0",
|
|
21
|
+
"@pie-element/shared-math-rendering-mathjax": "0.1.0",
|
|
22
|
+
"@pie-element/shared-configure-events": "0.1.0",
|
|
23
|
+
"@pie-element/shared-feedback": "0.1.0",
|
|
24
|
+
"@pie-element/shared-controller-utils": "0.1.0",
|
|
25
|
+
"@pie-element/shared-player-events": "0.1.0"
|
|
26
|
+
},
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^18.0.0",
|
|
29
|
+
"react-dom": "^18.0.0"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"development": "./src/index.ts",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"default": "./dist/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./delivery": {
|
|
38
|
+
"development": "./src/delivery/index.ts",
|
|
39
|
+
"types": "./dist/delivery/index.d.ts",
|
|
40
|
+
"default": "./dist/delivery/index.js"
|
|
41
|
+
},
|
|
42
|
+
"./author": {
|
|
43
|
+
"development": "./src/author/index.ts",
|
|
44
|
+
"types": "./dist/author/index.d.ts",
|
|
45
|
+
"default": "./dist/author/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./controller": {
|
|
48
|
+
"development": "./src/controller/index.ts",
|
|
49
|
+
"types": "./dist/controller/index.d.ts",
|
|
50
|
+
"default": "./dist/controller/index.js"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"type": "module",
|
|
54
|
+
"main": "./dist/index.js",
|
|
55
|
+
"types": "./dist/index.d.ts",
|
|
56
|
+
"files": [
|
|
57
|
+
"dist",
|
|
58
|
+
"src"
|
|
59
|
+
],
|
|
60
|
+
"sideEffects": false,
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"vite": "^8.0.1",
|
|
63
|
+
"typescript": "^5.9.3",
|
|
64
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
65
|
+
"@types/react": "^18.2.0",
|
|
66
|
+
"@types/react-dom": "^18.2.0"
|
|
67
|
+
},
|
|
68
|
+
"scripts": {
|
|
69
|
+
"build": "bun x vite build && bun x vite build --config vite.config.iife.ts && bun x tsc --emitDeclarationOnly",
|
|
70
|
+
"dev": "bun x vite",
|
|
71
|
+
"demo": "bun x vite --mode demo",
|
|
72
|
+
"test": "bun x vitest run"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/categorize/configure/src/defaults.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { multiplePlacements } from './utils.js';
|
|
12
|
+
|
|
13
|
+
export default {
|
|
14
|
+
model: {
|
|
15
|
+
allowAlternateEnabled: true,
|
|
16
|
+
allowMaxChoicesPerCategory: false,
|
|
17
|
+
allowMultiplePlacementsEnabled: multiplePlacements.enabled,
|
|
18
|
+
alternates: [],
|
|
19
|
+
categories: [],
|
|
20
|
+
categoriesPerRow: 2,
|
|
21
|
+
choices: [],
|
|
22
|
+
choicesLabel: '',
|
|
23
|
+
choicesPosition: 'below',
|
|
24
|
+
correctResponse: [],
|
|
25
|
+
feedbackEnabled: false,
|
|
26
|
+
lockChoiceOrder: true,
|
|
27
|
+
maxAnswerChoices: 6,
|
|
28
|
+
maxChoicesPerCategory: 0,
|
|
29
|
+
partialScoring: true,
|
|
30
|
+
promptEnabled: true,
|
|
31
|
+
rationaleEnabled: true,
|
|
32
|
+
rowLabels: [''],
|
|
33
|
+
studentInstructionsEnabled: true,
|
|
34
|
+
teacherInstructionsEnabled: true,
|
|
35
|
+
toolbarEditorPosition: 'bottom',
|
|
36
|
+
minRowHeight: '80px',
|
|
37
|
+
},
|
|
38
|
+
configuration: {
|
|
39
|
+
baseInputConfiguration: {
|
|
40
|
+
h3: { disabled: true },
|
|
41
|
+
audio: { disabled: false },
|
|
42
|
+
video: { disabled: false },
|
|
43
|
+
image: { disabled: false },
|
|
44
|
+
textAlign: { disabled: true },
|
|
45
|
+
showParagraphs: { disabled: false },
|
|
46
|
+
separateParagraphs: { disabled: true },
|
|
47
|
+
},
|
|
48
|
+
spellCheck: {
|
|
49
|
+
label: 'Spellcheck',
|
|
50
|
+
settings: false,
|
|
51
|
+
enabled: true,
|
|
52
|
+
},
|
|
53
|
+
feedback: {
|
|
54
|
+
settings: true,
|
|
55
|
+
label: 'Feedback',
|
|
56
|
+
enabled: true,
|
|
57
|
+
},
|
|
58
|
+
lockChoiceOrder: {
|
|
59
|
+
settings: true,
|
|
60
|
+
label: 'Lock Choice Order',
|
|
61
|
+
},
|
|
62
|
+
choicesPosition: {
|
|
63
|
+
settings: true,
|
|
64
|
+
label: 'Choices Position',
|
|
65
|
+
},
|
|
66
|
+
allowMultiplePlacements: {
|
|
67
|
+
settings: true,
|
|
68
|
+
label: 'Allow Multiple Placements',
|
|
69
|
+
},
|
|
70
|
+
maxPlacements: {
|
|
71
|
+
settings: true,
|
|
72
|
+
label: 'Max choices per category',
|
|
73
|
+
},
|
|
74
|
+
allowAlternate: {
|
|
75
|
+
settings: true,
|
|
76
|
+
label: 'Allow Alternate Correct Answers',
|
|
77
|
+
},
|
|
78
|
+
categoriesPerRow: {
|
|
79
|
+
settings: true,
|
|
80
|
+
label: 'Categories per row',
|
|
81
|
+
},
|
|
82
|
+
partialScoring: {
|
|
83
|
+
settings: false,
|
|
84
|
+
label: 'Allow Partial Scoring',
|
|
85
|
+
},
|
|
86
|
+
prompt: {
|
|
87
|
+
settings: true,
|
|
88
|
+
label: 'Prompt',
|
|
89
|
+
required: false,
|
|
90
|
+
inputConfiguration: {
|
|
91
|
+
audio: { disabled: false },
|
|
92
|
+
video: { disabled: false },
|
|
93
|
+
image: { disabled: false },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
rationale: {
|
|
97
|
+
settings: true,
|
|
98
|
+
label: 'Rationale',
|
|
99
|
+
required: false,
|
|
100
|
+
inputConfiguration: {
|
|
101
|
+
audio: { disabled: false },
|
|
102
|
+
video: { disabled: false },
|
|
103
|
+
image: { disabled: false },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
scoringType: {
|
|
107
|
+
settings: false,
|
|
108
|
+
label: 'Scoring Type',
|
|
109
|
+
},
|
|
110
|
+
settingsPanelDisabled: false,
|
|
111
|
+
studentInstructions: {
|
|
112
|
+
settings: false,
|
|
113
|
+
label: 'Student Instructions',
|
|
114
|
+
},
|
|
115
|
+
teacherInstructions: {
|
|
116
|
+
settings: true,
|
|
117
|
+
label: 'Teacher Instructions',
|
|
118
|
+
required: false,
|
|
119
|
+
inputConfiguration: {
|
|
120
|
+
audio: { disabled: false },
|
|
121
|
+
video: { disabled: false },
|
|
122
|
+
image: { disabled: false },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
headers: {
|
|
126
|
+
inputConfiguration: {
|
|
127
|
+
audio: { disabled: true },
|
|
128
|
+
video: { disabled: true },
|
|
129
|
+
image: { disabled: false },
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
rowLabels: {
|
|
133
|
+
inputConfiguration: {
|
|
134
|
+
audio: { disabled: false },
|
|
135
|
+
video: { disabled: false },
|
|
136
|
+
image: { disabled: false },
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
toolbarEditorPosition: {
|
|
140
|
+
settings: false,
|
|
141
|
+
label: 'Toolbar Editor Position',
|
|
142
|
+
},
|
|
143
|
+
maxImageWidth: {
|
|
144
|
+
teacherInstructions: 300,
|
|
145
|
+
prompt: 300,
|
|
146
|
+
rationale: 300,
|
|
147
|
+
rowLabel: 200,
|
|
148
|
+
categoryLabel: 260,
|
|
149
|
+
choices: 240,
|
|
150
|
+
},
|
|
151
|
+
maxImageHeight: {
|
|
152
|
+
teacherInstructions: 300,
|
|
153
|
+
prompt: 300,
|
|
154
|
+
rationale: 300,
|
|
155
|
+
rowLabel: 100,
|
|
156
|
+
categoryLabel: 100,
|
|
157
|
+
choices: 150,
|
|
158
|
+
},
|
|
159
|
+
withRubric: {
|
|
160
|
+
settings: false,
|
|
161
|
+
label: 'Add Rubric',
|
|
162
|
+
},
|
|
163
|
+
minCategoriesPerRow: 1,
|
|
164
|
+
allowMaxAnswerChoices: {
|
|
165
|
+
settings: true,
|
|
166
|
+
label: 'Max answer choices',
|
|
167
|
+
},
|
|
168
|
+
mathMlOptions: {
|
|
169
|
+
mmlOutput: false,
|
|
170
|
+
mmlEditing: false,
|
|
171
|
+
},
|
|
172
|
+
language: {
|
|
173
|
+
settings: false,
|
|
174
|
+
label: 'Specify Language',
|
|
175
|
+
enabled: false,
|
|
176
|
+
},
|
|
177
|
+
languageChoices: {
|
|
178
|
+
label: 'Language Choices',
|
|
179
|
+
options: [],
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/builder.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { cloneDeep } from 'lodash-es';
|
|
12
|
+
|
|
13
|
+
export const buildCategories = (categories, choices, correctResponse) => {
|
|
14
|
+
const clonedCategories = cloneDeep(categories);
|
|
15
|
+
|
|
16
|
+
return clonedCategories.map((category) => {
|
|
17
|
+
const cr = correctResponse.find((cr) => cr.category === category.id);
|
|
18
|
+
|
|
19
|
+
if (cr) {
|
|
20
|
+
category.choices = (cr.choices || []).map((choiceId) => {
|
|
21
|
+
const choice = choices.find((h) => h.id === choiceId);
|
|
22
|
+
if (choice) {
|
|
23
|
+
return Object.assign({}, { id: choice.id, content: choice.content });
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return category;
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const getChoices = (cat, choices, index) => {
|
|
33
|
+
if (!cat.alternateResponses || cat.alternateResponses.length === 0) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (cat.alternateResponses[index] || []).map((alt) => {
|
|
38
|
+
return choices.find((ch) => ch.id === alt);
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const buildAlternateResponses = (categories, choices, correctResponse) => {
|
|
43
|
+
const mostAlternates = correctResponse.reduce((mostAlt, cat) => {
|
|
44
|
+
if (cat.alternateResponses && cat.alternateResponses.length >= mostAlt) {
|
|
45
|
+
return cat.alternateResponses.length;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return mostAlt;
|
|
49
|
+
}, 0);
|
|
50
|
+
const alternatesArray = new Array(mostAlternates).fill(0);
|
|
51
|
+
|
|
52
|
+
return alternatesArray.map((val, index) => {
|
|
53
|
+
return correctResponse.map((cat, catIndex) => {
|
|
54
|
+
const currentCategory = categories[catIndex];
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
id: currentCategory.id,
|
|
58
|
+
label: currentCategory.label,
|
|
59
|
+
choices: getChoices(cat, choices, index),
|
|
60
|
+
};
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/buttons.jsx
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import Button from '@mui/material/Button';
|
|
15
|
+
|
|
16
|
+
const StyledAddButton: any = styled(Button)(({ theme }) => ({
|
|
17
|
+
height: theme.spacing(4),
|
|
18
|
+
}));
|
|
19
|
+
|
|
20
|
+
export class RawAddButton extends React.Component {
|
|
21
|
+
static propTypes = {
|
|
22
|
+
label: PropTypes.string,
|
|
23
|
+
onClick: PropTypes.func,
|
|
24
|
+
disabled: PropTypes.bool,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
static defaultProps = {
|
|
28
|
+
label: 'Add',
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
render() {
|
|
32
|
+
const { label, onClick, disabled } = this.props;
|
|
33
|
+
return (
|
|
34
|
+
<StyledAddButton
|
|
35
|
+
onClick={onClick}
|
|
36
|
+
disabled={disabled}
|
|
37
|
+
size="small"
|
|
38
|
+
variant="contained"
|
|
39
|
+
color="primary"
|
|
40
|
+
>
|
|
41
|
+
{label}
|
|
42
|
+
</StyledAddButton>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const AddButton = RawAddButton;
|
|
48
|
+
|
|
49
|
+
const StyledDeleteButton: any = styled(Button)({
|
|
50
|
+
margin: 0,
|
|
51
|
+
padding: 0,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const DeleteButton = ({ label, onClick, disabled }) => (
|
|
55
|
+
<StyledDeleteButton onClick={onClick} size="small" color="primary" disabled={disabled}>
|
|
56
|
+
{label}
|
|
57
|
+
</StyledDeleteButton>
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
export { AddButton, DeleteButton };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/RowLabel.jsx
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { getPluginProps } from '../utils.js';
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import EditableHtml from '@pie-lib/editable-html-tip-tap';
|
|
15
|
+
import { InputContainer as InputContainerImport } from '@pie-lib/render-ui';
|
|
16
|
+
|
|
17
|
+
function isRenderableReactInteropType(value: any) {
|
|
18
|
+
return (
|
|
19
|
+
typeof value === 'function' ||
|
|
20
|
+
(typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {
|
|
25
|
+
if (!maybeSymbol) return maybeSymbol;
|
|
26
|
+
if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;
|
|
27
|
+
if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;
|
|
28
|
+
if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {
|
|
29
|
+
return maybeSymbol[namedExport];
|
|
30
|
+
}
|
|
31
|
+
if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {
|
|
32
|
+
return maybeSymbol[namedExport].default;
|
|
33
|
+
}
|
|
34
|
+
return maybeSymbol;
|
|
35
|
+
}
|
|
36
|
+
const InputContainer = unwrapReactInteropSymbol(InputContainerImport, 'InputContainer') || unwrapReactInteropSymbol(renderUi.InputContainer, 'InputContainer');
|
|
37
|
+
import * as RenderUiNamespace from '@pie-lib/render-ui';
|
|
38
|
+
const renderUiNamespaceAny = RenderUiNamespace as any;
|
|
39
|
+
const renderUiDefaultMaybe = renderUiNamespaceAny['default'];
|
|
40
|
+
const renderUi =
|
|
41
|
+
renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'
|
|
42
|
+
? renderUiDefaultMaybe
|
|
43
|
+
: renderUiNamespaceAny;
|
|
44
|
+
const RowLabelContainer: any = styled(InputContainer)(({ theme }) => ({
|
|
45
|
+
paddingTop: theme.spacing(2),
|
|
46
|
+
width: '100%',
|
|
47
|
+
}));
|
|
48
|
+
|
|
49
|
+
export const RowLabel = ({
|
|
50
|
+
categoriesPerRow,
|
|
51
|
+
configuration,
|
|
52
|
+
disabled,
|
|
53
|
+
markup,
|
|
54
|
+
imageSupport,
|
|
55
|
+
onChange,
|
|
56
|
+
toolbarOpts,
|
|
57
|
+
spellCheck,
|
|
58
|
+
maxImageWidth,
|
|
59
|
+
maxImageHeight,
|
|
60
|
+
uploadSoundSupport,
|
|
61
|
+
mathMlOptions = {},
|
|
62
|
+
}) => {
|
|
63
|
+
const { rowLabels, baseInputConfiguration } = configuration;
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
style={{
|
|
68
|
+
gridColumn: `1/${categoriesPerRow + 1}`,
|
|
69
|
+
width: '100%',
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<RowLabelContainer label="Row Label">
|
|
73
|
+
<EditableHtml
|
|
74
|
+
disabled={disabled}
|
|
75
|
+
markup={markup}
|
|
76
|
+
onChange={onChange}
|
|
77
|
+
imageSupport={imageSupport}
|
|
78
|
+
nonEmpty={false}
|
|
79
|
+
toolbarOpts={toolbarOpts}
|
|
80
|
+
pluginProps={getPluginProps(rowLabels?.inputConfiguration, baseInputConfiguration)}
|
|
81
|
+
spellCheck={spellCheck}
|
|
82
|
+
maxImageWidth={maxImageWidth}
|
|
83
|
+
maxImageHeight={maxImageHeight}
|
|
84
|
+
uploadSoundSupport={uploadSoundSupport}
|
|
85
|
+
languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
|
|
86
|
+
mathMlOptions={mathMlOptions}
|
|
87
|
+
/>
|
|
88
|
+
</RowLabelContainer>
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/alternateResponses.jsx
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
|
+
import { styled } from '@mui/material/styles';
|
|
14
|
+
import { removeChoiceFromAlternate } from '@pie-lib/categorize';
|
|
15
|
+
|
|
16
|
+
import Category from './category.js';
|
|
17
|
+
|
|
18
|
+
const CategoriesContainer: any = styled('div')(({ theme }) => ({
|
|
19
|
+
marginBottom: theme.spacing(2.5),
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
const CategoriesHolder: any = styled('div')(({ theme }) => ({
|
|
23
|
+
display: 'grid',
|
|
24
|
+
gridRowGap: `${theme.spacing(1)}px`,
|
|
25
|
+
gridColumnGap: `${theme.spacing(1)}px`,
|
|
26
|
+
}));
|
|
27
|
+
|
|
28
|
+
const RowLabel: any = styled('div')({
|
|
29
|
+
gridColumn: '1 / 3',
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export class AlternateResponses extends React.Component {
|
|
33
|
+
static propTypes = {
|
|
34
|
+
altIndex: PropTypes.number.isRequired,
|
|
35
|
+
configuration: PropTypes.object,
|
|
36
|
+
imageSupport: PropTypes.shape({
|
|
37
|
+
add: PropTypes.func.isRequired,
|
|
38
|
+
delete: PropTypes.func.isRequired,
|
|
39
|
+
}),
|
|
40
|
+
categories: PropTypes.array,
|
|
41
|
+
onModelChanged: PropTypes.func,
|
|
42
|
+
model: PropTypes.object.isRequired,
|
|
43
|
+
uploadSoundSupport: PropTypes.shape({
|
|
44
|
+
add: PropTypes.func.isRequired,
|
|
45
|
+
delete: PropTypes.func.isRequired,
|
|
46
|
+
}),
|
|
47
|
+
spellCheck: PropTypes.bool,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
deleteChoiceFromCategory: any = (category, choice, choiceIndex) => {
|
|
52
|
+
const { model, altIndex, onModelChanged } = this.props;
|
|
53
|
+
|
|
54
|
+
const correctResponse = removeChoiceFromAlternate(
|
|
55
|
+
choice.id,
|
|
56
|
+
category.id,
|
|
57
|
+
choiceIndex,
|
|
58
|
+
altIndex,
|
|
59
|
+
model.correctResponse,
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
onModelChanged({ correctResponse });
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
render() {
|
|
66
|
+
const {
|
|
67
|
+
altIndex,
|
|
68
|
+
model,
|
|
69
|
+
configuration,
|
|
70
|
+
categories,
|
|
71
|
+
imageSupport,
|
|
72
|
+
spellCheck,
|
|
73
|
+
uploadSoundSupport,
|
|
74
|
+
mathMlOptions = {},
|
|
75
|
+
} = this.props;
|
|
76
|
+
const { categoriesPerRow, errors, rowLabels } = model;
|
|
77
|
+
const { duplicateAlternate } = errors || {};
|
|
78
|
+
|
|
79
|
+
const holderStyle = {
|
|
80
|
+
gridTemplateColumns: `repeat(${categoriesPerRow}, 1fr)`,
|
|
81
|
+
};
|
|
82
|
+
const isDuplicated = duplicateAlternate ? duplicateAlternate.index === altIndex : false;
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<CategoriesContainer>
|
|
86
|
+
<CategoriesHolder style={holderStyle}>
|
|
87
|
+
{categories.map((category, index) => {
|
|
88
|
+
const hasRowLabel = index % categoriesPerRow === 0;
|
|
89
|
+
const rowIndex = index / categoriesPerRow;
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<React.Fragment key={index}>
|
|
93
|
+
{hasRowLabel && (
|
|
94
|
+
<RowLabel
|
|
95
|
+
style={{
|
|
96
|
+
gridColumn: `1/${categoriesPerRow + 1}`,
|
|
97
|
+
width: '100%',
|
|
98
|
+
}}
|
|
99
|
+
dangerouslySetInnerHTML={{
|
|
100
|
+
__html: rowLabels[rowIndex] || '',
|
|
101
|
+
}}
|
|
102
|
+
/>
|
|
103
|
+
)}
|
|
104
|
+
|
|
105
|
+
<Category
|
|
106
|
+
key={index}
|
|
107
|
+
alternateResponseIndex={altIndex}
|
|
108
|
+
imageSupport={imageSupport}
|
|
109
|
+
isDuplicated={isDuplicated && duplicateAlternate.category === category.id}
|
|
110
|
+
category={category}
|
|
111
|
+
spellCheck={spellCheck}
|
|
112
|
+
onDeleteChoice={(choice, choiceIndex) => this.deleteChoiceFromCategory(category, choice, choiceIndex)}
|
|
113
|
+
uploadSoundSupport={uploadSoundSupport}
|
|
114
|
+
mathMlOptions={mathMlOptions}
|
|
115
|
+
configuration={configuration}
|
|
116
|
+
isAlternate={true}
|
|
117
|
+
/>
|
|
118
|
+
</React.Fragment>
|
|
119
|
+
);
|
|
120
|
+
})}
|
|
121
|
+
</CategoriesHolder>
|
|
122
|
+
</CategoriesContainer>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export default AlternateResponses;
|