@pie-element/explicit-constructed-response 11.1.0-next.28 → 11.1.1-next.1
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/_virtual/_rolldown/runtime.js +4 -0
- package/dist/author/alternateResponses.d.ts +34 -0
- package/dist/author/alternateResponses.js +116 -0
- package/dist/author/alternateSection.d.ts +58 -0
- package/dist/author/alternateSection.js +215 -0
- package/dist/author/defaults.d.ts +186 -0
- package/dist/author/defaults.js +128 -0
- package/dist/author/ecr-toolbar.d.ts +41 -0
- package/dist/author/ecr-toolbar.js +100 -0
- package/dist/author/index.d.ts +42 -0
- package/dist/author/index.js +94 -0
- package/dist/author/main.d.ts +38 -0
- package/dist/author/main.js +323 -0
- package/dist/author/markupUtils.d.ts +14 -0
- package/dist/author/markupUtils.js +13 -0
- package/dist/author/utils.d.ts +9 -0
- package/dist/author/utils.js +7 -0
- package/dist/controller/defaults.d.ts +25 -0
- package/dist/controller/defaults.js +19 -0
- package/dist/controller/index.d.ts +64 -0
- package/dist/controller/index.js +142 -0
- package/dist/delivery/index.d.ts +20 -0
- package/dist/delivery/index.js +66 -0
- package/dist/delivery/main.d.ts +48 -0
- package/dist/delivery/main.js +117 -0
- package/dist/explicit-constructed-response.css +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +364 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/he@1.2.0/node_modules/he/he.js +3993 -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/_apply.js +12 -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/_arrayReduce.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/_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/_baseExtremum.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +7 -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/_baseGt.js +6 -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/_basePick.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js +13 -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/_basePropertyOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js +22 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +14 -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/_baseTrim.js +8 -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/_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/_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/_createFind.js +19 -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/_escapeHtmlChar.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js +9 -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/_isIterateeCall.js +12 -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/_overRest.js +13 -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/_setToString.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +14 -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/_trimmedEndIndex.js +8 -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/constant.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +16 -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/escape.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/flatten.js +7 -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/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/isEqual.js +7 -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/max.js +9 -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/now.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/pick.js +8 -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/reduce.js +12 -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/throttle.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +7 -0
- package/dist/print/index.d.ts +15 -0
- package/dist/print/index.js +40 -0
- package/package.json +56 -19
- package/CHANGELOG.json +0 -1102
- package/CHANGELOG.md +0 -2175
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/configure/CHANGELOG.json +0 -652
- package/configure/CHANGELOG.md +0 -1917
- package/configure/lib/alternateResponses.js +0 -199
- package/configure/lib/alternateResponses.js.map +0 -1
- package/configure/lib/alternateSection.js +0 -329
- package/configure/lib/alternateSection.js.map +0 -1
- package/configure/lib/defaults.js +0 -184
- package/configure/lib/defaults.js.map +0 -1
- package/configure/lib/ecr-toolbar.js +0 -181
- package/configure/lib/ecr-toolbar.js.map +0 -1
- package/configure/lib/index.js +0 -161
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/main.js +0 -514
- package/configure/lib/main.js.map +0 -1
- package/configure/lib/markupUtils.js +0 -70
- package/configure/lib/markupUtils.js.map +0 -1
- package/configure/lib/utils.js +0 -15
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -22
- package/controller/CHANGELOG.json +0 -517
- package/controller/CHANGELOG.md +0 -1333
- package/controller/lib/defaults.js +0 -23
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -368
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -18
- package/docs/config-schema.json +0 -2629
- package/docs/config-schema.json.md +0 -1941
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -20
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -10
- package/docs/pie-schema.json +0 -1130
- package/docs/pie-schema.json.md +0 -814
- package/lib/index.js +0 -91
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -205
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -71
- package/lib/print.js.map +0 -1
- package/module/configure.js +0 -1
- package/module/controller.js +0 -6534
- package/module/demo.js +0 -45
- package/module/element.js +0 -1
- package/module/index.html +0 -21
- package/module/manifest.json +0 -18
- package/module/print-demo.js +0 -83
- package/module/print.html +0 -18
- package/module/print.js +0 -1
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _default = exports.default = {
|
|
8
|
-
choices: {},
|
|
9
|
-
displayType: 'block',
|
|
10
|
-
markup: '',
|
|
11
|
-
maxLengthPerChoiceEnabled: true,
|
|
12
|
-
playerSpellCheckEnabled: true,
|
|
13
|
-
prompt: '',
|
|
14
|
-
promptEnabled: true,
|
|
15
|
-
rationale: '',
|
|
16
|
-
rationaleEnabled: true,
|
|
17
|
-
spellCheckEnabled: true,
|
|
18
|
-
studentInstructionsEnabled: true,
|
|
19
|
-
teacherInstructions: '',
|
|
20
|
-
teacherInstructionsEnabled: true,
|
|
21
|
-
toolbarEditorPosition: 'bottom'
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","names":["choices","displayType","markup","maxLengthPerChoiceEnabled","playerSpellCheckEnabled","prompt","promptEnabled","rationale","rationaleEnabled","spellCheckEnabled","studentInstructionsEnabled","teacherInstructions","teacherInstructionsEnabled","toolbarEditorPosition"],"sources":["../src/defaults.js"],"sourcesContent":["export default {\n choices: {},\n displayType: 'block',\n markup: '',\n maxLengthPerChoiceEnabled: true,\n playerSpellCheckEnabled: true,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n spellCheckEnabled: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n};\n"],"mappings":";;;;;;iCAAe;EACbA,OAAO,EAAE,CAAC,CAAC;EACXC,WAAW,EAAE,OAAO;EACpBC,MAAM,EAAE,EAAE;EACVC,yBAAyB,EAAE,IAAI;EAC/BC,uBAAuB,EAAE,IAAI;EAC7BC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,IAAI;EACtBC,iBAAiB,EAAE,IAAI;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,mBAAmB,EAAE,EAAE;EACvBC,0BAA0B,EAAE,IAAI;EAChCC,qBAAqB,EAAE;AACzB,CAAC","ignoreList":[]}
|
package/controller/lib/index.js
DELETED
|
@@ -1,368 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getScore = exports.getLogTrace = exports.createCorrectResponseSession = void 0;
|
|
8
|
-
exports.model = model;
|
|
9
|
-
exports.normalize = void 0;
|
|
10
|
-
exports.outcome = outcome;
|
|
11
|
-
exports.validate = exports.prepareVal = exports.prepareChoice = void 0;
|
|
12
|
-
var _debug = _interopRequireDefault(require("debug"));
|
|
13
|
-
var _lodashEs = require("lodash-es");
|
|
14
|
-
var _he = require("he");
|
|
15
|
-
var _controllerUtils = require("@pie-lib/controller-utils");
|
|
16
|
-
var _translator = _interopRequireDefault(require("@pie-lib/translator"));
|
|
17
|
-
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
18
|
-
const {
|
|
19
|
-
translator
|
|
20
|
-
} = _translator.default;
|
|
21
|
-
const log = (0, _debug.default)('explicit-constructed-response:controller');
|
|
22
|
-
const prepareChoice = (mode, defaultFeedback) => choice => {
|
|
23
|
-
const out = {
|
|
24
|
-
label: choice.label,
|
|
25
|
-
value: choice.value
|
|
26
|
-
};
|
|
27
|
-
if (mode === 'evaluate') {
|
|
28
|
-
out.correct = true;
|
|
29
|
-
const feedbackType = choice.feedback && choice.feedback.type || 'none';
|
|
30
|
-
if (feedbackType === 'default') {
|
|
31
|
-
out.feedback = defaultFeedback['correct'];
|
|
32
|
-
} else if (feedbackType === 'custom') {
|
|
33
|
-
out.feedback = choice.feedback.value;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return out;
|
|
37
|
-
};
|
|
38
|
-
exports.prepareChoice = prepareChoice;
|
|
39
|
-
const getFeedback = value => {
|
|
40
|
-
if (value) {
|
|
41
|
-
return 'correct';
|
|
42
|
-
}
|
|
43
|
-
return 'incorrect';
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// also used in configure/src/markupUtils.js
|
|
47
|
-
const getAdjustedLength = length => {
|
|
48
|
-
if (Math.abs(length) === Infinity) {
|
|
49
|
-
return 2;
|
|
50
|
-
}
|
|
51
|
-
if (length <= 2) {
|
|
52
|
-
return length + 2;
|
|
53
|
-
}
|
|
54
|
-
if (length <= 4) {
|
|
55
|
-
return length + 3;
|
|
56
|
-
}
|
|
57
|
-
if (length <= 6) {
|
|
58
|
-
return length + 4;
|
|
59
|
-
}
|
|
60
|
-
return length + 5;
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
// we can't use the dom parser here because it is not available in the node environment
|
|
64
|
-
const decodeHtmlEntities = str => {
|
|
65
|
-
if (!str) return '';
|
|
66
|
-
return str.replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'|'/g, "'").replace(/&/g, '&');
|
|
67
|
-
};
|
|
68
|
-
const normalize = question => ({
|
|
69
|
-
..._defaults.default,
|
|
70
|
-
...question
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
*
|
|
75
|
-
* @param {*} question
|
|
76
|
-
* @param {*} session
|
|
77
|
-
* @param {*} env
|
|
78
|
-
*/
|
|
79
|
-
exports.normalize = normalize;
|
|
80
|
-
async function model(question, session, env) {
|
|
81
|
-
// this was added to treat an exception, when the model has choices without
|
|
82
|
-
// the "value" property like: { label: 'test' }
|
|
83
|
-
if (question.choices) {
|
|
84
|
-
Object.keys(question.choices).forEach(key => {
|
|
85
|
-
question.choices[key] = (question.choices[key] || []).map((item, index) => {
|
|
86
|
-
if (!item.value) {
|
|
87
|
-
log('Choice does not contain "value" property, which is required.', item);
|
|
88
|
-
return {
|
|
89
|
-
value: `${index}`,
|
|
90
|
-
...item
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return item;
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
const normalizedQuestion = normalize(question);
|
|
98
|
-
const defaultFeedback = Object.assign({
|
|
99
|
-
correct: 'Correct',
|
|
100
|
-
incorrect: 'Incorrect'
|
|
101
|
-
}, normalizedQuestion.defaultFeedback);
|
|
102
|
-
const prepareChoiceFn = prepareChoice(env.mode, defaultFeedback);
|
|
103
|
-
const choices = (0, _lodashEs.reduce)(normalizedQuestion.choices, (obj, area, key) => {
|
|
104
|
-
obj[key] = (0, _lodashEs.map)(area, prepareChoiceFn);
|
|
105
|
-
return obj;
|
|
106
|
-
}, {});
|
|
107
|
-
const {
|
|
108
|
-
value = {}
|
|
109
|
-
} = session || {};
|
|
110
|
-
const feedback = env.mode === 'evaluate' ? (0, _lodashEs.reduce)(normalizedQuestion.choices, (obj, respArea, key) => {
|
|
111
|
-
const chosenValue = value && value[key];
|
|
112
|
-
const val = !(0, _lodashEs.isEmpty)(chosenValue) && (0, _lodashEs.find)(respArea, c => prepareVal(c.label) === prepareVal(chosenValue));
|
|
113
|
-
obj[key] = getFeedback(val);
|
|
114
|
-
return obj;
|
|
115
|
-
}, {}) : {};
|
|
116
|
-
|
|
117
|
-
// check if at least one choice has an alternate
|
|
118
|
-
const showNote = Object.values(choices).some(choice => choice?.length > 1);
|
|
119
|
-
const note = normalizedQuestion.note || translator.t('common:commonCorrectAnswerWithAlternates', {
|
|
120
|
-
lng: normalizedQuestion.language
|
|
121
|
-
});
|
|
122
|
-
const {
|
|
123
|
-
maxLengthPerChoice = [],
|
|
124
|
-
maxLengthPerChoiceEnabled
|
|
125
|
-
} = normalizedQuestion;
|
|
126
|
-
const undefinedLengths = !maxLengthPerChoice.length;
|
|
127
|
-
|
|
128
|
-
// calculate maxLengthPerChoice array if it is not defined or defined incorrectly
|
|
129
|
-
Object.values(choices).forEach((choice, index) => {
|
|
130
|
-
const labelLengthsArr = (choice || []).map(choice => decodeHtmlEntities(choice.label || '').length);
|
|
131
|
-
const length = Math.max(...labelLengthsArr);
|
|
132
|
-
if (undefinedLengths || !maxLengthPerChoice[index] || maxLengthPerChoice[index] < length || maxLengthPerChoice[index] > length + 10) {
|
|
133
|
-
maxLengthPerChoice[index] = getAdjustedLength(length);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
const out = {
|
|
137
|
-
choices,
|
|
138
|
-
disabled: env.mode !== 'gather',
|
|
139
|
-
displayType: normalizedQuestion.displayType,
|
|
140
|
-
mode: env.mode,
|
|
141
|
-
role: env.role,
|
|
142
|
-
feedback,
|
|
143
|
-
language: normalizedQuestion.language,
|
|
144
|
-
markup: normalizedQuestion.markup,
|
|
145
|
-
maxLengthPerChoice,
|
|
146
|
-
maxLengthPerChoiceEnabled,
|
|
147
|
-
note,
|
|
148
|
-
playerSpellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,
|
|
149
|
-
prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : _defaults.default.prompt,
|
|
150
|
-
rationale: _defaults.default.rationale,
|
|
151
|
-
responseCorrect: env.mode === 'evaluate' ? getScore(normalizedQuestion, session) === 1 : undefined,
|
|
152
|
-
showNote,
|
|
153
|
-
teacherInstructions: _defaults.default.teacherInstructions,
|
|
154
|
-
responseAreaInputConfiguration: normalizedQuestion.responseAreaInputConfiguration,
|
|
155
|
-
extraCSSRules: normalizedQuestion.extraCSSRules
|
|
156
|
-
};
|
|
157
|
-
if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {
|
|
158
|
-
out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : _defaults.default.rationale;
|
|
159
|
-
out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : _defaults.default.teacherInstructions;
|
|
160
|
-
}
|
|
161
|
-
return out;
|
|
162
|
-
}
|
|
163
|
-
const prepareVal = html => {
|
|
164
|
-
return decodeHTML(getInnerText(html).trim());
|
|
165
|
-
};
|
|
166
|
-
exports.prepareVal = prepareVal;
|
|
167
|
-
const getScore = (config, session) => {
|
|
168
|
-
const {
|
|
169
|
-
value
|
|
170
|
-
} = session || {};
|
|
171
|
-
if (!session || (0, _lodashEs.isEmpty)(session) || !value) {
|
|
172
|
-
return 0;
|
|
173
|
-
}
|
|
174
|
-
const responseAreas = config.markup && config.markup.match(/\{\{(.+?)\}\}/g);
|
|
175
|
-
const maxScore = responseAreas ? responseAreas.length : 0;
|
|
176
|
-
const correctCount = (0, _lodashEs.reduce)(config.choices, (total, respArea, key) => {
|
|
177
|
-
const chosenValue = value && value[key];
|
|
178
|
-
if ((0, _lodashEs.isEmpty)(chosenValue) || !(0, _lodashEs.find)(respArea, c => prepareVal(c.label) === prepareVal(chosenValue))) {
|
|
179
|
-
return total;
|
|
180
|
-
}
|
|
181
|
-
return total + 1;
|
|
182
|
-
}, 0);
|
|
183
|
-
const str = maxScore ? (correctCount / maxScore).toFixed(2) : 0;
|
|
184
|
-
return parseFloat(str);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
/**
|
|
188
|
-
* Generates detailed trace log for scoring evaluation
|
|
189
|
-
* @param {Object} model - the question model
|
|
190
|
-
* @param {Object} session - the student session
|
|
191
|
-
* @param {Object} env - the environment
|
|
192
|
-
* @returns {Array} traceLog - array of trace messages
|
|
193
|
-
*/
|
|
194
|
-
exports.getScore = getScore;
|
|
195
|
-
const getLogTrace = (model, session, env) => {
|
|
196
|
-
const traceLog = [];
|
|
197
|
-
const {
|
|
198
|
-
value
|
|
199
|
-
} = session || {};
|
|
200
|
-
const {
|
|
201
|
-
choices,
|
|
202
|
-
markup
|
|
203
|
-
} = model || {};
|
|
204
|
-
const responseAreas = markup ? markup.match(/\{\{(.+?)\}\}/g) : [];
|
|
205
|
-
const totalAreas = responseAreas ? responseAreas.length : 0;
|
|
206
|
-
traceLog.push(`${totalAreas} response area(s) defined in this question.`);
|
|
207
|
-
if (value && Object.keys(value).length > 0) {
|
|
208
|
-
const filledAreas = Object.entries(value).filter(([key, val]) => val && val.trim()).length;
|
|
209
|
-
traceLog.push(`Student filled ${filledAreas} out of ${totalAreas} response area(s).`);
|
|
210
|
-
Object.keys(choices || {}).forEach(areaKey => {
|
|
211
|
-
const studentAnswer = value && value[areaKey] || '';
|
|
212
|
-
const correctOptions = choices[areaKey] || [];
|
|
213
|
-
const isCorrect = !(0, _lodashEs.isEmpty)(studentAnswer.trim()) && correctOptions.some(option => prepareVal(option.label) === prepareVal(studentAnswer));
|
|
214
|
-
if (studentAnswer.trim()) {
|
|
215
|
-
traceLog.push(`Response area ${parseInt(areaKey) + 1}: ${isCorrect ? 'CORRECT' : 'INCORRECT'}.`);
|
|
216
|
-
} else {
|
|
217
|
-
traceLog.push(`Response area ${parseInt(areaKey) + 1}: left empty.`);
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
} else {
|
|
221
|
-
traceLog.push('Student did not fill any response areas.');
|
|
222
|
-
}
|
|
223
|
-
const hasAlternates = Object.values(choices || {}).some(optionArray => optionArray.length > 1);
|
|
224
|
-
if (hasAlternates) {
|
|
225
|
-
traceLog.push(`Alternate answers are accepted for some response areas.`);
|
|
226
|
-
}
|
|
227
|
-
const partialScoringEnabled = _controllerUtils.partialScoring.enabled(model, env);
|
|
228
|
-
if (partialScoringEnabled) {
|
|
229
|
-
traceLog.push(`Score calculated using partial scoring.`);
|
|
230
|
-
traceLog.push(`Student receives credit for each correctly filled response area.`);
|
|
231
|
-
if (value && Object.keys(value).length > 0) {
|
|
232
|
-
let correctCount = 0;
|
|
233
|
-
Object.keys(choices || {}).forEach(areaKey => {
|
|
234
|
-
const studentAnswer = value && value[areaKey] || '';
|
|
235
|
-
const correctOptions = choices[areaKey] || [];
|
|
236
|
-
const isCorrect = !(0, _lodashEs.isEmpty)(studentAnswer.trim()) && correctOptions.some(option => prepareVal(option.label) === prepareVal(studentAnswer));
|
|
237
|
-
if (isCorrect) correctCount++;
|
|
238
|
-
});
|
|
239
|
-
traceLog.push(`Partial scoring: ${correctCount} correct out of ${totalAreas} response areas.`);
|
|
240
|
-
}
|
|
241
|
-
} else {
|
|
242
|
-
traceLog.push(`Score calculated using all-or-nothing scoring.`);
|
|
243
|
-
traceLog.push(`Student must fill all response areas correctly to receive full credit.`);
|
|
244
|
-
}
|
|
245
|
-
const score = getScore(model, session);
|
|
246
|
-
traceLog.push(`Score: ${score}.`);
|
|
247
|
-
return traceLog;
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* The score is partial by default for checkbox mode, allOrNothing for radio mode.
|
|
252
|
-
* To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =
|
|
253
|
-
* false. the value in `env` will override the value in `model`.
|
|
254
|
-
* @param {Object} model - the main model
|
|
255
|
-
* @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)
|
|
256
|
-
* @param {*} session
|
|
257
|
-
* @param {Object} env
|
|
258
|
-
* @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides
|
|
259
|
-
* `model.partialScoring`.
|
|
260
|
-
*/
|
|
261
|
-
exports.getLogTrace = getLogTrace;
|
|
262
|
-
function outcome(model, session, env = {}) {
|
|
263
|
-
return new Promise(resolve => {
|
|
264
|
-
if (!session || (0, _lodashEs.isEmpty)(session)) {
|
|
265
|
-
resolve({
|
|
266
|
-
score: 0,
|
|
267
|
-
empty: true,
|
|
268
|
-
traceLog: ['Student did not fill any response areas. Score: 0.']
|
|
269
|
-
});
|
|
270
|
-
} else {
|
|
271
|
-
const traceLog = getLogTrace(model, session, env);
|
|
272
|
-
const partialScoringEnabled = _controllerUtils.partialScoring.enabled(model, env);
|
|
273
|
-
const score = getScore(model, session);
|
|
274
|
-
resolve({
|
|
275
|
-
score: partialScoringEnabled ? score : score === 1 ? 1 : 0,
|
|
276
|
-
empty: false,
|
|
277
|
-
traceLog
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
const createCorrectResponseSession = (question, env) => {
|
|
283
|
-
return new Promise(resolve => {
|
|
284
|
-
if (env.mode !== 'evaluate' && env.role === 'instructor') {
|
|
285
|
-
const {
|
|
286
|
-
choices
|
|
287
|
-
} = question;
|
|
288
|
-
const value = {};
|
|
289
|
-
Object.keys(choices).forEach((key, i) => {
|
|
290
|
-
value[i] = choices[key][0].label;
|
|
291
|
-
});
|
|
292
|
-
resolve({
|
|
293
|
-
id: '1',
|
|
294
|
-
value
|
|
295
|
-
});
|
|
296
|
-
} else {
|
|
297
|
-
resolve(null);
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
// remove all html tags
|
|
303
|
-
// const getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');
|
|
304
|
-
exports.createCorrectResponseSession = createCorrectResponseSession;
|
|
305
|
-
const getInnerText = html => {
|
|
306
|
-
if (typeof html !== 'string') {
|
|
307
|
-
return '';
|
|
308
|
-
}
|
|
309
|
-
if (typeof html.replaceAll === 'function') {
|
|
310
|
-
return html.replaceAll(/<[^>]*>/g, '');
|
|
311
|
-
} else {
|
|
312
|
-
// Polyfill for replaceAll using replace and a global regex
|
|
313
|
-
return html.replace(/<[^>]*>/g, '');
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
const decodeHTML = html => (0, _he.decode)(html);
|
|
317
|
-
|
|
318
|
-
// remove all html tags except img, iframe and source tag for audio
|
|
319
|
-
const getContent = html => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');
|
|
320
|
-
const validate = (model = {}, config = {}) => {
|
|
321
|
-
const {
|
|
322
|
-
choices,
|
|
323
|
-
markup
|
|
324
|
-
} = model;
|
|
325
|
-
const {
|
|
326
|
-
maxResponseAreas
|
|
327
|
-
} = config;
|
|
328
|
-
const allChoicesErrors = {};
|
|
329
|
-
const errors = {};
|
|
330
|
-
['teacherInstructions', 'prompt', 'rationale'].forEach(field => {
|
|
331
|
-
if (config[field]?.required && !getContent(model[field])) {
|
|
332
|
-
errors[field] = 'This field is required.';
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
Object.entries(choices || {}).forEach(([key, values]) => {
|
|
336
|
-
const reversedChoices = [...(values || [])].reverse();
|
|
337
|
-
const choicesErrors = {};
|
|
338
|
-
reversedChoices.forEach((choice, index) => {
|
|
339
|
-
const {
|
|
340
|
-
value,
|
|
341
|
-
label
|
|
342
|
-
} = choice;
|
|
343
|
-
if (label === '' || label === '<div></div>') {
|
|
344
|
-
choicesErrors[value] = 'Content should not be empty.';
|
|
345
|
-
} else {
|
|
346
|
-
const identicalAnswer = reversedChoices.slice(index + 1).some(c => c.label === label);
|
|
347
|
-
if (identicalAnswer) {
|
|
348
|
-
choicesErrors[value] = 'Content should be unique.';
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
if (!(0, _lodashEs.isEmpty)(choicesErrors)) {
|
|
353
|
-
allChoicesErrors[key] = choicesErrors;
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
const nbOfResponseAreas = (markup.match(/\{\{(\d+)\}\}/g) || []).length;
|
|
357
|
-
if (nbOfResponseAreas > maxResponseAreas) {
|
|
358
|
-
errors.responseAreas = `No more than ${maxResponseAreas} response areas should be defined.`;
|
|
359
|
-
} else if (nbOfResponseAreas < 1) {
|
|
360
|
-
errors.responseAreas = 'There should be at least 1 response area defined.';
|
|
361
|
-
}
|
|
362
|
-
if (!(0, _lodashEs.isEmpty)(allChoicesErrors)) {
|
|
363
|
-
errors.choices = allChoicesErrors;
|
|
364
|
-
}
|
|
365
|
-
return errors;
|
|
366
|
-
};
|
|
367
|
-
exports.validate = validate;
|
|
368
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_debug","_interopRequireDefault","require","_lodashEs","_he","_controllerUtils","_translator","_defaults","translator","Translator","log","debug","prepareChoice","mode","defaultFeedback","choice","out","label","value","correct","feedbackType","feedback","type","exports","getFeedback","getAdjustedLength","length","Math","abs","Infinity","decodeHtmlEntities","str","replace","normalize","question","defaults","model","session","env","choices","Object","keys","forEach","key","map","item","index","normalizedQuestion","assign","incorrect","prepareChoiceFn","reduce","obj","area","respArea","chosenValue","val","isEmpty","find","c","prepareVal","showNote","values","some","note","t","lng","language","maxLengthPerChoice","maxLengthPerChoiceEnabled","undefinedLengths","labelLengthsArr","max","disabled","displayType","role","markup","playerSpellCheckEnabled","prompt","promptEnabled","rationale","responseCorrect","getScore","undefined","teacherInstructions","responseAreaInputConfiguration","extraCSSRules","rationaleEnabled","teacherInstructionsEnabled","html","decodeHTML","getInnerText","trim","config","responseAreas","match","maxScore","correctCount","total","toFixed","parseFloat","getLogTrace","traceLog","totalAreas","push","filledAreas","entries","filter","areaKey","studentAnswer","correctOptions","isCorrect","option","parseInt","hasAlternates","optionArray","partialScoringEnabled","partialScoring","enabled","score","outcome","Promise","resolve","empty","createCorrectResponseSession","i","id","replaceAll","decode","getContent","validate","maxResponseAreas","allChoicesErrors","errors","field","required","reversedChoices","reverse","choicesErrors","identicalAnswer","slice","nbOfResponseAreas"],"sources":["../src/index.js"],"sourcesContent":["import debug from 'debug';\nimport { find, isEmpty, map, reduce } from 'lodash-es';\nimport { decode } from 'he';\nimport { partialScoring } from '@pie-lib/controller-utils';\nimport Translator from '@pie-lib/translator';\nimport defaults from './defaults';\n\nconst { translator } = Translator;\n\nconst log = debug('explicit-constructed-response:controller');\n\nexport const prepareChoice = (mode, defaultFeedback) => (choice) => {\n const out = {\n label: choice.label,\n value: choice.value,\n };\n\n if (mode === 'evaluate') {\n out.correct = true;\n\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback['correct'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n\n return out;\n};\n\nconst getFeedback = (value) => {\n if (value) {\n return 'correct';\n }\n\n return 'incorrect';\n};\n\n// also used in configure/src/markupUtils.js\nconst getAdjustedLength = (length) => {\n if (Math.abs(length) === Infinity) {\n return 2;\n }\n\n if (length <= 2) {\n return length + 2;\n }\n\n if (length <= 4) {\n return length + 3;\n }\n\n if (length <= 6) {\n return length + 4;\n }\n\n return length + 5;\n};\n\n// we can't use the dom parser here because it is not available in the node environment\nconst decodeHtmlEntities = (str) => {\n if (!str) return '';\n return str\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/"/g, '\"')\n .replace(/'|'/g, \"'\")\n .replace(/&/g, '&');\n};\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n */\nexport async function model(question, session, env) {\n // this was added to treat an exception, when the model has choices without\n // the \"value\" property like: { label: 'test' }\n if (question.choices) {\n Object.keys(question.choices).forEach((key) => {\n question.choices[key] = (question.choices[key] || []).map((item, index) => {\n if (!item.value) {\n log('Choice does not contain \"value\" property, which is required.', item);\n return { value: `${index}`, ...item };\n }\n\n return item;\n });\n });\n }\n\n const normalizedQuestion = normalize(question);\n const defaultFeedback = Object.assign(\n { correct: 'Correct', incorrect: 'Incorrect' },\n normalizedQuestion.defaultFeedback,\n );\n const prepareChoiceFn = prepareChoice(env.mode, defaultFeedback);\n const choices = reduce(\n normalizedQuestion.choices,\n (obj, area, key) => {\n obj[key] = map(area, prepareChoiceFn);\n\n return obj;\n },\n {},\n );\n\n const { value = {} } = session || {};\n const feedback =\n env.mode === 'evaluate'\n ? reduce(\n normalizedQuestion.choices,\n (obj, respArea, key) => {\n const chosenValue = value && value[key];\n const val = !isEmpty(chosenValue) && find(respArea, (c) => prepareVal(c.label) === prepareVal(chosenValue));\n\n obj[key] = getFeedback(val);\n\n return obj;\n },\n {},\n )\n : {};\n\n // check if at least one choice has an alternate\n const showNote = Object.values(choices).some((choice) => choice?.length > 1);\n const note =\n normalizedQuestion.note ||\n translator.t('common:commonCorrectAnswerWithAlternates', { lng: normalizedQuestion.language });\n\n const { maxLengthPerChoice = [], maxLengthPerChoiceEnabled } = normalizedQuestion;\n const undefinedLengths = !maxLengthPerChoice.length;\n\n // calculate maxLengthPerChoice array if it is not defined or defined incorrectly\n Object.values(choices).forEach((choice, index) => {\n const labelLengthsArr = (choice || []).map((choice) => decodeHtmlEntities(choice.label || '').length);\n const length = Math.max(...labelLengthsArr);\n\n if (\n undefinedLengths ||\n !maxLengthPerChoice[index] ||\n maxLengthPerChoice[index] < length ||\n maxLengthPerChoice[index] > length + 10\n ) {\n maxLengthPerChoice[index] = getAdjustedLength(length);\n }\n });\n\n const out = {\n choices,\n disabled: env.mode !== 'gather',\n displayType: normalizedQuestion.displayType,\n mode: env.mode,\n role: env.role,\n feedback,\n language: normalizedQuestion.language,\n markup: normalizedQuestion.markup,\n maxLengthPerChoice,\n maxLengthPerChoiceEnabled,\n note,\n playerSpellCheckEnabled: normalizedQuestion.playerSpellCheckEnabled,\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : defaults.prompt,\n rationale: defaults.rationale,\n responseCorrect: env.mode === 'evaluate' ? getScore(normalizedQuestion, session) === 1 : undefined,\n showNote,\n teacherInstructions: defaults.teacherInstructions,\n responseAreaInputConfiguration: normalizedQuestion.responseAreaInputConfiguration,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : defaults.rationale;\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : defaults.teacherInstructions;\n }\n\n return out;\n}\n\nexport const prepareVal = (html) => {\n return decodeHTML(getInnerText(html).trim());\n};\n\nexport const getScore = (config, session) => {\n const { value } = session || {};\n\n if (!session || isEmpty(session) || !value) {\n return 0;\n }\n\n const responseAreas = config.markup && config.markup.match(/\\{\\{(.+?)\\}\\}/g);\n const maxScore = responseAreas ? responseAreas.length : 0;\n const correctCount = reduce(\n config.choices,\n (total, respArea, key) => {\n const chosenValue = value && value[key];\n\n if (isEmpty(chosenValue) || !find(respArea, (c) => prepareVal(c.label) === prepareVal(chosenValue))) {\n return total;\n }\n\n return total + 1;\n },\n 0,\n );\n\n const str = maxScore ? (correctCount / maxScore).toFixed(2) : 0;\n\n return parseFloat(str);\n};\n\n /**\n * Generates detailed trace log for scoring evaluation\n * @param {Object} model - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array} traceLog - array of trace messages\n */\nexport const getLogTrace = (model, session, env) => {\n const traceLog = [];\n const { value } = session || {};\n const { choices, markup } = model || {};\n \n const responseAreas = markup ? markup.match(/\\{\\{(.+?)\\}\\}/g) : [];\n const totalAreas = responseAreas ? responseAreas.length : 0;\n \n traceLog.push(`${totalAreas} response area(s) defined in this question.`);\n \n if (value && Object.keys(value).length > 0) {\n const filledAreas = Object.entries(value).filter(([key, val]) => val && val.trim()).length;\n traceLog.push(`Student filled ${filledAreas} out of ${totalAreas} response area(s).`);\n \n Object.keys(choices || {}).forEach((areaKey) => {\n const studentAnswer = (value && value[areaKey]) || '';\n const correctOptions = choices[areaKey] || [];\n const isCorrect = !isEmpty(studentAnswer.trim()) && \n correctOptions.some(option => prepareVal(option.label) === prepareVal(studentAnswer));\n \n if (studentAnswer.trim()) {\n traceLog.push(`Response area ${parseInt(areaKey) + 1}: ${isCorrect ? 'CORRECT' : 'INCORRECT'}.`);\n } else {\n traceLog.push(`Response area ${parseInt(areaKey) + 1}: left empty.`);\n }\n });\n } else {\n traceLog.push('Student did not fill any response areas.');\n }\n\n const hasAlternates = Object.values(choices || {}).some(optionArray => optionArray.length > 1);\n if (hasAlternates) {\n traceLog.push(`Alternate answers are accepted for some response areas.`);\n }\n\n const partialScoringEnabled = partialScoring.enabled(model, env);\n \n if (partialScoringEnabled) {\n traceLog.push(`Score calculated using partial scoring.`);\n traceLog.push(`Student receives credit for each correctly filled response area.`);\n \n if (value && Object.keys(value).length > 0) {\n let correctCount = 0;\n Object.keys(choices || {}).forEach((areaKey) => {\n const studentAnswer = (value && value[areaKey]) || '';\n const correctOptions = choices[areaKey] || [];\n const isCorrect = !isEmpty(studentAnswer.trim()) && \n correctOptions.some(option => prepareVal(option.label) === prepareVal(studentAnswer));\n if (isCorrect) correctCount++;\n });\n \n traceLog.push(`Partial scoring: ${correctCount} correct out of ${totalAreas} response areas.`);\n }\n } else {\n traceLog.push(`Score calculated using all-or-nothing scoring.`);\n traceLog.push(`Student must fill all response areas correctly to receive full credit.`);\n }\n\n const score = getScore(model, session);\n traceLog.push(`Score: ${score}.`);\n\n return traceLog;\n};\n\n/**\n * The score is partial by default for checkbox mode, allOrNothing for radio mode.\n * To disable partial scoring for checkbox mode you either set model.partialScoring = false or env.partialScoring =\n * false. the value in `env` will override the value in `model`.\n * @param {Object} model - the main model\n * @param {boolean} model.partialScoring - is partial scoring enabled (if undefined set to to true)\n * @param {*} session\n * @param {Object} env\n * @param {boolean} env.partialScoring - is partial scoring enabled (if undefined default to true) This overrides\n * `model.partialScoring`.\n */\nexport function outcome(model, session, env = {}) {\n return new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ \n score: 0, \n empty: true, \n traceLog: ['Student did not fill any response areas. Score: 0.'] \n });\n } else {\n const traceLog = getLogTrace(model, session, env);\n const partialScoringEnabled = partialScoring.enabled(model, env);\n const score = getScore(model, session);\n\n resolve({ \n score: partialScoringEnabled ? score : score === 1 ? 1 : 0, \n empty: false,\n traceLog \n });\n }\n });\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { choices } = question;\n const value = {};\n\n Object.keys(choices).forEach((key, i) => {\n value[i] = choices[key][0].label;\n });\n\n resolve({ id: '1', value });\n } else {\n resolve(null);\n }\n });\n};\n\n// remove all html tags\n// const getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\nconst getInnerText = (html) => {\n if (typeof html !== 'string') {\n return '';\n }\n if (typeof html.replaceAll === 'function') {\n return html.replaceAll(/<[^>]*>/g, '');\n } else {\n // Polyfill for replaceAll using replace and a global regex\n return html.replace(/<[^>]*>/g, '');\n }\n};\n\nconst decodeHTML = (html) => decode(html);\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const { choices, markup } = model;\n const { maxResponseAreas } = config;\n const allChoicesErrors = {};\n const errors = {};\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n Object.entries(choices || {}).forEach(([key, values]) => {\n const reversedChoices = [...(values || [])].reverse();\n const choicesErrors = {};\n\n reversedChoices.forEach((choice, index) => {\n const { value, label } = choice;\n\n if (label === '' || label === '<div></div>') {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some((c) => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n });\n\n if (!isEmpty(choicesErrors)) {\n allChoicesErrors[key] = choicesErrors;\n }\n });\n\n const nbOfResponseAreas = (markup.match(/\\{\\{(\\d+)\\}\\}/g) || []).length;\n\n if (nbOfResponseAreas > maxResponseAreas) {\n errors.responseAreas = `No more than ${maxResponseAreas} response areas should be defined.`;\n } else if (nbOfResponseAreas < 1) {\n errors.responseAreas = 'There should be at least 1 response area defined.';\n }\n\n if (!isEmpty(allChoicesErrors)) {\n errors.choices = allChoicesErrors;\n }\n\n return errors;\n};\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AAEA,MAAM;EAAEM;AAAW,CAAC,GAAGC,mBAAU;AAEjC,MAAMC,GAAG,GAAG,IAAAC,cAAK,EAAC,0CAA0C,CAAC;AAEtD,MAAMC,aAAa,GAAGA,CAACC,IAAI,EAAEC,eAAe,KAAMC,MAAM,IAAK;EAClE,MAAMC,GAAG,GAAG;IACVC,KAAK,EAAEF,MAAM,CAACE,KAAK;IACnBC,KAAK,EAAEH,MAAM,CAACG;EAChB,CAAC;EAED,IAAIL,IAAI,KAAK,UAAU,EAAE;IACvBG,GAAG,CAACG,OAAO,GAAG,IAAI;IAElB,MAAMC,YAAY,GAAIL,MAAM,CAACM,QAAQ,IAAIN,MAAM,C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,IAAI,EAAE,EAAErE,MAAM;EAEvE,IAAImH,iBAAiB,GAAGV,gBAAgB,EAAE;IACxCE,MAAM,CAACvC,aAAa,GAAG,gBAAgBqC,gBAAgB,oCAAoC;EAC7F,CAAC,MAAM,IAAIU,iBAAiB,GAAG,CAAC,EAAE;IAChCR,MAAM,CAACvC,aAAa,GAAG,mDAAmD;EAC5E;EAEA,IAAI,CAAC,IAAArC,iBAAO,EAAC2E,gBAAgB,CAAC,EAAE;IAC9BC,MAAM,CAAC9F,OAAO,GAAG6F,gBAAgB;EACnC;EAEA,OAAOC,MAAM;AACf,CAAC;AAAC9G,OAAA,CAAA2G,QAAA,GAAAA,QAAA","ignoreList":[]}
|
package/controller/package.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@pie-element/explicit-constructed-response-controller",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "8.1.0-next.1",
|
|
5
|
-
"description": "",
|
|
6
|
-
"main": "lib/index.js",
|
|
7
|
-
"module": "src/index.js",
|
|
8
|
-
"author": "",
|
|
9
|
-
"license": "ISC",
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@pie-lib/controller-utils": "2.0.2",
|
|
12
|
-
"@pie-lib/translator": "4.0.2",
|
|
13
|
-
"debug": "^4.1.1",
|
|
14
|
-
"he": "^1.2.0",
|
|
15
|
-
"lodash-es": "^4.17.23",
|
|
16
|
-
"type-of": "^2.0.1"
|
|
17
|
-
}
|
|
18
|
-
}
|