@pie-element/placement-ordering 14.1.2-next.0 → 14.1.2-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/author/choice-editor.js +16 -17
- package/dist/author/design.js +49 -50
- package/dist/author/index.js +21 -21
- package/dist/author/utils.js +1 -1
- package/dist/browser/author/index.js +8227 -8516
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/browser-Dbw2uHQ7.js +372 -0
- package/dist/browser/browser-Dbw2uHQ7.js.map +1 -0
- package/dist/browser/controller/index.js +86 -163
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +299 -296
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-BTHiIs74.js → dist-D9ARZhQk.js} +354 -538
- package/dist/browser/dist-D9ARZhQk.js.map +1 -0
- package/dist/browser/{drag-provider-DaPxkh4j.js → drag-provider-C4BiCI76.js} +3281 -3559
- package/dist/browser/drag-provider-C4BiCI76.js.map +1 -0
- package/dist/controller/index.js +44 -49
- package/dist/controller/scoring.js +1 -3
- package/dist/delivery/index.js +10 -10
- package/dist/delivery/ordering.js +2 -5
- package/dist/delivery/placement-ordering.js +37 -39
- package/dist/index.iife.js +33 -33
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +14 -11
- package/dist/browser/browser-CvJkn_Ec.js +0 -1019
- package/dist/browser/browser-CvJkn_Ec.js.map +0 -1
- package/dist/browser/dist-BTHiIs74.js.map +0 -1
- package/dist/browser/drag-provider-DaPxkh4j.js.map +0 -1
- package/dist/browser/last-D7N4Qfx4.js +0 -9
- package/dist/browser/last-D7N4Qfx4.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEvery.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayShuffle.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +0 -57
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseDifference.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEvery.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFlatten.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIndexOf.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNaN.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRandom.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseShuffle.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUniq.js +0 -27
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseValues.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +0 -33
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isFlattenable.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shuffleSelf.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_strictIndexOf.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/assign.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/compact.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/difference.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/differenceWith.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/every.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/last.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/noop.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/shuffle.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/values.js +0 -8
package/dist/controller/index.js
CHANGED
|
@@ -1,44 +1,39 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
5
|
-
import i from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
|
|
6
|
-
import a from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js";
|
|
7
|
-
import { flattenCorrect as o, getAllCorrectResponses as s, score as c } from "./scoring.js";
|
|
8
|
-
import l from "./defaults.js";
|
|
1
|
+
import { flattenCorrect as e, getAllCorrectResponses as t, score as n } from "./scoring.js";
|
|
2
|
+
import r from "./defaults.js";
|
|
3
|
+
import { every as i, isArray as a, isEmpty as o, isEqual as s, map as c, reduce as l } from "@pie-element/shared-lodash";
|
|
9
4
|
import u from "debug";
|
|
10
5
|
import d from "@pie-lib/translator";
|
|
11
6
|
import { getFeedbackForCorrectness as f } from "@pie-element/shared-feedback";
|
|
12
7
|
import { partialScoring as p } from "@pie-element/shared-controller-utils";
|
|
13
8
|
//#region src/controller/index.ts
|
|
14
|
-
var m = u("@pie-element:placement-ordering:controller"), { translator: h } = d, g = () => /* @__PURE__ */ Error("Question is missing required array: correctResponse"), _ = (e,
|
|
15
|
-
let
|
|
9
|
+
var m = u("@pie-element:placement-ordering:controller"), { translator: h } = d, g = () => /* @__PURE__ */ Error("Question is missing required array: correctResponse"), _ = (e, r, i) => {
|
|
10
|
+
let a = [], o = r?.value || [];
|
|
16
11
|
e?.correctResponse;
|
|
17
|
-
let
|
|
18
|
-
if (!
|
|
19
|
-
let l =
|
|
12
|
+
let c = e?.placementArea === !0;
|
|
13
|
+
if (!o.length) return c ? a.push("Student did not place any tiles in the target area.") : a.push("Student did not reorder any tiles."), a.push("Final score: 0."), a;
|
|
14
|
+
let l = t(e), u = {
|
|
20
15
|
score: 0,
|
|
21
16
|
response: []
|
|
22
17
|
};
|
|
23
18
|
l.forEach((e) => {
|
|
24
19
|
let t = 0;
|
|
25
|
-
|
|
20
|
+
o.forEach((n, r) => {
|
|
26
21
|
e[r] === n && t++;
|
|
27
22
|
}), t > u.score && (u = {
|
|
28
23
|
score: t,
|
|
29
24
|
response: e
|
|
30
25
|
});
|
|
31
26
|
});
|
|
32
|
-
let d = u.score, f =
|
|
33
|
-
d > 0 &&
|
|
34
|
-
let m = p.enabled(e,
|
|
35
|
-
m ? (
|
|
36
|
-
let h =
|
|
37
|
-
return
|
|
27
|
+
let d = u.score, f = o.length - d;
|
|
28
|
+
d > 0 && a.push(`${d} tile(s) placed in the correct order.`), f > 0 && a.push(`${f} tile(s) placed in an incorrect order.`), l.some((e) => s(e, o));
|
|
29
|
+
let m = p.enabled(e, i || {});
|
|
30
|
+
m ? (a.push("Score calculated using partial scoring."), a.push("Each tile placed in the correct position contributes to the score.")) : (a.push("Score calculated using all-or-nothing scoring."), c ? a.push("Student must place all tiles in the correct positions within the target area to receive full credit.") : a.push("Student must arrange all tiles in the correct order to receive full credit."));
|
|
31
|
+
let h = n(e, r), g = m ? h : +(h === 1);
|
|
32
|
+
return a.push(`Final score: ${g}.`), a;
|
|
38
33
|
};
|
|
39
|
-
function v(e, t,
|
|
34
|
+
function v(e, t, r) {
|
|
40
35
|
return new Promise((i, a) => {
|
|
41
|
-
if (!t ||
|
|
36
|
+
if (!t || o(t)) {
|
|
42
37
|
i({
|
|
43
38
|
score: 0,
|
|
44
39
|
empty: !0,
|
|
@@ -46,12 +41,12 @@ function v(e, t, n) {
|
|
|
46
41
|
});
|
|
47
42
|
return;
|
|
48
43
|
}
|
|
49
|
-
if (!e || !e.correctResponse ||
|
|
44
|
+
if (!e || !e.correctResponse || o(e.correctResponse)) a(g());
|
|
50
45
|
else try {
|
|
51
|
-
let
|
|
46
|
+
let a = n(e, t);
|
|
52
47
|
i({
|
|
53
|
-
score: p.enabled(e,
|
|
54
|
-
logTrace: _(e, t,
|
|
48
|
+
score: p.enabled(e, r || {}) ? a : +(a === 1),
|
|
49
|
+
logTrace: _(e, t, r)
|
|
55
50
|
});
|
|
56
51
|
} catch (e) {
|
|
57
52
|
a(e);
|
|
@@ -61,13 +56,13 @@ function v(e, t, n) {
|
|
|
61
56
|
function y(e = {}) {
|
|
62
57
|
return new Promise((t) => {
|
|
63
58
|
t({
|
|
64
|
-
...
|
|
59
|
+
...r,
|
|
65
60
|
...e
|
|
66
61
|
});
|
|
67
62
|
});
|
|
68
63
|
}
|
|
69
64
|
var b = (e) => ({
|
|
70
|
-
...
|
|
65
|
+
...r,
|
|
71
66
|
rationaleEnabled: !0,
|
|
72
67
|
feedbackEnabled: !1,
|
|
73
68
|
promptEnabled: !0,
|
|
@@ -75,9 +70,9 @@ var b = (e) => ({
|
|
|
75
70
|
studentInstructionsEnabled: !0,
|
|
76
71
|
...e
|
|
77
72
|
});
|
|
78
|
-
async function x(r,
|
|
73
|
+
async function x(r, o, u) {
|
|
79
74
|
let d = b(r), g = {};
|
|
80
|
-
if (r.alternateResponses &&
|
|
75
|
+
if (r.alternateResponses && i(r.alternateResponses, a) && (m("Deprecated structure of alternateResponses is in use"), console.error("Deprecated structure of alternateResponses is in use")), g.env = u, g.extraCSSRules = d.extraCSSRules, g.outcomes = [], g.completeLength = (d.correctResponse || []).length, g.choices = (d.choices || []).filter((e) => e.label), g.note = d.note, g.showNote = d.alternateResponses && d.alternateResponses.length > 0, g.language = d.language, m("[model] removing tileSize for the moment."), g.prompt = d.promptEnabled ? d.prompt : null, g.config = {
|
|
81
76
|
orientation: d.orientation || "vertical",
|
|
82
77
|
includeTargets: d.placementArea,
|
|
83
78
|
choiceLabelEnabled: d.choiceLabelEnabled,
|
|
@@ -86,43 +81,43 @@ async function x(r, l, u) {
|
|
|
86
81
|
showOrdering: d.numberedGuides,
|
|
87
82
|
allowSameChoiceInTargets: !d.removeTilesAfterPlacing
|
|
88
83
|
}, g.disabled = u.mode !== "gather", g.note ||= h.t("common:commonCorrectAnswerWithAlternates", { lng: d.language }), u.role === "instructor" && (u.mode === "view" || u.mode === "evaluate") ? (g.rationale = d.rationaleEnabled ? d.rationale : null, g.teacherInstructions = d.teacherInstructionsEnabled ? d.teacherInstructions : null) : (g.rationale = null, g.teacherInstructions = null), u.mode === "evaluate") {
|
|
89
|
-
let
|
|
90
|
-
let
|
|
91
|
-
return
|
|
92
|
-
arr:
|
|
93
|
-
score:
|
|
94
|
-
} :
|
|
84
|
+
let i = o && o.value || [], a = t(d), m = a.reduce((e, t) => {
|
|
85
|
+
let n = l(i, (e, n, r) => e + (Array.isArray(t) && t[r] === n ? 1 : 0), 0);
|
|
86
|
+
return n > e.score ? {
|
|
87
|
+
arr: t,
|
|
88
|
+
score: n
|
|
89
|
+
} : e;
|
|
95
90
|
}, {
|
|
96
91
|
arr: [],
|
|
97
92
|
score: 0
|
|
98
93
|
});
|
|
99
|
-
g.outcomes =
|
|
94
|
+
g.outcomes = c(i, (e, t) => ({
|
|
100
95
|
id: e,
|
|
101
96
|
outcome: m.arr[t] === e ? "correct" : "incorrect"
|
|
102
97
|
}));
|
|
103
|
-
let h =
|
|
104
|
-
return g.correctness = v ? "correct" : y ? "partial" : "incorrect", h || (g.correctResponse =
|
|
98
|
+
let h = a.some((e) => s(e, i)), _ = n(r, o), v = _ === 1, y = !v && p.enabled(d, u || {}) && _ !== 0;
|
|
99
|
+
return g.correctness = v ? "correct" : y ? "partial" : "incorrect", h || (g.correctResponse = e(d)), d.feedback || (d.feedbackEnabled = !1), g.feedback = d.feedbackEnabled ? await f(g.correctness, d.feedback) : void 0, g;
|
|
105
100
|
} else return g;
|
|
106
101
|
}
|
|
107
|
-
var S = (
|
|
108
|
-
|
|
102
|
+
var S = (t, n) => new Promise((r) => {
|
|
103
|
+
n.mode !== "evaluate" && n.role === "instructor" ? r({
|
|
109
104
|
id: "1",
|
|
110
|
-
value:
|
|
111
|
-
}) :
|
|
105
|
+
value: e(t)
|
|
106
|
+
}) : r(null);
|
|
112
107
|
}), C = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), w = (e = {}, t = {}) => {
|
|
113
|
-
let { choices: n, correctResponse:
|
|
108
|
+
let { choices: n, correctResponse: r } = e, i = {};
|
|
114
109
|
[
|
|
115
110
|
"teacherInstructions",
|
|
116
111
|
"prompt",
|
|
117
112
|
"rationale"
|
|
118
113
|
].forEach((n) => {
|
|
119
|
-
t[n]?.required && !C(e[n]) && (
|
|
114
|
+
t[n]?.required && !C(e[n]) && (i[n] = "This field is required.");
|
|
120
115
|
});
|
|
121
|
-
let
|
|
122
|
-
return
|
|
116
|
+
let a = [...n || []].reverse(), c = {};
|
|
117
|
+
return a.forEach((e, t) => {
|
|
123
118
|
let { id: n, label: r } = e;
|
|
124
|
-
C(r) ?
|
|
125
|
-
}),
|
|
119
|
+
C(r) ? a.slice(t + 1).some((e) => e.label === r) && (c[n] = "Content should be unique.") : c[n] = "Content should not be empty.";
|
|
120
|
+
}), s((n || []).map((e) => e.id), (r || []).map((e) => e.id || e)) && (i.orderError = "The correct ordering should not be identical to the initial ordering."), o(c) || (i.choicesErrors = c), i;
|
|
126
121
|
};
|
|
127
122
|
//#endregion
|
|
128
123
|
export { S as createCorrectResponseSession, y as createDefaultModel, _ as getLogTrace, x as model, b as normalize, v as outcome, g as questionError, w as validate };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
|
|
3
|
-
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniq.js";
|
|
1
|
+
import { differenceWith as e, isEqual as t, uniq as n } from "@pie-element/shared-lodash";
|
|
4
2
|
import r from "debug";
|
|
5
3
|
import { combination as i } from "js-combinatorics";
|
|
6
4
|
//#region src/controller/scoring.ts
|
package/dist/delivery/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "react";
|
|
4
|
-
import {
|
|
1
|
+
import e from "./main.js";
|
|
2
|
+
import t from "react";
|
|
3
|
+
import { createRoot as n } from "react-dom/client";
|
|
4
|
+
import { compact as r } from "@pie-element/shared-lodash";
|
|
5
5
|
import i from "debug";
|
|
6
6
|
import { renderMath as a } from "@pie-element/shared-math-rendering-mathjax";
|
|
7
7
|
import { SessionChangedEvent as o } from "@pie-element/shared-player-events";
|
|
8
8
|
//#region src/delivery/index.ts
|
|
9
|
-
var s = i("pie-elements:placement-ordering"), c = ({ model:
|
|
10
|
-
let { config:
|
|
11
|
-
return
|
|
9
|
+
var s = i("pie-elements:placement-ordering"), c = ({ model: e, session: t }) => {
|
|
10
|
+
let { config: n } = e, i = (t && r(t.value) || []).length === e.choices.length;
|
|
11
|
+
return n.includeTargets || i;
|
|
12
12
|
}, l = class extends HTMLElement {
|
|
13
13
|
constructor() {
|
|
14
14
|
super(), this._root = null, this._mathObserver = null, this._mathRenderPending = !1;
|
|
@@ -32,7 +32,7 @@ var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) =>
|
|
|
32
32
|
_disconnectMathObserver() {
|
|
33
33
|
this._mathObserver &&= (this._mathObserver.disconnect(), null);
|
|
34
34
|
}
|
|
35
|
-
isComplete = (
|
|
35
|
+
isComplete = (e) => e && r(e).length === this._model.completeLength;
|
|
36
36
|
sessionChange = (e) => {
|
|
37
37
|
this._session.value = e.value, this.render(), this.dispatchEvent(new o(this.tagName.toLowerCase(), this._session && this.isComplete(this._session.value)));
|
|
38
38
|
};
|
|
@@ -51,12 +51,12 @@ var s = i("pie-elements:placement-ordering"), c = ({ model: t, session: n }) =>
|
|
|
51
51
|
render() {
|
|
52
52
|
if (this._model && this._session) {
|
|
53
53
|
s("[render] session: ", this._session.value), s("[render] model: ", this._model), this._initMathObserver();
|
|
54
|
-
let
|
|
54
|
+
let r = t.createElement(e, {
|
|
55
55
|
model: this._model,
|
|
56
56
|
session: this._session,
|
|
57
57
|
onSessionChange: this.sessionChange
|
|
58
58
|
});
|
|
59
|
-
this._root ||=
|
|
59
|
+
this._root ||= n(this), this._root.render(r);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
connectedCallback() {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js";
|
|
3
|
-
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/map.js";
|
|
4
|
-
import r from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js";
|
|
1
|
+
import { assign as e, cloneDeep as t, isEmpty as n, map as r } from "@pie-element/shared-lodash";
|
|
5
2
|
import i from "debug";
|
|
6
3
|
//#region src/delivery/ordering.ts
|
|
7
4
|
var a = i("pie-elements:placement-ordering:ordering"), o = (e, t, n) => {
|
|
@@ -65,7 +62,7 @@ function u(e, t, n, r) {
|
|
|
65
62
|
}, []);
|
|
66
63
|
}
|
|
67
64
|
function d(t, i, a, o) {
|
|
68
|
-
return o = e({ includeTargets: !0 }, o), a ||= [], i = !i ||
|
|
65
|
+
return o = e({ includeTargets: !0 }, o), a ||= [], i = !i || n(i) ? o.includeTargets ? Array(t.length) : r(t, (e) => e.id) : i, {
|
|
69
66
|
choices: t,
|
|
70
67
|
response: i,
|
|
71
68
|
opts: o,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { haveSameValuesButDifferentOrder as s } from "./utils.js";
|
|
7
|
-
import c from "react";
|
|
1
|
+
import { HorizontalTiler as e, VerticalTiler as t } from "./tiler.js";
|
|
2
|
+
import { buildState as n, reducer as r } from "./ordering.js";
|
|
3
|
+
import { haveSameValuesButDifferentOrder as i } from "./utils.js";
|
|
4
|
+
import a from "react";
|
|
5
|
+
import { difference as o, isEqual as s, uniqueId as c } from "@pie-element/shared-lodash";
|
|
8
6
|
import l from "debug";
|
|
9
7
|
import { renderMath as u } from "@pie-element/shared-math-rendering-mathjax";
|
|
10
8
|
import d from "prop-types";
|
|
@@ -49,18 +47,18 @@ W.propTypes = {
|
|
|
49
47
|
onDropChoice: d.func,
|
|
50
48
|
onRemoveChoice: d.func
|
|
51
49
|
};
|
|
52
|
-
var G = class extends
|
|
50
|
+
var G = class extends a.Component {
|
|
53
51
|
static propTypes = {
|
|
54
52
|
onSessionChange: d.func.isRequired,
|
|
55
53
|
model: d.object.isRequired,
|
|
56
54
|
session: d.oneOfType([d.array.isRequired, d.object.isRequired])
|
|
57
55
|
};
|
|
58
56
|
constructor(e) {
|
|
59
|
-
super(e), this.instanceId =
|
|
60
|
-
let { value: t, needsReset:
|
|
57
|
+
super(e), this.instanceId = c();
|
|
58
|
+
let { value: t, needsReset: n } = this.validateSession(e);
|
|
61
59
|
this.state = { showingCorrect: !1 };
|
|
62
|
-
let { model:
|
|
63
|
-
|
|
60
|
+
let { model: r } = e || {}, { env: i } = r || {}, { mode: a } = i || {};
|
|
61
|
+
n && a === "gather" && this.props.onSessionChange({
|
|
64
62
|
...e.session,
|
|
65
63
|
value: t
|
|
66
64
|
});
|
|
@@ -69,16 +67,16 @@ var G = class extends c.Component {
|
|
|
69
67
|
componentDidUpdate() {
|
|
70
68
|
u(f.findDOMNode(this));
|
|
71
69
|
}
|
|
72
|
-
validateSession = ({ model:
|
|
73
|
-
let { config:
|
|
74
|
-
if (
|
|
70
|
+
validateSession = ({ model: e, session: t }, n = !1) => {
|
|
71
|
+
let { config: r, choices: i } = e || {}, { includeTargets: a } = r || {}, c = i.map((e) => e.id), { value: l } = t || {}, u;
|
|
72
|
+
if (a) l && l.length !== c.length && (u = !0, l = l.length < c.length ? l.concat(Array(c.length - l.length)) : l.filter((e) => c.includes(e)));
|
|
75
73
|
else {
|
|
76
|
-
if (!l || !l.length ||
|
|
74
|
+
if (!l || !l.length || n) l = c;
|
|
77
75
|
else {
|
|
78
|
-
let
|
|
79
|
-
(
|
|
76
|
+
let e = o(c, l), t = o(l, c);
|
|
77
|
+
(e.length || t.length) && (l = c);
|
|
80
78
|
}
|
|
81
|
-
u = !t
|
|
79
|
+
u = !s(t.value, l);
|
|
82
80
|
}
|
|
83
81
|
return u && console.warn("This session is not valid anymore. It will be reset."), {
|
|
84
82
|
value: l,
|
|
@@ -86,49 +84,49 @@ var G = class extends c.Component {
|
|
|
86
84
|
};
|
|
87
85
|
};
|
|
88
86
|
UNSAFE_componentWillReceiveProps(e) {
|
|
89
|
-
let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config:
|
|
87
|
+
let { model: t = {} } = e || {}, { model: n = {} } = this.props || {}, { correctResponse: r, config: a, choices: o = [], env: s } = t, { includeTargets: c } = a || {}, l = {}, u = n.language && n.language !== t.language, d = n.note && n.note === L.t("common:commonCorrectAnswerWithAlternates", { lng: n.language });
|
|
90
88
|
u && d && (n.note = L.t("common:commonCorrectAnswerWithAlternates", { lng: t.language })), r || (l.showingCorrect = !1);
|
|
91
|
-
let f =
|
|
89
|
+
let f = i(o, n.choices), { value: p, needsReset: m } = this.validateSession(e, f), h = {
|
|
92
90
|
...e.session,
|
|
93
91
|
value: p
|
|
94
92
|
}, g = n.config?.includeTargets !== c;
|
|
95
93
|
c && g && (m = !0, delete h.value), this.setState(l, () => {
|
|
96
|
-
let { mode: e } =
|
|
94
|
+
let { mode: e } = s || {};
|
|
97
95
|
m && e === "gather" && this.props.onSessionChange(h);
|
|
98
96
|
});
|
|
99
97
|
}
|
|
100
98
|
onDropChoice = (e, t, n) => {
|
|
101
|
-
let { onSessionChange:
|
|
102
|
-
R("[onDropChoice] ",
|
|
103
|
-
let c =
|
|
99
|
+
let { onSessionChange: i, session: a } = this.props, o = n.tiles.find((e) => e.id === t.id && e.type === t.type && e.index === t.index), s = e;
|
|
100
|
+
R("[onDropChoice] ", o, s);
|
|
101
|
+
let c = r({
|
|
104
102
|
type: "move",
|
|
105
|
-
from:
|
|
103
|
+
from: o,
|
|
106
104
|
to: s
|
|
107
105
|
}, n);
|
|
108
|
-
|
|
106
|
+
i(Object.assign({}, a, { value: c.response }));
|
|
109
107
|
};
|
|
110
108
|
onRemoveChoice = (e, t) => {
|
|
111
|
-
let { onSessionChange: n, session:
|
|
109
|
+
let { onSessionChange: n, session: i } = this.props;
|
|
112
110
|
R("[onRemoveChoice]", e);
|
|
113
|
-
let
|
|
111
|
+
let a = r({
|
|
114
112
|
type: "remove",
|
|
115
113
|
target: e
|
|
116
114
|
}, t);
|
|
117
|
-
n(Object.assign({},
|
|
115
|
+
n(Object.assign({}, i, { value: a.response }));
|
|
118
116
|
};
|
|
119
117
|
createOrdering = () => {
|
|
120
|
-
let { model: e, session: t } = this.props, { showingCorrect:
|
|
118
|
+
let { model: e, session: t } = this.props, { showingCorrect: r } = this.state, { includeTargets: i } = e.config || {
|
|
121
119
|
orientation: "vertical",
|
|
122
120
|
includeTargets: !0
|
|
123
121
|
};
|
|
124
|
-
return
|
|
122
|
+
return r ? n(e.choices, e.correctResponse, e.correctResponse.map((e) => ({
|
|
125
123
|
id: e,
|
|
126
124
|
outcome: "correct"
|
|
127
125
|
})), {
|
|
128
|
-
includeTargets:
|
|
126
|
+
includeTargets: i,
|
|
129
127
|
allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
|
|
130
|
-
}) :
|
|
131
|
-
includeTargets:
|
|
128
|
+
}) : n(e.choices, t.value, e.outcomes, {
|
|
129
|
+
includeTargets: i,
|
|
132
130
|
allowSameChoiceInTargets: e.config.allowSameChoiceInTargets
|
|
133
131
|
});
|
|
134
132
|
};
|
|
@@ -147,10 +145,10 @@ var G = class extends c.Component {
|
|
|
147
145
|
}
|
|
148
146
|
};
|
|
149
147
|
render() {
|
|
150
|
-
let { model:
|
|
148
|
+
let { model: n } = this.props, { correctResponse: r, correctness: i, extraCSSRules: a, prompt: o, rationale: s, feedback: c, config: l, note: u, showNote: d, env: f, disabled: p, teacherInstructions: h, language: g } = n, _ = r && r.length > 0, { showingCorrect: v } = this.state, y = l || {
|
|
151
149
|
orientation: "vertical",
|
|
152
150
|
includeTargets: !0
|
|
153
|
-
}, { orientation: T, includeTargets: E } = y, O = T === "vertical", k = this.createOrdering(), { mode: N, role: P } = f || {}, F = O ?
|
|
151
|
+
}, { orientation: T, includeTargets: E } = y, O = T === "vertical", k = this.createOrdering(), { mode: N, role: P } = f || {}, F = O ? t : e, I = (v || N === "view" && P === "instructor") && d && u, L = s && (S(s) || x(s)), R = h && (S(h) || x(h)), G = {
|
|
154
152
|
color: b.text(),
|
|
155
153
|
backgroundColor: b.background(),
|
|
156
154
|
display: "flex",
|
|
@@ -191,7 +189,7 @@ var G = class extends c.Component {
|
|
|
191
189
|
addGuide: y.showOrdering,
|
|
192
190
|
tileSize: y.tileSize,
|
|
193
191
|
includeTargets: E,
|
|
194
|
-
choiceLabelEnabled:
|
|
192
|
+
choiceLabelEnabled: n.config && n.config.choiceLabelEnabled
|
|
195
193
|
}),
|
|
196
194
|
I && /* @__PURE__ */ C(V, { dangerouslySetInnerHTML: { __html: u } }),
|
|
197
195
|
L && /* @__PURE__ */ C(U, {
|
|
@@ -203,7 +201,7 @@ var G = class extends c.Component {
|
|
|
203
201
|
children: /* @__PURE__ */ C(j, { prompt: s })
|
|
204
202
|
}),
|
|
205
203
|
!v && /* @__PURE__ */ C(M, {
|
|
206
|
-
correctness:
|
|
204
|
+
correctness: i,
|
|
207
205
|
feedback: c
|
|
208
206
|
})
|
|
209
207
|
]
|