@pie-element/match-list 7.1.1 → 7.1.2-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/controller.js +1 -0
- package/dist/browser/controller/index.js +201 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/delivery/index.js +14088 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/isEmpty-Eo-n7WSl.js +387 -0
- package/dist/browser/isEmpty-Eo-n7WSl.js.map +1 -0
- package/dist/controller/defaults.d.ts +17 -0
- package/dist/controller/defaults.js +9 -0
- package/dist/controller/index.d.ts +38 -0
- package/dist/controller/index.js +105 -0
- package/dist/delivery/answer-area.d.ts +27 -0
- package/dist/delivery/answer-area.js +94 -0
- package/dist/delivery/answer.d.ts +40 -0
- package/dist/delivery/answer.js +176 -0
- package/dist/delivery/arrow.d.ts +17 -0
- package/dist/delivery/arrow.js +35 -0
- package/dist/delivery/choices-list.d.ts +21 -0
- package/dist/delivery/choices-list.js +37 -0
- package/dist/delivery/droppable-placeholder.d.ts +24 -0
- package/dist/delivery/droppable-placeholder.js +42 -0
- package/dist/delivery/index.d.ts +21 -0
- package/dist/delivery/index.js +49 -0
- package/dist/delivery/main.d.ts +26 -0
- package/dist/delivery/main.js +149 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +152 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_assocIndexOf.js +8 -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/_baseFindIndex.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindKey.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +30 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_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/_baseMatches.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_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/_equalArrays.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +35 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +32 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/_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/_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/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_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/eq.js +6 -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/findKey.js +9 -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/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/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/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/isUndefined.js +6 -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/memoize.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/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/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/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +9 -0
- package/package.json +62 -18
- package/CHANGELOG.json +0 -572
- package/CHANGELOG.md +0 -1489
- package/LICENSE.md +0 -5
- package/README.md +0 -1
- package/controller/CHANGELOG.json +0 -242
- package/controller/CHANGELOG.md +0 -1047
- package/controller/lib/defaults.js +0 -15
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -246
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -25
- package/docs/config-schema.json +0 -70
- package/docs/config-schema.json.md +0 -55
- package/docs/demo/config.js +0 -34
- package/docs/demo/generate.js +0 -54
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -6
- package/docs/pie-schema.json +0 -170
- package/docs/pie-schema.json.md +0 -104
- package/lib/answer-area.js +0 -168
- package/lib/answer-area.js.map +0 -1
- package/lib/answer.js +0 -267
- package/lib/answer.js.map +0 -1
- package/lib/arrow.js +0 -57
- package/lib/arrow.js.map +0 -1
- package/lib/choices-list.js +0 -60
- package/lib/choices-list.js.map +0 -1
- package/lib/droppable-placeholder.js +0 -60
- package/lib/droppable-placeholder.js.map +0 -1
- package/lib/index.js +0 -86
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -220
- package/lib/main.js.map +0 -1
package/controller.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/controller/index.js';
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { t as e, w as t, x as n } from "../isEmpty-Eo-n7WSl.js";
|
|
2
|
+
//#region ../../shared/feedback/dist/index.js
|
|
3
|
+
var r = {
|
|
4
|
+
correct: {
|
|
5
|
+
type: "default",
|
|
6
|
+
default: "Correct",
|
|
7
|
+
custom: "Correct"
|
|
8
|
+
},
|
|
9
|
+
incorrect: {
|
|
10
|
+
type: "default",
|
|
11
|
+
default: "Incorrect",
|
|
12
|
+
custom: "Incorrect"
|
|
13
|
+
},
|
|
14
|
+
partial: {
|
|
15
|
+
type: "default",
|
|
16
|
+
default: "Nearly",
|
|
17
|
+
custom: "Nearly"
|
|
18
|
+
},
|
|
19
|
+
unanswered: {
|
|
20
|
+
type: "default",
|
|
21
|
+
default: "You have not entered a response",
|
|
22
|
+
custom: "You have not entered a response"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
function i(e) {
|
|
26
|
+
return e === "partially-correct" ? "partial" : e;
|
|
27
|
+
}
|
|
28
|
+
function a(e, t = {}) {
|
|
29
|
+
return new Promise((n) => {
|
|
30
|
+
let a = {
|
|
31
|
+
...r,
|
|
32
|
+
...t
|
|
33
|
+
}, s = i(e), c = a[s], l = r[s];
|
|
34
|
+
o(c, l[c.type]).then(n);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function o(e, t) {
|
|
38
|
+
return new Promise((n) => {
|
|
39
|
+
if (!e || e.type === "none") {
|
|
40
|
+
n(void 0);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
n(e[e.type] || t);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region ../../shared/controller-utils/dist/index.js
|
|
48
|
+
var s = Object.defineProperty, c = (e, t) => {
|
|
49
|
+
let n = {};
|
|
50
|
+
for (var r in e) s(n, r, {
|
|
51
|
+
get: e[r],
|
|
52
|
+
enumerable: !0
|
|
53
|
+
});
|
|
54
|
+
return t || s(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
55
|
+
};
|
|
56
|
+
function l(e) {
|
|
57
|
+
return Array.isArray(e) ? e.filter((e) => e != null) : [];
|
|
58
|
+
}
|
|
59
|
+
function u(e) {
|
|
60
|
+
let t = [...e];
|
|
61
|
+
for (let e = t.length - 1; e > 0; e--) {
|
|
62
|
+
let n = Math.floor(Math.random() * (e + 1));
|
|
63
|
+
[t[e], t[n]] = [t[n], t[e]];
|
|
64
|
+
}
|
|
65
|
+
return t;
|
|
66
|
+
}
|
|
67
|
+
function d(e) {
|
|
68
|
+
return e == null ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == "object" ? Object.keys(e).length === 0 : !1;
|
|
69
|
+
}
|
|
70
|
+
async function f(e, t, n, r = "value") {
|
|
71
|
+
let i = l(t?.data?.shuffledValues ?? t?.shuffledValues ?? []);
|
|
72
|
+
if (!t) {
|
|
73
|
+
console.warn("Unable to save shuffled choices because there's no session.");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (!d(i)) return l(i.map((t) => e.find((e) => e[r] === t)));
|
|
77
|
+
let a = u(e);
|
|
78
|
+
if (n && typeof n == "function") try {
|
|
79
|
+
let e = l(a.map((e) => e[r]));
|
|
80
|
+
d(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(a)}, key: ${r}`) : t.id && t.element && await n(t.id, t.element, { shuffledValues: e });
|
|
81
|
+
} catch (e) {
|
|
82
|
+
console.warn("Unable to save shuffled order for choices"), console.error(e);
|
|
83
|
+
}
|
|
84
|
+
else console.warn("Unable to save shuffled choices, shuffle will happen every time.");
|
|
85
|
+
return a;
|
|
86
|
+
}
|
|
87
|
+
function p(e, t, n) {
|
|
88
|
+
return !!(e.lockChoiceOrder || n["@pie-element"]?.lockChoiceOrder || (n.role ?? "student") === "instructor");
|
|
89
|
+
}
|
|
90
|
+
var m = /* @__PURE__ */ c({ enabled: () => h });
|
|
91
|
+
function h(e, t, n) {
|
|
92
|
+
return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == "boolean" ? n : !0;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/controller/defaults.ts
|
|
96
|
+
var g = /* @__PURE__ */ t(n(), 1), _ = { config: {
|
|
97
|
+
answers: [],
|
|
98
|
+
prompt: "",
|
|
99
|
+
prompts: [],
|
|
100
|
+
shuffled: !1
|
|
101
|
+
} }, v = (0, g.default)("@pie-element:match-list:controller"), y = (e, t, n) => {
|
|
102
|
+
let r = m.enabled(e, n), i = e.prompts;
|
|
103
|
+
if (!t || Object.keys(t).length === 0) return "unanswered";
|
|
104
|
+
let a = S(e), o = x(i, t);
|
|
105
|
+
return a === o ? "correct" : o === 0 ? "incorrect" : r ? "partial" : "incorrect";
|
|
106
|
+
}, b = (e, t, n) => {
|
|
107
|
+
if (t.mode === "evaluate") return y(e, n, t);
|
|
108
|
+
}, x = (e = [], t) => {
|
|
109
|
+
let n = 0;
|
|
110
|
+
return e.forEach((e) => {
|
|
111
|
+
e.relatedAnswer === t[e.id] && (n += 1);
|
|
112
|
+
}), n;
|
|
113
|
+
}, S = (e) => e && e.prompts ? e.prompts.length : 0, C = (e, t) => {
|
|
114
|
+
let n = x(e && e.prompts, t), r = S(e);
|
|
115
|
+
return parseFloat((n / r).toFixed(2));
|
|
116
|
+
}, w = (e, t, n) => {
|
|
117
|
+
let r = b(e, t, n);
|
|
118
|
+
return r === "correct" ? 1 : r === "partial" ? C(e, n) : 0;
|
|
119
|
+
}, T = (e, t, n) => {
|
|
120
|
+
let r = [], i = e?.prompts || [], a = t?.value || {};
|
|
121
|
+
if (!a || Object.keys(a).length === 0) return r.push("Student did not provide any answer."), r;
|
|
122
|
+
let o = i.length;
|
|
123
|
+
r.push(`Match-list item contains ${o} question(s).`);
|
|
124
|
+
let s = 0, c = 0;
|
|
125
|
+
i.forEach((e) => {
|
|
126
|
+
let t = e.relatedAnswer, n = a[e.id];
|
|
127
|
+
n === void 0 ? r.push(`Question ${e.id}: no answer provided.`) : (c += 1, n === t ? (s += 1, r.push(`Question ${e.id}: correctly matched.`)) : r.push(`Question ${e.id}: incorrectly matched (selected '${n}', expected '${t}').`));
|
|
128
|
+
}), r.push(`Student correctly matched ${s} out of ${o} question(s).`);
|
|
129
|
+
let l = m.enabled(e, n);
|
|
130
|
+
l ? (r.push("Score calculated using partial scoring."), r.push("Score is the number of correct matches divided by the total number of questions.")) : (r.push("Score calculated using all-or-nothing scoring."), r.push("Student must match all questions correctly to receive full credit."));
|
|
131
|
+
let u = w(e, n, a), d = l ? u : +(u === 1);
|
|
132
|
+
return r.push(`Final score: ${d}.`), r;
|
|
133
|
+
}, E = (t, n, r) => new Promise((i) => {
|
|
134
|
+
r.mode === "evaluate" ? !n || e(n) ? i({
|
|
135
|
+
score: 0,
|
|
136
|
+
empty: !0,
|
|
137
|
+
logTrace: ["Student did not provide any answer."]
|
|
138
|
+
}) : i({
|
|
139
|
+
score: w(t, r, n.value),
|
|
140
|
+
empty: !1,
|
|
141
|
+
logTrace: T(t, n, r)
|
|
142
|
+
}) : i({
|
|
143
|
+
score: void 0,
|
|
144
|
+
completed: void 0,
|
|
145
|
+
logTrace: []
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
function D(e = {}) {
|
|
149
|
+
return new Promise((t) => {
|
|
150
|
+
t({
|
|
151
|
+
..._,
|
|
152
|
+
...e
|
|
153
|
+
});
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
var O = (e) => ({
|
|
157
|
+
..._,
|
|
158
|
+
...e
|
|
159
|
+
});
|
|
160
|
+
async function k(t, n, r, i) {
|
|
161
|
+
t = O(t);
|
|
162
|
+
let o = b(t, r, n && n.value), s = {}, c = {
|
|
163
|
+
score: `${w(t, r, n && n.value) * 100}%`,
|
|
164
|
+
correctness: o
|
|
165
|
+
}, l = {}, u = t.prompts, d = t.answers, m = (e) => (t, n, r) => new Promise((t) => {
|
|
166
|
+
l[e] = r.shuffledValues, t();
|
|
167
|
+
});
|
|
168
|
+
p(t, n, r) || (u = await f(u, { shuffledValues: (n && n.shuffledValues || {}).prompts }, m("prompts"), "id"), d = await f(d, { shuffledValues: (n && n.shuffledValues || {}).answers }, m("answers"), "id")), e(l) || i && typeof i == "function" && i(n.id, n.element, { shuffledValues: l }).catch((e) => {
|
|
169
|
+
console.error("update session failed", e);
|
|
170
|
+
}), t && u && u.forEach((e) => {
|
|
171
|
+
s[e.id] = e.relatedAnswer;
|
|
172
|
+
});
|
|
173
|
+
let h = r.mode === "evaluate" ? await a(c.correctness, t.feedback) : void 0, g = {
|
|
174
|
+
config: {
|
|
175
|
+
...t,
|
|
176
|
+
prompts: u,
|
|
177
|
+
answers: d
|
|
178
|
+
},
|
|
179
|
+
correctness: c,
|
|
180
|
+
feedback: h,
|
|
181
|
+
mode: r.mode
|
|
182
|
+
};
|
|
183
|
+
r.role === "instructor" && (r.mode === "view" || r.mode === "evaluate") ? g.rationale = t.rationale : g.rationale = null;
|
|
184
|
+
let _ = Object.assign(g, { correctResponse: s });
|
|
185
|
+
return v("out: ", _), _;
|
|
186
|
+
}
|
|
187
|
+
var A = (e, t) => new Promise((n) => {
|
|
188
|
+
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
189
|
+
let { prompts: t, answers: r } = e, i = {};
|
|
190
|
+
t.forEach((e) => {
|
|
191
|
+
r.filter((t) => t.id === e.relatedAnswer).length && (i[e.id] = e.relatedAnswer);
|
|
192
|
+
}), n({
|
|
193
|
+
value: i,
|
|
194
|
+
id: "1"
|
|
195
|
+
});
|
|
196
|
+
} else n(null);
|
|
197
|
+
});
|
|
198
|
+
//#endregion
|
|
199
|
+
export { A as createCorrectResponseSession, D as createDefaultModel, T as getLogTrace, k as model, O as normalize, E as outcome };
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/feedback/dist/index.js","../../../../../shared/controller-utils/dist/index.js","../../../src/controller/defaults.ts","../../../src/controller/index.ts"],"sourcesContent":["//#region src/defaults.ts\nvar e = {\n\tcorrect: {\n\t\ttype: \"default\",\n\t\tdefault: \"Correct\",\n\t\tcustom: \"Correct\"\n\t},\n\tincorrect: {\n\t\ttype: \"default\",\n\t\tdefault: \"Incorrect\",\n\t\tcustom: \"Incorrect\"\n\t},\n\tpartial: {\n\t\ttype: \"default\",\n\t\tdefault: \"Nearly\",\n\t\tcustom: \"Nearly\"\n\t},\n\tunanswered: {\n\t\ttype: \"default\",\n\t\tdefault: \"You have not entered a response\",\n\t\tcustom: \"You have not entered a response\"\n\t}\n};\n//#endregion\n//#region src/utils.ts\nfunction t(e) {\n\treturn e === \"partially-correct\" ? \"partial\" : e;\n}\n//#endregion\n//#region src/index.ts\nfunction n(n, i = {}) {\n\treturn new Promise((a) => {\n\t\tlet o = {\n\t\t\t...e,\n\t\t\t...i\n\t\t}, s = t(n), c = o[s], l = e[s];\n\t\tr(c, l[c.type]).then(a);\n\t});\n}\nfunction r(e, t) {\n\treturn new Promise((n) => {\n\t\tif (!e || e.type === \"none\") {\n\t\t\tn(void 0);\n\t\t\treturn;\n\t\t}\n\t\tn(e[e.type] || t);\n\t});\n}\nfunction i(n, r = {}) {\n\tlet i = {\n\t\t...e,\n\t\t...r\n\t}, o = t(n), s = i[o], c = e[o];\n\treturn a(s, c[s.type]);\n}\nfunction a(e, t) {\n\tif (!(!e || e.type === \"none\")) return e[e.type] || t;\n}\n//#endregion\nexport { e as defaultFeedback, a as getActualFeedback, i as getActualFeedbackForCorrectness, r as getFeedback, n as getFeedbackForCorrectness, t as normalizeCorrectness };\n","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\n//#region src/persistence.ts\nfunction n(e) {\n\treturn Array.isArray(e) ? e.filter((e) => e != null) : [];\n}\nfunction r(e) {\n\tlet t = [...e];\n\tfor (let e = t.length - 1; e > 0; e--) {\n\t\tlet n = Math.floor(Math.random() * (e + 1));\n\t\t[t[e], t[n]] = [t[n], t[e]];\n\t}\n\treturn t;\n}\nfunction i(e) {\n\treturn e == null ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == \"object\" ? Object.keys(e).length === 0 : !1;\n}\nasync function a(e, t, a, o = \"value\") {\n\tlet s = n(t?.data?.shuffledValues ?? t?.shuffledValues ?? []);\n\tif (!t) {\n\t\tconsole.warn(\"Unable to save shuffled choices because there's no session.\");\n\t\treturn;\n\t}\n\tif (!i(s)) return n(s.map((t) => e.find((e) => e[o] === t)));\n\tlet c = r(e);\n\tif (a && typeof a == \"function\") try {\n\t\tlet e = n(c.map((e) => e[o]));\n\t\ti(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(c)}, key: ${o}`) : t.id && t.element && await a(t.id, t.element, { shuffledValues: e });\n\t} catch (e) {\n\t\tconsole.warn(\"Unable to save shuffled order for choices\"), console.error(e);\n\t}\n\telse console.warn(\"Unable to save shuffled choices, shuffle will happen every time.\");\n\treturn c;\n}\nfunction o(e, t, n) {\n\treturn !!(e.lockChoiceOrder || n[\"@pie-element\"]?.lockChoiceOrder || (n.role ?? \"student\") === \"instructor\");\n}\n//#endregion\n//#region src/partial-scoring.ts\nvar s = /* @__PURE__ */ t({ enabled: () => c });\nfunction c(e, t, n) {\n\treturn e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == \"boolean\" ? n : !0;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/match-list/controller/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nexport default {\n config: {\n answers: [],\n prompt: '',\n prompts: [],\n shuffled: false,\n },\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/match-list/controller/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { isEmpty } from 'lodash-es';\nimport { getFeedbackForCorrectness } from '@pie-element/shared-feedback';\nimport { lockChoices, getShuffledChoices, partialScoring } from '@pie-element/shared-controller-utils';\nimport debug from 'debug';\n\nconst log = debug('@pie-element:match-list:controller');\n\nimport defaults from './defaults.js';\n\nconst getResponseCorrectness = (model, answers, env) => {\n const isPartialScoring = partialScoring.enabled(model, env);\n const prompts = model.prompts;\n\n if (!answers || Object.keys(answers).length === 0) {\n return 'unanswered';\n }\n\n const totalCorrectAnswers = getTotalCorrect(model);\n const correctAnswers = getCorrectSelected(prompts, answers);\n\n if (totalCorrectAnswers === correctAnswers) {\n return 'correct';\n } else if (correctAnswers === 0) {\n return 'incorrect';\n } else if (isPartialScoring) {\n return 'partial';\n }\n\n return 'incorrect';\n};\n\nconst getCorrectness = (question, env, answers) => {\n if (env.mode === 'evaluate') {\n return getResponseCorrectness(question, answers, env);\n }\n};\n\nconst getCorrectSelected = (prompts = [], answers) => {\n let correctAnswers = 0;\n\n prompts.forEach((p) => {\n if (p.relatedAnswer === answers[p.id]) {\n correctAnswers += 1;\n }\n });\n\n return correctAnswers;\n};\n\nconst getTotalCorrect = (question) => {\n return question && question.prompts ? question.prompts.length : 0;\n};\n\nconst getPartialScore = (question, answers) => {\n const count = getCorrectSelected(question && question.prompts, answers);\n const totalCorrect = getTotalCorrect(question);\n\n return parseFloat((count / totalCorrect).toFixed(2));\n};\n\nconst getOutComeScore = (question, env, answers) => {\n const correctness = getCorrectness(question, env, answers);\n\n return correctness === 'correct' ? 1 : correctness === 'partial' && true ? getPartialScore(question, answers) : 0;\n};\n\n/**\n * Generates detailed trace log for match-list scoring evaluation\n * @param {Object} question\n * @param {Object} session\n * @param {Object} env\n * @returns {Array<string>} traceLog\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n\n const prompts = question?.prompts || [];\n const answers = session?.value || {};\n\n if (!answers || Object.keys(answers).length === 0) {\n traceLog.push('Student did not provide any answer.');\n return traceLog;\n }\n\n const totalPrompts = prompts.length;\n traceLog.push(`Match-list item contains ${totalPrompts} question(s).`);\n\n let correctCount = 0;\n let answeredCount = 0;\n\n prompts.forEach((prompt) => {\n const expectedAnswer = prompt.relatedAnswer;\n const studentAnswer = answers[prompt.id];\n\n if (studentAnswer !== undefined) {\n answeredCount += 1;\n\n if (studentAnswer === expectedAnswer) {\n correctCount += 1;\n traceLog.push(`Question ${prompt.id}: correctly matched.`);\n } else {\n traceLog.push(\n `Question ${prompt.id}: incorrectly matched (selected '${studentAnswer}', expected '${expectedAnswer}').`,\n );\n }\n } else {\n traceLog.push(`Question ${prompt.id}: no answer provided.`);\n }\n });\n\n traceLog.push(\n `Student correctly matched ${correctCount} out of ${totalPrompts} question(s).`,\n );\n\n const partialScoringEnabled = partialScoring.enabled(question, env);\n\n if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push(\n 'Score is the number of correct matches divided by the total number of questions.',\n );\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push(\n 'Student must match all questions correctly to receive full credit.',\n );\n }\n\n const rawScore = getOutComeScore(question, env, answers);\n const finalScore = partialScoringEnabled ? rawScore : rawScore === 1 ? 1 : 0;\n\n traceLog.push(`Final score: ${finalScore}.`);\n\n return traceLog;\n};\n\nexport const outcome = (question, session, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate') {\n resolve({ score: undefined, completed: undefined, logTrace: [] });\n } else {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not provide any answer.'] });\n } else {\n const out = {\n score: getOutComeScore(question, env, session.value),\n empty: false,\n logTrace: getLogTrace(question, session, env),\n };\n\n resolve(out);\n }\n }\n });\n};\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n}\n\nexport const normalize = (model) => ({ ...defaults, ...model });\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n question = normalize(question);\n const correctness = getCorrectness(question, env, session && session.value);\n const correctResponse = {};\n const score = `${getOutComeScore(question, env, session && session.value) * 100}%`;\n const correctInfo = {\n score,\n correctness,\n };\n\n const shuffledValues = {};\n let prompts = question.prompts;\n let answers = question.answers;\n\n const us = (part) => (id, element, update) => {\n return new Promise((resolve) => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n };\n\n const lockChoiceOrder = lockChoices(question, session, env);\n\n if (!lockChoiceOrder) {\n prompts = await getShuffledChoices(\n prompts,\n { shuffledValues: ((session && session.shuffledValues) || {}).prompts },\n us('prompts'),\n 'id',\n );\n answers = await getShuffledChoices(\n answers,\n { shuffledValues: ((session && session.shuffledValues) || {}).answers },\n us('answers'),\n 'id',\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues,\n }).catch((e) => {\n // eslint-disable-next-line no-console\n console.error('update session failed', e);\n });\n }\n }\n\n if (question && prompts) {\n prompts.forEach((prompt) => {\n correctResponse[prompt.id] = prompt.relatedAnswer;\n });\n }\n\n const feedback =\n env.mode === 'evaluate'\n ? await getFeedbackForCorrectness(correctInfo.correctness, question.feedback)\n : undefined;\n\n const base = {\n config: {\n ...question,\n prompts,\n answers,\n },\n correctness: correctInfo,\n feedback,\n mode: env.mode,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n base.rationale = question.rationale;\n } else {\n base.rationale = null;\n }\n\n const out = Object.assign(base, {\n correctResponse,\n });\n\n log('out: ', out);\n return out;\n}\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { prompts, answers } = question;\n const value = {};\n\n prompts.forEach((p) => {\n if (answers.filter((a) => a.id === p.relatedAnswer).length) {\n value[p.id] = p.relatedAnswer;\n }\n });\n\n resolve({\n value,\n id: '1',\n });\n } else {\n resolve(null);\n }\n });\n};\n"],"mappings":";;AACA,IAAI,IAAI;CACP,SAAS;EACR,MAAM;EACN,SAAS;EACT,QAAQ;CACT;CACA,WAAW;EACV,MAAM;EACN,SAAS;EACT,QAAQ;CACT;CACA,SAAS;EACR,MAAM;EACN,SAAS;EACT,QAAQ;CACT;CACA,YAAY;EACX,MAAM;EACN,SAAS;EACT,QAAQ;CACT;AACD;AAGA,SAAS,EAAE,GAAG;CACb,OAAO,MAAM,sBAAsB,YAAY;AAChD;AAGA,SAAS,EAAE,GAAG,IAAI,CAAC,GAAG;CACrB,OAAO,IAAI,SAAS,MAAM;EACzB,IAAI,IAAI;GACP,GAAG;GACH,GAAG;EACJ,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,EAAE,IAAI,IAAI,EAAE;EAC7B,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC;CACvB,CAAC;AACF;AACA,SAAS,EAAE,GAAG,GAAG;CAChB,OAAO,IAAI,SAAS,MAAM;EACzB,IAAI,CAAC,KAAK,EAAE,SAAS,QAAQ;GAC5B,EAAE,KAAK,C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