@citolab/qti-components 8.0.2 → 8.1.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/cdn/index.global.js +1 -1
- package/cdn/index.js +647 -815
- package/dist/base.d.ts +58 -1
- package/dist/base.js +7 -1
- package/dist/{chunk-NJQHUUTN.js → chunk-3IACYIU2.js} +2 -2
- package/dist/{chunk-TWPXES3S.js → chunk-4XR2JHCP.js} +6 -6
- package/dist/chunk-4XR2JHCP.js.map +1 -0
- package/dist/{chunk-7V4HJFHW.js → chunk-6ITD55QE.js} +2 -2
- package/dist/{chunk-ZII6M3SN.js → chunk-6V3A7NQP.js} +2 -2
- package/dist/{chunk-7AVWRQIS.js → chunk-6XJUP55A.js} +62 -76
- package/dist/{chunk-7AVWRQIS.js.map → chunk-6XJUP55A.js.map} +1 -1
- package/dist/{chunk-J5SQLKNP.js → chunk-CF3DXJWM.js} +6 -6
- package/dist/{chunk-HQESINXH.js → chunk-EKXZI26R.js} +84 -1
- package/dist/chunk-EKXZI26R.js.map +1 -0
- package/dist/{chunk-IJD53WY6.js → chunk-HDEG6BAZ.js} +15 -15
- package/dist/{chunk-IJD53WY6.js.map → chunk-HDEG6BAZ.js.map} +1 -1
- package/dist/{chunk-CK7AV2UJ.js → chunk-IXPDMYKH.js} +3 -3
- package/dist/chunk-IYC7LZV6.js +7 -0
- package/dist/chunk-IYC7LZV6.js.map +1 -0
- package/dist/{chunk-VAE6HBKR.js → chunk-MK2I3MQB.js} +86 -59
- package/dist/chunk-MK2I3MQB.js.map +1 -0
- package/dist/{chunk-BQFWCZFH.js → chunk-NZLW6EX7.js} +2 -2
- package/dist/{chunk-HBSWJC3B.js → chunk-Q52IJELT.js} +5 -5
- package/dist/{chunk-RSVRS5AK.js → chunk-TXIB3SKC.js} +4 -4
- package/dist/corrections.js +8 -8
- package/dist/elements.d.ts +0 -1
- package/dist/elements.js +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +28 -14
- package/dist/interactions.js +3 -3
- package/dist/item.css +370 -532
- package/dist/item.js +5 -5
- package/dist/loader.js +2 -2
- package/dist/processing.d.ts +61 -11
- package/dist/processing.js +10 -2
- package/dist/qti-components-jsx.d.ts +756 -552
- package/dist/test.js +6 -6
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +1 -1
- package/package.json +8 -8
- package/dist/chunk-G6GFQDVN.js +0 -7
- package/dist/chunk-G6GFQDVN.js.map +0 -1
- package/dist/chunk-HQESINXH.js.map +0 -1
- package/dist/chunk-TWPXES3S.js.map +0 -1
- package/dist/chunk-VAE6HBKR.js.map +0 -1
- /package/dist/{chunk-NJQHUUTN.js.map → chunk-3IACYIU2.js.map} +0 -0
- /package/dist/{chunk-7V4HJFHW.js.map → chunk-6ITD55QE.js.map} +0 -0
- /package/dist/{chunk-ZII6M3SN.js.map → chunk-6V3A7NQP.js.map} +0 -0
- /package/dist/{chunk-J5SQLKNP.js.map → chunk-CF3DXJWM.js.map} +0 -0
- /package/dist/{chunk-CK7AV2UJ.js.map → chunk-IXPDMYKH.js.map} +0 -0
- /package/dist/{chunk-BQFWCZFH.js.map → chunk-NZLW6EX7.js.map} +0 -0
- /package/dist/{chunk-HBSWJC3B.js.map → chunk-Q52IJELT.js.map} +0 -0
- /package/dist/{chunk-RSVRS5AK.js.map → chunk-TXIB3SKC.js.map} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
qtiTransformItem,
|
|
3
3
|
qtiTransformManifest,
|
|
4
4
|
qtiTransformTest
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HDEG6BAZ.js";
|
|
6
6
|
|
|
7
7
|
// ../qti-loader/dist/qti-loader.js
|
|
8
8
|
var getManifestInfo = async (manifestURL) => {
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
getManifestInfo,
|
|
29
29
|
getItemByUri
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-6ITD55QE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
qtiItemElements
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TXIB3SKC.js";
|
|
4
4
|
|
|
5
5
|
// ../qti-item/dist/register.js
|
|
6
6
|
for (const { tag, ctor } of qtiItemElements) {
|
|
@@ -8,4 +8,4 @@ for (const { tag, ctor } of qtiItemElements) {
|
|
|
8
8
|
customElements.define(tag, ctor);
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
11
|
+
//# sourceMappingURL=chunk-6V3A7NQP.js.map
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
} from "./chunk-4DB4SC5K.js";
|
|
4
4
|
import {
|
|
5
5
|
qtiTransformItem
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HDEG6BAZ.js";
|
|
7
7
|
import {
|
|
8
8
|
QtiFeedback,
|
|
9
9
|
QtiVariableDeclaration,
|
|
10
10
|
itemContext,
|
|
11
11
|
itemContextVariables
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EKXZI26R.js";
|
|
13
13
|
|
|
14
14
|
// ../qti-elements/dist/components/qti-assessment-item/qti-assessment-item.js
|
|
15
15
|
import { provide } from "@lit/context";
|
|
@@ -1068,60 +1068,59 @@ __decorate7([
|
|
|
1068
1068
|
import { css as css8, html as html11, LitElement as LitElement8 } from "lit";
|
|
1069
1069
|
|
|
1070
1070
|
// ../qti-elements/dist/internal/template-strings.js
|
|
1071
|
-
var matchCorrect = `<qti-response-
|
|
1072
|
-
<qti-response-
|
|
1073
|
-
<qti-
|
|
1074
|
-
<qti-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
<qti-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
<qti-
|
|
1083
|
-
<qti-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
<qti-set-outcome-value identifier="SCORE">
|
|
1118
|
-
<qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
|
|
1119
|
-
</qti-set-outcome-value>
|
|
1120
|
-
</qti-response-else>
|
|
1121
|
-
</qti-response-condition>
|
|
1122
|
-
</qti-response-processing>`;
|
|
1071
|
+
var matchCorrect = `<qti-response-condition>
|
|
1072
|
+
<qti-response-if>
|
|
1073
|
+
<qti-match>
|
|
1074
|
+
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
1075
|
+
<qti-correct identifier="RESPONSE"></qti-correct>
|
|
1076
|
+
</qti-match>
|
|
1077
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1078
|
+
<qti-base-value base-type="float">1</qti-base-value>
|
|
1079
|
+
</qti-set-outcome-value>
|
|
1080
|
+
</qti-response-if>
|
|
1081
|
+
<qti-response-else>
|
|
1082
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1083
|
+
<qti-base-value base-type="float">0</qti-base-value>
|
|
1084
|
+
</qti-set-outcome-value>
|
|
1085
|
+
</qti-response-else>
|
|
1086
|
+
</qti-response-condition>`;
|
|
1087
|
+
var mapResponse = `<qti-response-condition>
|
|
1088
|
+
<qti-response-if>
|
|
1089
|
+
<qti-is-null>
|
|
1090
|
+
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
1091
|
+
</qti-is-null>
|
|
1092
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1093
|
+
<qti-base-value base-type="float">0.0</qti-base-value>
|
|
1094
|
+
</qti-set-outcome-value>
|
|
1095
|
+
</qti-response-if>
|
|
1096
|
+
<qti-response-else>
|
|
1097
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1098
|
+
<qti-map-response identifier="RESPONSE"> </qti-map-response>
|
|
1099
|
+
</qti-set-outcome-value>
|
|
1100
|
+
</qti-response-else>
|
|
1101
|
+
</qti-response-condition>`;
|
|
1102
|
+
var mapResponsePoint = `<qti-response-condition>
|
|
1103
|
+
<qti-response-if>
|
|
1104
|
+
<qti-is-null>
|
|
1105
|
+
<qti-variable identifier="RESPONSE"></qti-variable>
|
|
1106
|
+
</qti-is-null>
|
|
1107
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1108
|
+
<qti-base-value base-type="float">0</qti-base-value>
|
|
1109
|
+
</qti-set-outcome-value>
|
|
1110
|
+
</qti-response-if>
|
|
1111
|
+
<qti-response-else>
|
|
1112
|
+
<qti-set-outcome-value identifier="SCORE">
|
|
1113
|
+
<qti-map-response-point identifier="RESPONSE"></qti-map-response-point>
|
|
1114
|
+
</qti-set-outcome-value>
|
|
1115
|
+
</qti-response-else>
|
|
1116
|
+
</qti-response-condition>`;
|
|
1123
1117
|
|
|
1124
1118
|
// ../qti-elements/dist/components/qti-response-processing/qti-response-processing.js
|
|
1119
|
+
var responseProcessingTemplates = {
|
|
1120
|
+
map_response: mapResponse,
|
|
1121
|
+
map_response_point: mapResponsePoint,
|
|
1122
|
+
match_correct: matchCorrect
|
|
1123
|
+
};
|
|
1125
1124
|
var QtiResponseProcessing = class extends LitElement8 {
|
|
1126
1125
|
static {
|
|
1127
1126
|
this.styles = [
|
|
@@ -1145,27 +1144,14 @@ var QtiResponseProcessing = class extends LitElement8 {
|
|
|
1145
1144
|
}
|
|
1146
1145
|
}
|
|
1147
1146
|
firstUpdated(_changedProperties) {
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
}
|
|
1157
|
-
case "map_response_point": {
|
|
1158
|
-
this.appendChild(this.#fragmentFromString(mapResponsePoint).firstElementChild.firstElementChild);
|
|
1159
|
-
break;
|
|
1160
|
-
}
|
|
1161
|
-
case "match_correct":
|
|
1162
|
-
this.appendChild(this.#fragmentFromString(matchCorrect).firstElementChild.firstElementChild);
|
|
1163
|
-
break;
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
#fragmentFromString(strHTML) {
|
|
1168
|
-
return document.createRange().createContextualFragment(strHTML);
|
|
1147
|
+
const template = this.getAttribute("template");
|
|
1148
|
+
if (!template)
|
|
1149
|
+
return;
|
|
1150
|
+
const templateName = template.split("/").pop().replace(".xml", "");
|
|
1151
|
+
const rules = responseProcessingTemplates[templateName];
|
|
1152
|
+
if (!rules)
|
|
1153
|
+
return;
|
|
1154
|
+
this.innerHTML = rules;
|
|
1169
1155
|
}
|
|
1170
1156
|
};
|
|
1171
1157
|
|
|
@@ -1555,4 +1541,4 @@ export {
|
|
|
1555
1541
|
QtiTemplateProcessing,
|
|
1556
1542
|
qtiContentElements
|
|
1557
1543
|
};
|
|
1558
|
-
//# sourceMappingURL=chunk-
|
|
1544
|
+
//# sourceMappingURL=chunk-6XJUP55A.js.map
|