@citolab/qti-components 6.9.1-beta.6 → 6.9.1-beta.8
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/dist/{chunk-H4VLZ2F7.js → chunk-62FWJYVB.js} +3 -3
- package/dist/chunk-E7TLXHQH.js +2 -0
- package/dist/custom-elements.json +154 -0
- package/dist/index.js +1599 -91
- package/dist/item.css +241 -128
- package/dist/qti-components/index.d.ts +6 -1171
- package/dist/qti-components/index.js +24 -20
- package/dist/qti-item/index.d.ts +19 -0
- package/dist/qti-item/index.js +1506 -0
- package/dist/qti-loader/index.d.ts +5 -0
- package/dist/qti-loader/index.js +2 -0
- package/dist/qti-simple-choice-CafJuhnH.d.ts +1173 -0
- package/dist/qti-transformers/index.js +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,1173 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit from 'lit';
|
|
3
|
+
import { LitElement, CSSResultGroup, PropertyValueMap } from 'lit';
|
|
4
|
+
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
5
|
+
|
|
6
|
+
interface directedPair {
|
|
7
|
+
destination: string;
|
|
8
|
+
source: string;
|
|
9
|
+
}
|
|
10
|
+
interface ResponseInteraction {
|
|
11
|
+
responseIdentifier: string;
|
|
12
|
+
response: string | string[];
|
|
13
|
+
}
|
|
14
|
+
interface Calculate {
|
|
15
|
+
calculate: () => string | string[];
|
|
16
|
+
}
|
|
17
|
+
type float = number;
|
|
18
|
+
type integer = number;
|
|
19
|
+
type BaseType = 'boolean' | 'directedPair' | 'duration' | 'float' | 'integer' | 'string' | 'identifier' | 'pair';
|
|
20
|
+
type Multiple = string | string[][];
|
|
21
|
+
type Ordered = string | string[][];
|
|
22
|
+
type Cardinality = 'multiple' | 'ordered' | 'single';
|
|
23
|
+
|
|
24
|
+
interface OutcomeChangedDetails {
|
|
25
|
+
item: string;
|
|
26
|
+
outcomeIdentifier: string;
|
|
27
|
+
value: Readonly<string | string[]>;
|
|
28
|
+
}
|
|
29
|
+
type InteractionChangedDetails = ResponseInteraction & {
|
|
30
|
+
item: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
type QtiChoiceElementSelected = CustomEvent<{
|
|
34
|
+
identifier: string;
|
|
35
|
+
checked: boolean;
|
|
36
|
+
}>;
|
|
37
|
+
declare global {
|
|
38
|
+
interface GlobalEventHandlersEventMap {
|
|
39
|
+
'qti-choice-element-selected': QtiChoiceElementSelected;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
type QtiInteractionChanged = CustomEvent<InteractionChangedDetails>;
|
|
44
|
+
declare global {
|
|
45
|
+
interface GlobalEventHandlersEventMap {
|
|
46
|
+
'qti-interaction-changed': QtiInteractionChanged;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
type QtiInteractionResponse = CustomEvent<ResponseInteraction>;
|
|
51
|
+
declare global {
|
|
52
|
+
interface GlobalEventHandlersEventMap {
|
|
53
|
+
'qti-interaction-response': QtiInteractionResponse;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type QtiLooseChoice = CustomEvent<Record<PropertyKey, never>>;
|
|
58
|
+
declare global {
|
|
59
|
+
interface GlobalEventHandlersEventMap {
|
|
60
|
+
'qti-loose-choice': QtiLooseChoice;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
type QtiOutcomeChanged = CustomEvent<OutcomeChangedDetails>;
|
|
65
|
+
declare global {
|
|
66
|
+
interface GlobalEventHandlersEventMap {
|
|
67
|
+
'qti-outcome-changed': QtiOutcomeChanged;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type QtiRegisterChoice = CustomEvent<Record<PropertyKey, never>>;
|
|
72
|
+
declare global {
|
|
73
|
+
interface GlobalEventHandlersEventMap {
|
|
74
|
+
'qti-register-choice': QtiRegisterChoice;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type QtiRegisterInteraction = CustomEvent<Record<PropertyKey, never>>;
|
|
79
|
+
declare global {
|
|
80
|
+
interface GlobalEventHandlersEventMap {
|
|
81
|
+
'qti-register-interaction': QtiRegisterInteraction;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare class QtiMapping extends LitElement {
|
|
86
|
+
defaultValue: number;
|
|
87
|
+
lowerBound: number;
|
|
88
|
+
upperBound: number;
|
|
89
|
+
get mapEntries(): {
|
|
90
|
+
mapKey: string;
|
|
91
|
+
mappedValue: number;
|
|
92
|
+
}[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface VariableValue<T> {
|
|
96
|
+
identifier: string;
|
|
97
|
+
value: Readonly<T>;
|
|
98
|
+
type: 'outcome' | 'response';
|
|
99
|
+
}
|
|
100
|
+
interface VariableDeclaration<T> extends VariableValue<T> {
|
|
101
|
+
cardinality?: Cardinality;
|
|
102
|
+
baseType?: BaseType;
|
|
103
|
+
}
|
|
104
|
+
interface OutcomeVariable extends VariableDeclaration<string | string[] | null> {
|
|
105
|
+
interpolationTable?: Map<number, number>;
|
|
106
|
+
externalScored?: 'human' | 'externalMachine' | null;
|
|
107
|
+
}
|
|
108
|
+
interface ResponseVariable extends VariableDeclaration<string | string[] | null> {
|
|
109
|
+
candidateResponse?: string | string[] | null;
|
|
110
|
+
mapping?: QtiMapping;
|
|
111
|
+
correctResponse?: string | string[] | null;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
type QtiRegisterVariable = CustomEvent<{
|
|
115
|
+
variable: VariableDeclaration<string | string[]>;
|
|
116
|
+
}>;
|
|
117
|
+
declare global {
|
|
118
|
+
interface GlobalEventHandlersEventMap {
|
|
119
|
+
'qti-register-variable': QtiRegisterVariable;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
type QtiRegisterHotspot = CustomEvent<Record<PropertyKey, never>>;
|
|
124
|
+
declare global {
|
|
125
|
+
interface GlobalEventHandlersEventMap {
|
|
126
|
+
'qti-register-hotspot': QtiRegisterHotspot;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @summary The qti-assessment-item element contains all the other QTI 3 item structures.
|
|
132
|
+
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.dltnnj87l0yj
|
|
133
|
+
* @status stable
|
|
134
|
+
* @since 4.0
|
|
135
|
+
*
|
|
136
|
+
* @dependency qti-feedback
|
|
137
|
+
* @dependency qti-responseprocessing
|
|
138
|
+
*
|
|
139
|
+
* @slot - The default slot where all the other QTI 3 item structures go.
|
|
140
|
+
*
|
|
141
|
+
* @event qti-interaction-changed - Emitted when an interaction is changed.
|
|
142
|
+
* @event qti-outcome-changed - Emitted when an outcome has changed.
|
|
143
|
+
* @event qti-response-processing - Emitted when response-processing is called.
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
declare class QtiAssessmentItem extends LitElement {
|
|
147
|
+
title: string;
|
|
148
|
+
identifier: string;
|
|
149
|
+
adaptive: 'true' | 'false';
|
|
150
|
+
timeDependent: 'true' | 'false' | null;
|
|
151
|
+
disabled: boolean;
|
|
152
|
+
_handleDisabledChange: (_: boolean, disabled: boolean) => void;
|
|
153
|
+
readonly: boolean;
|
|
154
|
+
_handleReadonlyChange: (_: boolean, readonly: boolean) => void;
|
|
155
|
+
private _context;
|
|
156
|
+
get variables(): VariableValue<string | string[] | null>[];
|
|
157
|
+
set variables(value: VariableValue<string | string[] | null>[]);
|
|
158
|
+
private _initialContext;
|
|
159
|
+
private _feedbackElements;
|
|
160
|
+
private _interactionElements;
|
|
161
|
+
connectedCallback(): Promise<void>;
|
|
162
|
+
/** @deprecated use variables property instead */
|
|
163
|
+
set responses(myResponses: ResponseInteraction[]);
|
|
164
|
+
render(): lit_html.TemplateResult<1>;
|
|
165
|
+
constructor();
|
|
166
|
+
showCorrectResponse(show: boolean): void;
|
|
167
|
+
processResponse(countNumAttempts?: boolean): boolean;
|
|
168
|
+
resetResponses(): void;
|
|
169
|
+
getResponse(identifier: string): Readonly<ResponseVariable>;
|
|
170
|
+
getOutcome(identifier: string): Readonly<OutcomeVariable>;
|
|
171
|
+
getVariable(identifier: string): Readonly<VariableDeclaration<string | string[] | null>>;
|
|
172
|
+
private handleUpdateResponseVariable;
|
|
173
|
+
updateResponseVariable(identifier: string, value: string | string[] | undefined): void;
|
|
174
|
+
updateOutcomeVariable(identifier: string, value: string | string[] | undefined): void;
|
|
175
|
+
private _getCompletionStatus;
|
|
176
|
+
private _emit;
|
|
177
|
+
}
|
|
178
|
+
declare global {
|
|
179
|
+
interface HTMLElementTagNameMap {
|
|
180
|
+
'qti-assessment-item': QtiAssessmentItem;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Represents a custom element for referencing an assessment stimulus.
|
|
186
|
+
*/
|
|
187
|
+
declare class QtiAssessmentStimulusRef extends LitElement {
|
|
188
|
+
/**
|
|
189
|
+
* The identifier of the stimulus.
|
|
190
|
+
*/
|
|
191
|
+
identifier: string;
|
|
192
|
+
/**
|
|
193
|
+
* The href of the stimulus.
|
|
194
|
+
*/
|
|
195
|
+
href: string;
|
|
196
|
+
/**
|
|
197
|
+
* Lifecycle method called when the element is connected to the DOM.
|
|
198
|
+
* Loads and appends the stimulus if the 'qti-assessment-stimulus-ref-connected' event is not prevented.
|
|
199
|
+
*/
|
|
200
|
+
connectedCallback(): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Loads and appends the stimulus to the specified element.
|
|
203
|
+
* @param stimulusRef - The element to which the stimulus will be appended.
|
|
204
|
+
*/
|
|
205
|
+
loadAndAppendStimulus(stimulusRef: Element): Promise<void>;
|
|
206
|
+
}
|
|
207
|
+
declare global {
|
|
208
|
+
interface HTMLElementTagNameMap {
|
|
209
|
+
'qti-assessment-stimulus-ref': QtiAssessmentStimulusRef;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* @summary qti-choice is used by qti-simple-choice, qti-inline-choice, qti-hottext, qti-hotspot-choice.
|
|
215
|
+
*
|
|
216
|
+
* @since 1.0
|
|
217
|
+
* @status stable
|
|
218
|
+
*
|
|
219
|
+
* @event qti-register-choice - register itselves on a qti-choice-interaction element.
|
|
220
|
+
* @event qti-loose-choice - de-register itselves on a qti-choice-interaction element.
|
|
221
|
+
* @event qti-choice-element-selected - Emitted when the choice is selected.
|
|
222
|
+
*
|
|
223
|
+
* @slot - The choices slot element
|
|
224
|
+
*/
|
|
225
|
+
declare abstract class QtiChoice extends LitElement {
|
|
226
|
+
identifier: string;
|
|
227
|
+
tabindex: number | undefined;
|
|
228
|
+
disabled: boolean;
|
|
229
|
+
readonly: boolean;
|
|
230
|
+
checked: boolean;
|
|
231
|
+
handleDisabledChange(_: boolean, disabled: boolean): void;
|
|
232
|
+
connectedCallback(): void;
|
|
233
|
+
disconnectedCallback(): void;
|
|
234
|
+
reset(): void;
|
|
235
|
+
private _onKeyUp;
|
|
236
|
+
private _onClick;
|
|
237
|
+
private _toggleChecked;
|
|
238
|
+
render(): lit_html.TemplateResult<1>;
|
|
239
|
+
}
|
|
240
|
+
declare global {
|
|
241
|
+
interface HTMLElementTagNameMap {
|
|
242
|
+
'qti-choice': QtiChoice;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @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.
|
|
248
|
+
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.sphpo6lu6zqi
|
|
249
|
+
* @status stable
|
|
250
|
+
* @since 4.0
|
|
251
|
+
*
|
|
252
|
+
* @slot - item body content.
|
|
253
|
+
* @slot qti-rubric-block - the qti rubric block is placed above the item
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
declare class QtiItemBody extends LitElement {
|
|
257
|
+
static styles: CSSResultGroup;
|
|
258
|
+
render(): lit_html.TemplateResult<1>;
|
|
259
|
+
}
|
|
260
|
+
declare global {
|
|
261
|
+
interface HTMLElementTagNameMap {
|
|
262
|
+
'qti-item-body': QtiItemBody;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare class QtiPrompt extends LitElement {
|
|
267
|
+
render(): lit_html.TemplateResult<1>;
|
|
268
|
+
connectedCallback(): void;
|
|
269
|
+
}
|
|
270
|
+
declare global {
|
|
271
|
+
interface HTMLElementTagNameMap {
|
|
272
|
+
'qti-prompt': QtiPrompt;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
declare class QtiStylesheet extends LitElement {
|
|
277
|
+
private styleLink;
|
|
278
|
+
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
279
|
+
disconnectedCallback(): void;
|
|
280
|
+
}
|
|
281
|
+
declare global {
|
|
282
|
+
interface HTMLElementTagNameMap {
|
|
283
|
+
'qti-stylesheet': QtiStylesheet;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
interface ItemContext {
|
|
288
|
+
href?: string;
|
|
289
|
+
identifier: string;
|
|
290
|
+
variables: ReadonlyArray<VariableDeclaration<string | string[]>>;
|
|
291
|
+
}
|
|
292
|
+
declare const itemContextVariables: VariableDeclaration<string | string[]>[];
|
|
293
|
+
declare const itemContext: {
|
|
294
|
+
__context__: ItemContext;
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
declare class QtiVariableDeclaration extends LitElement {
|
|
298
|
+
render(): lit_html.TemplateResult<1>;
|
|
299
|
+
protected defaultValues(variable: VariableDeclaration<string | string[] | null>): string | string[];
|
|
300
|
+
}
|
|
301
|
+
declare global {
|
|
302
|
+
interface HTMLElementTagNameMap {
|
|
303
|
+
'qti-variabledeclaration': QtiVariableDeclaration;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
declare class QtiOutcomeDeclaration extends QtiVariableDeclaration {
|
|
308
|
+
baseType: BaseType;
|
|
309
|
+
externalScored: 'human' | 'externalMachine' | null;
|
|
310
|
+
identifier: string;
|
|
311
|
+
cardinality: Cardinality;
|
|
312
|
+
itemContext?: ItemContext;
|
|
313
|
+
static styles: lit.CSSResult[];
|
|
314
|
+
render(): lit_html.TemplateResult<1>;
|
|
315
|
+
get interpolationTable(): Map<number, number> | null;
|
|
316
|
+
connectedCallback(): void;
|
|
317
|
+
}
|
|
318
|
+
declare global {
|
|
319
|
+
interface HTMLElementTagNameMap {
|
|
320
|
+
'qti-outcome-declaration': QtiOutcomeDeclaration;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
declare class QtiResponseDeclaration extends QtiVariableDeclaration {
|
|
325
|
+
baseType: BaseType;
|
|
326
|
+
identifier: string;
|
|
327
|
+
cardinality: Cardinality;
|
|
328
|
+
itemContext?: ItemContext;
|
|
329
|
+
static styles: lit.CSSResult[];
|
|
330
|
+
render(): lit_html.TemplateResult<1>;
|
|
331
|
+
connectedCallback(): void;
|
|
332
|
+
private get correctResponse();
|
|
333
|
+
private get mapping();
|
|
334
|
+
}
|
|
335
|
+
declare global {
|
|
336
|
+
interface HTMLElementTagNameMap {
|
|
337
|
+
'qti-response-declaration': QtiResponseDeclaration;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare class QtiCompanionMaterialsInfo extends LitElement {
|
|
342
|
+
}
|
|
343
|
+
declare global {
|
|
344
|
+
interface HTMLElementTagNameMap {
|
|
345
|
+
'qti-companion-materials-info': QtiCompanionMaterialsInfo;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
declare class QtiContentBody extends LitElement {
|
|
350
|
+
render(): lit_html.TemplateResult<1>;
|
|
351
|
+
}
|
|
352
|
+
declare global {
|
|
353
|
+
interface HTMLElementTagNameMap {
|
|
354
|
+
'qti-content-body': QtiContentBody;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
declare class QtiRubricBlock extends LitElement {
|
|
359
|
+
id: any;
|
|
360
|
+
use: 'instructions' | 'scoring' | 'navigation';
|
|
361
|
+
view: 'author' | 'candidate' | 'proctor' | 'scorer' | 'testConstructor' | 'tutor';
|
|
362
|
+
classNames: any;
|
|
363
|
+
handleclassNamesChange(old: any, disabled: boolean): void;
|
|
364
|
+
static styles: lit.CSSResult;
|
|
365
|
+
render(): lit_html.TemplateResult<1>;
|
|
366
|
+
connectedCallback(): void;
|
|
367
|
+
}
|
|
368
|
+
declare global {
|
|
369
|
+
interface HTMLElementTagNameMap {
|
|
370
|
+
'qti-rubric-block': QtiRubricBlock;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
declare abstract class QtiFeedback extends LitElement {
|
|
375
|
+
protected showHide: string;
|
|
376
|
+
outcomeIdentifier: string;
|
|
377
|
+
protected identifier: string;
|
|
378
|
+
showStatus: string;
|
|
379
|
+
connectedCallback(): void;
|
|
380
|
+
checkShowFeedback(outcomeIdentifier: string): void;
|
|
381
|
+
private showFeedback;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
declare class QtiFeedbackBlock extends QtiFeedback {
|
|
385
|
+
static styles: lit.CSSResult;
|
|
386
|
+
render(): lit_html.TemplateResult<1>;
|
|
387
|
+
protected firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
388
|
+
}
|
|
389
|
+
declare global {
|
|
390
|
+
interface HTMLElementTagNameMap {
|
|
391
|
+
'qti-feedback-block': QtiFeedbackBlock;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
declare class QtiFeedbackInline extends QtiFeedback {
|
|
396
|
+
static styles: lit.CSSResult;
|
|
397
|
+
render: () => lit_html.TemplateResult<1>;
|
|
398
|
+
}
|
|
399
|
+
declare global {
|
|
400
|
+
interface HTMLElementTagNameMap {
|
|
401
|
+
'qti-feedback-inline': QtiFeedbackInline;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
declare class QtiModalFeedback extends QtiFeedback {
|
|
406
|
+
static styles: lit.CSSResult;
|
|
407
|
+
render: () => lit_html.TemplateResult<1>;
|
|
408
|
+
}
|
|
409
|
+
declare global {
|
|
410
|
+
interface HTMLElementTagNameMap {
|
|
411
|
+
'qti-modal-feedback': QtiModalFeedback;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
declare abstract class Interaction extends LitElement {
|
|
416
|
+
responseIdentifier: string;
|
|
417
|
+
/** disabled should be exposed to the attributes and accessible as property */
|
|
418
|
+
disabled: boolean;
|
|
419
|
+
/** readonly should be exposed to the attributes and accessible as property */
|
|
420
|
+
readonly: boolean;
|
|
421
|
+
abstract validate(): boolean;
|
|
422
|
+
abstract set response(val: Readonly<string | string[]>);
|
|
423
|
+
set correctResponse(val: Readonly<string | string[]>);
|
|
424
|
+
connectedCallback(): void;
|
|
425
|
+
saveResponse(value: string | string[]): void;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
declare class QtiExtendedTextInteraction extends Interaction {
|
|
429
|
+
textareaRef: lit_html_directives_ref_js.Ref<HTMLTextAreaElement>;
|
|
430
|
+
/** expected length is mapped to the property maxlength on the textarea */
|
|
431
|
+
expectedLength: number;
|
|
432
|
+
patternMask: string;
|
|
433
|
+
/** text appearing in the extended-text-nteraction if it is empty */
|
|
434
|
+
placeholderText: string;
|
|
435
|
+
private _value;
|
|
436
|
+
classNames: any;
|
|
437
|
+
handleclassNamesChange(old: any, disabled: boolean): void;
|
|
438
|
+
set response(value: string);
|
|
439
|
+
validate(): boolean;
|
|
440
|
+
static get styles(): lit.CSSResult[];
|
|
441
|
+
render(): lit_html.TemplateResult<1>;
|
|
442
|
+
protected textChanged(event: Event): void;
|
|
443
|
+
reset(): void;
|
|
444
|
+
private setEmptyAttribute;
|
|
445
|
+
}
|
|
446
|
+
declare global {
|
|
447
|
+
interface HTMLElementTagNameMap {
|
|
448
|
+
'qti-extended-text-interaction': QtiExtendedTextInteraction;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
declare class QtiTextEntryInteraction extends Interaction {
|
|
453
|
+
expectedLength: number;
|
|
454
|
+
patternMask: string;
|
|
455
|
+
placeholderText: string;
|
|
456
|
+
private _value;
|
|
457
|
+
private _correctValue;
|
|
458
|
+
private _size;
|
|
459
|
+
inputRef: lit_html_directives_ref_js.Ref<HTMLInputElement>;
|
|
460
|
+
classNames: any;
|
|
461
|
+
handleclassNamesChange(old: any, classes: string): void;
|
|
462
|
+
set response(value: string | undefined);
|
|
463
|
+
validate(): boolean;
|
|
464
|
+
static get styles(): lit.CSSResult[];
|
|
465
|
+
set correctResponse(value: string);
|
|
466
|
+
render(): lit_html.TemplateResult<1>;
|
|
467
|
+
protected textChanged(event: Event): void;
|
|
468
|
+
reset(): void;
|
|
469
|
+
private setEmptyAttribute;
|
|
470
|
+
}
|
|
471
|
+
declare global {
|
|
472
|
+
interface HTMLElementTagNameMap {
|
|
473
|
+
'qti-text-entry-interaction': QtiTextEntryInteraction;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
interface ChoicesInterface {
|
|
478
|
+
validate(): boolean;
|
|
479
|
+
_choiceElements: HTMLElement[];
|
|
480
|
+
correctResponse: string | string[];
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
declare const QtiHottextInteraction_base: (new (...args: any[]) => ChoicesInterface) & typeof LitElement;
|
|
484
|
+
declare class QtiHottextInteraction extends QtiHottextInteraction_base {
|
|
485
|
+
connectedCallback(): void;
|
|
486
|
+
render: () => lit_html.TemplateResult<1>;
|
|
487
|
+
}
|
|
488
|
+
declare global {
|
|
489
|
+
interface HTMLElementTagNameMap {
|
|
490
|
+
'qti-hottext-interaction': QtiHottextInteraction;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
interface OptionType {
|
|
495
|
+
textContent: string;
|
|
496
|
+
value: string;
|
|
497
|
+
selected: boolean;
|
|
498
|
+
}
|
|
499
|
+
declare class QtiInlineChoiceInteraction extends Interaction {
|
|
500
|
+
static get styles(): lit.CSSResult[];
|
|
501
|
+
static inputWidthClass: string[];
|
|
502
|
+
options: OptionType[];
|
|
503
|
+
correctOption: string;
|
|
504
|
+
dataPrompt: string;
|
|
505
|
+
render(): lit_html.TemplateResult<1>;
|
|
506
|
+
connectedCallback(): void;
|
|
507
|
+
disconnectedCallback(): void;
|
|
508
|
+
validate(): boolean;
|
|
509
|
+
reset(): void;
|
|
510
|
+
set response(value: string);
|
|
511
|
+
set correctResponse(value: Readonly<string | string[]>);
|
|
512
|
+
choiceSelected(event: Event): void;
|
|
513
|
+
}
|
|
514
|
+
declare global {
|
|
515
|
+
interface HTMLElementTagNameMap {
|
|
516
|
+
'qti-inline-choice-interaction': QtiInlineChoiceInteraction;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
declare const QtiChoiceInteraction_base: (new (...args: any[]) => {}) & (new (...args: any[]) => {}) & (new (...args: any[]) => ChoicesInterface) & typeof LitElement;
|
|
521
|
+
declare class QtiChoiceInteraction extends QtiChoiceInteraction_base implements ChoicesInterface {
|
|
522
|
+
static styles: CSSResultGroup;
|
|
523
|
+
/** orientation of choices */
|
|
524
|
+
orientation: 'horizontal' | 'vertical';
|
|
525
|
+
render(): lit_html.TemplateResult<1>;
|
|
526
|
+
}
|
|
527
|
+
declare global {
|
|
528
|
+
interface HTMLElementTagNameMap {
|
|
529
|
+
'qti-choice-interaction': QtiChoiceInteraction;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare class QtiOutcomeProcessing extends LitElement {
|
|
534
|
+
static styles: lit.CSSResult[];
|
|
535
|
+
render(): lit_html.TemplateResult<1>;
|
|
536
|
+
process(): void;
|
|
537
|
+
}
|
|
538
|
+
declare global {
|
|
539
|
+
interface HTMLElementTagNameMap {
|
|
540
|
+
'qti-outcome-processing': QtiOutcomeProcessing;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
declare class QtiOutcomeProcessingProcessor {
|
|
544
|
+
process(rules: QtiRuleBase[]): void;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
declare class QtiResponseProcessing extends LitElement {
|
|
548
|
+
static styles: lit.CSSResult[];
|
|
549
|
+
render(): lit_html.TemplateResult<1>;
|
|
550
|
+
process(): void;
|
|
551
|
+
firstUpdated(_changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): void;
|
|
552
|
+
private fragmentFromString;
|
|
553
|
+
}
|
|
554
|
+
declare global {
|
|
555
|
+
interface HTMLElementTagNameMap {
|
|
556
|
+
'qti-response-processing': QtiResponseProcessing;
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
interface QtiExpressionBase<T> {
|
|
561
|
+
calculate(): Readonly<T>;
|
|
562
|
+
}
|
|
563
|
+
declare abstract class QtiExpression<T> extends LitElement implements QtiExpressionBase<T> {
|
|
564
|
+
protected result: any;
|
|
565
|
+
static styles: lit.CSSResult;
|
|
566
|
+
render(): lit_html.TemplateResult<1>;
|
|
567
|
+
calculate(): Readonly<T>;
|
|
568
|
+
protected getResult(): Readonly<T>;
|
|
569
|
+
get assessmentItem(): QtiAssessmentItem;
|
|
570
|
+
getVariables: () => VariableDeclaration<number | string | (number | string)[] | null>[];
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
declare class QtiRule extends LitElement implements QtiRuleBase {
|
|
574
|
+
render(): lit_html.TemplateResult<1>;
|
|
575
|
+
process(): void;
|
|
576
|
+
}
|
|
577
|
+
interface QtiRuleBase {
|
|
578
|
+
process(): any;
|
|
579
|
+
}
|
|
580
|
+
declare global {
|
|
581
|
+
interface HTMLElementTagNameMap {
|
|
582
|
+
'qti-rule': QtiRule;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* The lookupOutcomeValue rule sets the value of an outcome variable to the value obtained
|
|
588
|
+
* by looking up the value of the associated expression in the lookupTable associated
|
|
589
|
+
* with the outcome's declaration.
|
|
590
|
+
*/
|
|
591
|
+
declare class QtiLookupOutcomeValue extends QtiRule {
|
|
592
|
+
identifier: string;
|
|
593
|
+
get childExpression(): QtiExpression<string>;
|
|
594
|
+
process(): number;
|
|
595
|
+
}
|
|
596
|
+
declare global {
|
|
597
|
+
interface HTMLElementTagNameMap {
|
|
598
|
+
'qti-lookup-outcome-value': QtiLookupOutcomeValue;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
declare abstract class QtiConditionExpression extends QtiExpression<boolean> {
|
|
603
|
+
calculate(): Readonly<boolean>;
|
|
604
|
+
getResult(): Readonly<boolean>;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
type Constructor<T> = new (...args: any[]) => T;
|
|
608
|
+
declare const QtiAnd_base: {
|
|
609
|
+
new (...args: any[]): {
|
|
610
|
+
calculateChildren(children: Array<MockQtiExpression<any>>): boolean;
|
|
611
|
+
};
|
|
612
|
+
} & Constructor<QtiConditionExpression>;
|
|
613
|
+
declare class QtiAnd extends QtiAnd_base {
|
|
614
|
+
calculate(): boolean;
|
|
615
|
+
}
|
|
616
|
+
type MockQtiExpression<T> = {
|
|
617
|
+
calculate: () => T;
|
|
618
|
+
};
|
|
619
|
+
type MockConstructor = new (...args: any[]) => {};
|
|
620
|
+
declare function qtiAndMixin<TBase extends MockConstructor>(Base: TBase): {
|
|
621
|
+
new (...args: any[]): {
|
|
622
|
+
calculateChildren(children: Array<MockQtiExpression<any>>): boolean;
|
|
623
|
+
};
|
|
624
|
+
} & TBase;
|
|
625
|
+
|
|
626
|
+
declare global {
|
|
627
|
+
interface HTMLElementTagNameMap {
|
|
628
|
+
'qti-and': QtiAnd;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
interface IMSpci<ConfigProperties> {
|
|
633
|
+
typeIdentifier: string;
|
|
634
|
+
/** @access public
|
|
635
|
+
* @method getInstance Create a new instance of this portable custom interaction
|
|
636
|
+
* Will be called by the qtiCustomInteractionContext
|
|
637
|
+
* @param {DOM Element} dom - the DOM Element this PCI is being added to
|
|
638
|
+
* @param {Object} configuration - the configuration to apply to this PCI
|
|
639
|
+
* @param {String} state - a previous saved state to apply to this instance.
|
|
640
|
+
* This must have been obtained from a prior call to getState on an
|
|
641
|
+
* instance of this type (same typeIdentifier)
|
|
642
|
+
*/
|
|
643
|
+
getInstance: (dom: HTMLElement, configuration: Configuration<ConfigProperties>, state: string) => void;
|
|
644
|
+
/** @access public
|
|
645
|
+
* @method getResponse
|
|
646
|
+
* @return {Object} - the value to assign to the bound QTI response variable
|
|
647
|
+
*/
|
|
648
|
+
getResponse: () => QtiVariableJSON;
|
|
649
|
+
/** @access public
|
|
650
|
+
* @method getState
|
|
651
|
+
* @return {String} The current state of this PCI. May be passed to
|
|
652
|
+
* getInstance to later restore this PCI instance.
|
|
653
|
+
*/
|
|
654
|
+
getState: () => string;
|
|
655
|
+
oncompleted?: () => void;
|
|
656
|
+
destroy?: () => void;
|
|
657
|
+
}
|
|
658
|
+
declare type Configuration<T> = {
|
|
659
|
+
onready: (pci: IMSpci<T>, state?: string) => void;
|
|
660
|
+
properties: T;
|
|
661
|
+
};
|
|
662
|
+
declare type QtiVariableJSON = {
|
|
663
|
+
[K in 'list' | 'base']?: {
|
|
664
|
+
[Ka in 'boolean' | 'integer' | 'float' | 'string' | 'pair' | 'directedPair' | 'identifier']?: ResponseType;
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
interface ModuleResolutionConfig {
|
|
668
|
+
waitSeconds?: number;
|
|
669
|
+
context?: string;
|
|
670
|
+
catchError?: boolean;
|
|
671
|
+
paths: {
|
|
672
|
+
[key: string]: string | string[];
|
|
673
|
+
};
|
|
674
|
+
shim?: {
|
|
675
|
+
[key: string]: {
|
|
676
|
+
deps?: string[];
|
|
677
|
+
exports?: string;
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
declare class QtiPortableCustomInteraction extends Interaction {
|
|
683
|
+
private intervalId;
|
|
684
|
+
private rawResponse;
|
|
685
|
+
private pci;
|
|
686
|
+
responseIdentifier: string;
|
|
687
|
+
module: string;
|
|
688
|
+
customInteractionTypeIdentifier: string;
|
|
689
|
+
private _errorMessage;
|
|
690
|
+
private convertQtiVariableJSON;
|
|
691
|
+
private startChecking;
|
|
692
|
+
private stopChecking;
|
|
693
|
+
validate(): boolean;
|
|
694
|
+
set response(val: Readonly<string | string[]>);
|
|
695
|
+
getTAOConfig(node: any): {};
|
|
696
|
+
register(pci: IMSpci<unknown>): void;
|
|
697
|
+
connectedCallback(): void;
|
|
698
|
+
disconnectedCallback(): void;
|
|
699
|
+
buildRequireConfig(): ModuleResolutionConfig;
|
|
700
|
+
private combineRequireResolvePaths;
|
|
701
|
+
private removeDoubleSlashes;
|
|
702
|
+
loadConfig: (url: string, baseUrl?: string) => Promise<ModuleResolutionConfig>;
|
|
703
|
+
getResolvablePathString: (path: string, basePath?: string) => string;
|
|
704
|
+
getResolvablePath: (path: string | string[], basePath?: string) => string | string[];
|
|
705
|
+
render(): lit_html.TemplateResult<1>;
|
|
706
|
+
}
|
|
707
|
+
declare global {
|
|
708
|
+
interface HTMLElementTagNameMap {
|
|
709
|
+
'qti-portable-custom-interaction': QtiPortableCustomInteraction;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
interface IInteraction {
|
|
714
|
+
disabled: boolean;
|
|
715
|
+
readonly: boolean;
|
|
716
|
+
response: string | string[];
|
|
717
|
+
reset(): any;
|
|
718
|
+
validate(): boolean;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
declare const QtiAssociateInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
722
|
+
declare class QtiAssociateInteraction extends QtiAssociateInteraction_base {
|
|
723
|
+
private _childrenMap;
|
|
724
|
+
static styles: lit.CSSResult;
|
|
725
|
+
render(): lit_html.TemplateResult<1>;
|
|
726
|
+
connectedCallback(): void;
|
|
727
|
+
}
|
|
728
|
+
declare global {
|
|
729
|
+
interface HTMLElementTagNameMap {
|
|
730
|
+
'qti-associate-interaction': QtiAssociateInteraction;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
declare class QtiCustomInteraction extends Interaction {
|
|
735
|
+
private rawResponse;
|
|
736
|
+
constructor();
|
|
737
|
+
responseIdentifier: string;
|
|
738
|
+
data: string;
|
|
739
|
+
baseItemUrl: string;
|
|
740
|
+
baseRefUrl: string;
|
|
741
|
+
id: string;
|
|
742
|
+
private _errorMessage;
|
|
743
|
+
manifest: {
|
|
744
|
+
script: string[];
|
|
745
|
+
style: string[];
|
|
746
|
+
media: string[];
|
|
747
|
+
};
|
|
748
|
+
connectedCallback(): void;
|
|
749
|
+
setupCES(): void;
|
|
750
|
+
private getIFrames;
|
|
751
|
+
private getInnerIFrames;
|
|
752
|
+
private postToWindowAndIframes;
|
|
753
|
+
handlePostMessage(event: MessageEvent): void;
|
|
754
|
+
validate(): boolean;
|
|
755
|
+
set response(val: Readonly<string | string[]>);
|
|
756
|
+
disconnectedCallback(): void;
|
|
757
|
+
render(): lit_html.TemplateResult<1>;
|
|
758
|
+
}
|
|
759
|
+
declare global {
|
|
760
|
+
interface HTMLElementTagNameMap {
|
|
761
|
+
'qti-custom-interaction': QtiCustomInteraction;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
declare class QtiEndAttemptInteraction extends Interaction {
|
|
766
|
+
countAttempt: string;
|
|
767
|
+
title: 'end attempt';
|
|
768
|
+
validate(): boolean;
|
|
769
|
+
set response(val: undefined);
|
|
770
|
+
render(): lit_html.TemplateResult<1>;
|
|
771
|
+
endAttempt(e: Event): void;
|
|
772
|
+
}
|
|
773
|
+
declare global {
|
|
774
|
+
interface HTMLElementTagNameMap {
|
|
775
|
+
'qti-end-attempt-interaction': QtiEndAttemptInteraction;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
declare const QtiGapMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
780
|
+
declare class QtiGapMatchInteraction extends QtiGapMatchInteraction_base {
|
|
781
|
+
static styles: lit.CSSResult[];
|
|
782
|
+
render(): lit_html.TemplateResult<1>;
|
|
783
|
+
set correctResponse(value: Readonly<string | string[]>);
|
|
784
|
+
}
|
|
785
|
+
declare global {
|
|
786
|
+
interface HTMLElementTagNameMap {
|
|
787
|
+
'qti-gap-match-interaction': QtiGapMatchInteraction;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
declare class QtiGraphicAssociateInteraction extends Interaction {
|
|
792
|
+
choiceOrdering: boolean;
|
|
793
|
+
hotspots: any;
|
|
794
|
+
startPoint: any;
|
|
795
|
+
endPoint: any;
|
|
796
|
+
_lines: any[];
|
|
797
|
+
startCoord: {
|
|
798
|
+
x: any;
|
|
799
|
+
y: any;
|
|
800
|
+
};
|
|
801
|
+
mouseCoord: {
|
|
802
|
+
x: number;
|
|
803
|
+
y: number;
|
|
804
|
+
};
|
|
805
|
+
svgContainer: any;
|
|
806
|
+
grImage: any;
|
|
807
|
+
static styles: lit.CSSResult[];
|
|
808
|
+
svg: SVGSVGElement;
|
|
809
|
+
constructor();
|
|
810
|
+
reset(): void;
|
|
811
|
+
validate(): boolean;
|
|
812
|
+
set response(val: string | string[]);
|
|
813
|
+
render(): lit_html.TemplateResult<1>;
|
|
814
|
+
private positionHotspotOnRegister;
|
|
815
|
+
firstUpdated(e: any): void;
|
|
816
|
+
disconnectedCallback(): void;
|
|
817
|
+
}
|
|
818
|
+
declare global {
|
|
819
|
+
interface HTMLElementTagNameMap {
|
|
820
|
+
'qti-graphic-associate-interaction': QtiGraphicAssociateInteraction;
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
declare const QtiGraphicGapMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
825
|
+
declare class QtiGraphicGapMatchInteraction extends QtiGraphicGapMatchInteraction_base {
|
|
826
|
+
static styles: lit.CSSResult;
|
|
827
|
+
render(): lit_html.TemplateResult<1>;
|
|
828
|
+
private positionHotspotOnRegister;
|
|
829
|
+
connectedCallback(): void;
|
|
830
|
+
disconnectedCallback(): void;
|
|
831
|
+
}
|
|
832
|
+
declare global {
|
|
833
|
+
interface HTMLElementTagNameMap {
|
|
834
|
+
'qti-graphic-gap-match-interaction': QtiGraphicGapMatchInteraction;
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
declare const QtiGraphicOrderInteraction_base: (new (...args: any[]) => ChoicesInterface) & typeof LitElement;
|
|
839
|
+
declare class QtiGraphicOrderInteraction extends QtiGraphicOrderInteraction_base {
|
|
840
|
+
choiceOrdering: boolean;
|
|
841
|
+
static styles: lit.CSSResult[];
|
|
842
|
+
render(): lit_html.TemplateResult<1>;
|
|
843
|
+
private setHotspotOrder;
|
|
844
|
+
private positionHotspotOnRegister;
|
|
845
|
+
connectedCallback(): void;
|
|
846
|
+
disconnectedCallback(): void;
|
|
847
|
+
}
|
|
848
|
+
declare global {
|
|
849
|
+
interface HTMLElementTagNameMap {
|
|
850
|
+
'qti-graphic-order-interaction': QtiGraphicOrderInteraction;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
declare const QtiHotspotInteraction_base: (new (...args: any[]) => ChoicesInterface) & typeof LitElement;
|
|
855
|
+
declare class QtiHotspotInteraction extends QtiHotspotInteraction_base {
|
|
856
|
+
static styles: lit.CSSResult[];
|
|
857
|
+
render(): lit_html.TemplateResult<1>;
|
|
858
|
+
private positionHotspotOnRegister;
|
|
859
|
+
connectedCallback(): void;
|
|
860
|
+
disconnectedCallback(): void;
|
|
861
|
+
}
|
|
862
|
+
declare global {
|
|
863
|
+
interface HTMLElementTagNameMap {
|
|
864
|
+
'qti-hotspot-interaction': QtiHotspotInteraction;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
declare class QtiSimpleAssociableChoice extends LitElement {
|
|
869
|
+
static styles: lit.CSSResult;
|
|
870
|
+
/** the minimal number of selections a candidate must make */
|
|
871
|
+
matchMin: number;
|
|
872
|
+
/** the maximum number of selections a candidate must make, the other options will be disabled when max options is checked */
|
|
873
|
+
matchMax: number;
|
|
874
|
+
fixed: boolean;
|
|
875
|
+
connectedCallback(): void;
|
|
876
|
+
render(): lit_html.TemplateResult<1>;
|
|
877
|
+
}
|
|
878
|
+
declare global {
|
|
879
|
+
interface HTMLElementTagNameMap {
|
|
880
|
+
'qti-simple-associable-choice': QtiSimpleAssociableChoice;
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
declare const QtiMatchInteraction_base: (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
885
|
+
declare class QtiMatchInteraction extends QtiMatchInteraction_base {
|
|
886
|
+
static styles: lit.CSSResult[];
|
|
887
|
+
rows: QtiSimpleAssociableChoice[];
|
|
888
|
+
cols: QtiSimpleAssociableChoice[];
|
|
889
|
+
lastCheckedRadio: HTMLInputElement | null;
|
|
890
|
+
response: any[];
|
|
891
|
+
correctOptions: string[];
|
|
892
|
+
responseIdentifier: string;
|
|
893
|
+
connectedCallback(): void;
|
|
894
|
+
handleRadioClick: (e: any) => void;
|
|
895
|
+
handleRadioChange: (e: any) => void;
|
|
896
|
+
set correctResponse(responseValue: string | string[]);
|
|
897
|
+
render(): lit_html.TemplateResult<1>;
|
|
898
|
+
}
|
|
899
|
+
declare global {
|
|
900
|
+
interface HTMLElementTagNameMap {
|
|
901
|
+
'qti-match-interaction': QtiMatchInteraction;
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
declare class QtiMediaInteraction extends Interaction {
|
|
906
|
+
value: number;
|
|
907
|
+
reset(): void;
|
|
908
|
+
validate(): boolean;
|
|
909
|
+
set response(val: undefined);
|
|
910
|
+
static get properties(): {
|
|
911
|
+
step: {
|
|
912
|
+
type: NumberConstructor;
|
|
913
|
+
attribute: string;
|
|
914
|
+
default: number;
|
|
915
|
+
};
|
|
916
|
+
};
|
|
917
|
+
static styles: lit.CSSResult[];
|
|
918
|
+
render(): lit_html.TemplateResult<1>;
|
|
919
|
+
constructor();
|
|
920
|
+
connectedCallback(): void;
|
|
921
|
+
}
|
|
922
|
+
declare global {
|
|
923
|
+
interface HTMLElementTagNameMap {
|
|
924
|
+
'qti-media-interaction': QtiMediaInteraction;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
declare const QtiOrderInteraction_base: (new (...args: any[]) => {}) & (new (...args: any[]) => IInteraction) & typeof LitElement;
|
|
929
|
+
declare class QtiOrderInteraction extends QtiOrderInteraction_base {
|
|
930
|
+
childrenMap: Element[];
|
|
931
|
+
nrChoices: number;
|
|
932
|
+
correctResponses: string[];
|
|
933
|
+
showCorrectResponses: boolean;
|
|
934
|
+
/** orientation of choices */
|
|
935
|
+
orientation: 'horizontal' | 'vertical';
|
|
936
|
+
static styles: lit.CSSResult[];
|
|
937
|
+
render(): lit_html.TemplateResult<1>;
|
|
938
|
+
set correctResponse(value: Readonly<string | string[]>);
|
|
939
|
+
protected getResponse(): string[];
|
|
940
|
+
firstUpdated(changedProps: any): Promise<void>;
|
|
941
|
+
}
|
|
942
|
+
declare global {
|
|
943
|
+
interface HTMLElementTagNameMap {
|
|
944
|
+
'qti-order-interaction': QtiOrderInteraction;
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
declare class QtiPositionObjectStage extends LitElement {
|
|
949
|
+
choiceOrdering: boolean;
|
|
950
|
+
startX: any;
|
|
951
|
+
startY: any;
|
|
952
|
+
dragElement: any;
|
|
953
|
+
render(): lit_html.TemplateResult<1>;
|
|
954
|
+
static styles: lit.CSSResult[];
|
|
955
|
+
constructor();
|
|
956
|
+
dragElementHandler(event: any): void;
|
|
957
|
+
firstUpdated(a: any): void;
|
|
958
|
+
removeMoveListener(event: any): void;
|
|
959
|
+
disconnectedCallback(): void;
|
|
960
|
+
}
|
|
961
|
+
declare global {
|
|
962
|
+
interface HTMLElementTagNameMap {
|
|
963
|
+
'qti-position-object-stage': QtiPositionObjectStage;
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
declare class QtiSelectPointInteraction extends Interaction {
|
|
968
|
+
static styles: lit.CSSResult[];
|
|
969
|
+
maxChoices: number;
|
|
970
|
+
minChoices: number;
|
|
971
|
+
private _points;
|
|
972
|
+
private _imgElement;
|
|
973
|
+
private _onImageClick;
|
|
974
|
+
render(): lit_html.TemplateResult<1>;
|
|
975
|
+
reset(): void;
|
|
976
|
+
validate(): boolean;
|
|
977
|
+
set response(val: string | string[]);
|
|
978
|
+
firstUpdated(): void;
|
|
979
|
+
disconnectedCallback(): void;
|
|
980
|
+
}
|
|
981
|
+
declare global {
|
|
982
|
+
interface HTMLElementTagNameMap {
|
|
983
|
+
'qti-select-point-interaction': QtiSelectPointInteraction;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* @summary The SliderInteraction.Type (qti-slider-interaction) presents the candidate with a control for selecting a numerical value between a lower and upper bound.
|
|
989
|
+
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.s61xcrj4qcyj
|
|
990
|
+
* @status stable
|
|
991
|
+
* @since 6.0
|
|
992
|
+
*
|
|
993
|
+
* @event qti-register-interaction - emitted when the interaction wants to register itself
|
|
994
|
+
* @event qti-interaction-response - emitted when the interaction changes
|
|
995
|
+
*
|
|
996
|
+
* @cssprop --show-value - shows the current value while sliding
|
|
997
|
+
* @cssprop --show-ticks - shows the ticks according to steps
|
|
998
|
+
* @cssprop --show-bounds - shows value for lower and upper boundary
|
|
999
|
+
*
|
|
1000
|
+
* @csspart slider -- slider inluding, bounds and ticks and value, use it for paddings and margins
|
|
1001
|
+
* @csspart bounds -- div for bounds, containing two divs for with min, and max bounds value
|
|
1002
|
+
* @csspart ticks -- div for ticks, use lineair gradient and exposed css variables for styling
|
|
1003
|
+
* @csspart rail -- div for rail, style according to needs
|
|
1004
|
+
* @csspart knob -- div, should be relative or absolute
|
|
1005
|
+
* @csspart value -- div, containing value
|
|
1006
|
+
*
|
|
1007
|
+
* @slot - The default slot where <qti-simple-choice> must be placed.
|
|
1008
|
+
* @slot prompt - slot where the prompt is placed.
|
|
1009
|
+
*/
|
|
1010
|
+
declare class QtiSliderInteraction extends Interaction {
|
|
1011
|
+
csLive: CSSStyleDeclaration;
|
|
1012
|
+
private _knob;
|
|
1013
|
+
private _rail;
|
|
1014
|
+
value: number;
|
|
1015
|
+
stepLabel: boolean;
|
|
1016
|
+
reverse: boolean;
|
|
1017
|
+
private _min;
|
|
1018
|
+
set min(value: number);
|
|
1019
|
+
get min(): number;
|
|
1020
|
+
private _max;
|
|
1021
|
+
set max(value: number);
|
|
1022
|
+
get max(): number;
|
|
1023
|
+
private _step;
|
|
1024
|
+
set step(value: number);
|
|
1025
|
+
get step(): number;
|
|
1026
|
+
_handleDisabledChange: (old: any, disabled: any) => void;
|
|
1027
|
+
_handleReadonlyChange: (old: any, readonly: any) => void;
|
|
1028
|
+
reset(): void;
|
|
1029
|
+
validate(): boolean;
|
|
1030
|
+
constructor();
|
|
1031
|
+
set response(myResponse: string | string[]);
|
|
1032
|
+
static styles: lit.CSSResult[];
|
|
1033
|
+
render(): lit_html.TemplateResult<1>;
|
|
1034
|
+
connectedCallback(): void;
|
|
1035
|
+
private _onTouchMove;
|
|
1036
|
+
private _onMouseDown;
|
|
1037
|
+
/** calculateValue gets x position and compares this with the total width in pixels */
|
|
1038
|
+
private calculateValue;
|
|
1039
|
+
private getPositionFromEvent;
|
|
1040
|
+
}
|
|
1041
|
+
declare global {
|
|
1042
|
+
interface HTMLElementTagNameMap {
|
|
1043
|
+
'qti-slider-interaction': QtiSliderInteraction;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* https://www.imsglobal.org/spec/qti/v3p0/impl#h.fi29q8dubjgw
|
|
1049
|
+
* <qti-custom-operator class="js.org">
|
|
1050
|
+
<qti-base-value base-type="string"><![CDATA[
|
|
1051
|
+
console.log(context.variables);
|
|
1052
|
+
return 'B'
|
|
1053
|
+
document.querySelector('qti-end-attempt-interaction').disabled = true;
|
|
1054
|
+
]]></qti-base-value>
|
|
1055
|
+
</qti-custom-operator>
|
|
1056
|
+
</qti-set-outcome-value>
|
|
1057
|
+
*/
|
|
1058
|
+
declare class QtiCustomOperator extends LitElement implements Calculate {
|
|
1059
|
+
private operatorFunction;
|
|
1060
|
+
private _context?;
|
|
1061
|
+
render(): lit_html.TemplateResult<1>;
|
|
1062
|
+
handleSlotChange(event: Event): void;
|
|
1063
|
+
calculate(): any;
|
|
1064
|
+
}
|
|
1065
|
+
declare global {
|
|
1066
|
+
interface HTMLElementTagNameMap {
|
|
1067
|
+
'qti-custom-operator': QtiCustomOperator;
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
declare class QtiAssociableHotspot extends LitElement {
|
|
1072
|
+
static styles: lit.CSSResult;
|
|
1073
|
+
connectedCallback(): void;
|
|
1074
|
+
render(): lit_html.TemplateResult<1>;
|
|
1075
|
+
}
|
|
1076
|
+
declare global {
|
|
1077
|
+
interface HTMLElementTagNameMap {
|
|
1078
|
+
'qti-associable-hotspot': QtiAssociableHotspot;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
declare class QtiGap extends LitElement {
|
|
1083
|
+
static styles: lit.CSSResult;
|
|
1084
|
+
tabindex: number | undefined;
|
|
1085
|
+
render(): lit_html.TemplateResult<1>;
|
|
1086
|
+
}
|
|
1087
|
+
declare global {
|
|
1088
|
+
interface HTMLElementTagNameMap {
|
|
1089
|
+
'qti-gap': QtiGap;
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
declare class QtiGapImg extends LitElement {
|
|
1094
|
+
static styles: lit.CSSResult;
|
|
1095
|
+
tabindex: number | undefined;
|
|
1096
|
+
connectedCallback(): void;
|
|
1097
|
+
}
|
|
1098
|
+
declare global {
|
|
1099
|
+
interface HTMLElementTagNameMap {
|
|
1100
|
+
'qti-gap-img': QtiGapImg;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
declare class QtiGapText extends LitElement {
|
|
1105
|
+
static styles: lit.CSSResult;
|
|
1106
|
+
tabindex: number | undefined;
|
|
1107
|
+
connectedCallback(): void;
|
|
1108
|
+
render(): lit_html.TemplateResult<1>;
|
|
1109
|
+
}
|
|
1110
|
+
declare global {
|
|
1111
|
+
interface HTMLElementTagNameMap {
|
|
1112
|
+
'qti-gap-text': QtiGapText;
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
declare class QtiHotspotChoice extends QtiChoice {
|
|
1117
|
+
static styles: lit.CSSResult;
|
|
1118
|
+
order: number;
|
|
1119
|
+
}
|
|
1120
|
+
declare global {
|
|
1121
|
+
interface HTMLElementTagNameMap {
|
|
1122
|
+
'qti-hotspot-choice': QtiHotspotChoice;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
declare class QtiHottext extends QtiChoice {
|
|
1127
|
+
static styles: lit.CSSResult;
|
|
1128
|
+
render(): lit_html.TemplateResult<1>;
|
|
1129
|
+
}
|
|
1130
|
+
declare global {
|
|
1131
|
+
interface HTMLElementTagNameMap {
|
|
1132
|
+
'qti-hottext': QtiHottext;
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
declare class QtiInlineChoice extends LitElement {
|
|
1137
|
+
static get styles(): lit.CSSResult[];
|
|
1138
|
+
identifier: string;
|
|
1139
|
+
connectedCallback(): void;
|
|
1140
|
+
disconnectedCallback(): void;
|
|
1141
|
+
render(): lit_html.TemplateResult<1>;
|
|
1142
|
+
private _onSelectInlineChoice;
|
|
1143
|
+
}
|
|
1144
|
+
declare global {
|
|
1145
|
+
interface HTMLElementTagNameMap {
|
|
1146
|
+
'qti-inline-choice': QtiInlineChoice;
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
/**
|
|
1151
|
+
* @summary Short summary of the component's intended use.
|
|
1152
|
+
* @documentation https://www.imsglobal.org/spec/qti/v3p0/impl#h.j9nu1oa1tu3b
|
|
1153
|
+
* @status stable
|
|
1154
|
+
* @since 4.0
|
|
1155
|
+
*
|
|
1156
|
+
* @event qti-choice-element-selected - Emitted when a choice is selected.
|
|
1157
|
+
* @event qti-register-choice - Emitted when an choice is added
|
|
1158
|
+
* @event qti-loose-choice - Emitted when a choice is removed
|
|
1159
|
+
*
|
|
1160
|
+
* @slot - The default slot.
|
|
1161
|
+
*/
|
|
1162
|
+
declare class QtiSimpleChoice extends QtiChoice {
|
|
1163
|
+
static styles: lit.CSSResult;
|
|
1164
|
+
marker: string;
|
|
1165
|
+
render(): lit_html.TemplateResult<1>;
|
|
1166
|
+
}
|
|
1167
|
+
declare global {
|
|
1168
|
+
interface HTMLElementTagNameMap {
|
|
1169
|
+
'qti-simple-choice': QtiSimpleChoice;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
export { QtiGapMatchInteraction as $, QtiFeedbackInline as A, type BaseType as B, type Calculate as C, QtiModalFeedback as D, QtiExtendedTextInteraction as E, QtiTextEntryInteraction as F, QtiHottextInteraction as G, QtiInlineChoiceInteraction as H, type ItemContext as I, QtiChoiceInteraction as J, QtiOutcomeProcessing as K, QtiOutcomeProcessingProcessor as L, type Multiple as M, QtiResponseProcessing as N, type OutcomeChangedDetails as O, QtiLookupOutcomeValue as P, QtiRule as Q, type ResponseVariable as R, QtiAnd as S, type MockQtiExpression as T, qtiAndMixin as U, type VariableDeclaration as V, QtiMapping as W, QtiPortableCustomInteraction as X, QtiAssociateInteraction as Y, QtiCustomInteraction as Z, QtiEndAttemptInteraction as _, type QtiRuleBase as a, QtiGraphicAssociateInteraction as a0, QtiGraphicGapMatchInteraction as a1, QtiGraphicOrderInteraction as a2, QtiHotspotInteraction as a3, QtiMatchInteraction as a4, QtiMediaInteraction as a5, QtiOrderInteraction as a6, QtiPositionObjectStage as a7, QtiSelectPointInteraction as a8, QtiSliderInteraction as a9, itemContextVariables as aa, itemContext as ab, QtiCustomOperator as ac, Interaction as ad, QtiAssociableHotspot as ae, QtiGap as af, QtiGapImg as ag, QtiGapText as ah, QtiHotspotChoice as ai, QtiHottext as aj, QtiInlineChoice as ak, QtiSimpleAssociableChoice as al, QtiSimpleChoice as am, type QtiExpressionBase as b, QtiExpression as c, QtiConditionExpression as d, type InteractionChangedDetails as e, type QtiInteractionChanged as f, type QtiOutcomeChanged as g, type directedPair as h, type ResponseInteraction as i, type float as j, type integer as k, type Ordered as l, type Cardinality as m, type VariableValue as n, type OutcomeVariable as o, QtiAssessmentItem as p, QtiAssessmentStimulusRef as q, QtiChoice as r, QtiPrompt as s, QtiStylesheet as t, QtiOutcomeDeclaration as u, QtiResponseDeclaration as v, QtiCompanionMaterialsInfo as w, QtiContentBody as x, QtiRubricBlock as y, QtiFeedbackBlock as z };
|