@pie-element/image-cloze-association 10.1.0-next.19 → 10.1.1-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/dist/author/defaults.d.ts +88 -0
- package/dist/author/defaults.js +58 -0
- package/dist/author/index.d.ts +34 -0
- package/dist/author/index.js +71 -0
- package/dist/author/root.d.ts +14 -0
- package/dist/author/root.js +80 -0
- package/dist/controller/defaults.d.ts +16 -0
- package/dist/controller/defaults.js +10 -0
- package/dist/controller/index.d.ts +23 -0
- package/dist/controller/index.js +124 -0
- package/dist/controller/utils.d.ts +14 -0
- package/dist/controller/utils.js +36 -0
- package/dist/delivery/constants.d.ts +14 -0
- package/dist/delivery/evaluation-icon.d.ts +28 -0
- package/dist/delivery/evaluation-icon.js +38 -0
- package/dist/delivery/image-container.d.ts +13 -0
- package/dist/delivery/image-container.js +61 -0
- package/dist/delivery/image-drop-target.d.ts +45 -0
- package/dist/delivery/image-drop-target.js +90 -0
- package/dist/delivery/index.d.ts +20 -0
- package/dist/delivery/index.js +110 -0
- package/dist/delivery/interactive-section.d.ts +15 -0
- package/dist/delivery/interactive-section.js +72 -0
- package/dist/delivery/possible-response.d.ts +34 -0
- package/dist/delivery/possible-response.js +100 -0
- package/dist/delivery/possible-responses.d.ts +31 -0
- package/dist/delivery/possible-responses.js +41 -0
- package/dist/delivery/root.d.ts +21 -0
- package/dist/delivery/root.js +279 -0
- package/dist/delivery/static-html-span.d.ts +14 -0
- package/dist/delivery/static-html-span.js +22 -0
- package/dist/delivery/utils-correctness.d.ts +10 -0
- package/dist/delivery/utils-correctness.js +43 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +152 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayAggregator.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAggregator.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +26 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAggregator.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +18 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatMap.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/groupBy.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +8 -0
- package/package.json +59 -20
- package/CHANGELOG.json +0 -437
- package/CHANGELOG.md +0 -1977
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -197
- package/configure/CHANGELOG.md +0 -1583
- package/configure/lib/defaults.js +0 -86
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/index.js +0 -99
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/root.js +0 -135
- package/configure/lib/root.js.map +0 -1
- package/configure/package.json +0 -23
- package/configure/src/__tests__/index.test.js +0 -155
- package/configure/src/defaults.js +0 -59
- package/configure/src/index.js +0 -114
- package/configure/src/root.jsx +0 -116
- package/controller/CHANGELOG.json +0 -137
- package/controller/CHANGELOG.md +0 -1138
- package/controller/lib/defaults.js +0 -14
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -304
- package/controller/lib/index.js.map +0 -1
- package/controller/lib/utils.js +0 -70
- package/controller/lib/utils.js.map +0 -1
- package/controller/package.json +0 -19
- package/controller/src/__tests__/index.test.js +0 -711
- package/controller/src/defaults.js +0 -7
- package/controller/src/index.js +0 -322
- package/controller/src/utils.js +0 -72
- package/docs/config-schema.json +0 -1382
- package/docs/config-schema.json.md +0 -1021
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -74
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -16
- package/docs/pie-schema.json +0 -1085
- package/docs/pie-schema.json.md +0 -810
- package/lib/constants.js +0 -12
- package/lib/constants.js.map +0 -1
- package/lib/evaluation-icon.js +0 -60
- package/lib/evaluation-icon.js.map +0 -1
- package/lib/image-container.js +0 -94
- package/lib/image-container.js.map +0 -1
- package/lib/image-drop-target.js +0 -130
- package/lib/image-drop-target.js.map +0 -1
- package/lib/index.js +0 -220
- package/lib/index.js.map +0 -1
- package/lib/interactive-section.js +0 -104
- package/lib/interactive-section.js.map +0 -1
- package/lib/possible-response.js +0 -161
- package/lib/possible-response.js.map +0 -1
- package/lib/possible-responses.js +0 -58
- package/lib/possible-responses.js.map +0 -1
- package/lib/root.js +0 -491
- package/lib/root.js.map +0 -1
- package/lib/static-html-span.js +0 -35
- package/lib/static-html-span.js.map +0 -1
- package/lib/utils-correctness.js +0 -89
- package/lib/utils-correctness.js.map +0 -1
- package/src/__tests__/index.test.js +0 -174
- package/src/__tests__/root.test.jsx +0 -99
- package/src/__tests__/utils.test.js +0 -207
- package/src/constants.js +0 -5
- package/src/evaluation-icon.jsx +0 -54
- package/src/image-container.jsx +0 -90
- package/src/image-drop-target.jsx +0 -140
- package/src/index.js +0 -245
- package/src/interactive-section.jsx +0 -94
- package/src/possible-response.jsx +0 -152
- package/src/possible-responses.jsx +0 -52
- package/src/root.jsx +0 -490
- package/src/static-html-span.jsx +0 -30
- package/src/utils-correctness.js +0 -95
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/configure/src/defaults.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
model: {
|
|
11
|
+
rationale: string;
|
|
12
|
+
rationaleEnabled: boolean;
|
|
13
|
+
studentInstructionsEnabled: boolean;
|
|
14
|
+
teacherInstructions: string;
|
|
15
|
+
teacherInstructionsEnabled: boolean;
|
|
16
|
+
};
|
|
17
|
+
configuration: {
|
|
18
|
+
baseInputConfiguration: {
|
|
19
|
+
h3: {
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
};
|
|
22
|
+
audio: {
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
};
|
|
25
|
+
video: {
|
|
26
|
+
disabled: boolean;
|
|
27
|
+
};
|
|
28
|
+
image: {
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
};
|
|
31
|
+
textAlign: {
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
};
|
|
34
|
+
showParagraphs: {
|
|
35
|
+
disabled: boolean;
|
|
36
|
+
};
|
|
37
|
+
separateParagraphs: {
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
maxImageWidth: {
|
|
42
|
+
teacherInstructions: number;
|
|
43
|
+
};
|
|
44
|
+
maxImageHeight: {
|
|
45
|
+
teacherInstructions: number;
|
|
46
|
+
};
|
|
47
|
+
settingsPanelDisabled: boolean;
|
|
48
|
+
spellCheck: {
|
|
49
|
+
label: string;
|
|
50
|
+
settings: boolean;
|
|
51
|
+
enabled: boolean;
|
|
52
|
+
};
|
|
53
|
+
teacherInstructions: {
|
|
54
|
+
settings: boolean;
|
|
55
|
+
label: string;
|
|
56
|
+
inputConfiguration: {
|
|
57
|
+
audio: {
|
|
58
|
+
disabled: boolean;
|
|
59
|
+
};
|
|
60
|
+
video: {
|
|
61
|
+
disabled: boolean;
|
|
62
|
+
};
|
|
63
|
+
image: {
|
|
64
|
+
disabled: boolean;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
required: boolean;
|
|
68
|
+
};
|
|
69
|
+
withRubric: {
|
|
70
|
+
settings: boolean;
|
|
71
|
+
label: string;
|
|
72
|
+
};
|
|
73
|
+
mathMlOptions: {
|
|
74
|
+
mmlOutput: boolean;
|
|
75
|
+
mmlEditing: boolean;
|
|
76
|
+
};
|
|
77
|
+
language: {
|
|
78
|
+
settings: boolean;
|
|
79
|
+
label: string;
|
|
80
|
+
enabled: boolean;
|
|
81
|
+
};
|
|
82
|
+
languageChoices: {
|
|
83
|
+
label: string;
|
|
84
|
+
options: never[];
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
//#region src/author/defaults.ts
|
|
2
|
+
var e = {
|
|
3
|
+
model: {
|
|
4
|
+
rationale: "",
|
|
5
|
+
rationaleEnabled: !0,
|
|
6
|
+
studentInstructionsEnabled: !0,
|
|
7
|
+
teacherInstructions: "",
|
|
8
|
+
teacherInstructionsEnabled: !0
|
|
9
|
+
},
|
|
10
|
+
configuration: {
|
|
11
|
+
baseInputConfiguration: {
|
|
12
|
+
h3: { disabled: !0 },
|
|
13
|
+
audio: { disabled: !1 },
|
|
14
|
+
video: { disabled: !1 },
|
|
15
|
+
image: { disabled: !1 },
|
|
16
|
+
textAlign: { disabled: !0 },
|
|
17
|
+
showParagraphs: { disabled: !1 },
|
|
18
|
+
separateParagraphs: { disabled: !0 }
|
|
19
|
+
},
|
|
20
|
+
maxImageWidth: { teacherInstructions: 300 },
|
|
21
|
+
maxImageHeight: { teacherInstructions: 300 },
|
|
22
|
+
settingsPanelDisabled: !1,
|
|
23
|
+
spellCheck: {
|
|
24
|
+
label: "Spellcheck",
|
|
25
|
+
settings: !1,
|
|
26
|
+
enabled: !0
|
|
27
|
+
},
|
|
28
|
+
teacherInstructions: {
|
|
29
|
+
settings: !0,
|
|
30
|
+
label: "Teacher Instructions",
|
|
31
|
+
inputConfiguration: {
|
|
32
|
+
audio: { disabled: !1 },
|
|
33
|
+
video: { disabled: !1 },
|
|
34
|
+
image: { disabled: !1 }
|
|
35
|
+
},
|
|
36
|
+
required: !1
|
|
37
|
+
},
|
|
38
|
+
withRubric: {
|
|
39
|
+
settings: !1,
|
|
40
|
+
label: "Add Rubric"
|
|
41
|
+
},
|
|
42
|
+
mathMlOptions: {
|
|
43
|
+
mmlOutput: !1,
|
|
44
|
+
mmlEditing: !1
|
|
45
|
+
},
|
|
46
|
+
language: {
|
|
47
|
+
settings: !1,
|
|
48
|
+
label: "Specify Language",
|
|
49
|
+
enabled: !1
|
|
50
|
+
},
|
|
51
|
+
languageChoices: {
|
|
52
|
+
label: "Language Choices",
|
|
53
|
+
options: []
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
//#endregion
|
|
58
|
+
export { e as default };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/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 ImageClozeAssociationConfigure extends HTMLElement {
|
|
10
|
+
static createDefaultModel: (model?: {}) => {
|
|
11
|
+
rationale: string;
|
|
12
|
+
rationaleEnabled: boolean;
|
|
13
|
+
studentInstructionsEnabled: boolean;
|
|
14
|
+
teacherInstructions: string;
|
|
15
|
+
teacherInstructionsEnabled: boolean;
|
|
16
|
+
};
|
|
17
|
+
constructor();
|
|
18
|
+
set model(s: any);
|
|
19
|
+
set configuration(c: any);
|
|
20
|
+
set disableSidePanel(s: any);
|
|
21
|
+
dispatchModelUpdated(reset: any): void;
|
|
22
|
+
onModelChanged(m: any, reset: any): void;
|
|
23
|
+
onConfigurationChanged(config: any): void;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param {done, progress, file} handler
|
|
27
|
+
*/
|
|
28
|
+
insertImage(handler: any): void;
|
|
29
|
+
onDeleteImage(src: any, done: any): void;
|
|
30
|
+
insertSound(handler: any): void;
|
|
31
|
+
onDeleteSound(src: any, done: any): void;
|
|
32
|
+
_render(): void;
|
|
33
|
+
disconnectedCallback(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import e from "./root.js";
|
|
2
|
+
import t from "./defaults.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import { createRoot as r } from "react-dom/client";
|
|
5
|
+
import i from "debug";
|
|
6
|
+
import { DeleteImageEvent as a, DeleteSoundEvent as o, InsertImageEvent as s, InsertSoundEvent as c, ModelUpdatedEvent as l } from "@pie-element/shared-configure-events";
|
|
7
|
+
//#region src/author/index.ts
|
|
8
|
+
var u = i("image-cloze-association:configure"), d = class i extends HTMLElement {
|
|
9
|
+
static createDefaultModel = (e = {}) => ({
|
|
10
|
+
...t.model,
|
|
11
|
+
...e
|
|
12
|
+
});
|
|
13
|
+
constructor() {
|
|
14
|
+
super(), this._root = null, this._model = i.createDefaultModel(), this.onModelChanged = this.onModelChanged.bind(this), this._configuration = t.configuration;
|
|
15
|
+
}
|
|
16
|
+
set model(e) {
|
|
17
|
+
this._model = i.createDefaultModel(e), this._render();
|
|
18
|
+
}
|
|
19
|
+
set configuration(e) {
|
|
20
|
+
this._configuration = e, this._render();
|
|
21
|
+
}
|
|
22
|
+
set disableSidePanel(e) {
|
|
23
|
+
this._disableSidePanel = e, this._render();
|
|
24
|
+
}
|
|
25
|
+
dispatchModelUpdated(e) {
|
|
26
|
+
let t = !!e;
|
|
27
|
+
this.dispatchEvent(new l(this._model, t));
|
|
28
|
+
}
|
|
29
|
+
onModelChanged(e, t) {
|
|
30
|
+
this._model = e, this.dispatchModelUpdated(t), this._render();
|
|
31
|
+
}
|
|
32
|
+
onConfigurationChanged(e) {
|
|
33
|
+
this._configuration = e, this._render();
|
|
34
|
+
}
|
|
35
|
+
insertImage(e) {
|
|
36
|
+
this.dispatchEvent(new s(e));
|
|
37
|
+
}
|
|
38
|
+
onDeleteImage(e, t) {
|
|
39
|
+
this.dispatchEvent(new a(e, t));
|
|
40
|
+
}
|
|
41
|
+
insertSound(e) {
|
|
42
|
+
this.dispatchEvent(new c(e));
|
|
43
|
+
}
|
|
44
|
+
onDeleteSound(e, t) {
|
|
45
|
+
this.dispatchEvent(new o(e, t));
|
|
46
|
+
}
|
|
47
|
+
_render() {
|
|
48
|
+
u("_render");
|
|
49
|
+
let t = n.createElement(e, {
|
|
50
|
+
disableSidePanel: this._disableSidePanel,
|
|
51
|
+
model: this._model,
|
|
52
|
+
configuration: this._configuration,
|
|
53
|
+
onModelChanged: this.onModelChanged.bind(this),
|
|
54
|
+
onConfigurationChanged: this.onConfigurationChanged.bind(this),
|
|
55
|
+
imageSupport: {
|
|
56
|
+
add: this.insertImage.bind(this),
|
|
57
|
+
delete: this.onDeleteImage.bind(this)
|
|
58
|
+
},
|
|
59
|
+
uploadSoundSupport: {
|
|
60
|
+
add: this.insertSound.bind(this),
|
|
61
|
+
delete: this.onDeleteSound.bind(this)
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
this._root ||= r(this), this._root.render(t);
|
|
65
|
+
}
|
|
66
|
+
disconnectedCallback() {
|
|
67
|
+
this._root && this._root.unmount();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//#endregion
|
|
71
|
+
export { d as default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/configure/src/root.jsx
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
import React from 'react';
|
|
10
|
+
export declare class Root extends React.Component {
|
|
11
|
+
onTeacherInstructionsChanged: any;
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
|
+
}
|
|
14
|
+
export default Root;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import e from "react";
|
|
2
|
+
import t from "prop-types";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
import { styled as i } from "@mui/material/styles";
|
|
5
|
+
import { InputContainer as a, layout as o, settings as s } from "@pie-lib/config-ui";
|
|
6
|
+
import c from "@pie-lib/editable-html-tip-tap";
|
|
7
|
+
//#region src/author/root.tsx
|
|
8
|
+
var { Panel: l, toggle: u, dropdown: d } = s, f = i(a)(({ theme: e }) => ({
|
|
9
|
+
width: "100%",
|
|
10
|
+
paddingTop: e.spacing(2),
|
|
11
|
+
marginBottom: e.spacing(2)
|
|
12
|
+
})), p = i("div")(({ theme: e }) => ({
|
|
13
|
+
fontSize: e.typography.fontSize - 2,
|
|
14
|
+
color: e.palette.error.main,
|
|
15
|
+
paddingTop: e.spacing(1)
|
|
16
|
+
})), m = class extends e.Component {
|
|
17
|
+
onTeacherInstructionsChanged = (e) => {
|
|
18
|
+
this.props.onModelChanged({
|
|
19
|
+
...this.props.model,
|
|
20
|
+
teacherInstructions: e
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
render() {
|
|
24
|
+
let { model: e, configuration: t, onModelChanged: i, onConfigurationChanged: a, imageSupport: s, uploadSoundSupport: m } = this.props, { baseInputConfiguration: h = {}, contentDimensions: g = {}, maxImageWidth: _ = {}, maxImageHeight: v = {}, settingsPanelDisabled: y, spellCheck: b = {}, teacherInstructions: x = {}, withRubric: S = {}, mathMlOptions: C = {}, language: w = {}, languageChoices: T = {} } = t || {}, { errors: E = {}, extraCSSRules: D, spellCheckEnabled: O } = e || {}, { teacherInstructions: k } = E, A = {
|
|
25
|
+
teacherInstructionsEnabled: x.settings && u(x.label),
|
|
26
|
+
spellCheckEnabled: b.settings && u(b.label),
|
|
27
|
+
rubricEnabled: S?.settings && u(S?.label),
|
|
28
|
+
"language.enabled": w.settings && u(w.label, !0),
|
|
29
|
+
language: w.settings && w.enabled && d(T.label, T.options)
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ r(o.ConfigLayout, {
|
|
32
|
+
extraCSSRules: D,
|
|
33
|
+
dimensions: g,
|
|
34
|
+
hideSettings: y,
|
|
35
|
+
settings: /* @__PURE__ */ n(l, {
|
|
36
|
+
model: e,
|
|
37
|
+
configuration: t,
|
|
38
|
+
onChangeModel: (e) => i(e),
|
|
39
|
+
onChangeConfiguration: (e) => a(e),
|
|
40
|
+
groups: { Properties: A }
|
|
41
|
+
}),
|
|
42
|
+
children: [e && e.teacherInstructionsEnabled && /* @__PURE__ */ r(f, {
|
|
43
|
+
label: x.label,
|
|
44
|
+
children: [/* @__PURE__ */ n(c, {
|
|
45
|
+
markup: e.teacherInstructions || "",
|
|
46
|
+
onChange: this.onTeacherInstructionsChanged,
|
|
47
|
+
imageSupport: s,
|
|
48
|
+
nonEmpty: !1,
|
|
49
|
+
error: k,
|
|
50
|
+
spellCheck: O,
|
|
51
|
+
pluginProps: ((e = {}) => ({
|
|
52
|
+
...h,
|
|
53
|
+
...e
|
|
54
|
+
}))(x?.inputConfiguration),
|
|
55
|
+
maxImageWidth: _ && _.teacherInstructions,
|
|
56
|
+
maxImageHeight: v && v.teacherInstructions,
|
|
57
|
+
uploadSoundSupport: m,
|
|
58
|
+
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
59
|
+
mathMlOptions: C
|
|
60
|
+
}), k && /* @__PURE__ */ n(p, { children: k })]
|
|
61
|
+
}), /* @__PURE__ */ n("div", { children: "Image cloze association" })]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
m.propTypes = {
|
|
66
|
+
onModelChanged: t.func,
|
|
67
|
+
onConfigurationChanged: t.func,
|
|
68
|
+
model: t.object.isRequired,
|
|
69
|
+
configuration: t.object.isRequired,
|
|
70
|
+
imageSupport: t.shape({
|
|
71
|
+
add: t.func.isRequired,
|
|
72
|
+
delete: t.func.isRequired
|
|
73
|
+
}),
|
|
74
|
+
uploadSoundSupport: t.shape({
|
|
75
|
+
add: t.func.isRequired,
|
|
76
|
+
delete: t.func.isRequired
|
|
77
|
+
})
|
|
78
|
+
};
|
|
79
|
+
//#endregion
|
|
80
|
+
export { m as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/controller/src/defaults.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
rationale: string;
|
|
11
|
+
rationaleEnabled: boolean;
|
|
12
|
+
studentInstructionsEnabled: boolean;
|
|
13
|
+
teacherInstructions: string;
|
|
14
|
+
teacherInstructionsEnabled: boolean;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/controller/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 declare const normalize: (question: any) => any;
|
|
10
|
+
export declare const model: (question: any, session: any, env: any) => Promise<unknown>;
|
|
11
|
+
export declare const isResponseCorrect: (correctResponses: any, session: any) => boolean;
|
|
12
|
+
export declare const getPartialScore: (question: any, session: any) => number;
|
|
13
|
+
/**
|
|
14
|
+
* Generates detailed trace log for scoring evaluation
|
|
15
|
+
* @param {Object} model - the question model
|
|
16
|
+
* @param {Object} session - the student session
|
|
17
|
+
* @param {Object} env - the environment
|
|
18
|
+
* @returns {Array} traceLog - array of trace messages
|
|
19
|
+
*/
|
|
20
|
+
export declare const getLogTrace: (model: any, session: any, env: any) => string[];
|
|
21
|
+
export declare const outcome: (config: any, session: any, env?: {}) => Promise<unknown>;
|
|
22
|
+
export declare const createCorrectResponseSession: (question: any, env: any) => Promise<unknown>;
|
|
23
|
+
export declare const validate: (model?: {}, config?: {}) => {};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
|
|
2
|
+
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
3
|
+
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js";
|
|
4
|
+
import r from "./defaults.js";
|
|
5
|
+
import { getAllUniqueCorrectness as i, getCompleteResponseDetails as a } from "./utils.js";
|
|
6
|
+
import { camelizeKeys as o } from "humps";
|
|
7
|
+
import s from "debug";
|
|
8
|
+
import { partialScoring as c } from "@pie-element/shared-controller-utils";
|
|
9
|
+
//#region src/controller/index.ts
|
|
10
|
+
var l = s("pie-elements:image-cloze-association:controller"), u = (e) => ({
|
|
11
|
+
...r,
|
|
12
|
+
...e
|
|
13
|
+
}), d = (e, t, r) => {
|
|
14
|
+
let i = u(e), s = o(i);
|
|
15
|
+
return new Promise((e) => {
|
|
16
|
+
let o = r.mode === "evaluate", { responseAreasToBeFilled: c, possibleResponses: l, hasUnplacedChoices: u } = a(s.validation, s.possibleResponses), d = {
|
|
17
|
+
disabled: r.mode !== "gather",
|
|
18
|
+
mode: r.mode,
|
|
19
|
+
...s,
|
|
20
|
+
responseCorrect: o ? _(s, t) === 1 : void 0,
|
|
21
|
+
validation: o ? s.validation : void 0,
|
|
22
|
+
responseAreasToBeFilled: c,
|
|
23
|
+
completeResponses: l,
|
|
24
|
+
hasUnplacedChoices: u
|
|
25
|
+
};
|
|
26
|
+
i.shuffle && (d.possibleResponses = n(i.possible_responses)), r.role === "instructor" && (r.mode === "view" || r.mode === "evaluate") ? (d.teacherInstructions = s.teacherInstructionsEnabled ? s.teacherInstructions : null, d.rationale = s.rationale ? s.rationale : null) : (d.teacherInstructions = null, d.rationale = null), e(d);
|
|
27
|
+
});
|
|
28
|
+
}, f = (n, r) => {
|
|
29
|
+
let i = e(n), a = !0, o = 0;
|
|
30
|
+
return !r || t(r) ? !1 : (i.forEach((e) => o += (e.images || []).length), r.answers && o === r.answers.length ? r.answers.forEach((e) => {
|
|
31
|
+
let t = (i[e.containerIndex]?.images || []).indexOf(e.value);
|
|
32
|
+
t >= 0 ? i[e.containerIndex].images.splice(t, 1) : a = !1;
|
|
33
|
+
}) : a = !1, a);
|
|
34
|
+
}, p = (t) => e(t.filter((e) => e.images && e.images.length)), m = (e, t) => {
|
|
35
|
+
let { validation: { altResponses: n } } = e, { validation: { validResponse: { value: r } } } = e, i = f(r, t);
|
|
36
|
+
return !i && n && n.length && n.forEach((e) => {
|
|
37
|
+
f(e.value, t) && (i = !0);
|
|
38
|
+
}), i;
|
|
39
|
+
}, h = (e, t, n) => {
|
|
40
|
+
let r = t.filter((t) => t.containerIndex === e), i = r.filter((e) => !e.isCorrect), a = (n.value[e].images || []).length;
|
|
41
|
+
if (r.length > a) {
|
|
42
|
+
let e = r.length - a;
|
|
43
|
+
return i.slice(-e);
|
|
44
|
+
}
|
|
45
|
+
return [];
|
|
46
|
+
}, g = (e, n) => {
|
|
47
|
+
let { validation: { validResponse: r }, maxResponsePerZone: a } = e, o = 0, s = 0, c = 0;
|
|
48
|
+
if (!n || t(n)) return 0;
|
|
49
|
+
if (r.value.forEach((e) => c += (e.images || []).length), n.answers && n.answers.length) {
|
|
50
|
+
let e = i(n.answers, r.value);
|
|
51
|
+
o = e.filter((e) => e.isCorrect).length, s = e.filter((e) => !e.isCorrect).length, n.answers.forEach((t) => {
|
|
52
|
+
if (a > 1) {
|
|
53
|
+
let n = h(t.containerIndex, e, r);
|
|
54
|
+
n.length && n.forEach((e) => {
|
|
55
|
+
e.id === t.id && --o;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}), (!a || a <= 1) && (o -= s);
|
|
59
|
+
} else o = 0;
|
|
60
|
+
o = o < 0 ? 0 : o;
|
|
61
|
+
let l = p(r.value), u = a > 1 ? c : (l || []).length, d = (o / u).toFixed(2);
|
|
62
|
+
return parseFloat(d);
|
|
63
|
+
}, _ = (e, t, n = {}) => {
|
|
64
|
+
let r = c.enabled(e, n), i = m(e, t);
|
|
65
|
+
return r ? g(e, t) : +!!i;
|
|
66
|
+
}, v = (e, t, n) => {
|
|
67
|
+
let r = [], { answers: i } = t || {}, a = e.validation?.validResponse?.value || [], o = a.length;
|
|
68
|
+
if (r.push(`${o} placement container(s) defined in this question.`), i && i.length > 0) {
|
|
69
|
+
r.push(`Student placed ${i.length} image(s) into placement containers.`);
|
|
70
|
+
let e = {};
|
|
71
|
+
i.forEach((t) => {
|
|
72
|
+
e[t.containerIndex] || (e[t.containerIndex] = []), e[t.containerIndex].push(t.value);
|
|
73
|
+
}), a.forEach((t, n) => {
|
|
74
|
+
let i = t.images || [], a = e[n] || [];
|
|
75
|
+
if (i.length > 0) if (a.length === 0) r.push(`Container ${n + 1}: student left empty (should contain ${i.length} image(s)).`);
|
|
76
|
+
else {
|
|
77
|
+
let e = a.filter((e) => i.includes(e)).length, t = a.length - e;
|
|
78
|
+
e > 0 && t === 0 ? r.push(`Container ${n + 1}: student placed ${e} correct image(s).`) : e === 0 && t > 0 ? r.push(`Container ${n + 1}: student placed ${t} incorrect image(s).`) : r.push(`Container ${n + 1}: student placed ${e} correct and ${t} incorrect image(s).`);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
} else r.push("Student did not place any images into placement containers.");
|
|
82
|
+
let s = e.validation?.altResponses || [];
|
|
83
|
+
s.length > 0 && r.push(`${s.length} alternate response combination(s) are accepted for this question.`);
|
|
84
|
+
let l = c.enabled(e, n) ? "partial scoring" : "all-or-nothing scoring";
|
|
85
|
+
r.push(`Score calculated using ${l}.`);
|
|
86
|
+
let u = _(e, t, n);
|
|
87
|
+
return r.push(`Final score: ${u}.`), r;
|
|
88
|
+
}, y = (e, n, r = {}) => new Promise((i) => {
|
|
89
|
+
if (l("outcome..."), !n || t(n)) i({
|
|
90
|
+
score: 0,
|
|
91
|
+
empty: !0,
|
|
92
|
+
traceLog: ["Student did not place any images into placement containers. Score is 0."]
|
|
93
|
+
});
|
|
94
|
+
else {
|
|
95
|
+
let t = o(e), a = v(t, n, r);
|
|
96
|
+
i({
|
|
97
|
+
score: _(t, n, r),
|
|
98
|
+
empty: !1,
|
|
99
|
+
traceLog: a
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}), b = (e, t) => new Promise((n) => {
|
|
103
|
+
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
104
|
+
let { validation: { valid_response: { value: t } } } = e, r = [];
|
|
105
|
+
t && t.forEach((e, t) => {
|
|
106
|
+
(e.images || []).forEach((e) => {
|
|
107
|
+
r.push({
|
|
108
|
+
value: e,
|
|
109
|
+
containerIndex: t
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}), n({
|
|
113
|
+
answers: r,
|
|
114
|
+
id: "1"
|
|
115
|
+
});
|
|
116
|
+
} else n(null);
|
|
117
|
+
}), x = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), S = (e = {}, t = {}) => {
|
|
118
|
+
let n = {};
|
|
119
|
+
return ["teacherInstructions"].forEach((r) => {
|
|
120
|
+
t[r]?.required && !x(e[r]) && (n[r] = "This field is required.");
|
|
121
|
+
}), n;
|
|
122
|
+
};
|
|
123
|
+
//#endregion
|
|
124
|
+
export { b as createCorrectResponseSession, v as getLogTrace, g as getPartialScore, f as isResponseCorrect, d as model, u as normalize, y as outcome, S as validate };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/controller/src/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 getAllUniqueCorrectness: (answers: any, validResponses: any) => any;
|
|
10
|
+
export declare const getCompleteResponseDetails: (validation: any, allChoices: any) => {
|
|
11
|
+
responseAreasToBeFilled: any;
|
|
12
|
+
possibleResponses: any[];
|
|
13
|
+
hasUnplacedChoices: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/controller/utils.ts
|
|
2
|
+
var e = (e, t) => (e || []).map((e) => ({
|
|
3
|
+
...e,
|
|
4
|
+
isCorrect: (t[e.containerIndex] && t[e.containerIndex].images || []).includes(e.value)
|
|
5
|
+
})), t = (e, t) => (t[e.containerIndex] && t[e.containerIndex].images || []).filter((t) => t === e.value), n = (n, r) => {
|
|
6
|
+
let i = e(n, r);
|
|
7
|
+
return n.forEach((e) => {
|
|
8
|
+
let a = n.filter((t) => t.value === e.value && t.containerIndex === e.containerIndex);
|
|
9
|
+
a.length > 1 && (a.shift(), a.forEach((e, n) => {
|
|
10
|
+
i = (i || []).map((i) => {
|
|
11
|
+
if (i.id === e.id) {
|
|
12
|
+
let e = t(i, r);
|
|
13
|
+
return {
|
|
14
|
+
...i,
|
|
15
|
+
isCorrect: e.length > n + 1
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
return i;
|
|
19
|
+
});
|
|
20
|
+
}));
|
|
21
|
+
}), i;
|
|
22
|
+
}, r = (e, t) => {
|
|
23
|
+
let n = (e) => (e?.value || []).map((e) => e.images), r = (e) => (e || []).filter((e) => e.length).length, { validResponse: i, altResponses: a } = e || {}, o = n(i), s = [o.flat()], c = r(o);
|
|
24
|
+
(a || []).forEach((e) => {
|
|
25
|
+
let t = n(e), i = r(t);
|
|
26
|
+
s.push(t.flat()), i < c && (c = i);
|
|
27
|
+
});
|
|
28
|
+
let l = s.some((e) => !t.every((t) => e.includes(t)));
|
|
29
|
+
return {
|
|
30
|
+
responseAreasToBeFilled: c,
|
|
31
|
+
possibleResponses: s,
|
|
32
|
+
hasUnplacedChoices: l
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { n as getAllUniqueCorrectness, r as getCompleteResponseDetails };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/constants.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
declare const _default: {
|
|
10
|
+
types: {
|
|
11
|
+
response: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/evaluation-icon.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
|
+
declare const EvaluationIcon: {
|
|
12
|
+
({ containerStyle, isCorrect, filled }: {
|
|
13
|
+
containerStyle: any;
|
|
14
|
+
isCorrect: any;
|
|
15
|
+
filled: any;
|
|
16
|
+
}): React.JSX.Element | null;
|
|
17
|
+
propTypes: {
|
|
18
|
+
containerStyle: PropTypes.Requireable<object>;
|
|
19
|
+
filled: PropTypes.Requireable<boolean>;
|
|
20
|
+
isCorrect: PropTypes.Requireable<NonNullable<number | boolean | null | undefined>>;
|
|
21
|
+
};
|
|
22
|
+
defaultProps: {
|
|
23
|
+
containerStyle: {};
|
|
24
|
+
filled: boolean;
|
|
25
|
+
isCorrect: undefined;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default EvaluationIcon;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "react";
|
|
2
|
+
import { color as e } from "@pie-lib/render-ui";
|
|
3
|
+
import t from "prop-types";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { styled as r } from "@mui/material/styles";
|
|
6
|
+
import i from "@mui/icons-material/Check";
|
|
7
|
+
import a from "@mui/icons-material/Close";
|
|
8
|
+
//#region src/delivery/evaluation-icon.tsx
|
|
9
|
+
var o = r("svg")(() => ({
|
|
10
|
+
"&.correctEmpty": { color: e.correct() },
|
|
11
|
+
"&.correctFilled": {
|
|
12
|
+
color: e.background(),
|
|
13
|
+
backgroundColor: e.correct()
|
|
14
|
+
},
|
|
15
|
+
"&.incorrectEmpty": { color: e.incorrect() },
|
|
16
|
+
"&.incorrectFilled": {
|
|
17
|
+
color: e.background(),
|
|
18
|
+
backgroundColor: e.incorrect()
|
|
19
|
+
}
|
|
20
|
+
})), s = (e, t) => `${e ? "correct" : "incorrect"}${t ? "Filled" : "Empty"}`, c = ({ containerStyle: e, isCorrect: t, filled: r }) => {
|
|
21
|
+
let c = t ? i : a, l = t !== void 0, u = l ? s(t, r) : "";
|
|
22
|
+
return l ? /* @__PURE__ */ n(c, {
|
|
23
|
+
component: o,
|
|
24
|
+
className: u,
|
|
25
|
+
style: e
|
|
26
|
+
}) : null;
|
|
27
|
+
};
|
|
28
|
+
c.propTypes = {
|
|
29
|
+
containerStyle: t.object,
|
|
30
|
+
filled: t.bool,
|
|
31
|
+
isCorrect: t.oneOfType([t.bool, t.number])
|
|
32
|
+
}, c.defaultProps = {
|
|
33
|
+
containerStyle: {},
|
|
34
|
+
filled: !1,
|
|
35
|
+
isCorrect: void 0
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { c as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/image-cloze-association/src/image-container.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, { Component } from 'react';
|
|
10
|
+
declare class ImageContainer extends Component {
|
|
11
|
+
render(): React.JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
export default ImageContainer;
|