@citolab/qti-components 7.14.3 → 7.15.1
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 +4044 -4030
- package/custom-elements.json +10478 -26460
- package/dist/base.d.ts +8 -0
- package/dist/base.js +50 -0
- package/dist/{chunks/chunk-DGBI4IU5.js → chunk-2DOYPVF5.js} +252 -136
- package/dist/chunk-2DOYPVF5.js.map +1 -0
- package/dist/chunk-2ZEJ3RR5.js +89 -0
- package/dist/chunk-2ZEJ3RR5.js.map +1 -0
- package/dist/{chunks/chunk-E4GR4K26.js → chunk-352OTVTY.js} +1481 -442
- package/dist/chunk-352OTVTY.js.map +1 -0
- package/dist/{chunks/chunk-C4ELTNV7.js → chunk-C2HQFI2C.js} +857 -3819
- package/dist/chunk-C2HQFI2C.js.map +1 -0
- package/dist/chunk-DWIRLYDS.js +20 -0
- package/dist/chunk-DWIRLYDS.js.map +1 -0
- package/dist/{chunks/chunk-H2JE6IVU.js → chunk-EUXUH3YW.js} +1 -1
- package/dist/chunk-F44CI35W.js +145 -0
- package/dist/chunk-F44CI35W.js.map +1 -0
- package/dist/{chunks/chunk-XBPO6E25.js → chunk-INKI27D5.js} +6 -5
- package/dist/chunk-INKI27D5.js.map +1 -0
- package/dist/chunk-JEUY3MYB.js +2010 -0
- package/dist/chunk-JEUY3MYB.js.map +1 -0
- package/dist/chunk-O4XIWHTF.js +1139 -0
- package/dist/chunk-O4XIWHTF.js.map +1 -0
- package/dist/chunk-RI47B4ZT.js +1753 -0
- package/dist/chunk-RI47B4ZT.js.map +1 -0
- package/dist/{qti-loader/index.js → chunk-VEV4DGPH.js} +6 -6
- package/dist/chunk-VEV4DGPH.js.map +1 -0
- package/dist/{chunks/chunk-TN75CWLX.js → chunk-W4SQRNWO.js} +97 -2
- package/dist/chunk-W4SQRNWO.js.map +1 -0
- package/dist/elements.d.ts +1 -0
- package/dist/elements.js +42 -0
- package/dist/index.d.ts +8 -24
- package/dist/index.js +117 -285
- package/dist/index.js.map +1 -1
- package/dist/interactions.d.ts +1 -0
- package/dist/interactions.js +72 -0
- package/dist/item.d.ts +1 -0
- package/dist/item.js +23 -0
- package/dist/loader.d.ts +1 -0
- package/dist/loader.js +11 -0
- package/dist/processing.d.ts +1 -0
- package/dist/processing.js +103 -0
- package/dist/qti-components-jsx.d.ts +1475 -2388
- package/dist/test.d.ts +1 -0
- package/dist/{qti-test/index.js → test.js} +11 -19
- package/dist/transformers.d.ts +1 -0
- package/dist/{qti-transformers/index.js → transformers.js} +3 -3
- package/dist/vscode.html-custom-data.json +469 -631
- package/package.json +67 -164
- package/dist/chunks/chunk-4OGJBG35.js +0 -8
- package/dist/chunks/chunk-4OGJBG35.js.map +0 -1
- package/dist/chunks/chunk-AGV5GOTF.js +0 -234
- package/dist/chunks/chunk-AGV5GOTF.js.map +0 -1
- package/dist/chunks/chunk-BHJSX3Q6.js +0 -8
- package/dist/chunks/chunk-BHJSX3Q6.js.map +0 -1
- package/dist/chunks/chunk-C4ELTNV7.js.map +0 -1
- package/dist/chunks/chunk-C5RLRG3L.js +0 -10
- package/dist/chunks/chunk-C5RLRG3L.js.map +0 -1
- package/dist/chunks/chunk-CJADUWEC.js +0 -10
- package/dist/chunks/chunk-CJADUWEC.js.map +0 -1
- package/dist/chunks/chunk-DGBI4IU5.js.map +0 -1
- package/dist/chunks/chunk-DVQQ7I6Y.js +0 -8
- package/dist/chunks/chunk-DVQQ7I6Y.js.map +0 -1
- package/dist/chunks/chunk-E4GR4K26.js.map +0 -1
- package/dist/chunks/chunk-ELDMXTUQ.js +0 -31
- package/dist/chunks/chunk-ELDMXTUQ.js.map +0 -1
- package/dist/chunks/chunk-GAAFN7QF.js +0 -146
- package/dist/chunks/chunk-GAAFN7QF.js.map +0 -1
- package/dist/chunks/chunk-H6KHXSIO.js +0 -8
- package/dist/chunks/chunk-H6KHXSIO.js.map +0 -1
- package/dist/chunks/chunk-JQ6HWGRY.js +0 -22
- package/dist/chunks/chunk-JQ6HWGRY.js.map +0 -1
- package/dist/chunks/chunk-NJNQOQUU.js +0 -8
- package/dist/chunks/chunk-NJNQOQUU.js.map +0 -1
- package/dist/chunks/chunk-P4QBOVQ2.js +0 -206
- package/dist/chunks/chunk-P4QBOVQ2.js.map +0 -1
- package/dist/chunks/chunk-SV4K25ZI.js +0 -19
- package/dist/chunks/chunk-SV4K25ZI.js.map +0 -1
- package/dist/chunks/chunk-TN75CWLX.js.map +0 -1
- package/dist/chunks/chunk-XBPO6E25.js.map +0 -1
- package/dist/exports/computed-item.context.d.ts +0 -23
- package/dist/exports/computed-item.context.js +0 -8
- package/dist/exports/computed.context.d.ts +0 -34
- package/dist/exports/computed.context.js +0 -8
- package/dist/exports/config.context.d.ts +0 -14
- package/dist/exports/config.context.js +0 -8
- package/dist/exports/expression-result.d.ts +0 -19
- package/dist/exports/expression-result.js +0 -1
- package/dist/exports/interaction.d.ts +0 -46
- package/dist/exports/interaction.interface.d.ts +0 -13
- package/dist/exports/interaction.interface.js +0 -1
- package/dist/exports/interaction.js +0 -12
- package/dist/exports/item.context.d.ts +0 -11
- package/dist/exports/item.context.js +0 -8
- package/dist/exports/qti-assessment-item.context.d.ts +0 -9
- package/dist/exports/qti-assessment-item.context.js +0 -8
- package/dist/exports/qti-condition-expression.d.ts +0 -14
- package/dist/exports/qti-condition-expression.js +0 -11
- package/dist/exports/qti-condition-expression.js.map +0 -1
- package/dist/exports/qti-expression.d.ts +0 -23
- package/dist/exports/qti-expression.js +0 -10
- package/dist/exports/qti-expression.js.map +0 -1
- package/dist/exports/qti-test.d.ts +0 -12
- package/dist/exports/qti-test.js +0 -1
- package/dist/exports/qti-test.js.map +0 -1
- package/dist/exports/qti.context.d.ts +0 -14
- package/dist/exports/qti.context.js +0 -8
- package/dist/exports/qti.context.js.map +0 -1
- package/dist/exports/session.context.d.ts +0 -15
- package/dist/exports/session.context.js +0 -10
- package/dist/exports/session.context.js.map +0 -1
- package/dist/exports/test.context.d.ts +0 -16
- package/dist/exports/test.context.js +0 -10
- package/dist/exports/test.context.js.map +0 -1
- package/dist/exports/variables.d.ts +0 -2
- package/dist/exports/variables.js +0 -1
- package/dist/exports/variables.js.map +0 -1
- package/dist/qti-assessment-item-l-mN3teH.d.ts +0 -105
- package/dist/qti-components/index.d.ts +0 -1524
- package/dist/qti-components/index.js +0 -216
- package/dist/qti-components/index.js.map +0 -1
- package/dist/qti-item/index.d.ts +0 -114
- package/dist/qti-item/index.js +0 -19
- package/dist/qti-item/index.js.map +0 -1
- package/dist/qti-loader/index.d.ts +0 -21
- package/dist/qti-loader/index.js.map +0 -1
- package/dist/qti-modal-feedback-Cp3CHVKw.d.ts +0 -30
- package/dist/qti-test/index.d.ts +0 -480
- package/dist/qti-test/index.js.map +0 -1
- package/dist/qti-test-mmY8zNIj.d.ts +0 -120
- package/dist/qti-transform-test-Bz9A3hmD.d.ts +0 -63
- package/dist/qti-transformers/index.d.ts +0 -18
- package/dist/qti-transformers/index.js.map +0 -1
- package/dist/variables-BCkyLoXK.d.ts +0 -55
- package/readme.md +0 -59
- /package/dist/{chunks/chunk-H2JE6IVU.js.map → base.js.map} +0 -0
- /package/dist/{exports/computed-item.context.js.map → chunk-EUXUH3YW.js.map} +0 -0
- /package/dist/{exports/computed.context.js.map → elements.js.map} +0 -0
- /package/dist/{exports/config.context.js.map → interactions.js.map} +0 -0
- /package/dist/{exports/expression-result.js.map → item.js.map} +0 -0
- /package/dist/{exports/interaction.interface.js.map → loader.js.map} +0 -0
- /package/dist/{exports/interaction.js.map → processing.js.map} +0 -0
- /package/dist/{exports/item.context.js.map → test.js.map} +0 -0
- /package/dist/{exports/qti-assessment-item.context.js.map → transformers.js.map} +0 -0
|
@@ -1,1524 +0,0 @@
|
|
|
1
|
-
import { Q as QtiAssessmentItem } from '../qti-assessment-item-l-mN3teH.js';
|
|
2
|
-
import * as lit from 'lit';
|
|
3
|
-
import { LitElement, CSSResultGroup, PropertyValues, PropertyValueMap, nothing } from 'lit';
|
|
4
|
-
import * as lit_html from 'lit-html';
|
|
5
|
-
import { Calculate, Cardinality, BaseType } from '../exports/expression-result.js';
|
|
6
|
-
import { Q as QtiFeedback } from '../qti-modal-feedback-Cp3CHVKw.js';
|
|
7
|
-
export { a as QtiModalFeedback } from '../qti-modal-feedback-Cp3CHVKw.js';
|
|
8
|
-
import { IInteraction } from '../exports/interaction.interface.js';
|
|
9
|
-
import { Interaction, Correctness } from '../exports/interaction.js';
|
|
10
|
-
import { ConfigContext } from '../exports/config.context.js';
|
|
11
|
-
import { ItemContext } from '../exports/item.context.js';
|
|
12
|
-
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
13
|
-
import { QtiExpression, QtiExpressionBase } from '../exports/qti-expression.js';
|
|
14
|
-
import { QtiConditionExpression } from '../exports/qti-condition-expression.js';
|
|
15
|
-
import { TestContext } from '../exports/test.context.js';
|
|
16
|
-
import { R as ResponseVariable, V as VariableDeclaration } from '../variables-BCkyLoXK.js';
|
|
17
|
-
export { c as QtiAreaMapEntry, b as QtiAreaMapping, a as QtiMapEntry, Q as QtiMapping, d as areaShape } from '../variables-BCkyLoXK.js';
|
|
18
|
-
import '../exports/qti.context.js';
|
|
19
|
-
|
|
20
|
-
declare class QtiAssessmentStimulusRefConnectedEvent extends Event {
|
|
21
|
-
element: QtiAssessmentStimulusRef;
|
|
22
|
-
item: QtiAssessmentItem;
|
|
23
|
-
static eventName: string;
|
|
24
|
-
constructor(element: QtiAssessmentStimulusRef, item: QtiAssessmentItem);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Represents a custom element for referencing an assessment stimulus.
|
|
28
|
-
*/
|
|
29
|
-
declare class QtiAssessmentStimulusRef extends LitElement {
|
|
30
|
-
identifier: string;
|
|
31
|
-
href: string;
|
|
32
|
-
/**
|
|
33
|
-
* Lifecycle method called when the element is connected to the DOM.
|
|
34
|
-
* First checks if there's a data-stimulus-idref element. If found, loads the stimulus directly.
|
|
35
|
-
* If not found, delegates to the delivery platform via an event.
|
|
36
|
-
*/
|
|
37
|
-
connectedCallback(): Promise<void>;
|
|
38
|
-
/**
|
|
39
|
-
* Loads and appends the stimulus to the specified element.
|
|
40
|
-
* @param stimulusRef - The element to which the stimulus will be appended.
|
|
41
|
-
*/
|
|
42
|
-
updateStimulusRef(stimulusRef: Element): Promise<void>;
|
|
43
|
-
}
|
|
44
|
-
declare global {
|
|
45
|
-
interface HTMLElementTagNameMap {
|
|
46
|
-
'qti-assessment-stimulus-ref': QtiAssessmentStimulusRef;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare class QtiCompanionMaterialsInfo extends LitElement {
|
|
51
|
-
}
|
|
52
|
-
declare global {
|
|
53
|
-
interface HTMLElementTagNameMap {
|
|
54
|
-
'qti-companion-materials-info': QtiCompanionMaterialsInfo;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* https://www.imsglobal.org/spec/qti/v3p0/impl#h.fi29q8dubjgw
|
|
60
|
-
* <qti-custom-operator class="js.org">
|
|
61
|
-
<qti-base-value base-type="string"><![CDATA[
|
|
62
|
-
console.log(context.variables);
|
|
63
|
-
return 'B'
|
|
64
|
-
document.querySelector('qti-end-attempt-interaction').disabled = true;
|
|
65
|
-
]]></qti-base-value>
|
|
66
|
-
</qti-custom-operator>
|
|
67
|
-
</qti-set-outcome-value>
|
|
68
|
-
*/
|
|
69
|
-
declare class QtiCustomOperator extends LitElement implements Calculate {
|
|
70
|
-
private operatorFunction;
|
|
71
|
-
private _context?;
|
|
72
|
-
render(): lit_html.TemplateResult<1>;
|
|
73
|
-
handleSlotChange(): void;
|
|
74
|
-
calculate(): any;
|
|
75
|
-
}
|
|
76
|
-
declare global {
|
|
77
|
-
interface HTMLElementTagNameMap {
|
|
78
|
-
'qti-custom-operator': QtiCustomOperator;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
declare class QtiFeedbackBlock extends QtiFeedback {
|
|
83
|
-
static styles: lit.CSSResult;
|
|
84
|
-
render(): lit_html.TemplateResult<1>;
|
|
85
|
-
connectedCallback(): void;
|
|
86
|
-
}
|
|
87
|
-
declare global {
|
|
88
|
-
interface HTMLElementTagNameMap {
|
|
89
|
-
'qti-feedback-block': QtiFeedbackBlock;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
declare class QtiFeedbackInline extends QtiFeedback {
|
|
94
|
-
static styles: lit.CSSResult;
|
|
95
|
-
render: () => lit_html.TemplateResult<1>;
|
|
96
|
-
connectedCallback(): void;
|
|
97
|
-
}
|
|
98
|
-
declare global {
|
|
99
|
-
interface HTMLElementTagNameMap {
|
|
100
|
-
'qti-feedback-inline': QtiFeedbackInline;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
declare class QtiAssociableHotspot extends LitElement {
|
|
105
|
-
static styles: lit.CSSResult;
|
|
106
|
-
connectedCallback(): void;
|
|
107
|
-
render(): lit_html.TemplateResult<1>;
|
|
108
|
-
}
|
|
109
|
-
declare global {
|
|
110
|
-
interface HTMLElementTagNameMap {
|
|
111
|
-
'qti-associable-hotspot': QtiAssociableHotspot;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
declare const QtiAssociateInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
116
|
-
declare class QtiAssociateInteraction extends QtiAssociateInteraction_base {
|
|
117
|
-
static styles: CSSResultGroup;
|
|
118
|
-
protected _childrenMap: Element[];
|
|
119
|
-
protected _registerChoiceHandler: (event: CustomEvent) => void;
|
|
120
|
-
constructor();
|
|
121
|
-
protected _registerChoice(event: CustomEvent): void;
|
|
122
|
-
render(): lit_html.TemplateResult<1>;
|
|
123
|
-
disconnectedCallback(): void;
|
|
124
|
-
}
|
|
125
|
-
declare global {
|
|
126
|
-
interface HTMLElementTagNameMap {
|
|
127
|
-
'qti-associate-interaction': QtiAssociateInteraction;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
interface ChoiceInterface {
|
|
132
|
-
identifier: string;
|
|
133
|
-
disabled: boolean;
|
|
134
|
-
readonly: boolean;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* A mixin that adds choice functionality to a LitElement-based class.
|
|
138
|
-
* It dispatches events with a custom `type` and handles selection logic.
|
|
139
|
-
*
|
|
140
|
-
* @param Base - The base class to extend.
|
|
141
|
-
* @param type - The type of the choice, used in event names.
|
|
142
|
-
* @returns A new class extending the base class with choice functionality.
|
|
143
|
-
*/
|
|
144
|
-
interface ActiveElementMixinInterface {
|
|
145
|
-
identifier: string;
|
|
146
|
-
tabIndex: number;
|
|
147
|
-
disabled: boolean;
|
|
148
|
-
readonly: boolean;
|
|
149
|
-
internals: ElementInternals;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
type Choice = HTMLElement & ChoiceInterface & {
|
|
153
|
-
internals: ElementInternals;
|
|
154
|
-
};
|
|
155
|
-
interface ChoicesInterface extends IInteraction {
|
|
156
|
-
minChoices: number;
|
|
157
|
-
maxChoices: number;
|
|
158
|
-
value: string | null;
|
|
159
|
-
response: string | string[] | null;
|
|
160
|
-
validate(): boolean;
|
|
161
|
-
reportValidity(): boolean;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
type Orientation = 'horizontal' | 'vertical' | undefined;
|
|
165
|
-
declare const QtiChoiceInteraction_base: (abstract new (...args: any[]) => {}) & (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
166
|
-
declare class QtiChoiceInteraction extends QtiChoiceInteraction_base implements ChoicesInterface {
|
|
167
|
-
static styles: CSSResultGroup;
|
|
168
|
-
/** @deprecated, use 'qti-orientation-horizontal' or 'qti-orientation-vertical' instead */
|
|
169
|
-
orientation: Orientation;
|
|
170
|
-
private _handleSlotChange;
|
|
171
|
-
render(): lit_html.TemplateResult<1>;
|
|
172
|
-
}
|
|
173
|
-
declare global {
|
|
174
|
-
interface HTMLElementTagNameMap {
|
|
175
|
-
'qti-choice-interaction': QtiChoiceInteraction;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
declare class QtiCustomInteraction extends Interaction {
|
|
180
|
-
private rawResponse;
|
|
181
|
-
constructor();
|
|
182
|
-
data: string;
|
|
183
|
-
baseItemUrl: string;
|
|
184
|
-
baseRefUrl: string;
|
|
185
|
-
id: string;
|
|
186
|
-
private _errorMessage;
|
|
187
|
-
manifest: {
|
|
188
|
-
script: string[];
|
|
189
|
-
style: string[];
|
|
190
|
-
media: string[];
|
|
191
|
-
};
|
|
192
|
-
connectedCallback(): void;
|
|
193
|
-
setupCES(): void;
|
|
194
|
-
private getIFrames;
|
|
195
|
-
private getInnerIFrames;
|
|
196
|
-
private postToWindowAndIframes;
|
|
197
|
-
handlePostMessage(event: MessageEvent): void;
|
|
198
|
-
validate(): boolean;
|
|
199
|
-
get response(): string | string[] | null;
|
|
200
|
-
set response(val: string | string[] | null);
|
|
201
|
-
disconnectedCallback(): void;
|
|
202
|
-
render(): lit_html.TemplateResult<1>;
|
|
203
|
-
}
|
|
204
|
-
declare global {
|
|
205
|
-
interface HTMLElementTagNameMap {
|
|
206
|
-
'qti-custom-interaction': QtiCustomInteraction;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
declare class QtiEndAttemptInteraction extends LitElement {
|
|
211
|
-
responseIdentifier: any;
|
|
212
|
-
disabled: boolean;
|
|
213
|
-
/** Defines the number of attempts that a user can make using the 'endAttemptInteraction' mechanism (this can be used to limit the number of hints, etc.). [More information](https://www.imsglobal.org/sites/default/files/spec/qti/v3/info/index.html#DataCharacteristic_EndAttemptInteraction.Attr_count-attempt) */
|
|
214
|
-
countAttempt: 'true' | 'false' | null;
|
|
215
|
-
title: string;
|
|
216
|
-
render(): lit_html.TemplateResult<1>;
|
|
217
|
-
endAttempt(_: Event): void;
|
|
218
|
-
}
|
|
219
|
-
declare global {
|
|
220
|
-
interface HTMLElementTagNameMap {
|
|
221
|
-
'qti-end-attempt-interaction': QtiEndAttemptInteraction;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
declare class QtiExtendedTextInteraction extends Interaction {
|
|
226
|
-
static styles: CSSResultGroup;
|
|
227
|
-
protected _rows: number;
|
|
228
|
-
/** expected length is mapped to the property maxlength on the textarea */
|
|
229
|
-
expectedLength: number;
|
|
230
|
-
patternMask: string;
|
|
231
|
-
/** text appearing in the extended-text-interaction if it is empty */
|
|
232
|
-
placeholderText: string;
|
|
233
|
-
dataPatternmaskMessage: string;
|
|
234
|
-
classNames: any;
|
|
235
|
-
handleclassNamesChange(_: any, classes: string): void;
|
|
236
|
-
response: string | null;
|
|
237
|
-
protected _handleResponseChange: () => void;
|
|
238
|
-
get value(): string | null;
|
|
239
|
-
set value(val: string | null);
|
|
240
|
-
validate(): boolean;
|
|
241
|
-
toggleCorrectResponse(): void;
|
|
242
|
-
reportValidity(): boolean;
|
|
243
|
-
render(): lit_html.TemplateResult<1>;
|
|
244
|
-
protected textChanged(event: Event): void;
|
|
245
|
-
protected setEmptyAttribute(text: string): void;
|
|
246
|
-
}
|
|
247
|
-
declare global {
|
|
248
|
-
interface HTMLElementTagNameMap {
|
|
249
|
-
'qti-extended-text-interaction': QtiExtendedTextInteraction;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
declare class QtiGapImg extends LitElement {
|
|
254
|
-
static styles: lit.CSSResult;
|
|
255
|
-
tabindex: number | undefined;
|
|
256
|
-
connectedCallback(): void;
|
|
257
|
-
}
|
|
258
|
-
declare global {
|
|
259
|
-
interface HTMLElementTagNameMap {
|
|
260
|
-
'qti-gap-img': QtiGapImg;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
declare const QtiGapMatchInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
265
|
-
declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
|
|
266
|
-
static styles: CSSResultGroup;
|
|
267
|
-
render(): lit_html.TemplateResult<1>;
|
|
268
|
-
toggleCorrectResponse(show: boolean): void;
|
|
269
|
-
private getMatches;
|
|
270
|
-
toggleCandidateCorrection(show: boolean): void;
|
|
271
|
-
}
|
|
272
|
-
declare global {
|
|
273
|
-
interface HTMLElementTagNameMap {
|
|
274
|
-
'qti-gap-match-interaction': QtiGapMatchInteraction;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
declare const QtiGapText_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
279
|
-
declare class QtiGapText extends QtiGapText_base {
|
|
280
|
-
static styles: lit.CSSResult;
|
|
281
|
-
tabindex: number | undefined;
|
|
282
|
-
connectedCallback(): void;
|
|
283
|
-
render(): lit_html.TemplateResult<1>;
|
|
284
|
-
}
|
|
285
|
-
declare global {
|
|
286
|
-
interface HTMLElementTagNameMap {
|
|
287
|
-
'qti-gap-text': QtiGapText;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
declare class QtiGap extends LitElement {
|
|
292
|
-
static styles: lit.CSSResult;
|
|
293
|
-
tabindex: number | undefined;
|
|
294
|
-
render(): lit_html.TemplateResult<1>;
|
|
295
|
-
}
|
|
296
|
-
declare global {
|
|
297
|
-
interface HTMLElementTagNameMap {
|
|
298
|
-
'qti-gap': QtiGap;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
declare class QtiGraphicAssociateInteraction extends Interaction {
|
|
303
|
-
static styles: CSSResultGroup;
|
|
304
|
-
private hotspots;
|
|
305
|
-
private startPoint;
|
|
306
|
-
private endPoint;
|
|
307
|
-
private _correctLines;
|
|
308
|
-
private startCoord;
|
|
309
|
-
private mouseCoord;
|
|
310
|
-
private grImage;
|
|
311
|
-
private _response;
|
|
312
|
-
constructor();
|
|
313
|
-
reset(): void;
|
|
314
|
-
validate(): boolean;
|
|
315
|
-
set response(val: string[]);
|
|
316
|
-
get response(): string[];
|
|
317
|
-
toggleInternalCorrectResponse(show: boolean): void;
|
|
318
|
-
render(): lit_html.TemplateResult<1>;
|
|
319
|
-
private positionHotspotOnRegister;
|
|
320
|
-
firstUpdated(): void;
|
|
321
|
-
disconnectedCallback(): void;
|
|
322
|
-
}
|
|
323
|
-
declare global {
|
|
324
|
-
interface HTMLElementTagNameMap {
|
|
325
|
-
'qti-graphic-associate-interaction': QtiGraphicAssociateInteraction;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
declare const QtiGraphicGapMatchInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
330
|
-
declare class QtiGraphicGapMatchInteraction extends QtiGraphicGapMatchInteraction_base {
|
|
331
|
-
static styles: CSSResultGroup;
|
|
332
|
-
render(): lit_html.TemplateResult<1>;
|
|
333
|
-
private positionHotspotOnRegister;
|
|
334
|
-
connectedCallback(): void;
|
|
335
|
-
disconnectedCallback(): void;
|
|
336
|
-
}
|
|
337
|
-
declare global {
|
|
338
|
-
interface HTMLElementTagNameMap {
|
|
339
|
-
'qti-graphic-gap-match-interaction': QtiGraphicGapMatchInteraction;
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
declare const QtiGraphicOrderInteraction_base: (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
344
|
-
declare class QtiGraphicOrderInteraction extends QtiGraphicOrderInteraction_base {
|
|
345
|
-
static styles: CSSResultGroup;
|
|
346
|
-
protected choiceOrdering: boolean;
|
|
347
|
-
protected _choiceElements: Choice[];
|
|
348
|
-
render(): lit_html.TemplateResult<1>;
|
|
349
|
-
private setHotspotOrder;
|
|
350
|
-
toggleCorrectResponse(show: boolean): void;
|
|
351
|
-
private positionHotspotOnRegister;
|
|
352
|
-
connectedCallback(): void;
|
|
353
|
-
disconnectedCallback(): void;
|
|
354
|
-
}
|
|
355
|
-
declare global {
|
|
356
|
-
interface HTMLElementTagNameMap {
|
|
357
|
-
'qti-graphic-order-interaction': QtiGraphicOrderInteraction;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
declare const QtiHotspotChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
362
|
-
declare class QtiHotspotChoice extends QtiHotspotChoice_base {
|
|
363
|
-
static styles: lit.CSSResult;
|
|
364
|
-
order: number;
|
|
365
|
-
orderCorrect: number;
|
|
366
|
-
}
|
|
367
|
-
declare global {
|
|
368
|
-
interface HTMLElementTagNameMap {
|
|
369
|
-
'qti-hotspot-choice': QtiHotspotChoice;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
declare const QtiHotspotInteraction_base: (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
374
|
-
declare class QtiHotspotInteraction extends QtiHotspotInteraction_base {
|
|
375
|
-
static styles: CSSResultGroup;
|
|
376
|
-
render(): lit_html.TemplateResult<1>;
|
|
377
|
-
private imageLoadPromise;
|
|
378
|
-
private getImageLoadPromise;
|
|
379
|
-
private positionHotspotOnRegister;
|
|
380
|
-
connectedCallback(): void;
|
|
381
|
-
disconnectedCallback(): void;
|
|
382
|
-
}
|
|
383
|
-
declare global {
|
|
384
|
-
interface HTMLElementTagNameMap {
|
|
385
|
-
'qti-hotspot-interaction': QtiHotspotInteraction;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
declare const QtiHottextInteraction_base: (abstract new (...args: any[]) => ChoicesInterface) & typeof Interaction;
|
|
390
|
-
declare class QtiHottextInteraction extends QtiHottextInteraction_base {
|
|
391
|
-
class: string;
|
|
392
|
-
private get classObject();
|
|
393
|
-
render: () => lit_html.TemplateResult<1>;
|
|
394
|
-
connectedCallback(): void;
|
|
395
|
-
updated(_changedProperties: PropertyValues): void;
|
|
396
|
-
private updateHostClasses;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
declare const QtiHottext_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
400
|
-
declare class QtiHottext extends QtiHottext_base {
|
|
401
|
-
static styles: lit.CSSResult;
|
|
402
|
-
render(): lit_html.TemplateResult<1>;
|
|
403
|
-
}
|
|
404
|
-
declare global {
|
|
405
|
-
interface HTMLElementTagNameMap {
|
|
406
|
-
'qti-hottext': QtiHottext;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
interface OptionType {
|
|
411
|
-
textContent: string;
|
|
412
|
-
value: string;
|
|
413
|
-
selected: boolean;
|
|
414
|
-
}
|
|
415
|
-
declare class QtiInlineChoiceInteraction extends Interaction {
|
|
416
|
-
get isInline(): boolean;
|
|
417
|
-
static get styles(): lit.CSSResult[];
|
|
418
|
-
static inputWidthClass: string[];
|
|
419
|
-
protected options: OptionType[];
|
|
420
|
-
protected correctOption: string;
|
|
421
|
-
dataPrompt: string;
|
|
422
|
-
configContext: ConfigContext;
|
|
423
|
-
render(): lit_html.TemplateResult<1>;
|
|
424
|
-
connectedCallback(): void;
|
|
425
|
-
disconnectedCallback(): void;
|
|
426
|
-
willUpdate(changed: PropertyValues<this>): void;
|
|
427
|
-
private _updateOptions;
|
|
428
|
-
validate(): boolean;
|
|
429
|
-
reset(): void;
|
|
430
|
-
set response(value: string | null);
|
|
431
|
-
get response(): string | null;
|
|
432
|
-
toggleInternalCorrectResponse(show: boolean): void;
|
|
433
|
-
protected choiceSelected(event: Event): void;
|
|
434
|
-
}
|
|
435
|
-
declare global {
|
|
436
|
-
interface HTMLElementTagNameMap {
|
|
437
|
-
'qti-inline-choice-interaction': QtiInlineChoiceInteraction;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
declare class QtiInlineChoice extends LitElement {
|
|
442
|
-
static get styles(): lit.CSSResult[];
|
|
443
|
-
identifier: string;
|
|
444
|
-
connectedCallback(): void;
|
|
445
|
-
disconnectedCallback(): void;
|
|
446
|
-
render(): lit_html.TemplateResult<1>;
|
|
447
|
-
private _onSelectInlineChoice;
|
|
448
|
-
}
|
|
449
|
-
declare global {
|
|
450
|
-
interface HTMLElementTagNameMap {
|
|
451
|
-
'qti-inline-choice': QtiInlineChoice;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
declare const QtiSimpleAssociableChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
456
|
-
declare class QtiSimpleAssociableChoice extends QtiSimpleAssociableChoice_base {
|
|
457
|
-
static styles: lit.CSSResult;
|
|
458
|
-
/** the minimal number of selections a candidate must make */
|
|
459
|
-
matchMin: number;
|
|
460
|
-
/** the maximum number of selections a candidate must make, the other options will be disabled when max options is checked */
|
|
461
|
-
matchMax: number;
|
|
462
|
-
fixed: boolean;
|
|
463
|
-
connectedCallback(): void;
|
|
464
|
-
render(): lit_html.TemplateResult<1>;
|
|
465
|
-
}
|
|
466
|
-
declare global {
|
|
467
|
-
interface HTMLElementTagNameMap {
|
|
468
|
-
'qti-simple-associable-choice': QtiSimpleAssociableChoice;
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
declare const QtiMatchInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
473
|
-
declare class QtiMatchInteraction extends QtiMatchInteraction_base {
|
|
474
|
-
static styles: CSSResultGroup;
|
|
475
|
-
protected sourceChoices: QtiSimpleAssociableChoice[];
|
|
476
|
-
protected targetChoices: QtiSimpleAssociableChoice[];
|
|
477
|
-
protected lastCheckedRadio: HTMLInputElement | null;
|
|
478
|
-
class: string;
|
|
479
|
-
protected _response: string | string[];
|
|
480
|
-
get response(): string[];
|
|
481
|
-
set response(val: string[]);
|
|
482
|
-
responseIdentifier: string;
|
|
483
|
-
protected correctOptions: {
|
|
484
|
-
source: string;
|
|
485
|
-
target: string;
|
|
486
|
-
}[];
|
|
487
|
-
connectedCallback(): Promise<void>;
|
|
488
|
-
protected handleRadioClick: (e: any) => void;
|
|
489
|
-
protected handleRadioChange: (e: any) => void;
|
|
490
|
-
validate(): boolean;
|
|
491
|
-
private getMatches;
|
|
492
|
-
toggleInternalCorrectResponse(show: boolean): void;
|
|
493
|
-
toggleCandidateCorrection(show: boolean): void;
|
|
494
|
-
render(): lit_html.TemplateResult<1>;
|
|
495
|
-
}
|
|
496
|
-
declare global {
|
|
497
|
-
interface HTMLElementTagNameMap {
|
|
498
|
-
'qti-match-interaction': QtiMatchInteraction;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
declare class QtiMediaInteraction extends Interaction {
|
|
503
|
-
private _value;
|
|
504
|
-
reset(): void;
|
|
505
|
-
validate(): boolean;
|
|
506
|
-
get response(): string | null;
|
|
507
|
-
set response(val: string | null);
|
|
508
|
-
static get properties(): {
|
|
509
|
-
step: {
|
|
510
|
-
type: NumberConstructor;
|
|
511
|
-
attribute: string;
|
|
512
|
-
default: number;
|
|
513
|
-
};
|
|
514
|
-
};
|
|
515
|
-
static styles: lit.CSSResult[];
|
|
516
|
-
render(): lit_html.TemplateResult<1>;
|
|
517
|
-
constructor();
|
|
518
|
-
connectedCallback(): void;
|
|
519
|
-
}
|
|
520
|
-
declare global {
|
|
521
|
-
interface HTMLElementTagNameMap {
|
|
522
|
-
'qti-media-interaction': QtiMediaInteraction;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
declare const QtiOrderInteraction_base: (abstract new (...args: any[]) => IInteraction) & typeof Interaction;
|
|
527
|
-
declare class QtiOrderInteraction extends QtiOrderInteraction_base {
|
|
528
|
-
static styles: lit.CSSResult;
|
|
529
|
-
protected childrenMap: Element[];
|
|
530
|
-
protected nrChoices: number;
|
|
531
|
-
correctResponses: string[];
|
|
532
|
-
showCorrectResponses: boolean;
|
|
533
|
-
/** orientation of choices */
|
|
534
|
-
orientation: 'horizontal' | 'vertical';
|
|
535
|
-
render(): lit_html.TemplateResult<1>;
|
|
536
|
-
toggleCorrectResponse(show: boolean): void;
|
|
537
|
-
getValue(val: string[]): string[];
|
|
538
|
-
protected getResponse(): string[];
|
|
539
|
-
firstUpdated(changedProps: any): Promise<void>;
|
|
540
|
-
}
|
|
541
|
-
declare global {
|
|
542
|
-
interface HTMLElementTagNameMap {
|
|
543
|
-
'qti-order-interaction': QtiOrderInteraction;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
interface PciReadyPayload {
|
|
548
|
-
responseIdentifier: string;
|
|
549
|
-
status: 'interacting' | 'suspended' | 'closed' | 'solution' | 'review';
|
|
550
|
-
}
|
|
551
|
-
interface PciDonePayload {
|
|
552
|
-
responseIdentifier: string;
|
|
553
|
-
status: 'interacting' | 'suspended' | 'closed' | 'solution' | 'review';
|
|
554
|
-
outcome?: unknown;
|
|
555
|
-
}
|
|
556
|
-
interface ConfigProperties<T> {
|
|
557
|
-
properties: T;
|
|
558
|
-
templateVariables: Record<string, unknown>;
|
|
559
|
-
contextVariables: Record<string, unknown>;
|
|
560
|
-
boundTo: unknown;
|
|
561
|
-
responseIdentifier: string;
|
|
562
|
-
onready: (payload: PciReadyPayload) => void;
|
|
563
|
-
ondone?: (payload: PciDonePayload) => void;
|
|
564
|
-
status?: 'interacting' | 'suspended' | 'closed' | 'solution' | 'review';
|
|
565
|
-
}
|
|
566
|
-
interface IMSpci<T> {
|
|
567
|
-
typeIdentifier: string;
|
|
568
|
-
/** @access public
|
|
569
|
-
* @method getInstance Create a new instance of this portable custom interaction
|
|
570
|
-
* Will be called by the qtiCustomInteractionContext
|
|
571
|
-
* @param {DOM Element} dom - the DOM Element this PCI is being added to
|
|
572
|
-
* @param {Object} configuration - the configuration to apply to this PCI
|
|
573
|
-
* @param {String} state - a previous saved state to apply to this instance.
|
|
574
|
-
* This must have been obtained from a prior call to getState on an
|
|
575
|
-
* instance of this type (same typeIdentifier)
|
|
576
|
-
*/
|
|
577
|
-
getInstance: (dom: HTMLElement, configuration: Configuration<T>, state: string) => void;
|
|
578
|
-
/** @access public
|
|
579
|
-
* @method getResponse
|
|
580
|
-
* @return {Object} - the value to assign to the bound QTI response variable
|
|
581
|
-
*/
|
|
582
|
-
getResponse: () => QtiVariableJSON | undefined;
|
|
583
|
-
/** @access public
|
|
584
|
-
* @method setResponse
|
|
585
|
-
* @param {Object} value - the value to assign to the bound QTI response variable
|
|
586
|
-
* NOTE: This is not an official QTI method, so no guarantee it is implemented
|
|
587
|
-
* in all PCIs.
|
|
588
|
-
*/
|
|
589
|
-
setResponse: (value: QtiVariableJSON) => void;
|
|
590
|
-
/** @access public
|
|
591
|
-
* @method getState
|
|
592
|
-
* @return {String} The current state of this PCI. May be passed to
|
|
593
|
-
* getInstance to later restore this PCI instance.
|
|
594
|
-
*/
|
|
595
|
-
getState: () => string;
|
|
596
|
-
oncompleted?: () => void;
|
|
597
|
-
destroy?: () => void;
|
|
598
|
-
}
|
|
599
|
-
declare type Configuration<T> = {
|
|
600
|
-
onready: (pci: IMSpci<ConfigProperties<T>>, state?: string) => void;
|
|
601
|
-
properties: T;
|
|
602
|
-
};
|
|
603
|
-
type QtiFileData = {
|
|
604
|
-
data: string;
|
|
605
|
-
mime: string;
|
|
606
|
-
name?: string;
|
|
607
|
-
};
|
|
608
|
-
type QtiBaseBoolean = boolean;
|
|
609
|
-
type QtiBaseInteger = number;
|
|
610
|
-
type QtiBaseFloat = number;
|
|
611
|
-
type QtiBaseString = string;
|
|
612
|
-
type QtiBasePoint = [number, number];
|
|
613
|
-
type QtiBasePair = [string, string];
|
|
614
|
-
type QtiBaseDirectedPair = [string, string];
|
|
615
|
-
type QtiBaseDuration = string;
|
|
616
|
-
type QtiBaseFile = QtiFileData;
|
|
617
|
-
type QtiBaseUri = string;
|
|
618
|
-
type QtiBaseIntOrIdentifier = number | string;
|
|
619
|
-
type QtiBaseIdentifier = string;
|
|
620
|
-
type QtiRecordItem = {
|
|
621
|
-
name: string;
|
|
622
|
-
base?: QtiBaseTypeJSON | null;
|
|
623
|
-
list?: QtiListTypeJSON | null;
|
|
624
|
-
};
|
|
625
|
-
type ResponseVariableType = QtiVariableJSON;
|
|
626
|
-
type QtiBaseTypeJSON = {
|
|
627
|
-
boolean?: QtiBaseBoolean;
|
|
628
|
-
integer?: QtiBaseInteger;
|
|
629
|
-
float?: QtiBaseFloat;
|
|
630
|
-
string?: QtiBaseString;
|
|
631
|
-
point?: QtiBasePoint;
|
|
632
|
-
pair?: QtiBasePair;
|
|
633
|
-
directedPair?: QtiBaseDirectedPair;
|
|
634
|
-
duration?: QtiBaseDuration;
|
|
635
|
-
file?: QtiBaseFile;
|
|
636
|
-
uri?: QtiBaseUri;
|
|
637
|
-
intOrIdentifier?: QtiBaseIntOrIdentifier;
|
|
638
|
-
identifier?: QtiBaseIdentifier;
|
|
639
|
-
} | null;
|
|
640
|
-
type QtiListTypeJSON = {
|
|
641
|
-
boolean?: QtiBaseBoolean[];
|
|
642
|
-
integer?: QtiBaseInteger[];
|
|
643
|
-
float?: QtiBaseFloat[];
|
|
644
|
-
string?: QtiBaseString[];
|
|
645
|
-
point?: QtiBasePoint[];
|
|
646
|
-
pair?: QtiBasePair[];
|
|
647
|
-
directedPair?: QtiBaseDirectedPair[];
|
|
648
|
-
duration?: QtiBaseDuration[];
|
|
649
|
-
file?: QtiBaseFile[];
|
|
650
|
-
uri?: QtiBaseUri[];
|
|
651
|
-
intOrIdentifier?: QtiBaseIntOrIdentifier[];
|
|
652
|
-
identifier?: QtiBaseIdentifier[];
|
|
653
|
-
} | null;
|
|
654
|
-
declare type QtiVariableJSON = {
|
|
655
|
-
base?: QtiBaseTypeJSON;
|
|
656
|
-
list?: QtiListTypeJSON;
|
|
657
|
-
record?: QtiRecordItem[] | null;
|
|
658
|
-
};
|
|
659
|
-
interface ModuleResolutionConfig {
|
|
660
|
-
waitSeconds?: number;
|
|
661
|
-
context?: string;
|
|
662
|
-
catchError?: boolean;
|
|
663
|
-
paths: {
|
|
664
|
-
[key: string]: string | string[];
|
|
665
|
-
};
|
|
666
|
-
shim?: {
|
|
667
|
-
[key: string]: {
|
|
668
|
-
deps?: string[];
|
|
669
|
-
exports?: string;
|
|
670
|
-
};
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
declare class QtiPortableCustomInteraction extends Interaction {
|
|
675
|
-
private _value;
|
|
676
|
-
private pci;
|
|
677
|
-
protected _iframeLoaded: boolean;
|
|
678
|
-
protected _pendingMessages: Array<{
|
|
679
|
-
method: string;
|
|
680
|
-
params: any;
|
|
681
|
-
}>;
|
|
682
|
-
protected iframe: HTMLIFrameElement;
|
|
683
|
-
private _responseCheckInterval;
|
|
684
|
-
static styles: CSSResultGroup;
|
|
685
|
-
module: string;
|
|
686
|
-
customInteractionTypeIdentifier: string;
|
|
687
|
-
requirePathsJson: string;
|
|
688
|
-
requireShimJson: string;
|
|
689
|
-
requireJsUrl: string;
|
|
690
|
-
baseUrl: string;
|
|
691
|
-
useIframe: boolean;
|
|
692
|
-
useDefaultShims: boolean;
|
|
693
|
-
useDefaultPaths: boolean;
|
|
694
|
-
private _errorMessage;
|
|
695
|
-
protected context?: ItemContext;
|
|
696
|
-
response: string | string[];
|
|
697
|
-
private dom;
|
|
698
|
-
private _parsedRequirePaths;
|
|
699
|
-
private _parsedRequireShim;
|
|
700
|
-
/**
|
|
701
|
-
* Parse the require paths JSON string into an object
|
|
702
|
-
*/
|
|
703
|
-
private getRequirePaths;
|
|
704
|
-
/**
|
|
705
|
-
* Parse the require shim JSON string into an object
|
|
706
|
-
*/
|
|
707
|
-
private getRequireShim;
|
|
708
|
-
/**
|
|
709
|
-
* Get the default require paths
|
|
710
|
-
*/
|
|
711
|
-
private getDefaultRequirePaths;
|
|
712
|
-
/**
|
|
713
|
-
* Get the default require shim
|
|
714
|
-
*/
|
|
715
|
-
private getDefaultRequireShim;
|
|
716
|
-
/**
|
|
717
|
-
* Get the final require paths by combining defaults with user-provided paths
|
|
718
|
-
*/
|
|
719
|
-
private getFinalRequirePaths;
|
|
720
|
-
/**
|
|
721
|
-
* Get the final require shim by combining defaults with user-provided shim
|
|
722
|
-
*/
|
|
723
|
-
private getFinalRequireShim;
|
|
724
|
-
/**
|
|
725
|
-
* Converts QtiVariableJSON to a string or string array
|
|
726
|
-
*/
|
|
727
|
-
private convertQtiVariableJSON;
|
|
728
|
-
/**
|
|
729
|
-
* Adds hyphenated versions of camelCase keys to properties object
|
|
730
|
-
*/
|
|
731
|
-
private addHyphenatedKeys;
|
|
732
|
-
/**
|
|
733
|
-
* Converts response variables to QtiVariableJSON
|
|
734
|
-
*/
|
|
735
|
-
protected responseVariablesToQtiVariableJSON(input: string | string[], cardinality: Cardinality, baseType: BaseType): QtiVariableJSON;
|
|
736
|
-
validate(): boolean;
|
|
737
|
-
set value(v: string | null);
|
|
738
|
-
get value(): string | null;
|
|
739
|
-
set boundTo(newValue: Record<string, ResponseVariableType>);
|
|
740
|
-
get boundTo(): Record<string, QtiVariableJSON>;
|
|
741
|
-
/**
|
|
742
|
-
* Unescape HTML entities in a string
|
|
743
|
-
*/
|
|
744
|
-
private unescapeHtml;
|
|
745
|
-
/**
|
|
746
|
-
* Unescape HTML entities in all values of an object
|
|
747
|
-
*/
|
|
748
|
-
private unescapeDataAttributes;
|
|
749
|
-
/**
|
|
750
|
-
* DIRECT MODE: Register PCI instance
|
|
751
|
-
*/
|
|
752
|
-
register(pci: IMSpci<ConfigProperties<unknown>>): void;
|
|
753
|
-
disconnectedCallback(): void;
|
|
754
|
-
/**
|
|
755
|
-
* IFRAME MODE: Send message to iframe
|
|
756
|
-
*/
|
|
757
|
-
protected sendMessageToIframe(method: string, params: any): void;
|
|
758
|
-
/**
|
|
759
|
-
* IFRAME MODE: Process pending messages
|
|
760
|
-
*/
|
|
761
|
-
private processPendingMessages;
|
|
762
|
-
/**
|
|
763
|
-
* IFRAME MODE: Handle iframe messages
|
|
764
|
-
*/
|
|
765
|
-
protected handleIframeMessage: (event: MessageEvent) => void;
|
|
766
|
-
/**
|
|
767
|
-
* IFRAME MODE: Create iframe element
|
|
768
|
-
*/
|
|
769
|
-
protected createIframe(): void;
|
|
770
|
-
/**
|
|
771
|
-
* IFRAME MODE: Send initialization data to iframe
|
|
772
|
-
*/
|
|
773
|
-
private sendIframeInitData;
|
|
774
|
-
/**
|
|
775
|
-
* IFRAME MODE: Get interaction modules from DOM
|
|
776
|
-
*/
|
|
777
|
-
private getInteractionModules;
|
|
778
|
-
/**
|
|
779
|
-
* IFRAME MODE: Add markup and properties to iframe
|
|
780
|
-
*/
|
|
781
|
-
private addMarkupToIframe;
|
|
782
|
-
/**
|
|
783
|
-
* IFRAME MODE: Initialize the interaction
|
|
784
|
-
*/
|
|
785
|
-
private initializeInteraction;
|
|
786
|
-
connectedCallback(): void;
|
|
787
|
-
/**
|
|
788
|
-
* Stop checking for response changes
|
|
789
|
-
*/
|
|
790
|
-
private stopResponseCheck;
|
|
791
|
-
private _onInteractionChanged;
|
|
792
|
-
/**
|
|
793
|
-
* DIRECT MODE: Build RequireJS configuration
|
|
794
|
-
*/
|
|
795
|
-
buildRequireConfig(): ModuleResolutionConfig;
|
|
796
|
-
/**
|
|
797
|
-
* DIRECT MODE: Helper method to combine require paths
|
|
798
|
-
*/
|
|
799
|
-
private combineRequireResolvePaths;
|
|
800
|
-
/**
|
|
801
|
-
* DIRECT MODE: Helper method to remove double slashes
|
|
802
|
-
*/
|
|
803
|
-
private removeDoubleSlashes;
|
|
804
|
-
/**
|
|
805
|
-
* DIRECT MODE: Load config from URL
|
|
806
|
-
*/
|
|
807
|
-
loadConfig: (url: string, baseUrl?: string) => Promise<ModuleResolutionConfig>;
|
|
808
|
-
/**
|
|
809
|
-
* DIRECT MODE: Helper method to get resolvable path string
|
|
810
|
-
*/
|
|
811
|
-
getResolvablePathString: (path: string, basePath?: string) => string;
|
|
812
|
-
/**
|
|
813
|
-
* DIRECT MODE: Helper method to get resolvable path
|
|
814
|
-
*/
|
|
815
|
-
getResolvablePath: (path: string | string[], basePath?: string) => string | string[];
|
|
816
|
-
/**
|
|
817
|
-
* IFRAME MODE: Generate iframe HTML content
|
|
818
|
-
*/
|
|
819
|
-
protected generateIframeContent(): string;
|
|
820
|
-
/**
|
|
821
|
-
* Toggle the display of the correct response
|
|
822
|
-
* @param responseVariable The response variable containing the correct response
|
|
823
|
-
* @param show Whether to show or hide the correct response
|
|
824
|
-
*/
|
|
825
|
-
toggleInternalCorrectResponse(show: boolean): void;
|
|
826
|
-
/**
|
|
827
|
-
* Method to disable the PCI for review mode
|
|
828
|
-
* This can be used when showing the correct response
|
|
829
|
-
*/
|
|
830
|
-
disable(): void;
|
|
831
|
-
/**
|
|
832
|
-
* Method to enable the PCI for interactive mode
|
|
833
|
-
*/
|
|
834
|
-
enable(): void;
|
|
835
|
-
private _previousState;
|
|
836
|
-
render(): lit_html.TemplateResult<1>;
|
|
837
|
-
}
|
|
838
|
-
declare global {
|
|
839
|
-
interface HTMLElementTagNameMap {
|
|
840
|
-
'qti-portable-custom-interaction': QtiPortableCustomInteraction;
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
|
|
844
|
-
declare class QtiPositionObjectInteraction extends LitElement {
|
|
845
|
-
render(): lit_html.TemplateResult<1>;
|
|
846
|
-
static styles: lit.CSSResult[];
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
declare class QtiPositionObjectStage extends LitElement {
|
|
850
|
-
choiceOrdering: boolean;
|
|
851
|
-
startX: any;
|
|
852
|
-
startY: any;
|
|
853
|
-
dragElement: any;
|
|
854
|
-
render(): lit_html.TemplateResult<1>;
|
|
855
|
-
static styles: lit.CSSResult[];
|
|
856
|
-
constructor();
|
|
857
|
-
dragElementHandler(event: any): void;
|
|
858
|
-
firstUpdated(a: any): void;
|
|
859
|
-
removeMoveListener(): void;
|
|
860
|
-
disconnectedCallback(): void;
|
|
861
|
-
}
|
|
862
|
-
declare global {
|
|
863
|
-
interface HTMLElementTagNameMap {
|
|
864
|
-
'qti-position-object-stage': QtiPositionObjectStage;
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
declare class QtiSelectPointInteraction extends Interaction {
|
|
869
|
-
static styles: lit.CSSResult[];
|
|
870
|
-
maxChoices: number;
|
|
871
|
-
minChoices: number;
|
|
872
|
-
response: string[] | null;
|
|
873
|
-
private _correctAreas;
|
|
874
|
-
private _responseCorrection;
|
|
875
|
-
private _imgElement;
|
|
876
|
-
private _scaleX;
|
|
877
|
-
private _scaleY;
|
|
878
|
-
private _imageWidthOriginal;
|
|
879
|
-
private _imageHeightOriginal;
|
|
880
|
-
private _onImageClick;
|
|
881
|
-
connectedCallback(): void;
|
|
882
|
-
private _onResize;
|
|
883
|
-
get responsePoints(): {
|
|
884
|
-
x: number;
|
|
885
|
-
y: number;
|
|
886
|
-
}[];
|
|
887
|
-
toggleCandidateCorrection(show: boolean): void;
|
|
888
|
-
toggleCorrectResponse(show: boolean): any;
|
|
889
|
-
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
890
|
-
render(): lit_html.TemplateResult<1>;
|
|
891
|
-
validate(): boolean;
|
|
892
|
-
private calculateScale;
|
|
893
|
-
firstUpdated(): void;
|
|
894
|
-
disconnectedCallback(): void;
|
|
895
|
-
}
|
|
896
|
-
declare global {
|
|
897
|
-
interface HTMLElementTagNameMap {
|
|
898
|
-
'qti-select-point-interaction': QtiSelectPointInteraction;
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
declare const QtiSimpleChoice_base: (abstract new (...args: any[]) => ActiveElementMixinInterface) & typeof LitElement;
|
|
903
|
-
/**
|
|
904
|
-
* qti-order-interaction
|
|
905
|
-
* qti-choice-interaction
|
|
906
|
-
*/
|
|
907
|
-
declare class QtiSimpleChoice extends QtiSimpleChoice_base {
|
|
908
|
-
templateIdentifier: string | null;
|
|
909
|
-
showHide: string | null;
|
|
910
|
-
fixed: boolean;
|
|
911
|
-
static styles: lit.CSSResult;
|
|
912
|
-
marker: string;
|
|
913
|
-
get checked(): boolean;
|
|
914
|
-
render(): lit_html.TemplateResult<1>;
|
|
915
|
-
}
|
|
916
|
-
declare global {
|
|
917
|
-
interface HTMLElementTagNameMap {
|
|
918
|
-
'qti-simple-choice': QtiSimpleChoice;
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
declare class QtiSliderInteraction extends Interaction {
|
|
923
|
-
static styles: CSSResultGroup;
|
|
924
|
-
private _value;
|
|
925
|
-
private _correctResponseNumber;
|
|
926
|
-
private _rail;
|
|
927
|
-
min: number;
|
|
928
|
-
max: number;
|
|
929
|
-
step: number;
|
|
930
|
-
validate(): boolean;
|
|
931
|
-
connectedCallback(): void;
|
|
932
|
-
get response(): string;
|
|
933
|
-
set response(val: string);
|
|
934
|
-
toggleCorrectResponse(show: boolean): void;
|
|
935
|
-
private _updateValue;
|
|
936
|
-
render(): lit_html.TemplateResult<1>;
|
|
937
|
-
private _onMouseDown;
|
|
938
|
-
private _onTouchStart;
|
|
939
|
-
private _startDrag;
|
|
940
|
-
private _onDrag;
|
|
941
|
-
private _onDragEnd;
|
|
942
|
-
}
|
|
943
|
-
declare global {
|
|
944
|
-
interface HTMLElementTagNameMap {
|
|
945
|
-
'qti-slider-interaction': QtiSliderInteraction;
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
declare class QtiTextEntryInteraction extends Interaction {
|
|
950
|
-
static styles: CSSResultGroup;
|
|
951
|
-
inputRef: lit_html_directives_ref_js.Ref<HTMLInputElement>;
|
|
952
|
-
expectedLength: number;
|
|
953
|
-
patternMask: string;
|
|
954
|
-
placeholderText: string;
|
|
955
|
-
dataPatternmaskMessage: string;
|
|
956
|
-
response: string | null;
|
|
957
|
-
private _input;
|
|
958
|
-
protected _handleValueChange: () => void;
|
|
959
|
-
get value(): string | null;
|
|
960
|
-
set value(val: string | null);
|
|
961
|
-
get correctness(): Readonly<Correctness | null>;
|
|
962
|
-
get isInline(): boolean;
|
|
963
|
-
validate(): boolean;
|
|
964
|
-
toggleInternalCorrectResponse(show: boolean): void;
|
|
965
|
-
render(): lit_html.TemplateResult<1>;
|
|
966
|
-
protected textChanged(event: Event): void;
|
|
967
|
-
reportValidity(): boolean;
|
|
968
|
-
reset(): void;
|
|
969
|
-
private setEmptyAttribute;
|
|
970
|
-
}
|
|
971
|
-
declare global {
|
|
972
|
-
interface HTMLElementTagNameMap {
|
|
973
|
-
'qti-text-entry-interaction': QtiTextEntryInteraction;
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
declare class QtiUploadInteraction extends Interaction {
|
|
978
|
-
private _file;
|
|
979
|
-
private _base64;
|
|
980
|
-
reset(): void;
|
|
981
|
-
validate(): boolean;
|
|
982
|
-
get response(): string | null;
|
|
983
|
-
set response(base64: string | null);
|
|
984
|
-
static get properties(): {
|
|
985
|
-
[key: string]: lit.PropertyDeclaration<unknown, unknown>;
|
|
986
|
-
};
|
|
987
|
-
static styles: lit.CSSResult[];
|
|
988
|
-
render(): lit_html.TemplateResult<1>;
|
|
989
|
-
private _onFileChange;
|
|
990
|
-
private _convertToBase64;
|
|
991
|
-
}
|
|
992
|
-
declare global {
|
|
993
|
-
interface HTMLElementTagNameMap {
|
|
994
|
-
'qti-upload-interaction': QtiUploadInteraction;
|
|
995
|
-
}
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
/**
|
|
999
|
-
* @summary The qti-item-body node contains the text, graphics, media objects and interactions that describe the item's content and information about how it is structured.
|
|
1000
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.sphpo6lu6zqi
|
|
1001
|
-
* @status stable
|
|
1002
|
-
* @since 4.0
|
|
1003
|
-
*
|
|
1004
|
-
* @slot - item body content.
|
|
1005
|
-
* @slot qti-rubric-block - the qti rubric block is placed above the item
|
|
1006
|
-
* @part qti-rubric-block - the qti rubric block part
|
|
1007
|
-
*/
|
|
1008
|
-
declare class QtiItemBody extends LitElement {
|
|
1009
|
-
static styles: CSSResultGroup;
|
|
1010
|
-
render(): lit_html.TemplateResult<1>;
|
|
1011
|
-
}
|
|
1012
|
-
declare global {
|
|
1013
|
-
interface HTMLElementTagNameMap {
|
|
1014
|
-
'qti-item-body': QtiItemBody;
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
declare class QtiRule extends LitElement implements QtiRuleBase {
|
|
1019
|
-
render(): lit_html.TemplateResult<1>;
|
|
1020
|
-
process(): void;
|
|
1021
|
-
}
|
|
1022
|
-
interface QtiRuleBase {
|
|
1023
|
-
process(): any;
|
|
1024
|
-
}
|
|
1025
|
-
declare global {
|
|
1026
|
-
interface HTMLElementTagNameMap {
|
|
1027
|
-
'qti-rule': QtiRule;
|
|
1028
|
-
}
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
declare class QtiOutcomeProcessing extends LitElement {
|
|
1032
|
-
static styles: lit.CSSResult[];
|
|
1033
|
-
render(): lit_html.TemplateResult<1>;
|
|
1034
|
-
process(): void;
|
|
1035
|
-
}
|
|
1036
|
-
declare global {
|
|
1037
|
-
interface HTMLElementTagNameMap {
|
|
1038
|
-
'qti-outcome-processing': QtiOutcomeProcessing;
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
1041
|
-
declare class QtiOutcomeProcessingProcessor {
|
|
1042
|
-
process(rules: QtiRuleBase[]): void;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
declare class QtiPrompt extends LitElement {
|
|
1046
|
-
render(): lit_html.TemplateResult<1>;
|
|
1047
|
-
connectedCallback(): void;
|
|
1048
|
-
}
|
|
1049
|
-
declare global {
|
|
1050
|
-
interface HTMLElementTagNameMap {
|
|
1051
|
-
'qti-prompt': QtiPrompt;
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
|
|
1055
|
-
declare class QtiResponseProcessing extends LitElement {
|
|
1056
|
-
static styles: lit.CSSResult[];
|
|
1057
|
-
render(): lit_html.TemplateResult<1>;
|
|
1058
|
-
process(): void;
|
|
1059
|
-
firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
1060
|
-
private fragmentFromString;
|
|
1061
|
-
}
|
|
1062
|
-
declare global {
|
|
1063
|
-
interface HTMLElementTagNameMap {
|
|
1064
|
-
'qti-response-processing': QtiResponseProcessing;
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
|
|
1068
|
-
/**
|
|
1069
|
-
* The lookupOutcomeValue rule sets the value of an outcome variable to the value obtained
|
|
1070
|
-
* by looking up the value of the associated expression in the lookupTable associated
|
|
1071
|
-
* with the outcome's declaration.
|
|
1072
|
-
*/
|
|
1073
|
-
declare class QtiLookupOutcomeValue extends QtiRule {
|
|
1074
|
-
identifier: string;
|
|
1075
|
-
protected context?: ItemContext;
|
|
1076
|
-
get childExpression(): QtiExpression<string>;
|
|
1077
|
-
process(): number;
|
|
1078
|
-
}
|
|
1079
|
-
declare global {
|
|
1080
|
-
interface HTMLElementTagNameMap {
|
|
1081
|
-
'qti-lookup-outcome-value': QtiLookupOutcomeValue;
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
declare class QtiResponseCondition extends QtiRule {
|
|
1086
|
-
render(): lit_html.TemplateResult<1>;
|
|
1087
|
-
process(): void;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/**
|
|
1091
|
-
* Web component that processes `setOutcomeValue` in QTI.
|
|
1092
|
-
*/
|
|
1093
|
-
declare class QtiSetOutcomeValue extends QtiRule {
|
|
1094
|
-
/**
|
|
1095
|
-
* Processes the QTI rule and dispatches a custom event with the computed outcome value.
|
|
1096
|
-
*/
|
|
1097
|
-
process(): void;
|
|
1098
|
-
/**
|
|
1099
|
-
* Formats the computed value before dispatching.
|
|
1100
|
-
* Ensures numbers are converted to a universal format.
|
|
1101
|
-
*/
|
|
1102
|
-
private formatValue;
|
|
1103
|
-
}
|
|
1104
|
-
/**
|
|
1105
|
-
* Encapsulates the logic for processing QTI setOutcomeValue expressions.
|
|
1106
|
-
*/
|
|
1107
|
-
declare class QtiSetOutcomeValueRule<T> implements QtiRuleBase {
|
|
1108
|
-
private expression;
|
|
1109
|
-
constructor(expression: QtiExpressionBase<T>);
|
|
1110
|
-
/**
|
|
1111
|
-
* Evaluates the expression and returns its value.
|
|
1112
|
-
*/
|
|
1113
|
-
process(): string | string[] | null;
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
declare class QtiResponseElse extends LitElement {
|
|
1117
|
-
render(): lit_html.TemplateResult<1>;
|
|
1118
|
-
calculate(): boolean;
|
|
1119
|
-
getSubRules(): QtiRule[];
|
|
1120
|
-
process(): void;
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1123
|
-
declare class QtiResponseIf extends QtiResponseElse {
|
|
1124
|
-
calculate(): boolean;
|
|
1125
|
-
getSubRules(): QtiRule[];
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
declare class QtiResponseElseIf extends QtiResponseIf {
|
|
1129
|
-
render(): lit_html.TemplateResult<1>;
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
type Constructor$1<T> = new (...args: any[]) => T;
|
|
1133
|
-
declare const QtiAnd_base: {
|
|
1134
|
-
new (...args: any[]): {
|
|
1135
|
-
calculateChildren(children: Array<MockQtiExpression$1<any>>): boolean;
|
|
1136
|
-
};
|
|
1137
|
-
} & Constructor$1<QtiConditionExpression>;
|
|
1138
|
-
declare class QtiAnd extends QtiAnd_base {
|
|
1139
|
-
calculate(): boolean;
|
|
1140
|
-
}
|
|
1141
|
-
type MockQtiExpression$1<T> = {
|
|
1142
|
-
calculate: () => T;
|
|
1143
|
-
};
|
|
1144
|
-
type MockConstructor$1 = new (...args: any[]) => {};
|
|
1145
|
-
declare function qtiAndMixin<TBase extends MockConstructor$1>(Base: TBase): {
|
|
1146
|
-
new (...args: any[]): {
|
|
1147
|
-
calculateChildren(children: Array<MockQtiExpression$1<any>>): boolean;
|
|
1148
|
-
};
|
|
1149
|
-
} & TBase;
|
|
1150
|
-
|
|
1151
|
-
declare class QtiBaseValue extends QtiExpression<string> {
|
|
1152
|
-
baseType: BaseType;
|
|
1153
|
-
getResult(): string;
|
|
1154
|
-
}
|
|
1155
|
-
|
|
1156
|
-
/**
|
|
1157
|
-
* @summary The qti-container-size operator returns the number of values in a container.
|
|
1158
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.container-size
|
|
1159
|
-
*
|
|
1160
|
-
* Takes a sub-expression with any base-type and either multiple or ordered cardinality.
|
|
1161
|
-
* Returns an integer giving the number of values in the container.
|
|
1162
|
-
* Returns 0 if the sub-expression is NULL.
|
|
1163
|
-
*/
|
|
1164
|
-
declare class QtiContainerSize extends QtiExpression<number> {
|
|
1165
|
-
getResult(): number;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
declare class QtiContains extends QtiConditionExpression {
|
|
1169
|
-
getResult(): boolean;
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
declare class QtiCorrect extends QtiExpression<string | string[]> {
|
|
1173
|
-
get interpretation(): string;
|
|
1174
|
-
getResult(): string | string[];
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
/**
|
|
1178
|
-
* @summary The qti-default expression returns the default value of a declared variable.
|
|
1179
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.default
|
|
1180
|
-
*
|
|
1181
|
-
* Looks up the declaration of an itemVariable and returns the associated defaultValue
|
|
1182
|
-
* or NULL if no default value was declared. Supports item identifier prefixing
|
|
1183
|
-
* for obtaining default values from individual items in outcomes processing.
|
|
1184
|
-
*/
|
|
1185
|
-
declare class QtiDefault extends QtiExpression<any> {
|
|
1186
|
-
identifier: string;
|
|
1187
|
-
protected context?: ItemContext;
|
|
1188
|
-
protected _testContext?: TestContext;
|
|
1189
|
-
getResult(): any;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
declare class QtiEqualRounded extends QtiExpression<boolean> {
|
|
1193
|
-
roundingMode: 'decimalPlaces' | 'significantFigures';
|
|
1194
|
-
get figures(): number;
|
|
1195
|
-
getResult(): boolean;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* @summary The qti-round operator rounds a numerical value to the nearest integer.
|
|
1200
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.round
|
|
1201
|
-
*
|
|
1202
|
-
* Takes a single sub-expression with single cardinality and numerical base-type.
|
|
1203
|
-
* Returns an integer formed by rounding the value using the rule: n for all input
|
|
1204
|
-
* values in the range [n-0.5, n+0.5). For example, 6.8 and 6.5 both round to 7,
|
|
1205
|
-
* 6.49 rounds to 6, and -6.5 rounds to -6.
|
|
1206
|
-
*/
|
|
1207
|
-
declare class QtiRound extends QtiExpression<number | null> {
|
|
1208
|
-
getResult(): number | null;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
/**
|
|
1212
|
-
* @summary The qti-round-to operator rounds a numerical value to specified precision.
|
|
1213
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.round-to
|
|
1214
|
-
*
|
|
1215
|
-
* Takes one sub-expression with single cardinality and numerical base-type.
|
|
1216
|
-
* Returns a single float rounded by the specified method to the specified precision.
|
|
1217
|
-
* Supports rounding to decimal places or significant figures.
|
|
1218
|
-
*/
|
|
1219
|
-
declare class QtiRoundTo extends QtiExpression<number | null> {
|
|
1220
|
-
roundingMode: 'decimalPlaces' | 'significantFigures';
|
|
1221
|
-
figures: number;
|
|
1222
|
-
getResult(): number | null;
|
|
1223
|
-
/**
|
|
1224
|
-
* Round to specified number of decimal places
|
|
1225
|
-
*/
|
|
1226
|
-
private _roundToDecimalPlaces;
|
|
1227
|
-
/**
|
|
1228
|
-
* Round to specified number of significant figures
|
|
1229
|
-
*/
|
|
1230
|
-
private _roundToSignificantFigures;
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
declare class QtiEqual extends QtiExpression<boolean> {
|
|
1234
|
-
toleranceMode: 'exact' | 'relative' | 'absolute';
|
|
1235
|
-
getResult(): boolean;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
/**
|
|
1239
|
-
* @summary The qti-gcd operator calculates the greatest common divisor of integer values.
|
|
1240
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.gcd
|
|
1241
|
-
*
|
|
1242
|
-
* Takes 1 or more sub-expressions with base-type integer and any cardinality.
|
|
1243
|
-
* Returns a single integer equal to the greatest common divisor of all argument values.
|
|
1244
|
-
* Special cases: gcd(0,0)=0, gcd(0,n)=n if n≠0, returns NULL if any argument is NULL or non-numerical.
|
|
1245
|
-
*/
|
|
1246
|
-
declare class QtiGcd extends QtiExpression<number | null> {
|
|
1247
|
-
getResult(): number | null;
|
|
1248
|
-
/**
|
|
1249
|
-
* Calculate the greatest common divisor of an array of integers
|
|
1250
|
-
*/
|
|
1251
|
-
private _calculateGcd;
|
|
1252
|
-
/**
|
|
1253
|
-
* Calculate GCD of two numbers using Euclidean algorithm
|
|
1254
|
-
*/
|
|
1255
|
-
private _gcdTwoNumbers;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
declare class QtiGt extends QtiExpression<boolean> {
|
|
1259
|
-
getResult(): boolean;
|
|
1260
|
-
}
|
|
1261
|
-
|
|
1262
|
-
declare class QtiGte extends QtiConditionExpression {
|
|
1263
|
-
getResult(): boolean;
|
|
1264
|
-
}
|
|
1265
|
-
|
|
1266
|
-
/**
|
|
1267
|
-
* @summary The qti-null expression returns the NULL value.
|
|
1268
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.null
|
|
1269
|
-
*
|
|
1270
|
-
* A simple expression that returns the NULL value. The null value is treated
|
|
1271
|
-
* as if it is of any desired base-type.
|
|
1272
|
-
*/
|
|
1273
|
-
declare class QtiNull extends QtiExpression<null> {
|
|
1274
|
-
getResult(): null;
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
declare class QtiIsNull extends QtiExpression<boolean> {
|
|
1278
|
-
getResult(): boolean;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
declare class QtiFieldValue extends QtiExpression<string | string[]> {
|
|
1282
|
-
getResult(): any;
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
declare class QtiLt extends QtiExpression<boolean> {
|
|
1286
|
-
getResult(): boolean;
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
declare class QtiLte extends QtiConditionExpression {
|
|
1290
|
-
getResult(): boolean;
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
declare class QtiMapResponse extends QtiExpression<number> {
|
|
1294
|
-
identifier: string;
|
|
1295
|
-
getResult(): number;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
declare class QtiMapResponsePoint extends QtiExpression<number> {
|
|
1299
|
-
identifier: string;
|
|
1300
|
-
getResult(): number;
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
/**
|
|
1304
|
-
* @summary The qti-math-operator performs mathematical operations on numerical values.
|
|
1305
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.math-operator
|
|
1306
|
-
*
|
|
1307
|
-
* Takes 1 or more sub-expressions with single cardinality and numerical base-types.
|
|
1308
|
-
* The result is a single float, except for signum, floor and ceil which return integers.
|
|
1309
|
-
* Returns NULL if any argument is NULL or falls outside the function's natural domain.
|
|
1310
|
-
*/
|
|
1311
|
-
declare class QtiMathOperator extends QtiExpression<number | null> {
|
|
1312
|
-
name: string;
|
|
1313
|
-
getResult(): number | null;
|
|
1314
|
-
private _performOperation;
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
declare class QtiMatch extends QtiExpression<boolean> {
|
|
1318
|
-
getResult(): boolean;
|
|
1319
|
-
static match(valueToMap: ResponseVariable, correctValueInfo: ResponseVariable): boolean;
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
declare class QtiMember extends QtiExpression<boolean | null> {
|
|
1323
|
-
getResult(): boolean;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
declare class QtiMultiple extends QtiExpression<VariableDeclaration<string | string[]>[]> {
|
|
1327
|
-
getResult(): ResponseVariable[];
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
declare class QtiNot extends QtiExpression<boolean> {
|
|
1331
|
-
render(): lit_html.TemplateResult<1>;
|
|
1332
|
-
getResult(): boolean;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
declare class QtiOr extends QtiConditionExpression {
|
|
1336
|
-
getResult(): boolean;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
declare class QtiOrdered extends QtiExpression<ResponseVariable[]> {
|
|
1340
|
-
getResult(): ResponseVariable[];
|
|
1341
|
-
}
|
|
1342
|
-
|
|
1343
|
-
/**
|
|
1344
|
-
* @summary The qti-power operator raises the first expression to the power of the second.
|
|
1345
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.power
|
|
1346
|
-
*
|
|
1347
|
-
* Takes 2 sub-expressions with single cardinality and numerical base-types.
|
|
1348
|
-
* Returns a single float corresponding to the first expression raised to the power of the second.
|
|
1349
|
-
* Returns NULL if either expression is NULL or if the result is outside the float value set.
|
|
1350
|
-
*/
|
|
1351
|
-
declare class QtiPower extends QtiExpression<number | null> {
|
|
1352
|
-
getResult(): number | null;
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
declare class QtiPrintedVariable extends LitElement {
|
|
1356
|
-
identifier: string;
|
|
1357
|
-
protected context?: ItemContext;
|
|
1358
|
-
render(): lit_html.TemplateResult<1> | typeof nothing;
|
|
1359
|
-
calculate(): VariableDeclaration<string | string[]>;
|
|
1360
|
-
}
|
|
1361
|
-
|
|
1362
|
-
declare class QtiProduct extends QtiExpression<number> {
|
|
1363
|
-
getResult(): number;
|
|
1364
|
-
}
|
|
1365
|
-
|
|
1366
|
-
type Constructor<T> = new (...args: any[]) => T;
|
|
1367
|
-
declare const QtiSubtract_base: {
|
|
1368
|
-
new (...args: any[]): {
|
|
1369
|
-
calculateChildren(children: Array<MockQtiExpression<any>>): number;
|
|
1370
|
-
};
|
|
1371
|
-
} & Constructor<QtiExpression<number>>;
|
|
1372
|
-
declare class QtiSubtract extends QtiSubtract_base {
|
|
1373
|
-
getResult(): number;
|
|
1374
|
-
}
|
|
1375
|
-
type MockQtiExpression<T> = {
|
|
1376
|
-
calculate: () => T;
|
|
1377
|
-
};
|
|
1378
|
-
type MockConstructor = new (...args: any[]) => {};
|
|
1379
|
-
declare function qtiSubtractMixin<TBase extends MockConstructor>(Base: TBase): {
|
|
1380
|
-
new (...args: any[]): {
|
|
1381
|
-
calculateChildren(children: Array<MockQtiExpression<any>>): number;
|
|
1382
|
-
};
|
|
1383
|
-
} & TBase;
|
|
1384
|
-
|
|
1385
|
-
declare global {
|
|
1386
|
-
interface HTMLElementTagNameMap {
|
|
1387
|
-
'qti-subtract': QtiSubtract;
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
|
|
1391
|
-
declare class QtiStringMatch extends QtiExpression<boolean> {
|
|
1392
|
-
caseSensitive: string;
|
|
1393
|
-
getResult(): boolean;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
declare class QtiSum extends QtiExpression<number> {
|
|
1397
|
-
private _expression;
|
|
1398
|
-
constructor();
|
|
1399
|
-
getResult(): number;
|
|
1400
|
-
}
|
|
1401
|
-
declare class QtiSumExpression implements QtiExpressionBase<number> {
|
|
1402
|
-
private expressions;
|
|
1403
|
-
constructor(expressions: QtiExpressionBase<number>[]);
|
|
1404
|
-
calculate(): number;
|
|
1405
|
-
}
|
|
1406
|
-
|
|
1407
|
-
declare class QtiVariable extends QtiExpression<string | string[]> {
|
|
1408
|
-
getResult(): Readonly<string | string[]>;
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
/**
|
|
1412
|
-
* @summary The qti-random-integer operator selects a random integer from a specified range.
|
|
1413
|
-
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.random-integer
|
|
1414
|
-
*
|
|
1415
|
-
* Selects a random integer from the range [min,max] satisfying min + step * n for some integer n.
|
|
1416
|
-
* For example, with min=2, max=11 and step=3 the values {2,5,8,11} are possible.
|
|
1417
|
-
*/
|
|
1418
|
-
declare class QtiRandomInteger extends QtiExpression<number> {
|
|
1419
|
-
min: number;
|
|
1420
|
-
max: number;
|
|
1421
|
-
step: number;
|
|
1422
|
-
getResult(): number;
|
|
1423
|
-
/**
|
|
1424
|
-
* Get all possible values for testing purposes
|
|
1425
|
-
*/
|
|
1426
|
-
getPossibleValues(): number[];
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
declare class QtiRandom extends QtiExpression<string> {
|
|
1430
|
-
getResult(): any;
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
|
-
declare class QtiDelete extends QtiExpression<string[] | null> {
|
|
1434
|
-
getResult(): string[] | null;
|
|
1435
|
-
}
|
|
1436
|
-
|
|
1437
|
-
declare class QtiIndex extends QtiExpression<any> {
|
|
1438
|
-
n: string;
|
|
1439
|
-
getResult(): any;
|
|
1440
|
-
private lookupVariableValue;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
declare class QtiContentBody extends LitElement {
|
|
1444
|
-
render(): lit_html.TemplateResult<1>;
|
|
1445
|
-
}
|
|
1446
|
-
declare global {
|
|
1447
|
-
interface HTMLElementTagNameMap {
|
|
1448
|
-
'qti-content-body': QtiContentBody;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
|
|
1452
|
-
declare class QtiRubricBlock extends LitElement {
|
|
1453
|
-
id: any;
|
|
1454
|
-
use: 'instructions' | 'scoring' | 'navigation';
|
|
1455
|
-
view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
|
|
1456
|
-
classNames: any;
|
|
1457
|
-
handleclassNamesChange(): void;
|
|
1458
|
-
static styles: lit.CSSResult;
|
|
1459
|
-
render(): lit_html.TemplateResult<1>;
|
|
1460
|
-
}
|
|
1461
|
-
declare global {
|
|
1462
|
-
interface HTMLElementTagNameMap {
|
|
1463
|
-
'qti-rubric-block': QtiRubricBlock;
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
declare class QtiStylesheet extends LitElement {
|
|
1468
|
-
private styleElement;
|
|
1469
|
-
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
1470
|
-
private minifyCss;
|
|
1471
|
-
disconnectedCallback(): void;
|
|
1472
|
-
}
|
|
1473
|
-
declare global {
|
|
1474
|
-
interface HTMLElementTagNameMap {
|
|
1475
|
-
'qti-stylesheet': QtiStylesheet;
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
declare class QtiVariableDeclaration extends LitElement {
|
|
1480
|
-
render(): lit_html.TemplateResult<1>;
|
|
1481
|
-
protected defaultValues(cardinality: Cardinality): string | string[];
|
|
1482
|
-
}
|
|
1483
|
-
declare global {
|
|
1484
|
-
interface HTMLElementTagNameMap {
|
|
1485
|
-
'qti-variabledeclaration': QtiVariableDeclaration;
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
declare class QtiOutcomeDeclaration extends QtiVariableDeclaration {
|
|
1490
|
-
baseType: BaseType;
|
|
1491
|
-
externalScored: 'human' | 'externalMachine' | null;
|
|
1492
|
-
identifier: string;
|
|
1493
|
-
cardinality: Cardinality;
|
|
1494
|
-
itemContext?: ItemContext;
|
|
1495
|
-
static styles: lit.CSSResult[];
|
|
1496
|
-
render(): lit_html.TemplateResult<1>;
|
|
1497
|
-
get interpolationTable(): Map<number, number> | null;
|
|
1498
|
-
connectedCallback(): void;
|
|
1499
|
-
}
|
|
1500
|
-
declare global {
|
|
1501
|
-
interface HTMLElementTagNameMap {
|
|
1502
|
-
'qti-outcome-declaration': QtiOutcomeDeclaration;
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
|
|
1506
|
-
declare class QtiResponseDeclaration extends QtiVariableDeclaration {
|
|
1507
|
-
baseType: BaseType;
|
|
1508
|
-
identifier: string;
|
|
1509
|
-
cardinality: Cardinality;
|
|
1510
|
-
itemContext?: ItemContext;
|
|
1511
|
-
static styles: lit.CSSResult[];
|
|
1512
|
-
render(): lit_html.TemplateResult<1>;
|
|
1513
|
-
connectedCallback(): void;
|
|
1514
|
-
private get correctResponse();
|
|
1515
|
-
private get mapping();
|
|
1516
|
-
private get areaMapping();
|
|
1517
|
-
}
|
|
1518
|
-
declare global {
|
|
1519
|
-
interface HTMLElementTagNameMap {
|
|
1520
|
-
'qti-response-declaration': QtiResponseDeclaration;
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
export { type Orientation, QtiAnd, QtiAssessmentItem, QtiAssessmentStimulusRef, QtiAssessmentStimulusRefConnectedEvent, QtiAssociableHotspot, QtiAssociateInteraction, QtiBaseValue, QtiChoiceInteraction, QtiCompanionMaterialsInfo, QtiContainerSize, QtiContains, QtiContentBody, QtiCorrect, QtiCustomInteraction, QtiCustomOperator, QtiDefault, QtiDelete, QtiEndAttemptInteraction, QtiEqual, QtiEqualRounded, QtiExtendedTextInteraction, QtiFeedback, QtiFeedbackBlock, QtiFeedbackInline, QtiFieldValue, QtiGap, QtiGapImg, QtiGapMatchInteraction, QtiGapText, QtiGcd, QtiGraphicAssociateInteraction, QtiGraphicGapMatchInteraction, QtiGraphicOrderInteraction, QtiGt, QtiGte, QtiHotspotChoice, QtiHotspotInteraction, QtiHottext, QtiHottextInteraction, QtiIndex, QtiInlineChoice, QtiInlineChoiceInteraction, QtiIsNull, QtiItemBody, QtiLookupOutcomeValue, QtiLt, QtiLte, QtiMapResponse, QtiMapResponsePoint, QtiMatch, QtiMatchInteraction, QtiMathOperator, QtiMediaInteraction, QtiMember, QtiMultiple, QtiNot, QtiNull, QtiOr, QtiOrderInteraction, QtiOrdered, QtiOutcomeDeclaration, QtiOutcomeProcessing, QtiOutcomeProcessingProcessor, QtiPortableCustomInteraction, QtiPositionObjectInteraction, QtiPositionObjectStage, QtiPower, QtiPrintedVariable, QtiProduct, QtiPrompt, QtiRandom, QtiRandomInteger, QtiResponseCondition, QtiResponseDeclaration, QtiResponseElse, QtiResponseElseIf, QtiResponseIf, QtiResponseProcessing, QtiRound, QtiRoundTo, QtiRubricBlock, QtiRule, type QtiRuleBase, QtiSelectPointInteraction, QtiSetOutcomeValue, QtiSetOutcomeValueRule, QtiSimpleAssociableChoice, QtiSimpleChoice, QtiSliderInteraction, QtiStringMatch, QtiStylesheet, QtiSubtract, QtiSum, QtiSumExpression, QtiTextEntryInteraction, QtiUploadInteraction, QtiVariable, qtiAndMixin, qtiSubtractMixin };
|