@citolab/qti-components 10.0.0-next.23 → 10.0.0-next.24
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 +15 -15
- package/dist/{chunk-IJKHXJSM.js → chunk-2NHZOI3W.js} +14 -3
- package/dist/chunk-2NHZOI3W.js.map +1 -0
- package/dist/{chunk-ULJ22VKL.js → chunk-DU6RX3TX.js} +2 -2
- package/dist/{chunk-DJQE4M7B.js → chunk-FP3KXADH.js} +2 -2
- package/dist/{chunk-J6VX4N7M.js → chunk-HUM7ST4L.js} +3 -1
- package/dist/chunk-HUM7ST4L.js.map +1 -0
- package/dist/corrections.d.ts +1 -1
- package/dist/corrections.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/qti-components-jsx.d.ts +12 -0
- package/dist/{qti-test.d-CN2JZwAz.d.ts → qti-test.d-DADK63uc.d.ts} +6 -0
- package/dist/test-plugin-api.d.ts +14 -5
- package/dist/test-plugin-api.js +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/test.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-IJKHXJSM.js.map +0 -1
- package/dist/chunk-J6VX4N7M.js.map +0 -1
- /package/dist/{chunk-ULJ22VKL.js.map → chunk-DU6RX3TX.js.map} +0 -0
- /package/dist/{chunk-DJQE4M7B.js.map → chunk-FP3KXADH.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
control,
|
|
5
5
|
dispatchPublic,
|
|
6
6
|
listenPublic as listenPublic2
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HUM7ST4L.js";
|
|
8
8
|
import {
|
|
9
9
|
QtiModalFeedback
|
|
10
10
|
} from "./chunk-H6DO5UHC.js";
|
|
@@ -2830,6 +2830,8 @@ var TestStateMixin = (superClass) => {
|
|
|
2830
2830
|
class TestStateClass extends superClass {
|
|
2831
2831
|
/** A state assigned before the test connected, applied when it does. */
|
|
2832
2832
|
#pending = null;
|
|
2833
|
+
/** A refused state assigned before the test connected, reported when it does. */
|
|
2834
|
+
#refused = null;
|
|
2833
2835
|
/**
|
|
2834
2836
|
* False while a test document is loading. Loading resets both contexts and rebuilds them, so
|
|
2835
2837
|
* the intermediate states are empty — emitting one would invite a host to save it over the
|
|
@@ -2850,6 +2852,10 @@ var TestStateMixin = (superClass) => {
|
|
|
2850
2852
|
this.#pending = null;
|
|
2851
2853
|
}
|
|
2852
2854
|
this.#ready = true;
|
|
2855
|
+
if (this.#refused) {
|
|
2856
|
+
dispatchPublic(this, "qc-test-state-refused", this.#refused);
|
|
2857
|
+
this.#refused = null;
|
|
2858
|
+
}
|
|
2853
2859
|
});
|
|
2854
2860
|
}
|
|
2855
2861
|
/** One plugin's entry, as JSON: the test stores it without reading it. `null` removes it. */
|
|
@@ -2873,7 +2879,12 @@ var TestStateMixin = (superClass) => {
|
|
|
2873
2879
|
}
|
|
2874
2880
|
set state(value) {
|
|
2875
2881
|
if (!isQtiTestState(value)) {
|
|
2876
|
-
|
|
2882
|
+
const message = `Ignoring a state that is not a version ${QTI_TEST_STATE_VERSION} QtiTestState.`;
|
|
2883
|
+
console.warn(`[qti-test] ${message}`);
|
|
2884
|
+
if (this.#ready)
|
|
2885
|
+
dispatchPublic(this, "qc-test-state-refused", { message, state: value });
|
|
2886
|
+
else
|
|
2887
|
+
this.#refused = { message, state: value };
|
|
2877
2888
|
return;
|
|
2878
2889
|
}
|
|
2879
2890
|
if (!this.#ready) {
|
|
@@ -4077,4 +4088,4 @@ export {
|
|
|
4077
4088
|
* Portions Copyright (c) 2013, the Dart project authors.
|
|
4078
4089
|
*)
|
|
4079
4090
|
*/
|
|
4080
|
-
//# sourceMappingURL=chunk-
|
|
4091
|
+
//# sourceMappingURL=chunk-2NHZOI3W.js.map
|