@citolab/qti-components 10.0.0-next.15 → 10.0.0-next.17
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 +1503 -2931
- package/dist/base.d.ts +37 -11
- package/dist/base.js +8 -1
- package/dist/{chunk-G2EIC7H2.js → chunk-7MYZHZWV.js} +955 -364
- package/dist/chunk-7MYZHZWV.js.map +1 -0
- package/dist/chunk-DJ7PB252.js +7 -0
- package/dist/chunk-DJ7PB252.js.map +1 -0
- package/dist/{chunk-F553IZPL.js → chunk-J3F3JSCW.js} +2 -2
- package/dist/chunk-J6VX4N7M.js +197 -0
- package/dist/chunk-J6VX4N7M.js.map +1 -0
- package/dist/{chunk-32PI7KWX.js → chunk-L3LBSAGZ.js} +2 -2
- package/dist/{chunk-WIUPAUJV.js → chunk-L7J2ZOJL.js} +2 -2
- package/dist/{chunk-IM5AKPIJ.js → chunk-NZ7ZC4SP.js} +96 -4
- package/dist/chunk-NZ7ZC4SP.js.map +1 -0
- package/dist/{chunk-XY5DHYIH.js → chunk-OG5HIRHE.js} +3 -3
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-HT3LSWXL.js → chunk-QLGUI5VG.js} +2 -2
- package/dist/chunk-UCXLDQYA.js +56 -0
- package/dist/chunk-UCXLDQYA.js.map +1 -0
- package/dist/{chunk-5AJZGRWI.js → chunk-UDJ7MHLF.js} +4 -4
- package/dist/chunk-UDJ7MHLF.js.map +1 -0
- package/dist/{chunk-MIQZBDTB.js → chunk-UURHLJVM.js} +107 -1809
- package/dist/chunk-UURHLJVM.js.map +1 -0
- package/dist/{chunk-IWNRQVNW.js → chunk-V5GL7PTC.js} +2 -2
- package/dist/{chunk-QT7WQXCS.js → chunk-WGUQCB2Z.js} +28 -82
- package/dist/chunk-WGUQCB2Z.js.map +1 -0
- package/dist/chunk-WWY2H2YO.js +7 -0
- package/dist/chunk-WWY2H2YO.js.map +1 -0
- package/dist/{chunk-URYYGVTA.js → chunk-ZAHZVBV7.js} +60 -75
- package/dist/chunk-ZAHZVBV7.js.map +1 -0
- package/dist/{computed.types.d-IXACuBr7.d.ts → computed.types.d-D4wskgi0.d.ts} +2 -2
- package/dist/corrections.d.ts +123 -20
- package/dist/corrections.js +11 -11
- package/dist/corrections.js.map +1 -1
- package/dist/elements.d.ts +35 -112
- package/dist/elements.js +8 -5
- package/dist/index.d.ts +18 -14
- package/dist/index.js +29 -63
- package/dist/interactions.d.ts +84 -17
- package/dist/interactions.js +4 -3
- package/dist/item.css +1057 -2383
- package/dist/item.d.ts +6 -4
- package/dist/item.js +5 -4
- package/dist/item.types.d-Zc6ZQDhu.d.ts +25 -0
- package/dist/loader.d.ts +4 -2
- package/dist/loader.js +1 -0
- package/dist/processing.d.ts +4 -3
- package/dist/processing.js +4 -3
- package/dist/public-events.d-3dGip9pd.d.ts +105 -0
- package/dist/qti-components-jsx.d.ts +4058 -4421
- package/dist/{qti-condition-expression.d-B-T1NNl0.d.ts → qti-condition-expression.d-7Kd4LBxn.d.ts} +1 -1
- package/dist/{qti-expression.d-B-Cfbqlb.d.ts → qti-expression.d-iH3w6mqf.d.ts} +2 -1
- package/dist/{qti-feedback.d-GAqMqAt6.d.ts → qti-feedback.d-CT0W-8Gm.d.ts} +2 -2
- package/dist/{qti-item.d-pFcNk0th.d.ts → qti-item.d-CLChmRvB.d.ts} +2 -1
- package/dist/qti-test-state-BAf5AmJ2.d.ts +68 -0
- package/dist/qti-test-state.d-D8Q89RzZ.d.ts +57 -0
- package/dist/{qti-test.d-BjhVQnQy.d.ts → qti-test.d-COzv7YZG.d.ts} +14 -548
- package/dist/{qti-text-entry-interaction.d-DECzpIzi.d.ts → qti-text-entry-interaction.d-DsUyecBC.d.ts} +144 -43
- package/dist/{record.d-CljDLwRz.d.ts → record.d-BfZhFr0L.d.ts} +34 -3
- package/dist/{session.context.d-DW09Lrie.d.ts → session.context.d-9gRdGK4T.d.ts} +2 -2
- package/dist/test-plugin-api.d.ts +134 -0
- package/dist/test-plugin-api.js +19 -0
- package/dist/test-plugin-api.js.map +1 -0
- package/dist/test.d.ts +16 -158
- package/dist/test.js +13 -52
- package/dist/transformers.js +1 -0
- package/dist/{item.types.d-DuVR0ZVK.d.ts → variables.d-DWHlTszN.d.ts} +1 -23
- package/package.json +13 -9
- package/dist/chunk-5AJZGRWI.js.map +0 -1
- package/dist/chunk-G2EIC7H2.js.map +0 -1
- package/dist/chunk-IM5AKPIJ.js.map +0 -1
- package/dist/chunk-MIQZBDTB.js.map +0 -1
- package/dist/chunk-QT7WQXCS.js.map +0 -1
- package/dist/chunk-RNLSNH4N.js +0 -7
- package/dist/chunk-RNLSNH4N.js.map +0 -1
- package/dist/chunk-URYYGVTA.js.map +0 -1
- /package/dist/{chunk-F553IZPL.js.map → chunk-J3F3JSCW.js.map} +0 -0
- /package/dist/{chunk-32PI7KWX.js.map → chunk-L3LBSAGZ.js.map} +0 -0
- /package/dist/{chunk-WIUPAUJV.js.map → chunk-L7J2ZOJL.js.map} +0 -0
- /package/dist/{chunk-XY5DHYIH.js.map → chunk-OG5HIRHE.js.map} +0 -0
- /package/dist/{chunk-HT3LSWXL.js.map → chunk-QLGUI5VG.js.map} +0 -0
- /package/dist/{chunk-IWNRQVNW.js.map → chunk-V5GL7PTC.js.map} +0 -0
package/dist/item.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-
|
|
1
|
+
export { I as ItemContainer, a as ItemPrintVariables, Q as QtiItem } from './qti-item.d-CLChmRvB.js';
|
|
2
2
|
import { LitElement } from 'lit';
|
|
3
|
-
import { V as View } from './session.context.d-
|
|
3
|
+
import { V as View } from './session.context.d-9gRdGK4T.js';
|
|
4
|
+
import './public-events.d-3dGip9pd.js';
|
|
4
5
|
import { QtiAssessmentItem } from './elements.js';
|
|
5
6
|
import './qti.context.d-CejJMlfZ.js';
|
|
6
7
|
import './config.context.d-CCqlJXpE.js';
|
|
7
|
-
import './
|
|
8
|
+
import './variables.d-DWHlTszN.js';
|
|
9
|
+
import './item.types.d-Zc6ZQDhu.js';
|
|
8
10
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
9
|
-
import './qti-feedback.d-
|
|
11
|
+
import './qti-feedback.d-CT0W-8Gm.js';
|
|
10
12
|
import './qti-rule-base.d-CeKP0Ooi.js';
|
|
11
13
|
|
|
12
14
|
type Constructor<T = {}> = abstract new (...args: any[]) => T;
|
package/dist/item.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-L7J2ZOJL.js";
|
|
2
2
|
import {
|
|
3
3
|
ItemContainer,
|
|
4
4
|
ItemPrintVariables,
|
|
5
5
|
ItemViewMixin,
|
|
6
6
|
QtiItem
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-OG5HIRHE.js";
|
|
8
|
+
import "./chunk-WWY2H2YO.js";
|
|
9
9
|
import "./chunk-4DB4SC5K.js";
|
|
10
10
|
import "./chunk-LORYM4U2.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-NZ7ZC4SP.js";
|
|
12
|
+
import "./chunk-PZ5AY32C.js";
|
|
12
13
|
export {
|
|
13
14
|
ItemContainer,
|
|
14
15
|
ItemPrintVariables,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { V as VariableDeclaration } from './variables.d-DWHlTszN.js';
|
|
2
|
+
|
|
3
|
+
interface ItemContext {
|
|
4
|
+
identifier?: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
variables?: ReadonlyArray<VariableDeclaration<string | string[] | null>>;
|
|
7
|
+
/**
|
|
8
|
+
* Optional per-interaction opaque state, keyed by responseIdentifier.
|
|
9
|
+
* Used for interactions that support state save/restore (e.g. PCI).
|
|
10
|
+
*/
|
|
11
|
+
state?: Record<string, string | null>;
|
|
12
|
+
/** The item is shown for reading only. Interactions follow it; see `qti-assessment-item`'s `readonly`. */
|
|
13
|
+
readonly?: boolean;
|
|
14
|
+
/** The item is locked, for example after it was submitted. Interactions follow it; see `qti-assessment-item`'s `disabled`. */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the interactions in the item are valid right now (a required answer is given, a limit is
|
|
18
|
+
* respected). Published by the item whenever it checks, so a reader never has to ask the item.
|
|
19
|
+
* Unset until the item has checked once.
|
|
20
|
+
*/
|
|
21
|
+
valid?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const itemContextVariables: VariableDeclaration<string | string[]>[];
|
|
24
|
+
|
|
25
|
+
export { type ItemContext as I, itemContextVariables as i };
|
package/dist/loader.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import './public-events.d-3dGip9pd.js';
|
|
1
2
|
import { QtiAssessmentItem } from './elements.js';
|
|
2
|
-
import './
|
|
3
|
+
import './variables.d-DWHlTszN.js';
|
|
3
4
|
import 'lit';
|
|
5
|
+
import './item.types.d-Zc6ZQDhu.js';
|
|
4
6
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
5
|
-
import './qti-feedback.d-
|
|
7
|
+
import './qti-feedback.d-CT0W-8Gm.js';
|
|
6
8
|
import './qti-rule-base.d-CeKP0Ooi.js';
|
|
7
9
|
|
|
8
10
|
type ManifestInfo = {
|
package/dist/loader.js
CHANGED
package/dist/processing.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as lit from 'lit';
|
|
2
2
|
import { LitElement, nothing } from 'lit';
|
|
3
3
|
import { b as QtiRuleBase } from './qti-rule-base.d-CeKP0Ooi.js';
|
|
4
|
-
import {
|
|
5
|
-
import { Q as QtiExpression, a as QtiExpressionBase, T as TestContext } from './qti-expression.d-
|
|
6
|
-
import { Q as QtiConditionExpression } from './qti-condition-expression.d-
|
|
4
|
+
import { I as ItemContext } from './item.types.d-Zc6ZQDhu.js';
|
|
5
|
+
import { Q as QtiExpression, a as QtiExpressionBase, T as TestContext } from './qti-expression.d-iH3w6mqf.js';
|
|
6
|
+
import { Q as QtiConditionExpression } from './qti-condition-expression.d-7Kd4LBxn.js';
|
|
7
|
+
import { B as BaseType, f as ResponseVariable, V as VariableDeclaration } from './variables.d-DWHlTszN.js';
|
|
7
8
|
import './qti.context.d-CejJMlfZ.js';
|
|
8
9
|
|
|
9
10
|
declare class QtiRule extends LitElement implements QtiRuleBase {
|
package/dist/processing.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-L3LBSAGZ.js";
|
|
2
2
|
import {
|
|
3
3
|
QtiAnd,
|
|
4
4
|
QtiAnyN,
|
|
@@ -76,8 +76,9 @@ import {
|
|
|
76
76
|
QtiVariable,
|
|
77
77
|
qtiAndMixin,
|
|
78
78
|
qtiSubtractMixin
|
|
79
|
-
} from "./chunk-
|
|
80
|
-
import "./chunk-
|
|
79
|
+
} from "./chunk-UDJ7MHLF.js";
|
|
80
|
+
import "./chunk-NZ7ZC4SP.js";
|
|
81
|
+
import "./chunk-PZ5AY32C.js";
|
|
81
82
|
export {
|
|
82
83
|
QtiAnd,
|
|
83
84
|
QtiAnyN,
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { R as ResponseInteraction } from './variables.d-DWHlTszN.js';
|
|
2
|
+
|
|
3
|
+
interface OutcomeEntry {
|
|
4
|
+
identifier: string;
|
|
5
|
+
value: Readonly<string | string[] | null | undefined>;
|
|
6
|
+
}
|
|
7
|
+
/** One outcome an update applied, with its final value. */
|
|
8
|
+
interface OutcomeChangedDetails {
|
|
9
|
+
item: string;
|
|
10
|
+
outcomeIdentifier: string;
|
|
11
|
+
value: Readonly<string | string[]>;
|
|
12
|
+
}
|
|
13
|
+
/** The outcomes one update applied, sent after the item context is published. */
|
|
14
|
+
interface OutcomesChangedDetails {
|
|
15
|
+
item: string;
|
|
16
|
+
outcomes: OutcomeEntry[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Outcomes for the item to apply in one update: the result of its own response processing, or what
|
|
20
|
+
* a backend returned. `responseProcessed` says an attempt ended, as it does after `processResponse`.
|
|
21
|
+
*/
|
|
22
|
+
interface SetOutcomesDetails {
|
|
23
|
+
outcomes: OutcomeEntry[];
|
|
24
|
+
responseProcessed?: boolean;
|
|
25
|
+
}
|
|
26
|
+
type InteractionChangedDetails = ResponseInteraction & {
|
|
27
|
+
item: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The public events of the item. The name tells you it is public: everything declared here starts
|
|
32
|
+
* with `qc-`; every other event is internal plumbing and may change in any release.
|
|
33
|
+
*
|
|
34
|
+
* Requests are verbs, notifications are past tense. All bubble and are composed.
|
|
35
|
+
*
|
|
36
|
+
* `deprecated` is the `cito-` name the event had in 9.x. `dispatchPublic` sends and `listenPublic`
|
|
37
|
+
* handles both until the next major, then the field goes. The 7.x names (`qti-interaction-changed`,
|
|
38
|
+
* `qti-outcome-changed`, `qti-rubric:discretionary-placement`) are no longer sent or handled.
|
|
39
|
+
*/
|
|
40
|
+
interface PublicEventDeclaration {
|
|
41
|
+
kind: 'request' | 'notification';
|
|
42
|
+
scope: 'test' | 'item';
|
|
43
|
+
/** The previous name. Dispatched and handled alongside the new one. */
|
|
44
|
+
deprecated?: string;
|
|
45
|
+
}
|
|
46
|
+
interface RubricPlacement {
|
|
47
|
+
className: string;
|
|
48
|
+
element: Element;
|
|
49
|
+
}
|
|
50
|
+
/** The detail of `qc-feedback-show` and `qc-feedback-hide`. */
|
|
51
|
+
interface FeedbackEventDetail {
|
|
52
|
+
kind: 'block' | 'inline' | 'modal';
|
|
53
|
+
/** The feedback's `identifier`. */
|
|
54
|
+
identifier: string;
|
|
55
|
+
/** The outcome it follows (`outcome-identifier`). */
|
|
56
|
+
outcomeIdentifier: string;
|
|
57
|
+
/** The feedback element itself: read or clone its content (it stays in the DOM, hidden). */
|
|
58
|
+
element: Element;
|
|
59
|
+
/** The identifier of the item it is in, when it is in one. */
|
|
60
|
+
itemIdentifier?: string;
|
|
61
|
+
}
|
|
62
|
+
interface PublicItemEventMap {
|
|
63
|
+
'qc-item-response-changed': CustomEvent<InteractionChangedDetails>;
|
|
64
|
+
/**
|
|
65
|
+
* Request: the item applies these outcomes in one update. Response processing sends it; a host
|
|
66
|
+
* that scores on a backend sends it on the item with the outcomes the backend returned.
|
|
67
|
+
*/
|
|
68
|
+
'qc-item-set-outcomes': CustomEvent<SetOutcomesDetails>;
|
|
69
|
+
/** One per outcome an update applied, with its final value, after the item context is published. */
|
|
70
|
+
'qc-item-outcome-changed': CustomEvent<OutcomeChangedDetails>;
|
|
71
|
+
/** All the outcomes one update applied, after the item context is published. */
|
|
72
|
+
'qc-item-outcomes-changed': CustomEvent<OutcomesChangedDetails>;
|
|
73
|
+
/** Cancelable: `preventDefault()` keeps the rubric block where it is. */
|
|
74
|
+
'qc-item-rubric-placement': CustomEvent<RubricPlacement>;
|
|
75
|
+
/**
|
|
76
|
+
* Cancelable: the feedback element is about to show (its condition turned true). `preventDefault()`
|
|
77
|
+
* keeps it hidden, so the host can show the content itself. Sent once per showing.
|
|
78
|
+
*/
|
|
79
|
+
'qc-feedback-show': CustomEvent<FeedbackEventDetail>;
|
|
80
|
+
/** The condition of a feedback that was shown (or taken over by the host) turned false again. */
|
|
81
|
+
'qc-feedback-hide': CustomEvent<FeedbackEventDetail>;
|
|
82
|
+
}
|
|
83
|
+
type PublicItemEventName = keyof PublicItemEventMap;
|
|
84
|
+
declare const PUBLIC_ITEM_EVENTS: Record<PublicItemEventName, PublicEventDeclaration>;
|
|
85
|
+
declare global {
|
|
86
|
+
interface HTMLElementEventMap extends PublicItemEventMap {
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Dispatch `name` and its deprecated name with the same `detail` object, new name first. Returns
|
|
91
|
+
* `false` when a listener of either cancelled the event. The detail is always an object.
|
|
92
|
+
* Shared by the item and test tiers; use `dispatchPublic` (item) or the test's own wrapper.
|
|
93
|
+
*/
|
|
94
|
+
declare function dispatchDeclared(target: EventTarget, declarations: Record<string, PublicEventDeclaration>, name: string, detail: unknown, cancelable?: boolean): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Listen for `name` and its deprecated name. `dispatchDeclared` sends the old name straight after
|
|
97
|
+
* the new one, synchronously, with the same `detail`: that one is skipped, so the handler runs
|
|
98
|
+
* once. A host that sends only the old name is handled too, and warned once per name in the
|
|
99
|
+
* console: only a sender outside our own components gets here without the new name before it.
|
|
100
|
+
*/
|
|
101
|
+
declare function listenDeclared(target: EventTarget, declarations: Record<string, PublicEventDeclaration>, name: string, handler: (e: Event) => void): void;
|
|
102
|
+
declare function dispatchPublic<K extends PublicItemEventName>(target: EventTarget, name: K, detail: PublicItemEventMap[K] extends CustomEvent<infer D> ? D : never, cancelable?: boolean): boolean;
|
|
103
|
+
declare function listenPublic<K extends PublicItemEventName>(target: EventTarget, name: K, handler: (e: PublicItemEventMap[K]) => void): void;
|
|
104
|
+
|
|
105
|
+
export { type FeedbackEventDetail as F, PUBLIC_ITEM_EVENTS as P, type RubricPlacement as R, type PublicEventDeclaration as a, type PublicItemEventMap as b, type PublicItemEventName as c, dispatchDeclared as d, dispatchPublic as e, listenPublic as f, listenDeclared as l };
|