@pie-element/multiple-choice 13.1.1-next.0 → 13.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +1972 -0
- package/CHANGELOG.md +2696 -0
- package/LICENSE.md +5 -0
- package/PRINT.md +35 -0
- package/README.md +56 -0
- package/choice.png +0 -0
- package/configure/CHANGELOG.json +1387 -0
- package/configure/CHANGELOG.md +2046 -0
- package/{src/author/defaults.ts → configure/lib/defaults.js} +90 -55
- package/configure/lib/defaults.js.map +1 -0
- package/{src/author/index.ts → configure/lib/index.js} +51 -98
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +477 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/lib/utils.js +18 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +22 -0
- package/controller/CHANGELOG.json +527 -0
- package/controller/CHANGELOG.md +1388 -0
- package/{src/controller/defaults.ts → controller/lib/defaults.js} +8 -11
- package/controller/lib/defaults.js.map +1 -0
- package/{src/controller/index.ts → controller/lib/index.js} +109 -123
- package/controller/lib/index.js.map +1 -0
- package/controller/lib/utils.js +15 -0
- package/controller/lib/utils.js.map +1 -0
- package/controller/package.json +15 -0
- package/docs/config-schema.json +2993 -0
- package/docs/config-schema.json.md +2217 -0
- package/docs/demo/config.js +8 -0
- package/docs/demo/generate.js +61 -0
- package/docs/demo/index.html +1 -0
- package/docs/demo/session.js +7 -0
- package/docs/pie-schema.json +1332 -0
- package/docs/pie-schema.json.md +1015 -0
- package/lib/choice-input.js +380 -0
- package/lib/choice-input.js.map +1 -0
- package/lib/choice.js +197 -0
- package/lib/choice.js.map +1 -0
- package/lib/feedback-tick.js +134 -0
- package/lib/feedback-tick.js.map +1 -0
- package/{src/delivery/index.ts → lib/index.js} +129 -211
- package/lib/index.js.map +1 -0
- package/lib/main.js +63 -0
- package/lib/main.js.map +1 -0
- package/lib/multiple-choice.js +412 -0
- package/lib/multiple-choice.js.map +1 -0
- package/lib/print.js +94 -0
- package/lib/print.js.map +1 -0
- package/{src/delivery/session-updater.ts → lib/session-updater.js} +13 -17
- package/lib/session-updater.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +3045 -0
- package/module/demo.js +86 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +10 -0
- package/module/print-demo.js +124 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +26 -58
- package/dist/author/defaults.d.ts +0 -206
- package/dist/author/defaults.d.ts.map +0 -1
- package/dist/author/defaults.js +0 -151
- package/dist/author/index.d.ts +0 -27
- package/dist/author/index.d.ts.map +0 -1
- package/dist/author/index.js +0 -116
- package/dist/author/main.d.ts +0 -35
- package/dist/author/main.d.ts.map +0 -1
- package/dist/author/main.js +0 -290
- package/dist/author/utils.d.ts +0 -10
- package/dist/author/utils.d.ts.map +0 -1
- package/dist/author/utils.js +0 -7
- package/dist/controller/defaults.d.ts +0 -36
- package/dist/controller/defaults.d.ts.map +0 -1
- package/dist/controller/defaults.js +0 -29
- package/dist/controller/index.d.ts +0 -66
- package/dist/controller/index.d.ts.map +0 -1
- package/dist/controller/index.js +0 -124
- package/dist/controller/utils.d.ts +0 -11
- package/dist/controller/utils.d.ts.map +0 -1
- package/dist/controller/utils.js +0 -8
- package/dist/delivery/choice-input.d.ts +0 -45
- package/dist/delivery/choice-input.d.ts.map +0 -1
- package/dist/delivery/choice-input.js +0 -274
- package/dist/delivery/choice.d.ts +0 -21
- package/dist/delivery/choice.d.ts.map +0 -1
- package/dist/delivery/choice.js +0 -109
- package/dist/delivery/feedback-tick.d.ts +0 -21
- package/dist/delivery/feedback-tick.d.ts.map +0 -1
- package/dist/delivery/feedback-tick.js +0 -104
- package/dist/delivery/index.d.ts +0 -38
- package/dist/delivery/index.d.ts.map +0 -1
- package/dist/delivery/index.js +0 -217
- package/dist/delivery/main.d.ts +0 -32
- package/dist/delivery/main.d.ts.map +0 -1
- package/dist/delivery/main.js +0 -51
- package/dist/delivery/multiple-choice.d.ts +0 -63
- package/dist/delivery/multiple-choice.d.ts.map +0 -1
- package/dist/delivery/multiple-choice.js +0 -252
- package/dist/delivery/session-updater.d.ts +0 -11
- package/dist/delivery/session-updater.d.ts.map +0 -1
- package/dist/delivery/session-updater.js +0 -9
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.iife.d.ts +0 -9
- package/dist/index.iife.d.ts.map +0 -1
- package/dist/index.iife.js +0 -148
- package/dist/index.js +0 -2
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMerge.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_safeGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/debounce.js +0 -50
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/now.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toPlainObject.js +0 -8
- package/dist/print/index.d.ts +0 -16
- package/dist/print/index.d.ts.map +0 -1
- package/dist/print/index.js +0 -44
- package/src/author/main.tsx +0 -509
- package/src/author/utils.ts +0 -25
- package/src/controller/utils.ts +0 -22
- package/src/delivery/choice-input.tsx +0 -413
- package/src/delivery/choice.tsx +0 -203
- package/src/delivery/feedback-tick.tsx +0 -156
- package/src/delivery/main.tsx +0 -85
- package/src/delivery/multiple-choice.tsx +0 -485
- package/src/index.iife.ts +0 -16
- package/src/index.ts +0 -1
- package/src/print/index.tsx +0 -112
package/package.json
CHANGED
|
@@ -1,77 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/multiple-choice",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"repository": "pie-framework/pie-elements",
|
|
4
|
+
"version": "13.2.0-next.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
5
8
|
"dependencies": {
|
|
6
9
|
"@emotion/react": "^11.14.0",
|
|
7
10
|
"@emotion/style": "^0.8.0",
|
|
8
11
|
"@mui/icons-material": "^7.3.4",
|
|
9
12
|
"@mui/material": "^7.3.4",
|
|
10
|
-
"@pie-
|
|
11
|
-
"@pie-lib/
|
|
12
|
-
"@pie-lib/
|
|
13
|
+
"@pie-framework/pie-player-events": "^0.1.0",
|
|
14
|
+
"@pie-lib/correct-answer-toggle": "4.0.0",
|
|
15
|
+
"@pie-lib/math-rendering": "5.0.0",
|
|
16
|
+
"@pie-lib/render-ui": "6.0.0",
|
|
17
|
+
"@pie-lib/translator": "4.0.0",
|
|
13
18
|
"classnames": "^2.2.5",
|
|
14
19
|
"debug": "^4.1.1",
|
|
15
20
|
"lodash-es": "^4.17.23",
|
|
16
21
|
"prop-types": "^15.8.1",
|
|
17
|
-
"react
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"@pie-lib/editable-html-tip-tap": "2.0.1",
|
|
21
|
-
"@pie-element/shared-controller-utils": "0.1.0",
|
|
22
|
-
"@pie-element/shared-player-events": "0.1.0",
|
|
23
|
-
"@pie-element/shared-math-rendering-mathjax": "0.1.0"
|
|
22
|
+
"react": "18.3.1",
|
|
23
|
+
"react-dom": "18.3.1",
|
|
24
|
+
"react-transition-group": "^4.4.5"
|
|
24
25
|
},
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
"
|
|
26
|
+
"gitHead": "ffd8232d80a1b132f4793ab741d30dbd4f6cc43b",
|
|
27
|
+
"scripts": {
|
|
28
|
+
"postpublish": "../../scripts/postpublish"
|
|
28
29
|
},
|
|
30
|
+
"main": "lib/index.js",
|
|
31
|
+
"module": "src/index.js",
|
|
29
32
|
"exports": {
|
|
30
33
|
".": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"default": "./
|
|
34
|
-
},
|
|
35
|
-
"./delivery": {
|
|
36
|
-
"development": "./src/delivery/index.ts",
|
|
37
|
-
"types": "./dist/delivery/index.d.ts",
|
|
38
|
-
"default": "./dist/delivery/index.js"
|
|
39
|
-
},
|
|
40
|
-
"./author": {
|
|
41
|
-
"development": "./src/author/index.ts",
|
|
42
|
-
"types": "./dist/author/index.d.ts",
|
|
43
|
-
"default": "./dist/author/index.js"
|
|
34
|
+
"import": "./lib/index.js",
|
|
35
|
+
"require": "./lib/index.js",
|
|
36
|
+
"default": "./lib/index.js"
|
|
44
37
|
},
|
|
45
|
-
"./
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
"./print": {
|
|
51
|
-
"development": "./src/print/index.tsx",
|
|
52
|
-
"types": "./dist/print/index.d.ts",
|
|
53
|
-
"default": "./dist/print/index.js"
|
|
38
|
+
"./print": "./src/print.js",
|
|
39
|
+
"./configure/lib": {
|
|
40
|
+
"import": "./configure/lib/index.js",
|
|
41
|
+
"require": "./configure/lib/index.js",
|
|
42
|
+
"default": "./configure/lib/index.js"
|
|
54
43
|
}
|
|
55
|
-
},
|
|
56
|
-
"type": "module",
|
|
57
|
-
"main": "./dist/index.js",
|
|
58
|
-
"types": "./dist/index.d.ts",
|
|
59
|
-
"files": [
|
|
60
|
-
"dist",
|
|
61
|
-
"src"
|
|
62
|
-
],
|
|
63
|
-
"sideEffects": false,
|
|
64
|
-
"devDependencies": {
|
|
65
|
-
"vite": "^8.0.1",
|
|
66
|
-
"typescript": "^5.9.3",
|
|
67
|
-
"@vitejs/plugin-react": "^6.0.1",
|
|
68
|
-
"@types/react": "^18.2.0",
|
|
69
|
-
"@types/react-dom": "^18.2.0"
|
|
70
|
-
},
|
|
71
|
-
"scripts": {
|
|
72
|
-
"build": "bun x vite build && bun x vite build --config vite.config.iife.ts && bun x tsc --emitDeclarationOnly",
|
|
73
|
-
"dev": "bun x vite",
|
|
74
|
-
"demo": "bun x vite --mode demo",
|
|
75
|
-
"test": "bun x vitest run"
|
|
76
44
|
}
|
|
77
45
|
}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/multiple-choice/configure/src/defaults.js
|
|
3
|
-
* @auto-generated
|
|
4
|
-
*
|
|
5
|
-
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
-
* Manual edits will be overwritten on next sync.
|
|
7
|
-
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
-
*/
|
|
9
|
-
/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType
|
|
10
|
-
* functionalities are not defined yet - the value for those can belong to
|
|
11
|
-
* model or to configure
|
|
12
|
-
*/
|
|
13
|
-
declare const _default: {
|
|
14
|
-
model: {
|
|
15
|
-
choiceMode: string;
|
|
16
|
-
choicePrefix: string;
|
|
17
|
-
choices: never[];
|
|
18
|
-
choicesLayout: string;
|
|
19
|
-
feedbackEnabled: boolean;
|
|
20
|
-
gridColumns: number;
|
|
21
|
-
lockChoiceOrder: boolean;
|
|
22
|
-
partialScoring: boolean;
|
|
23
|
-
prompt: string;
|
|
24
|
-
promptEnabled: boolean;
|
|
25
|
-
rationale: string;
|
|
26
|
-
rationaleEnabled: boolean;
|
|
27
|
-
scoringType: string;
|
|
28
|
-
studentInstructionsEnabled: boolean;
|
|
29
|
-
teacherInstructions: string;
|
|
30
|
-
teacherInstructionsEnabled: boolean;
|
|
31
|
-
toolbarEditorPosition: string;
|
|
32
|
-
selectedAnswerBackgroundColor: string;
|
|
33
|
-
keyboardEventsEnabled: boolean;
|
|
34
|
-
};
|
|
35
|
-
configuration: {
|
|
36
|
-
baseInputConfiguration: {
|
|
37
|
-
h3: {
|
|
38
|
-
disabled: boolean;
|
|
39
|
-
};
|
|
40
|
-
audio: {
|
|
41
|
-
disabled: boolean;
|
|
42
|
-
};
|
|
43
|
-
video: {
|
|
44
|
-
disabled: boolean;
|
|
45
|
-
};
|
|
46
|
-
image: {
|
|
47
|
-
disabled: boolean;
|
|
48
|
-
};
|
|
49
|
-
textAlign: {
|
|
50
|
-
disabled: boolean;
|
|
51
|
-
};
|
|
52
|
-
showParagraphs: {
|
|
53
|
-
disabled: boolean;
|
|
54
|
-
};
|
|
55
|
-
separateParagraphs: {
|
|
56
|
-
disabled: boolean;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
choices: {
|
|
60
|
-
inputConfiguration: {
|
|
61
|
-
audio: {
|
|
62
|
-
disabled: boolean;
|
|
63
|
-
};
|
|
64
|
-
video: {
|
|
65
|
-
disabled: boolean;
|
|
66
|
-
};
|
|
67
|
-
image: {
|
|
68
|
-
disabled: boolean;
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
spellCheck: {
|
|
73
|
-
label: string;
|
|
74
|
-
settings: boolean;
|
|
75
|
-
enabled: boolean;
|
|
76
|
-
};
|
|
77
|
-
choicesLayout: {
|
|
78
|
-
settings: boolean;
|
|
79
|
-
label: string;
|
|
80
|
-
};
|
|
81
|
-
gridColumns: {
|
|
82
|
-
label: string;
|
|
83
|
-
};
|
|
84
|
-
answerChoiceCount: number;
|
|
85
|
-
addChoiceButton: {
|
|
86
|
-
settings: boolean;
|
|
87
|
-
label: string;
|
|
88
|
-
};
|
|
89
|
-
choiceMode: {
|
|
90
|
-
settings: boolean;
|
|
91
|
-
label: string;
|
|
92
|
-
};
|
|
93
|
-
choicePrefix: {
|
|
94
|
-
settings: boolean;
|
|
95
|
-
label: string;
|
|
96
|
-
};
|
|
97
|
-
deleteChoice: {
|
|
98
|
-
settings: boolean;
|
|
99
|
-
};
|
|
100
|
-
feedback: {
|
|
101
|
-
settings: boolean;
|
|
102
|
-
label: string;
|
|
103
|
-
};
|
|
104
|
-
prompt: {
|
|
105
|
-
settings: boolean;
|
|
106
|
-
label: string;
|
|
107
|
-
inputConfiguration: {
|
|
108
|
-
audio: {
|
|
109
|
-
disabled: boolean;
|
|
110
|
-
};
|
|
111
|
-
video: {
|
|
112
|
-
disabled: boolean;
|
|
113
|
-
};
|
|
114
|
-
image: {
|
|
115
|
-
disabled: boolean;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
required: boolean;
|
|
119
|
-
};
|
|
120
|
-
lockChoiceOrder: {
|
|
121
|
-
settings: boolean;
|
|
122
|
-
label: string;
|
|
123
|
-
};
|
|
124
|
-
partialScoring: {
|
|
125
|
-
settings: boolean;
|
|
126
|
-
label: string;
|
|
127
|
-
};
|
|
128
|
-
rationale: {
|
|
129
|
-
settings: boolean;
|
|
130
|
-
label: string;
|
|
131
|
-
inputConfiguration: {
|
|
132
|
-
audio: {
|
|
133
|
-
disabled: boolean;
|
|
134
|
-
};
|
|
135
|
-
video: {
|
|
136
|
-
disabled: boolean;
|
|
137
|
-
};
|
|
138
|
-
image: {
|
|
139
|
-
disabled: boolean;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
required: boolean;
|
|
143
|
-
};
|
|
144
|
-
scoringType: {
|
|
145
|
-
settings: boolean;
|
|
146
|
-
label: string;
|
|
147
|
-
};
|
|
148
|
-
studentInstructions: {
|
|
149
|
-
settings: boolean;
|
|
150
|
-
label: string;
|
|
151
|
-
};
|
|
152
|
-
teacherInstructions: {
|
|
153
|
-
settings: boolean;
|
|
154
|
-
label: string;
|
|
155
|
-
inputConfiguration: {
|
|
156
|
-
audio: {
|
|
157
|
-
disabled: boolean;
|
|
158
|
-
};
|
|
159
|
-
video: {
|
|
160
|
-
disabled: boolean;
|
|
161
|
-
};
|
|
162
|
-
image: {
|
|
163
|
-
disabled: boolean;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
required: boolean;
|
|
167
|
-
};
|
|
168
|
-
toolbarEditorPosition: {
|
|
169
|
-
settings: boolean;
|
|
170
|
-
label: string;
|
|
171
|
-
};
|
|
172
|
-
minAnswerChoices: number;
|
|
173
|
-
maxAnswerChoices: number;
|
|
174
|
-
maxImageWidth: {
|
|
175
|
-
teacherInstructions: number;
|
|
176
|
-
prompt: number;
|
|
177
|
-
rationale: number;
|
|
178
|
-
choices: number;
|
|
179
|
-
};
|
|
180
|
-
maxImageHeight: {
|
|
181
|
-
teacherInstructions: number;
|
|
182
|
-
prompt: number;
|
|
183
|
-
rationale: number;
|
|
184
|
-
choices: number;
|
|
185
|
-
};
|
|
186
|
-
withRubric: {
|
|
187
|
-
settings: boolean;
|
|
188
|
-
label: string;
|
|
189
|
-
};
|
|
190
|
-
mathMlOptions: {
|
|
191
|
-
mmlOutput: boolean;
|
|
192
|
-
mmlEditing: boolean;
|
|
193
|
-
};
|
|
194
|
-
language: {
|
|
195
|
-
settings: boolean;
|
|
196
|
-
label: string;
|
|
197
|
-
enabled: boolean;
|
|
198
|
-
};
|
|
199
|
-
languageChoices: {
|
|
200
|
-
label: string;
|
|
201
|
-
options: never[];
|
|
202
|
-
};
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
export default _default;
|
|
206
|
-
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/author/defaults.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACH,wBAyJE"}
|
package/dist/author/defaults.js
DELETED
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
//#region src/author/defaults.ts
|
|
2
|
-
var e = {
|
|
3
|
-
model: {
|
|
4
|
-
choiceMode: "checkbox",
|
|
5
|
-
choicePrefix: "letters",
|
|
6
|
-
choices: [],
|
|
7
|
-
choicesLayout: "vertical",
|
|
8
|
-
feedbackEnabled: !1,
|
|
9
|
-
gridColumns: 2,
|
|
10
|
-
lockChoiceOrder: !0,
|
|
11
|
-
partialScoring: !0,
|
|
12
|
-
prompt: "",
|
|
13
|
-
promptEnabled: !0,
|
|
14
|
-
rationale: "",
|
|
15
|
-
rationaleEnabled: !0,
|
|
16
|
-
scoringType: "auto",
|
|
17
|
-
studentInstructionsEnabled: !0,
|
|
18
|
-
teacherInstructions: "",
|
|
19
|
-
teacherInstructionsEnabled: !0,
|
|
20
|
-
toolbarEditorPosition: "bottom",
|
|
21
|
-
selectedAnswerBackgroundColor: "initial",
|
|
22
|
-
keyboardEventsEnabled: !1
|
|
23
|
-
},
|
|
24
|
-
configuration: {
|
|
25
|
-
baseInputConfiguration: {
|
|
26
|
-
h3: { disabled: !0 },
|
|
27
|
-
audio: { disabled: !1 },
|
|
28
|
-
video: { disabled: !1 },
|
|
29
|
-
image: { disabled: !1 },
|
|
30
|
-
textAlign: { disabled: !0 },
|
|
31
|
-
showParagraphs: { disabled: !1 },
|
|
32
|
-
separateParagraphs: { disabled: !0 }
|
|
33
|
-
},
|
|
34
|
-
choices: { inputConfiguration: {
|
|
35
|
-
audio: { disabled: !1 },
|
|
36
|
-
video: { disabled: !1 },
|
|
37
|
-
image: { disabled: !1 }
|
|
38
|
-
} },
|
|
39
|
-
spellCheck: {
|
|
40
|
-
label: "Spellcheck",
|
|
41
|
-
settings: !1,
|
|
42
|
-
enabled: !0
|
|
43
|
-
},
|
|
44
|
-
choicesLayout: {
|
|
45
|
-
settings: !1,
|
|
46
|
-
label: "Choices Layout"
|
|
47
|
-
},
|
|
48
|
-
gridColumns: { label: "Grid columns" },
|
|
49
|
-
answerChoiceCount: 0,
|
|
50
|
-
addChoiceButton: {
|
|
51
|
-
settings: !0,
|
|
52
|
-
label: "Add a Choice"
|
|
53
|
-
},
|
|
54
|
-
choiceMode: {
|
|
55
|
-
settings: !0,
|
|
56
|
-
label: "Response Type"
|
|
57
|
-
},
|
|
58
|
-
choicePrefix: {
|
|
59
|
-
settings: !0,
|
|
60
|
-
label: "Choice Labels"
|
|
61
|
-
},
|
|
62
|
-
deleteChoice: { settings: !0 },
|
|
63
|
-
feedback: {
|
|
64
|
-
settings: !0,
|
|
65
|
-
label: "Feedback"
|
|
66
|
-
},
|
|
67
|
-
prompt: {
|
|
68
|
-
settings: !0,
|
|
69
|
-
label: "Prompt",
|
|
70
|
-
inputConfiguration: {
|
|
71
|
-
audio: { disabled: !1 },
|
|
72
|
-
video: { disabled: !1 },
|
|
73
|
-
image: { disabled: !1 }
|
|
74
|
-
},
|
|
75
|
-
required: !1
|
|
76
|
-
},
|
|
77
|
-
lockChoiceOrder: {
|
|
78
|
-
settings: !0,
|
|
79
|
-
label: "Lock Choice Order"
|
|
80
|
-
},
|
|
81
|
-
partialScoring: {
|
|
82
|
-
settings: !1,
|
|
83
|
-
label: "Allow Partial Scoring"
|
|
84
|
-
},
|
|
85
|
-
rationale: {
|
|
86
|
-
settings: !0,
|
|
87
|
-
label: "Rationale",
|
|
88
|
-
inputConfiguration: {
|
|
89
|
-
audio: { disabled: !0 },
|
|
90
|
-
video: { disabled: !0 },
|
|
91
|
-
image: { disabled: !1 }
|
|
92
|
-
},
|
|
93
|
-
required: !1
|
|
94
|
-
},
|
|
95
|
-
scoringType: {
|
|
96
|
-
settings: !1,
|
|
97
|
-
label: "Scoring Type"
|
|
98
|
-
},
|
|
99
|
-
studentInstructions: {
|
|
100
|
-
settings: !1,
|
|
101
|
-
label: "Student Instructions"
|
|
102
|
-
},
|
|
103
|
-
teacherInstructions: {
|
|
104
|
-
settings: !0,
|
|
105
|
-
label: "Teacher Instructions",
|
|
106
|
-
inputConfiguration: {
|
|
107
|
-
audio: { disabled: !1 },
|
|
108
|
-
video: { disabled: !1 },
|
|
109
|
-
image: { disabled: !1 }
|
|
110
|
-
},
|
|
111
|
-
required: !1
|
|
112
|
-
},
|
|
113
|
-
toolbarEditorPosition: {
|
|
114
|
-
settings: !1,
|
|
115
|
-
label: "Toolbar Editor Position"
|
|
116
|
-
},
|
|
117
|
-
minAnswerChoices: 2,
|
|
118
|
-
maxAnswerChoices: 5,
|
|
119
|
-
maxImageWidth: {
|
|
120
|
-
teacherInstructions: 300,
|
|
121
|
-
prompt: 300,
|
|
122
|
-
rationale: 636,
|
|
123
|
-
choices: 900
|
|
124
|
-
},
|
|
125
|
-
maxImageHeight: {
|
|
126
|
-
teacherInstructions: 300,
|
|
127
|
-
prompt: 300,
|
|
128
|
-
rationale: 300,
|
|
129
|
-
choices: 300
|
|
130
|
-
},
|
|
131
|
-
withRubric: {
|
|
132
|
-
settings: !1,
|
|
133
|
-
label: "Add Rubric"
|
|
134
|
-
},
|
|
135
|
-
mathMlOptions: {
|
|
136
|
-
mmlOutput: !1,
|
|
137
|
-
mmlEditing: !1
|
|
138
|
-
},
|
|
139
|
-
language: {
|
|
140
|
-
settings: !1,
|
|
141
|
-
label: "Specify Language",
|
|
142
|
-
enabled: !1
|
|
143
|
-
},
|
|
144
|
-
languageChoices: {
|
|
145
|
-
label: "Language Choices",
|
|
146
|
-
options: []
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
//#endregion
|
|
151
|
-
export { e as default };
|
package/dist/author/index.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/multiple-choice/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 MultipleChoice extends HTMLElement {
|
|
10
|
-
static createDefaultModel: (model?: {}) => any;
|
|
11
|
-
constructor();
|
|
12
|
-
set model(s: any);
|
|
13
|
-
set configuration(c: any);
|
|
14
|
-
set disableSidePanel(s: any);
|
|
15
|
-
dispatchModelUpdated(reset: any): void;
|
|
16
|
-
onModelChanged(m: any, reset: any): void;
|
|
17
|
-
onConfigurationChanged(c: any): void;
|
|
18
|
-
/** @param {done, progress, file} handler */
|
|
19
|
-
insertImage(handler: any): void;
|
|
20
|
-
onDeleteImage(src: any, done: any): void;
|
|
21
|
-
insertSound(handler: any): void;
|
|
22
|
-
onDeleteSound(src: any, done: any): void;
|
|
23
|
-
_render(): void;
|
|
24
|
-
connectedCallback(): void;
|
|
25
|
-
disconnectedCallback(): void;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/author/index.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAyDH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,WAAW;IACrD,MAAM,CAAC,kBAAkB,GAAI,UAAU,SAYrC;;IAYF,IAAI,KAAK,CAAC,CAAC,KAAA,EAIV;IAED,IAAI,aAAa,CAAC,CAAC,KAAA,EAuClB;IAED,IAAI,gBAAgB,CAAC,CAAC,KAAA,EAGrB;IAED,oBAAoB,CAAC,KAAK,KAAA;IAM1B,cAAc,CAAC,CAAC,KAAA,EAAE,KAAK,KAAA;IAOvB,sBAAsB,CAAC,CAAC,KAAA;IAUxB,4CAA4C;IAC5C,WAAW,CAAC,OAAO,KAAA;IAInB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAIvB,WAAW,CAAC,OAAO,KAAA;IAInB,aAAa,CAAC,GAAG,KAAA,EAAE,IAAI,KAAA;IAIvB,OAAO;IA8CP,iBAAiB;IAMjB,oBAAoB;CAWrB"}
|
package/dist/author/index.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import e from "../node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js";
|
|
2
|
-
import t from "./main.js";
|
|
3
|
-
import n from "./defaults.js";
|
|
4
|
-
import r from "react";
|
|
5
|
-
import { createRoot as i } from "react-dom/client";
|
|
6
|
-
import a from "debug";
|
|
7
|
-
import { DeleteImageEvent as o, DeleteSoundEvent as s, InsertImageEvent as c, InsertSoundEvent as l, ModelUpdatedEvent as u } from "@pie-element/shared-configure-events";
|
|
8
|
-
import { choiceUtils as d } from "@pie-lib/config-ui";
|
|
9
|
-
//#region src/author/index.ts
|
|
10
|
-
var f = a("multiple-choice:configure"), p = (e, t = 0) => {
|
|
11
|
-
if (!e || e.length === 0) {
|
|
12
|
-
let e = [];
|
|
13
|
-
for (let n = 0; n < t; n++) e.push({
|
|
14
|
-
value: `${n}`,
|
|
15
|
-
label: "",
|
|
16
|
-
feedback: {
|
|
17
|
-
type: "none",
|
|
18
|
-
value: ""
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
return e;
|
|
22
|
-
}
|
|
23
|
-
return e;
|
|
24
|
-
}, m = (t, r) => {
|
|
25
|
-
let i = e(t, n.configuration);
|
|
26
|
-
return {
|
|
27
|
-
configuration: i,
|
|
28
|
-
model: {
|
|
29
|
-
...r,
|
|
30
|
-
choices: p(r && r.choices || [], i && i.answerChoiceCount)
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
}, h = class e extends HTMLElement {
|
|
34
|
-
static createDefaultModel = (e = {}) => {
|
|
35
|
-
let t = d.normalizeChoices({
|
|
36
|
-
...n.model,
|
|
37
|
-
...e,
|
|
38
|
-
choices: p(e && e.choices || [])
|
|
39
|
-
});
|
|
40
|
-
return t.choicesLayout = e.choicesLayout || e.verticalMode === !1 && "horizontal" || n.model.choicesLayout, t;
|
|
41
|
-
};
|
|
42
|
-
constructor() {
|
|
43
|
-
super(), this._root = null, this._reactContainer = null, this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onModelChanged = this.onModelChanged.bind(this), this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
44
|
-
}
|
|
45
|
-
set model(t) {
|
|
46
|
-
this._model = e.createDefaultModel(t), this._render();
|
|
47
|
-
}
|
|
48
|
-
set configuration(e) {
|
|
49
|
-
let t = m(e, this._model);
|
|
50
|
-
this.onModelChanged(t.model);
|
|
51
|
-
let r = {
|
|
52
|
-
...n.configuration,
|
|
53
|
-
...t.configuration
|
|
54
|
-
};
|
|
55
|
-
this._configuration = r, r?.language?.enabled ? r?.languageChoices?.options?.length && (this._model.language = r?.languageChoices.options[0].value) : r.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
|
|
56
|
-
value: this._model.language,
|
|
57
|
-
label: this._model.language
|
|
58
|
-
})) : delete this._model.language, this._render();
|
|
59
|
-
}
|
|
60
|
-
set disableSidePanel(e) {
|
|
61
|
-
this._disableSidePanel = e, this._render();
|
|
62
|
-
}
|
|
63
|
-
dispatchModelUpdated(e) {
|
|
64
|
-
let t = !!e;
|
|
65
|
-
this.dispatchEvent(new u(this._model, t));
|
|
66
|
-
}
|
|
67
|
-
onModelChanged(e, t) {
|
|
68
|
-
this._model = e, this._render(), this.dispatchModelUpdated(t);
|
|
69
|
-
}
|
|
70
|
-
onConfigurationChanged(e) {
|
|
71
|
-
this._configuration = m(e, this._model).configuration, this._model && this.onModelChanged(this._model), this._render();
|
|
72
|
-
}
|
|
73
|
-
insertImage(e) {
|
|
74
|
-
this.dispatchEvent(new c(e));
|
|
75
|
-
}
|
|
76
|
-
onDeleteImage(e, t) {
|
|
77
|
-
this.dispatchEvent(new o(e, t));
|
|
78
|
-
}
|
|
79
|
-
insertSound(e) {
|
|
80
|
-
this.dispatchEvent(new l(e));
|
|
81
|
-
}
|
|
82
|
-
onDeleteSound(e, t) {
|
|
83
|
-
this.dispatchEvent(new s(e, t));
|
|
84
|
-
}
|
|
85
|
-
_render() {
|
|
86
|
-
f("_render - Starting render"), f("_render - Model:", this._model ? "present" : "missing"), f("_render - Configuration:", this._configuration ? "present" : "missing"), f("_render - Root exists:", !!this._root);
|
|
87
|
-
try {
|
|
88
|
-
let e = r.createElement(t, {
|
|
89
|
-
model: this._model,
|
|
90
|
-
configuration: this._configuration,
|
|
91
|
-
onModelChanged: this.onModelChanged,
|
|
92
|
-
onConfigurationChanged: this.onConfigurationChanged,
|
|
93
|
-
disableSidePanel: this._disableSidePanel,
|
|
94
|
-
imageSupport: {
|
|
95
|
-
add: this.insertImage.bind(this),
|
|
96
|
-
delete: this.onDeleteImage.bind(this)
|
|
97
|
-
},
|
|
98
|
-
uploadSoundSupport: {
|
|
99
|
-
add: this.insertSound.bind(this),
|
|
100
|
-
delete: this.onDeleteSound.bind(this)
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
this._root || (f("_render - Creating React container"), this._reactContainer = document.createElement("div"), this._reactContainer.className = "pie-configure-wrapper", this.appendChild(this._reactContainer), f("_render - Creating new React root"), this._root = i(this._reactContainer), f("_render - React root created successfully")), f("_render - Calling root.render()"), this._root.render(e), f("_render - Render completed successfully");
|
|
104
|
-
} catch (e) {
|
|
105
|
-
throw console.error("❌ [multiple-choice-configure] Render error:", e), console.error("Error stack:", e.stack), e;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
connectedCallback() {
|
|
109
|
-
f("connectedCallback - Component connected to DOM"), f("connectedCallback - Model:", this._model ? "present" : "missing"), f("connectedCallback - Configuration:", this._configuration ? "present" : "missing");
|
|
110
|
-
}
|
|
111
|
-
disconnectedCallback() {
|
|
112
|
-
f("disconnectedCallback - Component disconnected from DOM"), this._root &&= (f("disconnectedCallback - Unmounting React root"), this._root.unmount(), null), this._reactContainer &&= null;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
export { h as default };
|
package/dist/author/main.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @synced-from pie-elements/packages/multiple-choice/configure/src/main.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 Main extends React.Component {
|
|
12
|
-
static propTypes: {
|
|
13
|
-
model: PropTypes.Validator<object>;
|
|
14
|
-
configuration: PropTypes.Validator<object>;
|
|
15
|
-
disableSidePanel: PropTypes.Requireable<boolean>;
|
|
16
|
-
onModelChanged: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
-
onConfigurationChanged: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
-
imageSupport: PropTypes.Requireable<PropTypes.InferProps<{
|
|
19
|
-
add: PropTypes.Validator<(...args: any[]) => any>;
|
|
20
|
-
delete: PropTypes.Validator<(...args: any[]) => any>;
|
|
21
|
-
}>>;
|
|
22
|
-
};
|
|
23
|
-
state: {
|
|
24
|
-
showWarning: boolean;
|
|
25
|
-
};
|
|
26
|
-
onRemoveChoice: any;
|
|
27
|
-
onAddChoice: any;
|
|
28
|
-
onChoiceChanged: any;
|
|
29
|
-
onPromptChanged: any;
|
|
30
|
-
onTeacherInstructionsChanged: any;
|
|
31
|
-
onModelChanged: any;
|
|
32
|
-
render(): React.JSX.Element;
|
|
33
|
-
}
|
|
34
|
-
export default Main;
|
|
35
|
-
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/author/main.tsx"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAoWnC,qBAAa,IAAK,SAAQ,KAAK,CAAC,SAAS;IACvC,MAAM,CAAC,SAAS;;;;;;;;;;MAUd;IAEF,KAAK;;MAA0B;IAE/B,cAAc,EAAE,GAAG,CAYjB;IAEF,WAAW,EAAE,GAAG,CAwBd;IAEF,eAAe,EAAE,GAAG,CASlB;IAEF,eAAe,EAAE,GAAG,CAKlB;IAEF,4BAA4B,EAAE,GAAG,CAK/B;IAEF,cAAc,EAAE,GAAG,CAiCjB;IAEF,MAAM;CAwBP;AAED,eAAe,IAAI,CAAC"}
|