@citolab/qti-components 10.0.0-next.30 → 10.0.0-next.31
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 +179 -179
- package/dist/base.d.ts +2 -2
- package/dist/{chunk-5KNTKBP6.js → chunk-3HG5GIKR.js} +2 -2
- package/dist/{chunk-2ZT47EUK.js → chunk-5LNSB6J6.js} +2 -2
- package/dist/{chunk-YRR6D6UP.js → chunk-R352K4KZ.js} +235 -5
- package/dist/chunk-R352K4KZ.js.map +1 -0
- package/dist/{computed.types.d-BPzPFX3Z.d.ts → computed.types.d-D06SAPP2.d.ts} +41 -1
- package/dist/corrections.d.ts +2 -2
- package/dist/corrections.js +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/{qti-test-state-ybQ6ausy.d.ts → qti-test-state-B7LgeKnN.d.ts} +1 -1
- package/dist/{qti-test.d-BbtCG7A-.d.ts → qti-test.d-DGXU-4tv.d.ts} +1 -1
- package/dist/test-plugin-api.d.ts +2 -2
- package/dist/test.d.ts +5 -5
- package/dist/test.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-YRR6D6UP.js.map +0 -1
- /package/dist/{chunk-5KNTKBP6.js.map → chunk-3HG5GIKR.js.map} +0 -0
- /package/dist/{chunk-2ZT47EUK.js.map → chunk-5LNSB6J6.js.map} +0 -0
|
@@ -23,6 +23,42 @@ type SessionControl = {
|
|
|
23
23
|
/** `validate-responses`; default false. Individual submission only. */
|
|
24
24
|
validateResponses: boolean;
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* The state of an item session in QTI's lifecycle (info model §2.2.1): `initial` before its first
|
|
28
|
+
* attempt, `interacting` while the candidate can change the responses, `modalFeedback` while reading
|
|
29
|
+
* modal feedback between attempts (not entered yet), `suspended` when left with attempts open,
|
|
30
|
+
* `closed` when over, `review` and `solution` when a closed item shows its responses or the correct
|
|
31
|
+
* ones. The same values as `ITEM_LIFECYCLE_STATES` in `@qti-components/delivery`.
|
|
32
|
+
*/
|
|
33
|
+
type ItemLifecycleState = 'initial' | 'interacting' | 'modalFeedback' | 'suspended' | 'closed' | 'review' | 'solution';
|
|
34
|
+
/**
|
|
35
|
+
* What an item session may do now, from its lifecycle state, its session control and its responses,
|
|
36
|
+
* following QTI 3 only (`qti-item-session-control`). The same answers as `itemRules` in
|
|
37
|
+
* `@qti-components/delivery`; read them instead of working a rule out from `numAttempts` or
|
|
38
|
+
* `sessionControl`.
|
|
39
|
+
*/
|
|
40
|
+
type ItemRules = {
|
|
41
|
+
/** Another attempt is allowed: `max-attempts` not reached (0 is unlimited), or an adaptive item not `completed`. */
|
|
42
|
+
readonly attemptsLeft: boolean;
|
|
43
|
+
/** No further attempt is allowed. */
|
|
44
|
+
readonly attemptsUsed: boolean;
|
|
45
|
+
/** The responses can change: the session is `interacting`. */
|
|
46
|
+
readonly interactive: boolean;
|
|
47
|
+
/** The session is over: `closed`, `review` or `solution`. */
|
|
48
|
+
readonly done: boolean;
|
|
49
|
+
/** The candidate may end the attempt now (`interacting`, individual submission, and `maySubmit`). */
|
|
50
|
+
readonly mayEndAttempt: boolean;
|
|
51
|
+
/** The responses may be submitted as they are: neither `allow-skipping="false"` nor `validate-responses` refuses them. */
|
|
52
|
+
readonly maySubmit: boolean;
|
|
53
|
+
/** Submitting no response is allowed. */
|
|
54
|
+
readonly maySkip: boolean;
|
|
55
|
+
/** Feedback may show: while attempts are left, after the last only with `show-feedback`. */
|
|
56
|
+
readonly mayShowFeedback: boolean;
|
|
57
|
+
/** The session may enter `review` now: `closed`, with `allow-review`. */
|
|
58
|
+
readonly mayBeginReview: boolean;
|
|
59
|
+
/** The session may enter `solution` now: `closed`, with `show-solution`. */
|
|
60
|
+
readonly mayBeginSolution: boolean;
|
|
61
|
+
};
|
|
26
62
|
type ComputedItem = ComputedItemContext & {
|
|
27
63
|
categories?: string[];
|
|
28
64
|
type?: 'info' | 'regular';
|
|
@@ -37,6 +73,10 @@ type ComputedItem = ComputedItemContext & {
|
|
|
37
73
|
done?: boolean;
|
|
38
74
|
/** Last *ended attempt* reached the optimal outcome (best achievable score / correct response). */
|
|
39
75
|
optimal?: boolean;
|
|
76
|
+
/** The item session's state in QTI's lifecycle; `test-navigation` always sets it. */
|
|
77
|
+
lifecycle?: ItemLifecycleState;
|
|
78
|
+
/** What the item session may do now (see `ItemRules`); `test-navigation` always sets it. */
|
|
79
|
+
rules?: ItemRules;
|
|
40
80
|
};
|
|
41
81
|
/**
|
|
42
82
|
* The test as plugins and hosts read it: its structure, the resolved rules, facts about each item and
|
|
@@ -88,4 +128,4 @@ type ComputedContext = {
|
|
|
88
128
|
itemElement?: (identifier: string) => HTMLElement | null;
|
|
89
129
|
};
|
|
90
130
|
|
|
91
|
-
export type { ComputedContext as C, SessionControl as S, ComputedItem as a };
|
|
131
|
+
export type { ComputedContext as C, ItemLifecycleState as I, SessionControl as S, ComputedItem as a, ItemRules as b };
|
package/dist/corrections.d.ts
CHANGED
|
@@ -7,8 +7,8 @@ import { QtiAssessmentItem } from './elements.js';
|
|
|
7
7
|
import { Q as QtiItem } from './qti-item.d-CxP6KtCH.js';
|
|
8
8
|
import './public-events.d-3dGip9pd.js';
|
|
9
9
|
import { V as View, C as ComputedItemContext } from './session.context.d-9gRdGK4T.js';
|
|
10
|
-
import { l as QtiTest, r as TestNavigation } from './qti-test.d-
|
|
11
|
-
import { a as ComputedItem, C as ComputedContext } from './computed.types.d-
|
|
10
|
+
import { l as QtiTest, r as TestNavigation } from './qti-test.d-DGXU-4tv.js';
|
|
11
|
+
import { a as ComputedItem, C as ComputedContext } from './computed.types.d-D06SAPP2.js';
|
|
12
12
|
import './config.context.d-Dm11aAuw.js';
|
|
13
13
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
14
14
|
import './variables.d-DWHlTszN.js';
|
package/dist/corrections.js
CHANGED
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
TestNavigationCorrection,
|
|
34
34
|
TestShowCorrectResponse,
|
|
35
35
|
correctionPart
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5LNSB6J6.js";
|
|
37
37
|
import {
|
|
38
38
|
qtiTestElements
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-R352K4KZ.js";
|
|
40
40
|
import "./chunk-7ISPUOJG.js";
|
|
41
41
|
import {
|
|
42
42
|
qtiContentElements
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { I as ITestNavigationMixin, a as ITestStateMixin, b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev, u as TestSubmit } from './qti-test.d-
|
|
1
|
+
export { I as ITestNavigationMixin, a as ITestStateMixin, b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev, u as TestSubmit } from './qti-test.d-DGXU-4tv.js';
|
|
2
2
|
export { IMyQtiTest, IQtiTest, ITestProcessingMixin, StoredSessionContext, StoredTestContext, StoredVariable, pluginElements, stateFromContexts } from './test.js';
|
|
3
|
-
export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, i as itemsInOrder, p as pluginState } from './qti-test-state-
|
|
3
|
+
export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, b as QtiTestState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, i as itemsInOrder, p as pluginState } from './qti-test-state-B7LgeKnN.js';
|
|
4
4
|
export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-CxP6KtCH.js';
|
|
5
5
|
export { ItemViewMixin } from './item.js';
|
|
6
6
|
export { F as FeedbackEventDetail, P as PUBLIC_ITEM_EVENTS, a as PublicEventDeclaration, b as PublicItemEventMap, c as PublicItemEventName, R as RubricPlacement, d as dispatchDeclared, e as dispatchPublic, l as listenDeclared, f as listenPublic } from './public-events.d-3dGip9pd.js';
|
|
@@ -12,7 +12,7 @@ export { qtiTransformManifest } from './transformers.js';
|
|
|
12
12
|
export { ManifestInfo, getItemByUri, getManifestInfo } from './loader.js';
|
|
13
13
|
export { CustomOperator, CustomOperatorValue, CustomStateSetShim, CustomStateSupport, IsNullOrUndefined, STATE_ALIASES, ScoringHelper, boxSizing, classifyCustomStateSupport, computedContext, computedItemContext, convertNumberToUniversalFormat, decimalSeparator, dropRegion, getCustomOperator, hasState, installCustomStateSetFallback, itemContext, registerCustomOperator, removeDoubleSlashes, setState, unregisterCustomOperator, validationMessage } from './base.js';
|
|
14
14
|
export { C as ComputedItemContext, I as INITIAL_SESSION_CONTEXT, S as SessionContext, V as View, s as sessionContext } from './session.context.d-9gRdGK4T.js';
|
|
15
|
-
export { C as ComputedContext, a as ComputedItem, S as SessionControl } from './computed.types.d-
|
|
15
|
+
export { C as ComputedContext, a as ComputedItem, I as ItemLifecycleState, b as ItemRules, S as SessionControl } from './computed.types.d-D06SAPP2.js';
|
|
16
16
|
export { C as ConfigContext, V as ValidationDisplayMode, c as configContext } from './config.context.d-Dm11aAuw.js';
|
|
17
17
|
export { C as ChoiceRole, I as Interaction, a as InteractionContext, R as RecordFieldValues, b as RecordValue, V as ValidityKind, c as ValidityTrigger, i as inferRecordFieldBaseType, d as interactionContext, e as isRecordValue, r as readRecordFieldValues } from './record.d-N1Bq7e1f.js';
|
|
18
18
|
export { I as ItemContext, i as itemContextVariables } from './item.types.d-Zc6ZQDhu.js';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-3HG5GIKR.js";
|
|
2
2
|
import {
|
|
3
3
|
pluginState
|
|
4
4
|
} from "./chunk-DJ7PB252.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
TestNavigationCorrection,
|
|
38
38
|
TestShowCorrectResponse,
|
|
39
39
|
correctionPart
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-5LNSB6J6.js";
|
|
41
41
|
import {
|
|
42
42
|
QTI_TEST_STATE_VERSION,
|
|
43
43
|
QtiAssessmentItemRef,
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
TestSubmit,
|
|
64
64
|
pluginElements,
|
|
65
65
|
stateFromContexts
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-R352K4KZ.js";
|
|
67
67
|
import {
|
|
68
68
|
itemsInOrder
|
|
69
69
|
} from "./chunk-7ISPUOJG.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
3
3
|
import { b as transformTestApi, t as transformItemApi } from './qti-transform-test.d-CtNaWJr8.js';
|
|
4
|
-
import { C as ComputedContext, a as ComputedItem } from './computed.types.d-
|
|
4
|
+
import { C as ComputedContext, a as ComputedItem } from './computed.types.d-D06SAPP2.js';
|
|
5
5
|
import './public-events.d-3dGip9pd.js';
|
|
6
6
|
import { QtiAssessmentItem, QtiModalFeedback } from './elements.js';
|
|
7
7
|
import { Q as QtiContext } from './qti.context.d-CejJMlfZ.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { V as View } from './session.context.d-9gRdGK4T.js';
|
|
2
2
|
import { a as PublicEventDeclaration } from './public-events.d-3dGip9pd.js';
|
|
3
3
|
import { Q as QtiTestState } from './qti-test-state.d-CjvdranT.js';
|
|
4
|
-
export { a as QtiTestPluginState, b as QtiTestState, i as itemsInOrder, p as pluginState } from './qti-test-state-
|
|
4
|
+
export { a as QtiTestPluginState, b as QtiTestState, i as itemsInOrder, p as pluginState } from './qti-test-state-B7LgeKnN.js';
|
|
5
5
|
import * as lit from 'lit';
|
|
6
6
|
import './variables.d-DWHlTszN.js';
|
|
7
|
-
import './computed.types.d-
|
|
7
|
+
import './computed.types.d-D06SAPP2.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* The public events of the test. The name tells you it is public: everything here starts with
|
package/dist/test.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { u as TestSubmit, v as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-
|
|
2
|
-
export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev } from './qti-test.d-
|
|
3
|
-
import { b as QtiTestState } from './qti-test-state-
|
|
4
|
-
export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, i as itemsInOrder, p as pluginState } from './qti-test-state-
|
|
1
|
+
import { u as TestSubmit, v as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-DGXU-4tv.js';
|
|
2
|
+
export { b as ItemRefTemplateModel, Q as QtiAssessmentItemRef, c as QtiAssessmentSection, d as QtiAssessmentTest, e as QtiBranchRule, f as QtiItemSessionControl, g as QtiNumberPresented, h as QtiNumberSelected, i as QtiOutcomeProcessing, j as QtiOutcomeProcessingProcessor, k as QtiPreCondition, l as QtiTest, m as QtiTestFeedback, n as QtiTestPart, o as QtiTestVariables, p as QtiTestVariablesExpression, T as TestContainer, q as TestEndAttempt, r as TestNavigation, s as TestNext, t as TestPrev } from './qti-test.d-DGXU-4tv.js';
|
|
3
|
+
import { b as QtiTestState } from './qti-test-state-B7LgeKnN.js';
|
|
4
|
+
export { Q as QTI_TEST_STATE_VERSION, a as QtiTestPluginState, c as QtiTestStateItem, d as QtiTestStateSession, e as QtiTestStateValue, i as itemsInOrder, p as pluginState } from './qti-test-state-B7LgeKnN.js';
|
|
5
5
|
import { LitElement } from 'lit';
|
|
6
6
|
import { b as OutcomeVariable, V as VariableDeclaration } from './variables.d-DWHlTszN.js';
|
|
7
7
|
import { S as SessionContext } from './session.context.d-9gRdGK4T.js';
|
|
@@ -9,7 +9,7 @@ import { C as ConfigContext } from './config.context.d-Dm11aAuw.js';
|
|
|
9
9
|
import { I as ItemContext } from './item.types.d-Zc6ZQDhu.js';
|
|
10
10
|
import { T as TestContext } from './qti-expression.d-iH3w6mqf.js';
|
|
11
11
|
import './qti-transform-test.d-CtNaWJr8.js';
|
|
12
|
-
import './computed.types.d-
|
|
12
|
+
import './computed.types.d-D06SAPP2.js';
|
|
13
13
|
import './public-events.d-3dGip9pd.js';
|
|
14
14
|
import './elements.js';
|
|
15
15
|
import './interaction.interface.d-CvjHM2bi.js';
|
package/dist/test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-3HG5GIKR.js";
|
|
2
2
|
import {
|
|
3
3
|
pluginState
|
|
4
4
|
} from "./chunk-DJ7PB252.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
TestSubmit,
|
|
28
28
|
pluginElements,
|
|
29
29
|
stateFromContexts
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-R352K4KZ.js";
|
|
31
31
|
import {
|
|
32
32
|
itemsInOrder
|
|
33
33
|
} from "./chunk-7ISPUOJG.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@citolab/qti-components",
|
|
3
3
|
"description": "QTI component utilities",
|
|
4
|
-
"version": "10.0.0-next.
|
|
4
|
+
"version": "10.0.0-next.31",
|
|
5
5
|
"author": "",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@heximal/templates": "^0.1.5",
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
"lit-html": "^3.3.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@qti-components/base": "^3.0.0-next.
|
|
13
|
+
"@qti-components/base": "^3.0.0-next.12",
|
|
14
14
|
"@qti-components/corrections": "^1.0.0-next.11",
|
|
15
|
-
"@qti-components/delivery": "^0.1.0-next.
|
|
15
|
+
"@qti-components/delivery": "^0.1.0-next.6",
|
|
16
16
|
"@qti-components/elements": "^2.0.0-next.7",
|
|
17
17
|
"@qti-components/interactions": "^1.10.5-next.8",
|
|
18
18
|
"@qti-components/item": "^1.5.1-next.7",
|
|
19
19
|
"@qti-components/loader": "^1.3.4-next.2",
|
|
20
20
|
"@qti-components/processing": "^1.6.1-next.5",
|
|
21
|
-
"@qti-components/test": "^2.0.0-next.
|
|
21
|
+
"@qti-components/test": "^2.0.0-next.25",
|
|
22
22
|
"@qti-components/theme": "^3.0.0-next.6",
|
|
23
23
|
"@qti-components/transformers": "^1.8.0-next.4"
|
|
24
24
|
},
|