@citolab/qti-components 10.0.0-next.7 → 10.0.0-next.9
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/cdn/index.global.js +1 -1
- package/cdn/index.js +140 -137
- package/dist/{chunk-VG5YI2OB.js → chunk-7CX6IYZJ.js} +3 -3
- package/dist/{chunk-RSSEBILM.js → chunk-AHULN3UB.js} +5 -3
- package/dist/{chunk-RSSEBILM.js.map → chunk-AHULN3UB.js.map} +1 -1
- package/dist/{chunk-6PCCBSPB.js → chunk-BIU7J6B7.js} +14 -3
- package/dist/{chunk-6PCCBSPB.js.map → chunk-BIU7J6B7.js.map} +1 -1
- package/dist/{chunk-DJHH5D3E.js → chunk-CQ3WU35R.js} +2 -2
- package/dist/{chunk-RN3MD444.js → chunk-YOUQARPK.js} +2 -2
- package/dist/corrections.js +3 -3
- package/dist/index.js +5 -5
- package/dist/interactions.js +2 -2
- package/dist/qti-components-jsx.d.ts +1 -0
- package/dist/test.js +2 -2
- package/package.json +2 -2
- /package/dist/{chunk-VG5YI2OB.js.map → chunk-7CX6IYZJ.js.map} +0 -0
- /package/dist/{chunk-DJHH5D3E.js.map → chunk-CQ3WU35R.js.map} +0 -0
- /package/dist/{chunk-RN3MD444.js.map → chunk-YOUQARPK.js.map} +0 -0
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
QtiExpression,
|
|
22
22
|
computedContext,
|
|
23
23
|
configContext,
|
|
24
|
+
isRecordValue,
|
|
24
25
|
qtiContext,
|
|
25
26
|
sessionContext,
|
|
26
27
|
testContext
|
|
@@ -4151,6 +4152,16 @@ var __decorate23 = function(decorators, target, key, desc) {
|
|
|
4151
4152
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
4152
4153
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
4153
4154
|
};
|
|
4155
|
+
var formatVariableValue = (value) => {
|
|
4156
|
+
if (value === null || value === void 0)
|
|
4157
|
+
return "";
|
|
4158
|
+
if (Array.isArray(value))
|
|
4159
|
+
return value.map(formatVariableValue).join(", ");
|
|
4160
|
+
if (isRecordValue(value)) {
|
|
4161
|
+
return Object.entries(value).map(([field, fieldValue]) => `${field}: ${formatVariableValue(fieldValue)}`).join(", ");
|
|
4162
|
+
}
|
|
4163
|
+
return String(value);
|
|
4164
|
+
};
|
|
4154
4165
|
var TestPrintVariables = class extends LitElement21 {
|
|
4155
4166
|
static {
|
|
4156
4167
|
this.styles = css13`
|
|
@@ -4196,13 +4207,13 @@ var TestPrintVariables = class extends LitElement21 {
|
|
|
4196
4207
|
</thead>
|
|
4197
4208
|
<tbody>
|
|
4198
4209
|
${variables.map((v) => {
|
|
4199
|
-
const correctResponse =
|
|
4210
|
+
const correctResponse = formatVariableValue(v.correctResponse);
|
|
4200
4211
|
const mapEntries = v.mapping?.mapEntries?.map((m) => `${m.mapKey}=${m.mappedValue}pt`).join(", ") || "";
|
|
4201
4212
|
const areaMapEntries = v.areaMapping?.areaMapEntries?.map((m) => `${m.shape}(${m.coords})=${m.mappedValue}pt`).join(", ") || "";
|
|
4202
4213
|
return html20`
|
|
4203
4214
|
<tr>
|
|
4204
4215
|
<td>${v.identifier}</td>
|
|
4205
|
-
<td>${
|
|
4216
|
+
<td>${formatVariableValue(v.value)}</td>
|
|
4206
4217
|
<td>${v.cardinality}</td>
|
|
4207
4218
|
<td>${v.baseType}</td>
|
|
4208
4219
|
<td>${correctResponse || mapEntries || areaMapEntries}</td>
|
|
@@ -5455,4 +5466,4 @@ export {
|
|
|
5455
5466
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
5456
5467
|
*)
|
|
5457
5468
|
*/
|
|
5458
|
-
//# sourceMappingURL=chunk-
|
|
5469
|
+
//# sourceMappingURL=chunk-BIU7J6B7.js.map
|