@citolab/qti-components 10.0.0-next.3 → 10.0.0-next.30
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 +4334 -2688
- package/dist/base.d.ts +39 -13
- package/dist/base.js +14 -1
- package/dist/{chunk-D3BYGEQU.js → chunk-2ZT47EUK.js} +117 -92
- package/dist/chunk-2ZT47EUK.js.map +1 -0
- package/dist/{chunk-RU6332MD.js → chunk-566LB3G2.js} +4 -4
- package/dist/{chunk-MI7774NV.js → chunk-5BP2A7BI.js} +2 -2
- package/dist/{chunk-OQDBARD5.js → chunk-5KNTKBP6.js} +2 -2
- package/dist/chunk-7ISPUOJG.js +209 -0
- package/dist/chunk-7ISPUOJG.js.map +1 -0
- package/dist/{chunk-GBZNFSFY.js → chunk-ADTCTKXS.js} +2 -2
- package/dist/{chunk-FD4AB6TM.js → chunk-BBP7QV32.js} +2 -2
- package/dist/{chunk-LFVPS7KB.js → chunk-CFTWXYBO.js} +2 -2
- package/dist/{chunk-35WWWFS6.js → chunk-DAESCCLR.js} +2 -2
- package/dist/chunk-DJ7PB252.js +7 -0
- package/dist/chunk-DJ7PB252.js.map +1 -0
- package/dist/{chunk-6U3YPHXU.js → chunk-GAPMCYR5.js} +277 -154
- package/dist/chunk-GAPMCYR5.js.map +1 -0
- package/dist/{chunk-TDWJ6WZA.js → chunk-GPC53O7P.js} +166 -10
- package/dist/chunk-GPC53O7P.js.map +1 -0
- package/dist/{chunk-6K3QWJHH.js → chunk-LPYZVKHX.js} +48 -7
- package/dist/chunk-LPYZVKHX.js.map +1 -0
- package/dist/{chunk-TLAVOBEM.js → chunk-O2XRZPKA.js} +356 -62
- package/dist/chunk-O2XRZPKA.js.map +1 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-PZ5AY32C.js.map +1 -0
- package/dist/{chunk-RSMYGGQK.js → chunk-TZCOXFPB.js} +1590 -610
- package/dist/chunk-TZCOXFPB.js.map +1 -0
- package/dist/chunk-UCXLDQYA.js +56 -0
- package/dist/chunk-UCXLDQYA.js.map +1 -0
- package/dist/chunk-WWY2H2YO.js +7 -0
- package/dist/chunk-WWY2H2YO.js.map +1 -0
- package/dist/{chunk-SIE3E4FG.js → chunk-YRR6D6UP.js} +753 -2095
- package/dist/chunk-YRR6D6UP.js.map +1 -0
- package/dist/computed.types.d-BPzPFX3Z.d.ts +91 -0
- package/dist/{config.context.d-BvU9r-Mg.d.ts → config.context.d-Dm11aAuw.d.ts} +21 -3
- package/dist/corrections.d.ts +137 -24
- package/dist/corrections.js +12 -12
- package/dist/corrections.js.map +1 -1
- package/dist/elements.d.ts +66 -73
- package/dist/elements.js +9 -6
- package/dist/index.d.ts +21 -17
- package/dist/index.js +50 -61
- package/dist/interactions.d.ts +98 -19
- package/dist/interactions.js +8 -3
- package/dist/item.css +1948 -1946
- package/dist/item.d.ts +8 -6
- package/dist/item.js +6 -5
- package/dist/item.types.d-Zc6ZQDhu.d.ts +25 -0
- package/dist/loader.d.ts +5 -3
- package/dist/loader.js +3 -2
- package/dist/processing.d.ts +19 -7
- package/dist/processing.js +4 -3
- package/dist/public-events.d-3dGip9pd.d.ts +105 -0
- package/dist/qti-components-jsx.d.ts +1725 -1777
- package/dist/{qti-condition-expression.d-VJH6cWxf.d.ts → qti-condition-expression.d-7Kd4LBxn.d.ts} +1 -1
- package/dist/{qti-expression.d-BPxEp8HU.d.ts → qti-expression.d-iH3w6mqf.d.ts} +2 -1
- package/dist/{qti-feedback.d-wMYNVkkj.d.ts → qti-feedback.d-CT0W-8Gm.d.ts} +8 -1
- package/dist/{qti-item.d-DgC1AQbY.d.ts → qti-item.d-CxP6KtCH.d.ts} +3 -2
- package/dist/{qti-rule-base.d-Bdzg8eGH.d.ts → qti-rule-base.d-CeKP0Ooi.d.ts} +2 -2
- package/dist/qti-test-state-ybQ6ausy.d.ts +81 -0
- package/dist/qti-test-state.d-CjvdranT.d.ts +61 -0
- package/dist/{qti-test.d-86TlaMlI.d.ts → qti-test.d-BbtCG7A-.d.ts} +91 -487
- package/dist/{qti-text-entry-interaction.d-q8u5BiVK.d.ts → qti-text-entry-interaction.d-m0EFv9no.d.ts} +221 -73
- package/dist/{qti-transform-test.d-BL7GGFJj.d.ts → qti-transform-test.d-CtNaWJr8.d.ts} +9 -0
- package/dist/{interaction.d-g6XG0T0Z.d.ts → record.d-N1Bq7e1f.d.ts} +67 -4
- package/dist/{session.context.d-D5080LVx.d.ts → session.context.d-9gRdGK4T.d.ts} +7 -1
- package/dist/test-plugin-api.d.ts +143 -0
- package/dist/test-plugin-api.js +21 -0
- package/dist/test-plugin-api.js.map +1 -0
- package/dist/test.d.ts +72 -57
- package/dist/test.js +22 -48
- package/dist/transformers.d.ts +1 -1
- package/dist/transformers.js +2 -1
- package/dist/{item.types.d-B55QkJ92.d.ts → variables.d-DWHlTszN.d.ts} +8 -24
- package/package.json +16 -11
- package/dist/chunk-6K3QWJHH.js.map +0 -1
- package/dist/chunk-6U3YPHXU.js.map +0 -1
- package/dist/chunk-D3BYGEQU.js.map +0 -1
- package/dist/chunk-RSMYGGQK.js.map +0 -1
- package/dist/chunk-SIE3E4FG.js.map +0 -1
- package/dist/chunk-TDWJ6WZA.js.map +0 -1
- package/dist/chunk-TLAVOBEM.js.map +0 -1
- package/dist/chunk-ZP6QQYSU.js +0 -7
- package/dist/chunk-ZP6QQYSU.js.map +0 -1
- package/dist/computed.types.d-gJrBeUMG.d.ts +0 -42
- /package/dist/{chunk-RU6332MD.js.map → chunk-566LB3G2.js.map} +0 -0
- /package/dist/{chunk-MI7774NV.js.map → chunk-5BP2A7BI.js.map} +0 -0
- /package/dist/{chunk-OQDBARD5.js.map → chunk-5KNTKBP6.js.map} +0 -0
- /package/dist/{chunk-GBZNFSFY.js.map → chunk-ADTCTKXS.js.map} +0 -0
- /package/dist/{chunk-FD4AB6TM.js.map → chunk-BBP7QV32.js.map} +0 -0
- /package/dist/{chunk-LFVPS7KB.js.map → chunk-CFTWXYBO.js.map} +0 -0
- /package/dist/{chunk-35WWWFS6.js.map → chunk-DAESCCLR.js.map} +0 -0
package/dist/interactions.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, f as QtiGapMatchInteraction, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, l as QtiHotspotInteraction, n as QtiHottextInteraction, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction,
|
|
2
|
-
export { O as Orientation } from './qti-text-entry-interaction.d-
|
|
1
|
+
import { a as QtiAssociateInteraction, b as QtiChoiceInteraction, c as QtiExtendedTextInteraction, f as QtiGapMatchInteraction, h as QtiGraphicAssociateInteraction, i as QtiGraphicGapMatchInteraction, j as QtiGraphicOrderInteraction, l as QtiHotspotInteraction, n as QtiHottextInteraction, p as QtiInlineChoiceInteraction, q as QtiMatchInteraction, r as QtiOrderInteraction, s as QtiPortableCustomInteraction, B as QtiPortableCustomInteractionTest, u as QtiSelectPointInteraction, x as QtiSliderInteraction, y as QtiTextEntryInteraction, Q as QtiAssociableHotspot, d as QtiGap, e as QtiGapImg, g as QtiGapText, k as QtiHotspotChoice, m as QtiHottext, o as QtiInlineChoice, t as QtiPrompt, v as QtiSimpleAssociableChoice, w as QtiSimpleChoice } from './qti-text-entry-interaction.d-m0EFv9no.js';
|
|
2
|
+
export { O as Orientation, z as inlineScriptText, A as inlineStyleText } from './qti-text-entry-interaction.d-m0EFv9no.js';
|
|
3
3
|
import * as lit from 'lit';
|
|
4
|
-
import { CSSResultGroup, LitElement
|
|
5
|
-
import { I as Interaction } from './
|
|
4
|
+
import { CSSResultGroup, LitElement } from 'lit';
|
|
5
|
+
import { I as Interaction, c as ValidityTrigger } from './record.d-N1Bq7e1f.js';
|
|
6
6
|
import './interaction.interface.d-CvjHM2bi.js';
|
|
7
|
-
import './config.context.d-
|
|
8
|
-
import './
|
|
7
|
+
import './config.context.d-Dm11aAuw.js';
|
|
8
|
+
import './variables.d-DWHlTszN.js';
|
|
9
|
+
import './item.types.d-Zc6ZQDhu.js';
|
|
9
10
|
import './qti.context.d-CejJMlfZ.js';
|
|
10
11
|
import 'lit/directives/ref.js';
|
|
11
12
|
|
|
@@ -13,6 +14,10 @@ import 'lit/directives/ref.js';
|
|
|
13
14
|
* Upload interaction: candidates attach a file as their response.
|
|
14
15
|
*
|
|
15
16
|
* @slot prompt - The prompt shown above the file input.
|
|
17
|
+
*
|
|
18
|
+
* @csspart input - The file input element.
|
|
19
|
+
* @cssstate disabled - The interaction is switched off.
|
|
20
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
16
21
|
*/
|
|
17
22
|
declare class QtiUploadInteraction extends Interaction {
|
|
18
23
|
#private;
|
|
@@ -33,27 +38,76 @@ declare global {
|
|
|
33
38
|
}
|
|
34
39
|
|
|
35
40
|
/**
|
|
36
|
-
* Position
|
|
41
|
+
* Position object interaction (QTI 3, 3.2.16): the candidate places copies of an image (the
|
|
42
|
+
* object) on another image (the stage, the parent `qti-position-object-stage`). The response is a
|
|
43
|
+
* list of `point`s, each the object's centre point in the stage image's own coordinates (its
|
|
44
|
+
* `width`/`height` attributes, else its natural size), whatever size the stage is shown at.
|
|
45
|
+
*
|
|
46
|
+
* Placing:
|
|
47
|
+
* - drag the object onto the stage, or click it and then click the stage;
|
|
48
|
+
* - keyboard: focus the object and press Enter or Space to place a copy at the stage's centre;
|
|
49
|
+
* on a placed copy, the arrow keys move it (Shift: ten times as far) and Delete or Backspace
|
|
50
|
+
* removes it;
|
|
51
|
+
* - drag a placed copy to move it, or off the stage to remove it.
|
|
52
|
+
*
|
|
53
|
+
* At `max-choices` (default 1; 0 = no limit) no further copy is placed and the host carries
|
|
54
|
+
* `:state(used)`. Area-mapping areas are never shown, only the candidate's positions.
|
|
55
|
+
*
|
|
56
|
+
* @customElement qti-position-object-interaction
|
|
57
|
+
* @slot - The object image (`img` or `picture`).
|
|
58
|
+
* @attr {number} [max-choices=1] - Most positions; 0 = no limit.
|
|
59
|
+
* @attr {number} [min-choices=0] - Fewest positions for a valid response.
|
|
60
|
+
* @attr {string} center-point - The object's centre point, `x y` (or `x,y`) from its top-left, in
|
|
61
|
+
* the object's own pixels. Default: the centre of its box.
|
|
37
62
|
*
|
|
38
|
-
* @
|
|
63
|
+
* @csspart object - The object to place, beside the stage. Tokens: `selected` while a click has
|
|
64
|
+
* picked it up (the next click on the stage places it); `used` at `max-choices`.
|
|
65
|
+
* @csspart point - Each placed copy on the stage.
|
|
66
|
+
* @csspart message - The validation message, hidden until `reportValidity` shows it.
|
|
67
|
+
* @cssstate used - Every allowed copy is placed (`max-choices` reached).
|
|
68
|
+
* @cssstate disabled - The interaction is switched off.
|
|
69
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
39
70
|
*/
|
|
40
|
-
declare class QtiPositionObjectInteraction extends
|
|
71
|
+
declare class QtiPositionObjectInteraction extends Interaction {
|
|
72
|
+
#private;
|
|
41
73
|
static styles: CSSResultGroup;
|
|
74
|
+
maxChoices: number;
|
|
75
|
+
minChoices: number;
|
|
76
|
+
centerPoint: string | null;
|
|
77
|
+
response: string[] | null;
|
|
78
|
+
/** Bumped when the stage image changes size, so the copies are placed again. */
|
|
79
|
+
private _layout;
|
|
80
|
+
/** A copy following the pointer: the index it moves (-1: a new one) and where it is, in client px. */
|
|
81
|
+
private _drag;
|
|
82
|
+
/** The object was clicked: the next click on the stage places it. */
|
|
83
|
+
private _armed;
|
|
84
|
+
protected _handleResponseChange: () => void;
|
|
85
|
+
validate(): boolean;
|
|
86
|
+
reportValidity(options?: {
|
|
87
|
+
trigger?: ValidityTrigger;
|
|
88
|
+
}): boolean;
|
|
89
|
+
reset(): void;
|
|
90
|
+
connectedCallback(): void;
|
|
91
|
+
disconnectedCallback(): void;
|
|
42
92
|
render(): lit.TemplateResult<1>;
|
|
43
93
|
}
|
|
94
|
+
declare global {
|
|
95
|
+
interface HTMLElementTagNameMap {
|
|
96
|
+
'qti-position-object-interaction': QtiPositionObjectInteraction;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
44
99
|
|
|
100
|
+
/**
|
|
101
|
+
* The stage of one or more position object interactions: the image the objects are placed on, and
|
|
102
|
+
* the containing block of their placed copies. Layout only: each `qti-position-object-interaction`
|
|
103
|
+
* inside it handles its own input and response, measured against this stage's image.
|
|
104
|
+
*
|
|
105
|
+
* @customElement qti-position-object-stage
|
|
106
|
+
* @slot - The stage image (`img` or `picture`), then the interactions.
|
|
107
|
+
*/
|
|
45
108
|
declare class QtiPositionObjectStage extends LitElement {
|
|
46
109
|
static styles: CSSResultGroup;
|
|
47
|
-
choiceOrdering: boolean;
|
|
48
|
-
startX: any;
|
|
49
|
-
startY: any;
|
|
50
|
-
dragElement: any;
|
|
51
110
|
render(): lit.TemplateResult<1>;
|
|
52
|
-
constructor();
|
|
53
|
-
dragElementHandler(event: MouseEvent): void;
|
|
54
|
-
firstUpdated(a: PropertyValueMap<any>): void;
|
|
55
|
-
removeMoveListener(): void;
|
|
56
|
-
disconnectedCallback(): void;
|
|
57
111
|
}
|
|
58
112
|
declare global {
|
|
59
113
|
interface HTMLElementTagNameMap {
|
|
@@ -66,6 +120,11 @@ declare global {
|
|
|
66
120
|
*
|
|
67
121
|
* @slot prompt - The prompt shown above the media element.
|
|
68
122
|
* @slot - Default slot for the embedded media element.
|
|
123
|
+
*
|
|
124
|
+
* No parts: the media element is slotted light DOM and is styled directly.
|
|
125
|
+
*
|
|
126
|
+
* @cssstate disabled - The interaction is switched off.
|
|
127
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
69
128
|
*/
|
|
70
129
|
declare class QtiMediaInteraction extends Interaction {
|
|
71
130
|
#private;
|
|
@@ -94,13 +153,28 @@ declare global {
|
|
|
94
153
|
/**
|
|
95
154
|
* A button that ends the current attempt.
|
|
96
155
|
*
|
|
156
|
+
* It follows its item: it cannot be pressed while the item is `disabled` or `readonly`, or once an
|
|
157
|
+
* adaptive item is done. An adaptive item that sets `completionStatus` to `completed` closes its
|
|
158
|
+
* session, so no further attempt can start (QTI info model §2.5).
|
|
159
|
+
*
|
|
97
160
|
* @csspart button - The end-attempt button element.
|
|
161
|
+
*
|
|
162
|
+
* No states: the element has no internals; `disabled` and `readonly` are read off the item and
|
|
163
|
+
* land on the button's `disabled` attribute.
|
|
98
164
|
*/
|
|
99
165
|
declare class QtiEndAttemptInteraction extends LitElement {
|
|
166
|
+
#private;
|
|
100
167
|
static styles: CSSResultGroup;
|
|
101
168
|
responseIdentifier: string;
|
|
102
169
|
disabled: boolean;
|
|
103
|
-
|
|
170
|
+
private _itemContext?;
|
|
171
|
+
/**
|
|
172
|
+
* Whether ending the attempt with this button counts as an attempt (`numAttempts` goes up), so it
|
|
173
|
+
* uses up one of the item's `max-attempts`. Only `"false"` does not count: a hint button that
|
|
174
|
+
* should not use up an attempt says so. QTI 3 gives the attribute no default; an absent value counts,
|
|
175
|
+
* as QTI 2.x's default `true` did and as amp-up and QTI.JS do.
|
|
176
|
+
* [More information](https://www.imsglobal.org/spec/qti/v3p0/info#Data_EndAttemptInteraction)
|
|
177
|
+
*/
|
|
104
178
|
countAttempt: 'true' | 'false' | null;
|
|
105
179
|
title: string;
|
|
106
180
|
render(): lit.TemplateResult<1>;
|
|
@@ -136,6 +210,11 @@ declare global {
|
|
|
136
210
|
*
|
|
137
211
|
* Messages are sent to all parent windows to support embedding scenarios like Storybook
|
|
138
212
|
* where window.top might not be the actual host application.
|
|
213
|
+
*
|
|
214
|
+
* No parts: the interaction renders inside an iframe it owns, and the iframe is not themed.
|
|
215
|
+
*
|
|
216
|
+
* @cssstate disabled - The interaction is switched off.
|
|
217
|
+
* @cssstate readonly - The interaction is frozen: it shows its value and takes no input.
|
|
139
218
|
*/
|
|
140
219
|
declare class QtiCustomInteraction extends Interaction {
|
|
141
220
|
#private;
|
package/dist/interactions.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-DAESCCLR.js";
|
|
2
2
|
import {
|
|
3
3
|
QtiAssociableHotspot,
|
|
4
4
|
QtiAssociateInteraction,
|
|
@@ -32,10 +32,13 @@ import {
|
|
|
32
32
|
QtiSliderInteraction,
|
|
33
33
|
QtiTextEntryInteraction,
|
|
34
34
|
QtiUploadInteraction,
|
|
35
|
+
inlineScriptText,
|
|
36
|
+
inlineStyleText,
|
|
35
37
|
qtiInteractionElements
|
|
36
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-TZCOXFPB.js";
|
|
37
39
|
import "./chunk-4DB4SC5K.js";
|
|
38
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-GPC53O7P.js";
|
|
41
|
+
import "./chunk-PZ5AY32C.js";
|
|
39
42
|
export {
|
|
40
43
|
QtiAssociableHotspot,
|
|
41
44
|
QtiAssociateInteraction,
|
|
@@ -69,6 +72,8 @@ export {
|
|
|
69
72
|
QtiSliderInteraction,
|
|
70
73
|
QtiTextEntryInteraction,
|
|
71
74
|
QtiUploadInteraction,
|
|
75
|
+
inlineScriptText,
|
|
76
|
+
inlineStyleText,
|
|
72
77
|
qtiInteractionElements
|
|
73
78
|
};
|
|
74
79
|
//# sourceMappingURL=interactions.js.map
|