@pie-element/categorize 13.1.1-next.1 → 13.1.1-next.29
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/CHANGELOG.json +1637 -0
- package/CHANGELOG.md +2532 -0
- package/LICENSE.md +5 -0
- package/README.md +5 -0
- package/configure/CHANGELOG.json +1202 -0
- package/configure/CHANGELOG.md +2115 -0
- package/configure/lib/defaults.js +222 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/design/builder.js +55 -0
- package/configure/lib/design/builder.js.map +1 -0
- package/configure/lib/design/buttons.js +59 -0
- package/configure/lib/design/buttons.js.map +1 -0
- package/configure/lib/design/categories/RowLabel.js +66 -0
- package/configure/lib/design/categories/RowLabel.js.map +1 -0
- package/configure/lib/design/categories/alternateResponses.js +116 -0
- package/configure/lib/design/categories/alternateResponses.js.map +1 -0
- package/configure/lib/design/categories/category.js +153 -0
- package/configure/lib/design/categories/category.js.map +1 -0
- package/configure/lib/design/categories/choice-preview.js +79 -0
- package/configure/lib/design/categories/choice-preview.js.map +1 -0
- package/configure/lib/design/categories/droppable-placeholder.js +93 -0
- package/configure/lib/design/categories/droppable-placeholder.js.map +1 -0
- package/configure/lib/design/categories/index.js +256 -0
- package/configure/lib/design/categories/index.js.map +1 -0
- package/configure/lib/design/choices/choice.js +187 -0
- package/configure/lib/design/choices/choice.js.map +1 -0
- package/configure/lib/design/choices/config.js +58 -0
- package/configure/lib/design/choices/config.js.map +1 -0
- package/configure/lib/design/choices/index.js +197 -0
- package/configure/lib/design/choices/index.js.map +1 -0
- package/configure/lib/design/header.js +71 -0
- package/configure/lib/design/header.js.map +1 -0
- package/configure/lib/design/index.js +727 -0
- package/configure/lib/design/index.js.map +1 -0
- package/configure/lib/design/input-header.js +105 -0
- package/configure/lib/design/input-header.js.map +1 -0
- package/configure/lib/design/utils.js +12 -0
- package/configure/lib/design/utils.js.map +1 -0
- package/configure/lib/index.js +147 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +44 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/lib/utils.js +43 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +32 -0
- package/controller/CHANGELOG.json +452 -0
- package/controller/CHANGELOG.md +1373 -0
- package/controller/lib/defaults.js +33 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +493 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/utils.js +69 -0
- package/controller/lib/utils.js.map +1 -0
- package/controller/package.json +18 -0
- package/docs/config-schema.json +2897 -0
- package/docs/config-schema.json.md +2138 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +357 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +12 -0
- package/docs/pie-schema.json +1784 -0
- package/docs/pie-schema.json.md +1046 -0
- package/lib/categorize/categories.js +135 -0
- package/lib/categorize/categories.js.map +1 -0
- package/lib/categorize/category.js +67 -0
- package/lib/categorize/category.js.map +1 -0
- package/lib/categorize/choice.js +140 -0
- package/lib/categorize/choice.js.map +1 -0
- package/lib/categorize/choices.js +99 -0
- package/lib/categorize/choices.js.map +1 -0
- package/lib/categorize/droppable-placeholder.js +84 -0
- package/lib/categorize/droppable-placeholder.js.map +1 -0
- package/lib/categorize/grid-content.js +55 -0
- package/lib/categorize/grid-content.js.map +1 -0
- package/lib/categorize/index.js +450 -0
- package/lib/categorize/index.js.map +1 -0
- package/lib/index.js +316 -0
- package/lib/index.js.map +1 -0
- package/package.json +21 -57
- package/dist/author/defaults.d.ts +0 -223
- package/dist/author/defaults.js +0 -170
- package/dist/author/design/builder.d.ts +0 -10
- package/dist/author/design/builder.js +0 -24
- package/dist/author/design/buttons.d.ts +0 -28
- package/dist/author/design/buttons.js +0 -36
- package/dist/author/design/categories/RowLabel.d.ts +0 -23
- package/dist/author/design/categories/RowLabel.js +0 -47
- package/dist/author/design/categories/alternateResponses.d.ts +0 -31
- package/dist/author/design/categories/alternateResponses.js +0 -62
- package/dist/author/design/categories/category.d.ts +0 -44
- package/dist/author/design/categories/category.js +0 -98
- package/dist/author/design/categories/choice-preview.d.ts +0 -25
- package/dist/author/design/categories/choice-preview.js +0 -60
- package/dist/author/design/categories/droppable-placeholder.d.ts +0 -11
- package/dist/author/design/categories/droppable-placeholder.js +0 -71
- package/dist/author/design/categories/index.d.ts +0 -41
- package/dist/author/design/categories/index.js +0 -146
- package/dist/author/design/choices/choice.d.ts +0 -11
- package/dist/author/design/choices/choice.js +0 -129
- package/dist/author/design/choices/config.d.ts +0 -21
- package/dist/author/design/choices/config.js +0 -33
- package/dist/author/design/choices/index.d.ts +0 -41
- package/dist/author/design/choices/index.js +0 -110
- package/dist/author/design/header.d.ts +0 -24
- package/dist/author/design/header.js +0 -49
- package/dist/author/design/index.d.ts +0 -52
- package/dist/author/design/index.js +0 -417
- package/dist/author/design/input-header.d.ts +0 -39
- package/dist/author/design/input-header.js +0 -69
- package/dist/author/design/utils.d.ts +0 -9
- package/dist/author/design/utils.js +0 -7
- package/dist/author/index.d.ts +0 -51
- package/dist/author/index.js +0 -87
- package/dist/author/main.d.ts +0 -23
- package/dist/author/main.js +0 -30
- package/dist/author/utils.d.ts +0 -16
- package/dist/author/utils.js +0 -17
- package/dist/controller/defaults.d.ts +0 -34
- package/dist/controller/defaults.js +0 -29
- package/dist/controller/index.d.ts +0 -61
- package/dist/controller/index.js +0 -155
- package/dist/controller/utils.d.ts +0 -20
- package/dist/controller/utils.js +0 -35
- package/dist/delivery/categorize/categories.d.ts +0 -34
- package/dist/delivery/categorize/categories.js +0 -66
- package/dist/delivery/categorize/category.d.ts +0 -28
- package/dist/delivery/categorize/category.js +0 -48
- package/dist/delivery/categorize/choice.d.ts +0 -27
- package/dist/delivery/categorize/choice.js +0 -94
- package/dist/delivery/categorize/choices.d.ts +0 -39
- package/dist/delivery/categorize/choices.js +0 -51
- package/dist/delivery/categorize/droppable-placeholder.d.ts +0 -32
- package/dist/delivery/categorize/droppable-placeholder.js +0 -64
- package/dist/delivery/categorize/grid-content.d.ts +0 -25
- package/dist/delivery/categorize/grid-content.js +0 -39
- package/dist/delivery/categorize/index.d.ts +0 -57
- package/dist/delivery/categorize/index.js +0 -260
- package/dist/delivery/index.d.ts +0 -27
- package/dist/delivery/index.js +0 -152
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -152
- package/dist/index.js +0 -2
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
package/dist/author/defaults.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
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 };
|
|
@@ -1,10 +0,0 @@
|
|
|
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[];
|
|
@@ -1,24 +0,0 @@
|
|
|
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 };
|
|
@@ -1,28 +0,0 @@
|
|
|
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 };
|
|
@@ -1,36 +0,0 @@
|
|
|
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 };
|
|
@@ -1,23 +0,0 @@
|
|
|
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;
|
|
@@ -1,47 +0,0 @@
|
|
|
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 };
|
|
@@ -1,31 +0,0 @@
|
|
|
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;
|
|
@@ -1,62 +0,0 @@
|
|
|
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 };
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/category.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 Category extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
alternateResponseIndex: PropTypes.Requireable<number>;
|
|
14
|
-
category: PropTypes.Validator<object>;
|
|
15
|
-
configuration: PropTypes.Validator<object>;
|
|
16
|
-
defaultImageMaxHeight: PropTypes.Requireable<number>;
|
|
17
|
-
defaultImageMaxWidth: PropTypes.Requireable<number>;
|
|
18
|
-
deleteFocusedEl: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
-
focusedEl: PropTypes.Requireable<number>;
|
|
20
|
-
index: PropTypes.Requireable<number>;
|
|
21
|
-
error: PropTypes.Requireable<string>;
|
|
22
|
-
isDuplicated: PropTypes.Requireable<boolean>;
|
|
23
|
-
maxImageWidth: PropTypes.Requireable<object>;
|
|
24
|
-
maxImageHeight: PropTypes.Requireable<object>;
|
|
25
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
26
|
-
onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
onDeleteChoice: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
-
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
29
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
31
|
-
}>>;
|
|
32
|
-
toolbarOpts: PropTypes.Requireable<object>;
|
|
33
|
-
spellCheck: PropTypes.Requireable<boolean>;
|
|
34
|
-
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
35
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
36
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
37
|
-
}>>;
|
|
38
|
-
isAlternate: PropTypes.Requireable<boolean>;
|
|
39
|
-
};
|
|
40
|
-
static defaultProps: {};
|
|
41
|
-
changeLabel: any;
|
|
42
|
-
render(): React.JSX.Element;
|
|
43
|
-
}
|
|
44
|
-
export default Category;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import e from "../input-header.js";
|
|
2
|
-
import { DeleteButton as t } from "../buttons.js";
|
|
3
|
-
import n from "./droppable-placeholder.js";
|
|
4
|
-
import r from "react";
|
|
5
|
-
import i from "prop-types";
|
|
6
|
-
import { styled as a } from "@mui/material/styles";
|
|
7
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
8
|
-
import c from "@mui/material/Card";
|
|
9
|
-
import l from "@mui/material/CardActions";
|
|
10
|
-
//#region src/author/design/categories/category.tsx
|
|
11
|
-
var u = a(c, { shouldForwardProp: (e) => e !== "isDuplicated" })(({ theme: e, isDuplicated: t }) => ({
|
|
12
|
-
minWidth: "196px",
|
|
13
|
-
padding: e.spacing(1),
|
|
14
|
-
overflow: "visible",
|
|
15
|
-
...t && { border: "1px solid red" }
|
|
16
|
-
})), d = a(l)(({ theme: e }) => ({ padding: `${e.spacing(1)} 0 0` })), f = a("div")(({ theme: e }) => ({
|
|
17
|
-
padding: e.spacing(2),
|
|
18
|
-
"& p": { margin: 0 }
|
|
19
|
-
})), p = a("div")(({ theme: e }) => ({
|
|
20
|
-
fontSize: e.typography.fontSize - 2,
|
|
21
|
-
color: e.palette.error.main,
|
|
22
|
-
paddingBottom: e.spacing(1)
|
|
23
|
-
})), m = class extends r.Component {
|
|
24
|
-
static propTypes = {
|
|
25
|
-
alternateResponseIndex: i.number,
|
|
26
|
-
category: i.object.isRequired,
|
|
27
|
-
configuration: i.object.isRequired,
|
|
28
|
-
defaultImageMaxHeight: i.number,
|
|
29
|
-
defaultImageMaxWidth: i.number,
|
|
30
|
-
deleteFocusedEl: i.func,
|
|
31
|
-
focusedEl: i.number,
|
|
32
|
-
index: i.number,
|
|
33
|
-
error: i.string,
|
|
34
|
-
isDuplicated: i.bool,
|
|
35
|
-
maxImageWidth: i.object,
|
|
36
|
-
maxImageHeight: i.object,
|
|
37
|
-
onChange: i.func,
|
|
38
|
-
onDelete: i.func,
|
|
39
|
-
onDeleteChoice: i.func,
|
|
40
|
-
imageSupport: i.shape({
|
|
41
|
-
add: i.func.isRequired,
|
|
42
|
-
delete: i.func.isRequired
|
|
43
|
-
}),
|
|
44
|
-
toolbarOpts: i.object,
|
|
45
|
-
spellCheck: i.bool,
|
|
46
|
-
uploadSoundSupport: i.shape({
|
|
47
|
-
add: i.func.isRequired,
|
|
48
|
-
delete: i.func.isRequired
|
|
49
|
-
}),
|
|
50
|
-
isAlternate: i.bool
|
|
51
|
-
};
|
|
52
|
-
static defaultProps = {};
|
|
53
|
-
changeLabel = (e) => {
|
|
54
|
-
let { category: t, onChange: n } = this.props;
|
|
55
|
-
t.label = e, n(t);
|
|
56
|
-
};
|
|
57
|
-
render() {
|
|
58
|
-
let { alternateResponseIndex: r, category: i, configuration: a, deleteFocusedEl: c, focusedEl: l, index: m, error: h, isDuplicated: g, onDelete: _, onDeleteChoice: v, imageSupport: y, spellCheck: b, toolbarOpts: x, maxImageWidth: S, maxImageHeight: C, uploadSoundSupport: w, mathMlOptions: T = {} } = this.props;
|
|
59
|
-
return /* @__PURE__ */ s(u, {
|
|
60
|
-
isDuplicated: g,
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ s("span", { children: [r || r === 0 ? /* @__PURE__ */ o(f, { dangerouslySetInnerHTML: { __html: i.label } }) : /* @__PURE__ */ o(e, {
|
|
63
|
-
label: i.label,
|
|
64
|
-
focusedEl: l,
|
|
65
|
-
deleteFocusedEl: c,
|
|
66
|
-
index: m,
|
|
67
|
-
disabled: !!r || r === 0,
|
|
68
|
-
error: h,
|
|
69
|
-
onChange: this.changeLabel,
|
|
70
|
-
onDelete: _,
|
|
71
|
-
imageSupport: y,
|
|
72
|
-
toolbarOpts: x,
|
|
73
|
-
spellCheck: b,
|
|
74
|
-
maxImageWidth: S,
|
|
75
|
-
maxImageHeight: C,
|
|
76
|
-
uploadSoundSupport: w,
|
|
77
|
-
mathMlOptions: T,
|
|
78
|
-
configuration: a
|
|
79
|
-
}), h && /* @__PURE__ */ o(p, { children: h })] }),
|
|
80
|
-
/* @__PURE__ */ o(n, {
|
|
81
|
-
alternateResponseIndex: r,
|
|
82
|
-
category: i,
|
|
83
|
-
choices: i.choices,
|
|
84
|
-
onDeleteChoice: v,
|
|
85
|
-
categoryId: i.id,
|
|
86
|
-
extraStyles: { minHeight: "100px" },
|
|
87
|
-
isAlternate: this.props.isAlternate
|
|
88
|
-
}),
|
|
89
|
-
_ && /* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(t, {
|
|
90
|
-
label: "delete",
|
|
91
|
-
onClick: _
|
|
92
|
-
}) })
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
//#endregion
|
|
98
|
-
export { m as default };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/choice-preview.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 ChoicePreview extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
alternateResponseIndex: PropTypes.Requireable<number>;
|
|
14
|
-
category: PropTypes.Requireable<object>;
|
|
15
|
-
choice: PropTypes.Validator<object>;
|
|
16
|
-
choiceIndex: PropTypes.Requireable<number>;
|
|
17
|
-
onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
-
};
|
|
19
|
-
static defaultProps: {
|
|
20
|
-
onDelete: () => void;
|
|
21
|
-
};
|
|
22
|
-
delete: any;
|
|
23
|
-
render(): React.JSX.Element;
|
|
24
|
-
}
|
|
25
|
-
export default ChoicePreview;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import * as t from "@pie-lib/render-ui";
|
|
3
|
-
import { HtmlAndMath as n, color as r } from "@pie-lib/render-ui";
|
|
4
|
-
import i from "prop-types";
|
|
5
|
-
import { styled as a } from "@mui/material/styles";
|
|
6
|
-
import { DraggableChoice as o } from "@pie-lib/drag";
|
|
7
|
-
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
-
import l from "@mui/material/IconButton";
|
|
9
|
-
import u from "@mui/icons-material/RemoveCircleOutline";
|
|
10
|
-
//#region src/author/design/categories/choice-preview.tsx
|
|
11
|
-
function d(e) {
|
|
12
|
-
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
13
|
-
}
|
|
14
|
-
function f(e, t) {
|
|
15
|
-
return !e || d(e) ? e : d(e.default) ? e.default : t && d(e[t]) ? e[t] : t && d(e[t]?.default) ? e[t].default : e;
|
|
16
|
-
}
|
|
17
|
-
var p = f(n, "HtmlAndMath") || f(g.HtmlAndMath, "HtmlAndMath"), m = t, h = m.default, g = h && typeof h == "object" ? h : m, _ = a("div")({
|
|
18
|
-
position: "relative",
|
|
19
|
-
overflow: "auto",
|
|
20
|
-
touchAction: "none"
|
|
21
|
-
}), v = a(l)({
|
|
22
|
-
position: "absolute",
|
|
23
|
-
right: 0,
|
|
24
|
-
top: 0,
|
|
25
|
-
color: `${r.tertiary()} !important`
|
|
26
|
-
}), y = class extends e.Component {
|
|
27
|
-
static propTypes = {
|
|
28
|
-
alternateResponseIndex: i.number,
|
|
29
|
-
category: i.object,
|
|
30
|
-
choice: i.object.isRequired,
|
|
31
|
-
choiceIndex: i.number,
|
|
32
|
-
onDelete: i.func
|
|
33
|
-
};
|
|
34
|
-
static defaultProps = { onDelete: () => {} };
|
|
35
|
-
delete = () => {
|
|
36
|
-
let { onDelete: e, choice: t } = this.props;
|
|
37
|
-
e(t);
|
|
38
|
-
};
|
|
39
|
-
render() {
|
|
40
|
-
let { alternateResponseIndex: e, category: t, choice: n, choiceIndex: r } = this.props, i = t && t.id, a = e === void 0 ? `${n.id}-${i}-${r}` : `${n.id}-${i}-${r}-alt-${e}`;
|
|
41
|
-
return /* @__PURE__ */ c(_, { children: [n ? /* @__PURE__ */ s(o, {
|
|
42
|
-
alternateResponseIndex: e,
|
|
43
|
-
category: t,
|
|
44
|
-
choice: n,
|
|
45
|
-
choiceIndex: r,
|
|
46
|
-
onRemoveChoice: this.delete,
|
|
47
|
-
type: "choice-preview",
|
|
48
|
-
id: a,
|
|
49
|
-
categoryId: i,
|
|
50
|
-
children: /* @__PURE__ */ s(p, { html: n?.content })
|
|
51
|
-
}) : null, /* @__PURE__ */ s(v, {
|
|
52
|
-
"aria-label": "delete",
|
|
53
|
-
onClick: this.delete,
|
|
54
|
-
size: "large",
|
|
55
|
-
children: /* @__PURE__ */ s(u, {})
|
|
56
|
-
})] });
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
export { y as default };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/design/categories/droppable-placeholder.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
|
-
declare const _default: (props: any) => React.JSX.Element;
|
|
11
|
-
export default _default;
|