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