@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
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/design/index.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 Design extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
configuration: PropTypes.Requireable<object>;
|
|
14
|
-
className: PropTypes.Requireable<string>;
|
|
15
|
-
onConfigurationChanged: PropTypes.Requireable<(...args: any[]) => any>;
|
|
16
|
-
model: PropTypes.Validator<object>;
|
|
17
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
uid: PropTypes.Requireable<string>;
|
|
19
|
-
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
20
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
22
|
-
}>>;
|
|
23
|
-
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
-
}>>;
|
|
27
|
-
};
|
|
28
|
-
constructor(props: any);
|
|
29
|
-
updateModel: any;
|
|
30
|
-
changeRationale: any;
|
|
31
|
-
changeTeacherInstructions: any;
|
|
32
|
-
changeFeedback: any;
|
|
33
|
-
onAddAlternateResponse: any;
|
|
34
|
-
onPromptChanged: (prompt: any) => any;
|
|
35
|
-
onRemoveAlternateResponse: any;
|
|
36
|
-
countChoiceInCorrectResponse: any;
|
|
37
|
-
checkAllowMultiplePlacements: any;
|
|
38
|
-
isAlertModalOpened: any;
|
|
39
|
-
onAlertModalCancel: any;
|
|
40
|
-
onDragStart: any;
|
|
41
|
-
onDragEnd: any;
|
|
42
|
-
removeChoiceFromSource: any;
|
|
43
|
-
addChoiceToCategory: any;
|
|
44
|
-
deleteChoiceFromCategory: any;
|
|
45
|
-
moveChoice: any;
|
|
46
|
-
addChoiceToAlternateCategory: any;
|
|
47
|
-
moveChoiceInAlternate: any;
|
|
48
|
-
deleteChoiceFromAlternateCategory: any;
|
|
49
|
-
renderDragOverlay: any;
|
|
50
|
-
render(): React.JSX.Element;
|
|
51
|
-
}
|
|
52
|
-
export default Design;
|
|
@@ -1,417 +0,0 @@
|
|
|
1
|
-
import { getPluginProps as e } from "./utils.js";
|
|
2
|
-
import t from "./categories/choice-preview.js";
|
|
3
|
-
import n from "./header.js";
|
|
4
|
-
import { getMaxCategoryChoices as r, multiplePlacements as i } from "../utils.js";
|
|
5
|
-
import a from "./categories/index.js";
|
|
6
|
-
import o from "./categories/alternateResponses.js";
|
|
7
|
-
import s from "./choices/choice.js";
|
|
8
|
-
import c from "./choices/index.js";
|
|
9
|
-
import { buildAlternateResponses as l, buildCategories as u } from "./builder.js";
|
|
10
|
-
import d from "react";
|
|
11
|
-
import { renderMath as f } from "@pie-element/shared-math-rendering-mathjax";
|
|
12
|
-
import p from "prop-types";
|
|
13
|
-
import { styled as m } from "@mui/material/styles";
|
|
14
|
-
import { DragOverlay as ee } from "@dnd-kit/core";
|
|
15
|
-
import { countInAnswer as h, ensureNoExtraChoicesInAlternate as g, ensureNoExtraChoicesInAnswer as _, moveChoiceToAlternate as v, moveChoiceToCategory as y, removeChoiceFromAlternate as b, removeChoiceFromCategory as x, verifyAllowMultiplePlacements as S } from "@pie-lib/categorize";
|
|
16
|
-
import { DragProvider as te, uid as C } from "@pie-lib/drag";
|
|
17
|
-
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
18
|
-
import E from "@pie-lib/translator";
|
|
19
|
-
import { AlertDialog as ne, FeedbackConfig as re, InputContainer as D, layout as ie, settings as O } from "@pie-lib/config-ui";
|
|
20
|
-
import k from "@pie-lib/editable-html-tip-tap";
|
|
21
|
-
//#region src/author/design/index.tsx
|
|
22
|
-
var { translator: ae } = E, { dropdown: A, Panel: oe, toggle: j, radio: M, numberField: N } = O, { Provider: se } = C, ce = class extends d.Component {
|
|
23
|
-
containerRef = d.createRef();
|
|
24
|
-
componentDidMount() {
|
|
25
|
-
this.containerRef.current && setTimeout(() => f(this.containerRef.current), 0);
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
return /* @__PURE__ */ w("div", {
|
|
29
|
-
ref: this.containerRef,
|
|
30
|
-
children: this.props.children
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
}, P = m(n)(({ theme: e }) => ({ marginBottom: e.spacing(2) })), F = m(D)(({ theme: e }) => ({
|
|
34
|
-
width: "100%",
|
|
35
|
-
paddingTop: e.spacing(1),
|
|
36
|
-
marginTop: e.spacing(1),
|
|
37
|
-
marginBottom: e.spacing(2)
|
|
38
|
-
})), I = m("div")(({ theme: e }) => ({
|
|
39
|
-
fontSize: e.typography.fontSize - 2,
|
|
40
|
-
color: e.palette.error.main,
|
|
41
|
-
paddingTop: e.spacing(1)
|
|
42
|
-
})), L = class extends d.Component {
|
|
43
|
-
static propTypes = {
|
|
44
|
-
configuration: p.object,
|
|
45
|
-
className: p.string,
|
|
46
|
-
onConfigurationChanged: p.func,
|
|
47
|
-
model: p.object.isRequired,
|
|
48
|
-
onChange: p.func.isRequired,
|
|
49
|
-
uid: p.string,
|
|
50
|
-
imageSupport: p.shape({
|
|
51
|
-
add: p.func.isRequired,
|
|
52
|
-
delete: p.func.isRequired
|
|
53
|
-
}),
|
|
54
|
-
uploadSoundSupport: p.shape({
|
|
55
|
-
add: p.func.isRequired,
|
|
56
|
-
delete: p.func.isRequired
|
|
57
|
-
})
|
|
58
|
-
};
|
|
59
|
-
constructor(e) {
|
|
60
|
-
super(e), this.uid = e.uid || C.generateId(), this.state = { activeDragItem: null };
|
|
61
|
-
}
|
|
62
|
-
updateModel = (e) => {
|
|
63
|
-
let { model: t, onChange: n } = this.props, r = {
|
|
64
|
-
...t,
|
|
65
|
-
...e
|
|
66
|
-
};
|
|
67
|
-
r.choices = r.choices.map((e) => ({
|
|
68
|
-
...e,
|
|
69
|
-
categoryCount: this.checkAllowMultiplePlacements(r.allowMultiplePlacementsEnabled, e)
|
|
70
|
-
})), r.correctResponse = _(r.correctResponse || [], r.choices), r.correctResponse = g(r.correctResponse || [], r.choices), r.categories = r.categories.map((e) => ({
|
|
71
|
-
id: e.id,
|
|
72
|
-
label: e.label
|
|
73
|
-
})), r.choices = r.choices.map((e) => ({
|
|
74
|
-
id: e.id,
|
|
75
|
-
content: e.content,
|
|
76
|
-
categoryCount: e.categoryCount
|
|
77
|
-
})), r.maxChoicesPerCategory = r.allowMaxChoicesPerCategory ? r.maxChoicesPerCategory : 0, n(r);
|
|
78
|
-
};
|
|
79
|
-
changeRationale = (e) => {
|
|
80
|
-
let { model: t, onChange: n } = this.props;
|
|
81
|
-
n({
|
|
82
|
-
...t,
|
|
83
|
-
rationale: e
|
|
84
|
-
});
|
|
85
|
-
};
|
|
86
|
-
changeTeacherInstructions = (e) => {
|
|
87
|
-
let { model: t, onChange: n } = this.props;
|
|
88
|
-
n({
|
|
89
|
-
...t,
|
|
90
|
-
teacherInstructions: e
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
changeFeedback = (e) => {
|
|
94
|
-
this.updateModel({ feedback: e });
|
|
95
|
-
};
|
|
96
|
-
onAddAlternateResponse = () => {
|
|
97
|
-
let { model: { correctResponse: e } } = this.props;
|
|
98
|
-
this.updateModel({ correctResponse: (e || []).map((e) => ({
|
|
99
|
-
...e,
|
|
100
|
-
alternateResponses: [...e.alternateResponses || [], []]
|
|
101
|
-
})) });
|
|
102
|
-
};
|
|
103
|
-
onPromptChanged = (e) => this.updateModel({ prompt: e });
|
|
104
|
-
onRemoveAlternateResponse = (e) => {
|
|
105
|
-
let { model: { correctResponse: t } } = this.props;
|
|
106
|
-
this.updateModel({ correctResponse: (t || []).map((t) => ({
|
|
107
|
-
...t,
|
|
108
|
-
alternateResponses: (t.alternateResponses || []).filter((t, n) => n !== e)
|
|
109
|
-
})) });
|
|
110
|
-
};
|
|
111
|
-
countChoiceInCorrectResponse = (e) => {
|
|
112
|
-
let { model: t } = this.props;
|
|
113
|
-
return h(e.id, t.correctResponse);
|
|
114
|
-
};
|
|
115
|
-
checkAllowMultiplePlacements = (e, t) => e === i.enabled ? 0 : e === i.disabled ? 1 : t.categoryCount || 0;
|
|
116
|
-
isAlertModalOpened = () => {
|
|
117
|
-
let { model: e } = this.props, { maxChoicesPerCategory: t = 0 } = e || {}, n = r(e);
|
|
118
|
-
return t === 0 ? !1 : n > t;
|
|
119
|
-
};
|
|
120
|
-
onAlertModalCancel = () => {
|
|
121
|
-
let { model: e } = this.props, t = r(e);
|
|
122
|
-
this.updateModel({ maxChoicesPerCategory: t });
|
|
123
|
-
};
|
|
124
|
-
onDragStart = (e) => {
|
|
125
|
-
let { active: t } = e, n = t.data.current;
|
|
126
|
-
this.setState({ activeDragItem: n });
|
|
127
|
-
};
|
|
128
|
-
onDragEnd = ({ active: e, over: t }) => {
|
|
129
|
-
let n = window.scrollX, r = window.scrollY;
|
|
130
|
-
if (this.setState({ activeDragItem: null }), !e) return;
|
|
131
|
-
requestAnimationFrame(() => {
|
|
132
|
-
requestAnimationFrame(() => {
|
|
133
|
-
window.scrollTo(n, r);
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
let { model: i } = this.props, { allowAlternateEnabled: a, categories: o = [], choices: s = [] } = i, c = e?.data?.current, l = t?.data?.current;
|
|
137
|
-
if (!c) return;
|
|
138
|
-
let u = c.choiceIndex || 0, d = l?.type, f = c.type === "choice-preview", p = c.type === "choice", m = c.choice?.id || (typeof c.id == "string" ? c.id.split("-")[0] : c.id);
|
|
139
|
-
if (f && (!l || d === "choice")) {
|
|
140
|
-
this.removeChoiceFromSource(c, u, {
|
|
141
|
-
allowAlternateEnabled: a,
|
|
142
|
-
categories: o,
|
|
143
|
-
choices: s
|
|
144
|
-
});
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (f && d === "category") return this.moveChoice(m, c.categoryId, l.id, u);
|
|
148
|
-
if (p && d === "category") return this.addChoiceToCategory({ id: c.id }, l.id);
|
|
149
|
-
if (f && d === "category-alternate") return this.moveChoiceInAlternate(m, c.categoryId, l.id, u, l.alternateResponseIndex);
|
|
150
|
-
if (a && p && d === "category-alternate") return this.addChoiceToAlternateCategory({ id: c.id }, l.id, l.alternateResponseIndex);
|
|
151
|
-
};
|
|
152
|
-
removeChoiceFromSource = (e, t, { allowAlternateEnabled: n, categories: r, choices: i }) => {
|
|
153
|
-
if (e.alternateResponseIndex === void 0) {
|
|
154
|
-
this.deleteChoiceFromCategory(e.categoryId, e.choiceId, t);
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
if (!n) return;
|
|
158
|
-
let a = r?.find((t) => t.id === e.categoryId), o = i?.find((t) => t.id === e.choiceId);
|
|
159
|
-
a && o && this.deleteChoiceFromAlternateCategory(a, o, t, e.alternateResponseIndex);
|
|
160
|
-
};
|
|
161
|
-
addChoiceToCategory = (e, t) => {
|
|
162
|
-
let { model: n } = this.props, { choices: i = [], correctResponse: a = [], maxChoicesPerCategory: o = 0 } = n || {}, s = (i || []).find((t) => t.id === e.id), c = y(e.id, void 0, t, 0, a);
|
|
163
|
-
s.categoryCount !== 0 && (c = S(e, t, c));
|
|
164
|
-
let l = r(n);
|
|
165
|
-
this.updateModel({
|
|
166
|
-
correctResponse: c,
|
|
167
|
-
maxChoicesPerCategory: o !== 0 && o < l ? o + 1 : o
|
|
168
|
-
});
|
|
169
|
-
};
|
|
170
|
-
deleteChoiceFromCategory = (e, t, n) => {
|
|
171
|
-
let { model: r } = this.props, i = x(t, e, n, r.correctResponse);
|
|
172
|
-
this.updateModel({ correctResponse: i });
|
|
173
|
-
};
|
|
174
|
-
moveChoice = (e, t, n, i) => {
|
|
175
|
-
let { model: a } = this.props, { choices: o, correctResponse: s = [], maxChoicesPerCategory: c = 0 } = a || {}, l = (o || []).find((t) => t.id === e);
|
|
176
|
-
if (n === t || !l) return;
|
|
177
|
-
l.categoryCount === 0 ? l.categoryCount === 0 && (s = y(l.id, void 0, n, 0, s)) : (s = y(l.id, t, n, i, s), s = S(l, n, s));
|
|
178
|
-
let u = r(a);
|
|
179
|
-
this.updateModel({
|
|
180
|
-
correctResponse: s,
|
|
181
|
-
maxChoicesPerCategory: c !== 0 && c < u ? c + 1 : c
|
|
182
|
-
});
|
|
183
|
-
};
|
|
184
|
-
addChoiceToAlternateCategory = (e, t, n) => {
|
|
185
|
-
let { model: i } = this.props, { correctResponse: a, choices: o, maxChoicesPerCategory: s = 0 } = i, c = o.find((t) => t.id === e.id);
|
|
186
|
-
a.forEach((r) => r.category === t ? (r.alternateResponses = r.alternateResponses || [], r.alternateResponses[n] === void 0 && (r.alternateResponses[n] = []), r.alternateResponses[n].push(e.id), c.categoryCount && c.categoryCount !== 0 && (r.alternateResponses[n] = r.alternateResponses[n].reduce((e, t) => (t === c.id ? e.findIndex((e) => e === c.id) === -1 && e.push(t) : e.push(t), e), [])), r) : (r.alternateResponses[n] && c.categoryCount !== 0 && (r.alternateResponses[n] = r.alternateResponses[n].filter((t) => t !== e.id)), r));
|
|
187
|
-
let l = r(i);
|
|
188
|
-
this.updateModel({
|
|
189
|
-
correctResponse: a,
|
|
190
|
-
maxChoicesPerCategory: s !== 0 && s < l ? s + 1 : s
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
moveChoiceInAlternate = (e, t, n, i, a) => {
|
|
194
|
-
let { model: o } = this.props, { choices: s, correctResponse: c = [], maxChoicesPerCategory: l = 0 } = o || {}, u = (s || []).find((t) => t.id === e);
|
|
195
|
-
c = v(e, t, n, i, c, a, u?.categoryCount);
|
|
196
|
-
let d = r(o);
|
|
197
|
-
this.updateModel({
|
|
198
|
-
correctResponse: c,
|
|
199
|
-
maxChoicesPerCategory: l !== 0 && l < d ? l + 1 : l
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
deleteChoiceFromAlternateCategory = (e, t, n, r) => {
|
|
203
|
-
let { model: i } = this.props, a = b(t.id, e.id, n, r, i.correctResponse);
|
|
204
|
-
this.updateModel({ correctResponse: a });
|
|
205
|
-
};
|
|
206
|
-
renderDragOverlay = () => {
|
|
207
|
-
let { activeDragItem: e } = this.state, { model: n, configuration: r } = this.props;
|
|
208
|
-
if (!e) return null;
|
|
209
|
-
if (e.type === "choice") {
|
|
210
|
-
let t = n.choices?.find((t) => t.id === e.id);
|
|
211
|
-
return t ? /* @__PURE__ */ w(s, {
|
|
212
|
-
choice: t,
|
|
213
|
-
configuration: r
|
|
214
|
-
}) : null;
|
|
215
|
-
} else if (e.type === "choice-preview" && e.alternateResponseIndex === void 0) {
|
|
216
|
-
let r = n.choices?.find((t) => t.id === e.id);
|
|
217
|
-
return r ? /* @__PURE__ */ w(t, { choice: r }) : null;
|
|
218
|
-
} else if (e.type === "choice-preview" && e.alternateResponseIndex !== void 0) {
|
|
219
|
-
let r = n.choices?.find((t) => t.id === e.id);
|
|
220
|
-
return r ? /* @__PURE__ */ w(t, {
|
|
221
|
-
choice: r,
|
|
222
|
-
alternateResponseIndex: e.alternateResponseIndex
|
|
223
|
-
}) : null;
|
|
224
|
-
}
|
|
225
|
-
return null;
|
|
226
|
-
};
|
|
227
|
-
render() {
|
|
228
|
-
let { configuration: t, imageSupport: n, model: r, uploadSoundSupport: s, onConfigurationChanged: f } = this.props, { allowAlternate: p = {}, allowMultiplePlacements: m = {}, baseInputConfiguration: h = {}, categoriesPerRow: g = {}, choicesPosition: _ = {}, contentDimensions: v = {}, feedback: y = {}, lockChoiceOrder: b = {}, maxImageHeight: x = {}, maxImageWidth: S = {}, maxPlacements: C = {}, minCategoriesPerRow: E = 1, partialScoring: D = {}, prompt: O = {}, rationale: L = {}, scoringType: R = {}, settingsPanelDisabled: le, spellCheck: z = {}, studentInstructions: B = {}, teacherInstructions: V = {}, withRubric: H = {}, mathMlOptions: U = {}, language: W = {}, languageChoices: G = {}, allowMaxAnswerChoices: K = {} } = t || {}, { allowAlternateEnabled: ue, allowMaxChoicesPerCategory: de, errors: fe, feedbackEnabled: pe, maxChoicesPerCategory: me, promptEnabled: he, rationaleEnabled: ge, spellCheckEnabled: q, teacherInstructionsEnabled: _e, toolbarEditorPosition: ve, extraCSSRules: ye } = r || {}, { prompt: J, rationale: Y, teacherInstructions: X } = fe || {}, Z = { position: ve === "top" ? "top" : "bottom" }, be = r.config || {};
|
|
229
|
-
be.choices = be.choices || {
|
|
230
|
-
label: "",
|
|
231
|
-
columns: 2
|
|
232
|
-
};
|
|
233
|
-
let xe = u(r.categories || [], r.choices || [], r.correctResponse || []), Se = l(r.categories || [], r.choices || [], r.correctResponse || []), Ce = r.choices.map((e) => (e.correctResponseCount = this.countChoiceInCorrectResponse(e), e.categoryCount = this.checkAllowMultiplePlacements(r.allowMultiplePlacementsEnabled, e), e)), Q = S && S.prompt, $ = x && x.prompt, we = {
|
|
234
|
-
partialScoring: D.settings && j(D.label),
|
|
235
|
-
lockChoiceOrder: b.settings && j(b.label),
|
|
236
|
-
categoriesPerRow: g.settings && N(g.label, {
|
|
237
|
-
label: g.label,
|
|
238
|
-
min: E,
|
|
239
|
-
max: 6
|
|
240
|
-
}),
|
|
241
|
-
choicesPosition: _.settings && M(_.label, [
|
|
242
|
-
"below",
|
|
243
|
-
"above",
|
|
244
|
-
"left",
|
|
245
|
-
"right"
|
|
246
|
-
]),
|
|
247
|
-
allowMultiplePlacementsEnabled: m.settings && A(m.label, [
|
|
248
|
-
i.enabled,
|
|
249
|
-
i.disabled,
|
|
250
|
-
i.perChoice
|
|
251
|
-
]),
|
|
252
|
-
maxAnswerChoices: K.settings && N(K.label, {
|
|
253
|
-
label: "",
|
|
254
|
-
min: Ce?.length || 0,
|
|
255
|
-
max: 30
|
|
256
|
-
}),
|
|
257
|
-
allowMaxChoicesPerCategory: C.settings && j(C.label),
|
|
258
|
-
maxChoicesPerCategory: de === !0 && N(C.label, {
|
|
259
|
-
label: "",
|
|
260
|
-
min: 0,
|
|
261
|
-
max: 30
|
|
262
|
-
}),
|
|
263
|
-
promptEnabled: O.settings && j(O.label),
|
|
264
|
-
feedbackEnabled: y.settings && j(y.label),
|
|
265
|
-
allowAlternateEnabled: p.settings && j(p.label),
|
|
266
|
-
"language.enabled": W.settings && j(W.label, !0),
|
|
267
|
-
language: W.settings && W.enabled && A(G.label, G.options)
|
|
268
|
-
}, Te = {
|
|
269
|
-
teacherInstructionsEnabled: V.settings && j(V.label),
|
|
270
|
-
studentInstructionsEnabled: B.settings && j(B.label),
|
|
271
|
-
rationaleEnabled: L.settings && j(L.label),
|
|
272
|
-
spellCheckEnabled: z.settings && j(z.label),
|
|
273
|
-
scoringType: R.settings && M(R.label, ["auto", "rubric"]),
|
|
274
|
-
rubricEnabled: H?.settings && j(H?.label)
|
|
275
|
-
}, Ee = this.isAlertModalOpened(), De = ae.t("translation:categorize:maxChoicesPerCategoryRestriction", {
|
|
276
|
-
lng: r.language,
|
|
277
|
-
maxChoicesPerCategory: me
|
|
278
|
-
});
|
|
279
|
-
return /* @__PURE__ */ w(te, {
|
|
280
|
-
onDragStart: this.onDragStart,
|
|
281
|
-
onDragEnd: this.onDragEnd,
|
|
282
|
-
children: /* @__PURE__ */ T(se, {
|
|
283
|
-
value: this.uid,
|
|
284
|
-
children: [/* @__PURE__ */ T(ie.ConfigLayout, {
|
|
285
|
-
extraCSSRules: ye,
|
|
286
|
-
dimensions: v,
|
|
287
|
-
hideSettings: le,
|
|
288
|
-
settings: /* @__PURE__ */ w(oe, {
|
|
289
|
-
model: r,
|
|
290
|
-
onChangeModel: this.updateModel,
|
|
291
|
-
configuration: t,
|
|
292
|
-
onChangeConfiguration: f,
|
|
293
|
-
groups: {
|
|
294
|
-
Settings: we,
|
|
295
|
-
Properties: Te
|
|
296
|
-
},
|
|
297
|
-
modal: /* @__PURE__ */ w(ne, {
|
|
298
|
-
title: "Warning",
|
|
299
|
-
text: De,
|
|
300
|
-
open: Ee,
|
|
301
|
-
onClose: this.onAlertModalCancel
|
|
302
|
-
})
|
|
303
|
-
}),
|
|
304
|
-
children: [
|
|
305
|
-
_e && /* @__PURE__ */ T(F, {
|
|
306
|
-
label: V.label,
|
|
307
|
-
children: [/* @__PURE__ */ w(k, {
|
|
308
|
-
markup: r.teacherInstructions || "",
|
|
309
|
-
onChange: this.changeTeacherInstructions,
|
|
310
|
-
imageSupport: n,
|
|
311
|
-
error: X,
|
|
312
|
-
nonEmpty: !1,
|
|
313
|
-
toolbarOpts: Z,
|
|
314
|
-
pluginProps: e(V?.inputConfiguration, h),
|
|
315
|
-
spellCheck: q,
|
|
316
|
-
maxImageWidth: S && S.teacherInstructions || Q,
|
|
317
|
-
maxImageHeight: x && x.teacherInstructions || $,
|
|
318
|
-
uploadSoundSupport: s,
|
|
319
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
320
|
-
mathMlOptions: U
|
|
321
|
-
}), X && /* @__PURE__ */ w(I, { children: X })]
|
|
322
|
-
}),
|
|
323
|
-
he && /* @__PURE__ */ T(F, {
|
|
324
|
-
label: O.label,
|
|
325
|
-
children: [/* @__PURE__ */ w(k, {
|
|
326
|
-
markup: r.prompt || "",
|
|
327
|
-
onChange: this.onPromptChanged,
|
|
328
|
-
imageSupport: n,
|
|
329
|
-
error: J,
|
|
330
|
-
nonEmpty: !1,
|
|
331
|
-
disableUnderline: !0,
|
|
332
|
-
toolbarOpts: Z,
|
|
333
|
-
pluginProps: e(O?.inputConfiguration, h),
|
|
334
|
-
spellCheck: q,
|
|
335
|
-
maxImageWidth: S && S.prompt,
|
|
336
|
-
maxImageHeight: x && x.prompt,
|
|
337
|
-
uploadSoundSupport: s,
|
|
338
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
339
|
-
mathMlOptions: U
|
|
340
|
-
}), J && /* @__PURE__ */ w(I, { children: J })]
|
|
341
|
-
}),
|
|
342
|
-
/* @__PURE__ */ w(a, {
|
|
343
|
-
imageSupport: n,
|
|
344
|
-
uploadSoundSupport: s,
|
|
345
|
-
model: r,
|
|
346
|
-
categories: xe || [],
|
|
347
|
-
onModelChanged: this.updateModel,
|
|
348
|
-
toolbarOpts: Z,
|
|
349
|
-
spellCheck: q,
|
|
350
|
-
configuration: t,
|
|
351
|
-
defaultImageMaxWidth: Q,
|
|
352
|
-
defaultImageMaxHeight: $,
|
|
353
|
-
mathMlOptions: U
|
|
354
|
-
}),
|
|
355
|
-
/* @__PURE__ */ w(c, {
|
|
356
|
-
imageSupport: n,
|
|
357
|
-
uploadSoundSupport: s,
|
|
358
|
-
choices: Ce,
|
|
359
|
-
model: r,
|
|
360
|
-
onModelChanged: this.updateModel,
|
|
361
|
-
toolbarOpts: Z,
|
|
362
|
-
spellCheck: q,
|
|
363
|
-
configuration: t,
|
|
364
|
-
defaultImageMaxWidth: Q,
|
|
365
|
-
defaultImageMaxHeight: $
|
|
366
|
-
}),
|
|
367
|
-
ue && /* @__PURE__ */ w(P, {
|
|
368
|
-
label: "Alternate Responses",
|
|
369
|
-
buttonLabel: "ADD AN ALTERNATE RESPONSE",
|
|
370
|
-
onAdd: this.onAddAlternateResponse
|
|
371
|
-
}),
|
|
372
|
-
ue && Se.map((e, i) => /* @__PURE__ */ T(d.Fragment, { children: [/* @__PURE__ */ w(P, {
|
|
373
|
-
variant: "subtitle1",
|
|
374
|
-
label: "Alternate Response",
|
|
375
|
-
buttonLabel: "REMOVE ALTERNATE RESPONSE",
|
|
376
|
-
onAdd: () => this.onRemoveAlternateResponse(i)
|
|
377
|
-
}), /* @__PURE__ */ w(o, {
|
|
378
|
-
altIndex: i,
|
|
379
|
-
imageSupport: n,
|
|
380
|
-
model: r,
|
|
381
|
-
configuration: t,
|
|
382
|
-
categories: e,
|
|
383
|
-
onModelChanged: this.updateModel,
|
|
384
|
-
uploadSoundSupport: s,
|
|
385
|
-
mathMlOptions: U
|
|
386
|
-
})] }, i)),
|
|
387
|
-
ge && /* @__PURE__ */ T(F, {
|
|
388
|
-
label: L.label,
|
|
389
|
-
children: [/* @__PURE__ */ w(k, {
|
|
390
|
-
markup: r.rationale || "",
|
|
391
|
-
onChange: this.changeRationale,
|
|
392
|
-
imageSupport: n,
|
|
393
|
-
error: Y,
|
|
394
|
-
nonEmpty: !1,
|
|
395
|
-
toolbarOpts: Z,
|
|
396
|
-
pluginProps: e(O?.inputConfiguration, h),
|
|
397
|
-
spellCheck: q,
|
|
398
|
-
maxImageWidth: S && S.rationale || Q,
|
|
399
|
-
maxImageHeight: x && x.rationale || $,
|
|
400
|
-
uploadSoundSupport: s,
|
|
401
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
402
|
-
mathMlOptions: U
|
|
403
|
-
}), Y && /* @__PURE__ */ w(I, { children: Y })]
|
|
404
|
-
}),
|
|
405
|
-
pe && /* @__PURE__ */ w(re, {
|
|
406
|
-
feedback: r.feedback,
|
|
407
|
-
onChange: this.changeFeedback,
|
|
408
|
-
toolbarOpts: Z
|
|
409
|
-
})
|
|
410
|
-
]
|
|
411
|
-
}), /* @__PURE__ */ w(ee, { children: /* @__PURE__ */ w(ce, { children: this.renderDragOverlay() }) })]
|
|
412
|
-
})
|
|
413
|
-
});
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
//#endregion
|
|
417
|
-
export { L as default };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/design/input-header.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 InputHeader extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
configuration: PropTypes.Validator<object>;
|
|
14
|
-
deleteFocusedEl: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
16
|
-
focusedEl: PropTypes.Requireable<number>;
|
|
17
|
-
index: PropTypes.Requireable<number>;
|
|
18
|
-
label: PropTypes.Requireable<string>;
|
|
19
|
-
maxImageWidth: PropTypes.Requireable<object>;
|
|
20
|
-
maxImageHeight: PropTypes.Requireable<object>;
|
|
21
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
onDelete: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
|
-
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
24
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
25
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
26
|
-
}>>;
|
|
27
|
-
uploadSoundSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
28
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
29
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
30
|
-
}>>;
|
|
31
|
-
toolbarOpts: PropTypes.Requireable<object>;
|
|
32
|
-
error: PropTypes.Requireable<string>;
|
|
33
|
-
spellCheck: PropTypes.Requireable<boolean>;
|
|
34
|
-
};
|
|
35
|
-
static defaultProps: {};
|
|
36
|
-
constructor(props: any);
|
|
37
|
-
render(): React.JSX.Element;
|
|
38
|
-
}
|
|
39
|
-
export default InputHeader;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { getPluginProps as e } from "./utils.js";
|
|
2
|
-
import t from "react";
|
|
3
|
-
import n from "prop-types";
|
|
4
|
-
import { styled as r } from "@mui/material/styles";
|
|
5
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
-
import a from "@pie-lib/editable-html-tip-tap";
|
|
7
|
-
//#region src/author/design/input-header.tsx
|
|
8
|
-
var o = r(a)({
|
|
9
|
-
flex: "1",
|
|
10
|
-
maxWidth: "100%"
|
|
11
|
-
}), s = r("div")(({ theme: e }) => ({
|
|
12
|
-
display: "flex",
|
|
13
|
-
justifyContent: "space-between",
|
|
14
|
-
paddingBottom: e.spacing(1)
|
|
15
|
-
})), c = class extends t.Component {
|
|
16
|
-
static propTypes = {
|
|
17
|
-
configuration: n.object.isRequired,
|
|
18
|
-
deleteFocusedEl: n.func,
|
|
19
|
-
disabled: n.bool,
|
|
20
|
-
focusedEl: n.number,
|
|
21
|
-
index: n.number,
|
|
22
|
-
label: n.string,
|
|
23
|
-
maxImageWidth: n.object,
|
|
24
|
-
maxImageHeight: n.object,
|
|
25
|
-
onChange: n.func,
|
|
26
|
-
onDelete: n.func,
|
|
27
|
-
imageSupport: n.shape({
|
|
28
|
-
add: n.func.isRequired,
|
|
29
|
-
delete: n.func.isRequired
|
|
30
|
-
}),
|
|
31
|
-
uploadSoundSupport: n.shape({
|
|
32
|
-
add: n.func.isRequired,
|
|
33
|
-
delete: n.func.isRequired
|
|
34
|
-
}),
|
|
35
|
-
toolbarOpts: n.object,
|
|
36
|
-
error: n.string,
|
|
37
|
-
spellCheck: n.bool
|
|
38
|
-
};
|
|
39
|
-
static defaultProps = {};
|
|
40
|
-
constructor(e) {
|
|
41
|
-
super(e);
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
let { onChange: t, configuration: n, label: r, deleteFocusedEl: a, disabled: c, imageSupport: l, toolbarOpts: u, spellCheck: d, error: f, maxImageWidth: p, maxImageHeight: m, uploadSoundSupport: h, mathMlOptions: g = {}, focusedEl: _, index: v } = this.props, { headers: y, baseInputConfiguration: b } = n;
|
|
45
|
-
return /* @__PURE__ */ i(s, { children: /* @__PURE__ */ i(o, {
|
|
46
|
-
imageSupport: l,
|
|
47
|
-
disabled: c,
|
|
48
|
-
autoFocus: _ != null && _ === v,
|
|
49
|
-
autoWidthToolbar: !0,
|
|
50
|
-
label: "label",
|
|
51
|
-
markup: r,
|
|
52
|
-
onChange: t,
|
|
53
|
-
pluginProps: e(y?.inputConfiguration, b),
|
|
54
|
-
toolbarOpts: u,
|
|
55
|
-
spellCheck: d,
|
|
56
|
-
error: f,
|
|
57
|
-
maxImageWidth: p,
|
|
58
|
-
maxImageHeight: m,
|
|
59
|
-
uploadSoundSupport: h,
|
|
60
|
-
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
61
|
-
onDone: () => {
|
|
62
|
-
a && a();
|
|
63
|
-
},
|
|
64
|
-
mathMlOptions: g
|
|
65
|
-
}) });
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
//#endregion
|
|
69
|
-
export { c as default };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/design/utils.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 getPluginProps: (props?: {}, baseInputConfiguration?: {}) => {};
|
package/dist/author/index.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/categorize/configure/src/index.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 default class CategorizeConfigure extends HTMLElement {
|
|
10
|
-
static createDefaultModel: (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
|
-
static disableAlternateResponses: (m: any) => any;
|
|
35
|
-
constructor();
|
|
36
|
-
set model(m: any);
|
|
37
|
-
set configuration(c: any);
|
|
38
|
-
onModelChanged(m: any): void;
|
|
39
|
-
onConfigurationChanged(c: any): void;
|
|
40
|
-
connectedCallback(): void;
|
|
41
|
-
/**
|
|
42
|
-
*
|
|
43
|
-
* @param {done, progress, file} handler
|
|
44
|
-
*/
|
|
45
|
-
insertImage(handler: any): void;
|
|
46
|
-
onDeleteImage(src: any, done: any): void;
|
|
47
|
-
insertSound(handler: any): void;
|
|
48
|
-
onDeleteSound(src: any, done: any): void;
|
|
49
|
-
render(): void;
|
|
50
|
-
disconnectedCallback(): void;
|
|
51
|
-
}
|