@citolab/qti-components 10.0.0-next.14 → 10.0.0-next.16
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 +1643 -2742
- package/dist/base.d.ts +32 -8
- package/dist/base.js +7 -1
- package/dist/{chunk-HGKLF7SP.js → chunk-4DC5Z2LQ.js} +2 -2
- package/dist/{chunk-MP2SUN7J.js → chunk-7MYZHZWV.js} +981 -383
- package/dist/chunk-7MYZHZWV.js.map +1 -0
- package/dist/{chunk-LFVPS7KB.js → chunk-DAOLVUTR.js} +2 -2
- package/dist/{chunk-CCI3QMQA.js → chunk-H3Z3TMFB.js} +55 -60
- package/dist/chunk-H3Z3TMFB.js.map +1 -0
- package/dist/{chunk-LEF7AAYZ.js → chunk-J3F3JSCW.js} +2 -2
- package/dist/{chunk-NYNL5HSR.js → chunk-L3LBSAGZ.js} +2 -2
- package/dist/{chunk-BZPMN57E.js → chunk-L7J2ZOJL.js} +2 -2
- package/dist/{chunk-TLAVOBEM.js → chunk-LORYM4U2.js} +120 -1
- package/dist/chunk-LORYM4U2.js.map +1 -0
- package/dist/{chunk-6XRNX574.js → chunk-LQ65RILE.js} +141 -106
- package/dist/chunk-LQ65RILE.js.map +1 -0
- package/dist/{chunk-C7SYDLMG.js → chunk-M4TZIB3W.js} +61 -27
- package/dist/chunk-M4TZIB3W.js.map +1 -0
- package/dist/{chunk-S5GLISQA.js → chunk-NWSDBYK7.js} +2 -2
- package/dist/{chunk-O2ENNGKV.js → chunk-NZ7ZC4SP.js} +126 -7
- package/dist/chunk-NZ7ZC4SP.js.map +1 -0
- package/dist/{chunk-SWNFCQ4G.js → chunk-OG5HIRHE.js} +4 -4
- package/dist/{chunk-TU34FFWF.js → chunk-UDJ7MHLF.js} +4 -4
- package/dist/chunk-UDJ7MHLF.js.map +1 -0
- package/dist/chunk-WWY2H2YO.js +7 -0
- package/dist/chunk-WWY2H2YO.js.map +1 -0
- package/dist/{computed.types.d-IXACuBr7.d.ts → computed.types.d-n3K2VvB0.d.ts} +2 -2
- package/dist/{config.context.d-BniMHSBB.d.ts → config.context.d-CCqlJXpE.d.ts} +2 -1
- package/dist/corrections.d.ts +119 -15
- package/dist/corrections.js +9 -9
- package/dist/elements.d.ts +67 -16
- package/dist/elements.js +4 -4
- package/dist/index.d.ts +11 -11
- package/dist/index.js +21 -15
- package/dist/interactions.d.ts +83 -17
- package/dist/interactions.js +3 -3
- package/dist/item.css +1133 -2370
- package/dist/item.d.ts +4 -4
- package/dist/item.js +5 -5
- package/dist/loader.d.ts +1 -1
- package/dist/loader.js +2 -2
- package/dist/processing.js +3 -3
- package/dist/qti-components-jsx.d.ts +1239 -214
- package/dist/{qti-feedback.d-DbzPSJuK.d.ts → qti-feedback.d-1JL_qHjc.d.ts} +7 -0
- package/dist/{qti-item.d-BqWYBdV2.d.ts → qti-item.d-DDMDjWIk.d.ts} +2 -2
- package/dist/{qti-test.d-C0I1BIdH.d.ts → qti-test.d-CDdyCp6e.d.ts} +21 -18
- package/dist/{qti-text-entry-interaction.d-V4sWE9TO.d.ts → qti-text-entry-interaction.d-BTAKmr4b.d.ts} +160 -50
- package/dist/{qti-transform-test.d-BL7GGFJj.d.ts → qti-transform-test.d-Bb9vnLzP.d.ts} +1 -0
- package/dist/{record.d-C6m0Y4xr.d.ts → record.d-Bojj6_LW.d.ts} +34 -3
- package/dist/{session.context.d-DW09Lrie.d.ts → session.context.d-BNxGeyh9.d.ts} +1 -1
- package/dist/test.d.ts +9 -9
- package/dist/test.js +6 -6
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +1 -1
- package/package.json +11 -11
- package/dist/chunk-6XRNX574.js.map +0 -1
- package/dist/chunk-C7SYDLMG.js.map +0 -1
- package/dist/chunk-CCI3QMQA.js.map +0 -1
- package/dist/chunk-MP2SUN7J.js.map +0 -1
- package/dist/chunk-O2ENNGKV.js.map +0 -1
- package/dist/chunk-Q4MJCEDE.js +0 -7
- package/dist/chunk-Q4MJCEDE.js.map +0 -1
- package/dist/chunk-TLAVOBEM.js.map +0 -1
- package/dist/chunk-TU34FFWF.js.map +0 -1
- /package/dist/{chunk-HGKLF7SP.js.map → chunk-4DC5Z2LQ.js.map} +0 -0
- /package/dist/{chunk-LFVPS7KB.js.map → chunk-DAOLVUTR.js.map} +0 -0
- /package/dist/{chunk-LEF7AAYZ.js.map → chunk-J3F3JSCW.js.map} +0 -0
- /package/dist/{chunk-NYNL5HSR.js.map → chunk-L3LBSAGZ.js.map} +0 -0
- /package/dist/{chunk-BZPMN57E.js.map → chunk-L7J2ZOJL.js.map} +0 -0
- /package/dist/{chunk-S5GLISQA.js.map → chunk-NWSDBYK7.js.map} +0 -0
- /package/dist/{chunk-SWNFCQ4G.js.map → chunk-OG5HIRHE.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
-
import { C as ConfigContext, V as ValidationDisplayMode } from './config.context.d-
|
|
2
|
+
import { C as ConfigContext, V as ValidationDisplayMode } from './config.context.d-CCqlJXpE.js';
|
|
3
3
|
import { V as ValidatableInteraction } from './interaction.interface.d-CvjHM2bi.js';
|
|
4
4
|
import { g as ResponseVariable, B as BaseType } from './item.types.d-DuVR0ZVK.js';
|
|
5
5
|
|
|
@@ -40,6 +40,10 @@ declare const interactionContext: {
|
|
|
40
40
|
__context__: Readonly<InteractionContext>;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
+
/** Why an interaction is invalid: too few (`min`), too many (`max`), or something else (`other`). */
|
|
44
|
+
type ValidityKind = 'min' | 'max' | 'other';
|
|
45
|
+
/** What asked for the report: the candidate changing the response, or a submit (end attempt, form). */
|
|
46
|
+
type ValidityTrigger = 'change' | 'submit';
|
|
43
47
|
/**
|
|
44
48
|
* Shared QTI interaction base. Formative correction behavior is supplied by the
|
|
45
49
|
* `@qti-components/corrections` package.
|
|
@@ -89,7 +93,27 @@ declare abstract class Interaction extends LitElement implements ValidatableInte
|
|
|
89
93
|
set value(val: string | null);
|
|
90
94
|
abstract get response(): string | string[] | null;
|
|
91
95
|
abstract set response(val: string | string[] | null);
|
|
92
|
-
|
|
96
|
+
/** Why the interaction is invalid right now; `undefined` while it is valid. */
|
|
97
|
+
protected _validityKind?: ValidityKind;
|
|
98
|
+
/** Set once a submit has reported; from then on every change reports in full. */
|
|
99
|
+
protected _validityReported: boolean;
|
|
100
|
+
/** True while this element asks its own internals to report, so its `invalid` is not a submit. */
|
|
101
|
+
protected _reportingNatively: boolean;
|
|
102
|
+
/** Forget that a submit has reported: a reset or a new attempt waits for a submit again. */
|
|
103
|
+
protected resetValidityReport(): void;
|
|
104
|
+
/**
|
|
105
|
+
* Show the validity state, in the configured mode.
|
|
106
|
+
*
|
|
107
|
+
* When it shows depends on what asked: a `change` (the candidate picked or dropped something)
|
|
108
|
+
* reports what they just did wrong, too many, at once; too few is not an error until they say they
|
|
109
|
+
* are done, so a `submit` (the item's end attempt, a form's submit) is what first shows it. After
|
|
110
|
+
* that first submit, changes report in full, so the message clears the moment the minimum is met
|
|
111
|
+
* and comes back if it is lost again. The validity itself is always set: a form with a
|
|
112
|
+
* below-minimum interaction cannot submit either way.
|
|
113
|
+
*/
|
|
114
|
+
reportValidity(options?: {
|
|
115
|
+
trigger?: ValidityTrigger;
|
|
116
|
+
}): boolean;
|
|
93
117
|
protected get validationDisplayMode(): ValidationDisplayMode;
|
|
94
118
|
protected resolveAllowReorder(options?: {
|
|
95
119
|
defaultWhenUnset?: boolean;
|
|
@@ -99,6 +123,7 @@ declare abstract class Interaction extends LitElement implements ValidatableInte
|
|
|
99
123
|
}): boolean;
|
|
100
124
|
protected setInteractionValidity(isValid: boolean, validityMessage?: string, anchor?: HTMLElement | null, options?: {
|
|
101
125
|
suppressInline?: boolean;
|
|
126
|
+
kind?: ValidityKind;
|
|
102
127
|
}): void;
|
|
103
128
|
protected updateInlineValidationMessage(): void;
|
|
104
129
|
protected clearInlineValidationMessage(): void;
|
|
@@ -107,6 +132,12 @@ declare abstract class Interaction extends LitElement implements ValidatableInte
|
|
|
107
132
|
formResetCallback(): void;
|
|
108
133
|
connectedCallback(): void;
|
|
109
134
|
saveResponse(value: string | string[], state?: string | null): void;
|
|
135
|
+
/**
|
|
136
|
+
* `disabled` and `readonly` are states as well as attributes (qti-theme CONTRACT.md §3): a theme
|
|
137
|
+
* reads `:state(disabled)` on the host the way it reads it on a choice. The attribute stays
|
|
138
|
+
* reflected, so `[disabled]` keeps matching.
|
|
139
|
+
*/
|
|
140
|
+
protected update(changed: PropertyValues): void;
|
|
110
141
|
constructor();
|
|
111
142
|
/**
|
|
112
143
|
* Optional lifecycle bridge for interaction subclasses that do not need changed-property data.
|
|
@@ -155,4 +186,4 @@ declare const readRecordFieldValues: (valueElements: Iterable<Element>) => Recor
|
|
|
155
186
|
*/
|
|
156
187
|
declare const inferRecordFieldBaseType: (value: unknown) => BaseType;
|
|
157
188
|
|
|
158
|
-
export { type ChoiceRole as C, Interaction as I, type RecordFieldValues as R, type InteractionContext as a, type RecordValue as b,
|
|
189
|
+
export { type ChoiceRole as C, Interaction as I, type RecordFieldValues as R, type ValidityKind as V, type InteractionContext as a, type RecordValue as b, type ValidityTrigger as c, interactionContext as d, isRecordValue as e, inferRecordFieldBaseType as i, readRecordFieldValues as r };
|
|
@@ -29,7 +29,7 @@ interface SessionContext {
|
|
|
29
29
|
/**
|
|
30
30
|
* What test plugins keep, by plugin name: JSON the test stores and restores without reading it.
|
|
31
31
|
* Part of the persisted state (`QtiTestState.session.plugins`); written through the
|
|
32
|
-
* `
|
|
32
|
+
* `qc-test-update-plugin-state` request.
|
|
33
33
|
*/
|
|
34
34
|
plugins?: Readonly<Record<string, unknown>>;
|
|
35
35
|
}
|
package/dist/test.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { u as TestItemToSpeech, G as TestTtsNext, H as TestTtsPause, J as TestTtsPick, K as TestTtsPlay, L as TestTtsPrev, M as TestTtsResume, N as TestTtsStop, q as TestCheckItem, T as TestBookmark, y as TestPrintContext, A as TestPrintVariables, z as TestPrintState, B as TestScoringButtons, C as TestScoringFeedback, E as TestStamp, F as TestSubmit, O as TestView, P as TestViewToggle, S as QtiTestPluginState$1, U 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, r as TestContainer, s as TestEndAttempt, t as TestItemLink, v as TestNavigation, w as TestNext, x as TestPrev, D as TestSectionLink, R as bookmarkedItems } from './qti-test.d-
|
|
3
|
-
import { C as ComputedContext } from './computed.types.d-
|
|
1
|
+
import { u as TestItemToSpeech, G as TestTtsNext, H as TestTtsPause, J as TestTtsPick, K as TestTtsPlay, L as TestTtsPrev, M as TestTtsResume, N as TestTtsStop, q as TestCheckItem, T as TestBookmark, y as TestPrintContext, A as TestPrintVariables, z as TestPrintState, B as TestScoringButtons, C as TestScoringFeedback, E as TestStamp, F as TestSubmit, O as TestView, P as TestViewToggle, S as QtiTestPluginState$1, U as ItemVariableValue, I as ITestNavigationMixin, a as ITestStateMixin } from './qti-test.d-CDdyCp6e.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, r as TestContainer, s as TestEndAttempt, t as TestItemLink, v as TestNavigation, w as TestNext, x as TestPrev, D as TestSectionLink, R as bookmarkedItems } from './qti-test.d-CDdyCp6e.js';
|
|
3
|
+
import { C as ComputedContext } from './computed.types.d-n3K2VvB0.js';
|
|
4
4
|
import { LitElement } from 'lit';
|
|
5
5
|
import { b as ItemContext, c as OutcomeVariable, V as VariableDeclaration } from './item.types.d-DuVR0ZVK.js';
|
|
6
|
-
import { S as SessionContext } from './session.context.d-
|
|
7
|
-
import { C as ConfigContext } from './config.context.d-
|
|
6
|
+
import { S as SessionContext } from './session.context.d-BNxGeyh9.js';
|
|
7
|
+
import { C as ConfigContext } from './config.context.d-CCqlJXpE.js';
|
|
8
8
|
import { T as TestContext } from './qti-expression.d-B-Cfbqlb.js';
|
|
9
|
-
import './qti-transform-test.d-
|
|
9
|
+
import './qti-transform-test.d-Bb9vnLzP.js';
|
|
10
10
|
import './elements.js';
|
|
11
11
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
12
|
-
import './qti-feedback.d-
|
|
12
|
+
import './qti-feedback.d-1JL_qHjc.js';
|
|
13
13
|
import './qti-rule-base.d-CeKP0Ooi.js';
|
|
14
14
|
import './qti.context.d-CejJMlfZ.js';
|
|
15
15
|
import '@heximal/templates';
|
|
@@ -110,7 +110,7 @@ declare const pluginElements: readonly [{
|
|
|
110
110
|
/**
|
|
111
111
|
* A plugin's entry in the state, typed through `QtiTestPluginState`, or `undefined` before the
|
|
112
112
|
* plugin has stored anything. Read it from `computedContext`; write it by dispatching
|
|
113
|
-
* `
|
|
113
|
+
* `qc-test-update-plugin-state` (`dispatchPublic`).
|
|
114
114
|
*/
|
|
115
115
|
declare const pluginState: <K extends keyof QtiTestPluginState$1 & string>(context: Pick<ComputedContext, "plugins"> | undefined, plugin: K) => QtiTestPluginState$1[K] | undefined;
|
|
116
116
|
|
|
@@ -133,7 +133,7 @@ interface ITestProcessingMixin {
|
|
|
133
133
|
/**
|
|
134
134
|
* Everything a host needs to persist to resume a candidate's test session, and nothing else.
|
|
135
135
|
*
|
|
136
|
-
* Read it from `qtiTest.state` or the `
|
|
136
|
+
* Read it from `qtiTest.state` or the `qc-test-state-changed` event, store it wherever you like —
|
|
137
137
|
* a database, `localStorage`, `sessionStorage` — and assign it back to `qtiTest.state` to resume.
|
|
138
138
|
*
|
|
139
139
|
* Deliberately not here:
|
package/dist/test.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-NWSDBYK7.js";
|
|
2
2
|
import {
|
|
3
3
|
QTI_TEST_STATE_VERSION,
|
|
4
4
|
QtiAssessmentItemRef,
|
|
@@ -46,12 +46,12 @@ import {
|
|
|
46
46
|
pluginElements,
|
|
47
47
|
pluginState,
|
|
48
48
|
ttsElements
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-LQ65RILE.js";
|
|
50
|
+
import "./chunk-M4TZIB3W.js";
|
|
51
|
+
import "./chunk-WWY2H2YO.js";
|
|
52
52
|
import "./chunk-4DB4SC5K.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-LORYM4U2.js";
|
|
54
|
+
import "./chunk-NZ7ZC4SP.js";
|
|
55
55
|
export {
|
|
56
56
|
QTI_TEST_STATE_VERSION,
|
|
57
57
|
QtiAssessmentItemRef,
|
package/dist/transformers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-
|
|
1
|
+
export { M as ModuleResolutionConfig, q as qtiTransformItem, a as qtiTransformTest, t as transformItemApi, b as transformTestApi } from './qti-transform-test.d-Bb9vnLzP.js';
|
|
2
2
|
|
|
3
3
|
declare const qtiTransformManifest: () => {
|
|
4
4
|
load: (uri: string, signal?: AbortSignal) => Promise<{
|
package/dist/transformers.js
CHANGED
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.16",
|
|
5
5
|
"author": "",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@heximal/templates": "^0.1.5",
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
"lit-html": "^3.3.1"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@qti-components/base": "^3.0.0-next.
|
|
14
|
-
"@qti-components/corrections": "^0.
|
|
15
|
-
"@qti-components/elements": "^2.0.0-next.
|
|
16
|
-
"@qti-components/interactions": "^1.10.5-next.
|
|
17
|
-
"@qti-components/item": "^1.5.1-next.
|
|
18
|
-
"@qti-components/loader": "^1.3.4-next.
|
|
19
|
-
"@qti-components/processing": "^1.6.1-next.
|
|
20
|
-
"@qti-components/test": "^2.0.0-next.
|
|
21
|
-
"@qti-components/theme": "^
|
|
22
|
-
"@qti-components/transformers": "^1.
|
|
13
|
+
"@qti-components/base": "^3.0.0-next.6",
|
|
14
|
+
"@qti-components/corrections": "^1.0.0-next.9",
|
|
15
|
+
"@qti-components/elements": "^2.0.0-next.7",
|
|
16
|
+
"@qti-components/interactions": "^1.10.5-next.8",
|
|
17
|
+
"@qti-components/item": "^1.5.1-next.7",
|
|
18
|
+
"@qti-components/loader": "^1.3.4-next.2",
|
|
19
|
+
"@qti-components/processing": "^1.6.1-next.5",
|
|
20
|
+
"@qti-components/test": "^2.0.0-next.14",
|
|
21
|
+
"@qti-components/theme": "^3.0.0-next.6",
|
|
22
|
+
"@qti-components/transformers": "^1.8.0-next.0"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
".": {
|