@pie-element/categorize 13.1.0-next.28 → 13.1.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 +223 -0
- package/dist/author/defaults.js +170 -0
- package/dist/author/design/builder.d.ts +10 -0
- package/dist/author/design/builder.js +24 -0
- package/dist/author/design/buttons.d.ts +28 -0
- package/dist/author/design/buttons.js +36 -0
- package/dist/author/design/categories/RowLabel.d.ts +23 -0
- package/dist/author/design/categories/RowLabel.js +47 -0
- package/dist/author/design/categories/alternateResponses.d.ts +31 -0
- package/dist/author/design/categories/alternateResponses.js +62 -0
- package/dist/author/design/categories/category.d.ts +44 -0
- package/dist/author/design/categories/category.js +98 -0
- package/dist/author/design/categories/choice-preview.d.ts +25 -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.js +71 -0
- package/dist/author/design/categories/index.d.ts +41 -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.js +129 -0
- package/dist/author/design/choices/config.d.ts +21 -0
- package/dist/author/design/choices/config.js +33 -0
- package/dist/author/design/choices/index.d.ts +41 -0
- package/dist/author/design/choices/index.js +110 -0
- package/dist/author/design/header.d.ts +24 -0
- package/dist/author/design/header.js +49 -0
- package/dist/author/design/index.d.ts +52 -0
- package/dist/author/design/index.js +417 -0
- package/dist/author/design/input-header.d.ts +39 -0
- package/dist/author/design/input-header.js +69 -0
- package/dist/author/design/utils.d.ts +9 -0
- package/dist/author/design/utils.js +7 -0
- package/dist/author/index.d.ts +51 -0
- package/dist/author/index.js +87 -0
- package/dist/author/main.d.ts +23 -0
- package/dist/author/main.js +30 -0
- package/dist/author/utils.d.ts +16 -0
- package/dist/author/utils.js +17 -0
- package/dist/controller/defaults.d.ts +34 -0
- package/dist/controller/defaults.js +29 -0
- package/dist/controller/index.d.ts +61 -0
- package/dist/controller/index.js +155 -0
- package/dist/controller/utils.d.ts +20 -0
- package/dist/controller/utils.js +35 -0
- package/dist/delivery/categorize/categories.d.ts +34 -0
- package/dist/delivery/categorize/categories.js +66 -0
- package/dist/delivery/categorize/category.d.ts +28 -0
- package/dist/delivery/categorize/category.js +48 -0
- package/dist/delivery/categorize/choice.d.ts +27 -0
- package/dist/delivery/categorize/choice.js +94 -0
- package/dist/delivery/categorize/choices.d.ts +39 -0
- package/dist/delivery/categorize/choices.js +51 -0
- package/dist/delivery/categorize/droppable-placeholder.d.ts +32 -0
- package/dist/delivery/categorize/droppable-placeholder.js +64 -0
- package/dist/delivery/categorize/grid-content.d.ts +25 -0
- package/dist/delivery/categorize/grid-content.js +39 -0
- package/dist/delivery/categorize/index.d.ts +57 -0
- package/dist/delivery/categorize/index.js +260 -0
- package/dist/delivery/index.d.ts +27 -0
- package/dist/delivery/index.js +152 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +152 -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/_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/_arrayPush.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/_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/_baseTimes.js +7 -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/_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/_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/_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/_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/_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/_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/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/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/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/package.json +52 -16
- package/CHANGELOG.json +0 -1637
- package/CHANGELOG.md +0 -2524
- package/LICENSE.md +0 -5
- package/README.md +0 -5
- package/configure/CHANGELOG.json +0 -1202
- package/configure/CHANGELOG.md +0 -2107
- package/configure/lib/defaults.js +0 -222
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/design/builder.js +0 -55
- package/configure/lib/design/builder.js.map +0 -1
- package/configure/lib/design/buttons.js +0 -59
- package/configure/lib/design/buttons.js.map +0 -1
- package/configure/lib/design/categories/RowLabel.js +0 -66
- package/configure/lib/design/categories/RowLabel.js.map +0 -1
- package/configure/lib/design/categories/alternateResponses.js +0 -116
- package/configure/lib/design/categories/alternateResponses.js.map +0 -1
- package/configure/lib/design/categories/category.js +0 -153
- package/configure/lib/design/categories/category.js.map +0 -1
- package/configure/lib/design/categories/choice-preview.js +0 -79
- package/configure/lib/design/categories/choice-preview.js.map +0 -1
- package/configure/lib/design/categories/droppable-placeholder.js +0 -93
- package/configure/lib/design/categories/droppable-placeholder.js.map +0 -1
- package/configure/lib/design/categories/index.js +0 -256
- package/configure/lib/design/categories/index.js.map +0 -1
- package/configure/lib/design/choices/choice.js +0 -187
- package/configure/lib/design/choices/choice.js.map +0 -1
- package/configure/lib/design/choices/config.js +0 -58
- package/configure/lib/design/choices/config.js.map +0 -1
- package/configure/lib/design/choices/index.js +0 -197
- package/configure/lib/design/choices/index.js.map +0 -1
- package/configure/lib/design/header.js +0 -71
- package/configure/lib/design/header.js.map +0 -1
- package/configure/lib/design/index.js +0 -727
- package/configure/lib/design/index.js.map +0 -1
- package/configure/lib/design/input-header.js +0 -105
- package/configure/lib/design/input-header.js.map +0 -1
- package/configure/lib/design/utils.js +0 -12
- package/configure/lib/design/utils.js.map +0 -1
- package/configure/lib/index.js +0 -147
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -44
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/utils.js +0 -43
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -32
- package/controller/CHANGELOG.json +0 -452
- package/controller/CHANGELOG.md +0 -1366
- package/controller/lib/defaults.js +0 -33
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -479
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -69
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -18
- package/docs/config-schema.json +0 -2897
- package/docs/config-schema.json.md +0 -2138
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -357
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -12
- package/docs/pie-schema.json +0 -1784
- package/docs/pie-schema.json.md +0 -1046
- package/lib/categorize/categories.js +0 -135
- package/lib/categorize/categories.js.map +0 -1
- package/lib/categorize/category.js +0 -67
- package/lib/categorize/category.js.map +0 -1
- package/lib/categorize/choice.js +0 -140
- package/lib/categorize/choice.js.map +0 -1
- package/lib/categorize/choices.js +0 -99
- package/lib/categorize/choices.js.map +0 -1
- package/lib/categorize/droppable-placeholder.js +0 -84
- package/lib/categorize/droppable-placeholder.js.map +0 -1
- package/lib/categorize/grid-content.js +0 -55
- package/lib/categorize/grid-content.js.map +0 -1
- package/lib/categorize/index.js +0 -450
- package/lib/categorize/index.js.map +0 -1
- package/lib/index.js +0 -316
- package/lib/index.js.map +0 -1
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/defaults.js
|
|
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
|
+
declare const _default: {
|
|
10
|
+
model: {
|
|
11
|
+
allowAlternateEnabled: boolean;
|
|
12
|
+
allowMaxChoicesPerCategory: boolean;
|
|
13
|
+
allowMultiplePlacementsEnabled: string;
|
|
14
|
+
alternates: never[];
|
|
15
|
+
categories: never[];
|
|
16
|
+
categoriesPerRow: number;
|
|
17
|
+
choices: never[];
|
|
18
|
+
choicesLabel: string;
|
|
19
|
+
choicesPosition: string;
|
|
20
|
+
correctResponse: never[];
|
|
21
|
+
feedbackEnabled: boolean;
|
|
22
|
+
lockChoiceOrder: boolean;
|
|
23
|
+
maxAnswerChoices: number;
|
|
24
|
+
maxChoicesPerCategory: number;
|
|
25
|
+
partialScoring: boolean;
|
|
26
|
+
promptEnabled: boolean;
|
|
27
|
+
rationaleEnabled: boolean;
|
|
28
|
+
rowLabels: string[];
|
|
29
|
+
studentInstructionsEnabled: boolean;
|
|
30
|
+
teacherInstructionsEnabled: boolean;
|
|
31
|
+
toolbarEditorPosition: string;
|
|
32
|
+
minRowHeight: string;
|
|
33
|
+
};
|
|
34
|
+
configuration: {
|
|
35
|
+
baseInputConfiguration: {
|
|
36
|
+
h3: {
|
|
37
|
+
disabled: boolean;
|
|
38
|
+
};
|
|
39
|
+
audio: {
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
};
|
|
42
|
+
video: {
|
|
43
|
+
disabled: boolean;
|
|
44
|
+
};
|
|
45
|
+
image: {
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
};
|
|
48
|
+
textAlign: {
|
|
49
|
+
disabled: boolean;
|
|
50
|
+
};
|
|
51
|
+
showParagraphs: {
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
};
|
|
54
|
+
separateParagraphs: {
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
spellCheck: {
|
|
59
|
+
label: string;
|
|
60
|
+
settings: boolean;
|
|
61
|
+
enabled: boolean;
|
|
62
|
+
};
|
|
63
|
+
feedback: {
|
|
64
|
+
settings: boolean;
|
|
65
|
+
label: string;
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
};
|
|
68
|
+
lockChoiceOrder: {
|
|
69
|
+
settings: boolean;
|
|
70
|
+
label: string;
|
|
71
|
+
};
|
|
72
|
+
choicesPosition: {
|
|
73
|
+
settings: boolean;
|
|
74
|
+
label: string;
|
|
75
|
+
};
|
|
76
|
+
allowMultiplePlacements: {
|
|
77
|
+
settings: boolean;
|
|
78
|
+
label: string;
|
|
79
|
+
};
|
|
80
|
+
maxPlacements: {
|
|
81
|
+
settings: boolean;
|
|
82
|
+
label: string;
|
|
83
|
+
};
|
|
84
|
+
allowAlternate: {
|
|
85
|
+
settings: boolean;
|
|
86
|
+
label: string;
|
|
87
|
+
};
|
|
88
|
+
categoriesPerRow: {
|
|
89
|
+
settings: boolean;
|
|
90
|
+
label: string;
|
|
91
|
+
};
|
|
92
|
+
partialScoring: {
|
|
93
|
+
settings: boolean;
|
|
94
|
+
label: string;
|
|
95
|
+
};
|
|
96
|
+
prompt: {
|
|
97
|
+
settings: boolean;
|
|
98
|
+
label: string;
|
|
99
|
+
required: boolean;
|
|
100
|
+
inputConfiguration: {
|
|
101
|
+
audio: {
|
|
102
|
+
disabled: boolean;
|
|
103
|
+
};
|
|
104
|
+
video: {
|
|
105
|
+
disabled: boolean;
|
|
106
|
+
};
|
|
107
|
+
image: {
|
|
108
|
+
disabled: boolean;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
rationale: {
|
|
113
|
+
settings: boolean;
|
|
114
|
+
label: string;
|
|
115
|
+
required: boolean;
|
|
116
|
+
inputConfiguration: {
|
|
117
|
+
audio: {
|
|
118
|
+
disabled: boolean;
|
|
119
|
+
};
|
|
120
|
+
video: {
|
|
121
|
+
disabled: boolean;
|
|
122
|
+
};
|
|
123
|
+
image: {
|
|
124
|
+
disabled: boolean;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
scoringType: {
|
|
129
|
+
settings: boolean;
|
|
130
|
+
label: string;
|
|
131
|
+
};
|
|
132
|
+
settingsPanelDisabled: boolean;
|
|
133
|
+
studentInstructions: {
|
|
134
|
+
settings: boolean;
|
|
135
|
+
label: string;
|
|
136
|
+
};
|
|
137
|
+
teacherInstructions: {
|
|
138
|
+
settings: boolean;
|
|
139
|
+
label: string;
|
|
140
|
+
required: boolean;
|
|
141
|
+
inputConfiguration: {
|
|
142
|
+
audio: {
|
|
143
|
+
disabled: boolean;
|
|
144
|
+
};
|
|
145
|
+
video: {
|
|
146
|
+
disabled: boolean;
|
|
147
|
+
};
|
|
148
|
+
image: {
|
|
149
|
+
disabled: boolean;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
};
|
|
153
|
+
headers: {
|
|
154
|
+
inputConfiguration: {
|
|
155
|
+
audio: {
|
|
156
|
+
disabled: boolean;
|
|
157
|
+
};
|
|
158
|
+
video: {
|
|
159
|
+
disabled: boolean;
|
|
160
|
+
};
|
|
161
|
+
image: {
|
|
162
|
+
disabled: boolean;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
rowLabels: {
|
|
167
|
+
inputConfiguration: {
|
|
168
|
+
audio: {
|
|
169
|
+
disabled: boolean;
|
|
170
|
+
};
|
|
171
|
+
video: {
|
|
172
|
+
disabled: boolean;
|
|
173
|
+
};
|
|
174
|
+
image: {
|
|
175
|
+
disabled: boolean;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
toolbarEditorPosition: {
|
|
180
|
+
settings: boolean;
|
|
181
|
+
label: string;
|
|
182
|
+
};
|
|
183
|
+
maxImageWidth: {
|
|
184
|
+
teacherInstructions: number;
|
|
185
|
+
prompt: number;
|
|
186
|
+
rationale: number;
|
|
187
|
+
rowLabel: number;
|
|
188
|
+
categoryLabel: number;
|
|
189
|
+
choices: number;
|
|
190
|
+
};
|
|
191
|
+
maxImageHeight: {
|
|
192
|
+
teacherInstructions: number;
|
|
193
|
+
prompt: number;
|
|
194
|
+
rationale: number;
|
|
195
|
+
rowLabel: number;
|
|
196
|
+
categoryLabel: number;
|
|
197
|
+
choices: number;
|
|
198
|
+
};
|
|
199
|
+
withRubric: {
|
|
200
|
+
settings: boolean;
|
|
201
|
+
label: string;
|
|
202
|
+
};
|
|
203
|
+
minCategoriesPerRow: number;
|
|
204
|
+
allowMaxAnswerChoices: {
|
|
205
|
+
settings: boolean;
|
|
206
|
+
label: string;
|
|
207
|
+
};
|
|
208
|
+
mathMlOptions: {
|
|
209
|
+
mmlOutput: boolean;
|
|
210
|
+
mmlEditing: boolean;
|
|
211
|
+
};
|
|
212
|
+
language: {
|
|
213
|
+
settings: boolean;
|
|
214
|
+
label: string;
|
|
215
|
+
enabled: boolean;
|
|
216
|
+
};
|
|
217
|
+
languageChoices: {
|
|
218
|
+
label: string;
|
|
219
|
+
options: never[];
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
export default _default;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { multiplePlacements as e } from "./utils.js";
|
|
2
|
+
//#region src/author/defaults.ts
|
|
3
|
+
var t = {
|
|
4
|
+
model: {
|
|
5
|
+
allowAlternateEnabled: !0,
|
|
6
|
+
allowMaxChoicesPerCategory: !1,
|
|
7
|
+
allowMultiplePlacementsEnabled: e.enabled,
|
|
8
|
+
alternates: [],
|
|
9
|
+
categories: [],
|
|
10
|
+
categoriesPerRow: 2,
|
|
11
|
+
choices: [],
|
|
12
|
+
choicesLabel: "",
|
|
13
|
+
choicesPosition: "below",
|
|
14
|
+
correctResponse: [],
|
|
15
|
+
feedbackEnabled: !1,
|
|
16
|
+
lockChoiceOrder: !0,
|
|
17
|
+
maxAnswerChoices: 6,
|
|
18
|
+
maxChoicesPerCategory: 0,
|
|
19
|
+
partialScoring: !0,
|
|
20
|
+
promptEnabled: !0,
|
|
21
|
+
rationaleEnabled: !0,
|
|
22
|
+
rowLabels: [""],
|
|
23
|
+
studentInstructionsEnabled: !0,
|
|
24
|
+
teacherInstructionsEnabled: !0,
|
|
25
|
+
toolbarEditorPosition: "bottom",
|
|
26
|
+
minRowHeight: "80px"
|
|
27
|
+
},
|
|
28
|
+
configuration: {
|
|
29
|
+
baseInputConfiguration: {
|
|
30
|
+
h3: { disabled: !0 },
|
|
31
|
+
audio: { disabled: !1 },
|
|
32
|
+
video: { disabled: !1 },
|
|
33
|
+
image: { disabled: !1 },
|
|
34
|
+
textAlign: { disabled: !0 },
|
|
35
|
+
showParagraphs: { disabled: !1 },
|
|
36
|
+
separateParagraphs: { disabled: !0 }
|
|
37
|
+
},
|
|
38
|
+
spellCheck: {
|
|
39
|
+
label: "Spellcheck",
|
|
40
|
+
settings: !1,
|
|
41
|
+
enabled: !0
|
|
42
|
+
},
|
|
43
|
+
feedback: {
|
|
44
|
+
settings: !0,
|
|
45
|
+
label: "Feedback",
|
|
46
|
+
enabled: !0
|
|
47
|
+
},
|
|
48
|
+
lockChoiceOrder: {
|
|
49
|
+
settings: !0,
|
|
50
|
+
label: "Lock Choice Order"
|
|
51
|
+
},
|
|
52
|
+
choicesPosition: {
|
|
53
|
+
settings: !0,
|
|
54
|
+
label: "Choices Position"
|
|
55
|
+
},
|
|
56
|
+
allowMultiplePlacements: {
|
|
57
|
+
settings: !0,
|
|
58
|
+
label: "Allow Multiple Placements"
|
|
59
|
+
},
|
|
60
|
+
maxPlacements: {
|
|
61
|
+
settings: !0,
|
|
62
|
+
label: "Max choices per category"
|
|
63
|
+
},
|
|
64
|
+
allowAlternate: {
|
|
65
|
+
settings: !0,
|
|
66
|
+
label: "Allow Alternate Correct Answers"
|
|
67
|
+
},
|
|
68
|
+
categoriesPerRow: {
|
|
69
|
+
settings: !0,
|
|
70
|
+
label: "Categories per row"
|
|
71
|
+
},
|
|
72
|
+
partialScoring: {
|
|
73
|
+
settings: !1,
|
|
74
|
+
label: "Allow Partial Scoring"
|
|
75
|
+
},
|
|
76
|
+
prompt: {
|
|
77
|
+
settings: !0,
|
|
78
|
+
label: "Prompt",
|
|
79
|
+
required: !1,
|
|
80
|
+
inputConfiguration: {
|
|
81
|
+
audio: { disabled: !1 },
|
|
82
|
+
video: { disabled: !1 },
|
|
83
|
+
image: { disabled: !1 }
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
rationale: {
|
|
87
|
+
settings: !0,
|
|
88
|
+
label: "Rationale",
|
|
89
|
+
required: !1,
|
|
90
|
+
inputConfiguration: {
|
|
91
|
+
audio: { disabled: !1 },
|
|
92
|
+
video: { disabled: !1 },
|
|
93
|
+
image: { disabled: !1 }
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
scoringType: {
|
|
97
|
+
settings: !1,
|
|
98
|
+
label: "Scoring Type"
|
|
99
|
+
},
|
|
100
|
+
settingsPanelDisabled: !1,
|
|
101
|
+
studentInstructions: {
|
|
102
|
+
settings: !1,
|
|
103
|
+
label: "Student Instructions"
|
|
104
|
+
},
|
|
105
|
+
teacherInstructions: {
|
|
106
|
+
settings: !0,
|
|
107
|
+
label: "Teacher Instructions",
|
|
108
|
+
required: !1,
|
|
109
|
+
inputConfiguration: {
|
|
110
|
+
audio: { disabled: !1 },
|
|
111
|
+
video: { disabled: !1 },
|
|
112
|
+
image: { disabled: !1 }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
headers: { inputConfiguration: {
|
|
116
|
+
audio: { disabled: !0 },
|
|
117
|
+
video: { disabled: !0 },
|
|
118
|
+
image: { disabled: !1 }
|
|
119
|
+
} },
|
|
120
|
+
rowLabels: { inputConfiguration: {
|
|
121
|
+
audio: { disabled: !1 },
|
|
122
|
+
video: { disabled: !1 },
|
|
123
|
+
image: { disabled: !1 }
|
|
124
|
+
} },
|
|
125
|
+
toolbarEditorPosition: {
|
|
126
|
+
settings: !1,
|
|
127
|
+
label: "Toolbar Editor Position"
|
|
128
|
+
},
|
|
129
|
+
maxImageWidth: {
|
|
130
|
+
teacherInstructions: 300,
|
|
131
|
+
prompt: 300,
|
|
132
|
+
rationale: 300,
|
|
133
|
+
rowLabel: 200,
|
|
134
|
+
categoryLabel: 260,
|
|
135
|
+
choices: 240
|
|
136
|
+
},
|
|
137
|
+
maxImageHeight: {
|
|
138
|
+
teacherInstructions: 300,
|
|
139
|
+
prompt: 300,
|
|
140
|
+
rationale: 300,
|
|
141
|
+
rowLabel: 100,
|
|
142
|
+
categoryLabel: 100,
|
|
143
|
+
choices: 150
|
|
144
|
+
},
|
|
145
|
+
withRubric: {
|
|
146
|
+
settings: !1,
|
|
147
|
+
label: "Add Rubric"
|
|
148
|
+
},
|
|
149
|
+
minCategoriesPerRow: 1,
|
|
150
|
+
allowMaxAnswerChoices: {
|
|
151
|
+
settings: !0,
|
|
152
|
+
label: "Max answer choices"
|
|
153
|
+
},
|
|
154
|
+
mathMlOptions: {
|
|
155
|
+
mmlOutput: !1,
|
|
156
|
+
mmlEditing: !1
|
|
157
|
+
},
|
|
158
|
+
language: {
|
|
159
|
+
settings: !1,
|
|
160
|
+
label: "Specify Language",
|
|
161
|
+
enabled: !1
|
|
162
|
+
},
|
|
163
|
+
languageChoices: {
|
|
164
|
+
label: "Language Choices",
|
|
165
|
+
options: []
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
//#endregion
|
|
170
|
+
export { t as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/builder.js
|
|
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
|
+
export declare const buildCategories: (categories: any, choices: any, correctResponse: any) => any;
|
|
10
|
+
export declare const buildAlternateResponses: (categories: any, choices: any, correctResponse: any) => any[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import e from "../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
|
|
2
|
+
//#region src/author/design/builder.ts
|
|
3
|
+
var t = (t, n, r) => e(t).map((e) => {
|
|
4
|
+
let t = r.find((t) => t.category === e.id);
|
|
5
|
+
return t && (e.choices = (t.choices || []).map((e) => {
|
|
6
|
+
let t = n.find((t) => t.id === e);
|
|
7
|
+
if (t) return Object.assign({}, {
|
|
8
|
+
id: t.id,
|
|
9
|
+
content: t.content
|
|
10
|
+
});
|
|
11
|
+
})), e;
|
|
12
|
+
}), n = (e, t, n) => !e.alternateResponses || e.alternateResponses.length === 0 ? [] : (e.alternateResponses[n] || []).map((e) => t.find((t) => t.id === e)), r = (e, t, r) => {
|
|
13
|
+
let i = r.reduce((e, t) => t.alternateResponses && t.alternateResponses.length >= e ? t.alternateResponses.length : e, 0);
|
|
14
|
+
return Array(i).fill(0).map((i, a) => r.map((r, i) => {
|
|
15
|
+
let o = e[i];
|
|
16
|
+
return {
|
|
17
|
+
id: o.id,
|
|
18
|
+
label: o.label,
|
|
19
|
+
choices: n(r, t, a)
|
|
20
|
+
};
|
|
21
|
+
}));
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { r as buildAlternateResponses, t as buildCategories };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/buttons.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 RawAddButton extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
label: PropTypes.Requireable<string>;
|
|
14
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
16
|
+
};
|
|
17
|
+
static defaultProps: {
|
|
18
|
+
label: string;
|
|
19
|
+
};
|
|
20
|
+
render(): React.JSX.Element;
|
|
21
|
+
}
|
|
22
|
+
declare const AddButton: typeof RawAddButton;
|
|
23
|
+
declare const DeleteButton: ({ label, onClick, disabled }: {
|
|
24
|
+
label: any;
|
|
25
|
+
onClick: any;
|
|
26
|
+
disabled: any;
|
|
27
|
+
}) => React.JSX.Element;
|
|
28
|
+
export { AddButton, DeleteButton };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { styled as n } from "@mui/material/styles";
|
|
4
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import i from "@mui/material/Button";
|
|
6
|
+
//#region src/author/design/buttons.tsx
|
|
7
|
+
var a = n(i)(({ theme: e }) => ({ height: e.spacing(4) })), o = class extends e.Component {
|
|
8
|
+
static propTypes = {
|
|
9
|
+
label: t.string,
|
|
10
|
+
onClick: t.func,
|
|
11
|
+
disabled: t.bool
|
|
12
|
+
};
|
|
13
|
+
static defaultProps = { label: "Add" };
|
|
14
|
+
render() {
|
|
15
|
+
let { label: e, onClick: t, disabled: n } = this.props;
|
|
16
|
+
return /* @__PURE__ */ r(a, {
|
|
17
|
+
onClick: t,
|
|
18
|
+
disabled: n,
|
|
19
|
+
size: "small",
|
|
20
|
+
variant: "contained",
|
|
21
|
+
color: "primary",
|
|
22
|
+
children: e
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}, s = n(i)({
|
|
26
|
+
margin: 0,
|
|
27
|
+
padding: 0
|
|
28
|
+
}), c = ({ label: e, onClick: t, disabled: n }) => /* @__PURE__ */ r(s, {
|
|
29
|
+
onClick: t,
|
|
30
|
+
size: "small",
|
|
31
|
+
color: "primary",
|
|
32
|
+
disabled: n,
|
|
33
|
+
children: e
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { o as AddButton, c as DeleteButton };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/RowLabel.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
|
+
export declare const RowLabel: ({ categoriesPerRow, configuration, disabled, markup, imageSupport, onChange, toolbarOpts, spellCheck, maxImageWidth, maxImageHeight, uploadSoundSupport, mathMlOptions, }: {
|
|
11
|
+
categoriesPerRow: any;
|
|
12
|
+
configuration: any;
|
|
13
|
+
disabled: any;
|
|
14
|
+
markup: any;
|
|
15
|
+
imageSupport: any;
|
|
16
|
+
onChange: any;
|
|
17
|
+
toolbarOpts: any;
|
|
18
|
+
spellCheck: any;
|
|
19
|
+
maxImageWidth: any;
|
|
20
|
+
maxImageHeight: any;
|
|
21
|
+
uploadSoundSupport: any;
|
|
22
|
+
mathMlOptions?: {} | undefined;
|
|
23
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getPluginProps as e } from "../utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import * as t from "@pie-lib/render-ui";
|
|
4
|
+
import { InputContainer as n } from "@pie-lib/render-ui";
|
|
5
|
+
import { styled as r } from "@mui/material/styles";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
import a from "@pie-lib/editable-html-tip-tap";
|
|
8
|
+
//#region src/author/design/categories/RowLabel.tsx
|
|
9
|
+
function o(e) {
|
|
10
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
11
|
+
}
|
|
12
|
+
function s(e, t) {
|
|
13
|
+
return !e || o(e) ? e : o(e.default) ? e.default : t && o(e[t]) ? e[t] : t && o(e[t]?.default) ? e[t].default : e;
|
|
14
|
+
}
|
|
15
|
+
var c = s(n, "InputContainer") || s(d.InputContainer, "InputContainer"), l = t, u = l.default, d = u && typeof u == "object" ? u : l, f = r(c)(({ theme: e }) => ({
|
|
16
|
+
width: "100%",
|
|
17
|
+
paddingTop: e.spacing(1),
|
|
18
|
+
marginTop: e.spacing(1)
|
|
19
|
+
})), p = ({ categoriesPerRow: t, configuration: n, disabled: r, markup: o, imageSupport: s, onChange: c, toolbarOpts: l, spellCheck: u, maxImageWidth: d, maxImageHeight: p, uploadSoundSupport: m, mathMlOptions: h = {} }) => {
|
|
20
|
+
let { rowLabels: g, baseInputConfiguration: _ } = n;
|
|
21
|
+
return /* @__PURE__ */ i("div", {
|
|
22
|
+
style: {
|
|
23
|
+
gridColumn: `1/${t + 1}`,
|
|
24
|
+
width: "100%"
|
|
25
|
+
},
|
|
26
|
+
children: /* @__PURE__ */ i(f, {
|
|
27
|
+
label: "Row Label",
|
|
28
|
+
children: /* @__PURE__ */ i(a, {
|
|
29
|
+
disabled: r,
|
|
30
|
+
markup: o,
|
|
31
|
+
onChange: c,
|
|
32
|
+
imageSupport: s,
|
|
33
|
+
nonEmpty: !1,
|
|
34
|
+
toolbarOpts: l,
|
|
35
|
+
pluginProps: e(g?.inputConfiguration, _),
|
|
36
|
+
spellCheck: u,
|
|
37
|
+
maxImageWidth: d,
|
|
38
|
+
maxImageHeight: p,
|
|
39
|
+
uploadSoundSupport: m,
|
|
40
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41
|
+
mathMlOptions: h
|
|
42
|
+
})
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { p as RowLabel };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/alternateResponses.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 AlternateResponses extends React.Component {
|
|
12
|
+
static propTypes: {
|
|
13
|
+
altIndex: PropTypes.Validator<number>;
|
|
14
|
+
configuration: PropTypes.Requireable<object>;
|
|
15
|
+
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
16
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
}>>;
|
|
19
|
+
categories: PropTypes.Requireable<any[]>;
|
|
20
|
+
onModelChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
|
+
model: PropTypes.Validator<object>;
|
|
22
|
+
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
23
|
+
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
24
|
+
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
+
}>>;
|
|
26
|
+
spellCheck: PropTypes.Requireable<boolean>;
|
|
27
|
+
};
|
|
28
|
+
deleteChoiceFromCategory: any;
|
|
29
|
+
render(): React.JSX.Element;
|
|
30
|
+
}
|
|
31
|
+
export default AlternateResponses;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import e from "./category.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import n from "prop-types";
|
|
4
|
+
import { styled as r } from "@mui/material/styles";
|
|
5
|
+
import { removeChoiceFromAlternate as i } from "@pie-lib/categorize";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
//#region src/author/design/categories/alternateResponses.tsx
|
|
8
|
+
var s = r("div")(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), c = r("div")(({ theme: e }) => ({
|
|
9
|
+
display: "grid",
|
|
10
|
+
gridRowGap: e.spacing(1),
|
|
11
|
+
gridColumnGap: e.spacing(1)
|
|
12
|
+
})), l = r("div")({ gridColumn: "1 / 3" }), u = class extends t.Component {
|
|
13
|
+
static propTypes = {
|
|
14
|
+
altIndex: n.number.isRequired,
|
|
15
|
+
configuration: n.object,
|
|
16
|
+
imageSupport: n.shape({
|
|
17
|
+
add: n.func.isRequired,
|
|
18
|
+
delete: n.func.isRequired
|
|
19
|
+
}),
|
|
20
|
+
categories: n.array,
|
|
21
|
+
onModelChanged: n.func,
|
|
22
|
+
model: n.object.isRequired,
|
|
23
|
+
uploadSoundSupport: n.shape({
|
|
24
|
+
add: n.func.isRequired,
|
|
25
|
+
delete: n.func.isRequired
|
|
26
|
+
}),
|
|
27
|
+
spellCheck: n.bool
|
|
28
|
+
};
|
|
29
|
+
deleteChoiceFromCategory = (e, t, n) => {
|
|
30
|
+
let { model: r, altIndex: a, onModelChanged: o } = this.props;
|
|
31
|
+
o({ correctResponse: i(t.id, e.id, n, a, r.correctResponse) });
|
|
32
|
+
};
|
|
33
|
+
render() {
|
|
34
|
+
let { altIndex: n, model: r, configuration: i, categories: u, imageSupport: d, spellCheck: f, uploadSoundSupport: p, mathMlOptions: m = {} } = this.props, { categoriesPerRow: h, errors: g, rowLabels: _ } = r, { duplicateAlternate: v } = g || {}, y = { gridTemplateColumns: `repeat(${h}, 1fr)` }, b = v ? v.index === n : !1;
|
|
35
|
+
return /* @__PURE__ */ a(s, { children: /* @__PURE__ */ a(c, {
|
|
36
|
+
style: y,
|
|
37
|
+
children: u.map((r, s) => {
|
|
38
|
+
let c = s % h === 0, u = s / h;
|
|
39
|
+
return /* @__PURE__ */ o(t.Fragment, { children: [c && /* @__PURE__ */ a(l, {
|
|
40
|
+
style: {
|
|
41
|
+
gridColumn: `1/${h + 1}`,
|
|
42
|
+
width: "100%"
|
|
43
|
+
},
|
|
44
|
+
dangerouslySetInnerHTML: { __html: _[u] || "" }
|
|
45
|
+
}), /* @__PURE__ */ a(e, {
|
|
46
|
+
alternateResponseIndex: n,
|
|
47
|
+
imageSupport: d,
|
|
48
|
+
isDuplicated: b && v.category === r.id,
|
|
49
|
+
category: r,
|
|
50
|
+
spellCheck: f,
|
|
51
|
+
onDeleteChoice: (e, t) => this.deleteChoiceFromCategory(r, e, t),
|
|
52
|
+
uploadSoundSupport: p,
|
|
53
|
+
mathMlOptions: m,
|
|
54
|
+
configuration: i,
|
|
55
|
+
isAlternate: !0
|
|
56
|
+
}, s)] }, s);
|
|
57
|
+
})
|
|
58
|
+
}) });
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { u as default };
|