@pie-element/drag-in-the-blank 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/choice.d.ts +23 -0
- package/dist/author/choice.d.ts.map +1 -0
- package/dist/author/choice.js +88 -0
- package/dist/author/choices.d.ts +41 -0
- package/dist/author/choices.d.ts.map +1 -0
- package/dist/author/choices.js +159 -0
- package/dist/author/defaults.d.ts +172 -0
- package/dist/author/defaults.d.ts.map +1 -0
- package/dist/author/defaults.js +123 -0
- package/dist/author/index.d.ts +43 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +92 -0
- package/dist/author/main.d.ts +37 -0
- package/dist/author/main.d.ts.map +1 -0
- package/dist/author/main.js +301 -0
- package/dist/author/markupUtils.d.ts +18 -0
- package/dist/author/markupUtils.d.ts.map +1 -0
- package/dist/author/markupUtils.js +38 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.d.ts.map +1 -0
- package/dist/author/utils.js +7 -0
- package/dist/controller/defaults.d.ts +27 -0
- package/dist/controller/defaults.d.ts.map +1 -0
- package/dist/controller/defaults.js +20 -0
- package/dist/controller/index.d.ts +42 -0
- package/dist/controller/index.d.ts.map +1 -0
- package/dist/controller/index.js +104 -0
- package/dist/controller/utils.d.ts +14 -0
- package/dist/controller/utils.d.ts.map +1 -0
- package/dist/controller/utils.js +15 -0
- package/dist/delivery/index.d.ts +22 -0
- package/dist/delivery/index.d.ts.map +1 -0
- package/dist/delivery/index.js +105 -0
- package/dist/delivery/main.d.ts +29 -0
- package/dist/delivery/main.d.ts.map +1 -0
- package/dist/delivery/main.js +83 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.iife.d.ts +9 -0
- package/dist/index.iife.d.ts.map +1 -0
- package/dist/index.iife.js +152 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arrayReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_basePropertyOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseEach.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_escapeHtmlChar.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isIterateeCall.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/defaults.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/escape.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/reduce.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.17.23/node_modules/lodash-es/toString.js +7 -0
- package/package.json +72 -0
- package/src/author/choice.tsx +132 -0
- package/src/author/choices.tsx +314 -0
- package/src/author/defaults.ts +132 -0
- package/src/author/index.tsx +176 -0
- package/src/author/main.tsx +498 -0
- package/src/author/markupUtils.tsx +106 -0
- package/src/author/utils.ts +27 -0
- package/src/controller/defaults.ts +27 -0
- package/src/controller/index.ts +274 -0
- package/src/controller/utils.ts +50 -0
- package/src/delivery/index.ts +266 -0
- package/src/delivery/main.tsx +146 -0
- package/src/index.iife.ts +16 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/drag-in-the-blank/configure/src/defaults.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
model: {
|
|
13
|
+
choices: [],
|
|
14
|
+
choicesPosition: 'below',
|
|
15
|
+
correctResponse: {},
|
|
16
|
+
disabled: false,
|
|
17
|
+
duplicates: true,
|
|
18
|
+
markup: '',
|
|
19
|
+
mode: 'gather',
|
|
20
|
+
prompt: '',
|
|
21
|
+
promptEnabled: true,
|
|
22
|
+
rationale: '',
|
|
23
|
+
rationaleEnabled: true,
|
|
24
|
+
studentInstructionsEnabled: true,
|
|
25
|
+
teacherInstructions: '',
|
|
26
|
+
teacherInstructionsEnabled: true,
|
|
27
|
+
toolbarEditorPosition: 'bottom',
|
|
28
|
+
},
|
|
29
|
+
configuration: {
|
|
30
|
+
baseInputConfiguration: {
|
|
31
|
+
audio: { disabled: false },
|
|
32
|
+
video: { disabled: false },
|
|
33
|
+
image: { disabled: false },
|
|
34
|
+
h3: { disabled: true },
|
|
35
|
+
blockquote: { disabled: true },
|
|
36
|
+
textAlign: { disabled: true },
|
|
37
|
+
showParagraphs: { disabled: false },
|
|
38
|
+
separateParagraphs: { disabled: true },
|
|
39
|
+
},
|
|
40
|
+
spellCheck: {
|
|
41
|
+
label: 'Spellcheck',
|
|
42
|
+
settings: false,
|
|
43
|
+
enabled: true,
|
|
44
|
+
},
|
|
45
|
+
choicesPosition: {
|
|
46
|
+
settings: true,
|
|
47
|
+
label: 'Choices Position',
|
|
48
|
+
},
|
|
49
|
+
prompt: {
|
|
50
|
+
settings: true,
|
|
51
|
+
label: 'Prompt',
|
|
52
|
+
inputConfiguration: {
|
|
53
|
+
audio: { disabled: false },
|
|
54
|
+
video: { disabled: false },
|
|
55
|
+
image: { disabled: false },
|
|
56
|
+
},
|
|
57
|
+
required: false,
|
|
58
|
+
},
|
|
59
|
+
addChoice: {
|
|
60
|
+
inputConfiguration: {
|
|
61
|
+
audio: { disabled: true },
|
|
62
|
+
video: { disabled: true },
|
|
63
|
+
image: { disabled: false },
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
duplicates: {
|
|
67
|
+
settings: true,
|
|
68
|
+
label: 'Duplicates',
|
|
69
|
+
},
|
|
70
|
+
lockChoiceOrder: {
|
|
71
|
+
settings: true,
|
|
72
|
+
label: 'Lock Choice Order',
|
|
73
|
+
},
|
|
74
|
+
partialScoring: {
|
|
75
|
+
settings: false,
|
|
76
|
+
label: 'Allow Partial Scoring',
|
|
77
|
+
},
|
|
78
|
+
rationale: {
|
|
79
|
+
settings: true,
|
|
80
|
+
label: 'Rationale',
|
|
81
|
+
inputConfiguration: {
|
|
82
|
+
audio: { disabled: false },
|
|
83
|
+
video: { disabled: false },
|
|
84
|
+
image: { disabled: false },
|
|
85
|
+
},
|
|
86
|
+
required: false,
|
|
87
|
+
},
|
|
88
|
+
settingsPanelDisabled: false,
|
|
89
|
+
teacherInstructions: {
|
|
90
|
+
settings: true,
|
|
91
|
+
label: 'Teacher Instructions',
|
|
92
|
+
inputConfiguration: {
|
|
93
|
+
audio: { disabled: false },
|
|
94
|
+
video: { disabled: false },
|
|
95
|
+
image: { disabled: false },
|
|
96
|
+
},
|
|
97
|
+
required: false,
|
|
98
|
+
},
|
|
99
|
+
minChoices: 2,
|
|
100
|
+
maxResponseAreas: 10,
|
|
101
|
+
maxImageWidth: {
|
|
102
|
+
teacherInstructions: 300,
|
|
103
|
+
prompt: 300,
|
|
104
|
+
rationale: 300,
|
|
105
|
+
choice: 300,
|
|
106
|
+
},
|
|
107
|
+
maxImageHeight: {
|
|
108
|
+
teacherInstructions: 300,
|
|
109
|
+
prompt: 300,
|
|
110
|
+
rationale: 300,
|
|
111
|
+
choice: 300,
|
|
112
|
+
},
|
|
113
|
+
withRubric: {
|
|
114
|
+
settings: false,
|
|
115
|
+
label: 'Add Rubric',
|
|
116
|
+
},
|
|
117
|
+
mathMlOptions: {
|
|
118
|
+
mmlOutput: false,
|
|
119
|
+
mmlEditing: false,
|
|
120
|
+
},
|
|
121
|
+
language: {
|
|
122
|
+
settings: false,
|
|
123
|
+
label: 'Specify Language',
|
|
124
|
+
enabled: false,
|
|
125
|
+
},
|
|
126
|
+
languageChoices: {
|
|
127
|
+
label: 'Language Choices',
|
|
128
|
+
options: [],
|
|
129
|
+
},
|
|
130
|
+
maxLength: 200
|
|
131
|
+
},
|
|
132
|
+
};
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* @synced-from pie-elements/packages/drag-in-the-blank/configure/src/index.js
|
|
4
|
+
* @auto-generated
|
|
5
|
+
*
|
|
6
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
7
|
+
* Manual edits will be overwritten on next sync.
|
|
8
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
ModelUpdatedEvent,
|
|
13
|
+
DeleteImageEvent,
|
|
14
|
+
InsertImageEvent,
|
|
15
|
+
InsertSoundEvent,
|
|
16
|
+
DeleteSoundEvent,
|
|
17
|
+
} from '@pie-element/shared-configure-events';
|
|
18
|
+
|
|
19
|
+
import React from 'react';
|
|
20
|
+
import { createRoot } from 'react-dom/client';
|
|
21
|
+
import { renderMath } from '@pie-element/shared-math-rendering-mathjax';
|
|
22
|
+
import Main from './main.js';
|
|
23
|
+
import debug from 'debug';
|
|
24
|
+
import { defaults } from 'lodash-es';
|
|
25
|
+
|
|
26
|
+
import sensibleDefaults from './defaults.js';
|
|
27
|
+
import { processMarkup, createSlateMarkup } from './markupUtils.js';
|
|
28
|
+
|
|
29
|
+
const log = debug('multiple-choice:configure');
|
|
30
|
+
|
|
31
|
+
export default class DragInTheBlank extends HTMLElement {
|
|
32
|
+
static prepareModel = (model = {}) => {
|
|
33
|
+
const joinedObj = {
|
|
34
|
+
...sensibleDefaults.model,
|
|
35
|
+
...model,
|
|
36
|
+
};
|
|
37
|
+
const slateMarkup =
|
|
38
|
+
model.slateMarkup || createSlateMarkup(joinedObj.markup, joinedObj.choices, joinedObj.correctResponse);
|
|
39
|
+
const processedMarkup = processMarkup(slateMarkup);
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
...joinedObj,
|
|
43
|
+
slateMarkup,
|
|
44
|
+
markup: processedMarkup.markup,
|
|
45
|
+
correctResponse: processedMarkup.correctResponse,
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
constructor() {
|
|
50
|
+
super();
|
|
51
|
+
this._root = null;
|
|
52
|
+
this._model = DragInTheBlank.prepareModel();
|
|
53
|
+
this._configuration = sensibleDefaults.configuration;
|
|
54
|
+
this.onModelChanged = this.onModelChanged.bind(this);
|
|
55
|
+
this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
set model(m) {
|
|
59
|
+
const formModel = {
|
|
60
|
+
...m,
|
|
61
|
+
markup: `<div>${m.markup || sensibleDefaults.model.markup}</div>`,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
this._model = DragInTheBlank.prepareModel(formModel);
|
|
65
|
+
this._render();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
set configuration(c) {
|
|
69
|
+
const newConfiguration = defaults(c, sensibleDefaults.configuration);
|
|
70
|
+
|
|
71
|
+
this._configuration = newConfiguration;
|
|
72
|
+
|
|
73
|
+
// if language:enabled is true, then the corresponding default item model should include a language value;
|
|
74
|
+
// if it is false, then the language field should be omitted from the item model.
|
|
75
|
+
// if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,
|
|
76
|
+
// then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).
|
|
77
|
+
if (newConfiguration?.language?.enabled) {
|
|
78
|
+
if (newConfiguration?.languageChoices?.options?.length) {
|
|
79
|
+
this._model.language = newConfiguration?.languageChoices.options[0].value;
|
|
80
|
+
}
|
|
81
|
+
} else if (newConfiguration.language.settings && this._model.language) {
|
|
82
|
+
this._configuration.language.enabled = true;
|
|
83
|
+
|
|
84
|
+
if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {
|
|
85
|
+
this._configuration.languageChoices.options = [];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// check if the language is already included in the languageChoices.options array
|
|
89
|
+
// and if not, then add it.
|
|
90
|
+
if (!this._configuration.languageChoices.options.find(option => option.value === this._model.language)) {
|
|
91
|
+
this._configuration.languageChoices.options.push({
|
|
92
|
+
value: this._model.language,
|
|
93
|
+
label: this._model.language,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
delete this._model.language;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
this._render();
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
set disableSidePanel(s) {
|
|
104
|
+
this._disableSidePanel = s;
|
|
105
|
+
this._render();
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
dispatchModelUpdated(reset) {
|
|
109
|
+
const resetValue = !!reset;
|
|
110
|
+
|
|
111
|
+
this.dispatchEvent(new ModelUpdatedEvent(this._model, resetValue));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
onModelChanged(m, reset) {
|
|
115
|
+
this._model = DragInTheBlank.prepareModel(m);
|
|
116
|
+
this._render();
|
|
117
|
+
this.dispatchModelUpdated(reset);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
onConfigurationChanged(c) {
|
|
121
|
+
this._configuration = c;
|
|
122
|
+
this._render();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @param {done, progress, file} handler */
|
|
126
|
+
insertImage(handler) {
|
|
127
|
+
this.dispatchEvent(new InsertImageEvent(handler));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
onDeleteImage(src, done) {
|
|
131
|
+
this.dispatchEvent(new DeleteImageEvent(src, done));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
insertSound(handler) {
|
|
135
|
+
this.dispatchEvent(new InsertSoundEvent(handler));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
onDeleteSound(src, done) {
|
|
139
|
+
this.dispatchEvent(new DeleteSoundEvent(src, done));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
_render() {
|
|
143
|
+
log('_render');
|
|
144
|
+
|
|
145
|
+
let element = React.createElement(Main, {
|
|
146
|
+
model: this._model,
|
|
147
|
+
configuration: this._configuration,
|
|
148
|
+
onModelChanged: this.onModelChanged,
|
|
149
|
+
onConfigurationChanged: this.onConfigurationChanged,
|
|
150
|
+
disableSidePanel: this._disableSidePanel,
|
|
151
|
+
imageSupport: {
|
|
152
|
+
add: this.insertImage.bind(this),
|
|
153
|
+
delete: this.onDeleteImage.bind(this),
|
|
154
|
+
},
|
|
155
|
+
uploadSoundSupport: {
|
|
156
|
+
add: this.insertSound.bind(this),
|
|
157
|
+
delete: this.onDeleteSound.bind(this),
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
if (!this._root) {
|
|
162
|
+
this._root = createRoot(this);
|
|
163
|
+
}
|
|
164
|
+
this._root.render(element);
|
|
165
|
+
|
|
166
|
+
setTimeout(() => {
|
|
167
|
+
renderMath(this);
|
|
168
|
+
}, 0);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
disconnectedCallback() {
|
|
172
|
+
if (this._root) {
|
|
173
|
+
this._root.unmount();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|