@citolab/qti-components 9.2.0 → 9.4.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 +359 -229
- package/dist/base.d.ts +10 -10
- package/dist/base.js +1 -1
- package/dist/{chunk-G5RQ5GKG.js → chunk-3BAQWO5C.js} +2 -2
- package/dist/{chunk-ZG7FBQFP.js → chunk-ACRN7YJM.js} +2 -2
- package/dist/{chunk-JLZCZVRX.js → chunk-B5XHZI2P.js} +2 -2
- package/dist/{chunk-RAJQKCQ3.js → chunk-B74SYQB2.js} +2 -2
- package/dist/{chunk-YIYHCHHM.js → chunk-BMXG7D2N.js} +2 -2
- package/dist/{chunk-FG5JAWSN.js → chunk-C3JPUV36.js} +2 -2
- package/dist/{chunk-7PXUE2GR.js → chunk-GNTO3IFM.js} +976 -296
- package/dist/chunk-GNTO3IFM.js.map +1 -0
- package/dist/{chunk-ZOQVTG5L.js → chunk-JHPQJDAV.js} +2 -2
- package/dist/{chunk-GPGUXZ3X.js → chunk-LKHRHFXO.js} +6 -6
- package/dist/{chunk-JGPWBIVD.js → chunk-MSGYZE6L.js} +2 -2
- package/dist/{chunk-YVZWNLF4.js → chunk-R7MMMDP7.js} +139 -18
- package/dist/chunk-R7MMMDP7.js.map +1 -0
- package/dist/{chunk-REKCRWJV.js → chunk-XEWGFAS4.js} +166 -104
- package/dist/chunk-XEWGFAS4.js.map +1 -0
- package/dist/{computed.types.d-DB5gfOh9.d.ts → computed.types.d-gJrBeUMG.d.ts} +1 -1
- package/dist/corrections.d.ts +9 -9
- package/dist/corrections.js +7 -7
- package/dist/elements.d.ts +46 -6
- package/dist/elements.js +5 -3
- package/dist/index.d.ts +12 -12
- package/dist/index.js +18 -12
- package/dist/{interaction.d-DegNJ5ZA.d.ts → interaction.d-g6XG0T0Z.d.ts} +2 -2
- package/dist/interactions.d.ts +4 -4
- package/dist/interactions.js +3 -3
- package/dist/item.d.ts +4 -4
- package/dist/item.js +3 -3
- package/dist/{item.types.d-BDFrq19E.d.ts → item.types.d-B55QkJ92.d.ts} +10 -0
- package/dist/loader.d.ts +2 -2
- package/dist/processing.d.ts +3 -3
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +628 -268
- package/dist/{qti-condition-expression.d-DLboq8bR.d.ts → qti-condition-expression.d-L7yb3Rzy.d.ts} +1 -1
- package/dist/{qti-expression.d-BksT9iLB.d.ts → qti-expression.d-CuaLjZ6g.d.ts} +1 -1
- package/dist/{qti-feedback.d-D-w6-mJv.d.ts → qti-feedback.d-wMYNVkkj.d.ts} +2 -3
- package/dist/{qti-item.d-D_-9_0e6.d.ts → qti-item.d-DgC1AQbY.d.ts} +1 -1
- package/dist/{qti-test.d-BfAZE6UF.d.ts → qti-test.d-Cud5Gvy0.d.ts} +278 -38
- package/dist/{qti-text-entry-interaction.d-CATtcPyX.d.ts → qti-text-entry-interaction.d-DKvz9ncv.d.ts} +2 -2
- package/dist/{session.context.d-Cjs0BkJB.d.ts → session.context.d-D5080LVx.d.ts} +3 -1
- package/dist/test.d.ts +58 -11
- package/dist/test.js +8 -4
- package/package.json +4 -4
- package/dist/chunk-7PXUE2GR.js.map +0 -1
- package/dist/chunk-REKCRWJV.js.map +0 -1
- package/dist/chunk-YVZWNLF4.js.map +0 -1
- /package/dist/{chunk-G5RQ5GKG.js.map → chunk-3BAQWO5C.js.map} +0 -0
- /package/dist/{chunk-ZG7FBQFP.js.map → chunk-ACRN7YJM.js.map} +0 -0
- /package/dist/{chunk-JLZCZVRX.js.map → chunk-B5XHZI2P.js.map} +0 -0
- /package/dist/{chunk-RAJQKCQ3.js.map → chunk-B74SYQB2.js.map} +0 -0
- /package/dist/{chunk-YIYHCHHM.js.map → chunk-BMXG7D2N.js.map} +0 -0
- /package/dist/{chunk-FG5JAWSN.js.map → chunk-C3JPUV36.js.map} +0 -0
- /package/dist/{chunk-ZOQVTG5L.js.map → chunk-JHPQJDAV.js.map} +0 -0
- /package/dist/{chunk-GPGUXZ3X.js.map → chunk-LKHRHFXO.js.map} +0 -0
- /package/dist/{chunk-JGPWBIVD.js.map → chunk-MSGYZE6L.js.map} +0 -0
package/dist/test.d.ts
CHANGED
|
@@ -1,26 +1,27 @@
|
|
|
1
|
-
import { I as ITestNavigationMixin } from './qti-test.d-
|
|
2
|
-
export {
|
|
1
|
+
import { O as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-Cud5Gvy0.js';
|
|
2
|
+
export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiItemSessionControl, f as QtiNumberSelected, g as QtiOutcomeProcessing, h as QtiOutcomeProcessingProcessor, i as QtiTest, j as QtiTestFeedback, k as QtiTestPart, l as QtiTestVariables, m as QtiTestVariablesExpression, S as SpeechState, T as TestCheckItem, n as TestContainer, o as TestEndAttempt, p as TestItemLink, q as TestItemToSpeech, r as TestNavigation, s as TestNext, t as TestPagingButtonsStamp, u as TestPrev, v as TestPrintContext, w as TestPrintVariables, x as TestScoringButtons, y as TestScoringFeedback, z as TestSectionButtonsStamp, A as TestSectionLink, B as TestStamp, C as TestTtsNext, D as TestTtsPause, E as TestTtsPick, F as TestTtsPlay, G as TestTtsPrev, H as TestTtsResume, J as TestTtsStop, K as TestView, L as TestViewToggle, M as TtsContext, N as ttsContext } from './qti-test.d-Cud5Gvy0.js';
|
|
3
3
|
import { LitElement } from 'lit';
|
|
4
|
-
import {
|
|
5
|
-
import { S as SessionContext } from './session.context.d-
|
|
4
|
+
import { b as ItemContext, c as OutcomeVariable, V as VariableDeclaration } from './item.types.d-B55QkJ92.js';
|
|
5
|
+
import { S as SessionContext } from './session.context.d-D5080LVx.js';
|
|
6
6
|
import { C as ConfigContext } from './config.context.d-BvU9r-Mg.js';
|
|
7
|
-
import { T as TestContext } from './qti-expression.d-
|
|
7
|
+
import { T as TestContext } from './qti-expression.d-CuaLjZ6g.js';
|
|
8
8
|
import './qti-transform-test.d-BL7GGFJj.js';
|
|
9
|
+
import './computed.types.d-gJrBeUMG.js';
|
|
9
10
|
import './elements.js';
|
|
10
11
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
11
|
-
import './qti-feedback.d-
|
|
12
|
+
import './qti-feedback.d-wMYNVkkj.js';
|
|
12
13
|
import './qti-rule-base.d-Bdzg8eGH.js';
|
|
13
|
-
import '@heximal/templates';
|
|
14
|
-
import './computed.types.d-DB5gfOh9.js';
|
|
15
14
|
import './qti.context.d-CejJMlfZ.js';
|
|
15
|
+
import '@heximal/templates';
|
|
16
16
|
|
|
17
|
-
interface IQtiTest extends LitElement, ITestNavigationMixin, ITestProcessingMixin, IMyQtiTest {
|
|
17
|
+
interface IQtiTest extends LitElement, ITestNavigationMixin, ITestProcessingMixin, ITestStateMixin, IMyQtiTest {
|
|
18
18
|
}
|
|
19
19
|
interface IMyQtiTest {
|
|
20
20
|
testContext: Readonly<TestContext>;
|
|
21
21
|
sessionContext: Readonly<SessionContext>;
|
|
22
22
|
configContext: ConfigContext;
|
|
23
|
-
|
|
23
|
+
/** Sets values on one item, keyed by its `qti-assessment-item-ref` identifier. */
|
|
24
|
+
updateItemVariables(itemRefID: string, variables: readonly ItemVariableValue[], state?: ItemContext['state']): void;
|
|
24
25
|
}
|
|
25
26
|
interface ITestProcessingMixin {
|
|
26
27
|
updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
|
|
@@ -29,4 +30,50 @@ interface ITestProcessingMixin {
|
|
|
29
30
|
outcomeProcessing(): boolean;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Everything a host needs to persist to resume a candidate's test session, and nothing else.
|
|
35
|
+
*
|
|
36
|
+
* Read it from `qtiTest.state` or the `qti-state-changed` event, store it wherever you like —
|
|
37
|
+
* a database, `localStorage`, `sessionStorage` — and assign it back to `qtiTest.state` to resume.
|
|
38
|
+
*
|
|
39
|
+
* Deliberately not here:
|
|
40
|
+
* - declaration metadata (`baseType`, `cardinality`, `correctResponse`, `mapping`, …): it comes
|
|
41
|
+
* from the item XML on every load, and persisting the answer key with the candidate's data is
|
|
42
|
+
* both bloat and a leak;
|
|
43
|
+
* - `configContext` and `qtiContext`: inputs the host supplies on every load, not session state.
|
|
44
|
+
* The shuffle `seed` in particular must be passed in again, or the restored order changes;
|
|
45
|
+
* - `view`: a role the host decides, not something the candidate produced;
|
|
46
|
+
* - anything computed — scores per section, `done`, `active` — which is rederived from this.
|
|
47
|
+
*/
|
|
48
|
+
interface QtiTestState {
|
|
49
|
+
/** Bumped on any incompatible change to this shape. A state with another version is ignored. */
|
|
50
|
+
version: 1;
|
|
51
|
+
test: {
|
|
52
|
+
items: QtiTestStateItem[];
|
|
53
|
+
/** Test-level outcome values. Only outcomes the test declares are restored. */
|
|
54
|
+
outcomes: QtiTestStateValue[];
|
|
55
|
+
};
|
|
56
|
+
session: QtiTestStateSession;
|
|
57
|
+
}
|
|
58
|
+
interface QtiTestStateItem {
|
|
59
|
+
/** The `qti-assessment-item-ref` identifier. */
|
|
60
|
+
identifier: string;
|
|
61
|
+
variables: (QtiTestStateValue & {
|
|
62
|
+
type?: 'response' | 'outcome' | 'template' | 'context';
|
|
63
|
+
})[];
|
|
64
|
+
/** Opaque per-interaction state keyed by response identifier, e.g. a PCI's `getState()`. */
|
|
65
|
+
state?: Record<string, string | null>;
|
|
66
|
+
}
|
|
67
|
+
interface QtiTestStateValue {
|
|
68
|
+
identifier: string;
|
|
69
|
+
value: string | string[] | null;
|
|
70
|
+
}
|
|
71
|
+
/** Where the candidate is. */
|
|
72
|
+
interface QtiTestStateSession {
|
|
73
|
+
navPartId?: string | null;
|
|
74
|
+
navSectionId?: string | null;
|
|
75
|
+
navItemRefId?: string | null;
|
|
76
|
+
}
|
|
77
|
+
declare const QTI_TEST_STATE_VERSION = 1;
|
|
78
|
+
|
|
79
|
+
export { type IMyQtiTest, type IQtiTest, ITestNavigationMixin, type ITestProcessingMixin, ITestStateMixin, QTI_TEST_STATE_VERSION, type QtiTestState, type QtiTestStateItem, type QtiTestStateSession, type QtiTestStateValue };
|
package/dist/test.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-JHPQJDAV.js";
|
|
2
2
|
import {
|
|
3
|
+
QTI_TEST_STATE_VERSION,
|
|
3
4
|
QtiAssessmentItemRef,
|
|
4
5
|
QtiAssessmentSection,
|
|
5
6
|
QtiAssessmentTest,
|
|
@@ -30,6 +31,7 @@ import {
|
|
|
30
31
|
TestStamp,
|
|
31
32
|
TestTtsNext,
|
|
32
33
|
TestTtsPause,
|
|
34
|
+
TestTtsPick,
|
|
33
35
|
TestTtsPlay,
|
|
34
36
|
TestTtsPrev,
|
|
35
37
|
TestTtsResume,
|
|
@@ -37,13 +39,14 @@ import {
|
|
|
37
39
|
TestView,
|
|
38
40
|
TestViewToggle,
|
|
39
41
|
ttsContext
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
+
} from "./chunk-GNTO3IFM.js";
|
|
43
|
+
import "./chunk-XEWGFAS4.js";
|
|
42
44
|
import "./chunk-A32YH4H5.js";
|
|
43
45
|
import "./chunk-4DB4SC5K.js";
|
|
44
46
|
import "./chunk-TLAVOBEM.js";
|
|
45
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-R7MMMDP7.js";
|
|
46
48
|
export {
|
|
49
|
+
QTI_TEST_STATE_VERSION,
|
|
47
50
|
QtiAssessmentItemRef,
|
|
48
51
|
QtiAssessmentSection,
|
|
49
52
|
QtiAssessmentTest,
|
|
@@ -74,6 +77,7 @@ export {
|
|
|
74
77
|
TestStamp,
|
|
75
78
|
TestTtsNext,
|
|
76
79
|
TestTtsPause,
|
|
80
|
+
TestTtsPick,
|
|
77
81
|
TestTtsPlay,
|
|
78
82
|
TestTtsPrev,
|
|
79
83
|
TestTtsResume,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/qti-components",
|
|
3
3
|
"description": "QTI component utilities",
|
|
4
|
-
"version": "9.
|
|
4
|
+
"version": "9.4.0",
|
|
5
5
|
"author": "",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@heximal/templates": "^0.1.5",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"lit-html": "^3.3.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@qti-components/base": "^2.
|
|
13
|
+
"@qti-components/base": "^2.4.0",
|
|
14
14
|
"@qti-components/corrections": "^0.4.0",
|
|
15
|
-
"@qti-components/elements": "^1.
|
|
15
|
+
"@qti-components/elements": "^1.9.0",
|
|
16
16
|
"@qti-components/interactions": "^1.10.4",
|
|
17
17
|
"@qti-components/item": "^1.5.0",
|
|
18
18
|
"@qti-components/loader": "^1.3.3",
|
|
19
19
|
"@qti-components/processing": "^1.6.0",
|
|
20
|
-
"@qti-components/test": "^1.
|
|
20
|
+
"@qti-components/test": "^1.9.0",
|
|
21
21
|
"@qti-components/theme": "^2.2.1",
|
|
22
22
|
"@qti-components/transformers": "^1.7.3"
|
|
23
23
|
},
|