@citolab/qti-components 7.28.0 → 7.28.1
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 +188 -188
- package/custom-elements.json +91 -1
- package/dist/base.d.ts +2 -2
- package/dist/base.js +5 -1
- package/dist/chunk-3WBG257S.js +697 -0
- package/dist/chunk-3WBG257S.js.map +1 -0
- package/dist/{chunk-Z2SUBRH5.js → chunk-3XV26R5M.js} +6 -1
- package/dist/chunk-3XV26R5M.js.map +1 -0
- package/dist/{chunk-LQZCSHN5.js → chunk-AQ5RJFM6.js} +2 -2
- package/dist/{chunk-N7S3GNUP.js → chunk-FLJAKWXL.js} +2 -2
- package/dist/{chunk-PINGOK2F.js → chunk-HFCZFWSH.js} +27 -48
- package/dist/chunk-HFCZFWSH.js.map +1 -0
- package/dist/{chunk-FK2IVMS3.js → chunk-MPC7LIPC.js} +3 -3
- package/dist/{chunk-YLIYPNMK.js → chunk-REI3AMCZ.js} +2 -2
- package/dist/{chunk-U2FLSHK7.js → chunk-RLTYVS2I.js} +25 -5
- package/dist/chunk-RLTYVS2I.js.map +1 -0
- package/dist/{chunk-F6WP6WEF.js → chunk-SP6S2WMG.js} +2 -2
- package/dist/{chunk-OQ77SE2W.js → chunk-WDO2TRFM.js} +4 -4
- package/dist/elements.js +4 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -10
- package/dist/interactions.d.ts +1 -1
- package/dist/interactions.js +3 -3
- package/dist/item.d.ts +7 -0
- package/dist/item.js +4 -4
- package/dist/loader.js +2 -2
- package/dist/processing.d.ts +2 -2
- package/dist/processing.js +2 -2
- package/dist/qti-components-jsx.d.ts +178 -151
- package/dist/{qti-condition-expression-B1BYmCcq.d.ts → qti-condition-expression-Dam-RER6.d.ts} +1 -1
- package/dist/{qti-transform-test-DMx816H0.d.ts → qti-transform-test-DoZaWItm.d.ts} +11 -9
- package/dist/qti.context-CejJMlfZ.d.ts +50 -0
- package/dist/test.d.ts +5 -3
- package/dist/test.js +6 -6
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +1 -1
- package/package.json +6 -6
- package/dist/chunk-BPIDAS3T.js +0 -495
- package/dist/chunk-BPIDAS3T.js.map +0 -1
- package/dist/chunk-PINGOK2F.js.map +0 -1
- package/dist/chunk-U2FLSHK7.js.map +0 -1
- package/dist/chunk-Z2SUBRH5.js.map +0 -1
- package/dist/qti.context-B8PSyIWm.d.ts +0 -14
- /package/dist/{chunk-LQZCSHN5.js.map → chunk-AQ5RJFM6.js.map} +0 -0
- /package/dist/{chunk-N7S3GNUP.js.map → chunk-FLJAKWXL.js.map} +0 -0
- /package/dist/{chunk-FK2IVMS3.js.map → chunk-MPC7LIPC.js.map} +0 -0
- /package/dist/{chunk-YLIYPNMK.js.map → chunk-REI3AMCZ.js.map} +0 -0
- /package/dist/{chunk-F6WP6WEF.js.map → chunk-SP6S2WMG.js.map} +0 -0
- /package/dist/{chunk-OQ77SE2W.js.map → chunk-WDO2TRFM.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
e3 as e,
|
|
4
4
|
f,
|
|
5
5
|
n2 as n
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3XV26R5M.js";
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/node/directives/private-async-helpers.js
|
|
9
9
|
var s = class {
|
|
@@ -3670,4 +3670,4 @@ lit-html/node/directives/until.js:
|
|
|
3670
3670
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3671
3671
|
*)
|
|
3672
3672
|
*/
|
|
3673
|
-
//# sourceMappingURL=chunk-
|
|
3673
|
+
//# sourceMappingURL=chunk-AQ5RJFM6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
A
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3XV26R5M.js";
|
|
4
4
|
|
|
5
5
|
// ../../node_modules/.pnpm/lit-html@3.3.2/node_modules/lit-html/node/directives/if-defined.js
|
|
6
6
|
var o = (o2) => o2 ?? A;
|
|
@@ -17,4 +17,4 @@ lit-html/node/directives/if-defined.js:
|
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*)
|
|
19
19
|
*/
|
|
20
|
-
//# sourceMappingURL=chunk-
|
|
20
|
+
//# sourceMappingURL=chunk-FLJAKWXL.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
QtiModalFeedback
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WDO2TRFM.js";
|
|
4
4
|
import {
|
|
5
5
|
item_default,
|
|
6
6
|
m
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AQ5RJFM6.js";
|
|
8
8
|
import {
|
|
9
9
|
qtiTransformItem,
|
|
10
10
|
qtiTransformTest
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3WBG257S.js";
|
|
12
12
|
import {
|
|
13
13
|
A,
|
|
14
14
|
INITIAL_SESSION_CONTEXT,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
t,
|
|
28
28
|
testContext,
|
|
29
29
|
watch
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3XV26R5M.js";
|
|
31
31
|
import {
|
|
32
32
|
__decorateClass,
|
|
33
33
|
__privateAdd,
|
|
@@ -42,7 +42,6 @@ var TestNavigationMixin = (superClass) => {
|
|
|
42
42
|
constructor(...args) {
|
|
43
43
|
super(...args);
|
|
44
44
|
this.navigate = null;
|
|
45
|
-
this.cacheTransform = false;
|
|
46
45
|
this.requestTimeout = 3e4;
|
|
47
46
|
this.postLoadTransformCallback = null;
|
|
48
47
|
this.postLoadTestTransformCallback = null;
|
|
@@ -365,7 +364,8 @@ var TestNavigationMixin = (superClass) => {
|
|
|
365
364
|
}
|
|
366
365
|
async _loadSingleItem(itemRef, navigationId, controller) {
|
|
367
366
|
try {
|
|
368
|
-
|
|
367
|
+
const seed = this.querySelector("test-navigation")?.qtiContext?.QTI_CONTEXT?.seed;
|
|
368
|
+
let transformer = (await qtiTransformItem().load(itemRef.href, controller.signal)).shuffleInteractions(seed);
|
|
369
369
|
if (this.postLoadTransformCallback) {
|
|
370
370
|
transformer = await this.postLoadTransformCallback(transformer, itemRef);
|
|
371
371
|
}
|
|
@@ -486,9 +486,6 @@ var TestNavigationMixin = (superClass) => {
|
|
|
486
486
|
__decorateClass([
|
|
487
487
|
n({ type: String })
|
|
488
488
|
], TestNavigationClass.prototype, "navigate", 2);
|
|
489
|
-
__decorateClass([
|
|
490
|
-
n({ type: Boolean, attribute: "cache-transform" })
|
|
491
|
-
], TestNavigationClass.prototype, "cacheTransform", 2);
|
|
492
489
|
__decorateClass([
|
|
493
490
|
n({ type: Number })
|
|
494
491
|
], TestNavigationClass.prototype, "requestTimeout", 2);
|
|
@@ -741,8 +738,10 @@ var TestProcessingMixin = (superClass) => {
|
|
|
741
738
|
|
|
742
739
|
// ../qti-test/src/components/qti-test/qti-test.ts
|
|
743
740
|
var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixin(TestBaseMixin(i2)))) {
|
|
744
|
-
|
|
745
|
-
|
|
741
|
+
constructor() {
|
|
742
|
+
super(...arguments);
|
|
743
|
+
this.configContext = {};
|
|
744
|
+
}
|
|
746
745
|
/**
|
|
747
746
|
* Renders the component's template.
|
|
748
747
|
* Provides a default `<slot>` for content projection.
|
|
@@ -756,6 +755,10 @@ var QtiTest = class extends TestNavigationMixin(TestViewMixin(TestProcessingMixi
|
|
|
756
755
|
return T`<slot></slot>`;
|
|
757
756
|
}
|
|
758
757
|
};
|
|
758
|
+
__decorateClass([
|
|
759
|
+
r(),
|
|
760
|
+
e({ context: configContext })
|
|
761
|
+
], QtiTest.prototype, "configContext", 2);
|
|
759
762
|
QtiTest = __decorateClass([
|
|
760
763
|
t("qti-test")
|
|
761
764
|
], QtiTest);
|
|
@@ -1005,25 +1008,6 @@ var TestNavigation = class extends i2 {
|
|
|
1005
1008
|
};
|
|
1006
1009
|
this.configContext = {};
|
|
1007
1010
|
this.autoScoreItems = false;
|
|
1008
|
-
// @state()
|
|
1009
|
-
// private stampContext: {
|
|
1010
|
-
// view?: View;
|
|
1011
|
-
// test?: unknown;
|
|
1012
|
-
// activeTestpart?: unknown;
|
|
1013
|
-
// activeSection?: unknown;
|
|
1014
|
-
// activeItem?: unknown;
|
|
1015
|
-
// } = {
|
|
1016
|
-
// view: 'candidate',
|
|
1017
|
-
// activeItem: {},
|
|
1018
|
-
// activeSection: {
|
|
1019
|
-
// items: []
|
|
1020
|
-
// },
|
|
1021
|
-
// activeTestpart: {
|
|
1022
|
-
// items: []
|
|
1023
|
-
// },
|
|
1024
|
-
// test: {}
|
|
1025
|
-
// };
|
|
1026
|
-
// @property({ type: Boolean, reflect: true }) public debug = false;
|
|
1027
1011
|
__privateAdd(this, _testElement);
|
|
1028
1012
|
this.addEventListener("qti-assessment-test-connected", __privateMethod(this, _TestNavigation_instances, handleTestConnected_fn).bind(this));
|
|
1029
1013
|
this.addEventListener("qti-assessment-item-connected", __privateMethod(this, _TestNavigation_instances, handleItemConnected_fn).bind(this));
|
|
@@ -1077,10 +1061,10 @@ var TestNavigation = class extends i2 {
|
|
|
1077
1061
|
score,
|
|
1078
1062
|
response,
|
|
1079
1063
|
index,
|
|
1080
|
-
// type,
|
|
1081
1064
|
active,
|
|
1082
|
-
// correct,
|
|
1083
1065
|
maxScore
|
|
1066
|
+
// type,
|
|
1067
|
+
// correct,
|
|
1084
1068
|
// incorrect,
|
|
1085
1069
|
// completed
|
|
1086
1070
|
};
|
|
@@ -1114,19 +1098,6 @@ handleTestEndAttempt_fn = function(_event) {
|
|
|
1114
1098
|
const reportValidityAfterScoring = this.configContext?.reportValidityAfterScoring === true ? true : false;
|
|
1115
1099
|
qtiAssessmentItemEl.processResponse(true, reportValidityAfterScoring);
|
|
1116
1100
|
};
|
|
1117
|
-
// protected createRenderRoot(): HTMLElement | DocumentFragment {
|
|
1118
|
-
// return this;
|
|
1119
|
-
// }
|
|
1120
|
-
// myTemplate: TemplateFunction;
|
|
1121
|
-
// connectedCallback(): void {
|
|
1122
|
-
// super.connectedCallback();
|
|
1123
|
-
// const templateElement = this.querySelector<HTMLTemplateElement>('template');
|
|
1124
|
-
// if (!templateElement) {
|
|
1125
|
-
// this.myTemplate = null;
|
|
1126
|
-
// return;
|
|
1127
|
-
// }
|
|
1128
|
-
// this.myTemplate = prepareTemplate(templateElement);
|
|
1129
|
-
// }
|
|
1130
1101
|
/**
|
|
1131
1102
|
* Handles the 'test-show-correct-response' event.
|
|
1132
1103
|
* @private
|
|
@@ -1334,7 +1305,7 @@ __decorateClass([
|
|
|
1334
1305
|
], TestNavigation.prototype, "qtiContext", 2);
|
|
1335
1306
|
__decorateClass([
|
|
1336
1307
|
r(),
|
|
1337
|
-
|
|
1308
|
+
c({ context: configContext, subscribe: true })
|
|
1338
1309
|
], TestNavigation.prototype, "configContext", 2);
|
|
1339
1310
|
__decorateClass([
|
|
1340
1311
|
r(),
|
|
@@ -3094,13 +3065,17 @@ var TestContainer = class extends i2 {
|
|
|
3094
3065
|
this.testURL = null;
|
|
3095
3066
|
this.testDoc = null;
|
|
3096
3067
|
this.testXML = null;
|
|
3068
|
+
this.qtiContext = {
|
|
3069
|
+
QTI_CONTEXT: { testIdentifier: "", candidateIdentifier: "", environmentIdentifier: "default" }
|
|
3070
|
+
};
|
|
3097
3071
|
/** Template content if provided */
|
|
3098
3072
|
__privateAdd(this, _templateContent, null);
|
|
3099
3073
|
}
|
|
3100
3074
|
async handleTestURLChange() {
|
|
3101
3075
|
if (!this.testURL) return;
|
|
3102
3076
|
try {
|
|
3103
|
-
|
|
3077
|
+
const explicitSeed = this.qtiContext?.QTI_CONTEXT?.seed;
|
|
3078
|
+
let api = (await qtiTransformTest().load(this.testURL)).shuffleOrdering(explicitSeed);
|
|
3104
3079
|
const qtiTest = this.closest("qti-test");
|
|
3105
3080
|
if (qtiTest?.postLoadTestTransformCallback) {
|
|
3106
3081
|
const tempDoc = api.htmlDoc();
|
|
@@ -3161,6 +3136,10 @@ __decorateClass([
|
|
|
3161
3136
|
__decorateClass([
|
|
3162
3137
|
r()
|
|
3163
3138
|
], TestContainer.prototype, "testXML", 2);
|
|
3139
|
+
__decorateClass([
|
|
3140
|
+
r(),
|
|
3141
|
+
c({ context: qtiContext, subscribe: true })
|
|
3142
|
+
], TestContainer.prototype, "qtiContext", 2);
|
|
3164
3143
|
__decorateClass([
|
|
3165
3144
|
watch("testURL", { waitUntilFirstUpdate: true })
|
|
3166
3145
|
], TestContainer.prototype, "handleTestURLChange", 1);
|
|
@@ -3657,4 +3636,4 @@ lit-html/node/private-ssr-support.js:
|
|
|
3657
3636
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3658
3637
|
*)
|
|
3659
3638
|
*/
|
|
3660
|
-
//# sourceMappingURL=chunk-
|
|
3639
|
+
//# sourceMappingURL=chunk-HFCZFWSH.js.map
|