@pie-element/match 12.1.2-next.0 → 12.1.2-next.10
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/add-row.js +1 -1
- package/dist/author/answer-config-block.js +61 -60
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +19 -18
- package/dist/author/row.js +27 -23
- package/dist/browser/{Typography-CbSskKxx.js → Typography-DS6VD63M.js} +1805 -1787
- package/dist/browser/Typography-DS6VD63M.js.map +1 -0
- package/dist/browser/author/index.js +24886 -22557
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/browser-kkT1XVKw.js +13 -4
- package/dist/browser/browser-kkT1XVKw.js.map +1 -1
- package/dist/browser/controller/index.js +3 -3
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +36 -30
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/dist-C4gh2n2Z.js +104 -0
- package/dist/browser/dist-C4gh2n2Z.js.map +1 -0
- package/dist/controller/index.js +26 -28
- package/dist/delivery/answer-grid.d.ts +1 -0
- package/dist/delivery/answer-grid.js +34 -26
- package/dist/delivery/index.js +2 -2
- package/dist/delivery/main.js +2 -2
- package/dist/index.iife.js +32 -32
- package/dist/node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.js +16 -0
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +22 -19
- package/dist/browser/Typography-CbSskKxx.js.map +0 -1
- package/dist/browser/isEqual-xtQxYITi.js +0 -856
- package/dist/browser/isEqual-xtQxYITi.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/_arrayEach.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/_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/_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/_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/_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/_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/_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/_baseSet.js +0 -22
- 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/_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/_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/_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/_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/_isIndex.js +0 -8
- 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/_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/_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/_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/_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/_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/cloneDeep.js +0 -8
- 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/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/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/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/set.js +0 -7
- 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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
//#region ../../shared/lodash/dist/index.js
|
|
2
|
+
var e = Object.prototype;
|
|
3
|
+
function t(e) {
|
|
4
|
+
return typeof e == "object" && !!e;
|
|
5
|
+
}
|
|
6
|
+
function n(e) {
|
|
7
|
+
return Array.isArray(e) ? e : typeof e == "number" ? [e] : e.replace(/\[(\d+)\]/g, ".$1").split(".").filter(Boolean);
|
|
8
|
+
}
|
|
9
|
+
function r(e) {
|
|
10
|
+
if (!t(e)) return e;
|
|
11
|
+
if (e instanceof Date) return new Date(e.getTime());
|
|
12
|
+
if (Array.isArray(e)) return e.map((e) => r(e));
|
|
13
|
+
let n = {};
|
|
14
|
+
for (let [t, i] of Object.entries(e)) n[t] = r(i);
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
17
|
+
function i(e) {
|
|
18
|
+
return (e ?? []).filter(Boolean);
|
|
19
|
+
}
|
|
20
|
+
function a(e, t = 0, n = {}) {
|
|
21
|
+
let r, i, a, o, s, c = n.leading === !0, l = n.trailing !== !1, u = () => {
|
|
22
|
+
if (!a) return s;
|
|
23
|
+
let t = a, n = o;
|
|
24
|
+
return a = void 0, o = void 0, s = e.apply(n, t), s;
|
|
25
|
+
}, d = () => {
|
|
26
|
+
r && clearTimeout(r), i && clearTimeout(i), r = void 0, i = void 0, a = void 0, o = void 0;
|
|
27
|
+
}, f = function(...e) {
|
|
28
|
+
let d = c && !r;
|
|
29
|
+
return a = e, o = this, d && u(), r && clearTimeout(r), r = setTimeout(() => {
|
|
30
|
+
r = void 0, i &&= (clearTimeout(i), void 0), l ? u() : (a = void 0, o = void 0);
|
|
31
|
+
}, t), n.maxWait !== void 0 && !i && (i = setTimeout(() => {
|
|
32
|
+
r && clearTimeout(r), r = void 0, i = void 0, l || !c ? u() : (a = void 0, o = void 0);
|
|
33
|
+
}, n.maxWait)), s;
|
|
34
|
+
};
|
|
35
|
+
return f.cancel = d, f.flush = () => (r &&= (clearTimeout(r), void 0), i &&= (clearTimeout(i), void 0), u()), f;
|
|
36
|
+
}
|
|
37
|
+
function o(e) {
|
|
38
|
+
let t = [];
|
|
39
|
+
for (let n of e ?? []) Array.isArray(n) ? t.push(...n) : t.push(n);
|
|
40
|
+
return t;
|
|
41
|
+
}
|
|
42
|
+
function s(e, t, r) {
|
|
43
|
+
if (!Array.isArray(t) && e != null && Object.prototype.hasOwnProperty.call(Object(e), t)) {
|
|
44
|
+
let n = e[t];
|
|
45
|
+
return n === void 0 ? r : n;
|
|
46
|
+
}
|
|
47
|
+
let i = e;
|
|
48
|
+
for (let e of n(t)) {
|
|
49
|
+
if (i == null) return r;
|
|
50
|
+
i = i[e];
|
|
51
|
+
}
|
|
52
|
+
return i === void 0 ? r : i;
|
|
53
|
+
}
|
|
54
|
+
function c(e) {
|
|
55
|
+
return e == null ? !0 : typeof e == "string" || Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : !t(e) || Object.keys(e).length === 0;
|
|
56
|
+
}
|
|
57
|
+
function l(n, r, i) {
|
|
58
|
+
let a = i?.(n, r);
|
|
59
|
+
if (a !== void 0) return !!a;
|
|
60
|
+
if (Object.is(n, r)) return !0;
|
|
61
|
+
if (!t(n) || !t(r)) return !1;
|
|
62
|
+
if (n instanceof Date || r instanceof Date) return n instanceof Date && r instanceof Date && n.getTime() === r.getTime();
|
|
63
|
+
if (Array.isArray(n) || Array.isArray(r)) return Array.isArray(n) && Array.isArray(r) && n.length === r.length && n.every((e, t) => l(e, r[t], i));
|
|
64
|
+
let o = Object.keys(n), s = Object.keys(r);
|
|
65
|
+
return o.length === s.length && o.every((t) => e.hasOwnProperty.call(r, t) && l(n[t], r[t], i));
|
|
66
|
+
}
|
|
67
|
+
function u(e, t) {
|
|
68
|
+
return l(e, t);
|
|
69
|
+
}
|
|
70
|
+
function d(e) {
|
|
71
|
+
return Number.isFinite(e);
|
|
72
|
+
}
|
|
73
|
+
function f(e, ...n) {
|
|
74
|
+
for (let i of n) if (i) for (let [n, a] of Object.entries(i)) t(a) && !Array.isArray(a) && t(e[n]) ? f(e[n], a) : e[n] = r(a);
|
|
75
|
+
return e;
|
|
76
|
+
}
|
|
77
|
+
function p(e, t) {
|
|
78
|
+
let n = { ...e ?? {} };
|
|
79
|
+
for (let e of Array.isArray(t) ? t : [t]) delete n[e];
|
|
80
|
+
return n;
|
|
81
|
+
}
|
|
82
|
+
function m(e, t, r) {
|
|
83
|
+
let i = n(t), a = e;
|
|
84
|
+
return i.forEach((e, t) => {
|
|
85
|
+
if (t === i.length - 1) {
|
|
86
|
+
a[e] = r;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
let n = i[t + 1];
|
|
90
|
+
a[e] ??= typeof n == "number" || /^\d+$/.test(String(n)) ? [] : {}, a = a[e];
|
|
91
|
+
}), e;
|
|
92
|
+
}
|
|
93
|
+
function h(e, t) {
|
|
94
|
+
let n = t ?? ((e) => e);
|
|
95
|
+
return Array.from({ length: Math.max(0, e) }, (e, t) => n(t));
|
|
96
|
+
}
|
|
97
|
+
function g(...e) {
|
|
98
|
+
let t = Math.max(0, ...e.map((e) => e.length));
|
|
99
|
+
return Array.from({ length: t }, (t, n) => e.map((e) => e[n]));
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
export { c as a, r as c, i as d, s as f, d as i, h as l, f as n, p as o, o as p, m as r, a as s, u as t, g as u };
|
|
103
|
+
|
|
104
|
+
//# sourceMappingURL=dist-C4gh2n2Z.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dist-C4gh2n2Z.js","names":[],"sources":["../../../../shared/lodash/dist/index.js"],"sourcesContent":["//#region src/index.ts\nvar e = Object.prototype;\nfunction t(e) {\n\treturn typeof e == \"object\" && !!e;\n}\nfunction n(e) {\n\treturn Array.isArray(e) ? e : typeof e == \"number\" ? [e] : e.replace(/\\[(\\d+)\\]/g, \".$1\").split(\".\").filter(Boolean);\n}\nfunction r(e) {\n\treturn (t) => x(t, e);\n}\nfunction i(e) {\n\treturn (n) => t(n) ? Object.entries(e).every(([e, t]) => A(n[e], t)) : !1;\n}\nfunction a(e) {\n\treturn typeof e == \"function\" ? e : typeof e == \"string\" ? r(e) : t(e) ? i(e) : ((e) => e);\n}\nfunction o(e, ...t) {\n\treturn Object.assign(e, ...t.filter(Boolean));\n}\nfunction s(e, t = 1) {\n\tif (!e?.length || t < 1) return [];\n\tlet n = [];\n\tfor (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t));\n\treturn n;\n}\nfunction c(e) {\n\treturn Array.isArray(e) ? e.slice() : t(e) ? { ...e } : e;\n}\nfunction l(e) {\n\tif (!t(e)) return e;\n\tif (e instanceof Date) return new Date(e.getTime());\n\tif (Array.isArray(e)) return e.map((e) => l(e));\n\tlet n = {};\n\tfor (let [t, r] of Object.entries(e)) n[t] = l(r);\n\treturn n;\n}\nfunction u(e) {\n\treturn (e ?? []).filter(Boolean);\n}\nfunction d(e, ...t) {\n\tlet n = [...e ?? []];\n\tfor (let e of t) Array.isArray(e) ? n.push(...e) : n.push(e);\n\treturn n;\n}\nfunction f(e, t = 0, n = {}) {\n\tlet r, i, a, o, s, c = n.leading === !0, l = n.trailing !== !1, u = () => {\n\t\tif (!a) return s;\n\t\tlet t = a, n = o;\n\t\treturn a = void 0, o = void 0, s = e.apply(n, t), s;\n\t}, d = () => {\n\t\tr && clearTimeout(r), i && clearTimeout(i), r = void 0, i = void 0, a = void 0, o = void 0;\n\t}, f = function(...e) {\n\t\tlet d = c && !r;\n\t\treturn a = e, o = this, d && u(), r && clearTimeout(r), r = setTimeout(() => {\n\t\t\tr = void 0, i &&= (clearTimeout(i), void 0), l ? u() : (a = void 0, o = void 0);\n\t\t}, t), n.maxWait !== void 0 && !i && (i = setTimeout(() => {\n\t\t\tr && clearTimeout(r), r = void 0, i = void 0, l || !c ? u() : (a = void 0, o = void 0);\n\t\t}, n.maxWait)), s;\n\t};\n\treturn f.cancel = d, f.flush = () => (r &&= (clearTimeout(r), void 0), i &&= (clearTimeout(i), void 0), u()), f;\n}\nfunction p(e, ...t) {\n\tfor (let n of t) if (n) for (let [t, r] of Object.entries(n)) e[t] === void 0 && (e[t] = r);\n\treturn e;\n}\nfunction m(e, ...t) {\n\tlet n = new Set(t.flat());\n\treturn (e ?? []).filter((e) => !n.has(e));\n}\nfunction h(e, t, n) {\n\treturn (e ?? []).filter((e) => !(t ?? []).some((t) => n(e, t)));\n}\nfunction g(e, t) {\n\tlet n = a(t), r = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});\n\tfor (let [t, i] of r) if (!n(i, t, e)) return !1;\n\treturn !0;\n}\nfunction ee(e) {\n\treturn String(e).replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n}\nfunction _(e, t) {\n\tlet n = a(t), r = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});\n\tfor (let [t, i] of r) if (n(i, t, e)) return i;\n}\nfunction v(e, t) {\n\tlet n = a(t);\n\tfor (let [t, r] of Object.entries(e ?? {})) if (n(r, t, e)) return t;\n}\nfunction y(e) {\n\tlet t = [];\n\tfor (let n of e ?? []) Array.isArray(n) ? t.push(...n) : t.push(n);\n\treturn t;\n}\nfunction te(e, t) {\n\treturn R(e, t).flat();\n}\nfunction b(e, t) {\n\tlet n = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});\n\tfor (let [r, i] of n) t(i, r, e);\n\treturn e;\n}\nfunction x(e, t, r) {\n\tif (!Array.isArray(t) && e != null && Object.prototype.hasOwnProperty.call(Object(e), t)) {\n\t\tlet n = e[t];\n\t\treturn n === void 0 ? r : n;\n\t}\n\tlet i = e;\n\tfor (let e of n(t)) {\n\t\tif (i == null) return r;\n\t\ti = i[e];\n\t}\n\treturn i === void 0 ? r : i;\n}\nfunction S(e, t) {\n\tlet n = a(t);\n\treturn K(e, (t, r, i) => {\n\t\tlet a = String(n(r, i, e));\n\t\treturn (t[a] ??= []).push(r), t;\n\t}, {});\n}\nfunction C(e) {\n\treturn e?.[0];\n}\nfunction w(e) {\n\treturn (e ?? []).slice(0, -1);\n}\nfunction T(e, t) {\n\treturn typeof e == \"string\" ? e.includes(String(t)) : Array.isArray(e) ? e.includes(t) : Object.values(e ?? {}).includes(t);\n}\nfunction E(...e) {\n\tlet [t, ...n] = e;\n\treturn $((t ?? []).filter((e) => n.every((t) => (t ?? []).includes(e))));\n}\nfunction D(e) {\n\treturn Array.isArray(e);\n}\nfunction O(e) {\n\treturn e == null ? !0 : typeof e == \"string\" || Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : !t(e) || Object.keys(e).length === 0;\n}\nfunction k(n, r, i) {\n\tlet a = i?.(n, r);\n\tif (a !== void 0) return !!a;\n\tif (Object.is(n, r)) return !0;\n\tif (!t(n) || !t(r)) return !1;\n\tif (n instanceof Date || r instanceof Date) return n instanceof Date && r instanceof Date && n.getTime() === r.getTime();\n\tif (Array.isArray(n) || Array.isArray(r)) return Array.isArray(n) && Array.isArray(r) && n.length === r.length && n.every((e, t) => k(e, r[t], i));\n\tlet o = Object.keys(n), s = Object.keys(r);\n\treturn o.length === s.length && o.every((t) => e.hasOwnProperty.call(r, t) && k(n[t], r[t], i));\n}\nfunction A(e, t) {\n\treturn k(e, t);\n}\nfunction j(e, t, n) {\n\treturn k(e, t, n);\n}\nfunction M(e) {\n\treturn Number.isFinite(e);\n}\nfunction N(e) {\n\treturn typeof e == \"function\";\n}\nfunction P(e) {\n\treturn typeof e == \"number\" || e instanceof Number;\n}\nfunction F(e) {\n\treturn typeof e == \"object\" && !!e || typeof e == \"function\";\n}\nfunction I(e) {\n\treturn typeof e == \"string\" || e instanceof String;\n}\nfunction L(e) {\n\treturn e === void 0;\n}\nfunction R(e, t) {\n\tlet n = a(t), r = Array.isArray(e) ? e.entries() : Object.entries(e ?? {}), i = [];\n\tfor (let [t, a] of r) i.push(n(a, t, e));\n\treturn i;\n}\nfunction z(e) {\n\treturn e?.length ? Math.max(...e) : void 0;\n}\nfunction B(e, ...n) {\n\tfor (let r of n) if (r) for (let [n, i] of Object.entries(r)) t(i) && !Array.isArray(i) && t(e[n]) ? B(e[n], i) : e[n] = l(i);\n\treturn e;\n}\nfunction V(e, t) {\n\tlet n = { ...e ?? {} };\n\tfor (let e of Array.isArray(t) ? t : [t]) delete n[e];\n\treturn n;\n}\nfunction H(e, t) {\n\tlet n = a(t), r = {};\n\tfor (let [t, i] of Object.entries(e ?? {})) n(i, t, e) || (r[t] = i);\n\treturn r;\n}\nfunction U(e, ...t) {\n\tlet n = {};\n\tfor (let r of t.flat()) e && r in e && (n[r] = e[r]);\n\treturn n;\n}\nfunction W(e, t, n = 1) {\n\tlet r = t ?? e, i = t === void 0 ? 0 : e;\n\tif (n === 0) return [];\n\tlet a = [], o = n > 0;\n\tfor (let e = i; o ? e < r : e > r; e += n) a.push(e);\n\treturn a;\n}\nfunction G(e, t, n = 1) {\n\treturn W(e, t, n).reverse();\n}\nfunction K(e, t, n) {\n\tlet r = n, i = Array.isArray(e) ? e.entries() : Object.entries(e ?? {});\n\tfor (let [n, a] of i) r = t(r, a, n, e);\n\treturn r;\n}\nfunction q(e, t) {\n\tlet n = a(t), r = [];\n\tfor (let t = e.length - 1; t >= 0; t--) n(e[t], t, e) && r.unshift(...e.splice(t, 1));\n\treturn r;\n}\nfunction J(e, t, r) {\n\tlet i = n(t), a = e;\n\treturn i.forEach((e, t) => {\n\t\tif (t === i.length - 1) {\n\t\t\ta[e] = r;\n\t\t\treturn;\n\t\t}\n\t\tlet n = i[t + 1];\n\t\ta[e] ??= typeof n == \"number\" || /^\\d+$/.test(String(n)) ? [] : {}, a = a[e];\n\t}), e;\n}\nfunction Y(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 X(e) {\n\treturn (e ?? []).slice(1);\n}\nfunction Z(e, t = 1) {\n\treturn t <= 0 ? [] : (e ?? []).slice(-t);\n}\nfunction Q(e, t = 0, n = {}) {\n\treturn f(e, t, {\n\t\tleading: n.leading !== !1,\n\t\ttrailing: n.trailing !== !1,\n\t\tmaxWait: t\n\t});\n}\nfunction ne(e, t) {\n\tlet n = t ?? ((e) => e);\n\treturn Array.from({ length: Math.max(0, e) }, (e, t) => n(t));\n}\nvar re = 0;\nfunction ie(e = \"\") {\n\treturn re += 1, `${e}${re}`;\n}\nfunction $(e) {\n\treturn Array.from(new Set(e ?? []));\n}\nfunction ae(e, t) {\n\tlet n = [];\n\tfor (let r of e ?? []) n.some((e) => t(r, e)) || n.push(r);\n\treturn n;\n}\nfunction oe(...e) {\n\tlet t = Math.max(0, ...e.map((e) => e.length));\n\treturn Array.from({ length: t }, (t, n) => e.map((e) => e[n]));\n}\nvar se = {\n\tassign: o,\n\tchunk: s,\n\tclone: c,\n\tcloneDeep: l,\n\tcompact: u,\n\tconcat: d,\n\tdebounce: f,\n\tdefaults: p,\n\tdifference: m,\n\tdifferenceWith: h,\n\tevery: g,\n\tescape: ee,\n\tfind: _,\n\tfindKey: v,\n\tflatten: y,\n\tflatMap: te,\n\tforEach: b,\n\tget: x,\n\tgroupBy: S,\n\thead: C,\n\tincludes: T,\n\tinitial: w,\n\tintersection: E,\n\tisArray: D,\n\tisEmpty: O,\n\tisEqual: A,\n\tisEqualWith: j,\n\tisFinite: M,\n\tisFunction: N,\n\tisNumber: P,\n\tisObject: F,\n\tisString: I,\n\tisUndefined: L,\n\tmap: R,\n\tmax: z,\n\tmerge: B,\n\tomit: V,\n\tomitBy: H,\n\tpick: U,\n\trange: W,\n\trangeRight: G,\n\treduce: K,\n\tremove: q,\n\tset: J,\n\tshuffle: Y,\n\ttail: X,\n\ttakeRight: Z,\n\tthrottle: Q,\n\ttimes: ne,\n\tuniqueId: ie,\n\tuniq: $,\n\tuniqWith: ae,\n\tzip: oe\n};\n//#endregion\nexport { o as assign, s as chunk, c as clone, l as cloneDeep, u as compact, d as concat, f as debounce, se as default, p as defaults, m as difference, h as differenceWith, ee as escape, g as every, _ as find, v as findKey, te as flatMap, y as flatten, b as forEach, x as get, S as groupBy, C as head, T as includes, w as initial, E as intersection, D as isArray, O as isEmpty, A as isEqual, j as isEqualWith, M as isFinite, N as isFunction, P as isNumber, F as isObject, I as isString, L as isUndefined, R as map, z as max, B as merge, V as omit, H as omitBy, U as pick, W as range, G as rangeRight, K as reduce, q as remove, J as set, Y as shuffle, X as tail, Z as takeRight, Q as throttle, ne as times, $ as uniq, ae as uniqWith, ie as uniqueId, oe as zip };\n"],"mappings":";AACA,IAAI,IAAI,OAAO;AACf,SAAS,EAAE,GAAG;CACb,OAAO,OAAO,KAAK,YAAY,CAAC,CAAC;AAClC;AACA,SA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IAAI,KAAK,MAAM,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE;CACnD,OAAO;AACR;AA+BA,SAAS,EAAE,GAAG,GAAG,GAAG;CACnB,IAAI,IAAI,EAAE,CAAC,GAAG,IAAI;CAClB,OAAO,EAAE,SAAS,GAAG,MAAM;EAC1B,IAAI,MAAM,EAAE,SAAS,GAAG;GACvB,EAAE,KAAK;GACP;EACD;EACA,IAAI,IAAI,EAAE,IAAI;EACd,EAAE,OAAO,OAAO,KAAK,YAAY,QAAQ,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE;CAC3E,CAAC,GAAG;AACL;AAsBA,SAAS,EAAG,GAAG,GAAG;CACjB,IAAI,IAAI,OAAO,MAAM;CACrB,OAAO,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC;AAC7D;AAaA,SAAS,EAAG,GAAG,GAAG;CACjB,IAAI,IAAI,KAAK,IAAI,GAAG,GAAG,EAAE,KAAK,MAAM,EAAE,MAAM,CAAC;CAC7C,OAAO,MAAM,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,MAAM,EAAE,EAAE,CAAC;AAC9D"}
|
package/dist/controller/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEqual.js";
|
|
4
|
-
import r from "./defaults.js";
|
|
1
|
+
import e from "./defaults.js";
|
|
2
|
+
import { cloneDeep as t, isEmpty as n, isEqual as r } from "@pie-element/shared-lodash";
|
|
5
3
|
import { getFeedbackForCorrectness as i } from "@pie-element/shared-feedback";
|
|
6
4
|
import { getShuffledChoices as a, lockChoices as o, partialScoring as s } from "@pie-element/shared-controller-utils";
|
|
7
5
|
import c from "debug";
|
|
@@ -29,10 +27,10 @@ var l = c("@pie-element:match:controller"), u = (e, t, n = {}) => {
|
|
|
29
27
|
incorrectAnswers: r
|
|
30
28
|
};
|
|
31
29
|
}, p = (e, t) => {
|
|
32
|
-
let
|
|
30
|
+
let n = 0;
|
|
33
31
|
return e.forEach((e) => {
|
|
34
|
-
|
|
35
|
-
}),
|
|
32
|
+
r(e.values, t[e.id]) && (n += 1);
|
|
33
|
+
}), n;
|
|
36
34
|
}, m = (e) => {
|
|
37
35
|
let t = e.choiceMode === "checkbox" ? e.layout - 1 : 1;
|
|
38
36
|
return (e.rows.length || 0) * t;
|
|
@@ -57,51 +55,51 @@ var l = c("@pie-element:match:controller"), u = (e, t, n = {}) => {
|
|
|
57
55
|
}, _ = (e, t, n = {}) => {
|
|
58
56
|
let r = d(e, t, n), i = s.enabled(e, t);
|
|
59
57
|
return r === "correct" ? 1 : r === "partial" && i ? g(e, n) : 0;
|
|
60
|
-
}, v = (e, t,
|
|
58
|
+
}, v = (e, t, n) => {
|
|
61
59
|
let i = [], a = t?.answers || {}, o = e?.rows || [], c = e.choiceMode === "checkbox";
|
|
62
60
|
if (!a || Object.keys(a).length === 0) return i.push("Student did not provide any answer."), i;
|
|
63
61
|
i.push(`Match item contains ${o.length} row(s).`), i.push(`Matching mode: ${c ? "checkbox (multiple matches allowed)" : "radio (single match per row)"}.`);
|
|
64
62
|
let l = 0, u = 0, d = 0;
|
|
65
63
|
o.forEach((e) => {
|
|
66
|
-
let t = a[e.id],
|
|
67
|
-
c ?
|
|
64
|
+
let t = a[e.id], n = e.values || [];
|
|
65
|
+
c ? n.forEach((e, n) => {
|
|
68
66
|
e && d++, t && t[n] && (t[n] === e ? l++ : u++);
|
|
69
|
-
}) : (d++, t && (n
|
|
67
|
+
}) : (d++, t && (r(n, t) ? l++ : u++));
|
|
70
68
|
}), l > 0 && i.push(`${l} correct match(es) selected.`), u > 0 && i.push(`${u} incorrect match(es) selected.`), l === 0 && u === 0 && i.push("Student provided answers, but none matched the correct responses.");
|
|
71
|
-
let f = s.enabled(e,
|
|
69
|
+
let f = s.enabled(e, n);
|
|
72
70
|
f ? (i.push("Score calculated using partial scoring."), c ? (i.push("Score is based on the number of correct minus extra incorrect matches, divided by the total number of correct matches."), l + u > d && i.push("Extra selected matches beyond the correct set reduce the score.")) : i.push("Score is based on the number of correctly matched rows divided by the total number of rows.")) : (i.push("Score calculated using all-or-nothing scoring."), i.push("Student must match all rows correctly to receive full credit."));
|
|
73
|
-
let p = _(e,
|
|
71
|
+
let p = _(e, n, a), m = f ? p : +(p === 1);
|
|
74
72
|
return i.push(`Final score: ${m}.`), i;
|
|
75
|
-
}, y = (e,
|
|
76
|
-
r.mode === "evaluate" ? ((!
|
|
73
|
+
}, y = (e, t, r) => new Promise((i) => {
|
|
74
|
+
r.mode === "evaluate" ? ((!t || n(t)) && i({
|
|
77
75
|
score: 0,
|
|
78
76
|
empty: !0,
|
|
79
77
|
logTrace: ["Student did not provide any answer."]
|
|
80
78
|
}), i({
|
|
81
|
-
score: _(e, r,
|
|
79
|
+
score: _(e, r, t.answers),
|
|
82
80
|
empty: !1,
|
|
83
|
-
logTrace: v(e,
|
|
81
|
+
logTrace: v(e, t, r)
|
|
84
82
|
})) : i({
|
|
85
83
|
score: void 0,
|
|
86
84
|
completed: void 0,
|
|
87
85
|
logTrace: []
|
|
88
86
|
});
|
|
89
87
|
});
|
|
90
|
-
function b(
|
|
91
|
-
return new Promise((
|
|
92
|
-
|
|
93
|
-
...
|
|
94
|
-
...
|
|
88
|
+
function b(t = {}) {
|
|
89
|
+
return new Promise((n) => {
|
|
90
|
+
n({
|
|
91
|
+
...e,
|
|
92
|
+
...t
|
|
95
93
|
});
|
|
96
94
|
});
|
|
97
95
|
}
|
|
98
|
-
var x = (
|
|
99
|
-
...
|
|
100
|
-
...
|
|
96
|
+
var x = (t) => ({
|
|
97
|
+
...e,
|
|
98
|
+
...t
|
|
101
99
|
});
|
|
102
|
-
async function S(
|
|
103
|
-
let u =
|
|
104
|
-
(!r ||
|
|
100
|
+
async function S(e, r, s, c) {
|
|
101
|
+
let u = t(x(e)), f, p;
|
|
102
|
+
(!r || n(r)) && s.mode === "evaluate" ? (f = "unanswered", p = "0%") : (f = d(u, s, r && r.answers), p = `${_(u, s, r && r.answers) * 100}%`);
|
|
105
103
|
let m = {}, h = {
|
|
106
104
|
score: p,
|
|
107
105
|
correctness: f
|
|
@@ -23,6 +23,7 @@ export declare class AnswerGrid extends React.Component {
|
|
|
23
23
|
onRowValueChange: (rowId: any, answerIndex: any) => (event: any) => void;
|
|
24
24
|
answerIsCorrect: any;
|
|
25
25
|
answerIsIncorrect: any;
|
|
26
|
+
controlColor: any;
|
|
26
27
|
render(): React.JSX.Element;
|
|
27
28
|
}
|
|
28
29
|
export default AnswerGrid;
|
|
@@ -50,14 +50,18 @@ var l = c("div")(({ theme: e }) => ({
|
|
|
50
50
|
let { correctAnswers: r } = this.props;
|
|
51
51
|
return r[e][n] === !0 && t === !1 || r[e][n] === !1 && t === !0;
|
|
52
52
|
};
|
|
53
|
+
controlColor = (e, t, r) => {
|
|
54
|
+
let { showCorrect: i, disabled: a, view: o } = this.props, s = a && !o;
|
|
55
|
+
return i && t === !0 || s && this.answerIsCorrect(e, t, r) ? n.correct() : s && this.answerIsIncorrect(e, t, r) ? n.incorrect() : t === !0 && !s ? n.primary() : a ? n.disabled() : n.text();
|
|
56
|
+
};
|
|
53
57
|
render() {
|
|
54
|
-
let {
|
|
55
|
-
return !
|
|
58
|
+
let { headers: e, rows: t, choiceMode: s, answers: c, disabled: g } = this.props, _ = s === "radio" ? a : o;
|
|
59
|
+
return !t || t.length === 0 ? /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(d, {
|
|
56
60
|
component: "div",
|
|
57
61
|
children: "There are currently no questions to show."
|
|
58
62
|
}) }) : /* @__PURE__ */ r(l, { children: /* @__PURE__ */ i(h, { children: [
|
|
59
|
-
/* @__PURE__ */ r("colgroup", { children: (
|
|
60
|
-
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: (
|
|
63
|
+
/* @__PURE__ */ r("colgroup", { children: (e || []).map((e, t) => /* @__PURE__ */ r("col", {}, `col-${t}`)) }),
|
|
64
|
+
/* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: (e || []).map((e, t) => /* @__PURE__ */ r(f, {
|
|
61
65
|
"data-colno": `${t}`,
|
|
62
66
|
scope: "row",
|
|
63
67
|
children: /* @__PURE__ */ r(p, {
|
|
@@ -65,35 +69,39 @@ var l = c("div")(({ theme: e }) => ({
|
|
|
65
69
|
dangerouslySetInnerHTML: { __html: e }
|
|
66
70
|
})
|
|
67
71
|
}, `th-${t}`)) }) }),
|
|
68
|
-
(
|
|
72
|
+
(t || []).map((e, t) => /* @__PURE__ */ r("tbody", {
|
|
69
73
|
role: "group",
|
|
70
74
|
children: /* @__PURE__ */ i(m, { children: [/* @__PURE__ */ r("td", {
|
|
71
75
|
"data-colno": "0",
|
|
72
76
|
children: /* @__PURE__ */ r(p, {
|
|
73
77
|
isQuestionText: !0,
|
|
74
|
-
dangerouslySetInnerHTML: { __html:
|
|
78
|
+
dangerouslySetInnerHTML: { __html: e.title }
|
|
75
79
|
})
|
|
76
|
-
}, `td-title-${
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
80
|
+
}, `td-title-${t}`), (c[e.id] || []).map((i, a) => {
|
|
81
|
+
let o = this.controlColor(e.id, i, a);
|
|
82
|
+
return /* @__PURE__ */ r(u, {
|
|
83
|
+
"data-colno": `${a + 1}`,
|
|
84
|
+
children: /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(_, {
|
|
85
|
+
sx: {
|
|
86
|
+
padding: "6px",
|
|
87
|
+
color: o,
|
|
88
|
+
"&&.Mui-checked": { color: o },
|
|
89
|
+
"&&.Mui-disabled": { color: o },
|
|
90
|
+
cursor: g ? "not-allowed" : "pointer",
|
|
91
|
+
pointerEvents: g ? "initial" : "auto",
|
|
92
|
+
opacity: g ? .7 : 1,
|
|
93
|
+
"& input": { width: "100% !important" },
|
|
94
|
+
"&&:hover:not(.Mui-disabled)": { color: n.primaryLight() }
|
|
95
|
+
},
|
|
96
|
+
disabled: g,
|
|
97
|
+
onChange: this.onRowValueChange(e.id, a),
|
|
98
|
+
checked: i === !0
|
|
99
|
+
}) })
|
|
100
|
+
}, `td-${t}-${a}`);
|
|
101
|
+
})] })
|
|
102
|
+
}, `row-${t}`))
|
|
95
103
|
] }) });
|
|
96
104
|
}
|
|
97
105
|
};
|
|
98
106
|
//#endregion
|
|
99
|
-
export { g as default };
|
|
107
|
+
export { g as AnswerGrid, g as default };
|
package/dist/delivery/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./main.js";
|
|
1
|
+
import { Main as e } from "./main.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import { createRoot as n } from "react-dom/client";
|
|
4
4
|
import { SessionChangedEvent as r } from "@pie-element/shared-player-events";
|
|
@@ -44,7 +44,7 @@ var a = (e, t) => (t?.rows?.map((e) => e.id) || []).reduce((t, n) => {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
disconnectedCallback() {
|
|
47
|
-
this._root
|
|
47
|
+
this._root &&= (this._root.unmount(), null);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
//#endregion
|
package/dist/delivery/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./answer-grid.js";
|
|
1
|
+
import { AnswerGrid as e } from "./answer-grid.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import n from "prop-types";
|
|
4
4
|
import r from "@pie-lib/correct-answer-toggle";
|
|
@@ -109,4 +109,4 @@ var g = h(c, "UiLayout") || h(S.UiLayout, "UiLayout"), _ = h(s, "PreviewPrompt")
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
//#endregion
|
|
112
|
-
export { T as default };
|
|
112
|
+
export { T as Main, T as default };
|